]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20141206
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.590 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
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 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --enable-mixed-case     tic should assume mixed-case filenames
718   --with-install-prefix   prefixes actual install-location ($DESTDIR)
719 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
720   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
721   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
722   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
723   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
724   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
725   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
726 Options to Specify the Libraries Built/Used:
727   --disable-libtool-version  enable to use libtool's incompatible naming scheme
728   --with-libtool          generate libraries with libtool
729   --with-shared           generate shared-libraries
730   --with-normal           generate normal-libraries (default)
731   --with-debug            generate debug-libraries (default)
732   --with-profile          generate profile-libraries
733   --with-cxx-shared       generate C++ shared-libraries
734   --with-lib-prefix       override library-prefix
735   --with-termlib          generate separate terminfo library
736   --with-ticlib           generate separate tic library
737   --with-gpm              use Alessandro Rubini's GPM library
738   --without-dlsym         do not use dlsym() to load GPM dynamically
739   --with-sysmouse         use sysmouse (FreeBSD console)
740   --enable-rpath          use rpath option when generating shared libraries
741   --disable-relink        relink shared libraries during install
742   --with-shlib-version=X  Specify rel or abi version for shared libs
743   --with-libtool-opts=XXX specify additional libtool options
744   --with-export-syms=XXX  limit exported symbols using libtool
745   --with-versioned-syms=X markup versioned symbols using ld
746   --disable-lib-suffixes  disable library suffixes
747   --disable-rpath-hack    don't add rpath options for additional libraries
748 Fine-Tuning Your Configuration:
749   --disable-overwrite     leave out the link to -lcurses
750   --disable-database      do not use terminfo, only fallbacks/termcap
751   --with-database=XXX     specify terminfo source to install
752   --with-hashed-db        specify hashed-database library
753   --with-fallbacks=XXX    specify list of fallback terminal descriptions
754   --without-xterm-new     specify if xterm terminfo should be old version
755   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
756   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
757   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
758   --disable-big-core      assume machine has little memory
759   --disable-big-strings   assume compiler has only standard-size strings
760   --enable-termcap        compile in termcap fallback support
761   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
762   --enable-getcap         fast termcap load, no xrefs to terminfo
763   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
764   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
765   --disable-root-environ  restrict environment when running as root
766   --enable-symlinks       make tic use symbolic links not hard links
767   --enable-broken_linker  compile with broken-linker support code
768   --enable-bsdpad         recognize BSD-style prefix padding
769   --enable-widec          compile with wide-char/UTF-8 code
770   --disable-lp64          allow chtype to be long (ignore _LP64)
771   --disable-largefile     omit support for large files
772   --disable-tparm-varargs compile tparm() without varargs interface
773   --disable-tic-depends   link tic library without explicit dependency on ncurses library
774   --with-bool=TYPE        override fallback type of bool variable
775   --with-caps=alt         compile with alternate Caps file
776   --with-chtype=TYPE      override type of chtype
777   --with-ospeed=TYPE      override type of ospeed variable
778   --with-mmask-t=TYPE     override type of mmask_t
779   --with-ccharw-max=XXX   override size CCHARW_MAX
780   --with-tparm-arg=TYPE   override parameter type of tparm
781   --with-rcs-ids          compile-in RCS identifiers
782 Options to Specify How Manpages are Installed:
783   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
784                           optionally formatted/catonly, e.g., gzip,formatted
785   --with-manpage-renames  specify manpage-renaming
786   --with-manpage-aliases  specify manpage-aliases using .so
787   --with-manpage-symlinks specify manpage-aliases using symlinks
788   --with-manpage-tbl      specify manpage processing with tbl
789 Extensions:
790   --disable-ext-funcs     disable function-extensions
791   --enable-sp-funcs       enable experimental SCREEN-extensions
792   --enable-term-driver    enable experimental terminal-driver
793   --enable-const          compile with extra/non-standard const
794   --enable-ext-colors     compile for 256-color support
795   --enable-ext-mouse      compile for extended mouse-encoding
796   --enable-no-padding     compile with $NCURSES_NO_PADDING code
797   --enable-signed-char    compile using signed Boolean's in term.h
798   --enable-sigwinch       compile with SIGWINCH handler
799   --enable-tcap-names     compile with user-definable terminal capabilities
800 Development Code:
801   --without-develop       disable development options
802   --enable-hard-tabs      compile with hard-tabs code
803   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
804 Experimental Code:
805   --disable-assumed-color do not assume anything about default-colors
806   --disable-hashmap       compile without hashmap scrolling-optimization
807   --enable-colorfgbg      compile-in experimental $COLORFGBG code
808   --enable-interop        compile-in experimental interop bindings
809   --with-pthread          use POSIX thread library
810   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
811   --enable-weak-symbols   enable weak-symbols for pthreads
812   --enable-reentrant      compile with experimental reentrant code
813   --with-wrap-prefix=XXX  override prefix used for public variables
814   --enable-safe-sprintf   compile with experimental safe-sprintf code
815   --disable-scroll-hints  compile without scroll-hints code
816   --enable-wgetch-events  compile with experimental wgetch-events code
817 Testing/development Options:
818   --disable-echo          do not display "compiling" commands
819   --enable-warnings       build: turn on GCC compiler warnings
820   --enable-string-hacks   work around bogus compiler/loader warnings
821   --enable-assertions     test: turn on generation of assertion code
822   --with-dmalloc          test: use Gray Watson's dmalloc library
823   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
824   --with-valgrind         test: use valgrind
825   --disable-leaks         test: free permanent memory, analyze leaks
826   --enable-expanded       test: generate functions for certain macros
827   --disable-macros        test: use functions rather than macros
828   --with-trace            test: add trace() function to all models of ncurses
829   --disable-gnat-projects test: disable GNAT projects even if usable
830 Ada95 Binding Options:
831   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
832   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
833   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
834   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
835
836 Some influential environment variables:
837   CC          C compiler command
838   CFLAGS      C compiler flags
839   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
840               nonstandard directory <lib dir>
841   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
842               headers in a nonstandard directory <include dir>
843   CPP         C preprocessor
844   CXX         C++ compiler command
845   CXXFLAGS    C++ compiler flags
846   CXXCPP      C++ preprocessor
847
848 Use these variables to override the choices made by `configure' or to help
849 it to find libraries and programs with nonstandard names/locations.
850
851 EOF
852 fi
853
854 if test "$ac_init_help" = "recursive"; then
855   # If there are subdirs, report their specific --help.
856   ac_popdir=`pwd`
857   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
858     cd $ac_subdir
859     # A "../" for each directory in /$ac_subdir.
860     ac_dots=`echo $ac_subdir |
861              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
862
863     case $srcdir in
864     .) # No --srcdir option.  We are building in place.
865       ac_sub_srcdir=$srcdir ;;
866     [\\/]* | ?:[\\/]* ) # Absolute path.
867       ac_sub_srcdir=$srcdir/$ac_subdir ;;
868     *) # Relative path.
869       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
870     esac
871
872     # Check for guested configure; otherwise get Cygnus style configure.
873     if test -f $ac_sub_srcdir/configure.gnu; then
874       echo
875       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
876     elif test -f $ac_sub_srcdir/configure; then
877       echo
878       $SHELL $ac_sub_srcdir/configure  --help=recursive
879     elif test -f $ac_sub_srcdir/configure.ac ||
880            test -f $ac_sub_srcdir/configure.in; then
881       echo
882       $ac_configure --help
883     else
884       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
885     fi
886     cd $ac_popdir
887   done
888 fi
889
890 test -n "$ac_init_help" && exit 0
891 if $ac_init_version; then
892   cat <<\EOF
893
894 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
895 Free Software Foundation, Inc.
896 This configure script is free software; the Free Software Foundation
897 gives unlimited permission to copy, distribute and modify it.
898 EOF
899   exit 0
900 fi
901 exec 5>config.log
902 cat >&5 <<EOF
903 This file contains any messages produced by compilers while
904 running configure, to aid debugging if configure makes a mistake.
905
906 It was created by $as_me, which was
907 generated by GNU Autoconf 2.52.20141204.  Invocation command line was
908
909   $ $0 $@
910
911 EOF
912 {
913 cat <<_ASUNAME
914 ## ---------- ##
915 ## Platform.  ##
916 ## ---------- ##
917
918 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
919 uname -m = `(uname -m) 2>/dev/null || echo unknown`
920 uname -r = `(uname -r) 2>/dev/null || echo unknown`
921 uname -s = `(uname -s) 2>/dev/null || echo unknown`
922 uname -v = `(uname -v) 2>/dev/null || echo unknown`
923
924 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
925 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
926
927 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
928 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
929 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
930 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
931 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
932 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
933 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
934
935 PATH = $PATH
936
937 _ASUNAME
938 } >&5
939
940 cat >&5 <<EOF
941 ## ------------ ##
942 ## Core tests.  ##
943 ## ------------ ##
944
945 EOF
946
947 # Keep a trace of the command line.
948 # Strip out --no-create and --no-recursion so they do not pile up.
949 # Also quote any args containing shell meta-characters.
950 ac_configure_args=
951 ac_sep=
952 for ac_arg
953 do
954   case $ac_arg in
955   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
956   | --no-cr | --no-c) ;;
957   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
958   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
959   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
960     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
961     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
962     ac_sep=" " ;;
963   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
964      ac_sep=" " ;;
965   esac
966   # Get rid of the leading space.
967 done
968
969 # When interrupted or exit'd, cleanup temporary files, and complete
970 # config.log.  We remove comments because anyway the quotes in there
971 # would cause problems or look ugly.
972 trap 'exit_status=$?
973   # Save into config.log some information that might help in debugging.
974   echo >&5
975   echo "## ----------------- ##" >&5
976   echo "## Cache variables.  ##" >&5
977   echo "## ----------------- ##" >&5
978   echo >&5
979   # The following way of writing the cache mishandles newlines in values,
980 {
981   (set) 2>&1 |
982     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
983     *ac_space=\ *)
984       sed -n \
985         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
986           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
987       ;;
988     *)
989       sed -n \
990         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
991       ;;
992     esac;
993 } >&5
994   sed "/^$/d" confdefs.h >conftest.log
995   if test -s conftest.log; then
996     echo >&5
997     echo "## ------------ ##" >&5
998     echo "## confdefs.h.  ##" >&5
999     echo "## ------------ ##" >&5
1000     echo >&5
1001     cat conftest.log >&5
1002   fi
1003   (echo; echo) >&5
1004   test "$ac_signal" != 0 &&
1005     echo "$as_me: caught signal $ac_signal" >&5
1006   echo "$as_me: exit $exit_status" >&5
1007   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1008     exit $exit_status
1009      ' 0
1010 for ac_signal in 1 2 13 15; do
1011   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1012 done
1013 ac_signal=0
1014
1015 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1016 rm -rf conftest* confdefs.h
1017 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1018 echo >confdefs.h
1019
1020 # Let the site file select an alternate cache file if it wants to.
1021 # Prefer explicitly selected file to automatically selected ones.
1022 if test -z "$CONFIG_SITE"; then
1023   if test "x$prefix" != xNONE; then
1024     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1025   else
1026     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1027   fi
1028 fi
1029 for ac_site_file in $CONFIG_SITE; do
1030   if test -r "$ac_site_file"; then
1031     { echo "$as_me:1031: loading site script $ac_site_file" >&5
1032 echo "$as_me: loading site script $ac_site_file" >&6;}
1033     cat "$ac_site_file" >&5
1034     . "$ac_site_file"
1035   fi
1036 done
1037
1038 if test -r "$cache_file"; then
1039   # Some versions of bash will fail to source /dev/null (special
1040   # files actually), so we avoid doing that.
1041   if test -f "$cache_file"; then
1042     { echo "$as_me:1042: loading cache $cache_file" >&5
1043 echo "$as_me: loading cache $cache_file" >&6;}
1044     case $cache_file in
1045       [\\/]* | ?:[\\/]* ) . $cache_file;;
1046       *)                      . ./$cache_file;;
1047     esac
1048   fi
1049 else
1050   { echo "$as_me:1050: creating cache $cache_file" >&5
1051 echo "$as_me: creating cache $cache_file" >&6;}
1052   >$cache_file
1053 fi
1054
1055 # Check that the precious variables saved in the cache have kept the same
1056 # value.
1057 ac_cache_corrupted=false
1058 for ac_var in `(set) 2>&1 |
1059                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1060   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1061   eval ac_new_set=\$ac_env_${ac_var}_set
1062   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1063   eval ac_new_val="\$ac_env_${ac_var}_value"
1064   case $ac_old_set,$ac_new_set in
1065     set,)
1066       { echo "$as_me:1066: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1067 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1068       ac_cache_corrupted=: ;;
1069     ,set)
1070       { echo "$as_me:1070: error: \`$ac_var' was not set in the previous run" >&5
1071 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1072       ac_cache_corrupted=: ;;
1073     ,);;
1074     *)
1075       if test "x$ac_old_val" != "x$ac_new_val"; then
1076         { echo "$as_me:1076: error: \`$ac_var' has changed since the previous run:" >&5
1077 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1078         { echo "$as_me:1078:   former value:  $ac_old_val" >&5
1079 echo "$as_me:   former value:  $ac_old_val" >&2;}
1080         { echo "$as_me:1080:   current value: $ac_new_val" >&5
1081 echo "$as_me:   current value: $ac_new_val" >&2;}
1082         ac_cache_corrupted=:
1083       fi;;
1084   esac
1085   # Pass precious variables to config.status.  It doesn't matter if
1086   # we pass some twice (in addition to the command line arguments).
1087   if test "$ac_new_set" = set; then
1088     case $ac_new_val in
1089     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1090       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1091       ac_configure_args="$ac_configure_args '$ac_arg'"
1092       ;;
1093     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1094        ;;
1095     esac
1096   fi
1097 done
1098 if $ac_cache_corrupted; then
1099   { echo "$as_me:1099: error: changes in the environment can compromise the build" >&5
1100 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1101   { { echo "$as_me:1101: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1102 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1103    { (exit 1); exit 1; }; }
1104 fi
1105
1106 ac_ext=c
1107 ac_cpp='$CPP $CPPFLAGS'
1108 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1109 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1110 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1111 ac_main_return=return
1112
1113 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1114   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1115                    ECHO_T='     ' ;;
1116   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1117   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1118 esac
1119 echo "#! $SHELL" >conftest.sh
1120 echo  "exit 0"   >>conftest.sh
1121 chmod +x conftest.sh
1122 if { (echo "$as_me:1122: PATH=\".;.\"; conftest.sh") >&5
1123   (PATH=".;."; conftest.sh) 2>&5
1124   ac_status=$?
1125   echo "$as_me:1125: \$? = $ac_status" >&5
1126   (exit $ac_status); }; then
1127   ac_path_separator=';'
1128 else
1129   ac_path_separator=:
1130 fi
1131 PATH_SEPARATOR="$ac_path_separator"
1132 rm -f conftest.sh
1133
1134 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1135
1136 top_builddir=`pwd`
1137
1138 echo "$as_me:1138: checking for egrep" >&5
1139 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1140 if test "${ac_cv_prog_egrep+set}" = set; then
1141   echo $ECHO_N "(cached) $ECHO_C" >&6
1142 else
1143   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1144     then ac_cv_prog_egrep='grep -E'
1145     else ac_cv_prog_egrep='egrep'
1146     fi
1147 fi
1148 echo "$as_me:1148: result: $ac_cv_prog_egrep" >&5
1149 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1150  EGREP=$ac_cv_prog_egrep
1151
1152 test -z "$EGREP" && { { echo "$as_me:1152: error: No egrep program found" >&5
1153 echo "$as_me: error: No egrep program found" >&2;}
1154    { (exit 1); exit 1; }; }
1155
1156 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1157 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1158 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1159 cf_cv_abi_version=${NCURSES_MAJOR}
1160 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1161 cf_cv_timestamp=`date`
1162 echo "$as_me:1162: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1163 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1164
1165 if test -f $srcdir/VERSION ; then
1166         echo "$as_me:1166: checking for package version" >&5
1167 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1168
1169         # if there are not enough fields, cut returns the last one...
1170         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1171         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1172         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1173
1174         # this is how CF_BUNDLED_INTL uses $VERSION:
1175         VERSION="$cf_field1"
1176
1177         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1178         test -z "$VERSION_MAJOR" && { { echo "$as_me:1178: error: missing major-version" >&5
1179 echo "$as_me: error: missing major-version" >&2;}
1180    { (exit 1); exit 1; }; }
1181
1182         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1183         test -z "$VERSION_MINOR" && { { echo "$as_me:1183: error: missing minor-version" >&5
1184 echo "$as_me: error: missing minor-version" >&2;}
1185    { (exit 1); exit 1; }; }
1186
1187         echo "$as_me:1187: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1188 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1189
1190         echo "$as_me:1190: checking for package patch date" >&5
1191 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1192         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1193         case .$VERSION_PATCH in
1194         .)
1195                 { { echo "$as_me:1195: error: missing patch-date $VERSION_PATCH" >&5
1196 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1197    { (exit 1); exit 1; }; }
1198                 ;;
1199         .[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1200                 ;;
1201         *)
1202                 { { echo "$as_me:1202: error: illegal patch-date $VERSION_PATCH" >&5
1203 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1204    { (exit 1); exit 1; }; }
1205                 ;;
1206         esac
1207         echo "$as_me:1207: result: $VERSION_PATCH" >&5
1208 echo "${ECHO_T}$VERSION_PATCH" >&6
1209 else
1210         { { echo "$as_me:1210: error: did not find $srcdir/VERSION" >&5
1211 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1212    { (exit 1); exit 1; }; }
1213 fi
1214
1215 # show the actual data that we have for versions:
1216 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1217
1218 echo "${as_me:-configure}:1218: testing ABI VERSION $VERSION ..." 1>&5
1219
1220 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1221
1222 echo "${as_me:-configure}:1222: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1223
1224 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1225
1226 echo "${as_me:-configure}:1226: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1227
1228 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1229
1230 echo "${as_me:-configure}:1230: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1231
1232         cf_PACKAGE=NCURSES
1233         PACKAGE=ncurses
1234
1235 cat >>confdefs.h <<EOF
1236 #define PACKAGE "$PACKAGE"
1237 EOF
1238
1239 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1240
1241         cat >>confdefs.h <<EOF
1242 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1243 EOF
1244
1245         cat >>confdefs.h <<EOF
1246 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1247 EOF
1248
1249 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1250
1251 # Check whether --with-rel-version or --without-rel-version was given.
1252 if test "${with_rel_version+set}" = set; then
1253   withval="$with_rel_version"
1254   { echo "$as_me:1254: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1255 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1256  cf_cv_rel_version=$withval
1257 fi;
1258
1259  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1260  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1261
1262 if test -n "$NCURSES_MAJOR" ; then
1263   case $NCURSES_MAJOR in #(vi
1264   [0-9]*) #(vi
1265         ;;
1266   *)
1267         { { echo "$as_me:1267: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1268 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1269    { (exit 1); exit 1; }; }
1270         ;;
1271   esac
1272 else
1273   { { echo "$as_me:1273: error: Release major-version value is empty" >&5
1274 echo "$as_me: error: Release major-version value is empty" >&2;}
1275    { (exit 1); exit 1; }; }
1276 fi
1277
1278 if test -n "$NCURSES_MINOR" ; then
1279   case $NCURSES_MINOR in #(vi
1280   [0-9]*) #(vi
1281         ;;
1282   *)
1283         { { echo "$as_me:1283: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1284 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1285    { (exit 1); exit 1; }; }
1286         ;;
1287   esac
1288 else
1289   { { echo "$as_me:1289: error: Release minor-version value is empty" >&5
1290 echo "$as_me: error: Release minor-version value is empty" >&2;}
1291    { (exit 1); exit 1; }; }
1292 fi
1293
1294 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1295
1296 # Check whether --with-abi-version or --without-abi-version was given.
1297 if test "${with_abi_version+set}" = set; then
1298   withval="$with_abi_version"
1299   { echo "$as_me:1299: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1300 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1301  cf_cv_abi_version=$withval
1302 fi;
1303
1304 if test -n "$cf_cv_abi_version" ; then
1305   case $cf_cv_abi_version in #(vi
1306   [0-9]*) #(vi
1307         ;;
1308   *)
1309         { { echo "$as_me:1309: error: ABI version is not a number: $cf_cv_abi_version" >&5
1310 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1311    { (exit 1); exit 1; }; }
1312         ;;
1313   esac
1314 else
1315   { { echo "$as_me:1315: error: ABI version value is empty" >&5
1316 echo "$as_me: error: ABI version value is empty" >&2;}
1317    { (exit 1); exit 1; }; }
1318 fi
1319
1320 ac_aux_dir=
1321 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1322   if test -f $ac_dir/install-sh; then
1323     ac_aux_dir=$ac_dir
1324     ac_install_sh="$ac_aux_dir/install-sh -c"
1325     break
1326   elif test -f $ac_dir/install.sh; then
1327     ac_aux_dir=$ac_dir
1328     ac_install_sh="$ac_aux_dir/install.sh -c"
1329     break
1330   elif test -f $ac_dir/shtool; then
1331     ac_aux_dir=$ac_dir
1332     ac_install_sh="$ac_aux_dir/shtool install -c"
1333     break
1334   fi
1335 done
1336 if test -z "$ac_aux_dir"; then
1337   { { echo "$as_me:1337: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1338 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1339    { (exit 1); exit 1; }; }
1340 fi
1341 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1342 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1343 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1344
1345 # Make sure we can run config.sub.
1346 $ac_config_sub sun4 >/dev/null 2>&1 ||
1347   { { echo "$as_me:1347: error: cannot run $ac_config_sub" >&5
1348 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1349    { (exit 1); exit 1; }; }
1350
1351 echo "$as_me:1351: checking build system type" >&5
1352 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1353 if test "${ac_cv_build+set}" = set; then
1354   echo $ECHO_N "(cached) $ECHO_C" >&6
1355 else
1356   ac_cv_build_alias=$build_alias
1357 test -z "$ac_cv_build_alias" &&
1358   ac_cv_build_alias=`$ac_config_guess`
1359 test -z "$ac_cv_build_alias" &&
1360   { { echo "$as_me:1360: error: cannot guess build type; you must specify one" >&5
1361 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1362    { (exit 1); exit 1; }; }
1363 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1364   { { echo "$as_me:1364: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1365 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1366    { (exit 1); exit 1; }; }
1367
1368 fi
1369 echo "$as_me:1369: result: $ac_cv_build" >&5
1370 echo "${ECHO_T}$ac_cv_build" >&6
1371 build=$ac_cv_build
1372 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1373 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1374 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1375
1376 echo "$as_me:1376: checking host system type" >&5
1377 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1378 if test "${ac_cv_host+set}" = set; then
1379   echo $ECHO_N "(cached) $ECHO_C" >&6
1380 else
1381   ac_cv_host_alias=$host_alias
1382 test -z "$ac_cv_host_alias" &&
1383   ac_cv_host_alias=$ac_cv_build_alias
1384 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1385   { { echo "$as_me:1385: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1386 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1387    { (exit 1); exit 1; }; }
1388
1389 fi
1390 echo "$as_me:1390: result: $ac_cv_host" >&5
1391 echo "${ECHO_T}$ac_cv_host" >&6
1392 host=$ac_cv_host
1393 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1394 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1395 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1396
1397 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1398         echo "$as_me:1398: checking target system type" >&5
1399 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1400 if test "${ac_cv_target+set}" = set; then
1401   echo $ECHO_N "(cached) $ECHO_C" >&6
1402 else
1403   ac_cv_target_alias=$target_alias
1404 test "x$ac_cv_target_alias" = "x" &&
1405   ac_cv_target_alias=$ac_cv_host_alias
1406 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1407   { { echo "$as_me:1407: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1408 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1409    { (exit 1); exit 1; }; }
1410
1411 fi
1412 echo "$as_me:1412: result: $ac_cv_target" >&5
1413 echo "${ECHO_T}$ac_cv_target" >&6
1414 target=$ac_cv_target
1415 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1416 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1417 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1418
1419 # The aliases save the names the user supplied, while $host etc.
1420 # will get canonicalized.
1421 test -n "$target_alias" &&
1422   test "$program_prefix$program_suffix$program_transform_name" = \
1423     NONENONEs,x,x, &&
1424   program_prefix=${target_alias}-
1425         system_name="$host_os"
1426 else
1427         system_name="`(uname -s -r) 2>/dev/null`"
1428         if test -z "$system_name" ; then
1429                 system_name="`(hostname) 2>/dev/null`"
1430         fi
1431 fi
1432 test -n "$system_name" &&
1433 cat >>confdefs.h <<EOF
1434 #define SYSTEM_NAME "$system_name"
1435 EOF
1436
1437 if test "${cf_cv_system_name+set}" = set; then
1438   echo $ECHO_N "(cached) $ECHO_C" >&6
1439 else
1440   cf_cv_system_name="$system_name"
1441 fi
1442
1443 test -z "$system_name" && system_name="$cf_cv_system_name"
1444 test -n "$cf_cv_system_name" && echo "$as_me:1444: result: Configuring for $cf_cv_system_name" >&5
1445 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1446
1447 if test ".$system_name" != ".$cf_cv_system_name" ; then
1448         echo "$as_me:1448: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1449 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1450         { { echo "$as_me:1450: error: \"Please remove config.cache and try again.\"" >&5
1451 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1452    { (exit 1); exit 1; }; }
1453 fi
1454
1455 # Check whether --with-system-type or --without-system-type was given.
1456 if test "${with_system_type+set}" = set; then
1457   withval="$with_system_type"
1458   { echo "$as_me:1458: WARNING: overriding system type to $withval" >&5
1459 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1460         cf_cv_system_name=$withval
1461         host_os=$withval
1462
1463 fi;
1464
1465 ###     Save the given $CFLAGS to allow user-override.
1466 cf_user_CFLAGS="$CFLAGS"
1467
1468 ###     Default install-location
1469
1470 echo "$as_me:1470: checking for prefix" >&5
1471 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1472 if test "x$prefix" = "xNONE" ; then
1473         case "$cf_cv_system_name" in
1474                 # non-vendor systems don't have a conflict
1475         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1476                 prefix=/usr
1477                 ;;
1478         *)      prefix=$ac_default_prefix
1479                 ;;
1480         esac
1481 fi
1482 echo "$as_me:1482: result: $prefix" >&5
1483 echo "${ECHO_T}$prefix" >&6
1484
1485 if test "x$prefix" = "xNONE" ; then
1486 echo "$as_me:1486: checking for default include-directory" >&5
1487 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1488 test -n "$verbose" && echo 1>&6
1489 for cf_symbol in \
1490         $includedir \
1491         $includedir/ncurses \
1492         $prefix/include \
1493         $prefix/include/ncurses \
1494         /usr/local/include \
1495         /usr/local/include/ncurses \
1496         /usr/include \
1497         /usr/include/ncurses
1498 do
1499         cf_dir=`eval echo $cf_symbol`
1500         if test -f $cf_dir/curses.h ; then
1501         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1502                 includedir="$cf_symbol"
1503                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1504                 break
1505         fi
1506         fi
1507         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1508 done
1509 echo "$as_me:1509: result: $includedir" >&5
1510 echo "${ECHO_T}$includedir" >&6
1511 fi
1512
1513 ###     Checks for programs.
1514
1515 # Check whether --with-ada or --without-ada was given.
1516 if test "${with_ada+set}" = set; then
1517   withval="$with_ada"
1518   cf_with_ada=$withval
1519 else
1520   cf_with_ada=yes
1521 fi;
1522 if test "x$cf_with_ada" = xyes
1523 then
1524         cf_PROG_CC="gnatgcc gcc cc"
1525 else
1526         cf_PROG_CC="gcc cc"
1527 fi
1528
1529 ac_ext=c
1530 ac_cpp='$CPP $CPPFLAGS'
1531 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1532 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1533 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1534 ac_main_return=return
1535 if test -n "$ac_tool_prefix"; then
1536   for ac_prog in $cf_PROG_CC
1537   do
1538     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1539 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1540 echo "$as_me:1540: checking for $ac_word" >&5
1541 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1542 if test "${ac_cv_prog_CC+set}" = set; then
1543   echo $ECHO_N "(cached) $ECHO_C" >&6
1544 else
1545   if test -n "$CC"; then
1546   ac_cv_prog_CC="$CC" # Let the user override the test.
1547 else
1548   ac_save_IFS=$IFS; IFS=$ac_path_separator
1549 ac_dummy="$PATH"
1550 for ac_dir in $ac_dummy; do
1551   IFS=$ac_save_IFS
1552   test -z "$ac_dir" && ac_dir=.
1553   $as_executable_p "$ac_dir/$ac_word" || continue
1554 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1555 echo "$as_me:1555: found $ac_dir/$ac_word" >&5
1556 break
1557 done
1558
1559 fi
1560 fi
1561 CC=$ac_cv_prog_CC
1562 if test -n "$CC"; then
1563   echo "$as_me:1563: result: $CC" >&5
1564 echo "${ECHO_T}$CC" >&6
1565 else
1566   echo "$as_me:1566: result: no" >&5
1567 echo "${ECHO_T}no" >&6
1568 fi
1569
1570     test -n "$CC" && break
1571   done
1572 fi
1573 if test -z "$CC"; then
1574   ac_ct_CC=$CC
1575   for ac_prog in $cf_PROG_CC
1576 do
1577   # Extract the first word of "$ac_prog", so it can be a program name with args.
1578 set dummy $ac_prog; ac_word=$2
1579 echo "$as_me:1579: checking for $ac_word" >&5
1580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1581 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1582   echo $ECHO_N "(cached) $ECHO_C" >&6
1583 else
1584   if test -n "$ac_ct_CC"; then
1585   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1586 else
1587   ac_save_IFS=$IFS; IFS=$ac_path_separator
1588 ac_dummy="$PATH"
1589 for ac_dir in $ac_dummy; do
1590   IFS=$ac_save_IFS
1591   test -z "$ac_dir" && ac_dir=.
1592   $as_executable_p "$ac_dir/$ac_word" || continue
1593 ac_cv_prog_ac_ct_CC="$ac_prog"
1594 echo "$as_me:1594: found $ac_dir/$ac_word" >&5
1595 break
1596 done
1597
1598 fi
1599 fi
1600 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1601 if test -n "$ac_ct_CC"; then
1602   echo "$as_me:1602: result: $ac_ct_CC" >&5
1603 echo "${ECHO_T}$ac_ct_CC" >&6
1604 else
1605   echo "$as_me:1605: result: no" >&5
1606 echo "${ECHO_T}no" >&6
1607 fi
1608
1609   test -n "$ac_ct_CC" && break
1610 done
1611
1612   CC=$ac_ct_CC
1613 fi
1614
1615 test -z "$CC" && { { echo "$as_me:1615: error: no acceptable cc found in \$PATH" >&5
1616 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1617    { (exit 1); exit 1; }; }
1618
1619 # Provide some information about the compiler.
1620 echo "$as_me:1620:" \
1621      "checking for C compiler version" >&5
1622 ac_compiler=`set X $ac_compile; echo $2`
1623 { (eval echo "$as_me:1623: \"$ac_compiler --version </dev/null >&5\"") >&5
1624   (eval $ac_compiler --version </dev/null >&5) 2>&5
1625   ac_status=$?
1626   echo "$as_me:1626: \$? = $ac_status" >&5
1627   (exit $ac_status); }
1628 { (eval echo "$as_me:1628: \"$ac_compiler -v </dev/null >&5\"") >&5
1629   (eval $ac_compiler -v </dev/null >&5) 2>&5
1630   ac_status=$?
1631   echo "$as_me:1631: \$? = $ac_status" >&5
1632   (exit $ac_status); }
1633 { (eval echo "$as_me:1633: \"$ac_compiler -V </dev/null >&5\"") >&5
1634   (eval $ac_compiler -V </dev/null >&5) 2>&5
1635   ac_status=$?
1636   echo "$as_me:1636: \$? = $ac_status" >&5
1637   (exit $ac_status); }
1638
1639 cat >conftest.$ac_ext <<_ACEOF
1640 #line 1640 "configure"
1641 #include "confdefs.h"
1642
1643 int
1644 main ()
1645 {
1646
1647   ;
1648   return 0;
1649 }
1650 _ACEOF
1651 ac_clean_files_save=$ac_clean_files
1652 ac_clean_files="$ac_clean_files a.out a.exe"
1653 # Try to create an executable without -o first, disregard a.out.
1654 # It will help us diagnose broken compilers, and finding out an intuition
1655 # of exeext.
1656 echo "$as_me:1656: checking for C compiler default output" >&5
1657 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1658 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1659 if { (eval echo "$as_me:1659: \"$ac_link_default\"") >&5
1660   (eval $ac_link_default) 2>&5
1661   ac_status=$?
1662   echo "$as_me:1662: \$? = $ac_status" >&5
1663   (exit $ac_status); }; then
1664   # Find the output, starting from the most likely.  This scheme is
1665 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1666 # resort.
1667 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1668                 ls a.out conftest 2>/dev/null;
1669                 ls a.* conftest.* 2>/dev/null`; do
1670   case $ac_file in
1671     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1672     a.out ) # We found the default executable, but exeext='' is most
1673             # certainly right.
1674             break;;
1675     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1676           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1677           export ac_cv_exeext
1678           break;;
1679     * ) break;;
1680   esac
1681 done
1682 else
1683   echo "$as_me: failed program was:" >&5
1684 cat conftest.$ac_ext >&5
1685 { { echo "$as_me:1685: error: C compiler cannot create executables" >&5
1686 echo "$as_me: error: C compiler cannot create executables" >&2;}
1687    { (exit 77); exit 77; }; }
1688 fi
1689
1690 ac_exeext=$ac_cv_exeext
1691 echo "$as_me:1691: result: $ac_file" >&5
1692 echo "${ECHO_T}$ac_file" >&6
1693
1694 # Check the compiler produces executables we can run.  If not, either
1695 # the compiler is broken, or we cross compile.
1696 echo "$as_me:1696: checking whether the C compiler works" >&5
1697 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1698 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1699 # If not cross compiling, check that we can run a simple program.
1700 if test "$cross_compiling" != yes; then
1701   if { ac_try='./$ac_file'
1702   { (eval echo "$as_me:1702: \"$ac_try\"") >&5
1703   (eval $ac_try) 2>&5
1704   ac_status=$?
1705   echo "$as_me:1705: \$? = $ac_status" >&5
1706   (exit $ac_status); }; }; then
1707     cross_compiling=no
1708   else
1709     if test "$cross_compiling" = maybe; then
1710         cross_compiling=yes
1711     else
1712         { { echo "$as_me:1712: error: cannot run C compiled programs.
1713 If you meant to cross compile, use \`--host'." >&5
1714 echo "$as_me: error: cannot run C compiled programs.
1715 If you meant to cross compile, use \`--host'." >&2;}
1716    { (exit 1); exit 1; }; }
1717     fi
1718   fi
1719 fi
1720 echo "$as_me:1720: result: yes" >&5
1721 echo "${ECHO_T}yes" >&6
1722
1723 rm -f a.out a.exe conftest$ac_cv_exeext
1724 ac_clean_files=$ac_clean_files_save
1725 # Check the compiler produces executables we can run.  If not, either
1726 # the compiler is broken, or we cross compile.
1727 echo "$as_me:1727: checking whether we are cross compiling" >&5
1728 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1729 echo "$as_me:1729: result: $cross_compiling" >&5
1730 echo "${ECHO_T}$cross_compiling" >&6
1731
1732 echo "$as_me:1732: checking for executable suffix" >&5
1733 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1734 if { (eval echo "$as_me:1734: \"$ac_link\"") >&5
1735   (eval $ac_link) 2>&5
1736   ac_status=$?
1737   echo "$as_me:1737: \$? = $ac_status" >&5
1738   (exit $ac_status); }; then
1739   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1740 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1741 # work properly (i.e., refer to `conftest.exe'), while it won't with
1742 # `rm'.
1743 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1744   case $ac_file in
1745     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1746     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1747           export ac_cv_exeext
1748           break;;
1749     * ) break;;
1750   esac
1751 done
1752 else
1753   { { echo "$as_me:1753: error: cannot compute EXEEXT: cannot compile and link" >&5
1754 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1755    { (exit 1); exit 1; }; }
1756 fi
1757
1758 rm -f conftest$ac_cv_exeext
1759 echo "$as_me:1759: result: $ac_cv_exeext" >&5
1760 echo "${ECHO_T}$ac_cv_exeext" >&6
1761
1762 rm -f conftest.$ac_ext
1763 EXEEXT=$ac_cv_exeext
1764 ac_exeext=$EXEEXT
1765 echo "$as_me:1765: checking for object suffix" >&5
1766 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1767 if test "${ac_cv_objext+set}" = set; then
1768   echo $ECHO_N "(cached) $ECHO_C" >&6
1769 else
1770   cat >conftest.$ac_ext <<_ACEOF
1771 #line 1771 "configure"
1772 #include "confdefs.h"
1773
1774 int
1775 main ()
1776 {
1777
1778   ;
1779   return 0;
1780 }
1781 _ACEOF
1782 rm -f conftest.o conftest.obj
1783 if { (eval echo "$as_me:1783: \"$ac_compile\"") >&5
1784   (eval $ac_compile) 2>&5
1785   ac_status=$?
1786   echo "$as_me:1786: \$? = $ac_status" >&5
1787   (exit $ac_status); }; then
1788   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1789   case $ac_file in
1790     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1791     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1792        break;;
1793   esac
1794 done
1795 else
1796   echo "$as_me: failed program was:" >&5
1797 cat conftest.$ac_ext >&5
1798 { { echo "$as_me:1798: error: cannot compute OBJEXT: cannot compile" >&5
1799 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1800    { (exit 1); exit 1; }; }
1801 fi
1802
1803 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1804 fi
1805 echo "$as_me:1805: result: $ac_cv_objext" >&5
1806 echo "${ECHO_T}$ac_cv_objext" >&6
1807 OBJEXT=$ac_cv_objext
1808 ac_objext=$OBJEXT
1809 echo "$as_me:1809: checking whether we are using the GNU C compiler" >&5
1810 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1811 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1812   echo $ECHO_N "(cached) $ECHO_C" >&6
1813 else
1814   cat >conftest.$ac_ext <<_ACEOF
1815 #line 1815 "configure"
1816 #include "confdefs.h"
1817
1818 int
1819 main ()
1820 {
1821 #ifndef __GNUC__
1822        choke me
1823 #endif
1824
1825   ;
1826   return 0;
1827 }
1828 _ACEOF
1829 rm -f conftest.$ac_objext
1830 if { (eval echo "$as_me:1830: \"$ac_compile\"") >&5
1831   (eval $ac_compile) 2>&5
1832   ac_status=$?
1833   echo "$as_me:1833: \$? = $ac_status" >&5
1834   (exit $ac_status); } &&
1835          { ac_try='test -s conftest.$ac_objext'
1836   { (eval echo "$as_me:1836: \"$ac_try\"") >&5
1837   (eval $ac_try) 2>&5
1838   ac_status=$?
1839   echo "$as_me:1839: \$? = $ac_status" >&5
1840   (exit $ac_status); }; }; then
1841   ac_compiler_gnu=yes
1842 else
1843   echo "$as_me: failed program was:" >&5
1844 cat conftest.$ac_ext >&5
1845 ac_compiler_gnu=no
1846 fi
1847 rm -f conftest.$ac_objext conftest.$ac_ext
1848 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1849
1850 fi
1851 echo "$as_me:1851: result: $ac_cv_c_compiler_gnu" >&5
1852 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1853 GCC=`test $ac_compiler_gnu = yes && echo yes`
1854 ac_test_CFLAGS=${CFLAGS+set}
1855 ac_save_CFLAGS=$CFLAGS
1856 CFLAGS="-g"
1857 echo "$as_me:1857: checking whether $CC accepts -g" >&5
1858 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1859 if test "${ac_cv_prog_cc_g+set}" = set; then
1860   echo $ECHO_N "(cached) $ECHO_C" >&6
1861 else
1862   cat >conftest.$ac_ext <<_ACEOF
1863 #line 1863 "configure"
1864 #include "confdefs.h"
1865
1866 int
1867 main ()
1868 {
1869
1870   ;
1871   return 0;
1872 }
1873 _ACEOF
1874 rm -f conftest.$ac_objext
1875 if { (eval echo "$as_me:1875: \"$ac_compile\"") >&5
1876   (eval $ac_compile) 2>&5
1877   ac_status=$?
1878   echo "$as_me:1878: \$? = $ac_status" >&5
1879   (exit $ac_status); } &&
1880          { ac_try='test -s conftest.$ac_objext'
1881   { (eval echo "$as_me:1881: \"$ac_try\"") >&5
1882   (eval $ac_try) 2>&5
1883   ac_status=$?
1884   echo "$as_me:1884: \$? = $ac_status" >&5
1885   (exit $ac_status); }; }; then
1886   ac_cv_prog_cc_g=yes
1887 else
1888   echo "$as_me: failed program was:" >&5
1889 cat conftest.$ac_ext >&5
1890 ac_cv_prog_cc_g=no
1891 fi
1892 rm -f conftest.$ac_objext conftest.$ac_ext
1893 fi
1894 echo "$as_me:1894: result: $ac_cv_prog_cc_g" >&5
1895 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1896 if test "$ac_test_CFLAGS" = set; then
1897   CFLAGS=$ac_save_CFLAGS
1898 elif test $ac_cv_prog_cc_g = yes; then
1899   if test "$GCC" = yes; then
1900     CFLAGS="-g -O2"
1901   else
1902     CFLAGS="-g"
1903   fi
1904 else
1905   if test "$GCC" = yes; then
1906     CFLAGS="-O2"
1907   else
1908     CFLAGS=
1909   fi
1910 fi
1911 # Some people use a C++ compiler to compile C.  Since we use `exit',
1912 # in C++ we need to declare it.  In case someone uses the same compiler
1913 # for both compiling C and C++ we need to have the C++ compiler decide
1914 # the declaration of exit, since it's the most demanding environment.
1915 cat >conftest.$ac_ext <<_ACEOF
1916 #ifndef __cplusplus
1917   choke me
1918 #endif
1919 _ACEOF
1920 rm -f conftest.$ac_objext
1921 if { (eval echo "$as_me:1921: \"$ac_compile\"") >&5
1922   (eval $ac_compile) 2>&5
1923   ac_status=$?
1924   echo "$as_me:1924: \$? = $ac_status" >&5
1925   (exit $ac_status); } &&
1926          { ac_try='test -s conftest.$ac_objext'
1927   { (eval echo "$as_me:1927: \"$ac_try\"") >&5
1928   (eval $ac_try) 2>&5
1929   ac_status=$?
1930   echo "$as_me:1930: \$? = $ac_status" >&5
1931   (exit $ac_status); }; }; then
1932   for ac_declaration in \
1933    ''\
1934    '#include <stdlib.h>' \
1935    'extern "C" void std::exit (int) throw (); using std::exit;' \
1936    'extern "C" void std::exit (int); using std::exit;' \
1937    'extern "C" void exit (int) throw ();' \
1938    'extern "C" void exit (int);' \
1939    'void exit (int);'
1940 do
1941   cat >conftest.$ac_ext <<_ACEOF
1942 #line 1942 "configure"
1943 #include "confdefs.h"
1944 #include <stdlib.h>
1945 $ac_declaration
1946 int
1947 main ()
1948 {
1949 exit (42);
1950   ;
1951   return 0;
1952 }
1953 _ACEOF
1954 rm -f conftest.$ac_objext
1955 if { (eval echo "$as_me:1955: \"$ac_compile\"") >&5
1956   (eval $ac_compile) 2>&5
1957   ac_status=$?
1958   echo "$as_me:1958: \$? = $ac_status" >&5
1959   (exit $ac_status); } &&
1960          { ac_try='test -s conftest.$ac_objext'
1961   { (eval echo "$as_me:1961: \"$ac_try\"") >&5
1962   (eval $ac_try) 2>&5
1963   ac_status=$?
1964   echo "$as_me:1964: \$? = $ac_status" >&5
1965   (exit $ac_status); }; }; then
1966   :
1967 else
1968   echo "$as_me: failed program was:" >&5
1969 cat conftest.$ac_ext >&5
1970 continue
1971 fi
1972 rm -f conftest.$ac_objext conftest.$ac_ext
1973   cat >conftest.$ac_ext <<_ACEOF
1974 #line 1974 "configure"
1975 #include "confdefs.h"
1976 $ac_declaration
1977 int
1978 main ()
1979 {
1980 exit (42);
1981   ;
1982   return 0;
1983 }
1984 _ACEOF
1985 rm -f conftest.$ac_objext
1986 if { (eval echo "$as_me:1986: \"$ac_compile\"") >&5
1987   (eval $ac_compile) 2>&5
1988   ac_status=$?
1989   echo "$as_me:1989: \$? = $ac_status" >&5
1990   (exit $ac_status); } &&
1991          { ac_try='test -s conftest.$ac_objext'
1992   { (eval echo "$as_me:1992: \"$ac_try\"") >&5
1993   (eval $ac_try) 2>&5
1994   ac_status=$?
1995   echo "$as_me:1995: \$? = $ac_status" >&5
1996   (exit $ac_status); }; }; then
1997   break
1998 else
1999   echo "$as_me: failed program was:" >&5
2000 cat conftest.$ac_ext >&5
2001 fi
2002 rm -f conftest.$ac_objext conftest.$ac_ext
2003 done
2004 rm -rf conftest*
2005 if test -n "$ac_declaration"; then
2006   echo '#ifdef __cplusplus' >>confdefs.h
2007   echo $ac_declaration      >>confdefs.h
2008   echo '#endif'             >>confdefs.h
2009 fi
2010
2011 else
2012   echo "$as_me: failed program was:" >&5
2013 cat conftest.$ac_ext >&5
2014 fi
2015 rm -f conftest.$ac_objext conftest.$ac_ext
2016 ac_ext=c
2017 ac_cpp='$CPP $CPPFLAGS'
2018 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2019 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2020 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2021 ac_main_return=return
2022
2023 GCC_VERSION=none
2024 if test "$GCC" = yes ; then
2025         echo "$as_me:2025: checking version of $CC" >&5
2026 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2027         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.].*//'`"
2028         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2029         echo "$as_me:2029: result: $GCC_VERSION" >&5
2030 echo "${ECHO_T}$GCC_VERSION" >&6
2031 fi
2032
2033 echo "$as_me:2033: checking for $CC option to accept ANSI C" >&5
2034 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2035 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2036   echo $ECHO_N "(cached) $ECHO_C" >&6
2037 else
2038   ac_cv_prog_cc_stdc=no
2039 ac_save_CC=$CC
2040 cat >conftest.$ac_ext <<_ACEOF
2041 #line 2041 "configure"
2042 #include "confdefs.h"
2043 #include <stdarg.h>
2044 #include <stdio.h>
2045 #include <sys/types.h>
2046 #include <sys/stat.h>
2047 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2048 struct buf { int x; };
2049 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2050 static char *e (p, i)
2051      char **p;
2052      int i;
2053 {
2054   return p[i];
2055 }
2056 static char *f (char * (*g) (char **, int), char **p, ...)
2057 {
2058   char *s;
2059   va_list v;
2060   va_start (v,p);
2061   s = g (p, va_arg (v,int));
2062   va_end (v);
2063   return s;
2064 }
2065 int test (int i, double x);
2066 struct s1 {int (*f) (int a);};
2067 struct s2 {int (*f) (double a);};
2068 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2069 int argc;
2070 char **argv;
2071 int
2072 main ()
2073 {
2074 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2075   ;
2076   return 0;
2077 }
2078 _ACEOF
2079 # Don't try gcc -ansi; that turns off useful extensions and
2080 # breaks some systems' header files.
2081 # AIX                   -qlanglvl=ansi
2082 # Ultrix and OSF/1      -std1
2083 # HP-UX 10.20 and later -Ae
2084 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2085 # SVR4                  -Xc -D__EXTENSIONS__
2086 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2087 do
2088   CC="$ac_save_CC $ac_arg"
2089   rm -f conftest.$ac_objext
2090 if { (eval echo "$as_me:2090: \"$ac_compile\"") >&5
2091   (eval $ac_compile) 2>&5
2092   ac_status=$?
2093   echo "$as_me:2093: \$? = $ac_status" >&5
2094   (exit $ac_status); } &&
2095          { ac_try='test -s conftest.$ac_objext'
2096   { (eval echo "$as_me:2096: \"$ac_try\"") >&5
2097   (eval $ac_try) 2>&5
2098   ac_status=$?
2099   echo "$as_me:2099: \$? = $ac_status" >&5
2100   (exit $ac_status); }; }; then
2101   ac_cv_prog_cc_stdc=$ac_arg
2102 break
2103 else
2104   echo "$as_me: failed program was:" >&5
2105 cat conftest.$ac_ext >&5
2106 fi
2107 rm -f conftest.$ac_objext
2108 done
2109 rm -f conftest.$ac_ext conftest.$ac_objext
2110 CC=$ac_save_CC
2111
2112 fi
2113
2114 case "x$ac_cv_prog_cc_stdc" in
2115   x|xno)
2116     echo "$as_me:2116: result: none needed" >&5
2117 echo "${ECHO_T}none needed" >&6 ;;
2118   *)
2119     echo "$as_me:2119: result: $ac_cv_prog_cc_stdc" >&5
2120 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2121     CC="$CC $ac_cv_prog_cc_stdc" ;;
2122 esac
2123
2124 # This should have been defined by AC_PROG_CC
2125 : ${CC:=cc}
2126
2127 echo "$as_me:2127: checking \$CC variable" >&5
2128 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2129 case "$CC" in #(vi
2130 *[\ \   ]-[IUD]*)
2131         echo "$as_me:2131: result: broken" >&5
2132 echo "${ECHO_T}broken" >&6
2133         { echo "$as_me:2133: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2134 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2135         # humor him...
2136         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2137         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2138
2139 cf_fix_cppflags=no
2140 cf_new_cflags=
2141 cf_new_cppflags=
2142 cf_new_extra_cppflags=
2143
2144 for cf_add_cflags in $cf_flags
2145 do
2146 case $cf_fix_cppflags in
2147 no)
2148         case $cf_add_cflags in #(vi
2149         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2150                 case $cf_add_cflags in
2151                 -D*)
2152                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2153
2154                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2155                                 && test -z "${cf_tst_cflags}" \
2156                                 && cf_fix_cppflags=yes
2157
2158                         if test $cf_fix_cppflags = yes ; then
2159                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2160                                 continue
2161                         elif test "${cf_tst_cflags}" = "\"'" ; then
2162                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2163                                 continue
2164                         fi
2165                         ;;
2166                 esac
2167                 case "$CPPFLAGS" in
2168                 *$cf_add_cflags) #(vi
2169                         ;;
2170                 *) #(vi
2171                         case $cf_add_cflags in #(vi
2172                         -D*)
2173                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2174
2175 CPPFLAGS=`echo "$CPPFLAGS" | \
2176         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2177                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2178
2179                                 ;;
2180                         esac
2181                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2182                         ;;
2183                 esac
2184                 ;;
2185         *)
2186                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2187                 ;;
2188         esac
2189         ;;
2190 yes)
2191         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2192
2193         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2194
2195         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2196                 && test -z "${cf_tst_cflags}" \
2197                 && cf_fix_cppflags=no
2198         ;;
2199 esac
2200 done
2201
2202 if test -n "$cf_new_cflags" ; then
2203
2204         CFLAGS="$CFLAGS $cf_new_cflags"
2205 fi
2206
2207 if test -n "$cf_new_cppflags" ; then
2208
2209         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2210 fi
2211
2212 if test -n "$cf_new_extra_cppflags" ; then
2213
2214         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2215 fi
2216
2217         ;;
2218 *)
2219         echo "$as_me:2219: result: ok" >&5
2220 echo "${ECHO_T}ok" >&6
2221         ;;
2222 esac
2223
2224 ac_ext=c
2225 ac_cpp='$CPP $CPPFLAGS'
2226 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2227 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2228 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2229 ac_main_return=return
2230 echo "$as_me:2230: checking how to run the C preprocessor" >&5
2231 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2232 # On Suns, sometimes $CPP names a directory.
2233 if test -n "$CPP" && test -d "$CPP"; then
2234   CPP=
2235 fi
2236 if test -z "$CPP"; then
2237   if test "${ac_cv_prog_CPP+set}" = set; then
2238   echo $ECHO_N "(cached) $ECHO_C" >&6
2239 else
2240       # Double quotes because CPP needs to be expanded
2241     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2242     do
2243       ac_preproc_ok=false
2244 for ac_c_preproc_warn_flag in '' yes
2245 do
2246   # Use a header file that comes with gcc, so configuring glibc
2247   # with a fresh cross-compiler works.
2248   # On the NeXT, cc -E runs the code through the compiler's parser,
2249   # not just through cpp. "Syntax error" is here to catch this case.
2250   cat >conftest.$ac_ext <<_ACEOF
2251 #line 2251 "configure"
2252 #include "confdefs.h"
2253 #include <assert.h>
2254                      Syntax error
2255 _ACEOF
2256 if { (eval echo "$as_me:2256: \"$ac_cpp conftest.$ac_ext\"") >&5
2257   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2258   ac_status=$?
2259   egrep -v '^ *\+' conftest.er1 >conftest.err
2260   rm -f conftest.er1
2261   cat conftest.err >&5
2262   echo "$as_me:2262: \$? = $ac_status" >&5
2263   (exit $ac_status); } >/dev/null; then
2264   if test -s conftest.err; then
2265     ac_cpp_err=$ac_c_preproc_warn_flag
2266   else
2267     ac_cpp_err=
2268   fi
2269 else
2270   ac_cpp_err=yes
2271 fi
2272 if test -z "$ac_cpp_err"; then
2273   :
2274 else
2275   echo "$as_me: failed program was:" >&5
2276   cat conftest.$ac_ext >&5
2277   # Broken: fails on valid input.
2278 continue
2279 fi
2280 rm -f conftest.err conftest.$ac_ext
2281
2282   # OK, works on sane cases.  Now check whether non-existent headers
2283   # can be detected and how.
2284   cat >conftest.$ac_ext <<_ACEOF
2285 #line 2285 "configure"
2286 #include "confdefs.h"
2287 #include <ac_nonexistent.h>
2288 _ACEOF
2289 if { (eval echo "$as_me:2289: \"$ac_cpp conftest.$ac_ext\"") >&5
2290   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2291   ac_status=$?
2292   egrep -v '^ *\+' conftest.er1 >conftest.err
2293   rm -f conftest.er1
2294   cat conftest.err >&5
2295   echo "$as_me:2295: \$? = $ac_status" >&5
2296   (exit $ac_status); } >/dev/null; then
2297   if test -s conftest.err; then
2298     ac_cpp_err=$ac_c_preproc_warn_flag
2299   else
2300     ac_cpp_err=
2301   fi
2302 else
2303   ac_cpp_err=yes
2304 fi
2305 if test -z "$ac_cpp_err"; then
2306   # Broken: success on invalid input.
2307 continue
2308 else
2309   echo "$as_me: failed program was:" >&5
2310   cat conftest.$ac_ext >&5
2311   # Passes both tests.
2312 ac_preproc_ok=:
2313 break
2314 fi
2315 rm -f conftest.err conftest.$ac_ext
2316
2317 done
2318 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2319 rm -f conftest.err conftest.$ac_ext
2320 if $ac_preproc_ok; then
2321   break
2322 fi
2323
2324     done
2325     ac_cv_prog_CPP=$CPP
2326
2327 fi
2328   CPP=$ac_cv_prog_CPP
2329 else
2330   ac_cv_prog_CPP=$CPP
2331 fi
2332 echo "$as_me:2332: result: $CPP" >&5
2333 echo "${ECHO_T}$CPP" >&6
2334 ac_preproc_ok=false
2335 for ac_c_preproc_warn_flag in '' yes
2336 do
2337   # Use a header file that comes with gcc, so configuring glibc
2338   # with a fresh cross-compiler works.
2339   # On the NeXT, cc -E runs the code through the compiler's parser,
2340   # not just through cpp. "Syntax error" is here to catch this case.
2341   cat >conftest.$ac_ext <<_ACEOF
2342 #line 2342 "configure"
2343 #include "confdefs.h"
2344 #include <assert.h>
2345                      Syntax error
2346 _ACEOF
2347 if { (eval echo "$as_me:2347: \"$ac_cpp conftest.$ac_ext\"") >&5
2348   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2349   ac_status=$?
2350   egrep -v '^ *\+' conftest.er1 >conftest.err
2351   rm -f conftest.er1
2352   cat conftest.err >&5
2353   echo "$as_me:2353: \$? = $ac_status" >&5
2354   (exit $ac_status); } >/dev/null; then
2355   if test -s conftest.err; then
2356     ac_cpp_err=$ac_c_preproc_warn_flag
2357   else
2358     ac_cpp_err=
2359   fi
2360 else
2361   ac_cpp_err=yes
2362 fi
2363 if test -z "$ac_cpp_err"; then
2364   :
2365 else
2366   echo "$as_me: failed program was:" >&5
2367   cat conftest.$ac_ext >&5
2368   # Broken: fails on valid input.
2369 continue
2370 fi
2371 rm -f conftest.err conftest.$ac_ext
2372
2373   # OK, works on sane cases.  Now check whether non-existent headers
2374   # can be detected and how.
2375   cat >conftest.$ac_ext <<_ACEOF
2376 #line 2376 "configure"
2377 #include "confdefs.h"
2378 #include <ac_nonexistent.h>
2379 _ACEOF
2380 if { (eval echo "$as_me:2380: \"$ac_cpp conftest.$ac_ext\"") >&5
2381   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2382   ac_status=$?
2383   egrep -v '^ *\+' conftest.er1 >conftest.err
2384   rm -f conftest.er1
2385   cat conftest.err >&5
2386   echo "$as_me:2386: \$? = $ac_status" >&5
2387   (exit $ac_status); } >/dev/null; then
2388   if test -s conftest.err; then
2389     ac_cpp_err=$ac_c_preproc_warn_flag
2390   else
2391     ac_cpp_err=
2392   fi
2393 else
2394   ac_cpp_err=yes
2395 fi
2396 if test -z "$ac_cpp_err"; then
2397   # Broken: success on invalid input.
2398 continue
2399 else
2400   echo "$as_me: failed program was:" >&5
2401   cat conftest.$ac_ext >&5
2402   # Passes both tests.
2403 ac_preproc_ok=:
2404 break
2405 fi
2406 rm -f conftest.err conftest.$ac_ext
2407
2408 done
2409 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2410 rm -f conftest.err conftest.$ac_ext
2411 if $ac_preproc_ok; then
2412   :
2413 else
2414   { { echo "$as_me:2414: error: C preprocessor \"$CPP\" fails sanity check" >&5
2415 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2416    { (exit 1); exit 1; }; }
2417 fi
2418
2419 ac_ext=c
2420 ac_cpp='$CPP $CPPFLAGS'
2421 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2422 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2423 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2424 ac_main_return=return
2425
2426 if test $ac_cv_c_compiler_gnu = yes; then
2427     echo "$as_me:2427: checking whether $CC needs -traditional" >&5
2428 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2429 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2430   echo $ECHO_N "(cached) $ECHO_C" >&6
2431 else
2432     ac_pattern="Autoconf.*'x'"
2433   cat >conftest.$ac_ext <<_ACEOF
2434 #line 2434 "configure"
2435 #include "confdefs.h"
2436 #include <sgtty.h>
2437 int Autoconf = TIOCGETP;
2438 _ACEOF
2439 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2440   egrep "$ac_pattern" >/dev/null 2>&1; then
2441   ac_cv_prog_gcc_traditional=yes
2442 else
2443   ac_cv_prog_gcc_traditional=no
2444 fi
2445 rm -rf conftest*
2446
2447   if test $ac_cv_prog_gcc_traditional = no; then
2448     cat >conftest.$ac_ext <<_ACEOF
2449 #line 2449 "configure"
2450 #include "confdefs.h"
2451 #include <termio.h>
2452 int Autoconf = TCGETA;
2453 _ACEOF
2454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2455   egrep "$ac_pattern" >/dev/null 2>&1; then
2456   ac_cv_prog_gcc_traditional=yes
2457 fi
2458 rm -rf conftest*
2459
2460   fi
2461 fi
2462 echo "$as_me:2462: result: $ac_cv_prog_gcc_traditional" >&5
2463 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2464   if test $ac_cv_prog_gcc_traditional = yes; then
2465     CC="$CC -traditional"
2466   fi
2467 fi
2468
2469 echo "$as_me:2469: checking whether $CC understands -c and -o together" >&5
2470 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2471 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2472   echo $ECHO_N "(cached) $ECHO_C" >&6
2473 else
2474
2475 cat > conftest.$ac_ext <<CF_EOF
2476 #include <stdio.h>
2477 int main()
2478 {
2479         ${cf_cv_main_return:-return}(0);
2480 }
2481 CF_EOF
2482 # We do the test twice because some compilers refuse to overwrite an
2483 # existing .o file with -o, though they will create one.
2484 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2485 if { (eval echo "$as_me:2485: \"$ac_try\"") >&5
2486   (eval $ac_try) 2>&5
2487   ac_status=$?
2488   echo "$as_me:2488: \$? = $ac_status" >&5
2489   (exit $ac_status); } &&
2490   test -f conftest2.$ac_objext && { (eval echo "$as_me:2490: \"$ac_try\"") >&5
2491   (eval $ac_try) 2>&5
2492   ac_status=$?
2493   echo "$as_me:2493: \$? = $ac_status" >&5
2494   (exit $ac_status); };
2495 then
2496   eval cf_cv_prog_CC_c_o=yes
2497 else
2498   eval cf_cv_prog_CC_c_o=no
2499 fi
2500 rm -rf conftest*
2501
2502 fi
2503 if test $cf_cv_prog_CC_c_o = yes; then
2504   echo "$as_me:2504: result: yes" >&5
2505 echo "${ECHO_T}yes" >&6
2506 else
2507   echo "$as_me:2507: result: no" >&5
2508 echo "${ECHO_T}no" >&6
2509 fi
2510
2511 if test "$cross_compiling" = yes ; then
2512   LDCONFIG=:
2513 else
2514 case "$cf_cv_system_name" in #(vi
2515 dragonfly*|mirbsd*|freebsd*) #(vi
2516   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2517   ;;
2518 *) LDPATH=$PATH:/sbin:/usr/sbin
2519   # Extract the first word of "ldconfig", so it can be a program name with args.
2520 set dummy ldconfig; ac_word=$2
2521 echo "$as_me:2521: checking for $ac_word" >&5
2522 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2523 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2524   echo $ECHO_N "(cached) $ECHO_C" >&6
2525 else
2526   case $LDCONFIG in
2527   [\\/]* | ?:[\\/]*)
2528   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2529   ;;
2530   *)
2531   ac_save_IFS=$IFS; IFS=$ac_path_separator
2532 ac_dummy="$LDPATH"
2533 for ac_dir in $ac_dummy; do
2534   IFS=$ac_save_IFS
2535   test -z "$ac_dir" && ac_dir=.
2536   if $as_executable_p "$ac_dir/$ac_word"; then
2537    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2538    echo "$as_me:2538: found $ac_dir/$ac_word" >&5
2539    break
2540 fi
2541 done
2542
2543   ;;
2544 esac
2545 fi
2546 LDCONFIG=$ac_cv_path_LDCONFIG
2547
2548 if test -n "$LDCONFIG"; then
2549   echo "$as_me:2549: result: $LDCONFIG" >&5
2550 echo "${ECHO_T}$LDCONFIG" >&6
2551 else
2552   echo "$as_me:2552: result: no" >&5
2553 echo "${ECHO_T}no" >&6
2554 fi
2555
2556   ;;
2557 esac
2558 fi
2559
2560 echo "$as_me:2560: checking if you want to ensure bool is consistent with C++" >&5
2561 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2562
2563 # Check whether --with-cxx or --without-cxx was given.
2564 if test "${with_cxx+set}" = set; then
2565   withval="$with_cxx"
2566   cf_with_cxx=$withval
2567 else
2568   cf_with_cxx=yes
2569 fi;
2570 echo "$as_me:2570: result: $cf_with_cxx" >&5
2571 echo "${ECHO_T}$cf_with_cxx" >&6
2572 if test "X$cf_with_cxx" = Xno ; then
2573         CXX=""
2574         GXX=""
2575 else
2576         # with autoconf 2.13, we can change the error to a warning:
2577                 ac_ext=cc
2578 ac_cpp='$CXXCPP $CPPFLAGS'
2579 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2580 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2581 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2582 ac_main_return=return
2583 if test -n "$ac_tool_prefix"; then
2584   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2585   do
2586     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2587 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2588 echo "$as_me:2588: checking for $ac_word" >&5
2589 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2590 if test "${ac_cv_prog_CXX+set}" = set; then
2591   echo $ECHO_N "(cached) $ECHO_C" >&6
2592 else
2593   if test -n "$CXX"; then
2594   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2595 else
2596   ac_save_IFS=$IFS; IFS=$ac_path_separator
2597 ac_dummy="$PATH"
2598 for ac_dir in $ac_dummy; do
2599   IFS=$ac_save_IFS
2600   test -z "$ac_dir" && ac_dir=.
2601   $as_executable_p "$ac_dir/$ac_word" || continue
2602 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2603 echo "$as_me:2603: found $ac_dir/$ac_word" >&5
2604 break
2605 done
2606
2607 fi
2608 fi
2609 CXX=$ac_cv_prog_CXX
2610 if test -n "$CXX"; then
2611   echo "$as_me:2611: result: $CXX" >&5
2612 echo "${ECHO_T}$CXX" >&6
2613 else
2614   echo "$as_me:2614: result: no" >&5
2615 echo "${ECHO_T}no" >&6
2616 fi
2617
2618     test -n "$CXX" && break
2619   done
2620 fi
2621 if test -z "$CXX"; then
2622   ac_ct_CXX=$CXX
2623   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2624 do
2625   # Extract the first word of "$ac_prog", so it can be a program name with args.
2626 set dummy $ac_prog; ac_word=$2
2627 echo "$as_me:2627: checking for $ac_word" >&5
2628 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2629 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2630   echo $ECHO_N "(cached) $ECHO_C" >&6
2631 else
2632   if test -n "$ac_ct_CXX"; then
2633   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2634 else
2635   ac_save_IFS=$IFS; IFS=$ac_path_separator
2636 ac_dummy="$PATH"
2637 for ac_dir in $ac_dummy; do
2638   IFS=$ac_save_IFS
2639   test -z "$ac_dir" && ac_dir=.
2640   $as_executable_p "$ac_dir/$ac_word" || continue
2641 ac_cv_prog_ac_ct_CXX="$ac_prog"
2642 echo "$as_me:2642: found $ac_dir/$ac_word" >&5
2643 break
2644 done
2645
2646 fi
2647 fi
2648 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2649 if test -n "$ac_ct_CXX"; then
2650   echo "$as_me:2650: result: $ac_ct_CXX" >&5
2651 echo "${ECHO_T}$ac_ct_CXX" >&6
2652 else
2653   echo "$as_me:2653: result: no" >&5
2654 echo "${ECHO_T}no" >&6
2655 fi
2656
2657   test -n "$ac_ct_CXX" && break
2658 done
2659 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2660
2661   CXX=$ac_ct_CXX
2662 fi
2663
2664 # Provide some information about the compiler.
2665 echo "$as_me:2665:" \
2666      "checking for C++ compiler version" >&5
2667 ac_compiler=`set X $ac_compile; echo $2`
2668 { (eval echo "$as_me:2668: \"$ac_compiler --version </dev/null >&5\"") >&5
2669   (eval $ac_compiler --version </dev/null >&5) 2>&5
2670   ac_status=$?
2671   echo "$as_me:2671: \$? = $ac_status" >&5
2672   (exit $ac_status); }
2673 { (eval echo "$as_me:2673: \"$ac_compiler -v </dev/null >&5\"") >&5
2674   (eval $ac_compiler -v </dev/null >&5) 2>&5
2675   ac_status=$?
2676   echo "$as_me:2676: \$? = $ac_status" >&5
2677   (exit $ac_status); }
2678 { (eval echo "$as_me:2678: \"$ac_compiler -V </dev/null >&5\"") >&5
2679   (eval $ac_compiler -V </dev/null >&5) 2>&5
2680   ac_status=$?
2681   echo "$as_me:2681: \$? = $ac_status" >&5
2682   (exit $ac_status); }
2683
2684 echo "$as_me:2684: checking whether we are using the GNU C++ compiler" >&5
2685 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2686 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2687   echo $ECHO_N "(cached) $ECHO_C" >&6
2688 else
2689   cat >conftest.$ac_ext <<_ACEOF
2690 #line 2690 "configure"
2691 #include "confdefs.h"
2692
2693 int
2694 main ()
2695 {
2696 #ifndef __GNUC__
2697        choke me
2698 #endif
2699
2700   ;
2701   return 0;
2702 }
2703 _ACEOF
2704 rm -f conftest.$ac_objext
2705 if { (eval echo "$as_me:2705: \"$ac_compile\"") >&5
2706   (eval $ac_compile) 2>&5
2707   ac_status=$?
2708   echo "$as_me:2708: \$? = $ac_status" >&5
2709   (exit $ac_status); } &&
2710          { ac_try='test -s conftest.$ac_objext'
2711   { (eval echo "$as_me:2711: \"$ac_try\"") >&5
2712   (eval $ac_try) 2>&5
2713   ac_status=$?
2714   echo "$as_me:2714: \$? = $ac_status" >&5
2715   (exit $ac_status); }; }; then
2716   ac_compiler_gnu=yes
2717 else
2718   echo "$as_me: failed program was:" >&5
2719 cat conftest.$ac_ext >&5
2720 ac_compiler_gnu=no
2721 fi
2722 rm -f conftest.$ac_objext conftest.$ac_ext
2723 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2724
2725 fi
2726 echo "$as_me:2726: result: $ac_cv_cxx_compiler_gnu" >&5
2727 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2728 GXX=`test $ac_compiler_gnu = yes && echo yes`
2729 ac_test_CXXFLAGS=${CXXFLAGS+set}
2730 ac_save_CXXFLAGS=$CXXFLAGS
2731 CXXFLAGS="-g"
2732 echo "$as_me:2732: checking whether $CXX accepts -g" >&5
2733 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2734 if test "${ac_cv_prog_cxx_g+set}" = set; then
2735   echo $ECHO_N "(cached) $ECHO_C" >&6
2736 else
2737   cat >conftest.$ac_ext <<_ACEOF
2738 #line 2738 "configure"
2739 #include "confdefs.h"
2740
2741 int
2742 main ()
2743 {
2744
2745   ;
2746   return 0;
2747 }
2748 _ACEOF
2749 rm -f conftest.$ac_objext
2750 if { (eval echo "$as_me:2750: \"$ac_compile\"") >&5
2751   (eval $ac_compile) 2>&5
2752   ac_status=$?
2753   echo "$as_me:2753: \$? = $ac_status" >&5
2754   (exit $ac_status); } &&
2755          { ac_try='test -s conftest.$ac_objext'
2756   { (eval echo "$as_me:2756: \"$ac_try\"") >&5
2757   (eval $ac_try) 2>&5
2758   ac_status=$?
2759   echo "$as_me:2759: \$? = $ac_status" >&5
2760   (exit $ac_status); }; }; then
2761   ac_cv_prog_cxx_g=yes
2762 else
2763   echo "$as_me: failed program was:" >&5
2764 cat conftest.$ac_ext >&5
2765 ac_cv_prog_cxx_g=no
2766 fi
2767 rm -f conftest.$ac_objext conftest.$ac_ext
2768 fi
2769 echo "$as_me:2769: result: $ac_cv_prog_cxx_g" >&5
2770 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2771 if test "$ac_test_CXXFLAGS" = set; then
2772   CXXFLAGS=$ac_save_CXXFLAGS
2773 elif test $ac_cv_prog_cxx_g = yes; then
2774   if test "$GXX" = yes; then
2775     CXXFLAGS="-g -O2"
2776   else
2777     CXXFLAGS="-g"
2778   fi
2779 else
2780   if test "$GXX" = yes; then
2781     CXXFLAGS="-O2"
2782   else
2783     CXXFLAGS=
2784   fi
2785 fi
2786 for ac_declaration in \
2787    ''\
2788    '#include <stdlib.h>' \
2789    'extern "C" void std::exit (int) throw (); using std::exit;' \
2790    'extern "C" void std::exit (int); using std::exit;' \
2791    'extern "C" void exit (int) throw ();' \
2792    'extern "C" void exit (int);' \
2793    'void exit (int);'
2794 do
2795   cat >conftest.$ac_ext <<_ACEOF
2796 #line 2796 "configure"
2797 #include "confdefs.h"
2798 #include <stdlib.h>
2799 $ac_declaration
2800 int
2801 main ()
2802 {
2803 exit (42);
2804   ;
2805   return 0;
2806 }
2807 _ACEOF
2808 rm -f conftest.$ac_objext
2809 if { (eval echo "$as_me:2809: \"$ac_compile\"") >&5
2810   (eval $ac_compile) 2>&5
2811   ac_status=$?
2812   echo "$as_me:2812: \$? = $ac_status" >&5
2813   (exit $ac_status); } &&
2814          { ac_try='test -s conftest.$ac_objext'
2815   { (eval echo "$as_me:2815: \"$ac_try\"") >&5
2816   (eval $ac_try) 2>&5
2817   ac_status=$?
2818   echo "$as_me:2818: \$? = $ac_status" >&5
2819   (exit $ac_status); }; }; then
2820   :
2821 else
2822   echo "$as_me: failed program was:" >&5
2823 cat conftest.$ac_ext >&5
2824 continue
2825 fi
2826 rm -f conftest.$ac_objext conftest.$ac_ext
2827   cat >conftest.$ac_ext <<_ACEOF
2828 #line 2828 "configure"
2829 #include "confdefs.h"
2830 $ac_declaration
2831 int
2832 main ()
2833 {
2834 exit (42);
2835   ;
2836   return 0;
2837 }
2838 _ACEOF
2839 rm -f conftest.$ac_objext
2840 if { (eval echo "$as_me:2840: \"$ac_compile\"") >&5
2841   (eval $ac_compile) 2>&5
2842   ac_status=$?
2843   echo "$as_me:2843: \$? = $ac_status" >&5
2844   (exit $ac_status); } &&
2845          { ac_try='test -s conftest.$ac_objext'
2846   { (eval echo "$as_me:2846: \"$ac_try\"") >&5
2847   (eval $ac_try) 2>&5
2848   ac_status=$?
2849   echo "$as_me:2849: \$? = $ac_status" >&5
2850   (exit $ac_status); }; }; then
2851   break
2852 else
2853   echo "$as_me: failed program was:" >&5
2854 cat conftest.$ac_ext >&5
2855 fi
2856 rm -f conftest.$ac_objext conftest.$ac_ext
2857 done
2858 rm -rf conftest*
2859 if test -n "$ac_declaration"; then
2860   echo '#ifdef __cplusplus' >>confdefs.h
2861   echo $ac_declaration      >>confdefs.h
2862   echo '#endif'             >>confdefs.h
2863 fi
2864
2865 ac_ext=c
2866 ac_cpp='$CPP $CPPFLAGS'
2867 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2868 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2870 ac_main_return=return
2871
2872         ac_ext=cc
2873 ac_cpp='$CXXCPP $CPPFLAGS'
2874 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2875 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2876 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2877 ac_main_return=return
2878
2879         if test "x$cf_with_cxx" != xno
2880         then
2881                 # Several of the C++ configurations do not work, particularly when
2882                 # cross-compiling (20140913 -TD)
2883                 echo "$as_me:2883: checking if $CXX works" >&5
2884 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2885
2886                 save_CPPFLAGS="$CPPFLAGS"
2887                 eval cf_includedir=${includedir}
2888                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2889
2890 cat >conftest.$ac_ext <<_ACEOF
2891 #line 2891 "configure"
2892 #include "confdefs.h"
2893
2894 #include <stdlib.h>
2895 #include <stdio.h>
2896
2897 int
2898 main ()
2899 {
2900
2901                 printf("Hello world!\n")
2902
2903   ;
2904   return 0;
2905 }
2906 _ACEOF
2907 rm -f conftest.$ac_objext
2908 if { (eval echo "$as_me:2908: \"$ac_compile\"") >&5
2909   (eval $ac_compile) 2>&5
2910   ac_status=$?
2911   echo "$as_me:2911: \$? = $ac_status" >&5
2912   (exit $ac_status); } &&
2913          { ac_try='test -s conftest.$ac_objext'
2914   { (eval echo "$as_me:2914: \"$ac_try\"") >&5
2915   (eval $ac_try) 2>&5
2916   ac_status=$?
2917   echo "$as_me:2917: \$? = $ac_status" >&5
2918   (exit $ac_status); }; }; then
2919   cf_cxx_works=yes
2920 else
2921   echo "$as_me: failed program was:" >&5
2922 cat conftest.$ac_ext >&5
2923 cf_cxx_works=no
2924 fi
2925 rm -f conftest.$ac_objext conftest.$ac_ext
2926                 CPPFLAGS="$save_CPPFLAGS"
2927
2928                 echo "$as_me:2928: result: $cf_cxx_works" >&5
2929 echo "${ECHO_T}$cf_cxx_works" >&6
2930                 if test "x$cf_cxx_works" = xno
2931                 then
2932                         { echo "$as_me:2932: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2933 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2934                         cf_with_cxx=no; CXX=""; GXX="";
2935                 fi
2936         fi
2937         ac_ext=c
2938 ac_cpp='$CPP $CPPFLAGS'
2939 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2940 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2941 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2942 ac_main_return=return
2943
2944         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2945         if test "$CXX" = "g++" ; then
2946                 # Extract the first word of "g++", so it can be a program name with args.
2947 set dummy g++; ac_word=$2
2948 echo "$as_me:2948: checking for $ac_word" >&5
2949 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2950 if test "${ac_cv_path_CXX+set}" = set; then
2951   echo $ECHO_N "(cached) $ECHO_C" >&6
2952 else
2953   case $CXX in
2954   [\\/]* | ?:[\\/]*)
2955   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2956   ;;
2957   *)
2958   ac_save_IFS=$IFS; IFS=$ac_path_separator
2959 ac_dummy="$PATH"
2960 for ac_dir in $ac_dummy; do
2961   IFS=$ac_save_IFS
2962   test -z "$ac_dir" && ac_dir=.
2963   if $as_executable_p "$ac_dir/$ac_word"; then
2964    ac_cv_path_CXX="$ac_dir/$ac_word"
2965    echo "$as_me:2965: found $ac_dir/$ac_word" >&5
2966    break
2967 fi
2968 done
2969
2970   ;;
2971 esac
2972 fi
2973 CXX=$ac_cv_path_CXX
2974
2975 if test -n "$CXX"; then
2976   echo "$as_me:2976: result: $CXX" >&5
2977 echo "${ECHO_T}$CXX" >&6
2978 else
2979   echo "$as_me:2979: result: no" >&5
2980 echo "${ECHO_T}no" >&6
2981 fi
2982
2983         fi
2984         case "x$CXX" in #(vi
2985         x|xg++)
2986                 { echo "$as_me:2986: WARNING: You don't have any C++ compiler, too bad" >&5
2987 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2988                 cf_with_cxx=no; CXX=""; GXX="";
2989                 ;;
2990         esac
2991 fi
2992
2993 GXX_VERSION=none
2994 if test "$GXX" = yes; then
2995         echo "$as_me:2995: checking version of ${CXX:-g++}" >&5
2996 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2997         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2998         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2999         echo "$as_me:2999: result: $GXX_VERSION" >&5
3000 echo "${ECHO_T}$GXX_VERSION" >&6
3001 fi
3002
3003 case $GXX_VERSION in
3004 1*|2.[0-6]*)
3005         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3006         # cf_cxx_library=no
3007         { echo "$as_me:3007: WARNING: templates do not work" >&5
3008 echo "$as_me: WARNING: templates do not work" >&2;}
3009         ;;
3010 esac
3011
3012 echo "$as_me:3012: checking if you want to build C++ binding and demo" >&5
3013 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3014
3015 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3016 if test "${with_cxx_binding+set}" = set; then
3017   withval="$with_cxx_binding"
3018   cf_with_cxx_binding=$withval
3019 else
3020   cf_with_cxx_binding=$cf_with_cxx
3021 fi;
3022 echo "$as_me:3022: result: $cf_with_cxx_binding" >&5
3023 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3024
3025 echo "$as_me:3025: checking if you want to build with Ada95" >&5
3026 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3027 echo "$as_me:3027: result: $cf_with_ada" >&5
3028 echo "${ECHO_T}$cf_with_ada" >&6
3029
3030 echo "$as_me:3030: checking if you want to install terminal database" >&5
3031 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3032
3033 # Check whether --enable-db-install or --disable-db-install was given.
3034 if test "${enable_db_install+set}" = set; then
3035   enableval="$enable_db_install"
3036   cf_with_db_install=$enableval
3037 else
3038   cf_with_db_install=yes
3039 fi;
3040 echo "$as_me:3040: result: $cf_with_db_install" >&5
3041 echo "${ECHO_T}$cf_with_db_install" >&6
3042
3043 echo "$as_me:3043: checking if you want to install manpages" >&5
3044 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3045
3046 # Check whether --with-manpages or --without-manpages was given.
3047 if test "${with_manpages+set}" = set; then
3048   withval="$with_manpages"
3049   cf_with_manpages=$withval
3050 else
3051   cf_with_manpages=yes
3052 fi;
3053 echo "$as_me:3053: result: $cf_with_manpages" >&5
3054 echo "${ECHO_T}$cf_with_manpages" >&6
3055
3056 echo "$as_me:3056: checking if you want to build programs such as tic" >&5
3057 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3058
3059 # Check whether --with-progs or --without-progs was given.
3060 if test "${with_progs+set}" = set; then
3061   withval="$with_progs"
3062   cf_with_progs=$withval
3063 else
3064   cf_with_progs=yes
3065 fi;
3066 echo "$as_me:3066: result: $cf_with_progs" >&5
3067 echo "${ECHO_T}$cf_with_progs" >&6
3068
3069 echo "$as_me:3069: checking if you want to build test-programs" >&5
3070 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3071
3072 # Check whether --with-tests or --without-tests was given.
3073 if test "${with_tests+set}" = set; then
3074   withval="$with_tests"
3075   cf_with_tests=$withval
3076 else
3077   cf_with_tests=yes
3078 fi;
3079 echo "$as_me:3079: result: $cf_with_tests" >&5
3080 echo "${ECHO_T}$cf_with_tests" >&6
3081
3082 echo "$as_me:3082: checking if you wish to install curses.h" >&5
3083 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3084
3085 # Check whether --with-curses-h or --without-curses-h was given.
3086 if test "${with_curses_h+set}" = set; then
3087   withval="$with_curses_h"
3088   with_curses_h=$withval
3089 else
3090   with_curses_h=yes
3091 fi;
3092 echo "$as_me:3092: result: $with_curses_h" >&5
3093 echo "${ECHO_T}$with_curses_h" >&6
3094
3095 modules_to_build="ncurses"
3096 if test "X$cf_with_progs" != Xno ; then
3097 modules_to_build="$modules_to_build progs tack"
3098 fi
3099 modules_to_build="$modules_to_build panel menu form"
3100
3101 test "$program_prefix" != NONE &&
3102   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3103 # Use a double $ so make ignores it.
3104 test "$program_suffix" != NONE &&
3105   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3106 # Double any \ or $.  echo might interpret backslashes.
3107 # By default was `s,x,x', remove it if useless.
3108 cat <<\_ACEOF >conftest.sed
3109 s/[\\$]/&&/g;s/;s,x,x,$//
3110 _ACEOF
3111 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3112 rm conftest.sed
3113
3114 for ac_prog in mawk gawk nawk awk
3115 do
3116   # Extract the first word of "$ac_prog", so it can be a program name with args.
3117 set dummy $ac_prog; ac_word=$2
3118 echo "$as_me:3118: checking for $ac_word" >&5
3119 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3120 if test "${ac_cv_prog_AWK+set}" = set; then
3121   echo $ECHO_N "(cached) $ECHO_C" >&6
3122 else
3123   if test -n "$AWK"; then
3124   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3125 else
3126   ac_save_IFS=$IFS; IFS=$ac_path_separator
3127 ac_dummy="$PATH"
3128 for ac_dir in $ac_dummy; do
3129   IFS=$ac_save_IFS
3130   test -z "$ac_dir" && ac_dir=.
3131   $as_executable_p "$ac_dir/$ac_word" || continue
3132 ac_cv_prog_AWK="$ac_prog"
3133 echo "$as_me:3133: found $ac_dir/$ac_word" >&5
3134 break
3135 done
3136
3137 fi
3138 fi
3139 AWK=$ac_cv_prog_AWK
3140 if test -n "$AWK"; then
3141   echo "$as_me:3141: result: $AWK" >&5
3142 echo "${ECHO_T}$AWK" >&6
3143 else
3144   echo "$as_me:3144: result: no" >&5
3145 echo "${ECHO_T}no" >&6
3146 fi
3147
3148   test -n "$AWK" && break
3149 done
3150
3151 test -z "$AWK" && { { echo "$as_me:3151: error: No awk program found" >&5
3152 echo "$as_me: error: No awk program found" >&2;}
3153    { (exit 1); exit 1; }; }
3154
3155 echo "$as_me:3155: checking for egrep" >&5
3156 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3157 if test "${ac_cv_prog_egrep+set}" = set; then
3158   echo $ECHO_N "(cached) $ECHO_C" >&6
3159 else
3160   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3161     then ac_cv_prog_egrep='grep -E'
3162     else ac_cv_prog_egrep='egrep'
3163     fi
3164 fi
3165 echo "$as_me:3165: result: $ac_cv_prog_egrep" >&5
3166 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3167  EGREP=$ac_cv_prog_egrep
3168
3169 test -z "$EGREP" && { { echo "$as_me:3169: error: No egrep program found" >&5
3170 echo "$as_me: error: No egrep program found" >&2;}
3171    { (exit 1); exit 1; }; }
3172
3173 # Find a good install program.  We prefer a C program (faster),
3174 # so one script is as good as another.  But avoid the broken or
3175 # incompatible versions:
3176 # SysV /etc/install, /usr/sbin/install
3177 # SunOS /usr/etc/install
3178 # IRIX /sbin/install
3179 # AIX /bin/install
3180 # AmigaOS /C/install, which installs bootblocks on floppy discs
3181 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3182 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3183 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3184 # ./install, which can be erroneously created by make from ./install.sh.
3185 echo "$as_me:3185: checking for a BSD compatible install" >&5
3186 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3187 if test -z "$INSTALL"; then
3188 if test "${ac_cv_path_install+set}" = set; then
3189   echo $ECHO_N "(cached) $ECHO_C" >&6
3190 else
3191     ac_save_IFS=$IFS; IFS=$ac_path_separator
3192   for ac_dir in $PATH; do
3193     IFS=$ac_save_IFS
3194     # Account for people who put trailing slashes in PATH elements.
3195     case $ac_dir/ in
3196     / | ./ | .// | /cC/* \
3197     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3198     | /usr/ucb/* ) ;;
3199     *)
3200       # OSF1 and SCO ODT 3.0 have their own names for install.
3201       # Don't use installbsd from OSF since it installs stuff as root
3202       # by default.
3203       for ac_prog in ginstall scoinst install; do
3204         if $as_executable_p "$ac_dir/$ac_prog"; then
3205           if test $ac_prog = install &&
3206             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3207             # AIX install.  It has an incompatible calling convention.
3208             :
3209           elif test $ac_prog = install &&
3210             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3211             # program-specific install script used by HP pwplus--don't use.
3212             :
3213           else
3214             ac_cv_path_install="$ac_dir/$ac_prog -c"
3215             break 2
3216           fi
3217         fi
3218       done
3219       ;;
3220     esac
3221   done
3222
3223 fi
3224   if test "${ac_cv_path_install+set}" = set; then
3225     INSTALL=$ac_cv_path_install
3226   else
3227     # As a last resort, use the slow shell script.  We don't cache a
3228     # path for INSTALL within a source directory, because that will
3229     # break other packages using the cache if that directory is
3230     # removed, or if the path is relative.
3231     INSTALL=$ac_install_sh
3232   fi
3233 fi
3234 echo "$as_me:3234: result: $INSTALL" >&5
3235 echo "${ECHO_T}$INSTALL" >&6
3236
3237 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3238 # It thinks the first close brace ends the variable substitution.
3239 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3240
3241 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3242
3243 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3244
3245 case $INSTALL in
3246 /*)
3247   ;;
3248 *)
3249   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3250   test -z "$cf_dir" && cf_dir=.
3251   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3252   ;;
3253 esac
3254
3255 for ac_prog in tdlint lint alint splint lclint
3256 do
3257   # Extract the first word of "$ac_prog", so it can be a program name with args.
3258 set dummy $ac_prog; ac_word=$2
3259 echo "$as_me:3259: checking for $ac_word" >&5
3260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3261 if test "${ac_cv_prog_LINT+set}" = set; then
3262   echo $ECHO_N "(cached) $ECHO_C" >&6
3263 else
3264   if test -n "$LINT"; then
3265   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3266 else
3267   ac_save_IFS=$IFS; IFS=$ac_path_separator
3268 ac_dummy="$PATH"
3269 for ac_dir in $ac_dummy; do
3270   IFS=$ac_save_IFS
3271   test -z "$ac_dir" && ac_dir=.
3272   $as_executable_p "$ac_dir/$ac_word" || continue
3273 ac_cv_prog_LINT="$ac_prog"
3274 echo "$as_me:3274: found $ac_dir/$ac_word" >&5
3275 break
3276 done
3277
3278 fi
3279 fi
3280 LINT=$ac_cv_prog_LINT
3281 if test -n "$LINT"; then
3282   echo "$as_me:3282: result: $LINT" >&5
3283 echo "${ECHO_T}$LINT" >&6
3284 else
3285   echo "$as_me:3285: result: no" >&5
3286 echo "${ECHO_T}no" >&6
3287 fi
3288
3289   test -n "$LINT" && break
3290 done
3291
3292 echo "$as_me:3292: checking whether ln -s works" >&5
3293 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3294 LN_S=$as_ln_s
3295 if test "$LN_S" = "ln -s"; then
3296   echo "$as_me:3296: result: yes" >&5
3297 echo "${ECHO_T}yes" >&6
3298 else
3299   echo "$as_me:3299: result: no, using $LN_S" >&5
3300 echo "${ECHO_T}no, using $LN_S" >&6
3301 fi
3302
3303 echo "$as_me:3303: checking if $LN_S -f options work" >&5
3304 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3305
3306 rm -f conf$$.src conf$$dst
3307 echo >conf$$.dst
3308 echo first >conf$$.src
3309 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3310         cf_prog_ln_sf=yes
3311 else
3312         cf_prog_ln_sf=no
3313 fi
3314 rm -f conf$$.dst conf$$src
3315 echo "$as_me:3315: result: $cf_prog_ln_sf" >&5
3316 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3317
3318 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3319
3320 echo "$as_me:3320: checking for long file names" >&5
3321 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3322 if test "${ac_cv_sys_long_file_names+set}" = set; then
3323   echo $ECHO_N "(cached) $ECHO_C" >&6
3324 else
3325   ac_cv_sys_long_file_names=yes
3326 # Test for long file names in all the places we know might matter:
3327 #      .                the current directory, where building will happen
3328 #      $prefix/lib      where we will be installing things
3329 #      $exec_prefix/lib likewise
3330 # eval it to expand exec_prefix.
3331 #      $TMPDIR          if set, where it might want to write temporary files
3332 # if $TMPDIR is not set:
3333 #      /tmp             where it might want to write temporary files
3334 #      /var/tmp         likewise
3335 #      /usr/tmp         likewise
3336 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3337   ac_tmpdirs=$TMPDIR
3338 else
3339   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3340 fi
3341 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3342   test -d $ac_dir || continue
3343   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3344   ac_xdir=$ac_dir/cf$$
3345   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3346   ac_tf1=$ac_xdir/conftest9012345
3347   ac_tf2=$ac_xdir/conftest9012346
3348   (echo 1 >$ac_tf1) 2>/dev/null
3349   (echo 2 >$ac_tf2) 2>/dev/null
3350   ac_val=`cat $ac_tf1 2>/dev/null`
3351   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3352     ac_cv_sys_long_file_names=no
3353     rm -rf $ac_xdir 2>/dev/null
3354     break
3355   fi
3356   rm -rf $ac_xdir 2>/dev/null
3357 done
3358 fi
3359 echo "$as_me:3359: result: $ac_cv_sys_long_file_names" >&5
3360 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3361 if test $ac_cv_sys_long_file_names = yes; then
3362
3363 cat >>confdefs.h <<\EOF
3364 #define HAVE_LONG_FILE_NAMES 1
3365 EOF
3366
3367 fi
3368
3369 # if we find pkg-config, check if we should install the ".pc" files.
3370
3371 echo "$as_me:3371: checking if you want to use pkg-config" >&5
3372 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3373
3374 # Check whether --with-pkg-config or --without-pkg-config was given.
3375 if test "${with_pkg_config+set}" = set; then
3376   withval="$with_pkg_config"
3377   cf_pkg_config=$withval
3378 else
3379   cf_pkg_config=yes
3380 fi;
3381 echo "$as_me:3381: result: $cf_pkg_config" >&5
3382 echo "${ECHO_T}$cf_pkg_config" >&6
3383
3384 case $cf_pkg_config in #(vi
3385 no) #(vi
3386         PKG_CONFIG=none
3387         ;;
3388 yes) #(vi
3389
3390 if test -n "$ac_tool_prefix"; then
3391   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3392 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3393 echo "$as_me:3393: checking for $ac_word" >&5
3394 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3395 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3396   echo $ECHO_N "(cached) $ECHO_C" >&6
3397 else
3398   case $PKG_CONFIG in
3399   [\\/]* | ?:[\\/]*)
3400   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3401   ;;
3402   *)
3403   ac_save_IFS=$IFS; IFS=$ac_path_separator
3404 ac_dummy="$PATH"
3405 for ac_dir in $ac_dummy; do
3406   IFS=$ac_save_IFS
3407   test -z "$ac_dir" && ac_dir=.
3408   if $as_executable_p "$ac_dir/$ac_word"; then
3409    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3410    echo "$as_me:3410: found $ac_dir/$ac_word" >&5
3411    break
3412 fi
3413 done
3414
3415   ;;
3416 esac
3417 fi
3418 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3419
3420 if test -n "$PKG_CONFIG"; then
3421   echo "$as_me:3421: result: $PKG_CONFIG" >&5
3422 echo "${ECHO_T}$PKG_CONFIG" >&6
3423 else
3424   echo "$as_me:3424: result: no" >&5
3425 echo "${ECHO_T}no" >&6
3426 fi
3427
3428 fi
3429 if test -z "$ac_cv_path_PKG_CONFIG"; then
3430   ac_pt_PKG_CONFIG=$PKG_CONFIG
3431   # Extract the first word of "pkg-config", so it can be a program name with args.
3432 set dummy pkg-config; ac_word=$2
3433 echo "$as_me:3433: checking for $ac_word" >&5
3434 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3435 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3436   echo $ECHO_N "(cached) $ECHO_C" >&6
3437 else
3438   case $ac_pt_PKG_CONFIG in
3439   [\\/]* | ?:[\\/]*)
3440   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3441   ;;
3442   *)
3443   ac_save_IFS=$IFS; IFS=$ac_path_separator
3444 ac_dummy="$PATH"
3445 for ac_dir in $ac_dummy; do
3446   IFS=$ac_save_IFS
3447   test -z "$ac_dir" && ac_dir=.
3448   if $as_executable_p "$ac_dir/$ac_word"; then
3449    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3450    echo "$as_me:3450: found $ac_dir/$ac_word" >&5
3451    break
3452 fi
3453 done
3454
3455   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3456   ;;
3457 esac
3458 fi
3459 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3460
3461 if test -n "$ac_pt_PKG_CONFIG"; then
3462   echo "$as_me:3462: result: $ac_pt_PKG_CONFIG" >&5
3463 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3464 else
3465   echo "$as_me:3465: result: no" >&5
3466 echo "${ECHO_T}no" >&6
3467 fi
3468
3469   PKG_CONFIG=$ac_pt_PKG_CONFIG
3470 else
3471   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3472 fi
3473
3474         ;;
3475 *)
3476         PKG_CONFIG=$withval
3477         ;;
3478 esac
3479
3480 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3481 if test "$PKG_CONFIG" != none ; then
3482
3483 if test "x$prefix" != xNONE; then
3484   cf_path_syntax="$prefix"
3485 else
3486   cf_path_syntax="$ac_default_prefix"
3487 fi
3488
3489 case ".$PKG_CONFIG" in #(vi
3490 .\$\(*\)*|.\'*\'*) #(vi
3491   ;;
3492 ..|./*|.\\*) #(vi
3493   ;;
3494 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3495   ;;
3496 .\${*prefix}*|.\${*dir}*) #(vi
3497   eval PKG_CONFIG="$PKG_CONFIG"
3498   case ".$PKG_CONFIG" in #(vi
3499   .NONE/*)
3500     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3501     ;;
3502   esac
3503   ;; #(vi
3504 .no|.NONE/*)
3505   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3506   ;;
3507 *)
3508   { { echo "$as_me:3508: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3509 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3510    { (exit 1); exit 1; }; }
3511   ;;
3512 esac
3513
3514 fi
3515
3516 if test "$PKG_CONFIG" != none ; then
3517         echo "$as_me:3517: checking for $PKG_CONFIG library directory" >&5
3518 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3519
3520 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3521 if test "${with_pkg_config_libdir+set}" = set; then
3522   withval="$with_pkg_config_libdir"
3523   PKG_CONFIG_LIBDIR=$withval
3524 else
3525   PKG_CONFIG_LIBDIR=yes
3526 fi;
3527
3528         case x$PKG_CONFIG_LIBDIR in #(vi
3529         x/*) #(vi
3530                 ;;
3531         xyes) #(vi
3532                 # look for the library directory using the same prefix as the executable
3533                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3534                 case x`(arch) 2>/dev/null` in #(vi
3535                 *64) #(vi
3536                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3537                         do
3538                                 if test -d $cf_config/pkgconfig
3539                                 then
3540                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3541                                         break
3542                                 fi
3543                         done
3544                         ;;
3545                 *)
3546                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3547                         ;;
3548                 esac
3549                 ;;
3550         *)
3551                 ;;
3552         esac
3553
3554         echo "$as_me:3554: result: $PKG_CONFIG_LIBDIR" >&5
3555 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3556 fi
3557
3558 if test "$PKG_CONFIG" != none ; then
3559         echo "$as_me:3559: checking if we should install .pc files for $PKG_CONFIG" >&5
3560 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3561
3562 # Check whether --enable-pc-files or --disable-pc-files was given.
3563 if test "${enable_pc_files+set}" = set; then
3564   enableval="$enable_pc_files"
3565   enable_pc_files=$enableval
3566 else
3567   enable_pc_files=no
3568 fi;
3569         echo "$as_me:3569: result: $enable_pc_files" >&5
3570 echo "${ECHO_T}$enable_pc_files" >&6
3571         if test "$enable_pc_files" != no
3572         then
3573
3574 if test "x$prefix" != xNONE; then
3575   cf_path_syntax="$prefix"
3576 else
3577   cf_path_syntax="$ac_default_prefix"
3578 fi
3579
3580 case ".$PKG_CONFIG_LIBDIR" in #(vi
3581 .\$\(*\)*|.\'*\'*) #(vi
3582   ;;
3583 ..|./*|.\\*) #(vi
3584   ;;
3585 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3586   ;;
3587 .\${*prefix}*|.\${*dir}*) #(vi
3588   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3589   case ".$PKG_CONFIG_LIBDIR" in #(vi
3590   .NONE/*)
3591     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3592     ;;
3593   esac
3594   ;; #(vi
3595 .no|.NONE/*)
3596   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3597   ;;
3598 *)
3599   { { echo "$as_me:3599: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3600 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3601    { (exit 1); exit 1; }; }
3602   ;;
3603 esac
3604
3605         fi
3606 else
3607         enable_pc_files=no
3608 fi
3609
3610 echo "$as_me:3610: checking if we should assume mixed-case filenames" >&5
3611 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3612
3613 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3614 if test "${enable_mixed_case+set}" = set; then
3615   enableval="$enable_mixed_case"
3616   enable_mixedcase=$enableval
3617 else
3618   enable_mixedcase=auto
3619 fi;
3620 echo "$as_me:3620: result: $enable_mixedcase" >&5
3621 echo "${ECHO_T}$enable_mixedcase" >&6
3622 if test "$enable_mixedcase" = "auto" ; then
3623
3624 echo "$as_me:3624: checking if filesystem supports mixed-case filenames" >&5
3625 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3626 if test "${cf_cv_mixedcase+set}" = set; then
3627   echo $ECHO_N "(cached) $ECHO_C" >&6
3628 else
3629
3630 if test "$cross_compiling" = yes ; then
3631         case $target_alias in #(vi
3632         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3633                 cf_cv_mixedcase=no
3634                 ;;
3635         *)
3636                 cf_cv_mixedcase=yes
3637                 ;;
3638         esac
3639 else
3640         rm -f conftest CONFTEST
3641         echo test >conftest
3642         if test -f CONFTEST ; then
3643                 cf_cv_mixedcase=no
3644         else
3645                 cf_cv_mixedcase=yes
3646         fi
3647         rm -f conftest CONFTEST
3648 fi
3649
3650 fi
3651 echo "$as_me:3651: result: $cf_cv_mixedcase" >&5
3652 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3653 test "$cf_cv_mixedcase" = yes &&
3654 cat >>confdefs.h <<\EOF
3655 #define MIXEDCASE_FILENAMES 1
3656 EOF
3657
3658 else
3659     cf_cv_mixedcase=$enable_mixedcase
3660     if test "x$enable_mixedcase" = "xyes" ; then
3661
3662 cat >>confdefs.h <<\EOF
3663 #define MIXEDCASE_FILENAMES 1
3664 EOF
3665
3666     fi
3667 fi
3668
3669 # do this after mixed-case option (tags/TAGS is not as important as tic).
3670 echo "$as_me:3670: checking whether ${MAKE-make} sets \${MAKE}" >&5
3671 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3672 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3673 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3674   echo $ECHO_N "(cached) $ECHO_C" >&6
3675 else
3676   cat >conftest.make <<\EOF
3677 all:
3678         @echo 'ac_maketemp="${MAKE}"'
3679 EOF
3680 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3681 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3682 if test -n "$ac_maketemp"; then
3683   eval ac_cv_prog_make_${ac_make}_set=yes
3684 else
3685   eval ac_cv_prog_make_${ac_make}_set=no
3686 fi
3687 rm -f conftest.make
3688 fi
3689 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3690   echo "$as_me:3690: result: yes" >&5
3691 echo "${ECHO_T}yes" >&6
3692   SET_MAKE=
3693 else
3694   echo "$as_me:3694: result: no" >&5
3695 echo "${ECHO_T}no" >&6
3696   SET_MAKE="MAKE=${MAKE-make}"
3697 fi
3698
3699 for ac_prog in exctags ctags
3700 do
3701   # Extract the first word of "$ac_prog", so it can be a program name with args.
3702 set dummy $ac_prog; ac_word=$2
3703 echo "$as_me:3703: checking for $ac_word" >&5
3704 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3705 if test "${ac_cv_prog_CTAGS+set}" = set; then
3706   echo $ECHO_N "(cached) $ECHO_C" >&6
3707 else
3708   if test -n "$CTAGS"; then
3709   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3710 else
3711   ac_save_IFS=$IFS; IFS=$ac_path_separator
3712 ac_dummy="$PATH"
3713 for ac_dir in $ac_dummy; do
3714   IFS=$ac_save_IFS
3715   test -z "$ac_dir" && ac_dir=.
3716   $as_executable_p "$ac_dir/$ac_word" || continue
3717 ac_cv_prog_CTAGS="$ac_prog"
3718 echo "$as_me:3718: found $ac_dir/$ac_word" >&5
3719 break
3720 done
3721
3722 fi
3723 fi
3724 CTAGS=$ac_cv_prog_CTAGS
3725 if test -n "$CTAGS"; then
3726   echo "$as_me:3726: result: $CTAGS" >&5
3727 echo "${ECHO_T}$CTAGS" >&6
3728 else
3729   echo "$as_me:3729: result: no" >&5
3730 echo "${ECHO_T}no" >&6
3731 fi
3732
3733   test -n "$CTAGS" && break
3734 done
3735
3736 for ac_prog in exetags etags
3737 do
3738   # Extract the first word of "$ac_prog", so it can be a program name with args.
3739 set dummy $ac_prog; ac_word=$2
3740 echo "$as_me:3740: checking for $ac_word" >&5
3741 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3742 if test "${ac_cv_prog_ETAGS+set}" = set; then
3743   echo $ECHO_N "(cached) $ECHO_C" >&6
3744 else
3745   if test -n "$ETAGS"; then
3746   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3747 else
3748   ac_save_IFS=$IFS; IFS=$ac_path_separator
3749 ac_dummy="$PATH"
3750 for ac_dir in $ac_dummy; do
3751   IFS=$ac_save_IFS
3752   test -z "$ac_dir" && ac_dir=.
3753   $as_executable_p "$ac_dir/$ac_word" || continue
3754 ac_cv_prog_ETAGS="$ac_prog"
3755 echo "$as_me:3755: found $ac_dir/$ac_word" >&5
3756 break
3757 done
3758
3759 fi
3760 fi
3761 ETAGS=$ac_cv_prog_ETAGS
3762 if test -n "$ETAGS"; then
3763   echo "$as_me:3763: result: $ETAGS" >&5
3764 echo "${ECHO_T}$ETAGS" >&6
3765 else
3766   echo "$as_me:3766: result: no" >&5
3767 echo "${ECHO_T}no" >&6
3768 fi
3769
3770   test -n "$ETAGS" && break
3771 done
3772
3773 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3774 set dummy ${CTAGS:-ctags}; ac_word=$2
3775 echo "$as_me:3775: checking for $ac_word" >&5
3776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3777 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3778   echo $ECHO_N "(cached) $ECHO_C" >&6
3779 else
3780   if test -n "$MAKE_LOWER_TAGS"; then
3781   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3782 else
3783   ac_save_IFS=$IFS; IFS=$ac_path_separator
3784 ac_dummy="$PATH"
3785 for ac_dir in $ac_dummy; do
3786   IFS=$ac_save_IFS
3787   test -z "$ac_dir" && ac_dir=.
3788   $as_executable_p "$ac_dir/$ac_word" || continue
3789 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3790 echo "$as_me:3790: found $ac_dir/$ac_word" >&5
3791 break
3792 done
3793
3794   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3795 fi
3796 fi
3797 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3798 if test -n "$MAKE_LOWER_TAGS"; then
3799   echo "$as_me:3799: result: $MAKE_LOWER_TAGS" >&5
3800 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3801 else
3802   echo "$as_me:3802: result: no" >&5
3803 echo "${ECHO_T}no" >&6
3804 fi
3805
3806 if test "$cf_cv_mixedcase" = yes ; then
3807         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3808 set dummy ${ETAGS:-etags}; ac_word=$2
3809 echo "$as_me:3809: checking for $ac_word" >&5
3810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3811 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3812   echo $ECHO_N "(cached) $ECHO_C" >&6
3813 else
3814   if test -n "$MAKE_UPPER_TAGS"; then
3815   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3816 else
3817   ac_save_IFS=$IFS; IFS=$ac_path_separator
3818 ac_dummy="$PATH"
3819 for ac_dir in $ac_dummy; do
3820   IFS=$ac_save_IFS
3821   test -z "$ac_dir" && ac_dir=.
3822   $as_executable_p "$ac_dir/$ac_word" || continue
3823 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3824 echo "$as_me:3824: found $ac_dir/$ac_word" >&5
3825 break
3826 done
3827
3828   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3829 fi
3830 fi
3831 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3832 if test -n "$MAKE_UPPER_TAGS"; then
3833   echo "$as_me:3833: result: $MAKE_UPPER_TAGS" >&5
3834 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3835 else
3836   echo "$as_me:3836: result: no" >&5
3837 echo "${ECHO_T}no" >&6
3838 fi
3839
3840 else
3841         MAKE_UPPER_TAGS=no
3842 fi
3843
3844 if test "$MAKE_UPPER_TAGS" = yes ; then
3845         MAKE_UPPER_TAGS=
3846 else
3847         MAKE_UPPER_TAGS="#"
3848 fi
3849
3850 if test "$MAKE_LOWER_TAGS" = yes ; then
3851         MAKE_LOWER_TAGS=
3852 else
3853         MAKE_LOWER_TAGS="#"
3854 fi
3855
3856 echo "$as_me:3856: checking for makeflags variable" >&5
3857 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3858 if test "${cf_cv_makeflags+set}" = set; then
3859   echo $ECHO_N "(cached) $ECHO_C" >&6
3860 else
3861
3862         cf_cv_makeflags=''
3863         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3864         do
3865                 cat >cf_makeflags.tmp <<CF_EOF
3866 SHELL = /bin/sh
3867 all :
3868         @ echo '.$cf_option'
3869 CF_EOF
3870                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3871                 case "$cf_result" in
3872                 .*k|.*kw)
3873                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3874                         case "$cf_result" in
3875                         .*CC=*) cf_cv_makeflags=
3876                                 ;;
3877                         *)      cf_cv_makeflags=$cf_option
3878                                 ;;
3879                         esac
3880                         break
3881                         ;;
3882                 .-)     ;;
3883                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3884                         ;;
3885                 esac
3886         done
3887         rm -f cf_makeflags.tmp
3888
3889 fi
3890 echo "$as_me:3890: result: $cf_cv_makeflags" >&5
3891 echo "${ECHO_T}$cf_cv_makeflags" >&6
3892
3893 if test -n "$ac_tool_prefix"; then
3894   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3895 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3896 echo "$as_me:3896: checking for $ac_word" >&5
3897 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3898 if test "${ac_cv_prog_RANLIB+set}" = set; then
3899   echo $ECHO_N "(cached) $ECHO_C" >&6
3900 else
3901   if test -n "$RANLIB"; then
3902   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3903 else
3904   ac_save_IFS=$IFS; IFS=$ac_path_separator
3905 ac_dummy="$PATH"
3906 for ac_dir in $ac_dummy; do
3907   IFS=$ac_save_IFS
3908   test -z "$ac_dir" && ac_dir=.
3909   $as_executable_p "$ac_dir/$ac_word" || continue
3910 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3911 echo "$as_me:3911: found $ac_dir/$ac_word" >&5
3912 break
3913 done
3914
3915 fi
3916 fi
3917 RANLIB=$ac_cv_prog_RANLIB
3918 if test -n "$RANLIB"; then
3919   echo "$as_me:3919: result: $RANLIB" >&5
3920 echo "${ECHO_T}$RANLIB" >&6
3921 else
3922   echo "$as_me:3922: result: no" >&5
3923 echo "${ECHO_T}no" >&6
3924 fi
3925
3926 fi
3927 if test -z "$ac_cv_prog_RANLIB"; then
3928   ac_ct_RANLIB=$RANLIB
3929   # Extract the first word of "ranlib", so it can be a program name with args.
3930 set dummy ranlib; ac_word=$2
3931 echo "$as_me:3931: checking for $ac_word" >&5
3932 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3933 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3934   echo $ECHO_N "(cached) $ECHO_C" >&6
3935 else
3936   if test -n "$ac_ct_RANLIB"; then
3937   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3938 else
3939   ac_save_IFS=$IFS; IFS=$ac_path_separator
3940 ac_dummy="$PATH"
3941 for ac_dir in $ac_dummy; do
3942   IFS=$ac_save_IFS
3943   test -z "$ac_dir" && ac_dir=.
3944   $as_executable_p "$ac_dir/$ac_word" || continue
3945 ac_cv_prog_ac_ct_RANLIB="ranlib"
3946 echo "$as_me:3946: found $ac_dir/$ac_word" >&5
3947 break
3948 done
3949
3950   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3951 fi
3952 fi
3953 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3954 if test -n "$ac_ct_RANLIB"; then
3955   echo "$as_me:3955: result: $ac_ct_RANLIB" >&5
3956 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3957 else
3958   echo "$as_me:3958: result: no" >&5
3959 echo "${ECHO_T}no" >&6
3960 fi
3961
3962   RANLIB=$ac_ct_RANLIB
3963 else
3964   RANLIB="$ac_cv_prog_RANLIB"
3965 fi
3966
3967 if test -n "$ac_tool_prefix"; then
3968   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3969 set dummy ${ac_tool_prefix}ld; ac_word=$2
3970 echo "$as_me:3970: checking for $ac_word" >&5
3971 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3972 if test "${ac_cv_prog_LD+set}" = set; then
3973   echo $ECHO_N "(cached) $ECHO_C" >&6
3974 else
3975   if test -n "$LD"; then
3976   ac_cv_prog_LD="$LD" # Let the user override the test.
3977 else
3978   ac_save_IFS=$IFS; IFS=$ac_path_separator
3979 ac_dummy="$PATH"
3980 for ac_dir in $ac_dummy; do
3981   IFS=$ac_save_IFS
3982   test -z "$ac_dir" && ac_dir=.
3983   $as_executable_p "$ac_dir/$ac_word" || continue
3984 ac_cv_prog_LD="${ac_tool_prefix}ld"
3985 echo "$as_me:3985: found $ac_dir/$ac_word" >&5
3986 break
3987 done
3988
3989 fi
3990 fi
3991 LD=$ac_cv_prog_LD
3992 if test -n "$LD"; then
3993   echo "$as_me:3993: result: $LD" >&5
3994 echo "${ECHO_T}$LD" >&6
3995 else
3996   echo "$as_me:3996: result: no" >&5
3997 echo "${ECHO_T}no" >&6
3998 fi
3999
4000 fi
4001 if test -z "$ac_cv_prog_LD"; then
4002   ac_ct_LD=$LD
4003   # Extract the first word of "ld", so it can be a program name with args.
4004 set dummy ld; ac_word=$2
4005 echo "$as_me:4005: checking for $ac_word" >&5
4006 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4007 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4008   echo $ECHO_N "(cached) $ECHO_C" >&6
4009 else
4010   if test -n "$ac_ct_LD"; then
4011   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4012 else
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   $as_executable_p "$ac_dir/$ac_word" || continue
4019 ac_cv_prog_ac_ct_LD="ld"
4020 echo "$as_me:4020: found $ac_dir/$ac_word" >&5
4021 break
4022 done
4023
4024   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4025 fi
4026 fi
4027 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4028 if test -n "$ac_ct_LD"; then
4029   echo "$as_me:4029: result: $ac_ct_LD" >&5
4030 echo "${ECHO_T}$ac_ct_LD" >&6
4031 else
4032   echo "$as_me:4032: result: no" >&5
4033 echo "${ECHO_T}no" >&6
4034 fi
4035
4036   LD=$ac_ct_LD
4037 else
4038   LD="$ac_cv_prog_LD"
4039 fi
4040
4041 if test -n "$ac_tool_prefix"; then
4042   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4043 set dummy ${ac_tool_prefix}ar; ac_word=$2
4044 echo "$as_me:4044: checking for $ac_word" >&5
4045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4046 if test "${ac_cv_prog_AR+set}" = set; then
4047   echo $ECHO_N "(cached) $ECHO_C" >&6
4048 else
4049   if test -n "$AR"; then
4050   ac_cv_prog_AR="$AR" # Let the user override the test.
4051 else
4052   ac_save_IFS=$IFS; IFS=$ac_path_separator
4053 ac_dummy="$PATH"
4054 for ac_dir in $ac_dummy; do
4055   IFS=$ac_save_IFS
4056   test -z "$ac_dir" && ac_dir=.
4057   $as_executable_p "$ac_dir/$ac_word" || continue
4058 ac_cv_prog_AR="${ac_tool_prefix}ar"
4059 echo "$as_me:4059: found $ac_dir/$ac_word" >&5
4060 break
4061 done
4062
4063 fi
4064 fi
4065 AR=$ac_cv_prog_AR
4066 if test -n "$AR"; then
4067   echo "$as_me:4067: result: $AR" >&5
4068 echo "${ECHO_T}$AR" >&6
4069 else
4070   echo "$as_me:4070: result: no" >&5
4071 echo "${ECHO_T}no" >&6
4072 fi
4073
4074 fi
4075 if test -z "$ac_cv_prog_AR"; then
4076   ac_ct_AR=$AR
4077   # Extract the first word of "ar", so it can be a program name with args.
4078 set dummy ar; ac_word=$2
4079 echo "$as_me:4079: checking for $ac_word" >&5
4080 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4081 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4082   echo $ECHO_N "(cached) $ECHO_C" >&6
4083 else
4084   if test -n "$ac_ct_AR"; then
4085   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4086 else
4087   ac_save_IFS=$IFS; IFS=$ac_path_separator
4088 ac_dummy="$PATH"
4089 for ac_dir in $ac_dummy; do
4090   IFS=$ac_save_IFS
4091   test -z "$ac_dir" && ac_dir=.
4092   $as_executable_p "$ac_dir/$ac_word" || continue
4093 ac_cv_prog_ac_ct_AR="ar"
4094 echo "$as_me:4094: found $ac_dir/$ac_word" >&5
4095 break
4096 done
4097
4098   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4099 fi
4100 fi
4101 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4102 if test -n "$ac_ct_AR"; then
4103   echo "$as_me:4103: result: $ac_ct_AR" >&5
4104 echo "${ECHO_T}$ac_ct_AR" >&6
4105 else
4106   echo "$as_me:4106: result: no" >&5
4107 echo "${ECHO_T}no" >&6
4108 fi
4109
4110   AR=$ac_ct_AR
4111 else
4112   AR="$ac_cv_prog_AR"
4113 fi
4114
4115 if test -n "$ac_tool_prefix"; then
4116   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4117 set dummy ${ac_tool_prefix}nm; ac_word=$2
4118 echo "$as_me:4118: checking for $ac_word" >&5
4119 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4120 if test "${ac_cv_prog_NM+set}" = set; then
4121   echo $ECHO_N "(cached) $ECHO_C" >&6
4122 else
4123   if test -n "$NM"; then
4124   ac_cv_prog_NM="$NM" # Let the user override the test.
4125 else
4126   ac_save_IFS=$IFS; IFS=$ac_path_separator
4127 ac_dummy="$PATH"
4128 for ac_dir in $ac_dummy; do
4129   IFS=$ac_save_IFS
4130   test -z "$ac_dir" && ac_dir=.
4131   $as_executable_p "$ac_dir/$ac_word" || continue
4132 ac_cv_prog_NM="${ac_tool_prefix}nm"
4133 echo "$as_me:4133: found $ac_dir/$ac_word" >&5
4134 break
4135 done
4136
4137 fi
4138 fi
4139 NM=$ac_cv_prog_NM
4140 if test -n "$NM"; then
4141   echo "$as_me:4141: result: $NM" >&5
4142 echo "${ECHO_T}$NM" >&6
4143 else
4144   echo "$as_me:4144: result: no" >&5
4145 echo "${ECHO_T}no" >&6
4146 fi
4147
4148 fi
4149 if test -z "$ac_cv_prog_NM"; then
4150   ac_ct_NM=$NM
4151   # Extract the first word of "nm", so it can be a program name with args.
4152 set dummy nm; ac_word=$2
4153 echo "$as_me:4153: checking for $ac_word" >&5
4154 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4155 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4156   echo $ECHO_N "(cached) $ECHO_C" >&6
4157 else
4158   if test -n "$ac_ct_NM"; then
4159   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4160 else
4161   ac_save_IFS=$IFS; IFS=$ac_path_separator
4162 ac_dummy="$PATH"
4163 for ac_dir in $ac_dummy; do
4164   IFS=$ac_save_IFS
4165   test -z "$ac_dir" && ac_dir=.
4166   $as_executable_p "$ac_dir/$ac_word" || continue
4167 ac_cv_prog_ac_ct_NM="nm"
4168 echo "$as_me:4168: found $ac_dir/$ac_word" >&5
4169 break
4170 done
4171
4172   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4173 fi
4174 fi
4175 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4176 if test -n "$ac_ct_NM"; then
4177   echo "$as_me:4177: result: $ac_ct_NM" >&5
4178 echo "${ECHO_T}$ac_ct_NM" >&6
4179 else
4180   echo "$as_me:4180: result: no" >&5
4181 echo "${ECHO_T}no" >&6
4182 fi
4183
4184   NM=$ac_ct_NM
4185 else
4186   NM="$ac_cv_prog_NM"
4187 fi
4188
4189 if test -n "$ac_tool_prefix"; then
4190   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4191 set dummy ${ac_tool_prefix}ar; ac_word=$2
4192 echo "$as_me:4192: checking for $ac_word" >&5
4193 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4194 if test "${ac_cv_prog_AR+set}" = set; then
4195   echo $ECHO_N "(cached) $ECHO_C" >&6
4196 else
4197   if test -n "$AR"; then
4198   ac_cv_prog_AR="$AR" # Let the user override the test.
4199 else
4200   ac_save_IFS=$IFS; IFS=$ac_path_separator
4201 ac_dummy="$PATH"
4202 for ac_dir in $ac_dummy; do
4203   IFS=$ac_save_IFS
4204   test -z "$ac_dir" && ac_dir=.
4205   $as_executable_p "$ac_dir/$ac_word" || continue
4206 ac_cv_prog_AR="${ac_tool_prefix}ar"
4207 echo "$as_me:4207: found $ac_dir/$ac_word" >&5
4208 break
4209 done
4210
4211 fi
4212 fi
4213 AR=$ac_cv_prog_AR
4214 if test -n "$AR"; then
4215   echo "$as_me:4215: result: $AR" >&5
4216 echo "${ECHO_T}$AR" >&6
4217 else
4218   echo "$as_me:4218: result: no" >&5
4219 echo "${ECHO_T}no" >&6
4220 fi
4221
4222 fi
4223 if test -z "$ac_cv_prog_AR"; then
4224   ac_ct_AR=$AR
4225   # Extract the first word of "ar", so it can be a program name with args.
4226 set dummy ar; ac_word=$2
4227 echo "$as_me:4227: checking for $ac_word" >&5
4228 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4229 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4230   echo $ECHO_N "(cached) $ECHO_C" >&6
4231 else
4232   if test -n "$ac_ct_AR"; then
4233   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4234 else
4235   ac_save_IFS=$IFS; IFS=$ac_path_separator
4236 ac_dummy="$PATH"
4237 for ac_dir in $ac_dummy; do
4238   IFS=$ac_save_IFS
4239   test -z "$ac_dir" && ac_dir=.
4240   $as_executable_p "$ac_dir/$ac_word" || continue
4241 ac_cv_prog_ac_ct_AR="ar"
4242 echo "$as_me:4242: found $ac_dir/$ac_word" >&5
4243 break
4244 done
4245
4246   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4247 fi
4248 fi
4249 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4250 if test -n "$ac_ct_AR"; then
4251   echo "$as_me:4251: result: $ac_ct_AR" >&5
4252 echo "${ECHO_T}$ac_ct_AR" >&6
4253 else
4254   echo "$as_me:4254: result: no" >&5
4255 echo "${ECHO_T}no" >&6
4256 fi
4257
4258   AR=$ac_ct_AR
4259 else
4260   AR="$ac_cv_prog_AR"
4261 fi
4262
4263 echo "$as_me:4263: checking for options to update archives" >&5
4264 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4265 if test "${cf_cv_ar_flags+set}" = set; then
4266   echo $ECHO_N "(cached) $ECHO_C" >&6
4267 else
4268
4269         cf_cv_ar_flags=unknown
4270         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4271         do
4272
4273                 # check if $ARFLAGS already contains this choice
4274                 if test "x$ARFLAGS" != "x" ; then
4275                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4276                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4277                                 cf_cv_ar_flags=
4278                                 break
4279                         fi
4280                 fi
4281
4282                 rm -f conftest.$ac_cv_objext
4283                 rm -f conftest.a
4284
4285                 cat >conftest.$ac_ext <<EOF
4286 #line 4286 "configure"
4287 int     testdata[3] = { 123, 456, 789 };
4288 EOF
4289                 if { (eval echo "$as_me:4289: \"$ac_compile\"") >&5
4290   (eval $ac_compile) 2>&5
4291   ac_status=$?
4292   echo "$as_me:4292: \$? = $ac_status" >&5
4293   (exit $ac_status); } ; then
4294                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4295                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4296                         if test -f conftest.a ; then
4297                                 cf_cv_ar_flags=$cf_ar_flags
4298                                 break
4299                         fi
4300                 else
4301                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4302
4303 echo "${as_me:-configure}:4303: testing cannot compile test-program ..." 1>&5
4304
4305                         break
4306                 fi
4307         done
4308         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4309
4310 fi
4311 echo "$as_me:4311: result: $cf_cv_ar_flags" >&5
4312 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4313
4314 if test -n "$ARFLAGS" ; then
4315         if test -n "$cf_cv_ar_flags" ; then
4316                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4317         fi
4318 else
4319         ARFLAGS=$cf_cv_ar_flags
4320 fi
4321
4322 echo "$as_me:4322: checking if you have specified an install-prefix" >&5
4323 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4324
4325 # Check whether --with-install-prefix or --without-install-prefix was given.
4326 if test "${with_install_prefix+set}" = set; then
4327   withval="$with_install_prefix"
4328   case "x$withval" in #(vi
4329         xyes|xno) #(vi
4330                 ;;
4331         *)      DESTDIR="$withval"
4332                 ;;
4333         esac
4334 fi;
4335 echo "$as_me:4335: result: $DESTDIR" >&5
4336 echo "${ECHO_T}$DESTDIR" >&6
4337
4338 ###############################################################################
4339
4340 # If we're cross-compiling, allow the user to override the tools and their
4341 # options.  The configure script is oriented toward identifying the host
4342 # compiler, etc., but we need a build compiler to generate parts of the source.
4343
4344 if test "$cross_compiling" = yes ; then
4345
4346         # defaults that we might want to override
4347         : ${BUILD_CFLAGS:=''}
4348         : ${BUILD_CPPFLAGS:=''}
4349         : ${BUILD_LDFLAGS:=''}
4350         : ${BUILD_LIBS:=''}
4351         : ${BUILD_EXEEXT:='$x'}
4352         : ${BUILD_OBJEXT:='o'}
4353
4354 # Check whether --with-build-cc or --without-build-cc was given.
4355 if test "${with_build_cc+set}" = set; then
4356   withval="$with_build_cc"
4357   BUILD_CC="$withval"
4358 else
4359   for ac_prog in gcc cc cl
4360 do
4361   # Extract the first word of "$ac_prog", so it can be a program name with args.
4362 set dummy $ac_prog; ac_word=$2
4363 echo "$as_me:4363: checking for $ac_word" >&5
4364 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4365 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4366   echo $ECHO_N "(cached) $ECHO_C" >&6
4367 else
4368   if test -n "$BUILD_CC"; then
4369   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4370 else
4371   ac_save_IFS=$IFS; IFS=$ac_path_separator
4372 ac_dummy="$PATH"
4373 for ac_dir in $ac_dummy; do
4374   IFS=$ac_save_IFS
4375   test -z "$ac_dir" && ac_dir=.
4376   $as_executable_p "$ac_dir/$ac_word" || continue
4377 ac_cv_prog_BUILD_CC="$ac_prog"
4378 echo "$as_me:4378: found $ac_dir/$ac_word" >&5
4379 break
4380 done
4381
4382 fi
4383 fi
4384 BUILD_CC=$ac_cv_prog_BUILD_CC
4385 if test -n "$BUILD_CC"; then
4386   echo "$as_me:4386: result: $BUILD_CC" >&5
4387 echo "${ECHO_T}$BUILD_CC" >&6
4388 else
4389   echo "$as_me:4389: result: no" >&5
4390 echo "${ECHO_T}no" >&6
4391 fi
4392
4393   test -n "$BUILD_CC" && break
4394 done
4395
4396 fi;
4397         echo "$as_me:4397: checking for native build C compiler" >&5
4398 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4399         echo "$as_me:4399: result: $BUILD_CC" >&5
4400 echo "${ECHO_T}$BUILD_CC" >&6
4401
4402         echo "$as_me:4402: checking for native build C preprocessor" >&5
4403 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4404
4405 # Check whether --with-build-cpp or --without-build-cpp was given.
4406 if test "${with_build_cpp+set}" = set; then
4407   withval="$with_build_cpp"
4408   BUILD_CPP="$withval"
4409 else
4410   BUILD_CPP='${BUILD_CC} -E'
4411 fi;
4412         echo "$as_me:4412: result: $BUILD_CPP" >&5
4413 echo "${ECHO_T}$BUILD_CPP" >&6
4414
4415         echo "$as_me:4415: checking for native build C flags" >&5
4416 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4417
4418 # Check whether --with-build-cflags or --without-build-cflags was given.
4419 if test "${with_build_cflags+set}" = set; then
4420   withval="$with_build_cflags"
4421   BUILD_CFLAGS="$withval"
4422 fi;
4423         echo "$as_me:4423: result: $BUILD_CFLAGS" >&5
4424 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4425
4426         echo "$as_me:4426: checking for native build C preprocessor-flags" >&5
4427 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4428
4429 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4430 if test "${with_build_cppflags+set}" = set; then
4431   withval="$with_build_cppflags"
4432   BUILD_CPPFLAGS="$withval"
4433 fi;
4434         echo "$as_me:4434: result: $BUILD_CPPFLAGS" >&5
4435 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4436
4437         echo "$as_me:4437: checking for native build linker-flags" >&5
4438 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4439
4440 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4441 if test "${with_build_ldflags+set}" = set; then
4442   withval="$with_build_ldflags"
4443   BUILD_LDFLAGS="$withval"
4444 fi;
4445         echo "$as_me:4445: result: $BUILD_LDFLAGS" >&5
4446 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4447
4448         echo "$as_me:4448: checking for native build linker-libraries" >&5
4449 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4450
4451 # Check whether --with-build-libs or --without-build-libs was given.
4452 if test "${with_build_libs+set}" = set; then
4453   withval="$with_build_libs"
4454   BUILD_LIBS="$withval"
4455 fi;
4456         echo "$as_me:4456: result: $BUILD_LIBS" >&5
4457 echo "${ECHO_T}$BUILD_LIBS" >&6
4458
4459         # this assumes we're on Unix.
4460         BUILD_EXEEXT=
4461         BUILD_OBJEXT=o
4462
4463         : ${BUILD_CC:='${CC}'}
4464
4465         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4466                 { { echo "$as_me:4466: error: Cross-build requires two compilers.
4467 Use --with-build-cc to specify the native compiler." >&5
4468 echo "$as_me: error: Cross-build requires two compilers.
4469 Use --with-build-cc to specify the native compiler." >&2;}
4470    { (exit 1); exit 1; }; }
4471         fi
4472
4473 else
4474         : ${BUILD_CC:='${CC}'}
4475         : ${BUILD_CPP:='${CPP}'}
4476         : ${BUILD_CFLAGS:='${CFLAGS}'}
4477         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4478         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4479         : ${BUILD_LIBS:='${LIBS}'}
4480         : ${BUILD_EXEEXT:='$x'}
4481         : ${BUILD_OBJEXT:='o'}
4482 fi
4483
4484 ###############################################################################
4485
4486 ### Options to allow the user to specify the set of libraries which are used.
4487 ### Use "--without-normal --with-shared" to allow the default model to be
4488 ### shared, for example.
4489 cf_list_models=""
4490
4491 echo "$as_me:4491: checking if libtool -version-number should be used" >&5
4492 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4493
4494 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4495 if test "${enable_libtool_version+set}" = set; then
4496   enableval="$enable_libtool_version"
4497   test "$enableval" != no && enableval=yes
4498   if test "$enableval" != "yes" ; then
4499     cf_libtool_version=no
4500   else
4501     cf_libtool_version=yes
4502   fi
4503 else
4504   enableval=yes
4505   cf_libtool_version=yes
4506
4507 fi;
4508 echo "$as_me:4508: result: $cf_libtool_version" >&5
4509 echo "${ECHO_T}$cf_libtool_version" >&6
4510
4511 if test "$cf_libtool_version" = yes ; then
4512         LIBTOOL_VERSION="-version-number"
4513 else
4514         LIBTOOL_VERSION="-version-info"
4515         case "x$VERSION" in #(vi
4516         x) #(vi
4517                 { echo "$as_me:4517: WARNING: VERSION was not set" >&5
4518 echo "$as_me: WARNING: VERSION was not set" >&2;}
4519                 ;;
4520         x*.*.*)
4521                 ABI_VERSION="$VERSION"
4522                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4523
4524 echo "${as_me:-configure}:4524: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4525
4526                 ;;
4527         x*:*:*)
4528                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4529                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4530
4531 echo "${as_me:-configure}:4531: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4532
4533                 ;;
4534         *)
4535                 { echo "$as_me:4535: WARNING: unexpected VERSION value: $VERSION" >&5
4536 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4537                 ;;
4538         esac
4539 fi
4540
4541 LIBTOOL=
4542
4543 # common library maintenance symbols that are convenient for libtool scripts:
4544 LIB_CREATE='${AR} -cr'
4545 LIB_OBJECT='${OBJECTS}'
4546 LIB_SUFFIX=.a
4547 LIB_PREP="$RANLIB"
4548
4549 # symbols used to prop libtool up to enable it to determine what it should be
4550 # doing:
4551 LIB_CLEAN=
4552 LIB_COMPILE=
4553 LIB_LINK='${CC}'
4554 LIB_INSTALL=
4555 LIB_UNINSTALL=
4556
4557 echo "$as_me:4557: checking if you want to build libraries with libtool" >&5
4558 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4559
4560 # Check whether --with-libtool or --without-libtool was given.
4561 if test "${with_libtool+set}" = set; then
4562   withval="$with_libtool"
4563   with_libtool=$withval
4564 else
4565   with_libtool=no
4566 fi;
4567 echo "$as_me:4567: result: $with_libtool" >&5
4568 echo "${ECHO_T}$with_libtool" >&6
4569 if test "$with_libtool" != "no"; then
4570
4571         if test "$with_libtool" != "yes" ; then
4572
4573 if test "x$prefix" != xNONE; then
4574   cf_path_syntax="$prefix"
4575 else
4576   cf_path_syntax="$ac_default_prefix"
4577 fi
4578
4579 case ".$with_libtool" in #(vi
4580 .\$\(*\)*|.\'*\'*) #(vi
4581   ;;
4582 ..|./*|.\\*) #(vi
4583   ;;
4584 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4585   ;;
4586 .\${*prefix}*|.\${*dir}*) #(vi
4587   eval with_libtool="$with_libtool"
4588   case ".$with_libtool" in #(vi
4589   .NONE/*)
4590     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4591     ;;
4592   esac
4593   ;; #(vi
4594 .no|.NONE/*)
4595   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4596   ;;
4597 *)
4598   { { echo "$as_me:4598: error: expected a pathname, not \"$with_libtool\"" >&5
4599 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4600    { (exit 1); exit 1; }; }
4601   ;;
4602 esac
4603
4604                 LIBTOOL=$with_libtool
4605         else
4606                 if test -n "$ac_tool_prefix"; then
4607   for ac_prog in libtool glibtool
4608   do
4609     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4610 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4611 echo "$as_me:4611: checking for $ac_word" >&5
4612 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4613 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4614   echo $ECHO_N "(cached) $ECHO_C" >&6
4615 else
4616   if test -n "$LIBTOOL"; then
4617   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4618 else
4619   ac_save_IFS=$IFS; IFS=$ac_path_separator
4620 ac_dummy="$PATH"
4621 for ac_dir in $ac_dummy; do
4622   IFS=$ac_save_IFS
4623   test -z "$ac_dir" && ac_dir=.
4624   $as_executable_p "$ac_dir/$ac_word" || continue
4625 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4626 echo "$as_me:4626: found $ac_dir/$ac_word" >&5
4627 break
4628 done
4629
4630 fi
4631 fi
4632 LIBTOOL=$ac_cv_prog_LIBTOOL
4633 if test -n "$LIBTOOL"; then
4634   echo "$as_me:4634: result: $LIBTOOL" >&5
4635 echo "${ECHO_T}$LIBTOOL" >&6
4636 else
4637   echo "$as_me:4637: result: no" >&5
4638 echo "${ECHO_T}no" >&6
4639 fi
4640
4641     test -n "$LIBTOOL" && break
4642   done
4643 fi
4644 if test -z "$LIBTOOL"; then
4645   ac_ct_LIBTOOL=$LIBTOOL
4646   for ac_prog in libtool glibtool
4647 do
4648   # Extract the first word of "$ac_prog", so it can be a program name with args.
4649 set dummy $ac_prog; ac_word=$2
4650 echo "$as_me:4650: checking for $ac_word" >&5
4651 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4652 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4653   echo $ECHO_N "(cached) $ECHO_C" >&6
4654 else
4655   if test -n "$ac_ct_LIBTOOL"; then
4656   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4657 else
4658   ac_save_IFS=$IFS; IFS=$ac_path_separator
4659 ac_dummy="$PATH"
4660 for ac_dir in $ac_dummy; do
4661   IFS=$ac_save_IFS
4662   test -z "$ac_dir" && ac_dir=.
4663   $as_executable_p "$ac_dir/$ac_word" || continue
4664 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4665 echo "$as_me:4665: found $ac_dir/$ac_word" >&5
4666 break
4667 done
4668
4669 fi
4670 fi
4671 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4672 if test -n "$ac_ct_LIBTOOL"; then
4673   echo "$as_me:4673: result: $ac_ct_LIBTOOL" >&5
4674 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4675 else
4676   echo "$as_me:4676: result: no" >&5
4677 echo "${ECHO_T}no" >&6
4678 fi
4679
4680   test -n "$ac_ct_LIBTOOL" && break
4681 done
4682 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4683
4684   LIBTOOL=$ac_ct_LIBTOOL
4685 fi
4686
4687 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4688 then
4689         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.].*//'`
4690 else
4691         cf_cv_libtool_version=
4692 fi
4693 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4694
4695                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4696                 then
4697
4698 unset ac_cv_prog_ac_ct_LIBTOOL
4699 unset ac_ct_LIBTOOL
4700 unset LIBTOOL
4701
4702                         if test -n "$ac_tool_prefix"; then
4703   for ac_prog in glibtool
4704   do
4705     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4706 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4707 echo "$as_me:4707: checking for $ac_word" >&5
4708 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4709 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4710   echo $ECHO_N "(cached) $ECHO_C" >&6
4711 else
4712   if test -n "$LIBTOOL"; then
4713   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4714 else
4715   ac_save_IFS=$IFS; IFS=$ac_path_separator
4716 ac_dummy="$PATH"
4717 for ac_dir in $ac_dummy; do
4718   IFS=$ac_save_IFS
4719   test -z "$ac_dir" && ac_dir=.
4720   $as_executable_p "$ac_dir/$ac_word" || continue
4721 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4722 echo "$as_me:4722: found $ac_dir/$ac_word" >&5
4723 break
4724 done
4725
4726 fi
4727 fi
4728 LIBTOOL=$ac_cv_prog_LIBTOOL
4729 if test -n "$LIBTOOL"; then
4730   echo "$as_me:4730: result: $LIBTOOL" >&5
4731 echo "${ECHO_T}$LIBTOOL" >&6
4732 else
4733   echo "$as_me:4733: result: no" >&5
4734 echo "${ECHO_T}no" >&6
4735 fi
4736
4737     test -n "$LIBTOOL" && break
4738   done
4739 fi
4740 if test -z "$LIBTOOL"; then
4741   ac_ct_LIBTOOL=$LIBTOOL
4742   for ac_prog in glibtool
4743 do
4744   # Extract the first word of "$ac_prog", so it can be a program name with args.
4745 set dummy $ac_prog; ac_word=$2
4746 echo "$as_me:4746: checking for $ac_word" >&5
4747 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4748 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4749   echo $ECHO_N "(cached) $ECHO_C" >&6
4750 else
4751   if test -n "$ac_ct_LIBTOOL"; then
4752   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4753 else
4754   ac_save_IFS=$IFS; IFS=$ac_path_separator
4755 ac_dummy="$PATH"
4756 for ac_dir in $ac_dummy; do
4757   IFS=$ac_save_IFS
4758   test -z "$ac_dir" && ac_dir=.
4759   $as_executable_p "$ac_dir/$ac_word" || continue
4760 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4761 echo "$as_me:4761: found $ac_dir/$ac_word" >&5
4762 break
4763 done
4764
4765 fi
4766 fi
4767 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4768 if test -n "$ac_ct_LIBTOOL"; then
4769   echo "$as_me:4769: result: $ac_ct_LIBTOOL" >&5
4770 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4771 else
4772   echo "$as_me:4772: result: no" >&5
4773 echo "${ECHO_T}no" >&6
4774 fi
4775
4776   test -n "$ac_ct_LIBTOOL" && break
4777 done
4778 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4779
4780   LIBTOOL=$ac_ct_LIBTOOL
4781 fi
4782
4783 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4784 then
4785         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.].*//'`
4786 else
4787         cf_cv_libtool_version=
4788 fi
4789 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4790
4791                 fi
4792         fi
4793         if test -z "$LIBTOOL" ; then
4794                 { { echo "$as_me:4794: error: Cannot find libtool" >&5
4795 echo "$as_me: error: Cannot find libtool" >&2;}
4796    { (exit 1); exit 1; }; }
4797         fi
4798         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4799         LIB_OBJECT='${OBJECTS:.o=.lo}'
4800         LIB_SUFFIX=.la
4801         LIB_CLEAN='${LIBTOOL} --mode=clean'
4802         LIB_COMPILE='${LIBTOOL} --mode=compile'
4803         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4804         LIB_INSTALL='${LIBTOOL} --mode=install'
4805         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4806         LIB_PREP=:
4807
4808 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4809 then
4810         echo "$as_me:4810: checking version of $LIBTOOL" >&5
4811 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4812
4813 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4814 then
4815         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.].*//'`
4816 else
4817         cf_cv_libtool_version=
4818 fi
4819 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4820
4821         echo "$as_me:4821: result: $cf_cv_libtool_version" >&5
4822 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4823         if test -z "$cf_cv_libtool_version" ; then
4824                 { { echo "$as_me:4824: error: This is not GNU libtool" >&5
4825 echo "$as_me: error: This is not GNU libtool" >&2;}
4826    { (exit 1); exit 1; }; }
4827         fi
4828 else
4829         { { echo "$as_me:4829: error: GNU libtool has not been found" >&5
4830 echo "$as_me: error: GNU libtool has not been found" >&2;}
4831    { (exit 1); exit 1; }; }
4832 fi
4833
4834         # special hack to add -no-undefined (which libtool should do for itself)
4835         LT_UNDEF=
4836         case "$cf_cv_system_name" in #(vi
4837         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4838                 LT_UNDEF=-no-undefined
4839                 ;;
4840         esac
4841
4842         # special hack to add --tag option for C++ compiler
4843         case $cf_cv_libtool_version in #(vi
4844         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4845                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4846                 LIBTOOL="$LIBTOOL --tag=CC"
4847                 ;;
4848         *)
4849                 LIBTOOL_CXX="$LIBTOOL"
4850                 ;;
4851         esac
4852 else
4853         LIBTOOL=""
4854         LIBTOOL_CXX=""
4855 fi
4856
4857 test -z "$LIBTOOL" && ECHO_LT=
4858
4859 if test "$with_libtool" != "no" ; then
4860
4861 cf_list_models="$cf_list_models libtool"
4862
4863 else
4864
4865 echo "$as_me:4865: checking if you want to build shared libraries" >&5
4866 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4867
4868 # Check whether --with-shared or --without-shared was given.
4869 if test "${with_shared+set}" = set; then
4870   withval="$with_shared"
4871   with_shared=$withval
4872 else
4873   with_shared=no
4874 fi;
4875 echo "$as_me:4875: result: $with_shared" >&5
4876 echo "${ECHO_T}$with_shared" >&6
4877 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4878
4879 echo "$as_me:4879: checking if you want to build static libraries" >&5
4880 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4881
4882 # Check whether --with-normal or --without-normal was given.
4883 if test "${with_normal+set}" = set; then
4884   withval="$with_normal"
4885   with_normal=$withval
4886 else
4887   with_normal=yes
4888 fi;
4889 echo "$as_me:4889: result: $with_normal" >&5
4890 echo "${ECHO_T}$with_normal" >&6
4891 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4892
4893 echo "$as_me:4893: checking if you want to build debug libraries" >&5
4894 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4895
4896 # Check whether --with-debug or --without-debug was given.
4897 if test "${with_debug+set}" = set; then
4898   withval="$with_debug"
4899   with_debug=$withval
4900 else
4901   with_debug=yes
4902 fi;
4903 echo "$as_me:4903: result: $with_debug" >&5
4904 echo "${ECHO_T}$with_debug" >&6
4905 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4906
4907 echo "$as_me:4907: checking if you want to build profiling libraries" >&5
4908 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4909
4910 # Check whether --with-profile or --without-profile was given.
4911 if test "${with_profile+set}" = set; then
4912   withval="$with_profile"
4913   with_profile=$withval
4914 else
4915   with_profile=no
4916 fi;
4917 echo "$as_me:4917: result: $with_profile" >&5
4918 echo "${ECHO_T}$with_profile" >&6
4919 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4920
4921 fi
4922
4923 if test "X$cf_with_cxx_binding" != Xno; then
4924 if test "x$with_shared" = "xyes"; then
4925 echo "$as_me:4925: checking if you want to build C++ shared libraries" >&5
4926 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4927
4928 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4929 if test "${with_cxx_shared+set}" = set; then
4930   withval="$with_cxx_shared"
4931   with_shared_cxx=$withval
4932 else
4933   with_shared_cxx=no
4934 fi;
4935 echo "$as_me:4935: result: $with_shared_cxx" >&5
4936 echo "${ECHO_T}$with_shared_cxx" >&6
4937 fi
4938 fi
4939
4940 ###############################################################################
4941
4942 echo "$as_me:4942: checking for specified models" >&5
4943 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4944 test -z "$cf_list_models" && cf_list_models=normal
4945 test "$with_libtool" != "no" && cf_list_models=libtool
4946 echo "$as_me:4946: result: $cf_list_models" >&5
4947 echo "${ECHO_T}$cf_list_models" >&6
4948
4949 ### Use the first model as the default, and save its suffix for use in building
4950 ### up test-applications.
4951 echo "$as_me:4951: checking for default model" >&5
4952 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4953 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4954 echo "$as_me:4954: result: $DFT_LWR_MODEL" >&5
4955 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4956
4957 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4958
4959 TICS_NAME=tic
4960
4961 TINFO_NAME=tinfo
4962
4963 LIB_NAME=ncurses
4964
4965 LIB_DIR=../lib
4966 LIB_2ND=../../lib
4967
4968 echo "$as_me:4968: checking if you want to have a library-prefix" >&5
4969 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4970
4971 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4972 if test "${with_lib_prefix+set}" = set; then
4973   withval="$with_lib_prefix"
4974   with_lib_prefix=$withval
4975 else
4976   with_lib_prefix=auto
4977 fi;
4978 echo "$as_me:4978: result: $with_lib_prefix" >&5
4979 echo "${ECHO_T}$with_lib_prefix" >&6
4980
4981 if test $with_lib_prefix = auto
4982 then
4983
4984         case $cf_cv_system_name in #(vi
4985         OS/2*|os2*) #(vi
4986         LIB_PREFIX=''
4987         ;;
4988         *)      LIB_PREFIX='lib'
4989         ;;
4990         esac
4991 cf_prefix=$LIB_PREFIX
4992
4993 elif test $with_lib_prefix = no
4994 then
4995         LIB_PREFIX=
4996 else
4997         LIB_PREFIX=$with_lib_prefix
4998 fi
4999
5000 LIB_SUFFIX=
5001
5002         echo "$as_me:5002: checking for PATH separator" >&5
5003 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5004         case $cf_cv_system_name in
5005         os2*)   PATH_SEPARATOR=';'  ;;
5006         *)      ${PATH_SEPARATOR:=':'}  ;;
5007         esac
5008
5009         echo "$as_me:5009: result: $PATH_SEPARATOR" >&5
5010 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5011
5012 ###############################################################################
5013
5014 echo "$as_me:5014: checking if you want to build a separate terminfo library" >&5
5015 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5016
5017 # Check whether --with-termlib or --without-termlib was given.
5018 if test "${with_termlib+set}" = set; then
5019   withval="$with_termlib"
5020   with_termlib=$withval
5021 else
5022   with_termlib=no
5023 fi;
5024 echo "$as_me:5024: result: $with_termlib" >&5
5025 echo "${ECHO_T}$with_termlib" >&6
5026
5027 echo "$as_me:5027: checking if you want to build a separate tic library" >&5
5028 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5029
5030 # Check whether --with-ticlib or --without-ticlib was given.
5031 if test "${with_ticlib+set}" = set; then
5032   withval="$with_ticlib"
5033   with_ticlib=$withval
5034 else
5035   with_ticlib=no
5036 fi;
5037 echo "$as_me:5037: result: $with_ticlib" >&5
5038 echo "${ECHO_T}$with_ticlib" >&6
5039
5040 ### Checks for special libraries, must be done up-front.
5041 SHLIB_LIST=""
5042
5043 echo "$as_me:5043: checking if you want to link with the GPM mouse library" >&5
5044 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5045
5046 # Check whether --with-gpm or --without-gpm was given.
5047 if test "${with_gpm+set}" = set; then
5048   withval="$with_gpm"
5049   with_gpm=$withval
5050 else
5051   with_gpm=maybe
5052 fi;
5053 echo "$as_me:5053: result: $with_gpm" >&5
5054 echo "${ECHO_T}$with_gpm" >&6
5055
5056 if test "$with_gpm" != no ; then
5057         echo "$as_me:5057: checking for gpm.h" >&5
5058 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5059 if test "${ac_cv_header_gpm_h+set}" = set; then
5060   echo $ECHO_N "(cached) $ECHO_C" >&6
5061 else
5062   cat >conftest.$ac_ext <<_ACEOF
5063 #line 5063 "configure"
5064 #include "confdefs.h"
5065 #include <gpm.h>
5066 _ACEOF
5067 if { (eval echo "$as_me:5067: \"$ac_cpp conftest.$ac_ext\"") >&5
5068   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5069   ac_status=$?
5070   egrep -v '^ *\+' conftest.er1 >conftest.err
5071   rm -f conftest.er1
5072   cat conftest.err >&5
5073   echo "$as_me:5073: \$? = $ac_status" >&5
5074   (exit $ac_status); } >/dev/null; then
5075   if test -s conftest.err; then
5076     ac_cpp_err=$ac_c_preproc_warn_flag
5077   else
5078     ac_cpp_err=
5079   fi
5080 else
5081   ac_cpp_err=yes
5082 fi
5083 if test -z "$ac_cpp_err"; then
5084   ac_cv_header_gpm_h=yes
5085 else
5086   echo "$as_me: failed program was:" >&5
5087   cat conftest.$ac_ext >&5
5088   ac_cv_header_gpm_h=no
5089 fi
5090 rm -f conftest.err conftest.$ac_ext
5091 fi
5092 echo "$as_me:5092: result: $ac_cv_header_gpm_h" >&5
5093 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5094 if test $ac_cv_header_gpm_h = yes; then
5095
5096 cat >>confdefs.h <<\EOF
5097 #define HAVE_GPM_H 1
5098 EOF
5099
5100                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5101                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5102
5103 echo "${as_me:-configure}:5103: testing assuming we really have GPM library ..." 1>&5
5104
5105 cat >>confdefs.h <<\EOF
5106 #define HAVE_LIBGPM 1
5107 EOF
5108
5109                 else
5110                         echo "$as_me:5110: checking for Gpm_Open in -lgpm" >&5
5111 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5112 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5113   echo $ECHO_N "(cached) $ECHO_C" >&6
5114 else
5115   ac_check_lib_save_LIBS=$LIBS
5116 LIBS="-lgpm  $LIBS"
5117 cat >conftest.$ac_ext <<_ACEOF
5118 #line 5118 "configure"
5119 #include "confdefs.h"
5120
5121 /* Override any gcc2 internal prototype to avoid an error.  */
5122 #ifdef __cplusplus
5123 extern "C"
5124 #endif
5125 /* We use char because int might match the return type of a gcc2
5126    builtin and then its argument prototype would still apply.  */
5127 char Gpm_Open ();
5128 int
5129 main ()
5130 {
5131 Gpm_Open ();
5132   ;
5133   return 0;
5134 }
5135 _ACEOF
5136 rm -f conftest.$ac_objext conftest$ac_exeext
5137 if { (eval echo "$as_me:5137: \"$ac_link\"") >&5
5138   (eval $ac_link) 2>&5
5139   ac_status=$?
5140   echo "$as_me:5140: \$? = $ac_status" >&5
5141   (exit $ac_status); } &&
5142          { ac_try='test -s conftest$ac_exeext'
5143   { (eval echo "$as_me:5143: \"$ac_try\"") >&5
5144   (eval $ac_try) 2>&5
5145   ac_status=$?
5146   echo "$as_me:5146: \$? = $ac_status" >&5
5147   (exit $ac_status); }; }; then
5148   ac_cv_lib_gpm_Gpm_Open=yes
5149 else
5150   echo "$as_me: failed program was:" >&5
5151 cat conftest.$ac_ext >&5
5152 ac_cv_lib_gpm_Gpm_Open=no
5153 fi
5154 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5155 LIBS=$ac_check_lib_save_LIBS
5156 fi
5157 echo "$as_me:5157: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5158 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5159 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5160   :
5161 else
5162
5163                                 { { echo "$as_me:5163: error: Cannot link with GPM library" >&5
5164 echo "$as_me: error: Cannot link with GPM library" >&2;}
5165    { (exit 1); exit 1; }; }
5166                 fi
5167                 with_gpm=yes
5168
5169 fi
5170
5171 else
5172
5173                 test "$with_gpm" != maybe && { echo "$as_me:5173: WARNING: Cannot find GPM header" >&5
5174 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5175                 with_gpm=no
5176
5177 fi
5178
5179 fi
5180
5181 if test "$with_gpm" != no ; then
5182         echo "$as_me:5182: checking if you want to load GPM dynamically" >&5
5183 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5184
5185 # Check whether --with-dlsym or --without-dlsym was given.
5186 if test "${with_dlsym+set}" = set; then
5187   withval="$with_dlsym"
5188   with_dlsym=$withval
5189 else
5190   with_dlsym=yes
5191 fi;
5192         echo "$as_me:5192: result: $with_dlsym" >&5
5193 echo "${ECHO_T}$with_dlsym" >&6
5194         if test "x$with_dlsym" = xyes ; then
5195
5196 cf_have_dlsym=no
5197 echo "$as_me:5197: checking for dlsym" >&5
5198 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5199 if test "${ac_cv_func_dlsym+set}" = set; then
5200   echo $ECHO_N "(cached) $ECHO_C" >&6
5201 else
5202   cat >conftest.$ac_ext <<_ACEOF
5203 #line 5203 "configure"
5204 #include "confdefs.h"
5205 /* System header to define __stub macros and hopefully few prototypes,
5206     which can conflict with char dlsym (); below.  */
5207 #include <assert.h>
5208 /* Override any gcc2 internal prototype to avoid an error.  */
5209 #ifdef __cplusplus
5210 extern "C"
5211 #endif
5212 /* We use char because int might match the return type of a gcc2
5213    builtin and then its argument prototype would still apply.  */
5214 char dlsym ();
5215 char (*f) ();
5216
5217 int
5218 main ()
5219 {
5220 /* The GNU C library defines this for functions which it implements
5221     to always fail with ENOSYS.  Some functions are actually named
5222     something starting with __ and the normal name is an alias.  */
5223 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5224 choke me
5225 #else
5226 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5227 #endif
5228
5229   ;
5230   return 0;
5231 }
5232 _ACEOF
5233 rm -f conftest.$ac_objext conftest$ac_exeext
5234 if { (eval echo "$as_me:5234: \"$ac_link\"") >&5
5235   (eval $ac_link) 2>&5
5236   ac_status=$?
5237   echo "$as_me:5237: \$? = $ac_status" >&5
5238   (exit $ac_status); } &&
5239          { ac_try='test -s conftest$ac_exeext'
5240   { (eval echo "$as_me:5240: \"$ac_try\"") >&5
5241   (eval $ac_try) 2>&5
5242   ac_status=$?
5243   echo "$as_me:5243: \$? = $ac_status" >&5
5244   (exit $ac_status); }; }; then
5245   ac_cv_func_dlsym=yes
5246 else
5247   echo "$as_me: failed program was:" >&5
5248 cat conftest.$ac_ext >&5
5249 ac_cv_func_dlsym=no
5250 fi
5251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5252 fi
5253 echo "$as_me:5253: result: $ac_cv_func_dlsym" >&5
5254 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5255 if test $ac_cv_func_dlsym = yes; then
5256   cf_have_dlsym=yes
5257 else
5258
5259 cf_have_libdl=no
5260 echo "$as_me:5260: checking for dlsym in -ldl" >&5
5261 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5262 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5263   echo $ECHO_N "(cached) $ECHO_C" >&6
5264 else
5265   ac_check_lib_save_LIBS=$LIBS
5266 LIBS="-ldl  $LIBS"
5267 cat >conftest.$ac_ext <<_ACEOF
5268 #line 5268 "configure"
5269 #include "confdefs.h"
5270
5271 /* Override any gcc2 internal prototype to avoid an error.  */
5272 #ifdef __cplusplus
5273 extern "C"
5274 #endif
5275 /* We use char because int might match the return type of a gcc2
5276    builtin and then its argument prototype would still apply.  */
5277 char dlsym ();
5278 int
5279 main ()
5280 {
5281 dlsym ();
5282   ;
5283   return 0;
5284 }
5285 _ACEOF
5286 rm -f conftest.$ac_objext conftest$ac_exeext
5287 if { (eval echo "$as_me:5287: \"$ac_link\"") >&5
5288   (eval $ac_link) 2>&5
5289   ac_status=$?
5290   echo "$as_me:5290: \$? = $ac_status" >&5
5291   (exit $ac_status); } &&
5292          { ac_try='test -s conftest$ac_exeext'
5293   { (eval echo "$as_me:5293: \"$ac_try\"") >&5
5294   (eval $ac_try) 2>&5
5295   ac_status=$?
5296   echo "$as_me:5296: \$? = $ac_status" >&5
5297   (exit $ac_status); }; }; then
5298   ac_cv_lib_dl_dlsym=yes
5299 else
5300   echo "$as_me: failed program was:" >&5
5301 cat conftest.$ac_ext >&5
5302 ac_cv_lib_dl_dlsym=no
5303 fi
5304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5305 LIBS=$ac_check_lib_save_LIBS
5306 fi
5307 echo "$as_me:5307: result: $ac_cv_lib_dl_dlsym" >&5
5308 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5309 if test $ac_cv_lib_dl_dlsym = yes; then
5310
5311         cf_have_dlsym=yes
5312         cf_have_libdl=yes
5313 fi
5314
5315 fi
5316
5317 if test "$cf_have_dlsym" = yes ; then
5318         test "$cf_have_libdl" = yes &&
5319 cf_add_libs="-ldl"
5320 # Filter out duplicates - this happens with badly-designed ".pc" files...
5321 for cf_add_1lib in $LIBS
5322 do
5323         for cf_add_2lib in $cf_add_libs
5324         do
5325                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5326                 then
5327                         cf_add_1lib=
5328                         break
5329                 fi
5330         done
5331         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5332 done
5333 LIBS="$cf_add_libs"
5334
5335         echo "$as_me:5335: checking whether able to link to dl*() functions" >&5
5336 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5337         cat >conftest.$ac_ext <<_ACEOF
5338 #line 5338 "configure"
5339 #include "confdefs.h"
5340 #include <dlfcn.h>
5341 int
5342 main ()
5343 {
5344
5345                 void *obj;
5346                 if ((obj = dlopen("filename", 0)) != 0) {
5347                         if (dlsym(obj, "symbolname") == 0) {
5348                         dlclose(obj);
5349                         }
5350                 }
5351   ;
5352   return 0;
5353 }
5354 _ACEOF
5355 rm -f conftest.$ac_objext conftest$ac_exeext
5356 if { (eval echo "$as_me:5356: \"$ac_link\"") >&5
5357   (eval $ac_link) 2>&5
5358   ac_status=$?
5359   echo "$as_me:5359: \$? = $ac_status" >&5
5360   (exit $ac_status); } &&
5361          { ac_try='test -s conftest$ac_exeext'
5362   { (eval echo "$as_me:5362: \"$ac_try\"") >&5
5363   (eval $ac_try) 2>&5
5364   ac_status=$?
5365   echo "$as_me:5365: \$? = $ac_status" >&5
5366   (exit $ac_status); }; }; then
5367
5368 cat >>confdefs.h <<\EOF
5369 #define HAVE_LIBDL 1
5370 EOF
5371
5372 else
5373   echo "$as_me: failed program was:" >&5
5374 cat conftest.$ac_ext >&5
5375
5376                 { { echo "$as_me:5376: error: Cannot link test program for libdl" >&5
5377 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5378    { (exit 1); exit 1; }; }
5379 fi
5380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5381         echo "$as_me:5381: result: ok" >&5
5382 echo "${ECHO_T}ok" >&6
5383 else
5384         { { echo "$as_me:5384: error: Cannot find dlsym function" >&5
5385 echo "$as_me: error: Cannot find dlsym function" >&2;}
5386    { (exit 1); exit 1; }; }
5387 fi
5388
5389                 if test "x$with_gpm" != xyes ; then
5390                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5391
5392 echo "${as_me:-configure}:5392: testing assuming soname for gpm is $with_gpm ..." 1>&5
5393
5394                         cf_cv_gpm_soname="$with_gpm"
5395                 else
5396
5397 echo "$as_me:5397: checking for soname of gpm library" >&5
5398 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5399 if test "${cf_cv_gpm_soname+set}" = set; then
5400   echo $ECHO_N "(cached) $ECHO_C" >&6
5401 else
5402
5403 cf_cv_gpm_soname=unknown
5404 if test "$cross_compiling" != yes ; then
5405 cat >conftest.$ac_ext <<CF_EOF
5406 #include <gpm.h>
5407 int main()
5408 {
5409 if (Gpm_Open(0,0)) Gpm_Close();
5410         ${cf_cv_main_return:-return}(0);
5411 }
5412 CF_EOF
5413 cf_save_LIBS="$LIBS"
5414
5415 cf_add_libs="-lgpm"
5416 # Filter out duplicates - this happens with badly-designed ".pc" files...
5417 for cf_add_1lib in $LIBS
5418 do
5419         for cf_add_2lib in $cf_add_libs
5420         do
5421                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5422                 then
5423                         cf_add_1lib=
5424                         break
5425                 fi
5426         done
5427         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5428 done
5429 LIBS="$cf_add_libs"
5430
5431         if { (eval echo "$as_me:5431: \"$ac_compile\"") >&5
5432   (eval $ac_compile) 2>&5
5433   ac_status=$?
5434   echo "$as_me:5434: \$? = $ac_status" >&5
5435   (exit $ac_status); } ; then
5436                 if { (eval echo "$as_me:5436: \"$ac_link\"") >&5
5437   (eval $ac_link) 2>&5
5438   ac_status=$?
5439   echo "$as_me:5439: \$? = $ac_status" >&5
5440   (exit $ac_status); } ; then
5441                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5442                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5443                 fi
5444         fi
5445 rm -rf conftest*
5446 LIBS="$cf_save_LIBS"
5447 fi
5448
5449 fi
5450 echo "$as_me:5450: result: $cf_cv_gpm_soname" >&5
5451 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5452
5453                 fi
5454                 test "$cf_cv_gpm_soname" != "unknown" &&
5455 cat >>confdefs.h <<EOF
5456 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5457 EOF
5458
5459                 SHLIB_LIST="-ldl $SHLIB_LIST"
5460         else
5461                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5462
5463 cf_add_libs="-lgpm"
5464 # Filter out duplicates - this happens with badly-designed ".pc" files...
5465 for cf_add_1lib in $TEST_LIBS
5466 do
5467         for cf_add_2lib in $cf_add_libs
5468         do
5469                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5470                 then
5471                         cf_add_1lib=
5472                         break
5473                 fi
5474         done
5475         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5476 done
5477 TEST_LIBS="$cf_add_libs"
5478
5479         fi
5480
5481 cat >>confdefs.h <<\EOF
5482 #define HAVE_LIBGPM 1
5483 EOF
5484
5485 echo "$as_me:5485: checking for Gpm_Wgetch in -lgpm" >&5
5486 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5487 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5488   echo $ECHO_N "(cached) $ECHO_C" >&6
5489 else
5490   ac_check_lib_save_LIBS=$LIBS
5491 LIBS="-lgpm  $LIBS"
5492 cat >conftest.$ac_ext <<_ACEOF
5493 #line 5493 "configure"
5494 #include "confdefs.h"
5495
5496 /* Override any gcc2 internal prototype to avoid an error.  */
5497 #ifdef __cplusplus
5498 extern "C"
5499 #endif
5500 /* We use char because int might match the return type of a gcc2
5501    builtin and then its argument prototype would still apply.  */
5502 char Gpm_Wgetch ();
5503 int
5504 main ()
5505 {
5506 Gpm_Wgetch ();
5507   ;
5508   return 0;
5509 }
5510 _ACEOF
5511 rm -f conftest.$ac_objext conftest$ac_exeext
5512 if { (eval echo "$as_me:5512: \"$ac_link\"") >&5
5513   (eval $ac_link) 2>&5
5514   ac_status=$?
5515   echo "$as_me:5515: \$? = $ac_status" >&5
5516   (exit $ac_status); } &&
5517          { ac_try='test -s conftest$ac_exeext'
5518   { (eval echo "$as_me:5518: \"$ac_try\"") >&5
5519   (eval $ac_try) 2>&5
5520   ac_status=$?
5521   echo "$as_me:5521: \$? = $ac_status" >&5
5522   (exit $ac_status); }; }; then
5523   ac_cv_lib_gpm_Gpm_Wgetch=yes
5524 else
5525   echo "$as_me: failed program was:" >&5
5526 cat conftest.$ac_ext >&5
5527 ac_cv_lib_gpm_Gpm_Wgetch=no
5528 fi
5529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5530 LIBS=$ac_check_lib_save_LIBS
5531 fi
5532 echo "$as_me:5532: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5533 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5534 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5535
5536 echo "$as_me:5536: checking if GPM is weakly bound to curses library" >&5
5537 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5538 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5539   echo $ECHO_N "(cached) $ECHO_C" >&6
5540 else
5541
5542 cf_cv_check_gpm_wgetch=unknown
5543 if test "$cross_compiling" != yes ; then
5544
5545 cat >conftest.$ac_ext <<CF_EOF
5546 #include <gpm.h>
5547 int main()
5548 {
5549         Gpm_Wgetch();
5550         ${cf_cv_main_return:-return}(0);
5551 }
5552 CF_EOF
5553
5554         cf_save_LIBS="$LIBS"
5555         # This only works if we can look at the symbol table.  If a shared
5556         # library is stripped for install, we cannot use that.  So we're forced
5557         # to rely on the static library, noting that some packagers may not
5558         # include it.
5559         LIBS="-static -lgpm -dynamic $LIBS"
5560         if { (eval echo "$as_me:5560: \"$ac_compile\"") >&5
5561   (eval $ac_compile) 2>&5
5562   ac_status=$?
5563   echo "$as_me:5563: \$? = $ac_status" >&5
5564   (exit $ac_status); } ; then
5565                 if { (eval echo "$as_me:5565: \"$ac_link\"") >&5
5566   (eval $ac_link) 2>&5
5567   ac_status=$?
5568   echo "$as_me:5568: \$? = $ac_status" >&5
5569   (exit $ac_status); } ; then
5570                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5571                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5572                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5573                 fi
5574         fi
5575         rm -rf conftest*
5576         LIBS="$cf_save_LIBS"
5577 fi
5578
5579 fi
5580 echo "$as_me:5580: result: $cf_cv_check_gpm_wgetch" >&5
5581 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5582
5583 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5584         { echo "$as_me:5584: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5585 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5586 fi
5587
5588 fi
5589
5590 fi
5591
5592 # not everyone has "test -c"
5593 if test -c /dev/sysmouse 2>/dev/null ; then
5594 echo "$as_me:5594: checking if you want to use sysmouse" >&5
5595 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5596
5597 # Check whether --with-sysmouse or --without-sysmouse was given.
5598 if test "${with_sysmouse+set}" = set; then
5599   withval="$with_sysmouse"
5600   cf_with_sysmouse=$withval
5601 else
5602   cf_with_sysmouse=maybe
5603 fi;
5604         if test "$cf_with_sysmouse" != no ; then
5605         cat >conftest.$ac_ext <<_ACEOF
5606 #line 5606 "configure"
5607 #include "confdefs.h"
5608
5609 #include <osreldate.h>
5610 #if (__FreeBSD_version >= 400017)
5611 #include <sys/consio.h>
5612 #include <sys/fbio.h>
5613 #else
5614 #include <machine/console.h>
5615 #endif
5616
5617 int
5618 main ()
5619 {
5620
5621         struct mouse_info the_mouse;
5622         ioctl(0, CONS_MOUSECTL, &the_mouse);
5623
5624   ;
5625   return 0;
5626 }
5627 _ACEOF
5628 rm -f conftest.$ac_objext
5629 if { (eval echo "$as_me:5629: \"$ac_compile\"") >&5
5630   (eval $ac_compile) 2>&5
5631   ac_status=$?
5632   echo "$as_me:5632: \$? = $ac_status" >&5
5633   (exit $ac_status); } &&
5634          { ac_try='test -s conftest.$ac_objext'
5635   { (eval echo "$as_me:5635: \"$ac_try\"") >&5
5636   (eval $ac_try) 2>&5
5637   ac_status=$?
5638   echo "$as_me:5638: \$? = $ac_status" >&5
5639   (exit $ac_status); }; }; then
5640   cf_with_sysmouse=yes
5641 else
5642   echo "$as_me: failed program was:" >&5
5643 cat conftest.$ac_ext >&5
5644 cf_with_sysmouse=no
5645 fi
5646 rm -f conftest.$ac_objext conftest.$ac_ext
5647         fi
5648 echo "$as_me:5648: result: $cf_with_sysmouse" >&5
5649 echo "${ECHO_T}$cf_with_sysmouse" >&6
5650 test "$cf_with_sysmouse" = yes &&
5651 cat >>confdefs.h <<\EOF
5652 #define USE_SYSMOUSE 1
5653 EOF
5654
5655 fi
5656
5657 if test X"$CC_G_OPT" = X"" ; then
5658         CC_G_OPT='-g'
5659         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5660 fi
5661
5662 if test X"$CXX_G_OPT" = X"" ; then
5663         CXX_G_OPT='-g'
5664         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5665 fi
5666
5667 echo "$as_me:5667: checking for default loader flags" >&5
5668 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5669 case $DFT_LWR_MODEL in
5670 libtool) LD_MODEL=''   ;;
5671 normal)  LD_MODEL=''   ;;
5672 debug)   LD_MODEL=$CC_G_OPT ;;
5673 profile) LD_MODEL='-pg';;
5674 shared)  LD_MODEL=''   ;;
5675 esac
5676 echo "$as_me:5676: result: $LD_MODEL" >&5
5677 echo "${ECHO_T}$LD_MODEL" >&6
5678
5679 case $DFT_LWR_MODEL in
5680 shared)
5681
5682 echo "$as_me:5682: checking if rpath option should be used" >&5
5683 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5684
5685 # Check whether --enable-rpath or --disable-rpath was given.
5686 if test "${enable_rpath+set}" = set; then
5687   enableval="$enable_rpath"
5688   cf_cv_enable_rpath=$enableval
5689 else
5690   cf_cv_enable_rpath=no
5691 fi;
5692 echo "$as_me:5692: result: $cf_cv_enable_rpath" >&5
5693 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5694
5695 echo "$as_me:5695: checking if shared libraries should be relinked during install" >&5
5696 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5697
5698 # Check whether --enable-relink or --disable-relink was given.
5699 if test "${enable_relink+set}" = set; then
5700   enableval="$enable_relink"
5701   cf_cv_do_relink=$enableval
5702 else
5703   cf_cv_do_relink=yes
5704 fi;
5705 echo "$as_me:5705: result: $cf_cv_do_relink" >&5
5706 echo "${ECHO_T}$cf_cv_do_relink" >&6
5707         ;;
5708 esac
5709
5710 # we will build libraries one-level down.
5711 rel_builddir=..
5712
5713 LD_RPATH_OPT=
5714 echo "$as_me:5714: checking for an rpath option" >&5
5715 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5716 case $cf_cv_system_name in #(vi
5717 irix*) #(vi
5718         if test "$GCC" = yes; then
5719                 LD_RPATH_OPT="-Wl,-rpath,"
5720         else
5721                 LD_RPATH_OPT="-rpath "
5722         fi
5723         ;;
5724 linux*|gnu*|k*bsd*-gnu) #(vi
5725         LD_RPATH_OPT="-Wl,-rpath,"
5726         ;;
5727 openbsd[2-9].*|mirbsd*) #(vi
5728         LD_RPATH_OPT="-Wl,-rpath,"
5729         ;;
5730 dragonfly*|freebsd*) #(vi
5731         LD_RPATH_OPT="-rpath "
5732         ;;
5733 netbsd*) #(vi
5734         LD_RPATH_OPT="-Wl,-rpath,"
5735         ;;
5736 osf*|mls+*) #(vi
5737         LD_RPATH_OPT="-rpath "
5738         ;;
5739 solaris2*) #(vi
5740         LD_RPATH_OPT="-R"
5741         ;;
5742 *)
5743         ;;
5744 esac
5745 echo "$as_me:5745: result: $LD_RPATH_OPT" >&5
5746 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5747
5748 case "x$LD_RPATH_OPT" in #(vi
5749 x-R*)
5750         echo "$as_me:5750: checking if we need a space after rpath option" >&5
5751 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5752         cf_save_LIBS="$LIBS"
5753
5754 cf_add_libs="${LD_RPATH_OPT}$libdir"
5755 # Filter out duplicates - this happens with badly-designed ".pc" files...
5756 for cf_add_1lib in $LIBS
5757 do
5758         for cf_add_2lib in $cf_add_libs
5759         do
5760                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5761                 then
5762                         cf_add_1lib=
5763                         break
5764                 fi
5765         done
5766         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5767 done
5768 LIBS="$cf_add_libs"
5769
5770         cat >conftest.$ac_ext <<_ACEOF
5771 #line 5771 "configure"
5772 #include "confdefs.h"
5773
5774 int
5775 main ()
5776 {
5777
5778   ;
5779   return 0;
5780 }
5781 _ACEOF
5782 rm -f conftest.$ac_objext conftest$ac_exeext
5783 if { (eval echo "$as_me:5783: \"$ac_link\"") >&5
5784   (eval $ac_link) 2>&5
5785   ac_status=$?
5786   echo "$as_me:5786: \$? = $ac_status" >&5
5787   (exit $ac_status); } &&
5788          { ac_try='test -s conftest$ac_exeext'
5789   { (eval echo "$as_me:5789: \"$ac_try\"") >&5
5790   (eval $ac_try) 2>&5
5791   ac_status=$?
5792   echo "$as_me:5792: \$? = $ac_status" >&5
5793   (exit $ac_status); }; }; then
5794   cf_rpath_space=no
5795 else
5796   echo "$as_me: failed program was:" >&5
5797 cat conftest.$ac_ext >&5
5798 cf_rpath_space=yes
5799 fi
5800 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5801         LIBS="$cf_save_LIBS"
5802         echo "$as_me:5802: result: $cf_rpath_space" >&5
5803 echo "${ECHO_T}$cf_rpath_space" >&6
5804         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5805         ;;
5806 esac
5807
5808         RM_SHARED_OPTS=
5809         LOCAL_LDFLAGS=
5810         LOCAL_LDFLAGS2=
5811         LD_SHARED_OPTS=
5812         INSTALL_LIB="-m 644"
5813         : ${rel_builddir:=.}
5814
5815         shlibdir=$libdir
5816
5817         MAKE_DLLS="#"
5818
5819         cf_cv_do_symlinks=no
5820         cf_ld_rpath_opt=
5821         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5822
5823         echo "$as_me:5823: checking if release/abi version should be used for shared libs" >&5
5824 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5825
5826 # Check whether --with-shlib-version or --without-shlib-version was given.
5827 if test "${with_shlib_version+set}" = set; then
5828   withval="$with_shlib_version"
5829   test -z "$withval" && withval=auto
5830         case $withval in #(vi
5831         yes) #(vi
5832                 cf_cv_shlib_version=auto
5833                 ;;
5834         rel|abi|auto|no) #(vi
5835                 cf_cv_shlib_version=$withval
5836                 ;;
5837         *)
5838                 { { echo "$as_me:5838: error: option value must be one of: rel, abi, auto or no" >&5
5839 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5840    { (exit 1); exit 1; }; }
5841                 ;;
5842         esac
5843
5844 else
5845   cf_cv_shlib_version=auto
5846 fi;
5847         echo "$as_me:5847: result: $cf_cv_shlib_version" >&5
5848 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5849
5850         cf_cv_rm_so_locs=no
5851         cf_try_cflags=
5852
5853         # Some less-capable ports of gcc support only -fpic
5854         CC_SHARED_OPTS=
5855         if test "$GCC" = yes
5856         then
5857                 echo "$as_me:5857: checking which $CC option to use" >&5
5858 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5859                 cf_save_CFLAGS="$CFLAGS"
5860                 for CC_SHARED_OPTS in -fPIC -fpic ''
5861                 do
5862                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5863                         cat >conftest.$ac_ext <<_ACEOF
5864 #line 5864 "configure"
5865 #include "confdefs.h"
5866 #include <stdio.h>
5867 int
5868 main ()
5869 {
5870 int x = 1
5871   ;
5872   return 0;
5873 }
5874 _ACEOF
5875 rm -f conftest.$ac_objext
5876 if { (eval echo "$as_me:5876: \"$ac_compile\"") >&5
5877   (eval $ac_compile) 2>&5
5878   ac_status=$?
5879   echo "$as_me:5879: \$? = $ac_status" >&5
5880   (exit $ac_status); } &&
5881          { ac_try='test -s conftest.$ac_objext'
5882   { (eval echo "$as_me:5882: \"$ac_try\"") >&5
5883   (eval $ac_try) 2>&5
5884   ac_status=$?
5885   echo "$as_me:5885: \$? = $ac_status" >&5
5886   (exit $ac_status); }; }; then
5887   break
5888 else
5889   echo "$as_me: failed program was:" >&5
5890 cat conftest.$ac_ext >&5
5891 fi
5892 rm -f conftest.$ac_objext conftest.$ac_ext
5893                 done
5894                 echo "$as_me:5894: result: $CC_SHARED_OPTS" >&5
5895 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5896                 CFLAGS="$cf_save_CFLAGS"
5897         fi
5898
5899         cf_cv_shlib_version_infix=no
5900
5901         case $cf_cv_system_name in #(vi
5902         aix4.3-9*|aix[5-7]*) #(vi
5903                 if test "$GCC" = yes; then
5904                         CC_SHARED_OPTS=
5905                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5906                 else
5907                         # CC_SHARED_OPTS='-qpic=large -G'
5908                         # perhaps "-bM:SRE -bnoentry -bexpall"
5909                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5910                 fi
5911                 ;;
5912         beos*) #(vi
5913                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5914                 ;;
5915         cygwin*) #(vi
5916                 CC_SHARED_OPTS=
5917                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5918                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5919                 cf_cv_shlib_version=cygdll
5920                 cf_cv_shlib_version_infix=cygdll
5921                 shlibdir=$bindir
5922                 MAKE_DLLS=
5923                 cat >mk_shared_lib.sh <<-CF_EOF
5924                 #!/bin/sh
5925                 SHARED_LIB=\$1
5926                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5927                 shift
5928                 cat <<-EOF
5929                 Linking shared library
5930                 ** SHARED_LIB \$SHARED_LIB
5931                 ** IMPORT_LIB \$IMPORT_LIB
5932 EOF
5933                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5934 CF_EOF
5935                 chmod +x mk_shared_lib.sh
5936                 ;;
5937         msys*) #(vi
5938                 CC_SHARED_OPTS=
5939                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5940                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5941                 cf_cv_shlib_version=msysdll
5942                 cf_cv_shlib_version_infix=msysdll
5943                 shlibdir=$bindir
5944                 MAKE_DLLS=
5945                 cat >mk_shared_lib.sh <<-CF_EOF
5946                 #!/bin/sh
5947                 SHARED_LIB=\$1
5948                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5949                 shift
5950                 cat <<-EOF
5951                 Linking shared library
5952                 ** SHARED_LIB \$SHARED_LIB
5953                 ** IMPORT_LIB \$IMPORT_LIB
5954 EOF
5955                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5956 CF_EOF
5957                 chmod +x mk_shared_lib.sh
5958                 ;;
5959         darwin*) #(vi
5960                 cf_try_cflags="no-cpp-precomp"
5961                 CC_SHARED_OPTS="-dynamic"
5962                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5963                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5964                 cf_cv_shlib_version_infix=yes
5965                 echo "$as_me:5965: checking if ld -search_paths_first works" >&5
5966 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5967 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5968   echo $ECHO_N "(cached) $ECHO_C" >&6
5969 else
5970
5971                         cf_save_LDFLAGS=$LDFLAGS
5972                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5973                         cat >conftest.$ac_ext <<_ACEOF
5974 #line 5974 "configure"
5975 #include "confdefs.h"
5976
5977 int
5978 main ()
5979 {
5980 int i;
5981   ;
5982   return 0;
5983 }
5984 _ACEOF
5985 rm -f conftest.$ac_objext conftest$ac_exeext
5986 if { (eval echo "$as_me:5986: \"$ac_link\"") >&5
5987   (eval $ac_link) 2>&5
5988   ac_status=$?
5989   echo "$as_me:5989: \$? = $ac_status" >&5
5990   (exit $ac_status); } &&
5991          { ac_try='test -s conftest$ac_exeext'
5992   { (eval echo "$as_me:5992: \"$ac_try\"") >&5
5993   (eval $ac_try) 2>&5
5994   ac_status=$?
5995   echo "$as_me:5995: \$? = $ac_status" >&5
5996   (exit $ac_status); }; }; then
5997   cf_cv_ldflags_search_paths_first=yes
5998 else
5999   echo "$as_me: failed program was:" >&5
6000 cat conftest.$ac_ext >&5
6001 cf_cv_ldflags_search_paths_first=no
6002 fi
6003 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6004                                 LDFLAGS=$cf_save_LDFLAGS
6005 fi
6006 echo "$as_me:6006: result: $cf_cv_ldflags_search_paths_first" >&5
6007 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6008                 if test $cf_cv_ldflags_search_paths_first = yes; then
6009                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6010                 fi
6011                 ;;
6012         hpux[7-8]*) #(vi
6013                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6014                 if test "$GCC" != yes; then
6015                         CC_SHARED_OPTS='+Z'
6016                 fi
6017                 MK_SHARED_LIB='${LD} -b -o $@'
6018                 INSTALL_LIB="-m 555"
6019                 ;;
6020         hpux*) #(vi
6021                 # (tested with gcc 2.7.2 -- I don't have c89)
6022                 if test "$GCC" = yes; then
6023                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6024                 else
6025                         CC_SHARED_OPTS='+Z'
6026                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6027                 fi
6028                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6029                 # HP-UX shared libraries must be executable, and should be
6030                 # readonly to exploit a quirk in the memory manager.
6031                 INSTALL_LIB="-m 555"
6032                 ;;
6033         interix*)
6034                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6035                 if test "$cf_cv_shlib_version" = rel; then
6036                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6037                 else
6038                         cf_shared_soname='`basename `'
6039                 fi
6040                 CC_SHARED_OPTS=
6041                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6042                 ;;
6043         irix*) #(vi
6044                 if test "$cf_cv_enable_rpath" = yes ; then
6045                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6046                 fi
6047                 # tested with IRIX 5.2 and 'cc'.
6048                 if test "$GCC" != yes; then
6049                         CC_SHARED_OPTS='-KPIC'
6050                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6051                 else
6052                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6053                 fi
6054                 cf_cv_rm_so_locs=yes
6055                 ;;
6056         linux*|gnu*|k*bsd*-gnu) #(vi
6057                 if test "$DFT_LWR_MODEL" = "shared" ; then
6058                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6059                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6060                 fi
6061                 if test "$cf_cv_enable_rpath" = yes ; then
6062                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6063                 fi
6064
6065         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6066         if test "$cf_cv_shlib_version" = rel; then
6067                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6068         else
6069                 cf_cv_shared_soname='`basename $@`'
6070         fi
6071
6072                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6073                 ;;
6074         mingw*) #(vi
6075                 cf_cv_shlib_version=mingw
6076                 cf_cv_shlib_version_infix=mingw
6077                 shlibdir=$bindir
6078                 MAKE_DLLS=
6079                 if test "$DFT_LWR_MODEL" = "shared" ; then
6080                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6081                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6082                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6083                 fi
6084                 CC_SHARED_OPTS=
6085                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6086                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6087                 cat >mk_shared_lib.sh <<-CF_EOF
6088                 #!/bin/sh
6089                 SHARED_LIB=\$1
6090                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6091                 shift
6092                 cat <<-EOF
6093                 Linking shared library
6094                 ** SHARED_LIB \$SHARED_LIB
6095                 ** IMPORT_LIB \$IMPORT_LIB
6096 EOF
6097                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6098 CF_EOF
6099                 chmod +x mk_shared_lib.sh
6100                 ;;
6101         openbsd[2-9].*|mirbsd*) #(vi
6102                 if test "$DFT_LWR_MODEL" = "shared" ; then
6103                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6104                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6105                 fi
6106                 if test "$cf_cv_enable_rpath" = yes ; then
6107                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6108                 fi
6109                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6110
6111         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6112         if test "$cf_cv_shlib_version" = rel; then
6113                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6114         else
6115                 cf_cv_shared_soname='`basename $@`'
6116         fi
6117
6118                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6119                 ;;
6120         nto-qnx*|openbsd*|freebsd[12].*) #(vi
6121                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6122                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6123                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6124                 ;;
6125         dragonfly*|freebsd*) #(vi
6126                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6127                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6128                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6129                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6130                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6131                 fi
6132
6133         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6134         if test "$cf_cv_shlib_version" = rel; then
6135                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6136         else
6137                 cf_cv_shared_soname='`basename $@`'
6138         fi
6139
6140                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
6141                 ;;
6142         netbsd*) #(vi
6143                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6144                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6145                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6146                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6147                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6148                         if test "$cf_cv_shlib_version" = auto; then
6149                         if test -f /usr/libexec/ld.elf_so; then
6150                                 cf_cv_shlib_version=abi
6151                         else
6152                                 cf_cv_shlib_version=rel
6153                         fi
6154                         fi
6155
6156         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6157         if test "$cf_cv_shlib_version" = rel; then
6158                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6159         else
6160                 cf_cv_shared_soname='`basename $@`'
6161         fi
6162
6163                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6164                 else
6165                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6166                 fi
6167                 ;;
6168         osf*|mls+*) #(vi
6169                 # tested with OSF/1 V3.2 and 'cc'
6170                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6171                 # link with shared libs).
6172                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6173                 case $host_os in #(vi
6174                 osf4*)
6175                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6176                         ;;
6177                 esac
6178                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6179                 if test "$DFT_LWR_MODEL" = "shared" ; then
6180                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6181                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6182                 fi
6183                 cf_cv_rm_so_locs=yes
6184                 ;;
6185         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
6186                 # tested with osr5.0.5
6187                 if test "$GCC" != yes; then
6188                         CC_SHARED_OPTS='-belf -KPIC'
6189                 fi
6190                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6191                 if test "$cf_cv_enable_rpath" = yes ; then
6192                         # only way is to set LD_RUN_PATH but no switch for it
6193                         RUN_PATH=$libdir
6194                 fi
6195                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6196                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6197                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6198                 ;;
6199         sunos4*) #(vi
6200                 # tested with SunOS 4.1.1 and gcc 2.7.0
6201                 if test "$GCC" != yes; then
6202                         CC_SHARED_OPTS='-KPIC'
6203                 fi
6204                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6205                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6206                 ;;
6207         solaris2*) #(vi
6208                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6209                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6210                 if test "$DFT_LWR_MODEL" = "shared" ; then
6211                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6212                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6213                 fi
6214                 if test "$cf_cv_enable_rpath" = yes ; then
6215                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6216                 fi
6217
6218         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6219         if test "$cf_cv_shlib_version" = rel; then
6220                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6221         else
6222                 cf_cv_shared_soname='`basename $@`'
6223         fi
6224
6225                 if test "$GCC" != yes; then
6226                         cf_save_CFLAGS="$CFLAGS"
6227                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6228                         do
6229                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6230                                 cat >conftest.$ac_ext <<_ACEOF
6231 #line 6231 "configure"
6232 #include "confdefs.h"
6233 #include <stdio.h>
6234 int
6235 main ()
6236 {
6237 printf("Hello\n");
6238   ;
6239   return 0;
6240 }
6241 _ACEOF
6242 rm -f conftest.$ac_objext
6243 if { (eval echo "$as_me:6243: \"$ac_compile\"") >&5
6244   (eval $ac_compile) 2>&5
6245   ac_status=$?
6246   echo "$as_me:6246: \$? = $ac_status" >&5
6247   (exit $ac_status); } &&
6248          { ac_try='test -s conftest.$ac_objext'
6249   { (eval echo "$as_me:6249: \"$ac_try\"") >&5
6250   (eval $ac_try) 2>&5
6251   ac_status=$?
6252   echo "$as_me:6252: \$? = $ac_status" >&5
6253   (exit $ac_status); }; }; then
6254   break
6255 else
6256   echo "$as_me: failed program was:" >&5
6257 cat conftest.$ac_ext >&5
6258 fi
6259 rm -f conftest.$ac_objext conftest.$ac_ext
6260                         done
6261                         CFLAGS="$cf_save_CFLAGS"
6262                         CC_SHARED_OPTS=$cf_shared_opts
6263                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6264                 else
6265                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6266                 fi
6267                 ;;
6268         sysv5uw7*|unix_sv*) #(vi
6269                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6270                 if test "$GCC" != yes; then
6271                         CC_SHARED_OPTS='-KPIC'
6272                 fi
6273                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6274                 ;;
6275         *)
6276                 CC_SHARED_OPTS='unknown'
6277                 MK_SHARED_LIB='echo unknown'
6278                 ;;
6279         esac
6280
6281         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6282         case "$cf_cv_shlib_version" in #(vi
6283         rel|abi)
6284                 case "$MK_SHARED_LIB" in #(vi
6285                 *'-o $@') #(vi
6286                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6287                         ;;
6288                 *)
6289                         { echo "$as_me:6289: WARNING: ignored --with-shlib-version" >&5
6290 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6291                         ;;
6292                 esac
6293                 ;;
6294         esac
6295
6296         if test -n "$cf_try_cflags"
6297         then
6298 cat > conftest.$ac_ext <<EOF
6299 #line 6299 "${as_me:-configure}"
6300 #include <stdio.h>
6301 int main(int argc, char *argv[])
6302 {
6303         printf("hello\n");
6304         return (argv[argc-1] == 0) ;
6305 }
6306 EOF
6307                 cf_save_CFLAGS="$CFLAGS"
6308                 for cf_opt in $cf_try_cflags
6309                 do
6310                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6311                         echo "$as_me:6311: checking if CFLAGS option -$cf_opt works" >&5
6312 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6313                         if { (eval echo "$as_me:6313: \"$ac_compile\"") >&5
6314   (eval $ac_compile) 2>&5
6315   ac_status=$?
6316   echo "$as_me:6316: \$? = $ac_status" >&5
6317   (exit $ac_status); }; then
6318                                 echo "$as_me:6318: result: yes" >&5
6319 echo "${ECHO_T}yes" >&6
6320                                 cf_save_CFLAGS="$CFLAGS"
6321                         else
6322                                 echo "$as_me:6322: result: no" >&5
6323 echo "${ECHO_T}no" >&6
6324                         fi
6325                 done
6326                 CFLAGS="$cf_save_CFLAGS"
6327         fi
6328
6329         # RPATH_LIST is a colon-separated list of directories
6330         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6331         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6332
6333         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6334
6335         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6336
6337 echo "${as_me:-configure}:6337: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6338
6339         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6340
6341 echo "${as_me:-configure}:6341: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6342
6343 for model in $cf_list_models; do
6344         case $model in #(vi
6345         libtool)
6346
6347 echo "$as_me:6347: checking for additional libtool options" >&5
6348 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6349
6350 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6351 if test "${with_libtool_opts+set}" = set; then
6352   withval="$with_libtool_opts"
6353   with_libtool_opts=$withval
6354 else
6355   with_libtool_opts=no
6356 fi;
6357 echo "$as_me:6357: result: $with_libtool_opts" >&5
6358 echo "${ECHO_T}$with_libtool_opts" >&6
6359
6360 case .$with_libtool_opts in
6361 .yes|.no|.)
6362         ;;
6363 *)
6364         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6365         ;;
6366 esac
6367
6368 echo "$as_me:6368: checking if exported-symbols file should be used" >&5
6369 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6370
6371 # Check whether --with-export-syms or --without-export-syms was given.
6372 if test "${with_export_syms+set}" = set; then
6373   withval="$with_export_syms"
6374   with_export_syms=$withval
6375 else
6376   with_export_syms=no
6377 fi;
6378 if test "x$with_export_syms" = xyes
6379 then
6380         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6381
6382 fi
6383 echo "$as_me:6383: result: $with_export_syms" >&5
6384 echo "${ECHO_T}$with_export_syms" >&6
6385 if test "x$with_export_syms" != xno
6386 then
6387         EXPORT_SYMS="$EXPORT_SYMS -export-symbols $with_export_syms"
6388
6389 fi
6390
6391                 ;;
6392         shared) #(vi
6393                 if test "$CC_SHARED_OPTS" = "unknown"; then
6394                         { { echo "$as_me:6394: error: Shared libraries are not supported in this version" >&5
6395 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6396    { (exit 1); exit 1; }; }
6397                 fi
6398
6399 echo "$as_me:6399: checking if versioned-symbols file should be used" >&5
6400 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6401
6402 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6403 if test "${with_versioned_syms+set}" = set; then
6404   withval="$with_versioned_syms"
6405   with_versioned_syms=$withval
6406 else
6407   with_versioned_syms=no
6408 fi;
6409 if test "x$with_versioned_syms" = xyes
6410 then
6411         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6412
6413 fi
6414 echo "$as_me:6414: result: $with_versioned_syms" >&5
6415 echo "${ECHO_T}$with_versioned_syms" >&6
6416
6417 if test "x$with_versioned_syms" != xno
6418 then
6419
6420         case "x$MK_SHARED_LIB" in
6421         *-Wl,*) #(vi
6422                 VERSIONED_SYMS="-Wl,--version-script,$with_versioned_syms"
6423                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6424                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6425
6426 echo "${as_me:-configure}:6426: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6427
6428                 ;;
6429         *-dy*) #(vi
6430                 VERSIONED_SYMS="-Wl,-M,$with_versioned_syms"
6431                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6432                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6433
6434 echo "${as_me:-configure}:6434: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6435
6436                 ;;
6437         *)
6438                 { echo "$as_me:6438: WARNING: this system does not support versioned-symbols" >&5
6439 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6440                 ;;
6441         esac
6442 fi
6443
6444                 ;;
6445         esac
6446 done
6447
6448 # pretend that ncurses==ncursesw==ncursest
6449 echo "$as_me:6449: checking if you want to disable library suffixes" >&5
6450 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6451
6452 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6453 if test "${enable_lib_suffixes+set}" = set; then
6454   enableval="$enable_lib_suffixes"
6455   disable_lib_suffixes=$enableval
6456 else
6457   disable_lib_suffixes=no
6458 fi;
6459 echo "$as_me:6459: result: $disable_lib_suffixes" >&5
6460 echo "${ECHO_T}$disable_lib_suffixes" >&6
6461
6462 ### If we're building with rpath, try to link non-standard libs that way too.
6463 if test "$DFT_LWR_MODEL" = "shared"; then
6464
6465 echo "$as_me:6465: checking if rpath-hack should be disabled" >&5
6466 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6467
6468 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6469 if test "${enable_rpath_hack+set}" = set; then
6470   enableval="$enable_rpath_hack"
6471   test "$enableval" != no && enableval=yes
6472   if test "$enableval" != "yes" ; then
6473     cf_disable_rpath_hack=yes
6474   else
6475     cf_disable_rpath_hack=no
6476   fi
6477 else
6478   enableval=yes
6479   cf_disable_rpath_hack=no
6480
6481 fi;
6482 echo "$as_me:6482: result: $cf_disable_rpath_hack" >&5
6483 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6484 if test "$cf_disable_rpath_hack" = no ; then
6485
6486 echo "$as_me:6486: checking for updated LDFLAGS" >&5
6487 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6488 if test -n "$LD_RPATH_OPT" ; then
6489         echo "$as_me:6489: result: maybe" >&5
6490 echo "${ECHO_T}maybe" >&6
6491
6492         for ac_prog in ldd
6493 do
6494   # Extract the first word of "$ac_prog", so it can be a program name with args.
6495 set dummy $ac_prog; ac_word=$2
6496 echo "$as_me:6496: checking for $ac_word" >&5
6497 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6498 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6499   echo $ECHO_N "(cached) $ECHO_C" >&6
6500 else
6501   if test -n "$cf_ldd_prog"; then
6502   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6503 else
6504   ac_save_IFS=$IFS; IFS=$ac_path_separator
6505 ac_dummy="$PATH"
6506 for ac_dir in $ac_dummy; do
6507   IFS=$ac_save_IFS
6508   test -z "$ac_dir" && ac_dir=.
6509   $as_executable_p "$ac_dir/$ac_word" || continue
6510 ac_cv_prog_cf_ldd_prog="$ac_prog"
6511 echo "$as_me:6511: found $ac_dir/$ac_word" >&5
6512 break
6513 done
6514
6515 fi
6516 fi
6517 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6518 if test -n "$cf_ldd_prog"; then
6519   echo "$as_me:6519: result: $cf_ldd_prog" >&5
6520 echo "${ECHO_T}$cf_ldd_prog" >&6
6521 else
6522   echo "$as_me:6522: result: no" >&5
6523 echo "${ECHO_T}no" >&6
6524 fi
6525
6526   test -n "$cf_ldd_prog" && break
6527 done
6528 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6529
6530         cf_rpath_list="/usr/lib /lib"
6531         if test "$cf_ldd_prog" != no
6532         then
6533                 cf_rpath_oops=
6534
6535 cat >conftest.$ac_ext <<_ACEOF
6536 #line 6536 "configure"
6537 #include "confdefs.h"
6538 #include <stdio.h>
6539 int
6540 main ()
6541 {
6542 printf("Hello");
6543   ;
6544   return 0;
6545 }
6546 _ACEOF
6547 rm -f conftest.$ac_objext conftest$ac_exeext
6548 if { (eval echo "$as_me:6548: \"$ac_link\"") >&5
6549   (eval $ac_link) 2>&5
6550   ac_status=$?
6551   echo "$as_me:6551: \$? = $ac_status" >&5
6552   (exit $ac_status); } &&
6553          { ac_try='test -s conftest$ac_exeext'
6554   { (eval echo "$as_me:6554: \"$ac_try\"") >&5
6555   (eval $ac_try) 2>&5
6556   ac_status=$?
6557   echo "$as_me:6557: \$? = $ac_status" >&5
6558   (exit $ac_status); }; }; then
6559   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6560                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6561 else
6562   echo "$as_me: failed program was:" >&5
6563 cat conftest.$ac_ext >&5
6564 fi
6565 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6566
6567                 # If we passed the link-test, but get a "not found" on a given library,
6568                 # this could be due to inept reconfiguration of gcc to make it only
6569                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6570                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6571                 # /usr/local libraries.
6572                 if test -n "$cf_rpath_oops"
6573                 then
6574                         for cf_rpath_src in $cf_rpath_oops
6575                         do
6576                                 for cf_rpath_dir in \
6577                                         /usr/local \
6578                                         /usr/pkg \
6579                                         /opt/sfw
6580                                 do
6581                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6582                                         then
6583                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6584
6585 echo "${as_me:-configure}:6585: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6586
6587                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6588                                                 break
6589                                         fi
6590                                 done
6591                         done
6592                 fi
6593         fi
6594
6595         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6596
6597 echo "${as_me:-configure}:6597: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6598
6599 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6600
6601 echo "${as_me:-configure}:6601: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6602
6603 cf_rpath_dst=
6604 for cf_rpath_src in $LDFLAGS
6605 do
6606         case $cf_rpath_src in #(vi
6607         -L*) #(vi
6608
6609                 # check if this refers to a directory which we will ignore
6610                 cf_rpath_skip=no
6611                 if test -n "$cf_rpath_list"
6612                 then
6613                         for cf_rpath_item in $cf_rpath_list
6614                         do
6615                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6616                                 then
6617                                         cf_rpath_skip=yes
6618                                         break
6619                                 fi
6620                         done
6621                 fi
6622
6623                 if test "$cf_rpath_skip" = no
6624                 then
6625                         # transform the option
6626                         if test "$LD_RPATH_OPT" = "-R " ; then
6627                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6628                         else
6629                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6630                         fi
6631
6632                         # if we have not already added this, add it now
6633                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6634                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6635                         then
6636                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6637
6638 echo "${as_me:-configure}:6638: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6639
6640                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6641                         fi
6642                 fi
6643                 ;;
6644         esac
6645         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6646 done
6647 LDFLAGS=$cf_rpath_dst
6648
6649 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6650
6651 echo "${as_me:-configure}:6651: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6652
6653 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6654
6655 echo "${as_me:-configure}:6655: testing ...checking LIBS $LIBS ..." 1>&5
6656
6657 cf_rpath_dst=
6658 for cf_rpath_src in $LIBS
6659 do
6660         case $cf_rpath_src in #(vi
6661         -L*) #(vi
6662
6663                 # check if this refers to a directory which we will ignore
6664                 cf_rpath_skip=no
6665                 if test -n "$cf_rpath_list"
6666                 then
6667                         for cf_rpath_item in $cf_rpath_list
6668                         do
6669                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6670                                 then
6671                                         cf_rpath_skip=yes
6672                                         break
6673                                 fi
6674                         done
6675                 fi
6676
6677                 if test "$cf_rpath_skip" = no
6678                 then
6679                         # transform the option
6680                         if test "$LD_RPATH_OPT" = "-R " ; then
6681                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6682                         else
6683                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6684                         fi
6685
6686                         # if we have not already added this, add it now
6687                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6688                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6689                         then
6690                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6691
6692 echo "${as_me:-configure}:6692: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6693
6694                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6695                         fi
6696                 fi
6697                 ;;
6698         esac
6699         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6700 done
6701 LIBS=$cf_rpath_dst
6702
6703 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6704
6705 echo "${as_me:-configure}:6705: testing ...checked LIBS $LIBS ..." 1>&5
6706
6707         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6708
6709 echo "${as_me:-configure}:6709: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6710
6711 else
6712         echo "$as_me:6712: result: no" >&5
6713 echo "${ECHO_T}no" >&6
6714 fi
6715
6716 fi
6717
6718 fi
6719
6720 ###############################################################################
6721
6722 ###     use option --disable-overwrite to leave out the link to -lcurses
6723 echo "$as_me:6723: checking if you wish to install ncurses overwriting curses" >&5
6724 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6725
6726 # Check whether --enable-overwrite or --disable-overwrite was given.
6727 if test "${enable_overwrite+set}" = set; then
6728   enableval="$enable_overwrite"
6729   with_overwrite=$enableval
6730 else
6731   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6732 fi;
6733 echo "$as_me:6733: result: $with_overwrite" >&5
6734 echo "${ECHO_T}$with_overwrite" >&6
6735
6736 echo "$as_me:6736: checking if external terminfo-database is used" >&5
6737 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6738
6739 # Check whether --enable-database or --disable-database was given.
6740 if test "${enable_database+set}" = set; then
6741   enableval="$enable_database"
6742   use_database=$enableval
6743 else
6744   use_database=yes
6745 fi;
6746 echo "$as_me:6746: result: $use_database" >&5
6747 echo "${ECHO_T}$use_database" >&6
6748
6749 case $host_os in #(vi
6750 os2*) #(vi
6751         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6752         ;;
6753 *) #(vi
6754         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6755         ;;
6756 esac
6757
6758 NCURSES_USE_DATABASE=0
6759 if test "$use_database" != no ; then
6760         NCURSES_USE_DATABASE=1
6761
6762         echo "$as_me:6762: checking which terminfo source-file will be installed" >&5
6763 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6764
6765 # Check whether --with-database or --without-database was given.
6766 if test "${with_database+set}" = set; then
6767   withval="$with_database"
6768   TERMINFO_SRC=$withval
6769 fi;
6770         echo "$as_me:6770: result: $TERMINFO_SRC" >&5
6771 echo "${ECHO_T}$TERMINFO_SRC" >&6
6772
6773         echo "$as_me:6773: checking whether to use hashed database instead of directory/tree" >&5
6774 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6775
6776 # Check whether --with-hashed-db or --without-hashed-db was given.
6777 if test "${with_hashed_db+set}" = set; then
6778   withval="$with_hashed_db"
6779
6780 else
6781   with_hashed_db=no
6782 fi;
6783         echo "$as_me:6783: result: $with_hashed_db" >&5
6784 echo "${ECHO_T}$with_hashed_db" >&6
6785 else
6786         with_hashed_db=no
6787 fi
6788
6789 echo "$as_me:6789: checking for list of fallback descriptions" >&5
6790 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6791
6792 # Check whether --with-fallbacks or --without-fallbacks was given.
6793 if test "${with_fallbacks+set}" = set; then
6794   withval="$with_fallbacks"
6795   with_fallback=$withval
6796 else
6797   with_fallback=
6798 fi;
6799 echo "$as_me:6799: result: $with_fallback" >&5
6800 echo "${ECHO_T}$with_fallback" >&6
6801 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6802
6803 echo "$as_me:6803: checking if you want modern xterm or antique" >&5
6804 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6805
6806 # Check whether --with-xterm-new or --without-xterm-new was given.
6807 if test "${with_xterm_new+set}" = set; then
6808   withval="$with_xterm_new"
6809   with_xterm_new=$withval
6810 else
6811   with_xterm_new=yes
6812 fi;
6813 case $with_xterm_new in
6814 no)     with_xterm_new=xterm-old;;
6815 *)      with_xterm_new=xterm-new;;
6816 esac
6817 echo "$as_me:6817: result: $with_xterm_new" >&5
6818 echo "${ECHO_T}$with_xterm_new" >&6
6819 WHICH_XTERM=$with_xterm_new
6820
6821 echo "$as_me:6821: checking if xterm backspace sends BS or DEL" >&5
6822 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6823
6824 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6825 if test "${with_xterm_kbs+set}" = set; then
6826   withval="$with_xterm_kbs"
6827   with_xterm_kbs=$withval
6828 else
6829   with_xterm_kbs=BS
6830 fi;
6831 case x$with_xterm_kbs in
6832 xyes|xno|xBS|xbs|x8)
6833         with_xterm_kbs=BS
6834         ;;
6835 xDEL|xdel|x127)
6836         with_xterm_kbs=DEL
6837         ;;
6838 *)
6839         with_xterm_kbs=$withval
6840         ;;
6841 esac
6842 echo "$as_me:6842: result: $with_xterm_kbs" >&5
6843 echo "${ECHO_T}$with_xterm_kbs" >&6
6844 XTERM_KBS=$with_xterm_kbs
6845
6846 MAKE_TERMINFO=
6847 if test "$use_database" = no ; then
6848         TERMINFO="${datadir}/terminfo"
6849         MAKE_TERMINFO="#"
6850 else
6851
6852 echo "$as_me:6852: checking for list of terminfo directories" >&5
6853 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6854
6855 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6856 if test "${with_terminfo_dirs+set}" = set; then
6857   withval="$with_terminfo_dirs"
6858
6859 else
6860   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6861 fi;
6862 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6863 cf_dst_path=
6864 for cf_src_path in $withval
6865 do
6866
6867 if test "x$prefix" != xNONE; then
6868   cf_path_syntax="$prefix"
6869 else
6870   cf_path_syntax="$ac_default_prefix"
6871 fi
6872
6873 case ".$cf_src_path" in #(vi
6874 .\$\(*\)*|.\'*\'*) #(vi
6875   ;;
6876 ..|./*|.\\*) #(vi
6877   ;;
6878 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6879   ;;
6880 .\${*prefix}*|.\${*dir}*) #(vi
6881   eval cf_src_path="$cf_src_path"
6882   case ".$cf_src_path" in #(vi
6883   .NONE/*)
6884     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6885     ;;
6886   esac
6887   ;; #(vi
6888 .no|.NONE/*)
6889   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6890   ;;
6891 *)
6892   { { echo "$as_me:6892: error: expected a pathname, not \"$cf_src_path\"" >&5
6893 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6894    { (exit 1); exit 1; }; }
6895   ;;
6896 esac
6897
6898   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6899   cf_dst_path="${cf_dst_path}${cf_src_path}"
6900 done
6901 IFS="$ac_save_ifs"
6902
6903 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6904 # so we have to check/work around.  We do prefer the result of "eval"...
6905 eval cf_dst_eval="$cf_dst_path"
6906 case "x$cf_dst_eval" in #(vi
6907 xNONE*) #(vi
6908         TERMINFO_DIRS=$cf_dst_path
6909         ;;
6910 *)
6911         TERMINFO_DIRS="$cf_dst_eval"
6912         ;;
6913 esac
6914
6915 echo "$as_me:6915: result: $TERMINFO_DIRS" >&5
6916 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6917 test -n "$TERMINFO_DIRS" &&
6918 cat >>confdefs.h <<EOF
6919 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6920 EOF
6921
6922 echo "$as_me:6922: checking for default terminfo directory" >&5
6923 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6924
6925 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6926 if test "${with_default_terminfo_dir+set}" = set; then
6927   withval="$with_default_terminfo_dir"
6928
6929 else
6930   withval="${TERMINFO:-${datadir}/terminfo}"
6931 fi; if test -n "${datadir}/terminfo" ; then
6932
6933 if test "x$prefix" != xNONE; then
6934   cf_path_syntax="$prefix"
6935 else
6936   cf_path_syntax="$ac_default_prefix"
6937 fi
6938
6939 case ".$withval" in #(vi
6940 .\$\(*\)*|.\'*\'*) #(vi
6941   ;;
6942 ..|./*|.\\*) #(vi
6943   ;;
6944 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6945   ;;
6946 .\${*prefix}*|.\${*dir}*) #(vi
6947   eval withval="$withval"
6948   case ".$withval" in #(vi
6949   .NONE/*)
6950     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6951     ;;
6952   esac
6953   ;; #(vi
6954 .no|.NONE/*)
6955   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6956   ;;
6957 *)
6958   { { echo "$as_me:6958: error: expected a pathname, not \"$withval\"" >&5
6959 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6960    { (exit 1); exit 1; }; }
6961   ;;
6962 esac
6963
6964 fi
6965 eval TERMINFO="$withval"
6966
6967 echo "$as_me:6967: result: $TERMINFO" >&5
6968 echo "${ECHO_T}$TERMINFO" >&6
6969
6970 cat >>confdefs.h <<EOF
6971 #define TERMINFO "$TERMINFO"
6972 EOF
6973
6974 fi
6975
6976 ###     use option --disable-big-core to make tic run on small machines
6977 ###     We need 4Mb, check if we can allocate 50% more than that.
6978 echo "$as_me:6978: checking if big-core option selected" >&5
6979 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6980
6981 # Check whether --enable-big-core or --disable-big-core was given.
6982 if test "${enable_big_core+set}" = set; then
6983   enableval="$enable_big_core"
6984   with_big_core=$enableval
6985 else
6986   if test "$cross_compiling" = yes; then
6987   with_big_core=no
6988 else
6989   cat >conftest.$ac_ext <<_ACEOF
6990 #line 6990 "configure"
6991 #include "confdefs.h"
6992
6993 #include <stdlib.h>
6994 #include <string.h>
6995 int main() {
6996         unsigned long n = 6000000L;
6997         char *s = malloc(n);
6998         if (s != 0)
6999                 s[0] = s[n-1] = 0;
7000         ${cf_cv_main_return:-return}(s == 0);
7001 }
7002 _ACEOF
7003 rm -f conftest$ac_exeext
7004 if { (eval echo "$as_me:7004: \"$ac_link\"") >&5
7005   (eval $ac_link) 2>&5
7006   ac_status=$?
7007   echo "$as_me:7007: \$? = $ac_status" >&5
7008   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7009   { (eval echo "$as_me:7009: \"$ac_try\"") >&5
7010   (eval $ac_try) 2>&5
7011   ac_status=$?
7012   echo "$as_me:7012: \$? = $ac_status" >&5
7013   (exit $ac_status); }; }; then
7014   with_big_core=yes
7015 else
7016   echo "$as_me: program exited with status $ac_status" >&5
7017 echo "$as_me: failed program was:" >&5
7018 cat conftest.$ac_ext >&5
7019 with_big_core=no
7020 fi
7021 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7022 fi
7023 fi;
7024 echo "$as_me:7024: result: $with_big_core" >&5
7025 echo "${ECHO_T}$with_big_core" >&6
7026 test "x$with_big_core" = "xyes" &&
7027 cat >>confdefs.h <<\EOF
7028 #define HAVE_BIG_CORE 1
7029 EOF
7030
7031 ### ISO C only guarantees 512-char strings, we have tables which load faster
7032 ### when constructed using "big" strings.  More than the C compiler, the awk
7033 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7034 echo "$as_me:7034: checking if big-strings option selected" >&5
7035 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7036
7037 # Check whether --enable-big-strings or --disable-big-strings was given.
7038 if test "${enable_big_strings+set}" = set; then
7039   enableval="$enable_big_strings"
7040   with_big_strings=$enableval
7041 else
7042
7043         case x$AWK in #(vi
7044         x)
7045                 eval with_big_strings=no
7046                 ;;
7047         *) #(vi
7048                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7049                         | $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
7050                         eval with_big_strings=yes
7051                 else
7052                         eval with_big_strings=no
7053                 fi
7054                 ;;
7055         esac
7056
7057 fi;
7058 echo "$as_me:7058: result: $with_big_strings" >&5
7059 echo "${ECHO_T}$with_big_strings" >&6
7060
7061 USE_BIG_STRINGS=0
7062 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7063
7064 ###     use option --enable-termcap to compile in the termcap fallback support
7065 echo "$as_me:7065: checking if you want termcap-fallback support" >&5
7066 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7067
7068 # Check whether --enable-termcap or --disable-termcap was given.
7069 if test "${enable_termcap+set}" = set; then
7070   enableval="$enable_termcap"
7071   with_termcap=$enableval
7072 else
7073   with_termcap=no
7074 fi;
7075 echo "$as_me:7075: result: $with_termcap" >&5
7076 echo "${ECHO_T}$with_termcap" >&6
7077
7078 NCURSES_USE_TERMCAP=0
7079 if test "x$with_termcap" != "xyes" ; then
7080         if test "$use_database" = no ; then
7081                 if test -z "$with_fallback" ; then
7082                         { { echo "$as_me:7082: error: You have disabled the database w/o specifying fallbacks" >&5
7083 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7084    { (exit 1); exit 1; }; }
7085                 fi
7086         fi
7087
7088 cat >>confdefs.h <<\EOF
7089 #define PURE_TERMINFO 1
7090 EOF
7091
7092 else
7093
7094         if test "$with_ticlib" != no ; then
7095                 { { echo "$as_me:7095: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7096 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7097    { (exit 1); exit 1; }; }
7098         fi
7099
7100         NCURSES_USE_TERMCAP=1
7101         echo "$as_me:7101: checking for list of termcap files" >&5
7102 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7103
7104 # Check whether --with-termpath or --without-termpath was given.
7105 if test "${with_termpath+set}" = set; then
7106   withval="$with_termpath"
7107
7108 else
7109   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7110 fi;
7111 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7112 cf_dst_path=
7113 for cf_src_path in $withval
7114 do
7115
7116 if test "x$prefix" != xNONE; then
7117   cf_path_syntax="$prefix"
7118 else
7119   cf_path_syntax="$ac_default_prefix"
7120 fi
7121
7122 case ".$cf_src_path" in #(vi
7123 .\$\(*\)*|.\'*\'*) #(vi
7124   ;;
7125 ..|./*|.\\*) #(vi
7126   ;;
7127 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
7128   ;;
7129 .\${*prefix}*|.\${*dir}*) #(vi
7130   eval cf_src_path="$cf_src_path"
7131   case ".$cf_src_path" in #(vi
7132   .NONE/*)
7133     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7134     ;;
7135   esac
7136   ;; #(vi
7137 .no|.NONE/*)
7138   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7139   ;;
7140 *)
7141   { { echo "$as_me:7141: error: expected a pathname, not \"$cf_src_path\"" >&5
7142 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7143    { (exit 1); exit 1; }; }
7144   ;;
7145 esac
7146
7147   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7148   cf_dst_path="${cf_dst_path}${cf_src_path}"
7149 done
7150 IFS="$ac_save_ifs"
7151
7152 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7153 # so we have to check/work around.  We do prefer the result of "eval"...
7154 eval cf_dst_eval="$cf_dst_path"
7155 case "x$cf_dst_eval" in #(vi
7156 xNONE*) #(vi
7157         TERMPATH=$cf_dst_path
7158         ;;
7159 *)
7160         TERMPATH="$cf_dst_eval"
7161         ;;
7162 esac
7163
7164         echo "$as_me:7164: result: $TERMPATH" >&5
7165 echo "${ECHO_T}$TERMPATH" >&6
7166         test -n "$TERMPATH" &&
7167 cat >>confdefs.h <<EOF
7168 #define TERMPATH "$TERMPATH"
7169 EOF
7170
7171         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7172         echo "$as_me:7172: checking if fast termcap-loader is needed" >&5
7173 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7174
7175 # Check whether --enable-getcap or --disable-getcap was given.
7176 if test "${enable_getcap+set}" = set; then
7177   enableval="$enable_getcap"
7178   with_getcap=$enableval
7179 else
7180   with_getcap=no
7181 fi;
7182         echo "$as_me:7182: result: $with_getcap" >&5
7183 echo "${ECHO_T}$with_getcap" >&6
7184         test "x$with_getcap" = "xyes" &&
7185 cat >>confdefs.h <<\EOF
7186 #define USE_GETCAP 1
7187 EOF
7188
7189         echo "$as_me:7189: checking if translated termcaps will be cached in ~/.terminfo" >&5
7190 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7191
7192 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7193 if test "${enable_getcap_cache+set}" = set; then
7194   enableval="$enable_getcap_cache"
7195   with_getcap_cache=$enableval
7196 else
7197   with_getcap_cache=no
7198 fi;
7199         echo "$as_me:7199: result: $with_getcap_cache" >&5
7200 echo "${ECHO_T}$with_getcap_cache" >&6
7201         test "x$with_getcap_cache" = "xyes" &&
7202 cat >>confdefs.h <<\EOF
7203 #define USE_GETCAP_CACHE 1
7204 EOF
7205
7206 fi
7207
7208 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7209 echo "$as_me:7209: checking if ~/.terminfo is wanted" >&5
7210 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7211
7212 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7213 if test "${enable_home_terminfo+set}" = set; then
7214   enableval="$enable_home_terminfo"
7215   with_home_terminfo=$enableval
7216 else
7217   with_home_terminfo=yes
7218 fi;
7219 echo "$as_me:7219: result: $with_home_terminfo" >&5
7220 echo "${ECHO_T}$with_home_terminfo" >&6
7221 test "x$with_home_terminfo" = "xyes" &&
7222 cat >>confdefs.h <<\EOF
7223 #define USE_HOME_TERMINFO 1
7224 EOF
7225
7226 echo "$as_me:7226: checking if you want to use restricted environment when running as root" >&5
7227 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7228
7229 # Check whether --enable-root-environ or --disable-root-environ was given.
7230 if test "${enable_root_environ+set}" = set; then
7231   enableval="$enable_root_environ"
7232   with_root_environ=$enableval
7233 else
7234   with_root_environ=yes
7235 fi;
7236 echo "$as_me:7236: result: $with_root_environ" >&5
7237 echo "${ECHO_T}$with_root_environ" >&6
7238 test "x$with_root_environ" = xyes &&
7239 cat >>confdefs.h <<\EOF
7240 #define USE_ROOT_ENVIRON 1
7241 EOF
7242
7243 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7244 ###   to reduce storage requirements for the terminfo database.
7245
7246 for ac_func in \
7247         remove \
7248         unlink
7249 do
7250 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7251 echo "$as_me:7251: checking for $ac_func" >&5
7252 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7253 if eval "test \"\${$as_ac_var+set}\" = set"; then
7254   echo $ECHO_N "(cached) $ECHO_C" >&6
7255 else
7256   cat >conftest.$ac_ext <<_ACEOF
7257 #line 7257 "configure"
7258 #include "confdefs.h"
7259 /* System header to define __stub macros and hopefully few prototypes,
7260     which can conflict with char $ac_func (); below.  */
7261 #include <assert.h>
7262 /* Override any gcc2 internal prototype to avoid an error.  */
7263 #ifdef __cplusplus
7264 extern "C"
7265 #endif
7266 /* We use char because int might match the return type of a gcc2
7267    builtin and then its argument prototype would still apply.  */
7268 char $ac_func ();
7269 char (*f) ();
7270
7271 int
7272 main ()
7273 {
7274 /* The GNU C library defines this for functions which it implements
7275     to always fail with ENOSYS.  Some functions are actually named
7276     something starting with __ and the normal name is an alias.  */
7277 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7278 choke me
7279 #else
7280 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7281 #endif
7282
7283   ;
7284   return 0;
7285 }
7286 _ACEOF
7287 rm -f conftest.$ac_objext conftest$ac_exeext
7288 if { (eval echo "$as_me:7288: \"$ac_link\"") >&5
7289   (eval $ac_link) 2>&5
7290   ac_status=$?
7291   echo "$as_me:7291: \$? = $ac_status" >&5
7292   (exit $ac_status); } &&
7293          { ac_try='test -s conftest$ac_exeext'
7294   { (eval echo "$as_me:7294: \"$ac_try\"") >&5
7295   (eval $ac_try) 2>&5
7296   ac_status=$?
7297   echo "$as_me:7297: \$? = $ac_status" >&5
7298   (exit $ac_status); }; }; then
7299   eval "$as_ac_var=yes"
7300 else
7301   echo "$as_me: failed program was:" >&5
7302 cat conftest.$ac_ext >&5
7303 eval "$as_ac_var=no"
7304 fi
7305 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7306 fi
7307 echo "$as_me:7307: result: `eval echo '${'$as_ac_var'}'`" >&5
7308 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7309 if test `eval echo '${'$as_ac_var'}'` = yes; then
7310   cat >>confdefs.h <<EOF
7311 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7312 EOF
7313
7314 fi
7315 done
7316
7317 if test "$cross_compiling" = yes ; then
7318
7319 for ac_func in \
7320                 link \
7321                 symlink
7322 do
7323 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7324 echo "$as_me:7324: checking for $ac_func" >&5
7325 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7326 if eval "test \"\${$as_ac_var+set}\" = set"; then
7327   echo $ECHO_N "(cached) $ECHO_C" >&6
7328 else
7329   cat >conftest.$ac_ext <<_ACEOF
7330 #line 7330 "configure"
7331 #include "confdefs.h"
7332 /* System header to define __stub macros and hopefully few prototypes,
7333     which can conflict with char $ac_func (); below.  */
7334 #include <assert.h>
7335 /* Override any gcc2 internal prototype to avoid an error.  */
7336 #ifdef __cplusplus
7337 extern "C"
7338 #endif
7339 /* We use char because int might match the return type of a gcc2
7340    builtin and then its argument prototype would still apply.  */
7341 char $ac_func ();
7342 char (*f) ();
7343
7344 int
7345 main ()
7346 {
7347 /* The GNU C library defines this for functions which it implements
7348     to always fail with ENOSYS.  Some functions are actually named
7349     something starting with __ and the normal name is an alias.  */
7350 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7351 choke me
7352 #else
7353 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7354 #endif
7355
7356   ;
7357   return 0;
7358 }
7359 _ACEOF
7360 rm -f conftest.$ac_objext conftest$ac_exeext
7361 if { (eval echo "$as_me:7361: \"$ac_link\"") >&5
7362   (eval $ac_link) 2>&5
7363   ac_status=$?
7364   echo "$as_me:7364: \$? = $ac_status" >&5
7365   (exit $ac_status); } &&
7366          { ac_try='test -s conftest$ac_exeext'
7367   { (eval echo "$as_me:7367: \"$ac_try\"") >&5
7368   (eval $ac_try) 2>&5
7369   ac_status=$?
7370   echo "$as_me:7370: \$? = $ac_status" >&5
7371   (exit $ac_status); }; }; then
7372   eval "$as_ac_var=yes"
7373 else
7374   echo "$as_me: failed program was:" >&5
7375 cat conftest.$ac_ext >&5
7376 eval "$as_ac_var=no"
7377 fi
7378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7379 fi
7380 echo "$as_me:7380: result: `eval echo '${'$as_ac_var'}'`" >&5
7381 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7382 if test `eval echo '${'$as_ac_var'}'` = yes; then
7383   cat >>confdefs.h <<EOF
7384 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7385 EOF
7386
7387 fi
7388 done
7389
7390 else
7391         echo "$as_me:7391: checking if link/symlink functions work" >&5
7392 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7393 if test "${cf_cv_link_funcs+set}" = set; then
7394   echo $ECHO_N "(cached) $ECHO_C" >&6
7395 else
7396
7397                 cf_cv_link_funcs=
7398                 for cf_func in link symlink ; do
7399                         if test "$cross_compiling" = yes; then
7400
7401                         eval 'ac_cv_func_'$cf_func'=error'
7402 else
7403   cat >conftest.$ac_ext <<_ACEOF
7404 #line 7404 "configure"
7405 #include "confdefs.h"
7406
7407 #include <sys/types.h>
7408 #include <sys/stat.h>
7409 #ifdef HAVE_UNISTD_H
7410 #include <unistd.h>
7411 #endif
7412 int main()
7413 {
7414         int fail = 0;
7415         char *src = "config.log";
7416         char *dst = "conftest.chk";
7417         struct stat src_sb;
7418         struct stat dst_sb;
7419
7420         stat(src, &src_sb);
7421         fail = ($cf_func("config.log", "conftest.chk") < 0)
7422             || (stat(dst, &dst_sb) < 0)
7423             || (dst_sb.st_mtime != src_sb.st_mtime);
7424 #ifdef HAVE_UNLINK
7425         unlink(dst);
7426 #else
7427         remove(dst);
7428 #endif
7429         ${cf_cv_main_return:-return} (fail);
7430 }
7431
7432 _ACEOF
7433 rm -f conftest$ac_exeext
7434 if { (eval echo "$as_me:7434: \"$ac_link\"") >&5
7435   (eval $ac_link) 2>&5
7436   ac_status=$?
7437   echo "$as_me:7437: \$? = $ac_status" >&5
7438   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7439   { (eval echo "$as_me:7439: \"$ac_try\"") >&5
7440   (eval $ac_try) 2>&5
7441   ac_status=$?
7442   echo "$as_me:7442: \$? = $ac_status" >&5
7443   (exit $ac_status); }; }; then
7444
7445                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7446                         eval 'ac_cv_func_'$cf_func'=yes'
7447 else
7448   echo "$as_me: program exited with status $ac_status" >&5
7449 echo "$as_me: failed program was:" >&5
7450 cat conftest.$ac_ext >&5
7451
7452                         eval 'ac_cv_func_'$cf_func'=no'
7453 fi
7454 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7455 fi
7456                 done
7457                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7458
7459 fi
7460 echo "$as_me:7460: result: $cf_cv_link_funcs" >&5
7461 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7462         test "$ac_cv_func_link"    = yes &&
7463 cat >>confdefs.h <<\EOF
7464 #define HAVE_LINK 1
7465 EOF
7466
7467         test "$ac_cv_func_symlink" = yes &&
7468 cat >>confdefs.h <<\EOF
7469 #define HAVE_SYMLINK 1
7470 EOF
7471
7472 fi
7473
7474 with_links=no
7475 with_symlinks=no
7476
7477 # soft links (symbolic links) are useful for some systems where hard links do
7478 # not work, or to make it simpler to copy terminfo trees around.
7479 if test "x$ac_cv_func_symlink" = xyes ; then
7480     echo "$as_me:7480: checking if tic should use symbolic links" >&5
7481 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7482
7483 # Check whether --enable-symlinks or --disable-symlinks was given.
7484 if test "${enable_symlinks+set}" = set; then
7485   enableval="$enable_symlinks"
7486   with_symlinks=$enableval
7487 else
7488   with_symlinks=no
7489 fi;
7490     echo "$as_me:7490: result: $with_symlinks" >&5
7491 echo "${ECHO_T}$with_symlinks" >&6
7492 fi
7493
7494 # If we have hard links and did not choose to use soft links instead, there is
7495 # no reason to make this choice optional - use the hard links.
7496 if test "$with_symlinks" = no ; then
7497     echo "$as_me:7497: checking if tic should use hard links" >&5
7498 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7499     if test "x$ac_cv_func_link" = xyes ; then
7500         with_links=yes
7501     else
7502         with_links=no
7503     fi
7504     echo "$as_me:7504: result: $with_links" >&5
7505 echo "${ECHO_T}$with_links" >&6
7506 fi
7507
7508 test "x$with_links" = xyes &&
7509 cat >>confdefs.h <<\EOF
7510 #define USE_LINKS 1
7511 EOF
7512
7513 test "x$with_symlinks" = xyes &&
7514 cat >>confdefs.h <<\EOF
7515 #define USE_SYMLINKS 1
7516 EOF
7517
7518 ###   use option --enable-broken-linker to force on use of broken-linker support
7519 echo "$as_me:7519: checking if you want broken-linker support code" >&5
7520 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7521
7522 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7523 if test "${enable_broken_linker+set}" = set; then
7524   enableval="$enable_broken_linker"
7525   with_broken_linker=$enableval
7526 else
7527   with_broken_linker=${BROKEN_LINKER:-no}
7528 fi;
7529 echo "$as_me:7529: result: $with_broken_linker" >&5
7530 echo "${ECHO_T}$with_broken_linker" >&6
7531
7532 BROKEN_LINKER=0
7533 if test "x$with_broken_linker" = xyes ; then
7534
7535 cat >>confdefs.h <<\EOF
7536 #define BROKEN_LINKER 1
7537 EOF
7538
7539         BROKEN_LINKER=1
7540 elif test "$DFT_LWR_MODEL" = shared ; then
7541         case $cf_cv_system_name in #(vi
7542         cygwin*)
7543
7544 cat >>confdefs.h <<\EOF
7545 #define BROKEN_LINKER 1
7546 EOF
7547
7548                 BROKEN_LINKER=1
7549                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7550
7551 echo "${as_me:-configure}:7551: testing cygwin linker is broken anyway ..." 1>&5
7552
7553                 ;;
7554         esac
7555 fi
7556
7557 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7558 echo "$as_me:7558: checking if tputs should process BSD-style prefix padding" >&5
7559 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7560
7561 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7562 if test "${enable_bsdpad+set}" = set; then
7563   enableval="$enable_bsdpad"
7564   with_bsdpad=$enableval
7565 else
7566   with_bsdpad=no
7567 fi;
7568 echo "$as_me:7568: result: $with_bsdpad" >&5
7569 echo "${ECHO_T}$with_bsdpad" >&6
7570 test "x$with_bsdpad" = xyes &&
7571 cat >>confdefs.h <<\EOF
7572 #define BSD_TPUTS 1
7573 EOF
7574
7575 ###   use option --enable-widec to turn on use of wide-character support
7576 NCURSES_CH_T=chtype
7577 NCURSES_LIBUTF8=0
7578
7579 NEED_WCHAR_H=0
7580 NCURSES_MBSTATE_T=0
7581 NCURSES_WCHAR_T=0
7582 NCURSES_WINT_T=0
7583
7584 # Check to define _XOPEN_SOURCE "automatically"
7585
7586 cf_XOPEN_SOURCE=500
7587 cf_POSIX_C_SOURCE=199506L
7588 cf_xopen_source=
7589
7590 case $host_os in #(vi
7591 aix[4-7]*) #(vi
7592         cf_xopen_source="-D_ALL_SOURCE"
7593         ;;
7594 cygwin|msys) #(vi
7595         cf_XOPEN_SOURCE=600
7596         ;;
7597 darwin[0-8].*) #(vi
7598         cf_xopen_source="-D_APPLE_C_SOURCE"
7599         ;;
7600 darwin*) #(vi
7601         cf_xopen_source="-D_DARWIN_C_SOURCE"
7602         cf_XOPEN_SOURCE=
7603         ;;
7604 freebsd*|dragonfly*) #(vi
7605         # 5.x headers associate
7606         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7607         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7608         cf_POSIX_C_SOURCE=200112L
7609         cf_XOPEN_SOURCE=600
7610         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7611         ;;
7612 hpux11*) #(vi
7613         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7614         ;;
7615 hpux*) #(vi
7616         cf_xopen_source="-D_HPUX_SOURCE"
7617         ;;
7618 irix[56].*) #(vi
7619         cf_xopen_source="-D_SGI_SOURCE"
7620         cf_XOPEN_SOURCE=
7621         ;;
7622 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7623
7624 echo "$as_me:7624: checking if we must define _GNU_SOURCE" >&5
7625 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7626 if test "${cf_cv_gnu_source+set}" = set; then
7627   echo $ECHO_N "(cached) $ECHO_C" >&6
7628 else
7629
7630 cat >conftest.$ac_ext <<_ACEOF
7631 #line 7631 "configure"
7632 #include "confdefs.h"
7633 #include <sys/types.h>
7634 int
7635 main ()
7636 {
7637
7638 #ifndef _XOPEN_SOURCE
7639 make an error
7640 #endif
7641   ;
7642   return 0;
7643 }
7644 _ACEOF
7645 rm -f conftest.$ac_objext
7646 if { (eval echo "$as_me:7646: \"$ac_compile\"") >&5
7647   (eval $ac_compile) 2>&5
7648   ac_status=$?
7649   echo "$as_me:7649: \$? = $ac_status" >&5
7650   (exit $ac_status); } &&
7651          { ac_try='test -s conftest.$ac_objext'
7652   { (eval echo "$as_me:7652: \"$ac_try\"") >&5
7653   (eval $ac_try) 2>&5
7654   ac_status=$?
7655   echo "$as_me:7655: \$? = $ac_status" >&5
7656   (exit $ac_status); }; }; then
7657   cf_cv_gnu_source=no
7658 else
7659   echo "$as_me: failed program was:" >&5
7660 cat conftest.$ac_ext >&5
7661 cf_save="$CPPFLAGS"
7662          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7663          cat >conftest.$ac_ext <<_ACEOF
7664 #line 7664 "configure"
7665 #include "confdefs.h"
7666 #include <sys/types.h>
7667 int
7668 main ()
7669 {
7670
7671 #ifdef _XOPEN_SOURCE
7672 make an error
7673 #endif
7674   ;
7675   return 0;
7676 }
7677 _ACEOF
7678 rm -f conftest.$ac_objext
7679 if { (eval echo "$as_me:7679: \"$ac_compile\"") >&5
7680   (eval $ac_compile) 2>&5
7681   ac_status=$?
7682   echo "$as_me:7682: \$? = $ac_status" >&5
7683   (exit $ac_status); } &&
7684          { ac_try='test -s conftest.$ac_objext'
7685   { (eval echo "$as_me:7685: \"$ac_try\"") >&5
7686   (eval $ac_try) 2>&5
7687   ac_status=$?
7688   echo "$as_me:7688: \$? = $ac_status" >&5
7689   (exit $ac_status); }; }; then
7690   cf_cv_gnu_source=no
7691 else
7692   echo "$as_me: failed program was:" >&5
7693 cat conftest.$ac_ext >&5
7694 cf_cv_gnu_source=yes
7695 fi
7696 rm -f conftest.$ac_objext conftest.$ac_ext
7697         CPPFLAGS="$cf_save"
7698
7699 fi
7700 rm -f conftest.$ac_objext conftest.$ac_ext
7701
7702 fi
7703 echo "$as_me:7703: result: $cf_cv_gnu_source" >&5
7704 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7705 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7706
7707         ;;
7708 minix*) #(vi
7709         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7710         ;;
7711 mirbsd*) #(vi
7712         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7713         cf_XOPEN_SOURCE=
7714
7715 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7716
7717 cf_save_CFLAGS="$CFLAGS"
7718 cf_save_CPPFLAGS="$CPPFLAGS"
7719
7720 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7721         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7722                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7723
7724 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7725         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7726                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7727
7728 echo "$as_me:7728: checking if we should define _POSIX_C_SOURCE" >&5
7729 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7730 if test "${cf_cv_posix_c_source+set}" = set; then
7731   echo $ECHO_N "(cached) $ECHO_C" >&6
7732 else
7733
7734 echo "${as_me:-configure}:7734: testing if the symbol is already defined go no further ..." 1>&5
7735
7736         cat >conftest.$ac_ext <<_ACEOF
7737 #line 7737 "configure"
7738 #include "confdefs.h"
7739 #include <sys/types.h>
7740 int
7741 main ()
7742 {
7743
7744 #ifndef _POSIX_C_SOURCE
7745 make an error
7746 #endif
7747   ;
7748   return 0;
7749 }
7750 _ACEOF
7751 rm -f conftest.$ac_objext
7752 if { (eval echo "$as_me:7752: \"$ac_compile\"") >&5
7753   (eval $ac_compile) 2>&5
7754   ac_status=$?
7755   echo "$as_me:7755: \$? = $ac_status" >&5
7756   (exit $ac_status); } &&
7757          { ac_try='test -s conftest.$ac_objext'
7758   { (eval echo "$as_me:7758: \"$ac_try\"") >&5
7759   (eval $ac_try) 2>&5
7760   ac_status=$?
7761   echo "$as_me:7761: \$? = $ac_status" >&5
7762   (exit $ac_status); }; }; then
7763   cf_cv_posix_c_source=no
7764 else
7765   echo "$as_me: failed program was:" >&5
7766 cat conftest.$ac_ext >&5
7767 cf_want_posix_source=no
7768          case .$cf_POSIX_C_SOURCE in #(vi
7769          .[12]??*) #(vi
7770                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7771                 ;;
7772          .2) #(vi
7773                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7774                 cf_want_posix_source=yes
7775                 ;;
7776          .*)
7777                 cf_want_posix_source=yes
7778                 ;;
7779          esac
7780          if test "$cf_want_posix_source" = yes ; then
7781                 cat >conftest.$ac_ext <<_ACEOF
7782 #line 7782 "configure"
7783 #include "confdefs.h"
7784 #include <sys/types.h>
7785 int
7786 main ()
7787 {
7788
7789 #ifdef _POSIX_SOURCE
7790 make an error
7791 #endif
7792   ;
7793   return 0;
7794 }
7795 _ACEOF
7796 rm -f conftest.$ac_objext
7797 if { (eval echo "$as_me:7797: \"$ac_compile\"") >&5
7798   (eval $ac_compile) 2>&5
7799   ac_status=$?
7800   echo "$as_me:7800: \$? = $ac_status" >&5
7801   (exit $ac_status); } &&
7802          { ac_try='test -s conftest.$ac_objext'
7803   { (eval echo "$as_me:7803: \"$ac_try\"") >&5
7804   (eval $ac_try) 2>&5
7805   ac_status=$?
7806   echo "$as_me:7806: \$? = $ac_status" >&5
7807   (exit $ac_status); }; }; then
7808   :
7809 else
7810   echo "$as_me: failed program was:" >&5
7811 cat conftest.$ac_ext >&5
7812 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7813 fi
7814 rm -f conftest.$ac_objext conftest.$ac_ext
7815          fi
7816
7817 echo "${as_me:-configure}:7817: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7818
7819          CFLAGS="$cf_trim_CFLAGS"
7820          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7821
7822 echo "${as_me:-configure}:7822: testing if the second compile does not leave our definition intact error ..." 1>&5
7823
7824          cat >conftest.$ac_ext <<_ACEOF
7825 #line 7825 "configure"
7826 #include "confdefs.h"
7827 #include <sys/types.h>
7828 int
7829 main ()
7830 {
7831
7832 #ifndef _POSIX_C_SOURCE
7833 make an error
7834 #endif
7835   ;
7836   return 0;
7837 }
7838 _ACEOF
7839 rm -f conftest.$ac_objext
7840 if { (eval echo "$as_me:7840: \"$ac_compile\"") >&5
7841   (eval $ac_compile) 2>&5
7842   ac_status=$?
7843   echo "$as_me:7843: \$? = $ac_status" >&5
7844   (exit $ac_status); } &&
7845          { ac_try='test -s conftest.$ac_objext'
7846   { (eval echo "$as_me:7846: \"$ac_try\"") >&5
7847   (eval $ac_try) 2>&5
7848   ac_status=$?
7849   echo "$as_me:7849: \$? = $ac_status" >&5
7850   (exit $ac_status); }; }; then
7851   :
7852 else
7853   echo "$as_me: failed program was:" >&5
7854 cat conftest.$ac_ext >&5
7855 cf_cv_posix_c_source=no
7856 fi
7857 rm -f conftest.$ac_objext conftest.$ac_ext
7858          CFLAGS="$cf_save_CFLAGS"
7859          CPPFLAGS="$cf_save_CPPFLAGS"
7860
7861 fi
7862 rm -f conftest.$ac_objext conftest.$ac_ext
7863
7864 fi
7865 echo "$as_me:7865: result: $cf_cv_posix_c_source" >&5
7866 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7867
7868 if test "$cf_cv_posix_c_source" != no ; then
7869         CFLAGS="$cf_trim_CFLAGS"
7870         CPPFLAGS="$cf_trim_CPPFLAGS"
7871
7872 cf_fix_cppflags=no
7873 cf_new_cflags=
7874 cf_new_cppflags=
7875 cf_new_extra_cppflags=
7876
7877 for cf_add_cflags in $cf_cv_posix_c_source
7878 do
7879 case $cf_fix_cppflags in
7880 no)
7881         case $cf_add_cflags in #(vi
7882         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7883                 case $cf_add_cflags in
7884                 -D*)
7885                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7886
7887                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7888                                 && test -z "${cf_tst_cflags}" \
7889                                 && cf_fix_cppflags=yes
7890
7891                         if test $cf_fix_cppflags = yes ; then
7892                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7893                                 continue
7894                         elif test "${cf_tst_cflags}" = "\"'" ; then
7895                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7896                                 continue
7897                         fi
7898                         ;;
7899                 esac
7900                 case "$CPPFLAGS" in
7901                 *$cf_add_cflags) #(vi
7902                         ;;
7903                 *) #(vi
7904                         case $cf_add_cflags in #(vi
7905                         -D*)
7906                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7907
7908 CPPFLAGS=`echo "$CPPFLAGS" | \
7909         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7910                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7911
7912                                 ;;
7913                         esac
7914                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7915                         ;;
7916                 esac
7917                 ;;
7918         *)
7919                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7920                 ;;
7921         esac
7922         ;;
7923 yes)
7924         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7925
7926         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7927
7928         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7929                 && test -z "${cf_tst_cflags}" \
7930                 && cf_fix_cppflags=no
7931         ;;
7932 esac
7933 done
7934
7935 if test -n "$cf_new_cflags" ; then
7936
7937         CFLAGS="$CFLAGS $cf_new_cflags"
7938 fi
7939
7940 if test -n "$cf_new_cppflags" ; then
7941
7942         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7943 fi
7944
7945 if test -n "$cf_new_extra_cppflags" ; then
7946
7947         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7948 fi
7949
7950 fi
7951
7952         ;;
7953 netbsd*) #(vi
7954         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7955         ;;
7956 openbsd[4-9]*) #(vi
7957         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7958         cf_xopen_source="-D_BSD_SOURCE"
7959         cf_XOPEN_SOURCE=600
7960         ;;
7961 openbsd*) #(vi
7962         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7963         ;;
7964 osf[45]*) #(vi
7965         cf_xopen_source="-D_OSF_SOURCE"
7966         ;;
7967 nto-qnx*) #(vi
7968         cf_xopen_source="-D_QNX_SOURCE"
7969         ;;
7970 sco*) #(vi
7971         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7972         ;;
7973 solaris2.*) #(vi
7974         cf_xopen_source="-D__EXTENSIONS__"
7975         cf_cv_xopen_source=broken
7976         ;;
7977 sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
7978         cf_XOPEN_SOURCE=
7979         cf_POSIX_C_SOURCE=
7980         ;;
7981 *)
7982
7983 echo "$as_me:7983: checking if we should define _XOPEN_SOURCE" >&5
7984 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7985 if test "${cf_cv_xopen_source+set}" = set; then
7986   echo $ECHO_N "(cached) $ECHO_C" >&6
7987 else
7988
7989         cat >conftest.$ac_ext <<_ACEOF
7990 #line 7990 "configure"
7991 #include "confdefs.h"
7992
7993 #include <stdlib.h>
7994 #include <string.h>
7995 #include <sys/types.h>
7996
7997 int
7998 main ()
7999 {
8000
8001 #ifndef _XOPEN_SOURCE
8002 make an error
8003 #endif
8004   ;
8005   return 0;
8006 }
8007 _ACEOF
8008 rm -f conftest.$ac_objext
8009 if { (eval echo "$as_me:8009: \"$ac_compile\"") >&5
8010   (eval $ac_compile) 2>&5
8011   ac_status=$?
8012   echo "$as_me:8012: \$? = $ac_status" >&5
8013   (exit $ac_status); } &&
8014          { ac_try='test -s conftest.$ac_objext'
8015   { (eval echo "$as_me:8015: \"$ac_try\"") >&5
8016   (eval $ac_try) 2>&5
8017   ac_status=$?
8018   echo "$as_me:8018: \$? = $ac_status" >&5
8019   (exit $ac_status); }; }; then
8020   cf_cv_xopen_source=no
8021 else
8022   echo "$as_me: failed program was:" >&5
8023 cat conftest.$ac_ext >&5
8024 cf_save="$CPPFLAGS"
8025          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8026          cat >conftest.$ac_ext <<_ACEOF
8027 #line 8027 "configure"
8028 #include "confdefs.h"
8029
8030 #include <stdlib.h>
8031 #include <string.h>
8032 #include <sys/types.h>
8033
8034 int
8035 main ()
8036 {
8037
8038 #ifdef _XOPEN_SOURCE
8039 make an error
8040 #endif
8041   ;
8042   return 0;
8043 }
8044 _ACEOF
8045 rm -f conftest.$ac_objext
8046 if { (eval echo "$as_me:8046: \"$ac_compile\"") >&5
8047   (eval $ac_compile) 2>&5
8048   ac_status=$?
8049   echo "$as_me:8049: \$? = $ac_status" >&5
8050   (exit $ac_status); } &&
8051          { ac_try='test -s conftest.$ac_objext'
8052   { (eval echo "$as_me:8052: \"$ac_try\"") >&5
8053   (eval $ac_try) 2>&5
8054   ac_status=$?
8055   echo "$as_me:8055: \$? = $ac_status" >&5
8056   (exit $ac_status); }; }; then
8057   cf_cv_xopen_source=no
8058 else
8059   echo "$as_me: failed program was:" >&5
8060 cat conftest.$ac_ext >&5
8061 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8062 fi
8063 rm -f conftest.$ac_objext conftest.$ac_ext
8064         CPPFLAGS="$cf_save"
8065
8066 fi
8067 rm -f conftest.$ac_objext conftest.$ac_ext
8068
8069 fi
8070 echo "$as_me:8070: result: $cf_cv_xopen_source" >&5
8071 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8072
8073 if test "$cf_cv_xopen_source" != no ; then
8074
8075 CFLAGS=`echo "$CFLAGS" | \
8076         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8077                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8078
8079 CPPFLAGS=`echo "$CPPFLAGS" | \
8080         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8081                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8082
8083         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8084
8085 cf_fix_cppflags=no
8086 cf_new_cflags=
8087 cf_new_cppflags=
8088 cf_new_extra_cppflags=
8089
8090 for cf_add_cflags in $cf_temp_xopen_source
8091 do
8092 case $cf_fix_cppflags in
8093 no)
8094         case $cf_add_cflags in #(vi
8095         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8096                 case $cf_add_cflags in
8097                 -D*)
8098                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8099
8100                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8101                                 && test -z "${cf_tst_cflags}" \
8102                                 && cf_fix_cppflags=yes
8103
8104                         if test $cf_fix_cppflags = yes ; then
8105                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8106                                 continue
8107                         elif test "${cf_tst_cflags}" = "\"'" ; then
8108                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8109                                 continue
8110                         fi
8111                         ;;
8112                 esac
8113                 case "$CPPFLAGS" in
8114                 *$cf_add_cflags) #(vi
8115                         ;;
8116                 *) #(vi
8117                         case $cf_add_cflags in #(vi
8118                         -D*)
8119                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8120
8121 CPPFLAGS=`echo "$CPPFLAGS" | \
8122         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8123                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8124
8125                                 ;;
8126                         esac
8127                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8128                         ;;
8129                 esac
8130                 ;;
8131         *)
8132                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8133                 ;;
8134         esac
8135         ;;
8136 yes)
8137         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8138
8139         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8140
8141         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8142                 && test -z "${cf_tst_cflags}" \
8143                 && cf_fix_cppflags=no
8144         ;;
8145 esac
8146 done
8147
8148 if test -n "$cf_new_cflags" ; then
8149
8150         CFLAGS="$CFLAGS $cf_new_cflags"
8151 fi
8152
8153 if test -n "$cf_new_cppflags" ; then
8154
8155         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8156 fi
8157
8158 if test -n "$cf_new_extra_cppflags" ; then
8159
8160         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8161 fi
8162
8163 fi
8164
8165 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8166
8167 cf_save_CFLAGS="$CFLAGS"
8168 cf_save_CPPFLAGS="$CPPFLAGS"
8169
8170 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8171         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8172                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8173
8174 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8175         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8176                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8177
8178 echo "$as_me:8178: checking if we should define _POSIX_C_SOURCE" >&5
8179 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8180 if test "${cf_cv_posix_c_source+set}" = set; then
8181   echo $ECHO_N "(cached) $ECHO_C" >&6
8182 else
8183
8184 echo "${as_me:-configure}:8184: testing if the symbol is already defined go no further ..." 1>&5
8185
8186         cat >conftest.$ac_ext <<_ACEOF
8187 #line 8187 "configure"
8188 #include "confdefs.h"
8189 #include <sys/types.h>
8190 int
8191 main ()
8192 {
8193
8194 #ifndef _POSIX_C_SOURCE
8195 make an error
8196 #endif
8197   ;
8198   return 0;
8199 }
8200 _ACEOF
8201 rm -f conftest.$ac_objext
8202 if { (eval echo "$as_me:8202: \"$ac_compile\"") >&5
8203   (eval $ac_compile) 2>&5
8204   ac_status=$?
8205   echo "$as_me:8205: \$? = $ac_status" >&5
8206   (exit $ac_status); } &&
8207          { ac_try='test -s conftest.$ac_objext'
8208   { (eval echo "$as_me:8208: \"$ac_try\"") >&5
8209   (eval $ac_try) 2>&5
8210   ac_status=$?
8211   echo "$as_me:8211: \$? = $ac_status" >&5
8212   (exit $ac_status); }; }; then
8213   cf_cv_posix_c_source=no
8214 else
8215   echo "$as_me: failed program was:" >&5
8216 cat conftest.$ac_ext >&5
8217 cf_want_posix_source=no
8218          case .$cf_POSIX_C_SOURCE in #(vi
8219          .[12]??*) #(vi
8220                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8221                 ;;
8222          .2) #(vi
8223                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8224                 cf_want_posix_source=yes
8225                 ;;
8226          .*)
8227                 cf_want_posix_source=yes
8228                 ;;
8229          esac
8230          if test "$cf_want_posix_source" = yes ; then
8231                 cat >conftest.$ac_ext <<_ACEOF
8232 #line 8232 "configure"
8233 #include "confdefs.h"
8234 #include <sys/types.h>
8235 int
8236 main ()
8237 {
8238
8239 #ifdef _POSIX_SOURCE
8240 make an error
8241 #endif
8242   ;
8243   return 0;
8244 }
8245 _ACEOF
8246 rm -f conftest.$ac_objext
8247 if { (eval echo "$as_me:8247: \"$ac_compile\"") >&5
8248   (eval $ac_compile) 2>&5
8249   ac_status=$?
8250   echo "$as_me:8250: \$? = $ac_status" >&5
8251   (exit $ac_status); } &&
8252          { ac_try='test -s conftest.$ac_objext'
8253   { (eval echo "$as_me:8253: \"$ac_try\"") >&5
8254   (eval $ac_try) 2>&5
8255   ac_status=$?
8256   echo "$as_me:8256: \$? = $ac_status" >&5
8257   (exit $ac_status); }; }; then
8258   :
8259 else
8260   echo "$as_me: failed program was:" >&5
8261 cat conftest.$ac_ext >&5
8262 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8263 fi
8264 rm -f conftest.$ac_objext conftest.$ac_ext
8265          fi
8266
8267 echo "${as_me:-configure}:8267: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8268
8269          CFLAGS="$cf_trim_CFLAGS"
8270          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8271
8272 echo "${as_me:-configure}:8272: testing if the second compile does not leave our definition intact error ..." 1>&5
8273
8274          cat >conftest.$ac_ext <<_ACEOF
8275 #line 8275 "configure"
8276 #include "confdefs.h"
8277 #include <sys/types.h>
8278 int
8279 main ()
8280 {
8281
8282 #ifndef _POSIX_C_SOURCE
8283 make an error
8284 #endif
8285   ;
8286   return 0;
8287 }
8288 _ACEOF
8289 rm -f conftest.$ac_objext
8290 if { (eval echo "$as_me:8290: \"$ac_compile\"") >&5
8291   (eval $ac_compile) 2>&5
8292   ac_status=$?
8293   echo "$as_me:8293: \$? = $ac_status" >&5
8294   (exit $ac_status); } &&
8295          { ac_try='test -s conftest.$ac_objext'
8296   { (eval echo "$as_me:8296: \"$ac_try\"") >&5
8297   (eval $ac_try) 2>&5
8298   ac_status=$?
8299   echo "$as_me:8299: \$? = $ac_status" >&5
8300   (exit $ac_status); }; }; then
8301   :
8302 else
8303   echo "$as_me: failed program was:" >&5
8304 cat conftest.$ac_ext >&5
8305 cf_cv_posix_c_source=no
8306 fi
8307 rm -f conftest.$ac_objext conftest.$ac_ext
8308          CFLAGS="$cf_save_CFLAGS"
8309          CPPFLAGS="$cf_save_CPPFLAGS"
8310
8311 fi
8312 rm -f conftest.$ac_objext conftest.$ac_ext
8313
8314 fi
8315 echo "$as_me:8315: result: $cf_cv_posix_c_source" >&5
8316 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8317
8318 if test "$cf_cv_posix_c_source" != no ; then
8319         CFLAGS="$cf_trim_CFLAGS"
8320         CPPFLAGS="$cf_trim_CPPFLAGS"
8321
8322 cf_fix_cppflags=no
8323 cf_new_cflags=
8324 cf_new_cppflags=
8325 cf_new_extra_cppflags=
8326
8327 for cf_add_cflags in $cf_cv_posix_c_source
8328 do
8329 case $cf_fix_cppflags in
8330 no)
8331         case $cf_add_cflags in #(vi
8332         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8333                 case $cf_add_cflags in
8334                 -D*)
8335                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8336
8337                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8338                                 && test -z "${cf_tst_cflags}" \
8339                                 && cf_fix_cppflags=yes
8340
8341                         if test $cf_fix_cppflags = yes ; then
8342                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8343                                 continue
8344                         elif test "${cf_tst_cflags}" = "\"'" ; then
8345                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8346                                 continue
8347                         fi
8348                         ;;
8349                 esac
8350                 case "$CPPFLAGS" in
8351                 *$cf_add_cflags) #(vi
8352                         ;;
8353                 *) #(vi
8354                         case $cf_add_cflags in #(vi
8355                         -D*)
8356                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8357
8358 CPPFLAGS=`echo "$CPPFLAGS" | \
8359         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8360                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8361
8362                                 ;;
8363                         esac
8364                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8365                         ;;
8366                 esac
8367                 ;;
8368         *)
8369                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8370                 ;;
8371         esac
8372         ;;
8373 yes)
8374         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8375
8376         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8377
8378         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8379                 && test -z "${cf_tst_cflags}" \
8380                 && cf_fix_cppflags=no
8381         ;;
8382 esac
8383 done
8384
8385 if test -n "$cf_new_cflags" ; then
8386
8387         CFLAGS="$CFLAGS $cf_new_cflags"
8388 fi
8389
8390 if test -n "$cf_new_cppflags" ; then
8391
8392         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8393 fi
8394
8395 if test -n "$cf_new_extra_cppflags" ; then
8396
8397         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8398 fi
8399
8400 fi
8401
8402         ;;
8403 esac
8404
8405 if test -n "$cf_xopen_source" ; then
8406
8407 cf_fix_cppflags=no
8408 cf_new_cflags=
8409 cf_new_cppflags=
8410 cf_new_extra_cppflags=
8411
8412 for cf_add_cflags in $cf_xopen_source
8413 do
8414 case $cf_fix_cppflags in
8415 no)
8416         case $cf_add_cflags in #(vi
8417         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8418                 case $cf_add_cflags in
8419                 -D*)
8420                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8421
8422                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8423                                 && test -z "${cf_tst_cflags}" \
8424                                 && cf_fix_cppflags=yes
8425
8426                         if test $cf_fix_cppflags = yes ; then
8427                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8428                                 continue
8429                         elif test "${cf_tst_cflags}" = "\"'" ; then
8430                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8431                                 continue
8432                         fi
8433                         ;;
8434                 esac
8435                 case "$CPPFLAGS" in
8436                 *$cf_add_cflags) #(vi
8437                         ;;
8438                 *) #(vi
8439                         case $cf_add_cflags in #(vi
8440                         -D*)
8441                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8442
8443 CPPFLAGS=`echo "$CPPFLAGS" | \
8444         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8445                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8446
8447                                 ;;
8448                         esac
8449                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8450                         ;;
8451                 esac
8452                 ;;
8453         *)
8454                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8455                 ;;
8456         esac
8457         ;;
8458 yes)
8459         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8460
8461         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8462
8463         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8464                 && test -z "${cf_tst_cflags}" \
8465                 && cf_fix_cppflags=no
8466         ;;
8467 esac
8468 done
8469
8470 if test -n "$cf_new_cflags" ; then
8471         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8472
8473 echo "${as_me:-configure}:8473: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8474
8475         CFLAGS="$CFLAGS $cf_new_cflags"
8476 fi
8477
8478 if test -n "$cf_new_cppflags" ; then
8479         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8480
8481 echo "${as_me:-configure}:8481: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8482
8483         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8484 fi
8485
8486 if test -n "$cf_new_extra_cppflags" ; then
8487         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8488
8489 echo "${as_me:-configure}:8489: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8490
8491         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8492 fi
8493
8494 fi
8495
8496 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8497         echo "$as_me:8497: checking if _XOPEN_SOURCE really is set" >&5
8498 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8499         cat >conftest.$ac_ext <<_ACEOF
8500 #line 8500 "configure"
8501 #include "confdefs.h"
8502 #include <stdlib.h>
8503 int
8504 main ()
8505 {
8506
8507 #ifndef _XOPEN_SOURCE
8508 make an error
8509 #endif
8510   ;
8511   return 0;
8512 }
8513 _ACEOF
8514 rm -f conftest.$ac_objext
8515 if { (eval echo "$as_me:8515: \"$ac_compile\"") >&5
8516   (eval $ac_compile) 2>&5
8517   ac_status=$?
8518   echo "$as_me:8518: \$? = $ac_status" >&5
8519   (exit $ac_status); } &&
8520          { ac_try='test -s conftest.$ac_objext'
8521   { (eval echo "$as_me:8521: \"$ac_try\"") >&5
8522   (eval $ac_try) 2>&5
8523   ac_status=$?
8524   echo "$as_me:8524: \$? = $ac_status" >&5
8525   (exit $ac_status); }; }; then
8526   cf_XOPEN_SOURCE_set=yes
8527 else
8528   echo "$as_me: failed program was:" >&5
8529 cat conftest.$ac_ext >&5
8530 cf_XOPEN_SOURCE_set=no
8531 fi
8532 rm -f conftest.$ac_objext conftest.$ac_ext
8533         echo "$as_me:8533: result: $cf_XOPEN_SOURCE_set" >&5
8534 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8535         if test $cf_XOPEN_SOURCE_set = yes
8536         then
8537                 cat >conftest.$ac_ext <<_ACEOF
8538 #line 8538 "configure"
8539 #include "confdefs.h"
8540 #include <stdlib.h>
8541 int
8542 main ()
8543 {
8544
8545 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8546 make an error
8547 #endif
8548   ;
8549   return 0;
8550 }
8551 _ACEOF
8552 rm -f conftest.$ac_objext
8553 if { (eval echo "$as_me:8553: \"$ac_compile\"") >&5
8554   (eval $ac_compile) 2>&5
8555   ac_status=$?
8556   echo "$as_me:8556: \$? = $ac_status" >&5
8557   (exit $ac_status); } &&
8558          { ac_try='test -s conftest.$ac_objext'
8559   { (eval echo "$as_me:8559: \"$ac_try\"") >&5
8560   (eval $ac_try) 2>&5
8561   ac_status=$?
8562   echo "$as_me:8562: \$? = $ac_status" >&5
8563   (exit $ac_status); }; }; then
8564   cf_XOPEN_SOURCE_set_ok=yes
8565 else
8566   echo "$as_me: failed program was:" >&5
8567 cat conftest.$ac_ext >&5
8568 cf_XOPEN_SOURCE_set_ok=no
8569 fi
8570 rm -f conftest.$ac_objext conftest.$ac_ext
8571                 if test $cf_XOPEN_SOURCE_set_ok = no
8572                 then
8573                         { echo "$as_me:8573: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8574 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8575                 fi
8576         else
8577
8578 echo "$as_me:8578: checking if we should define _XOPEN_SOURCE" >&5
8579 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8580 if test "${cf_cv_xopen_source+set}" = set; then
8581   echo $ECHO_N "(cached) $ECHO_C" >&6
8582 else
8583
8584         cat >conftest.$ac_ext <<_ACEOF
8585 #line 8585 "configure"
8586 #include "confdefs.h"
8587
8588 #include <stdlib.h>
8589 #include <string.h>
8590 #include <sys/types.h>
8591
8592 int
8593 main ()
8594 {
8595
8596 #ifndef _XOPEN_SOURCE
8597 make an error
8598 #endif
8599   ;
8600   return 0;
8601 }
8602 _ACEOF
8603 rm -f conftest.$ac_objext
8604 if { (eval echo "$as_me:8604: \"$ac_compile\"") >&5
8605   (eval $ac_compile) 2>&5
8606   ac_status=$?
8607   echo "$as_me:8607: \$? = $ac_status" >&5
8608   (exit $ac_status); } &&
8609          { ac_try='test -s conftest.$ac_objext'
8610   { (eval echo "$as_me:8610: \"$ac_try\"") >&5
8611   (eval $ac_try) 2>&5
8612   ac_status=$?
8613   echo "$as_me:8613: \$? = $ac_status" >&5
8614   (exit $ac_status); }; }; then
8615   cf_cv_xopen_source=no
8616 else
8617   echo "$as_me: failed program was:" >&5
8618 cat conftest.$ac_ext >&5
8619 cf_save="$CPPFLAGS"
8620          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8621          cat >conftest.$ac_ext <<_ACEOF
8622 #line 8622 "configure"
8623 #include "confdefs.h"
8624
8625 #include <stdlib.h>
8626 #include <string.h>
8627 #include <sys/types.h>
8628
8629 int
8630 main ()
8631 {
8632
8633 #ifdef _XOPEN_SOURCE
8634 make an error
8635 #endif
8636   ;
8637   return 0;
8638 }
8639 _ACEOF
8640 rm -f conftest.$ac_objext
8641 if { (eval echo "$as_me:8641: \"$ac_compile\"") >&5
8642   (eval $ac_compile) 2>&5
8643   ac_status=$?
8644   echo "$as_me:8644: \$? = $ac_status" >&5
8645   (exit $ac_status); } &&
8646          { ac_try='test -s conftest.$ac_objext'
8647   { (eval echo "$as_me:8647: \"$ac_try\"") >&5
8648   (eval $ac_try) 2>&5
8649   ac_status=$?
8650   echo "$as_me:8650: \$? = $ac_status" >&5
8651   (exit $ac_status); }; }; then
8652   cf_cv_xopen_source=no
8653 else
8654   echo "$as_me: failed program was:" >&5
8655 cat conftest.$ac_ext >&5
8656 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8657 fi
8658 rm -f conftest.$ac_objext conftest.$ac_ext
8659         CPPFLAGS="$cf_save"
8660
8661 fi
8662 rm -f conftest.$ac_objext conftest.$ac_ext
8663
8664 fi
8665 echo "$as_me:8665: result: $cf_cv_xopen_source" >&5
8666 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8667
8668 if test "$cf_cv_xopen_source" != no ; then
8669
8670 CFLAGS=`echo "$CFLAGS" | \
8671         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8672                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8673
8674 CPPFLAGS=`echo "$CPPFLAGS" | \
8675         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8676                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8677
8678         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8679
8680 cf_fix_cppflags=no
8681 cf_new_cflags=
8682 cf_new_cppflags=
8683 cf_new_extra_cppflags=
8684
8685 for cf_add_cflags in $cf_temp_xopen_source
8686 do
8687 case $cf_fix_cppflags in
8688 no)
8689         case $cf_add_cflags in #(vi
8690         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8691                 case $cf_add_cflags in
8692                 -D*)
8693                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8694
8695                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8696                                 && test -z "${cf_tst_cflags}" \
8697                                 && cf_fix_cppflags=yes
8698
8699                         if test $cf_fix_cppflags = yes ; then
8700                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8701                                 continue
8702                         elif test "${cf_tst_cflags}" = "\"'" ; then
8703                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8704                                 continue
8705                         fi
8706                         ;;
8707                 esac
8708                 case "$CPPFLAGS" in
8709                 *$cf_add_cflags) #(vi
8710                         ;;
8711                 *) #(vi
8712                         case $cf_add_cflags in #(vi
8713                         -D*)
8714                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8715
8716 CPPFLAGS=`echo "$CPPFLAGS" | \
8717         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8718                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8719
8720                                 ;;
8721                         esac
8722                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8723                         ;;
8724                 esac
8725                 ;;
8726         *)
8727                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8728                 ;;
8729         esac
8730         ;;
8731 yes)
8732         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8733
8734         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8735
8736         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8737                 && test -z "${cf_tst_cflags}" \
8738                 && cf_fix_cppflags=no
8739         ;;
8740 esac
8741 done
8742
8743 if test -n "$cf_new_cflags" ; then
8744
8745         CFLAGS="$CFLAGS $cf_new_cflags"
8746 fi
8747
8748 if test -n "$cf_new_cppflags" ; then
8749
8750         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8751 fi
8752
8753 if test -n "$cf_new_extra_cppflags" ; then
8754
8755         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8756 fi
8757
8758 fi
8759
8760         fi
8761 fi
8762
8763 # Work around breakage on OS X
8764
8765 echo "$as_me:8765: checking if SIGWINCH is defined" >&5
8766 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8767 if test "${cf_cv_define_sigwinch+set}" = set; then
8768   echo $ECHO_N "(cached) $ECHO_C" >&6
8769 else
8770
8771         cat >conftest.$ac_ext <<_ACEOF
8772 #line 8772 "configure"
8773 #include "confdefs.h"
8774
8775 #include <sys/types.h>
8776 #include <sys/signal.h>
8777
8778 int
8779 main ()
8780 {
8781 int x = SIGWINCH
8782   ;
8783   return 0;
8784 }
8785 _ACEOF
8786 rm -f conftest.$ac_objext
8787 if { (eval echo "$as_me:8787: \"$ac_compile\"") >&5
8788   (eval $ac_compile) 2>&5
8789   ac_status=$?
8790   echo "$as_me:8790: \$? = $ac_status" >&5
8791   (exit $ac_status); } &&
8792          { ac_try='test -s conftest.$ac_objext'
8793   { (eval echo "$as_me:8793: \"$ac_try\"") >&5
8794   (eval $ac_try) 2>&5
8795   ac_status=$?
8796   echo "$as_me:8796: \$? = $ac_status" >&5
8797   (exit $ac_status); }; }; then
8798   cf_cv_define_sigwinch=yes
8799 else
8800   echo "$as_me: failed program was:" >&5
8801 cat conftest.$ac_ext >&5
8802 cat >conftest.$ac_ext <<_ACEOF
8803 #line 8803 "configure"
8804 #include "confdefs.h"
8805
8806 #undef _XOPEN_SOURCE
8807 #undef _POSIX_SOURCE
8808 #undef _POSIX_C_SOURCE
8809 #include <sys/types.h>
8810 #include <sys/signal.h>
8811
8812 int
8813 main ()
8814 {
8815 int x = SIGWINCH
8816   ;
8817   return 0;
8818 }
8819 _ACEOF
8820 rm -f conftest.$ac_objext
8821 if { (eval echo "$as_me:8821: \"$ac_compile\"") >&5
8822   (eval $ac_compile) 2>&5
8823   ac_status=$?
8824   echo "$as_me:8824: \$? = $ac_status" >&5
8825   (exit $ac_status); } &&
8826          { ac_try='test -s conftest.$ac_objext'
8827   { (eval echo "$as_me:8827: \"$ac_try\"") >&5
8828   (eval $ac_try) 2>&5
8829   ac_status=$?
8830   echo "$as_me:8830: \$? = $ac_status" >&5
8831   (exit $ac_status); }; }; then
8832   cf_cv_define_sigwinch=maybe
8833 else
8834   echo "$as_me: failed program was:" >&5
8835 cat conftest.$ac_ext >&5
8836 cf_cv_define_sigwinch=no
8837 fi
8838 rm -f conftest.$ac_objext conftest.$ac_ext
8839
8840 fi
8841 rm -f conftest.$ac_objext conftest.$ac_ext
8842
8843 fi
8844 echo "$as_me:8844: result: $cf_cv_define_sigwinch" >&5
8845 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8846
8847 if test "$cf_cv_define_sigwinch" = maybe ; then
8848 echo "$as_me:8848: checking for actual SIGWINCH definition" >&5
8849 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8850 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8851   echo $ECHO_N "(cached) $ECHO_C" >&6
8852 else
8853
8854 cf_cv_fixup_sigwinch=unknown
8855 cf_sigwinch=32
8856 while test $cf_sigwinch != 1
8857 do
8858         cat >conftest.$ac_ext <<_ACEOF
8859 #line 8859 "configure"
8860 #include "confdefs.h"
8861
8862 #undef _XOPEN_SOURCE
8863 #undef _POSIX_SOURCE
8864 #undef _POSIX_C_SOURCE
8865 #include <sys/types.h>
8866 #include <sys/signal.h>
8867
8868 int
8869 main ()
8870 {
8871
8872 #if SIGWINCH != $cf_sigwinch
8873 make an error
8874 #endif
8875 int x = SIGWINCH
8876   ;
8877   return 0;
8878 }
8879 _ACEOF
8880 rm -f conftest.$ac_objext
8881 if { (eval echo "$as_me:8881: \"$ac_compile\"") >&5
8882   (eval $ac_compile) 2>&5
8883   ac_status=$?
8884   echo "$as_me:8884: \$? = $ac_status" >&5
8885   (exit $ac_status); } &&
8886          { ac_try='test -s conftest.$ac_objext'
8887   { (eval echo "$as_me:8887: \"$ac_try\"") >&5
8888   (eval $ac_try) 2>&5
8889   ac_status=$?
8890   echo "$as_me:8890: \$? = $ac_status" >&5
8891   (exit $ac_status); }; }; then
8892   cf_cv_fixup_sigwinch=$cf_sigwinch
8893          break
8894 else
8895   echo "$as_me: failed program was:" >&5
8896 cat conftest.$ac_ext >&5
8897 fi
8898 rm -f conftest.$ac_objext conftest.$ac_ext
8899
8900 cf_sigwinch=`expr $cf_sigwinch - 1`
8901 done
8902
8903 fi
8904 echo "$as_me:8904: result: $cf_cv_fixup_sigwinch" >&5
8905 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8906
8907         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8908                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8909         fi
8910 fi
8911
8912 # Checks for CODESET support.
8913
8914   echo "$as_me:8914: checking for nl_langinfo and CODESET" >&5
8915 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8916 if test "${am_cv_langinfo_codeset+set}" = set; then
8917   echo $ECHO_N "(cached) $ECHO_C" >&6
8918 else
8919   cat >conftest.$ac_ext <<_ACEOF
8920 #line 8920 "configure"
8921 #include "confdefs.h"
8922 #include <langinfo.h>
8923 int
8924 main ()
8925 {
8926 char* cs = nl_langinfo(CODESET);
8927   ;
8928   return 0;
8929 }
8930 _ACEOF
8931 rm -f conftest.$ac_objext conftest$ac_exeext
8932 if { (eval echo "$as_me:8932: \"$ac_link\"") >&5
8933   (eval $ac_link) 2>&5
8934   ac_status=$?
8935   echo "$as_me:8935: \$? = $ac_status" >&5
8936   (exit $ac_status); } &&
8937          { ac_try='test -s conftest$ac_exeext'
8938   { (eval echo "$as_me:8938: \"$ac_try\"") >&5
8939   (eval $ac_try) 2>&5
8940   ac_status=$?
8941   echo "$as_me:8941: \$? = $ac_status" >&5
8942   (exit $ac_status); }; }; then
8943   am_cv_langinfo_codeset=yes
8944 else
8945   echo "$as_me: failed program was:" >&5
8946 cat conftest.$ac_ext >&5
8947 am_cv_langinfo_codeset=no
8948 fi
8949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8950
8951 fi
8952 echo "$as_me:8952: result: $am_cv_langinfo_codeset" >&5
8953 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8954   if test $am_cv_langinfo_codeset = yes; then
8955
8956 cat >>confdefs.h <<\EOF
8957 #define HAVE_LANGINFO_CODESET 1
8958 EOF
8959
8960   fi
8961
8962 # use these variables to work around a defect in gcc's fixincludes.
8963 NCURSES_OK_WCHAR_T=
8964 NCURSES_OK_WINT_T=
8965
8966 echo "$as_me:8966: checking if you want wide-character code" >&5
8967 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8968
8969 # Check whether --enable-widec or --disable-widec was given.
8970 if test "${enable_widec+set}" = set; then
8971   enableval="$enable_widec"
8972   with_widec=$enableval
8973 else
8974   with_widec=no
8975 fi;
8976 echo "$as_me:8976: result: $with_widec" >&5
8977 echo "${ECHO_T}$with_widec" >&6
8978 if test "x$with_widec" = xyes ; then
8979         if test "x$disable_lib_suffixes" = xno ; then
8980                 LIB_SUFFIX="w${LIB_SUFFIX}"
8981         fi
8982
8983 cat >>confdefs.h <<\EOF
8984 #define USE_WIDEC_SUPPORT 1
8985 EOF
8986
8987 cat >>confdefs.h <<\EOF
8988 #define NCURSES_WIDECHAR 1
8989 EOF
8990
8991 echo "$as_me:8991: checking if wchar.h can be used as is" >&5
8992 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8993 if test "${cf_cv_wchar_h_okay+set}" = set; then
8994   echo $ECHO_N "(cached) $ECHO_C" >&6
8995 else
8996
8997 cat >conftest.$ac_ext <<_ACEOF
8998 #line 8998 "configure"
8999 #include "confdefs.h"
9000
9001 #include <stdlib.h>
9002 #include <wchar.h>
9003
9004 int
9005 main ()
9006 {
9007
9008         wint_t foo = 0;
9009         int bar = iswpunct(foo)
9010   ;
9011   return 0;
9012 }
9013 _ACEOF
9014 rm -f conftest.$ac_objext
9015 if { (eval echo "$as_me:9015: \"$ac_compile\"") >&5
9016   (eval $ac_compile) 2>&5
9017   ac_status=$?
9018   echo "$as_me:9018: \$? = $ac_status" >&5
9019   (exit $ac_status); } &&
9020          { ac_try='test -s conftest.$ac_objext'
9021   { (eval echo "$as_me:9021: \"$ac_try\"") >&5
9022   (eval $ac_try) 2>&5
9023   ac_status=$?
9024   echo "$as_me:9024: \$? = $ac_status" >&5
9025   (exit $ac_status); }; }; then
9026   cf_cv_wchar_h_okay=yes
9027 else
9028   echo "$as_me: failed program was:" >&5
9029 cat conftest.$ac_ext >&5
9030 cf_cv_wchar_h_okay=no
9031 fi
9032 rm -f conftest.$ac_objext conftest.$ac_ext
9033 fi
9034 echo "$as_me:9034: result: $cf_cv_wchar_h_okay" >&5
9035 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9036
9037 if test $cf_cv_wchar_h_okay = no
9038 then
9039
9040 echo "$as_me:9040: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9041 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9042 cat >conftest.$ac_ext <<_ACEOF
9043 #line 9043 "configure"
9044 #include "confdefs.h"
9045 #include <sys/types.h>
9046
9047 int
9048 main ()
9049 {
9050
9051 #ifndef _XOPEN_SOURCE_EXTENDED
9052 make an error
9053 #endif
9054   ;
9055   return 0;
9056 }
9057 _ACEOF
9058 rm -f conftest.$ac_objext
9059 if { (eval echo "$as_me:9059: \"$ac_compile\"") >&5
9060   (eval $ac_compile) 2>&5
9061   ac_status=$?
9062   echo "$as_me:9062: \$? = $ac_status" >&5
9063   (exit $ac_status); } &&
9064          { ac_try='test -s conftest.$ac_objext'
9065   { (eval echo "$as_me:9065: \"$ac_try\"") >&5
9066   (eval $ac_try) 2>&5
9067   ac_status=$?
9068   echo "$as_me:9068: \$? = $ac_status" >&5
9069   (exit $ac_status); }; }; then
9070   cf_result=no
9071 else
9072   echo "$as_me: failed program was:" >&5
9073 cat conftest.$ac_ext >&5
9074 cf_result=yes
9075 fi
9076 rm -f conftest.$ac_objext conftest.$ac_ext
9077 echo "$as_me:9077: result: $cf_result" >&5
9078 echo "${ECHO_T}$cf_result" >&6
9079
9080 if test "$cf_result" = yes ; then
9081         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9082 elif test "x" != "x" ; then
9083         echo "$as_me:9083: checking checking for compatible value versus " >&5
9084 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9085         cat >conftest.$ac_ext <<_ACEOF
9086 #line 9086 "configure"
9087 #include "confdefs.h"
9088 #include <sys/types.h>
9089
9090 int
9091 main ()
9092 {
9093
9094 #if _XOPEN_SOURCE_EXTENDED- < 0
9095 make an error
9096 #endif
9097   ;
9098   return 0;
9099 }
9100 _ACEOF
9101 rm -f conftest.$ac_objext
9102 if { (eval echo "$as_me:9102: \"$ac_compile\"") >&5
9103   (eval $ac_compile) 2>&5
9104   ac_status=$?
9105   echo "$as_me:9105: \$? = $ac_status" >&5
9106   (exit $ac_status); } &&
9107          { ac_try='test -s conftest.$ac_objext'
9108   { (eval echo "$as_me:9108: \"$ac_try\"") >&5
9109   (eval $ac_try) 2>&5
9110   ac_status=$?
9111   echo "$as_me:9111: \$? = $ac_status" >&5
9112   (exit $ac_status); }; }; then
9113   cf_result=yes
9114 else
9115   echo "$as_me: failed program was:" >&5
9116 cat conftest.$ac_ext >&5
9117 cf_result=no
9118 fi
9119 rm -f conftest.$ac_objext conftest.$ac_ext
9120         echo "$as_me:9120: result: $cf_result" >&5
9121 echo "${ECHO_T}$cf_result" >&6
9122         if test "$cf_result" = no ; then
9123                 # perhaps we can override it - try...
9124                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9125         fi
9126 fi
9127
9128 fi
9129
9130         # with_overwrite=no
9131         NCURSES_CH_T=cchar_t
9132
9133 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9134 do
9135 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9136 echo "$as_me:9136: checking for $ac_func" >&5
9137 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9138 if eval "test \"\${$as_ac_var+set}\" = set"; then
9139   echo $ECHO_N "(cached) $ECHO_C" >&6
9140 else
9141   cat >conftest.$ac_ext <<_ACEOF
9142 #line 9142 "configure"
9143 #include "confdefs.h"
9144 /* System header to define __stub macros and hopefully few prototypes,
9145     which can conflict with char $ac_func (); below.  */
9146 #include <assert.h>
9147 /* Override any gcc2 internal prototype to avoid an error.  */
9148 #ifdef __cplusplus
9149 extern "C"
9150 #endif
9151 /* We use char because int might match the return type of a gcc2
9152    builtin and then its argument prototype would still apply.  */
9153 char $ac_func ();
9154 char (*f) ();
9155
9156 int
9157 main ()
9158 {
9159 /* The GNU C library defines this for functions which it implements
9160     to always fail with ENOSYS.  Some functions are actually named
9161     something starting with __ and the normal name is an alias.  */
9162 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9163 choke me
9164 #else
9165 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9166 #endif
9167
9168   ;
9169   return 0;
9170 }
9171 _ACEOF
9172 rm -f conftest.$ac_objext conftest$ac_exeext
9173 if { (eval echo "$as_me:9173: \"$ac_link\"") >&5
9174   (eval $ac_link) 2>&5
9175   ac_status=$?
9176   echo "$as_me:9176: \$? = $ac_status" >&5
9177   (exit $ac_status); } &&
9178          { ac_try='test -s conftest$ac_exeext'
9179   { (eval echo "$as_me:9179: \"$ac_try\"") >&5
9180   (eval $ac_try) 2>&5
9181   ac_status=$?
9182   echo "$as_me:9182: \$? = $ac_status" >&5
9183   (exit $ac_status); }; }; then
9184   eval "$as_ac_var=yes"
9185 else
9186   echo "$as_me: failed program was:" >&5
9187 cat conftest.$ac_ext >&5
9188 eval "$as_ac_var=no"
9189 fi
9190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9191 fi
9192 echo "$as_me:9192: result: `eval echo '${'$as_ac_var'}'`" >&5
9193 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9194 if test `eval echo '${'$as_ac_var'}'` = yes; then
9195   cat >>confdefs.h <<EOF
9196 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9197 EOF
9198
9199 fi
9200 done
9201
9202         if test "x$ac_cv_func_putwc" != xyes ; then
9203
9204 echo "$as_me:9204: checking for multibyte character support" >&5
9205 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9206 if test "${cf_cv_utf8_lib+set}" = set; then
9207   echo $ECHO_N "(cached) $ECHO_C" >&6
9208 else
9209
9210         cf_save_LIBS="$LIBS"
9211         cat >conftest.$ac_ext <<_ACEOF
9212 #line 9212 "configure"
9213 #include "confdefs.h"
9214
9215 #include <stdlib.h>
9216 int
9217 main ()
9218 {
9219 putwc(0,0);
9220   ;
9221   return 0;
9222 }
9223 _ACEOF
9224 rm -f conftest.$ac_objext conftest$ac_exeext
9225 if { (eval echo "$as_me:9225: \"$ac_link\"") >&5
9226   (eval $ac_link) 2>&5
9227   ac_status=$?
9228   echo "$as_me:9228: \$? = $ac_status" >&5
9229   (exit $ac_status); } &&
9230          { ac_try='test -s conftest$ac_exeext'
9231   { (eval echo "$as_me:9231: \"$ac_try\"") >&5
9232   (eval $ac_try) 2>&5
9233   ac_status=$?
9234   echo "$as_me:9234: \$? = $ac_status" >&5
9235   (exit $ac_status); }; }; then
9236   cf_cv_utf8_lib=yes
9237 else
9238   echo "$as_me: failed program was:" >&5
9239 cat conftest.$ac_ext >&5
9240
9241 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9242 # will be set on completion of the AC_TRY_LINK below.
9243 cf_cv_header_path_utf8=
9244 cf_cv_library_path_utf8=
9245
9246 echo "${as_me:-configure}:9246: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9247
9248 cf_save_LIBS="$LIBS"
9249
9250 cat >conftest.$ac_ext <<_ACEOF
9251 #line 9251 "configure"
9252 #include "confdefs.h"
9253
9254 #include <libutf8.h>
9255 int
9256 main ()
9257 {
9258 putwc(0,0);
9259   ;
9260   return 0;
9261 }
9262 _ACEOF
9263 rm -f conftest.$ac_objext conftest$ac_exeext
9264 if { (eval echo "$as_me:9264: \"$ac_link\"") >&5
9265   (eval $ac_link) 2>&5
9266   ac_status=$?
9267   echo "$as_me:9267: \$? = $ac_status" >&5
9268   (exit $ac_status); } &&
9269          { ac_try='test -s conftest$ac_exeext'
9270   { (eval echo "$as_me:9270: \"$ac_try\"") >&5
9271   (eval $ac_try) 2>&5
9272   ac_status=$?
9273   echo "$as_me:9273: \$? = $ac_status" >&5
9274   (exit $ac_status); }; }; then
9275
9276         cf_cv_find_linkage_utf8=yes
9277         cf_cv_header_path_utf8=/usr/include
9278         cf_cv_library_path_utf8=/usr/lib
9279
9280 else
9281   echo "$as_me: failed program was:" >&5
9282 cat conftest.$ac_ext >&5
9283
9284 LIBS="-lutf8  $cf_save_LIBS"
9285
9286 cat >conftest.$ac_ext <<_ACEOF
9287 #line 9287 "configure"
9288 #include "confdefs.h"
9289
9290 #include <libutf8.h>
9291 int
9292 main ()
9293 {
9294 putwc(0,0);
9295   ;
9296   return 0;
9297 }
9298 _ACEOF
9299 rm -f conftest.$ac_objext conftest$ac_exeext
9300 if { (eval echo "$as_me:9300: \"$ac_link\"") >&5
9301   (eval $ac_link) 2>&5
9302   ac_status=$?
9303   echo "$as_me:9303: \$? = $ac_status" >&5
9304   (exit $ac_status); } &&
9305          { ac_try='test -s conftest$ac_exeext'
9306   { (eval echo "$as_me:9306: \"$ac_try\"") >&5
9307   (eval $ac_try) 2>&5
9308   ac_status=$?
9309   echo "$as_me:9309: \$? = $ac_status" >&5
9310   (exit $ac_status); }; }; then
9311
9312         cf_cv_find_linkage_utf8=yes
9313         cf_cv_header_path_utf8=/usr/include
9314         cf_cv_library_path_utf8=/usr/lib
9315         cf_cv_library_file_utf8="-lutf8"
9316
9317 else
9318   echo "$as_me: failed program was:" >&5
9319 cat conftest.$ac_ext >&5
9320
9321         cf_cv_find_linkage_utf8=no
9322         LIBS="$cf_save_LIBS"
9323
9324     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9325
9326 echo "${as_me:-configure}:9326: testing find linkage for utf8 library ..." 1>&5
9327
9328 echo "${as_me:-configure}:9328: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9329
9330     cf_save_CPPFLAGS="$CPPFLAGS"
9331     cf_test_CPPFLAGS="$CPPFLAGS"
9332
9333 cf_search=
9334
9335 # collect the current set of include-directories from compiler flags
9336 cf_header_path_list=""
9337 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9338         for cf_header_path in $CPPFLAGS $CFLAGS
9339         do
9340                 case $cf_header_path in #(vi
9341                 -I*)
9342                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9343
9344 test "x$cf_header_path" != "xNONE" && \
9345 test -d "$cf_header_path" && \
9346  {
9347         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9348         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9349         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9350         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9351         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9352         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9353 }
9354
9355                         cf_header_path_list="$cf_header_path_list $cf_search"
9356                         ;;
9357                 esac
9358         done
9359 fi
9360
9361 # add the variations for the package we are looking for
9362
9363 cf_search=
9364
9365 test "x$prefix" != "xNONE" && \
9366 test -d "$prefix" && \
9367  {
9368         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9369         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9370         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9371         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9372         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9373         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9374 }
9375
9376 for cf_subdir_prefix in \
9377         /usr \
9378         /usr/local \
9379         /usr/pkg \
9380         /opt \
9381         /opt/local \
9382         $HOME
9383 do
9384
9385 test "x$cf_subdir_prefix" != "x$prefix" && \
9386 test -d "$cf_subdir_prefix" && \
9387 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9388         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9389         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9390         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9391         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9392         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9393         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9394 }
9395
9396 done
9397
9398 test "$includedir" != NONE && \
9399 test "$includedir" != "/usr/include" && \
9400 test -d "$includedir" && {
9401         test -d $includedir &&    cf_search="$cf_search $includedir"
9402         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9403 }
9404
9405 test "$oldincludedir" != NONE && \
9406 test "$oldincludedir" != "/usr/include" && \
9407 test -d "$oldincludedir" && {
9408         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9409         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9410 }
9411
9412 cf_search="$cf_search $cf_header_path_list"
9413
9414     for cf_cv_header_path_utf8 in $cf_search
9415     do
9416       if test -d $cf_cv_header_path_utf8 ; then
9417         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9418
9419 echo "${as_me:-configure}:9419: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9420
9421         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9422         cat >conftest.$ac_ext <<_ACEOF
9423 #line 9423 "configure"
9424 #include "confdefs.h"
9425
9426 #include <libutf8.h>
9427 int
9428 main ()
9429 {
9430 putwc(0,0);
9431   ;
9432   return 0;
9433 }
9434 _ACEOF
9435 rm -f conftest.$ac_objext
9436 if { (eval echo "$as_me:9436: \"$ac_compile\"") >&5
9437   (eval $ac_compile) 2>&5
9438   ac_status=$?
9439   echo "$as_me:9439: \$? = $ac_status" >&5
9440   (exit $ac_status); } &&
9441          { ac_try='test -s conftest.$ac_objext'
9442   { (eval echo "$as_me:9442: \"$ac_try\"") >&5
9443   (eval $ac_try) 2>&5
9444   ac_status=$?
9445   echo "$as_me:9445: \$? = $ac_status" >&5
9446   (exit $ac_status); }; }; then
9447
9448             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9449
9450 echo "${as_me:-configure}:9450: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9451
9452             cf_cv_find_linkage_utf8=maybe
9453             cf_test_CPPFLAGS="$CPPFLAGS"
9454             break
9455 else
9456   echo "$as_me: failed program was:" >&5
9457 cat conftest.$ac_ext >&5
9458
9459             CPPFLAGS="$cf_save_CPPFLAGS"
9460
9461 fi
9462 rm -f conftest.$ac_objext conftest.$ac_ext
9463       fi
9464     done
9465
9466     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9467
9468 echo "${as_me:-configure}:9468: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9469
9470       cf_save_LIBS="$LIBS"
9471       cf_save_LDFLAGS="$LDFLAGS"
9472
9473       if test "$cf_cv_find_linkage_utf8" != yes ; then
9474
9475 cf_search=
9476 cf_library_path_list=""
9477 if test -n "${LDFLAGS}${LIBS}" ; then
9478         for cf_library_path in $LDFLAGS $LIBS
9479         do
9480                 case $cf_library_path in #(vi
9481                 -L*)
9482                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9483
9484 test "x$cf_library_path" != "xNONE" && \
9485 test -d "$cf_library_path" && \
9486  {
9487         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9488         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9489         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9490         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9491         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9492         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9493 }
9494
9495                         cf_library_path_list="$cf_library_path_list $cf_search"
9496                         ;;
9497                 esac
9498         done
9499 fi
9500
9501 cf_search=
9502
9503 test "x$prefix" != "xNONE" && \
9504 test -d "$prefix" && \
9505  {
9506         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9507         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9508         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9509         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9510         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9511         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9512 }
9513
9514 for cf_subdir_prefix in \
9515         /usr \
9516         /usr/local \
9517         /usr/pkg \
9518         /opt \
9519         /opt/local \
9520         $HOME
9521 do
9522
9523 test "x$cf_subdir_prefix" != "x$prefix" && \
9524 test -d "$cf_subdir_prefix" && \
9525 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9526         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9527         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9528         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9529         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9530         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9531         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9532 }
9533
9534 done
9535
9536 cf_search="$cf_library_path_list $cf_search"
9537
9538         for cf_cv_library_path_utf8 in $cf_search
9539         do
9540           if test -d $cf_cv_library_path_utf8 ; then
9541             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9542
9543 echo "${as_me:-configure}:9543: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9544
9545             CPPFLAGS="$cf_test_CPPFLAGS"
9546             LIBS="-lutf8  $cf_save_LIBS"
9547             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9548             cat >conftest.$ac_ext <<_ACEOF
9549 #line 9549 "configure"
9550 #include "confdefs.h"
9551
9552 #include <libutf8.h>
9553 int
9554 main ()
9555 {
9556 putwc(0,0);
9557   ;
9558   return 0;
9559 }
9560 _ACEOF
9561 rm -f conftest.$ac_objext conftest$ac_exeext
9562 if { (eval echo "$as_me:9562: \"$ac_link\"") >&5
9563   (eval $ac_link) 2>&5
9564   ac_status=$?
9565   echo "$as_me:9565: \$? = $ac_status" >&5
9566   (exit $ac_status); } &&
9567          { ac_try='test -s conftest$ac_exeext'
9568   { (eval echo "$as_me:9568: \"$ac_try\"") >&5
9569   (eval $ac_try) 2>&5
9570   ac_status=$?
9571   echo "$as_me:9571: \$? = $ac_status" >&5
9572   (exit $ac_status); }; }; then
9573
9574                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9575
9576 echo "${as_me:-configure}:9576: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9577
9578                 cf_cv_find_linkage_utf8=yes
9579                 cf_cv_library_file_utf8="-lutf8"
9580                 break
9581 else
9582   echo "$as_me: failed program was:" >&5
9583 cat conftest.$ac_ext >&5
9584
9585                 CPPFLAGS="$cf_save_CPPFLAGS"
9586                 LIBS="$cf_save_LIBS"
9587                 LDFLAGS="$cf_save_LDFLAGS"
9588
9589 fi
9590 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9591           fi
9592         done
9593         CPPFLAGS="$cf_save_CPPFLAGS"
9594         LDFLAGS="$cf_save_LDFLAGS"
9595       fi
9596
9597     else
9598       cf_cv_find_linkage_utf8=no
9599     fi
9600
9601 fi
9602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9603
9604 fi
9605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9606
9607 LIBS="$cf_save_LIBS"
9608
9609 if test "$cf_cv_find_linkage_utf8" = yes ; then
9610 cf_cv_utf8_lib=add-on
9611 else
9612 cf_cv_utf8_lib=no
9613 fi
9614
9615 fi
9616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9617 fi
9618 echo "$as_me:9618: result: $cf_cv_utf8_lib" >&5
9619 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9620
9621 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9622 # ncurses/ncursesw:
9623 if test "$cf_cv_utf8_lib" = "add-on" ; then
9624
9625 cat >>confdefs.h <<\EOF
9626 #define HAVE_LIBUTF8_H 1
9627 EOF
9628
9629 if test -n "$cf_cv_header_path_utf8" ; then
9630   for cf_add_incdir in $cf_cv_header_path_utf8
9631   do
9632         while test $cf_add_incdir != /usr/include
9633         do
9634           if test -d $cf_add_incdir
9635           then
9636                 cf_have_incdir=no
9637                 if test -n "$CFLAGS$CPPFLAGS" ; then
9638                   # a loop is needed to ensure we can add subdirs of existing dirs
9639                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9640                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9641                           cf_have_incdir=yes; break
9642                         fi
9643                   done
9644                 fi
9645
9646                 if test "$cf_have_incdir" = no ; then
9647                   if test "$cf_add_incdir" = /usr/local/include ; then
9648                         if test "$GCC" = yes
9649                         then
9650                           cf_save_CPPFLAGS=$CPPFLAGS
9651                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9652                           cat >conftest.$ac_ext <<_ACEOF
9653 #line 9653 "configure"
9654 #include "confdefs.h"
9655 #include <stdio.h>
9656 int
9657 main ()
9658 {
9659 printf("Hello")
9660   ;
9661   return 0;
9662 }
9663 _ACEOF
9664 rm -f conftest.$ac_objext
9665 if { (eval echo "$as_me:9665: \"$ac_compile\"") >&5
9666   (eval $ac_compile) 2>&5
9667   ac_status=$?
9668   echo "$as_me:9668: \$? = $ac_status" >&5
9669   (exit $ac_status); } &&
9670          { ac_try='test -s conftest.$ac_objext'
9671   { (eval echo "$as_me:9671: \"$ac_try\"") >&5
9672   (eval $ac_try) 2>&5
9673   ac_status=$?
9674   echo "$as_me:9674: \$? = $ac_status" >&5
9675   (exit $ac_status); }; }; then
9676   :
9677 else
9678   echo "$as_me: failed program was:" >&5
9679 cat conftest.$ac_ext >&5
9680 cf_have_incdir=yes
9681 fi
9682 rm -f conftest.$ac_objext conftest.$ac_ext
9683                           CPPFLAGS=$cf_save_CPPFLAGS
9684                         fi
9685                   fi
9686                 fi
9687
9688                 if test "$cf_have_incdir" = no ; then
9689                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9690
9691 echo "${as_me:-configure}:9691: testing adding $cf_add_incdir to include-path ..." 1>&5
9692
9693                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9694
9695                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9696                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9697                   cf_add_incdir="$cf_top_incdir"
9698                 else
9699                   break
9700                 fi
9701           fi
9702         done
9703   done
9704 fi
9705
9706 if test -n "$cf_cv_library_path_utf8" ; then
9707   for cf_add_libdir in $cf_cv_library_path_utf8
9708   do
9709     if test $cf_add_libdir = /usr/lib ; then
9710       :
9711     elif test -d $cf_add_libdir
9712     then
9713       cf_have_libdir=no
9714       if test -n "$LDFLAGS$LIBS" ; then
9715         # a loop is needed to ensure we can add subdirs of existing dirs
9716         for cf_test_libdir in $LDFLAGS $LIBS ; do
9717           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9718             cf_have_libdir=yes; break
9719           fi
9720         done
9721       fi
9722       if test "$cf_have_libdir" = no ; then
9723         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9724
9725 echo "${as_me:-configure}:9725: testing adding $cf_add_libdir to library-path ..." 1>&5
9726
9727         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9728       fi
9729     fi
9730   done
9731 fi
9732
9733 cf_add_libs="$cf_cv_library_file_utf8"
9734 # Filter out duplicates - this happens with badly-designed ".pc" files...
9735 for cf_add_1lib in $LIBS
9736 do
9737         for cf_add_2lib in $cf_add_libs
9738         do
9739                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9740                 then
9741                         cf_add_1lib=
9742                         break
9743                 fi
9744         done
9745         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9746 done
9747 LIBS="$cf_add_libs"
9748
9749 fi
9750
9751                 if test "$cf_cv_utf8_lib" != no ; then
9752                         NCURSES_LIBUTF8=1
9753                 fi
9754         fi
9755
9756 # This is needed on Tru64 5.0 to declare mbstate_t
9757 echo "$as_me:9757: checking if we must include wchar.h to declare mbstate_t" >&5
9758 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9759 if test "${cf_cv_mbstate_t+set}" = set; then
9760   echo $ECHO_N "(cached) $ECHO_C" >&6
9761 else
9762
9763 cat >conftest.$ac_ext <<_ACEOF
9764 #line 9764 "configure"
9765 #include "confdefs.h"
9766
9767 #include <stdlib.h>
9768 #include <stdarg.h>
9769 #include <stdio.h>
9770 #ifdef HAVE_LIBUTF8_H
9771 #include <libutf8.h>
9772 #endif
9773 int
9774 main ()
9775 {
9776 mbstate_t state
9777   ;
9778   return 0;
9779 }
9780 _ACEOF
9781 rm -f conftest.$ac_objext
9782 if { (eval echo "$as_me:9782: \"$ac_compile\"") >&5
9783   (eval $ac_compile) 2>&5
9784   ac_status=$?
9785   echo "$as_me:9785: \$? = $ac_status" >&5
9786   (exit $ac_status); } &&
9787          { ac_try='test -s conftest.$ac_objext'
9788   { (eval echo "$as_me:9788: \"$ac_try\"") >&5
9789   (eval $ac_try) 2>&5
9790   ac_status=$?
9791   echo "$as_me:9791: \$? = $ac_status" >&5
9792   (exit $ac_status); }; }; then
9793   cf_cv_mbstate_t=no
9794 else
9795   echo "$as_me: failed program was:" >&5
9796 cat conftest.$ac_ext >&5
9797 cat >conftest.$ac_ext <<_ACEOF
9798 #line 9798 "configure"
9799 #include "confdefs.h"
9800
9801 #include <stdlib.h>
9802 #include <stdarg.h>
9803 #include <stdio.h>
9804 #include <wchar.h>
9805 #ifdef HAVE_LIBUTF8_H
9806 #include <libutf8.h>
9807 #endif
9808 int
9809 main ()
9810 {
9811 mbstate_t value
9812   ;
9813   return 0;
9814 }
9815 _ACEOF
9816 rm -f conftest.$ac_objext
9817 if { (eval echo "$as_me:9817: \"$ac_compile\"") >&5
9818   (eval $ac_compile) 2>&5
9819   ac_status=$?
9820   echo "$as_me:9820: \$? = $ac_status" >&5
9821   (exit $ac_status); } &&
9822          { ac_try='test -s conftest.$ac_objext'
9823   { (eval echo "$as_me:9823: \"$ac_try\"") >&5
9824   (eval $ac_try) 2>&5
9825   ac_status=$?
9826   echo "$as_me:9826: \$? = $ac_status" >&5
9827   (exit $ac_status); }; }; then
9828   cf_cv_mbstate_t=yes
9829 else
9830   echo "$as_me: failed program was:" >&5
9831 cat conftest.$ac_ext >&5
9832 cf_cv_mbstate_t=unknown
9833 fi
9834 rm -f conftest.$ac_objext conftest.$ac_ext
9835 fi
9836 rm -f conftest.$ac_objext conftest.$ac_ext
9837 fi
9838 echo "$as_me:9838: result: $cf_cv_mbstate_t" >&5
9839 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9840
9841 if test "$cf_cv_mbstate_t" = yes ; then
9842
9843 cat >>confdefs.h <<\EOF
9844 #define NEED_WCHAR_H 1
9845 EOF
9846
9847         NEED_WCHAR_H=1
9848 fi
9849
9850 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9851 if test "$cf_cv_mbstate_t" = unknown ; then
9852         NCURSES_MBSTATE_T=1
9853 fi
9854
9855 # This is needed on Tru64 5.0 to declare wchar_t
9856 echo "$as_me:9856: checking if we must include wchar.h to declare wchar_t" >&5
9857 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9858 if test "${cf_cv_wchar_t+set}" = set; then
9859   echo $ECHO_N "(cached) $ECHO_C" >&6
9860 else
9861
9862 cat >conftest.$ac_ext <<_ACEOF
9863 #line 9863 "configure"
9864 #include "confdefs.h"
9865
9866 #include <stdlib.h>
9867 #include <stdarg.h>
9868 #include <stdio.h>
9869 #ifdef HAVE_LIBUTF8_H
9870 #include <libutf8.h>
9871 #endif
9872 int
9873 main ()
9874 {
9875 wchar_t state
9876   ;
9877   return 0;
9878 }
9879 _ACEOF
9880 rm -f conftest.$ac_objext
9881 if { (eval echo "$as_me:9881: \"$ac_compile\"") >&5
9882   (eval $ac_compile) 2>&5
9883   ac_status=$?
9884   echo "$as_me:9884: \$? = $ac_status" >&5
9885   (exit $ac_status); } &&
9886          { ac_try='test -s conftest.$ac_objext'
9887   { (eval echo "$as_me:9887: \"$ac_try\"") >&5
9888   (eval $ac_try) 2>&5
9889   ac_status=$?
9890   echo "$as_me:9890: \$? = $ac_status" >&5
9891   (exit $ac_status); }; }; then
9892   cf_cv_wchar_t=no
9893 else
9894   echo "$as_me: failed program was:" >&5
9895 cat conftest.$ac_ext >&5
9896 cat >conftest.$ac_ext <<_ACEOF
9897 #line 9897 "configure"
9898 #include "confdefs.h"
9899
9900 #include <stdlib.h>
9901 #include <stdarg.h>
9902 #include <stdio.h>
9903 #include <wchar.h>
9904 #ifdef HAVE_LIBUTF8_H
9905 #include <libutf8.h>
9906 #endif
9907 int
9908 main ()
9909 {
9910 wchar_t value
9911   ;
9912   return 0;
9913 }
9914 _ACEOF
9915 rm -f conftest.$ac_objext
9916 if { (eval echo "$as_me:9916: \"$ac_compile\"") >&5
9917   (eval $ac_compile) 2>&5
9918   ac_status=$?
9919   echo "$as_me:9919: \$? = $ac_status" >&5
9920   (exit $ac_status); } &&
9921          { ac_try='test -s conftest.$ac_objext'
9922   { (eval echo "$as_me:9922: \"$ac_try\"") >&5
9923   (eval $ac_try) 2>&5
9924   ac_status=$?
9925   echo "$as_me:9925: \$? = $ac_status" >&5
9926   (exit $ac_status); }; }; then
9927   cf_cv_wchar_t=yes
9928 else
9929   echo "$as_me: failed program was:" >&5
9930 cat conftest.$ac_ext >&5
9931 cf_cv_wchar_t=unknown
9932 fi
9933 rm -f conftest.$ac_objext conftest.$ac_ext
9934 fi
9935 rm -f conftest.$ac_objext conftest.$ac_ext
9936 fi
9937 echo "$as_me:9937: result: $cf_cv_wchar_t" >&5
9938 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9939
9940 if test "$cf_cv_wchar_t" = yes ; then
9941
9942 cat >>confdefs.h <<\EOF
9943 #define NEED_WCHAR_H 1
9944 EOF
9945
9946         NEED_WCHAR_H=1
9947 fi
9948
9949 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9950 if test "$cf_cv_wchar_t" = unknown ; then
9951         NCURSES_WCHAR_T=1
9952 fi
9953
9954 # if we find wchar_t in either place, use substitution to provide a fallback.
9955 if test "$cf_cv_wchar_t" != unknown ; then
9956         NCURSES_OK_WCHAR_T=1
9957 fi
9958
9959 # This is needed on Tru64 5.0 to declare wint_t
9960 echo "$as_me:9960: checking if we must include wchar.h to declare wint_t" >&5
9961 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9962 if test "${cf_cv_wint_t+set}" = set; then
9963   echo $ECHO_N "(cached) $ECHO_C" >&6
9964 else
9965
9966 cat >conftest.$ac_ext <<_ACEOF
9967 #line 9967 "configure"
9968 #include "confdefs.h"
9969
9970 #include <stdlib.h>
9971 #include <stdarg.h>
9972 #include <stdio.h>
9973 #ifdef HAVE_LIBUTF8_H
9974 #include <libutf8.h>
9975 #endif
9976 int
9977 main ()
9978 {
9979 wint_t state
9980   ;
9981   return 0;
9982 }
9983 _ACEOF
9984 rm -f conftest.$ac_objext
9985 if { (eval echo "$as_me:9985: \"$ac_compile\"") >&5
9986   (eval $ac_compile) 2>&5
9987   ac_status=$?
9988   echo "$as_me:9988: \$? = $ac_status" >&5
9989   (exit $ac_status); } &&
9990          { ac_try='test -s conftest.$ac_objext'
9991   { (eval echo "$as_me:9991: \"$ac_try\"") >&5
9992   (eval $ac_try) 2>&5
9993   ac_status=$?
9994   echo "$as_me:9994: \$? = $ac_status" >&5
9995   (exit $ac_status); }; }; then
9996   cf_cv_wint_t=no
9997 else
9998   echo "$as_me: failed program was:" >&5
9999 cat conftest.$ac_ext >&5
10000 cat >conftest.$ac_ext <<_ACEOF
10001 #line 10001 "configure"
10002 #include "confdefs.h"
10003
10004 #include <stdlib.h>
10005 #include <stdarg.h>
10006 #include <stdio.h>
10007 #include <wchar.h>
10008 #ifdef HAVE_LIBUTF8_H
10009 #include <libutf8.h>
10010 #endif
10011 int
10012 main ()
10013 {
10014 wint_t value
10015   ;
10016   return 0;
10017 }
10018 _ACEOF
10019 rm -f conftest.$ac_objext
10020 if { (eval echo "$as_me:10020: \"$ac_compile\"") >&5
10021   (eval $ac_compile) 2>&5
10022   ac_status=$?
10023   echo "$as_me:10023: \$? = $ac_status" >&5
10024   (exit $ac_status); } &&
10025          { ac_try='test -s conftest.$ac_objext'
10026   { (eval echo "$as_me:10026: \"$ac_try\"") >&5
10027   (eval $ac_try) 2>&5
10028   ac_status=$?
10029   echo "$as_me:10029: \$? = $ac_status" >&5
10030   (exit $ac_status); }; }; then
10031   cf_cv_wint_t=yes
10032 else
10033   echo "$as_me: failed program was:" >&5
10034 cat conftest.$ac_ext >&5
10035 cf_cv_wint_t=unknown
10036 fi
10037 rm -f conftest.$ac_objext conftest.$ac_ext
10038 fi
10039 rm -f conftest.$ac_objext conftest.$ac_ext
10040 fi
10041 echo "$as_me:10041: result: $cf_cv_wint_t" >&5
10042 echo "${ECHO_T}$cf_cv_wint_t" >&6
10043
10044 if test "$cf_cv_wint_t" = yes ; then
10045
10046 cat >>confdefs.h <<\EOF
10047 #define NEED_WCHAR_H 1
10048 EOF
10049
10050         NEED_WCHAR_H=1
10051 fi
10052
10053 # if we do not find wint_t in either place, use substitution to provide a fallback.
10054 if test "$cf_cv_wint_t" = unknown ; then
10055         NCURSES_WINT_T=1
10056 fi
10057
10058 # if we find wint_t in either place, use substitution to provide a fallback.
10059 if test "$cf_cv_wint_t" != unknown ; then
10060         NCURSES_OK_WINT_T=1
10061 fi
10062
10063         if test "$NCURSES_MBSTATE_T" != 0; then
10064
10065 cat >>confdefs.h <<\EOF
10066 #define NEED_MBSTATE_T_DEF 1
10067 EOF
10068
10069         fi
10070 fi
10071
10072 ###   use option --disable-lp64 to allow long chtype
10073 case $cf_cv_abi_version in
10074 [345]*)
10075         default_with_lp64=no
10076         ;;
10077 *)
10078         default_with_lp64=yes
10079         ;;
10080 esac
10081
10082 echo "$as_me:10082: checking whether to enable _LP64 definition in curses.h" >&5
10083 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10084
10085 # Check whether --enable-lp64 or --disable-lp64 was given.
10086 if test "${enable_lp64+set}" = set; then
10087   enableval="$enable_lp64"
10088   with_lp64=$enableval
10089 else
10090   with_lp64=$default_with_lp64
10091 fi;
10092 echo "$as_me:10092: result: $with_lp64" >&5
10093 echo "${ECHO_T}$with_lp64" >&6
10094
10095 if test "x$with_lp64" = xyes ; then
10096         cf_cv_enable_lp64=1
10097 else
10098         cf_cv_enable_lp64=0
10099 fi
10100
10101 # Check whether --enable-largefile or --disable-largefile was given.
10102 if test "${enable_largefile+set}" = set; then
10103   enableval="$enable_largefile"
10104
10105 fi;
10106 if test "$enable_largefile" != no; then
10107
10108   echo "$as_me:10108: checking for special C compiler options needed for large files" >&5
10109 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10110 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10111   echo $ECHO_N "(cached) $ECHO_C" >&6
10112 else
10113   ac_cv_sys_largefile_CC=no
10114      if test "$GCC" != yes; then
10115        ac_save_CC=$CC
10116        while :; do
10117          # IRIX 6.2 and later do not support large files by default,
10118          # so use the C compiler's -n32 option if that helps.
10119          cat >conftest.$ac_ext <<_ACEOF
10120 #line 10120 "configure"
10121 #include "confdefs.h"
10122 #include <sys/types.h>
10123  /* Check that off_t can represent 2**63 - 1 correctly.
10124     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10125     since some C++ compilers masquerading as C compilers
10126     incorrectly reject 9223372036854775807.  */
10127 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10128   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10129                        && LARGE_OFF_T % 2147483647 == 1)
10130                       ? 1 : -1];
10131 int
10132 main ()
10133 {
10134
10135   ;
10136   return 0;
10137 }
10138 _ACEOF
10139          rm -f conftest.$ac_objext
10140 if { (eval echo "$as_me:10140: \"$ac_compile\"") >&5
10141   (eval $ac_compile) 2>&5
10142   ac_status=$?
10143   echo "$as_me:10143: \$? = $ac_status" >&5
10144   (exit $ac_status); } &&
10145          { ac_try='test -s conftest.$ac_objext'
10146   { (eval echo "$as_me:10146: \"$ac_try\"") >&5
10147   (eval $ac_try) 2>&5
10148   ac_status=$?
10149   echo "$as_me:10149: \$? = $ac_status" >&5
10150   (exit $ac_status); }; }; then
10151   break
10152 else
10153   echo "$as_me: failed program was:" >&5
10154 cat conftest.$ac_ext >&5
10155 fi
10156 rm -f conftest.$ac_objext
10157          CC="$CC -n32"
10158          rm -f conftest.$ac_objext
10159 if { (eval echo "$as_me:10159: \"$ac_compile\"") >&5
10160   (eval $ac_compile) 2>&5
10161   ac_status=$?
10162   echo "$as_me:10162: \$? = $ac_status" >&5
10163   (exit $ac_status); } &&
10164          { ac_try='test -s conftest.$ac_objext'
10165   { (eval echo "$as_me:10165: \"$ac_try\"") >&5
10166   (eval $ac_try) 2>&5
10167   ac_status=$?
10168   echo "$as_me:10168: \$? = $ac_status" >&5
10169   (exit $ac_status); }; }; then
10170   ac_cv_sys_largefile_CC=' -n32'; break
10171 else
10172   echo "$as_me: failed program was:" >&5
10173 cat conftest.$ac_ext >&5
10174 fi
10175 rm -f conftest.$ac_objext
10176          break
10177        done
10178        CC=$ac_save_CC
10179        rm -f conftest.$ac_ext
10180     fi
10181 fi
10182 echo "$as_me:10182: result: $ac_cv_sys_largefile_CC" >&5
10183 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10184   if test "$ac_cv_sys_largefile_CC" != no; then
10185     CC=$CC$ac_cv_sys_largefile_CC
10186   fi
10187
10188   echo "$as_me:10188: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10189 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10190 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10191   echo $ECHO_N "(cached) $ECHO_C" >&6
10192 else
10193   while :; do
10194   ac_cv_sys_file_offset_bits=no
10195   cat >conftest.$ac_ext <<_ACEOF
10196 #line 10196 "configure"
10197 #include "confdefs.h"
10198 #include <sys/types.h>
10199  /* Check that off_t can represent 2**63 - 1 correctly.
10200     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10201     since some C++ compilers masquerading as C compilers
10202     incorrectly reject 9223372036854775807.  */
10203 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10204   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10205                        && LARGE_OFF_T % 2147483647 == 1)
10206                       ? 1 : -1];
10207 int
10208 main ()
10209 {
10210
10211   ;
10212   return 0;
10213 }
10214 _ACEOF
10215 rm -f conftest.$ac_objext
10216 if { (eval echo "$as_me:10216: \"$ac_compile\"") >&5
10217   (eval $ac_compile) 2>&5
10218   ac_status=$?
10219   echo "$as_me:10219: \$? = $ac_status" >&5
10220   (exit $ac_status); } &&
10221          { ac_try='test -s conftest.$ac_objext'
10222   { (eval echo "$as_me:10222: \"$ac_try\"") >&5
10223   (eval $ac_try) 2>&5
10224   ac_status=$?
10225   echo "$as_me:10225: \$? = $ac_status" >&5
10226   (exit $ac_status); }; }; then
10227   break
10228 else
10229   echo "$as_me: failed program was:" >&5
10230 cat conftest.$ac_ext >&5
10231 fi
10232 rm -f conftest.$ac_objext conftest.$ac_ext
10233   cat >conftest.$ac_ext <<_ACEOF
10234 #line 10234 "configure"
10235 #include "confdefs.h"
10236 #define _FILE_OFFSET_BITS 64
10237 #include <sys/types.h>
10238  /* Check that off_t can represent 2**63 - 1 correctly.
10239     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10240     since some C++ compilers masquerading as C compilers
10241     incorrectly reject 9223372036854775807.  */
10242 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10243   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10244                        && LARGE_OFF_T % 2147483647 == 1)
10245                       ? 1 : -1];
10246 int
10247 main ()
10248 {
10249
10250   ;
10251   return 0;
10252 }
10253 _ACEOF
10254 rm -f conftest.$ac_objext
10255 if { (eval echo "$as_me:10255: \"$ac_compile\"") >&5
10256   (eval $ac_compile) 2>&5
10257   ac_status=$?
10258   echo "$as_me:10258: \$? = $ac_status" >&5
10259   (exit $ac_status); } &&
10260          { ac_try='test -s conftest.$ac_objext'
10261   { (eval echo "$as_me:10261: \"$ac_try\"") >&5
10262   (eval $ac_try) 2>&5
10263   ac_status=$?
10264   echo "$as_me:10264: \$? = $ac_status" >&5
10265   (exit $ac_status); }; }; then
10266   ac_cv_sys_file_offset_bits=64; break
10267 else
10268   echo "$as_me: failed program was:" >&5
10269 cat conftest.$ac_ext >&5
10270 fi
10271 rm -f conftest.$ac_objext conftest.$ac_ext
10272   break
10273 done
10274 fi
10275 echo "$as_me:10275: result: $ac_cv_sys_file_offset_bits" >&5
10276 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10277 if test "$ac_cv_sys_file_offset_bits" != no; then
10278
10279 cat >>confdefs.h <<EOF
10280 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10281 EOF
10282
10283 fi
10284 rm -rf conftest*
10285   echo "$as_me:10285: checking for _LARGE_FILES value needed for large files" >&5
10286 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10287 if test "${ac_cv_sys_large_files+set}" = set; then
10288   echo $ECHO_N "(cached) $ECHO_C" >&6
10289 else
10290   while :; do
10291   ac_cv_sys_large_files=no
10292   cat >conftest.$ac_ext <<_ACEOF
10293 #line 10293 "configure"
10294 #include "confdefs.h"
10295 #include <sys/types.h>
10296  /* Check that off_t can represent 2**63 - 1 correctly.
10297     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10298     since some C++ compilers masquerading as C compilers
10299     incorrectly reject 9223372036854775807.  */
10300 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10301   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10302                        && LARGE_OFF_T % 2147483647 == 1)
10303                       ? 1 : -1];
10304 int
10305 main ()
10306 {
10307
10308   ;
10309   return 0;
10310 }
10311 _ACEOF
10312 rm -f conftest.$ac_objext
10313 if { (eval echo "$as_me:10313: \"$ac_compile\"") >&5
10314   (eval $ac_compile) 2>&5
10315   ac_status=$?
10316   echo "$as_me:10316: \$? = $ac_status" >&5
10317   (exit $ac_status); } &&
10318          { ac_try='test -s conftest.$ac_objext'
10319   { (eval echo "$as_me:10319: \"$ac_try\"") >&5
10320   (eval $ac_try) 2>&5
10321   ac_status=$?
10322   echo "$as_me:10322: \$? = $ac_status" >&5
10323   (exit $ac_status); }; }; then
10324   break
10325 else
10326   echo "$as_me: failed program was:" >&5
10327 cat conftest.$ac_ext >&5
10328 fi
10329 rm -f conftest.$ac_objext conftest.$ac_ext
10330   cat >conftest.$ac_ext <<_ACEOF
10331 #line 10331 "configure"
10332 #include "confdefs.h"
10333 #define _LARGE_FILES 1
10334 #include <sys/types.h>
10335  /* Check that off_t can represent 2**63 - 1 correctly.
10336     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10337     since some C++ compilers masquerading as C compilers
10338     incorrectly reject 9223372036854775807.  */
10339 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10340   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10341                        && LARGE_OFF_T % 2147483647 == 1)
10342                       ? 1 : -1];
10343 int
10344 main ()
10345 {
10346
10347   ;
10348   return 0;
10349 }
10350 _ACEOF
10351 rm -f conftest.$ac_objext
10352 if { (eval echo "$as_me:10352: \"$ac_compile\"") >&5
10353   (eval $ac_compile) 2>&5
10354   ac_status=$?
10355   echo "$as_me:10355: \$? = $ac_status" >&5
10356   (exit $ac_status); } &&
10357          { ac_try='test -s conftest.$ac_objext'
10358   { (eval echo "$as_me:10358: \"$ac_try\"") >&5
10359   (eval $ac_try) 2>&5
10360   ac_status=$?
10361   echo "$as_me:10361: \$? = $ac_status" >&5
10362   (exit $ac_status); }; }; then
10363   ac_cv_sys_large_files=1; break
10364 else
10365   echo "$as_me: failed program was:" >&5
10366 cat conftest.$ac_ext >&5
10367 fi
10368 rm -f conftest.$ac_objext conftest.$ac_ext
10369   break
10370 done
10371 fi
10372 echo "$as_me:10372: result: $ac_cv_sys_large_files" >&5
10373 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10374 if test "$ac_cv_sys_large_files" != no; then
10375
10376 cat >>confdefs.h <<EOF
10377 #define _LARGE_FILES $ac_cv_sys_large_files
10378 EOF
10379
10380 fi
10381 rm -rf conftest*
10382 fi
10383
10384     if test "$enable_largefile" != no ; then
10385         echo "$as_me:10385: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10386 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10387 if test "${ac_cv_sys_largefile_source+set}" = set; then
10388   echo $ECHO_N "(cached) $ECHO_C" >&6
10389 else
10390   while :; do
10391   ac_cv_sys_largefile_source=no
10392   cat >conftest.$ac_ext <<_ACEOF
10393 #line 10393 "configure"
10394 #include "confdefs.h"
10395 #include <stdio.h>
10396 int
10397 main ()
10398 {
10399 return !fseeko;
10400   ;
10401   return 0;
10402 }
10403 _ACEOF
10404 rm -f conftest.$ac_objext
10405 if { (eval echo "$as_me:10405: \"$ac_compile\"") >&5
10406   (eval $ac_compile) 2>&5
10407   ac_status=$?
10408   echo "$as_me:10408: \$? = $ac_status" >&5
10409   (exit $ac_status); } &&
10410          { ac_try='test -s conftest.$ac_objext'
10411   { (eval echo "$as_me:10411: \"$ac_try\"") >&5
10412   (eval $ac_try) 2>&5
10413   ac_status=$?
10414   echo "$as_me:10414: \$? = $ac_status" >&5
10415   (exit $ac_status); }; }; then
10416   break
10417 else
10418   echo "$as_me: failed program was:" >&5
10419 cat conftest.$ac_ext >&5
10420 fi
10421 rm -f conftest.$ac_objext conftest.$ac_ext
10422   cat >conftest.$ac_ext <<_ACEOF
10423 #line 10423 "configure"
10424 #include "confdefs.h"
10425 #define _LARGEFILE_SOURCE 1
10426 #include <stdio.h>
10427 int
10428 main ()
10429 {
10430 return !fseeko;
10431   ;
10432   return 0;
10433 }
10434 _ACEOF
10435 rm -f conftest.$ac_objext
10436 if { (eval echo "$as_me:10436: \"$ac_compile\"") >&5
10437   (eval $ac_compile) 2>&5
10438   ac_status=$?
10439   echo "$as_me:10439: \$? = $ac_status" >&5
10440   (exit $ac_status); } &&
10441          { ac_try='test -s conftest.$ac_objext'
10442   { (eval echo "$as_me:10442: \"$ac_try\"") >&5
10443   (eval $ac_try) 2>&5
10444   ac_status=$?
10445   echo "$as_me:10445: \$? = $ac_status" >&5
10446   (exit $ac_status); }; }; then
10447   ac_cv_sys_largefile_source=1; break
10448 else
10449   echo "$as_me: failed program was:" >&5
10450 cat conftest.$ac_ext >&5
10451 fi
10452 rm -f conftest.$ac_objext conftest.$ac_ext
10453   break
10454 done
10455 fi
10456 echo "$as_me:10456: result: $ac_cv_sys_largefile_source" >&5
10457 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10458 if test "$ac_cv_sys_largefile_source" != no; then
10459
10460 cat >>confdefs.h <<EOF
10461 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10462 EOF
10463
10464 fi
10465 rm -rf conftest*
10466
10467 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10468 # in glibc 2.1.3, but that breaks too many other things.
10469 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10470 echo "$as_me:10470: checking for fseeko" >&5
10471 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10472 if test "${ac_cv_func_fseeko+set}" = set; then
10473   echo $ECHO_N "(cached) $ECHO_C" >&6
10474 else
10475   cat >conftest.$ac_ext <<_ACEOF
10476 #line 10476 "configure"
10477 #include "confdefs.h"
10478 #include <stdio.h>
10479 int
10480 main ()
10481 {
10482 return fseeko && fseeko (stdin, 0, 0);
10483   ;
10484   return 0;
10485 }
10486 _ACEOF
10487 rm -f conftest.$ac_objext conftest$ac_exeext
10488 if { (eval echo "$as_me:10488: \"$ac_link\"") >&5
10489   (eval $ac_link) 2>&5
10490   ac_status=$?
10491   echo "$as_me:10491: \$? = $ac_status" >&5
10492   (exit $ac_status); } &&
10493          { ac_try='test -s conftest$ac_exeext'
10494   { (eval echo "$as_me:10494: \"$ac_try\"") >&5
10495   (eval $ac_try) 2>&5
10496   ac_status=$?
10497   echo "$as_me:10497: \$? = $ac_status" >&5
10498   (exit $ac_status); }; }; then
10499   ac_cv_func_fseeko=yes
10500 else
10501   echo "$as_me: failed program was:" >&5
10502 cat conftest.$ac_ext >&5
10503 ac_cv_func_fseeko=no
10504 fi
10505 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10506 fi
10507 echo "$as_me:10507: result: $ac_cv_func_fseeko" >&5
10508 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10509 if test $ac_cv_func_fseeko = yes; then
10510
10511 cat >>confdefs.h <<\EOF
10512 #define HAVE_FSEEKO 1
10513 EOF
10514
10515 fi
10516
10517         # Normally we would collect these definitions in the config.h,
10518         # but (like _XOPEN_SOURCE), some environments rely on having these
10519         # defined before any of the system headers are included.  Another
10520         # case comes up with C++, e.g., on AIX the compiler compiles the
10521         # header files by themselves before looking at the body files it is
10522         # told to compile.  For ncurses, those header files do not include
10523         # the config.h
10524         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10525         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10526         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10527
10528         echo "$as_me:10528: checking whether to use struct dirent64" >&5
10529 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10530 if test "${cf_cv_struct_dirent64+set}" = set; then
10531   echo $ECHO_N "(cached) $ECHO_C" >&6
10532 else
10533
10534                 cat >conftest.$ac_ext <<_ACEOF
10535 #line 10535 "configure"
10536 #include "confdefs.h"
10537
10538 #include <sys/types.h>
10539 #include <dirent.h>
10540
10541 int
10542 main ()
10543 {
10544
10545                 /* if transitional largefile support is setup, this is true */
10546                 extern struct dirent64 * readdir(DIR *);
10547                 struct dirent64 *x = readdir((DIR *)0);
10548                 struct dirent *y = readdir((DIR *)0);
10549                 int z = x - y;
10550
10551   ;
10552   return 0;
10553 }
10554 _ACEOF
10555 rm -f conftest.$ac_objext
10556 if { (eval echo "$as_me:10556: \"$ac_compile\"") >&5
10557   (eval $ac_compile) 2>&5
10558   ac_status=$?
10559   echo "$as_me:10559: \$? = $ac_status" >&5
10560   (exit $ac_status); } &&
10561          { ac_try='test -s conftest.$ac_objext'
10562   { (eval echo "$as_me:10562: \"$ac_try\"") >&5
10563   (eval $ac_try) 2>&5
10564   ac_status=$?
10565   echo "$as_me:10565: \$? = $ac_status" >&5
10566   (exit $ac_status); }; }; then
10567   cf_cv_struct_dirent64=yes
10568 else
10569   echo "$as_me: failed program was:" >&5
10570 cat conftest.$ac_ext >&5
10571 cf_cv_struct_dirent64=no
10572 fi
10573 rm -f conftest.$ac_objext conftest.$ac_ext
10574
10575 fi
10576 echo "$as_me:10576: result: $cf_cv_struct_dirent64" >&5
10577 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10578         test "$cf_cv_struct_dirent64" = yes &&
10579 cat >>confdefs.h <<\EOF
10580 #define HAVE_STRUCT_DIRENT64 1
10581 EOF
10582
10583     fi
10584
10585 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10586 echo "$as_me:10586: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10587 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10588
10589 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10590 if test "${enable_tparm_varargs+set}" = set; then
10591   enableval="$enable_tparm_varargs"
10592   with_tparm_varargs=$enableval
10593 else
10594   with_tparm_varargs=yes
10595 fi;
10596 echo "$as_me:10596: result: $with_tparm_varargs" >&5
10597 echo "${ECHO_T}$with_tparm_varargs" >&6
10598 NCURSES_TPARM_VARARGS=0
10599 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10600
10601 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10602 if test "$with_ticlib" != no ; then
10603 echo "$as_me:10603: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10604 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10605
10606 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10607 if test "${enable_tic_depends+set}" = set; then
10608   enableval="$enable_tic_depends"
10609   with_tic_depends=$enableval
10610 else
10611   with_tic_depends=yes
10612 fi;
10613 echo "$as_me:10613: result: $with_tic_depends" >&5
10614 echo "${ECHO_T}$with_tic_depends" >&6
10615 else
10616         with_tic_depends=no
10617 fi
10618
10619 ###   use option --with-bool to override bool's type
10620 echo "$as_me:10620: checking for type of bool" >&5
10621 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10622
10623 # Check whether --with-bool or --without-bool was given.
10624 if test "${with_bool+set}" = set; then
10625   withval="$with_bool"
10626   NCURSES_BOOL="$withval"
10627 else
10628   NCURSES_BOOL=auto
10629 fi;
10630 echo "$as_me:10630: result: $NCURSES_BOOL" >&5
10631 echo "${ECHO_T}$NCURSES_BOOL" >&6
10632
10633 echo "$as_me:10633: checking for alternate terminal capabilities file" >&5
10634 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10635
10636 # Check whether --with-caps or --without-caps was given.
10637 if test "${with_caps+set}" = set; then
10638   withval="$with_caps"
10639   TERMINFO_CAPS=Caps.$withval
10640 else
10641   TERMINFO_CAPS=Caps
10642 fi;
10643 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10644 echo "$as_me:10644: result: $TERMINFO_CAPS" >&5
10645 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10646
10647 ###   use option --with-chtype to override chtype's type
10648 echo "$as_me:10648: checking for type of chtype" >&5
10649 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10650
10651 # Check whether --with-chtype or --without-chtype was given.
10652 if test "${with_chtype+set}" = set; then
10653   withval="$with_chtype"
10654   NCURSES_CHTYPE="$withval"
10655 else
10656   NCURSES_CHTYPE=auto
10657 fi;
10658 echo "$as_me:10658: result: $NCURSES_CHTYPE" >&5
10659 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10660
10661 ###   use option --with-ospeed to override ospeed's type
10662 echo "$as_me:10662: checking for type of ospeed" >&5
10663 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10664
10665 # Check whether --with-ospeed or --without-ospeed was given.
10666 if test "${with_ospeed+set}" = set; then
10667   withval="$with_ospeed"
10668   NCURSES_OSPEED="$withval"
10669 else
10670   NCURSES_OSPEED=short
10671 fi;
10672 echo "$as_me:10672: result: $NCURSES_OSPEED" >&5
10673 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10674
10675 ###   use option --with-mmask-t to override mmask_t's type
10676 echo "$as_me:10676: checking for type of mmask_t" >&5
10677 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10678
10679 # Check whether --with-mmask-t or --without-mmask-t was given.
10680 if test "${with_mmask_t+set}" = set; then
10681   withval="$with_mmask_t"
10682   NCURSES_MMASK_T="$withval"
10683 else
10684   NCURSES_MMASK_T=auto
10685 fi;
10686 echo "$as_me:10686: result: $NCURSES_MMASK_T" >&5
10687 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10688
10689 ###   use option --with-ccharw-max to override CCHARW_MAX size
10690 echo "$as_me:10690: checking for size CCHARW_MAX" >&5
10691 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10692
10693 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10694 if test "${with_ccharw_max+set}" = set; then
10695   withval="$with_ccharw_max"
10696   NCURSES_CCHARW_MAX="$withval"
10697 else
10698   NCURSES_CCHARW_MAX=5
10699 fi;
10700 echo "$as_me:10700: result: $NCURSES_CCHARW_MAX" >&5
10701 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10702
10703 ###   use option --with-tparm-arg to override tparm's argument type
10704 echo "$as_me:10704: checking for type of tparm args" >&5
10705 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10706
10707 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10708 if test "${with_tparm_arg+set}" = set; then
10709   withval="$with_tparm_arg"
10710   NCURSES_TPARM_ARG="$withval"
10711 else
10712   NCURSES_TPARM_ARG=long
10713 fi;
10714 echo "$as_me:10714: result: $NCURSES_TPARM_ARG" >&5
10715 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10716
10717 ### Enable compiling-in rcs id's
10718 echo "$as_me:10718: checking if RCS identifiers should be compiled-in" >&5
10719 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10720
10721 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10722 if test "${with_rcs_ids+set}" = set; then
10723   withval="$with_rcs_ids"
10724   with_rcs_ids=$withval
10725 else
10726   with_rcs_ids=no
10727 fi;
10728 echo "$as_me:10728: result: $with_rcs_ids" >&5
10729 echo "${ECHO_T}$with_rcs_ids" >&6
10730 test "x$with_rcs_ids" = xyes &&
10731 cat >>confdefs.h <<\EOF
10732 #define USE_RCS_IDS 1
10733 EOF
10734
10735 ###############################################################################
10736
10737 echo "$as_me:10737: checking format of man-pages" >&5
10738 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10739
10740 # Check whether --with-manpage-format or --without-manpage-format was given.
10741 if test "${with_manpage_format+set}" = set; then
10742   withval="$with_manpage_format"
10743   MANPAGE_FORMAT=$withval
10744 else
10745   MANPAGE_FORMAT=unknown
10746 fi;
10747
10748 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10749 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10750
10751 cf_unknown=
10752
10753 case $MANPAGE_FORMAT in
10754 unknown)
10755   if test -z "$MANPATH" ; then
10756     MANPATH="/usr/man:/usr/share/man"
10757   fi
10758
10759   # look for the 'date' man-page (it's most likely to be installed!)
10760   MANPAGE_FORMAT=
10761   cf_preform=no
10762   cf_catonly=yes
10763   cf_example=date
10764
10765   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10766   for cf_dir in $MANPATH; do
10767     test -z "$cf_dir" && cf_dir=/usr/man
10768     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
10769     do
10770       cf_test=`echo $cf_name | sed -e 's/*//'`
10771       if test "x$cf_test" = "x$cf_name" ; then
10772
10773         case "$cf_name" in
10774         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10775         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10776         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10777         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10778         esac
10779
10780         case "$cf_name" in
10781         $cf_dir/man*)
10782           cf_catonly=no
10783           ;;
10784         $cf_dir/cat*)
10785           cf_preform=yes
10786           ;;
10787         esac
10788         break
10789       fi
10790
10791       # if we found a match in either man* or cat*, stop looking
10792       if test -n "$MANPAGE_FORMAT" ; then
10793         cf_found=no
10794         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10795         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10796         case "$cf_name" in
10797         $cf_dir/cat*)
10798           cf_found=yes
10799           ;;
10800         esac
10801         test $cf_found=yes && break
10802       fi
10803     done
10804     # only check the first directory in $MANPATH where we find manpages
10805     if test -n "$MANPAGE_FORMAT" ; then
10806        break
10807     fi
10808   done
10809   # if we did not find the example, just assume it is normal
10810   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10811   IFS="$ac_save_ifs"
10812   ;;
10813 *)
10814   for cf_option in $MANPAGE_FORMAT; do
10815      case $cf_option in #(vi
10816      gzip|compress|BSDI|normal|formatted|catonly)
10817        ;;
10818      *)
10819        cf_unknown="$cf_unknown $cf_option"
10820        ;;
10821      esac
10822   done
10823   ;;
10824 esac
10825
10826 echo "$as_me:10826: result: $MANPAGE_FORMAT" >&5
10827 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10828 if test -n "$cf_unknown" ; then
10829   { echo "$as_me:10829: WARNING: Unexpected manpage-format $cf_unknown" >&5
10830 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10831 fi
10832
10833 echo "$as_me:10833: checking for manpage renaming" >&5
10834 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10835
10836 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10837 if test "${with_manpage_renames+set}" = set; then
10838   withval="$with_manpage_renames"
10839   MANPAGE_RENAMES=$withval
10840 else
10841   MANPAGE_RENAMES=yes
10842 fi;
10843
10844 case ".$MANPAGE_RENAMES" in #(vi
10845 .no) #(vi
10846   ;;
10847 .|.yes)
10848   # Debian 'man' program?
10849   if test -f /etc/debian_version ; then
10850     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10851   else
10852     MANPAGE_RENAMES=no
10853   fi
10854   ;;
10855 esac
10856
10857 if test "$MANPAGE_RENAMES" != no ; then
10858   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10859     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10860   elif test ! -f $MANPAGE_RENAMES ; then
10861     { { echo "$as_me:10861: error: not a filename: $MANPAGE_RENAMES" >&5
10862 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10863    { (exit 1); exit 1; }; }
10864   fi
10865
10866   test ! -d man && mkdir man
10867
10868   # Construct a sed-script to perform renaming within man-pages
10869   if test -n "$MANPAGE_RENAMES" ; then
10870     test ! -d man && mkdir man
10871     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10872   fi
10873 fi
10874
10875 echo "$as_me:10875: result: $MANPAGE_RENAMES" >&5
10876 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10877
10878 echo "$as_me:10878: checking if manpage aliases will be installed" >&5
10879 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10880
10881 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10882 if test "${with_manpage_aliases+set}" = set; then
10883   withval="$with_manpage_aliases"
10884   MANPAGE_ALIASES=$withval
10885 else
10886   MANPAGE_ALIASES=yes
10887 fi;
10888
10889 echo "$as_me:10889: result: $MANPAGE_ALIASES" >&5
10890 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10891
10892 case "x$LN_S" in #(vi
10893 xln*) #(vi
10894         cf_use_symlinks=yes
10895         ;;
10896 *)
10897         cf_use_symlinks=no
10898         ;;
10899 esac
10900
10901 MANPAGE_SYMLINKS=no
10902 if test "$MANPAGE_ALIASES" = yes ; then
10903 echo "$as_me:10903: checking if manpage symlinks should be used" >&5
10904 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10905
10906 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10907 if test "${with_manpage_symlinks+set}" = set; then
10908   withval="$with_manpage_symlinks"
10909   MANPAGE_SYMLINKS=$withval
10910 else
10911   MANPAGE_SYMLINKS=$cf_use_symlinks
10912 fi;
10913
10914 if test "$$cf_use_symlinks" = no; then
10915 if test "$MANPAGE_SYMLINKS" = yes ; then
10916         { echo "$as_me:10916: WARNING: cannot make symlinks" >&5
10917 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10918         MANPAGE_SYMLINKS=no
10919 fi
10920 fi
10921
10922 echo "$as_me:10922: result: $MANPAGE_SYMLINKS" >&5
10923 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10924 fi
10925
10926 echo "$as_me:10926: checking for manpage tbl" >&5
10927 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10928
10929 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10930 if test "${with_manpage_tbl+set}" = set; then
10931   withval="$with_manpage_tbl"
10932   MANPAGE_TBL=$withval
10933 else
10934   MANPAGE_TBL=no
10935 fi;
10936
10937 echo "$as_me:10937: result: $MANPAGE_TBL" >&5
10938 echo "${ECHO_T}$MANPAGE_TBL" >&6
10939
10940   if test "$prefix" = "NONE" ; then
10941      cf_prefix="$ac_default_prefix"
10942   else
10943      cf_prefix="$prefix"
10944   fi
10945
10946   case "$MANPAGE_FORMAT" in # (vi
10947   *catonly*) # (vi
10948     cf_format=yes
10949     cf_inboth=no
10950     ;;
10951   *formatted*) # (vi
10952     cf_format=yes
10953     cf_inboth=yes
10954     ;;
10955   *)
10956     cf_format=no
10957     cf_inboth=no
10958     ;;
10959   esac
10960
10961 test ! -d man && mkdir man
10962
10963 cf_so_strip=
10964 cf_compress=
10965 case "$MANPAGE_FORMAT" in #(vi
10966 *compress*) #(vi
10967         cf_so_strip="Z"
10968         cf_compress=compress
10969   ;;
10970 *gzip*)
10971         cf_so_strip="gz"
10972         cf_compress=gzip
10973   ;;
10974 esac
10975
10976 cf_edit_man=./edit_man.sh
10977 cf_man_alias=`pwd`/man_alias.sed
10978
10979 cat >$cf_edit_man <<CF_EOF
10980 #! /bin/sh
10981 # this script is generated by the configure-script CF_MAN_PAGES macro.
10982
10983 prefix="$cf_prefix"
10984 datarootdir="$datarootdir"
10985 datadir="$datadir"
10986
10987 NCURSES_MAJOR="$NCURSES_MAJOR"
10988 NCURSES_MINOR="$NCURSES_MINOR"
10989 NCURSES_PATCH="$NCURSES_PATCH"
10990
10991 NCURSES_OSPEED="$NCURSES_OSPEED"
10992 TERMINFO="$TERMINFO"
10993
10994 INSTALL="$INSTALL"
10995 INSTALL_DATA="$INSTALL_DATA"
10996
10997 transform="$program_transform_name"
10998
10999 TMP=\${TMPDIR:=/tmp}/man\$\$
11000 trap "rm -f \$TMP" 0 1 2 5 15
11001
11002 form=\$1
11003 shift || exit 1
11004
11005 verb=\$1
11006 shift || exit 1
11007
11008 mandir=\$1
11009 shift || exit 1
11010
11011 srcdir=\$1
11012 top_srcdir=\$srcdir/..
11013 shift || exit 1
11014
11015 if test "\$form" = normal ; then
11016         if test "$cf_format" = yes ; then
11017         if test "$cf_inboth" = no ; then
11018                 sh \$0 format \$verb \$mandir \$srcdir \$*
11019                 exit $?
11020         fi
11021         fi
11022         cf_subdir=\$mandir/man
11023         cf_tables=$MANPAGE_TBL
11024 else
11025         cf_subdir=\$mandir/cat
11026         cf_tables=yes
11027 fi
11028
11029 # process the list of source-files
11030 for i in \$* ; do
11031 case \$i in #(vi
11032 *.orig|*.rej) ;; #(vi
11033 *.[0-9]*)
11034         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11035         if test \$verb = installing ; then
11036         if test ! -d \$cf_subdir\${section} ; then
11037                 mkdir -p \$cf_subdir\$section
11038         fi
11039         fi
11040
11041         # replace variables in man page
11042         if test ! -f $cf_man_alias ; then
11043 cat >>$cf_man_alias <<-CF_EOF2
11044                 s,@DATADIR@,\$datadir,g
11045                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11046                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11047                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11048                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11049                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11050                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11051 CF_EOF
11052
11053         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11054         do
11055                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11056                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11057 cat >>$cf_edit_man <<-CF_EOF
11058                 s,@$cf_NAME@,$cf_name,g
11059 CF_EOF
11060         done
11061
11062 cat >>$cf_edit_man <<CF_EOF
11063 CF_EOF2
11064                 echo "...made $cf_man_alias"
11065         fi
11066
11067         aliases=
11068         cf_source=\`basename \$i\`
11069         inalias=\$cf_source
11070         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11071         if test ! -f \$inalias ; then
11072                 echo .. skipped \$cf_source
11073                 continue
11074         fi
11075 CF_EOF
11076
11077 if test "$MANPAGE_ALIASES" != no ; then
11078 cat >>$cf_edit_man <<CF_EOF
11079         nCurses=ignore.3x
11080         test $with_curses_h = yes && nCurses=ncurses.3x
11081         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11082 CF_EOF
11083 fi
11084
11085 if test "$MANPAGE_RENAMES" = no ; then
11086 cat >>$cf_edit_man <<CF_EOF
11087         # perform program transformations for section 1 man pages
11088         if test \$section = 1 ; then
11089                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11090         else
11091                 cf_target=\$cf_subdir\${section}/\$cf_source
11092         fi
11093 CF_EOF
11094 else
11095 cat >>$cf_edit_man <<CF_EOF
11096         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11097         if test -z "\$cf_target" ; then
11098                 echo '? missing rename for '\$cf_source
11099                 cf_target="\$cf_source"
11100         fi
11101         cf_target="\$cf_subdir\${section}/\${cf_target}"
11102
11103 CF_EOF
11104 fi
11105
11106 cat >>$cf_edit_man <<CF_EOF
11107         sed     -f $cf_man_alias \\
11108 CF_EOF
11109
11110 if test -f $MANPAGE_RENAMES ; then
11111 cat >>$cf_edit_man <<CF_EOF
11112                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11113 CF_EOF
11114 else
11115 cat >>$cf_edit_man <<CF_EOF
11116                 < \$i >\$TMP
11117 CF_EOF
11118 fi
11119
11120 cat >>$cf_edit_man <<CF_EOF
11121 if test \$cf_tables = yes ; then
11122         tbl \$TMP >\$TMP.out
11123         mv \$TMP.out \$TMP
11124 fi
11125 CF_EOF
11126
11127 if test $with_overwrite != yes ; then
11128 cat >>$cf_edit_man <<CF_EOF
11129         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11130         mv \$TMP.out \$TMP
11131 CF_EOF
11132 fi
11133
11134 if test $with_curses_h != yes ; then
11135 cat >>$cf_edit_man <<CF_EOF
11136         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11137         mv \$TMP.out \$TMP
11138 CF_EOF
11139 fi
11140
11141 cat >>$cf_edit_man <<CF_EOF
11142         if test \$form = format ; then
11143                 nroff -man \$TMP >\$TMP.out
11144                 mv \$TMP.out \$TMP
11145         fi
11146 CF_EOF
11147
11148 if test -n "$cf_compress" ; then
11149 cat >>$cf_edit_man <<CF_EOF
11150         if test \$verb = installing ; then
11151         if ( $cf_compress -f \$TMP )
11152         then
11153                 mv \$TMP.$cf_so_strip \$TMP
11154         fi
11155         fi
11156         cf_target="\$cf_target.$cf_so_strip"
11157 CF_EOF
11158 fi
11159
11160 case "$MANPAGE_FORMAT" in #(vi
11161 *BSDI*)
11162 cat >>$cf_edit_man <<CF_EOF
11163         if test \$form = format ; then
11164                 # BSDI installs only .0 suffixes in the cat directories
11165                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11166         fi
11167 CF_EOF
11168   ;;
11169 esac
11170
11171 cat >>$cf_edit_man <<CF_EOF
11172         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11173         if test \$verb = installing ; then
11174                 echo \$verb \$cf_target
11175                 \$INSTALL_DATA \$TMP \$cf_target
11176                 test -d \$cf_subdir\${section} &&
11177                 test -n "\$aliases" && (
11178                         cd \$cf_subdir\${section} && (
11179                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11180                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11181                                 cf_target=\`basename \$cf_target\`
11182                                 for cf_alias in \$aliases
11183                                 do
11184                                         if test \$section = 1 ; then
11185                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11186                                         fi
11187
11188                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11189                                                 if test -f \$cf_alias\${suffix} ; then
11190                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11191                                                         then
11192                                                                 continue
11193                                                         fi
11194                                                 fi
11195                                                 echo .. \$verb alias \$cf_alias\${suffix}
11196 CF_EOF
11197 case "x$LN_S" in #(vi
11198 *-f) #(vi
11199 cat >>$cf_edit_man <<CF_EOF
11200                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11201 CF_EOF
11202         ;;
11203 *)
11204 cat >>$cf_edit_man <<CF_EOF
11205                                                 rm -f \$cf_alias\${suffix}
11206                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11207 CF_EOF
11208         ;;
11209 esac
11210 cat >>$cf_edit_man <<CF_EOF
11211                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11212                                                 echo ".so \$cf_source" >\$TMP
11213 CF_EOF
11214 if test -n "$cf_compress" ; then
11215 cat >>$cf_edit_man <<CF_EOF
11216                                                 if test -n "$cf_so_strip" ; then
11217                                                         $cf_compress -f \$TMP
11218                                                         mv \$TMP.$cf_so_strip \$TMP
11219                                                 fi
11220 CF_EOF
11221 fi
11222 cat >>$cf_edit_man <<CF_EOF
11223                                                 echo .. \$verb alias \$cf_alias\${suffix}
11224                                                 rm -f \$cf_alias\${suffix}
11225                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11226                                         fi
11227                                 done
11228                         )
11229                 )
11230         elif test \$verb = removing ; then
11231                 test -f \$cf_target && (
11232                         echo \$verb \$cf_target
11233                         rm -f \$cf_target
11234                 )
11235                 test -d \$cf_subdir\${section} &&
11236                 test -n "\$aliases" && (
11237                         cd \$cf_subdir\${section} && (
11238                                 for cf_alias in \$aliases
11239                                 do
11240                                         if test \$section = 1 ; then
11241                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11242                                         fi
11243
11244                                         echo .. \$verb alias \$cf_alias\${suffix}
11245                                         rm -f \$cf_alias\${suffix}
11246                                 done
11247                         )
11248                 )
11249         else
11250 #               echo ".hy 0"
11251                 cat \$TMP
11252         fi
11253         ;;
11254 esac
11255 done
11256
11257 if test $cf_inboth = yes ; then
11258 if test \$form != format ; then
11259         sh \$0 format \$verb \$mandir \$srcdir \$*
11260 fi
11261 fi
11262
11263 exit 0
11264 CF_EOF
11265 chmod 755 $cf_edit_man
11266
11267 ###############################################################################
11268
11269 ### Note that some functions (such as const) are normally disabled anyway.
11270 echo "$as_me:11270: checking if you want to build with function extensions" >&5
11271 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11272
11273 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11274 if test "${enable_ext_funcs+set}" = set; then
11275   enableval="$enable_ext_funcs"
11276   with_ext_funcs=$enableval
11277 else
11278   with_ext_funcs=yes
11279 fi;
11280 echo "$as_me:11280: result: $with_ext_funcs" >&5
11281 echo "${ECHO_T}$with_ext_funcs" >&6
11282 if test "x$with_ext_funcs" = xyes ; then
11283         NCURSES_EXT_FUNCS=1
11284
11285 cat >>confdefs.h <<\EOF
11286 #define HAVE_ASSUME_DEFAULT_COLORS 1
11287 EOF
11288
11289 cat >>confdefs.h <<\EOF
11290 #define HAVE_CURSES_VERSION 1
11291 EOF
11292
11293 cat >>confdefs.h <<\EOF
11294 #define HAVE_HAS_KEY 1
11295 EOF
11296
11297 cat >>confdefs.h <<\EOF
11298 #define HAVE_RESIZETERM 1
11299 EOF
11300
11301 cat >>confdefs.h <<\EOF
11302 #define HAVE_RESIZE_TERM 1
11303 EOF
11304
11305 cat >>confdefs.h <<\EOF
11306 #define HAVE_TERM_ENTRY_H 1
11307 EOF
11308
11309 cat >>confdefs.h <<\EOF
11310 #define HAVE_USE_DEFAULT_COLORS 1
11311 EOF
11312
11313 cat >>confdefs.h <<\EOF
11314 #define HAVE_USE_SCREEN 1
11315 EOF
11316
11317 cat >>confdefs.h <<\EOF
11318 #define HAVE_USE_WINDOW 1
11319 EOF
11320
11321 cat >>confdefs.h <<\EOF
11322 #define HAVE_WRESIZE 1
11323 EOF
11324
11325 cat >>confdefs.h <<\EOF
11326 #define NCURSES_EXT_FUNCS 1
11327 EOF
11328
11329         GENERATED_EXT_FUNCS=generated
11330 else
11331         NCURSES_EXT_FUNCS=0
11332         GENERATED_EXT_FUNCS=
11333 fi
11334
11335 echo "$as_me:11335: checking if you want to build with experimental SCREEN extensions" >&5
11336 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11337
11338 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11339 if test "${enable_sp_funcs+set}" = set; then
11340   enableval="$enable_sp_funcs"
11341   with_sp_funcs=$enableval
11342 else
11343   with_sp_funcs=no
11344 fi;
11345 echo "$as_me:11345: result: $with_sp_funcs" >&5
11346 echo "${ECHO_T}$with_sp_funcs" >&6
11347 if test "x$with_sp_funcs" = xyes ; then
11348         NCURSES_SP_FUNCS=1
11349
11350 cat >>confdefs.h <<\EOF
11351 #define NCURSES_SP_FUNCS 1
11352 EOF
11353
11354         GENERATED_SP_FUNCS=generated
11355 else
11356         NCURSES_SP_FUNCS=0
11357         GENERATED_SP_FUNCS=
11358 fi
11359
11360 echo "$as_me:11360: checking if you want to build with experimental terminal-driver" >&5
11361 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11362
11363 # Check whether --enable-term-driver or --disable-term-driver was given.
11364 if test "${enable_term_driver+set}" = set; then
11365   enableval="$enable_term_driver"
11366   with_term_driver=$enableval
11367 else
11368   with_term_driver=no
11369 fi;
11370 echo "$as_me:11370: result: $with_term_driver" >&5
11371 echo "${ECHO_T}$with_term_driver" >&6
11372 if test "x$with_term_driver" = xyes ; then
11373
11374 cat >>confdefs.h <<\EOF
11375 #define USE_TERM_DRIVER 1
11376 EOF
11377
11378         if test "x$with_sp_funcs" != xyes ; then
11379                 { { echo "$as_me:11379: error: The term-driver option relies upon sp-funcs" >&5
11380 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11381    { (exit 1); exit 1; }; }
11382         fi
11383 fi
11384
11385 ###   use option --enable-const to turn on use of const beyond that in XSI.
11386 echo "$as_me:11386: checking for extended use of const keyword" >&5
11387 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11388
11389 # Check whether --enable-const or --disable-const was given.
11390 if test "${enable_const+set}" = set; then
11391   enableval="$enable_const"
11392   with_ext_const=$enableval
11393 else
11394   with_ext_const=no
11395 fi;
11396 echo "$as_me:11396: result: $with_ext_const" >&5
11397 echo "${ECHO_T}$with_ext_const" >&6
11398 NCURSES_CONST='/*nothing*/'
11399 if test "x$with_ext_const" = xyes ; then
11400         NCURSES_CONST=const
11401 fi
11402
11403 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11404 echo "$as_me:11404: checking if you want to use extended colors" >&5
11405 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11406
11407 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11408 if test "${enable_ext_colors+set}" = set; then
11409   enableval="$enable_ext_colors"
11410   with_ext_colors=$enableval
11411 else
11412   with_ext_colors=no
11413 fi;
11414 echo "$as_me:11414: result: $with_ext_colors" >&5
11415 echo "${ECHO_T}$with_ext_colors" >&6
11416 NCURSES_EXT_COLORS=0
11417 if test "x$with_ext_colors" = xyes ; then
11418         if test "x$with_widec" != xyes ; then
11419                 { { echo "$as_me:11419: error: This option applies only to wide-character library" >&5
11420 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11421    { (exit 1); exit 1; }; }
11422         else
11423                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11424
11425 if test "${with_abi_version+set}" != set; then
11426         case $cf_cv_rel_version in
11427         5.*)
11428                 cf_cv_rel_version=6.0
11429                 cf_cv_abi_version=6
11430                 { echo "$as_me:11430: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11431 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11432                 ;;
11433         esac
11434 fi
11435
11436         fi
11437         NCURSES_EXT_COLORS=1
11438
11439 cat >>confdefs.h <<\EOF
11440 #define NCURSES_EXT_COLORS 1
11441 EOF
11442
11443 fi
11444
11445 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11446 echo "$as_me:11446: checking if you want to use extended mouse encoding" >&5
11447 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11448
11449 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11450 if test "${enable_ext_mouse+set}" = set; then
11451   enableval="$enable_ext_mouse"
11452   with_ext_mouse=$enableval
11453 else
11454   with_ext_mouse=no
11455 fi;
11456 echo "$as_me:11456: result: $with_ext_mouse" >&5
11457 echo "${ECHO_T}$with_ext_mouse" >&6
11458 NCURSES_MOUSE_VERSION=1
11459 if test "x$with_ext_mouse" = xyes ; then
11460         NCURSES_MOUSE_VERSION=2
11461
11462 if test "${with_abi_version+set}" != set; then
11463         case $cf_cv_rel_version in
11464         5.*)
11465                 cf_cv_rel_version=6.0
11466                 cf_cv_abi_version=6
11467                 { echo "$as_me:11467: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11468 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11469                 ;;
11470         esac
11471 fi
11472
11473 fi
11474
11475 echo "$as_me:11475: checking if you want \$NCURSES_NO_PADDING code" >&5
11476 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11477
11478 # Check whether --enable-no-padding or --disable-no-padding was given.
11479 if test "${enable_no_padding+set}" = set; then
11480   enableval="$enable_no_padding"
11481   with_no_padding=$enableval
11482 else
11483   with_no_padding=$with_ext_funcs
11484 fi;
11485 echo "$as_me:11485: result: $with_no_padding" >&5
11486 echo "${ECHO_T}$with_no_padding" >&6
11487 test "x$with_no_padding" = xyes &&
11488 cat >>confdefs.h <<\EOF
11489 #define NCURSES_NO_PADDING 1
11490 EOF
11491
11492 echo "$as_me:11492: checking for ANSI C header files" >&5
11493 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11494 if test "${ac_cv_header_stdc+set}" = set; then
11495   echo $ECHO_N "(cached) $ECHO_C" >&6
11496 else
11497   cat >conftest.$ac_ext <<_ACEOF
11498 #line 11498 "configure"
11499 #include "confdefs.h"
11500 #include <stdlib.h>
11501 #include <stdarg.h>
11502 #include <string.h>
11503 #include <float.h>
11504
11505 _ACEOF
11506 if { (eval echo "$as_me:11506: \"$ac_cpp conftest.$ac_ext\"") >&5
11507   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11508   ac_status=$?
11509   egrep -v '^ *\+' conftest.er1 >conftest.err
11510   rm -f conftest.er1
11511   cat conftest.err >&5
11512   echo "$as_me:11512: \$? = $ac_status" >&5
11513   (exit $ac_status); } >/dev/null; then
11514   if test -s conftest.err; then
11515     ac_cpp_err=$ac_c_preproc_warn_flag
11516   else
11517     ac_cpp_err=
11518   fi
11519 else
11520   ac_cpp_err=yes
11521 fi
11522 if test -z "$ac_cpp_err"; then
11523   ac_cv_header_stdc=yes
11524 else
11525   echo "$as_me: failed program was:" >&5
11526   cat conftest.$ac_ext >&5
11527   ac_cv_header_stdc=no
11528 fi
11529 rm -f conftest.err conftest.$ac_ext
11530
11531 if test $ac_cv_header_stdc = yes; then
11532   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11533   cat >conftest.$ac_ext <<_ACEOF
11534 #line 11534 "configure"
11535 #include "confdefs.h"
11536 #include <string.h>
11537
11538 _ACEOF
11539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11540   egrep "memchr" >/dev/null 2>&1; then
11541   :
11542 else
11543   ac_cv_header_stdc=no
11544 fi
11545 rm -rf conftest*
11546
11547 fi
11548
11549 if test $ac_cv_header_stdc = yes; then
11550   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11551   cat >conftest.$ac_ext <<_ACEOF
11552 #line 11552 "configure"
11553 #include "confdefs.h"
11554 #include <stdlib.h>
11555
11556 _ACEOF
11557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11558   egrep "free" >/dev/null 2>&1; then
11559   :
11560 else
11561   ac_cv_header_stdc=no
11562 fi
11563 rm -rf conftest*
11564
11565 fi
11566
11567 if test $ac_cv_header_stdc = yes; then
11568   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11569   if test "$cross_compiling" = yes; then
11570   :
11571 else
11572   cat >conftest.$ac_ext <<_ACEOF
11573 #line 11573 "configure"
11574 #include "confdefs.h"
11575 #include <ctype.h>
11576 #if ((' ' & 0x0FF) == 0x020)
11577 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11578 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11579 #else
11580 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11581                      || ('j' <= (c) && (c) <= 'r') \
11582                      || ('s' <= (c) && (c) <= 'z'))
11583 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11584 #endif
11585
11586 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11587 int
11588 main ()
11589 {
11590   int i;
11591   for (i = 0; i < 256; i++)
11592     if (XOR (islower (i), ISLOWER (i))
11593         || toupper (i) != TOUPPER (i))
11594       $ac_main_return(2);
11595   $ac_main_return (0);
11596 }
11597 _ACEOF
11598 rm -f conftest$ac_exeext
11599 if { (eval echo "$as_me:11599: \"$ac_link\"") >&5
11600   (eval $ac_link) 2>&5
11601   ac_status=$?
11602   echo "$as_me:11602: \$? = $ac_status" >&5
11603   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11604   { (eval echo "$as_me:11604: \"$ac_try\"") >&5
11605   (eval $ac_try) 2>&5
11606   ac_status=$?
11607   echo "$as_me:11607: \$? = $ac_status" >&5
11608   (exit $ac_status); }; }; then
11609   :
11610 else
11611   echo "$as_me: program exited with status $ac_status" >&5
11612 echo "$as_me: failed program was:" >&5
11613 cat conftest.$ac_ext >&5
11614 ac_cv_header_stdc=no
11615 fi
11616 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11617 fi
11618 fi
11619 fi
11620 echo "$as_me:11620: result: $ac_cv_header_stdc" >&5
11621 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11622 if test $ac_cv_header_stdc = yes; then
11623
11624 cat >>confdefs.h <<\EOF
11625 #define STDC_HEADERS 1
11626 EOF
11627
11628 fi
11629
11630 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11631
11632 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11633                   inttypes.h stdint.h unistd.h
11634 do
11635 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11636 echo "$as_me:11636: checking for $ac_header" >&5
11637 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11638 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11639   echo $ECHO_N "(cached) $ECHO_C" >&6
11640 else
11641   cat >conftest.$ac_ext <<_ACEOF
11642 #line 11642 "configure"
11643 #include "confdefs.h"
11644 $ac_includes_default
11645 #include <$ac_header>
11646 _ACEOF
11647 rm -f conftest.$ac_objext
11648 if { (eval echo "$as_me:11648: \"$ac_compile\"") >&5
11649   (eval $ac_compile) 2>&5
11650   ac_status=$?
11651   echo "$as_me:11651: \$? = $ac_status" >&5
11652   (exit $ac_status); } &&
11653          { ac_try='test -s conftest.$ac_objext'
11654   { (eval echo "$as_me:11654: \"$ac_try\"") >&5
11655   (eval $ac_try) 2>&5
11656   ac_status=$?
11657   echo "$as_me:11657: \$? = $ac_status" >&5
11658   (exit $ac_status); }; }; then
11659   eval "$as_ac_Header=yes"
11660 else
11661   echo "$as_me: failed program was:" >&5
11662 cat conftest.$ac_ext >&5
11663 eval "$as_ac_Header=no"
11664 fi
11665 rm -f conftest.$ac_objext conftest.$ac_ext
11666 fi
11667 echo "$as_me:11667: result: `eval echo '${'$as_ac_Header'}'`" >&5
11668 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11669 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11670   cat >>confdefs.h <<EOF
11671 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11672 EOF
11673
11674 fi
11675 done
11676
11677 echo "$as_me:11677: checking for signed char" >&5
11678 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11679 if test "${ac_cv_type_signed_char+set}" = set; then
11680   echo $ECHO_N "(cached) $ECHO_C" >&6
11681 else
11682   cat >conftest.$ac_ext <<_ACEOF
11683 #line 11683 "configure"
11684 #include "confdefs.h"
11685 $ac_includes_default
11686 int
11687 main ()
11688 {
11689 if ((signed char *) 0)
11690   return 0;
11691 if (sizeof (signed char))
11692   return 0;
11693   ;
11694   return 0;
11695 }
11696 _ACEOF
11697 rm -f conftest.$ac_objext
11698 if { (eval echo "$as_me:11698: \"$ac_compile\"") >&5
11699   (eval $ac_compile) 2>&5
11700   ac_status=$?
11701   echo "$as_me:11701: \$? = $ac_status" >&5
11702   (exit $ac_status); } &&
11703          { ac_try='test -s conftest.$ac_objext'
11704   { (eval echo "$as_me:11704: \"$ac_try\"") >&5
11705   (eval $ac_try) 2>&5
11706   ac_status=$?
11707   echo "$as_me:11707: \$? = $ac_status" >&5
11708   (exit $ac_status); }; }; then
11709   ac_cv_type_signed_char=yes
11710 else
11711   echo "$as_me: failed program was:" >&5
11712 cat conftest.$ac_ext >&5
11713 ac_cv_type_signed_char=no
11714 fi
11715 rm -f conftest.$ac_objext conftest.$ac_ext
11716 fi
11717 echo "$as_me:11717: result: $ac_cv_type_signed_char" >&5
11718 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11719
11720 echo "$as_me:11720: checking size of signed char" >&5
11721 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11722 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11723   echo $ECHO_N "(cached) $ECHO_C" >&6
11724 else
11725   if test "$ac_cv_type_signed_char" = yes; then
11726   if test "$cross_compiling" = yes; then
11727   # Depending upon the size, compute the lo and hi bounds.
11728 cat >conftest.$ac_ext <<_ACEOF
11729 #line 11729 "configure"
11730 #include "confdefs.h"
11731 $ac_includes_default
11732 int
11733 main ()
11734 {
11735 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11736   ;
11737   return 0;
11738 }
11739 _ACEOF
11740 rm -f conftest.$ac_objext
11741 if { (eval echo "$as_me:11741: \"$ac_compile\"") >&5
11742   (eval $ac_compile) 2>&5
11743   ac_status=$?
11744   echo "$as_me:11744: \$? = $ac_status" >&5
11745   (exit $ac_status); } &&
11746          { ac_try='test -s conftest.$ac_objext'
11747   { (eval echo "$as_me:11747: \"$ac_try\"") >&5
11748   (eval $ac_try) 2>&5
11749   ac_status=$?
11750   echo "$as_me:11750: \$? = $ac_status" >&5
11751   (exit $ac_status); }; }; then
11752   ac_lo=0 ac_mid=0
11753   while :; do
11754     cat >conftest.$ac_ext <<_ACEOF
11755 #line 11755 "configure"
11756 #include "confdefs.h"
11757 $ac_includes_default
11758 int
11759 main ()
11760 {
11761 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11762   ;
11763   return 0;
11764 }
11765 _ACEOF
11766 rm -f conftest.$ac_objext
11767 if { (eval echo "$as_me:11767: \"$ac_compile\"") >&5
11768   (eval $ac_compile) 2>&5
11769   ac_status=$?
11770   echo "$as_me:11770: \$? = $ac_status" >&5
11771   (exit $ac_status); } &&
11772          { ac_try='test -s conftest.$ac_objext'
11773   { (eval echo "$as_me:11773: \"$ac_try\"") >&5
11774   (eval $ac_try) 2>&5
11775   ac_status=$?
11776   echo "$as_me:11776: \$? = $ac_status" >&5
11777   (exit $ac_status); }; }; then
11778   ac_hi=$ac_mid; break
11779 else
11780   echo "$as_me: failed program was:" >&5
11781 cat conftest.$ac_ext >&5
11782 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11783 fi
11784 rm -f conftest.$ac_objext conftest.$ac_ext
11785   done
11786 else
11787   echo "$as_me: failed program was:" >&5
11788 cat conftest.$ac_ext >&5
11789 ac_hi=-1 ac_mid=-1
11790   while :; do
11791     cat >conftest.$ac_ext <<_ACEOF
11792 #line 11792 "configure"
11793 #include "confdefs.h"
11794 $ac_includes_default
11795 int
11796 main ()
11797 {
11798 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11799   ;
11800   return 0;
11801 }
11802 _ACEOF
11803 rm -f conftest.$ac_objext
11804 if { (eval echo "$as_me:11804: \"$ac_compile\"") >&5
11805   (eval $ac_compile) 2>&5
11806   ac_status=$?
11807   echo "$as_me:11807: \$? = $ac_status" >&5
11808   (exit $ac_status); } &&
11809          { ac_try='test -s conftest.$ac_objext'
11810   { (eval echo "$as_me:11810: \"$ac_try\"") >&5
11811   (eval $ac_try) 2>&5
11812   ac_status=$?
11813   echo "$as_me:11813: \$? = $ac_status" >&5
11814   (exit $ac_status); }; }; then
11815   ac_lo=$ac_mid; break
11816 else
11817   echo "$as_me: failed program was:" >&5
11818 cat conftest.$ac_ext >&5
11819 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11820 fi
11821 rm -f conftest.$ac_objext conftest.$ac_ext
11822   done
11823 fi
11824 rm -f conftest.$ac_objext conftest.$ac_ext
11825 # Binary search between lo and hi bounds.
11826 while test "x$ac_lo" != "x$ac_hi"; do
11827   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11828   cat >conftest.$ac_ext <<_ACEOF
11829 #line 11829 "configure"
11830 #include "confdefs.h"
11831 $ac_includes_default
11832 int
11833 main ()
11834 {
11835 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11836   ;
11837   return 0;
11838 }
11839 _ACEOF
11840 rm -f conftest.$ac_objext
11841 if { (eval echo "$as_me:11841: \"$ac_compile\"") >&5
11842   (eval $ac_compile) 2>&5
11843   ac_status=$?
11844   echo "$as_me:11844: \$? = $ac_status" >&5
11845   (exit $ac_status); } &&
11846          { ac_try='test -s conftest.$ac_objext'
11847   { (eval echo "$as_me:11847: \"$ac_try\"") >&5
11848   (eval $ac_try) 2>&5
11849   ac_status=$?
11850   echo "$as_me:11850: \$? = $ac_status" >&5
11851   (exit $ac_status); }; }; then
11852   ac_hi=$ac_mid
11853 else
11854   echo "$as_me: failed program was:" >&5
11855 cat conftest.$ac_ext >&5
11856 ac_lo=`expr $ac_mid + 1`
11857 fi
11858 rm -f conftest.$ac_objext conftest.$ac_ext
11859 done
11860 ac_cv_sizeof_signed_char=$ac_lo
11861 else
11862   if test "$cross_compiling" = yes; then
11863   { { echo "$as_me:11863: error: cannot run test program while cross compiling" >&5
11864 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11865    { (exit 1); exit 1; }; }
11866 else
11867   cat >conftest.$ac_ext <<_ACEOF
11868 #line 11868 "configure"
11869 #include "confdefs.h"
11870 $ac_includes_default
11871 int
11872 main ()
11873 {
11874 FILE *f = fopen ("conftest.val", "w");
11875 if (!f)
11876   $ac_main_return (1);
11877 fprintf (f, "%d", (sizeof (signed char)));
11878 fclose (f);
11879   ;
11880   return 0;
11881 }
11882 _ACEOF
11883 rm -f conftest$ac_exeext
11884 if { (eval echo "$as_me:11884: \"$ac_link\"") >&5
11885   (eval $ac_link) 2>&5
11886   ac_status=$?
11887   echo "$as_me:11887: \$? = $ac_status" >&5
11888   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11889   { (eval echo "$as_me:11889: \"$ac_try\"") >&5
11890   (eval $ac_try) 2>&5
11891   ac_status=$?
11892   echo "$as_me:11892: \$? = $ac_status" >&5
11893   (exit $ac_status); }; }; then
11894   ac_cv_sizeof_signed_char=`cat conftest.val`
11895 else
11896   echo "$as_me: program exited with status $ac_status" >&5
11897 echo "$as_me: failed program was:" >&5
11898 cat conftest.$ac_ext >&5
11899 fi
11900 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11901 fi
11902 fi
11903 rm -f conftest.val
11904 else
11905   ac_cv_sizeof_signed_char=0
11906 fi
11907 fi
11908 echo "$as_me:11908: result: $ac_cv_sizeof_signed_char" >&5
11909 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11910 cat >>confdefs.h <<EOF
11911 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11912 EOF
11913
11914 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11915         NCURSES_SBOOL="signed char"
11916 else
11917         NCURSES_SBOOL="char"
11918 fi
11919 echo "$as_me:11919: checking if you want to use signed Boolean array in term.h" >&5
11920 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11921
11922 # Check whether --enable-signed-char or --disable-signed-char was given.
11923 if test "${enable_signed_char+set}" = set; then
11924   enableval="$enable_signed_char"
11925   with_signed_char=$enableval
11926 else
11927   with_signed_char=no
11928 fi;
11929 echo "$as_me:11929: result: $with_signed_char" >&5
11930 echo "${ECHO_T}$with_signed_char" >&6
11931 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11932
11933 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11934 echo "$as_me:11934: checking if you want SIGWINCH handler" >&5
11935 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11936
11937 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11938 if test "${enable_sigwinch+set}" = set; then
11939   enableval="$enable_sigwinch"
11940   with_sigwinch=$enableval
11941 else
11942   with_sigwinch=$with_ext_funcs
11943 fi;
11944 echo "$as_me:11944: result: $with_sigwinch" >&5
11945 echo "${ECHO_T}$with_sigwinch" >&6
11946 test "x$with_sigwinch" = xyes &&
11947 cat >>confdefs.h <<\EOF
11948 #define USE_SIGWINCH 1
11949 EOF
11950
11951 ###   use option --enable-tcap-names to allow user to define new capabilities
11952 echo "$as_me:11952: checking if you want user-definable terminal capabilities like termcap" >&5
11953 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11954
11955 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11956 if test "${enable_tcap_names+set}" = set; then
11957   enableval="$enable_tcap_names"
11958   with_tcap_names=$enableval
11959 else
11960   with_tcap_names=$with_ext_funcs
11961 fi;
11962 echo "$as_me:11962: result: $with_tcap_names" >&5
11963 echo "${ECHO_T}$with_tcap_names" >&6
11964 NCURSES_XNAMES=0
11965 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11966
11967 ###############################################################################
11968 # These options are relatively safe to experiment with.
11969
11970 echo "$as_me:11970: checking if you want all development code" >&5
11971 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11972
11973 # Check whether --with-develop or --without-develop was given.
11974 if test "${with_develop+set}" = set; then
11975   withval="$with_develop"
11976   with_develop=$withval
11977 else
11978   with_develop=no
11979 fi;
11980 echo "$as_me:11980: result: $with_develop" >&5
11981 echo "${ECHO_T}$with_develop" >&6
11982
11983 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11984 echo "$as_me:11984: checking if you want hard-tabs code" >&5
11985 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11986
11987 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11988 if test "${enable_hard_tabs+set}" = set; then
11989   enableval="$enable_hard_tabs"
11990
11991 else
11992   enable_hard_tabs=$with_develop
11993 fi;
11994 echo "$as_me:11994: result: $enable_hard_tabs" >&5
11995 echo "${ECHO_T}$enable_hard_tabs" >&6
11996 test "x$enable_hard_tabs" = xyes &&
11997 cat >>confdefs.h <<\EOF
11998 #define USE_HARD_TABS 1
11999 EOF
12000
12001 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12002 echo "$as_me:12002: checking if you want limited support for xmc" >&5
12003 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12004
12005 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12006 if test "${enable_xmc_glitch+set}" = set; then
12007   enableval="$enable_xmc_glitch"
12008
12009 else
12010   enable_xmc_glitch=$with_develop
12011 fi;
12012 echo "$as_me:12012: result: $enable_xmc_glitch" >&5
12013 echo "${ECHO_T}$enable_xmc_glitch" >&6
12014 test "x$enable_xmc_glitch" = xyes &&
12015 cat >>confdefs.h <<\EOF
12016 #define USE_XMC_SUPPORT 1
12017 EOF
12018
12019 ###############################################################################
12020 # These are just experimental, probably should not be in a package:
12021
12022 echo "$as_me:12022: checking if you do not want to assume colors are white-on-black" >&5
12023 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12024
12025 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12026 if test "${enable_assumed_color+set}" = set; then
12027   enableval="$enable_assumed_color"
12028   with_assumed_color=$enableval
12029 else
12030   with_assumed_color=yes
12031 fi;
12032 echo "$as_me:12032: result: $with_assumed_color" >&5
12033 echo "${ECHO_T}$with_assumed_color" >&6
12034 test "x$with_assumed_color" = xyes &&
12035 cat >>confdefs.h <<\EOF
12036 #define USE_ASSUMED_COLOR 1
12037 EOF
12038
12039 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12040 echo "$as_me:12040: checking if you want hashmap scrolling-optimization code" >&5
12041 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12042
12043 # Check whether --enable-hashmap or --disable-hashmap was given.
12044 if test "${enable_hashmap+set}" = set; then
12045   enableval="$enable_hashmap"
12046   with_hashmap=$enableval
12047 else
12048   with_hashmap=yes
12049 fi;
12050 echo "$as_me:12050: result: $with_hashmap" >&5
12051 echo "${ECHO_T}$with_hashmap" >&6
12052 test "x$with_hashmap" = xyes &&
12053 cat >>confdefs.h <<\EOF
12054 #define USE_HASHMAP 1
12055 EOF
12056
12057 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12058 echo "$as_me:12058: checking if you want colorfgbg code" >&5
12059 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12060
12061 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12062 if test "${enable_colorfgbg+set}" = set; then
12063   enableval="$enable_colorfgbg"
12064   with_colorfgbg=$enableval
12065 else
12066   with_colorfgbg=no
12067 fi;
12068 echo "$as_me:12068: result: $with_colorfgbg" >&5
12069 echo "${ECHO_T}$with_colorfgbg" >&6
12070 test "x$with_colorfgbg" = xyes &&
12071 cat >>confdefs.h <<\EOF
12072 #define USE_COLORFGBG 1
12073 EOF
12074
12075 ###   use option --enable-interop to turn on use of bindings used for interop
12076 echo "$as_me:12076: checking if you want interop bindings" >&5
12077 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12078
12079 # Check whether --enable-interop or --disable-interop was given.
12080 if test "${enable_interop+set}" = set; then
12081   enableval="$enable_interop"
12082   with_exp_interop=$enableval
12083 else
12084   with_exp_interop=no
12085 fi;
12086 echo "$as_me:12086: result: $with_exp_interop" >&5
12087 echo "${ECHO_T}$with_exp_interop" >&6
12088
12089 NCURSES_INTEROP_FUNCS=0
12090 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12091
12092 # This is still experimental (20080329), but should ultimately be moved to
12093 # the script-block --with-normal, etc.
12094
12095 echo "$as_me:12095: checking if you want to link with the pthread library" >&5
12096 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12097
12098 # Check whether --with-pthread or --without-pthread was given.
12099 if test "${with_pthread+set}" = set; then
12100   withval="$with_pthread"
12101   with_pthread=$withval
12102 else
12103   with_pthread=no
12104 fi;
12105 echo "$as_me:12105: result: $with_pthread" >&5
12106 echo "${ECHO_T}$with_pthread" >&6
12107
12108 if test "$with_pthread" != no ; then
12109     echo "$as_me:12109: checking for pthread.h" >&5
12110 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12111 if test "${ac_cv_header_pthread_h+set}" = set; then
12112   echo $ECHO_N "(cached) $ECHO_C" >&6
12113 else
12114   cat >conftest.$ac_ext <<_ACEOF
12115 #line 12115 "configure"
12116 #include "confdefs.h"
12117 #include <pthread.h>
12118 _ACEOF
12119 if { (eval echo "$as_me:12119: \"$ac_cpp conftest.$ac_ext\"") >&5
12120   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12121   ac_status=$?
12122   egrep -v '^ *\+' conftest.er1 >conftest.err
12123   rm -f conftest.er1
12124   cat conftest.err >&5
12125   echo "$as_me:12125: \$? = $ac_status" >&5
12126   (exit $ac_status); } >/dev/null; then
12127   if test -s conftest.err; then
12128     ac_cpp_err=$ac_c_preproc_warn_flag
12129   else
12130     ac_cpp_err=
12131   fi
12132 else
12133   ac_cpp_err=yes
12134 fi
12135 if test -z "$ac_cpp_err"; then
12136   ac_cv_header_pthread_h=yes
12137 else
12138   echo "$as_me: failed program was:" >&5
12139   cat conftest.$ac_ext >&5
12140   ac_cv_header_pthread_h=no
12141 fi
12142 rm -f conftest.err conftest.$ac_ext
12143 fi
12144 echo "$as_me:12144: result: $ac_cv_header_pthread_h" >&5
12145 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12146 if test $ac_cv_header_pthread_h = yes; then
12147
12148 cat >>confdefs.h <<\EOF
12149 #define HAVE_PTHREADS_H 1
12150 EOF
12151
12152         for cf_lib_pthread in pthread c_r
12153         do
12154             echo "$as_me:12154: checking if we can link with the $cf_lib_pthread library" >&5
12155 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12156             cf_save_LIBS="$LIBS"
12157
12158 cf_add_libs="-l$cf_lib_pthread"
12159 # Filter out duplicates - this happens with badly-designed ".pc" files...
12160 for cf_add_1lib in $LIBS
12161 do
12162         for cf_add_2lib in $cf_add_libs
12163         do
12164                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12165                 then
12166                         cf_add_1lib=
12167                         break
12168                 fi
12169         done
12170         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12171 done
12172 LIBS="$cf_add_libs"
12173
12174             cat >conftest.$ac_ext <<_ACEOF
12175 #line 12175 "configure"
12176 #include "confdefs.h"
12177
12178 #include <pthread.h>
12179
12180 int
12181 main ()
12182 {
12183
12184                 int rc = pthread_create(0,0,0,0);
12185                 int r2 = pthread_mutexattr_settype(0, 0);
12186
12187   ;
12188   return 0;
12189 }
12190 _ACEOF
12191 rm -f conftest.$ac_objext conftest$ac_exeext
12192 if { (eval echo "$as_me:12192: \"$ac_link\"") >&5
12193   (eval $ac_link) 2>&5
12194   ac_status=$?
12195   echo "$as_me:12195: \$? = $ac_status" >&5
12196   (exit $ac_status); } &&
12197          { ac_try='test -s conftest$ac_exeext'
12198   { (eval echo "$as_me:12198: \"$ac_try\"") >&5
12199   (eval $ac_try) 2>&5
12200   ac_status=$?
12201   echo "$as_me:12201: \$? = $ac_status" >&5
12202   (exit $ac_status); }; }; then
12203   with_pthread=yes
12204 else
12205   echo "$as_me: failed program was:" >&5
12206 cat conftest.$ac_ext >&5
12207 with_pthread=no
12208 fi
12209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12210             LIBS="$cf_save_LIBS"
12211             echo "$as_me:12211: result: $with_pthread" >&5
12212 echo "${ECHO_T}$with_pthread" >&6
12213             test "$with_pthread" = yes && break
12214         done
12215
12216         if test "$with_pthread" = yes ; then
12217
12218 cf_add_libs="-l$cf_lib_pthread"
12219 # Filter out duplicates - this happens with badly-designed ".pc" files...
12220 for cf_add_1lib in $LIBS
12221 do
12222         for cf_add_2lib in $cf_add_libs
12223         do
12224                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12225                 then
12226                         cf_add_1lib=
12227                         break
12228                 fi
12229         done
12230         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12231 done
12232 LIBS="$cf_add_libs"
12233
12234 cat >>confdefs.h <<\EOF
12235 #define HAVE_LIBPTHREADS 1
12236 EOF
12237
12238         else
12239             { { echo "$as_me:12239: error: Cannot link with pthread library" >&5
12240 echo "$as_me: error: Cannot link with pthread library" >&2;}
12241    { (exit 1); exit 1; }; }
12242         fi
12243
12244 fi
12245
12246 fi
12247
12248 if test "x$with_pthread" != xno; then
12249         echo "$as_me:12249: checking for pthread_kill" >&5
12250 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12251 if test "${ac_cv_func_pthread_kill+set}" = set; then
12252   echo $ECHO_N "(cached) $ECHO_C" >&6
12253 else
12254   cat >conftest.$ac_ext <<_ACEOF
12255 #line 12255 "configure"
12256 #include "confdefs.h"
12257 /* System header to define __stub macros and hopefully few prototypes,
12258     which can conflict with char pthread_kill (); below.  */
12259 #include <assert.h>
12260 /* Override any gcc2 internal prototype to avoid an error.  */
12261 #ifdef __cplusplus
12262 extern "C"
12263 #endif
12264 /* We use char because int might match the return type of a gcc2
12265    builtin and then its argument prototype would still apply.  */
12266 char pthread_kill ();
12267 char (*f) ();
12268
12269 int
12270 main ()
12271 {
12272 /* The GNU C library defines this for functions which it implements
12273     to always fail with ENOSYS.  Some functions are actually named
12274     something starting with __ and the normal name is an alias.  */
12275 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12276 choke me
12277 #else
12278 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12279 #endif
12280
12281   ;
12282   return 0;
12283 }
12284 _ACEOF
12285 rm -f conftest.$ac_objext conftest$ac_exeext
12286 if { (eval echo "$as_me:12286: \"$ac_link\"") >&5
12287   (eval $ac_link) 2>&5
12288   ac_status=$?
12289   echo "$as_me:12289: \$? = $ac_status" >&5
12290   (exit $ac_status); } &&
12291          { ac_try='test -s conftest$ac_exeext'
12292   { (eval echo "$as_me:12292: \"$ac_try\"") >&5
12293   (eval $ac_try) 2>&5
12294   ac_status=$?
12295   echo "$as_me:12295: \$? = $ac_status" >&5
12296   (exit $ac_status); }; }; then
12297   ac_cv_func_pthread_kill=yes
12298 else
12299   echo "$as_me: failed program was:" >&5
12300 cat conftest.$ac_ext >&5
12301 ac_cv_func_pthread_kill=no
12302 fi
12303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12304 fi
12305 echo "$as_me:12305: result: $ac_cv_func_pthread_kill" >&5
12306 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12307 if test $ac_cv_func_pthread_kill = yes; then
12308
12309                 echo "$as_me:12309: checking if you want to allow EINTR in wgetch with pthreads" >&5
12310 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12311
12312 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12313 if test "${enable_pthreads_eintr+set}" = set; then
12314   enableval="$enable_pthreads_eintr"
12315   use_pthreads_eintr=$enableval
12316 else
12317   use_pthreads_eintr=no
12318 fi;
12319                 echo "$as_me:12319: result: $use_pthreads_eintr" >&5
12320 echo "${ECHO_T}$use_pthreads_eintr" >&6
12321                 if test "x$use_pthreads_eintr" = xyes ; then
12322
12323 cat >>confdefs.h <<\EOF
12324 #define USE_PTHREADS_EINTR 1
12325 EOF
12326
12327                 fi
12328 fi
12329
12330         echo "$as_me:12330: checking if you want to use weak-symbols for pthreads" >&5
12331 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12332
12333 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12334 if test "${enable_weak_symbols+set}" = set; then
12335   enableval="$enable_weak_symbols"
12336   use_weak_symbols=$enableval
12337 else
12338   use_weak_symbols=no
12339 fi;
12340         echo "$as_me:12340: result: $use_weak_symbols" >&5
12341 echo "${ECHO_T}$use_weak_symbols" >&6
12342         if test "x$use_weak_symbols" = xyes ; then
12343
12344 echo "$as_me:12344: checking if $CC supports weak symbols" >&5
12345 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12346 if test "${cf_cv_weak_symbols+set}" = set; then
12347   echo $ECHO_N "(cached) $ECHO_C" >&6
12348 else
12349
12350 cat >conftest.$ac_ext <<_ACEOF
12351 #line 12351 "configure"
12352 #include "confdefs.h"
12353
12354 #include <stdio.h>
12355 int
12356 main ()
12357 {
12358
12359 #if defined(__GNUC__)
12360 #  if defined __USE_ISOC99
12361 #    define _cat_pragma(exp)    _Pragma(#exp)
12362 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12363 #  else
12364 #    define _weak_pragma(exp)
12365 #  endif
12366 #  define _declare(name)        __extension__ extern __typeof__(name) name
12367 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12368 #endif
12369
12370 weak_symbol(fopen);
12371
12372   ;
12373   return 0;
12374 }
12375 _ACEOF
12376 rm -f conftest.$ac_objext
12377 if { (eval echo "$as_me:12377: \"$ac_compile\"") >&5
12378   (eval $ac_compile) 2>&5
12379   ac_status=$?
12380   echo "$as_me:12380: \$? = $ac_status" >&5
12381   (exit $ac_status); } &&
12382          { ac_try='test -s conftest.$ac_objext'
12383   { (eval echo "$as_me:12383: \"$ac_try\"") >&5
12384   (eval $ac_try) 2>&5
12385   ac_status=$?
12386   echo "$as_me:12386: \$? = $ac_status" >&5
12387   (exit $ac_status); }; }; then
12388   cf_cv_weak_symbols=yes
12389 else
12390   echo "$as_me: failed program was:" >&5
12391 cat conftest.$ac_ext >&5
12392 cf_cv_weak_symbols=no
12393 fi
12394 rm -f conftest.$ac_objext conftest.$ac_ext
12395
12396 fi
12397 echo "$as_me:12397: result: $cf_cv_weak_symbols" >&5
12398 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12399
12400         else
12401                 cf_cv_weak_symbols=no
12402         fi
12403
12404         if test "x$cf_cv_weak_symbols" = xyes ; then
12405
12406 cat >>confdefs.h <<\EOF
12407 #define USE_WEAK_SYMBOLS 1
12408 EOF
12409
12410         fi
12411 fi
12412
12413 PTHREAD=
12414 if test "x$with_pthread" = "xyes" ; then
12415
12416 cat >>confdefs.h <<\EOF
12417 #define USE_PTHREADS 1
12418 EOF
12419
12420     enable_reentrant=yes
12421     if test "x$cf_cv_weak_symbols" = xyes ; then
12422         PTHREAD=-lpthread
12423     fi
12424 fi
12425
12426 # Reentrant code has to be opaque; there's little advantage to making ncurses
12427 # opaque outside of that, so there is no --enable-opaque option.  We can use
12428 # this option without --with-pthreads, but this will be always set for
12429 # pthreads.
12430 echo "$as_me:12430: checking if you want experimental reentrant code" >&5
12431 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12432
12433 # Check whether --enable-reentrant or --disable-reentrant was given.
12434 if test "${enable_reentrant+set}" = set; then
12435   enableval="$enable_reentrant"
12436   with_reentrant=$enableval
12437 else
12438   with_reentrant=no
12439 fi;
12440 echo "$as_me:12440: result: $with_reentrant" >&5
12441 echo "${ECHO_T}$with_reentrant" >&6
12442 if test "x$with_reentrant" = xyes ; then
12443         cf_cv_enable_reentrant=1
12444         cf_cv_enable_opaque="NCURSES_INTERNALS"
12445         NCURSES_OPAQUE=1
12446         NCURSES_SIZE_T=int
12447         if test "x$cf_cv_weak_symbols" = xyes ; then
12448
12449 # remove pthread library from $LIBS
12450 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12451
12452 cf_add_libs="-lpthread"
12453 # Filter out duplicates - this happens with badly-designed ".pc" files...
12454 for cf_add_1lib in $TEST_LIBS
12455 do
12456         for cf_add_2lib in $cf_add_libs
12457         do
12458                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12459                 then
12460                         cf_add_1lib=
12461                         break
12462                 fi
12463         done
12464         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12465 done
12466 TEST_LIBS="$cf_add_libs"
12467
12468 cf_add_libs="-lpthread"
12469 # Filter out duplicates - this happens with badly-designed ".pc" files...
12470 for cf_add_1lib in $TEST_LIBS2
12471 do
12472         for cf_add_2lib in $cf_add_libs
12473         do
12474                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12475                 then
12476                         cf_add_1lib=
12477                         break
12478                 fi
12479         done
12480         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12481 done
12482 TEST_LIBS2="$cf_add_libs"
12483
12484         else
12485                 # when not using weak symbols but with_reentrant,
12486                 # add 't' to the library suffix on all platforms
12487                 # except cygwin, where we only do that if ALSO
12488                 # compiling with full thread support.
12489                 case "$host" in
12490                 *cygwin* | *msys*) #(vi
12491                         if test "$with_pthread" = "yes" ; then
12492                                 if test "x$disable_lib_suffixes" = "xno" ; then
12493                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12494                                 fi
12495                         fi ;;
12496                 *)
12497                         if test "x$disable_lib_suffixes" = "xno" ; then
12498                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12499                         fi
12500                         ;;
12501                 esac
12502         fi
12503
12504 cat >>confdefs.h <<\EOF
12505 #define USE_REENTRANT 1
12506 EOF
12507
12508 if test "${with_abi_version+set}" != set; then
12509         case $cf_cv_rel_version in
12510         5.*)
12511                 cf_cv_rel_version=6.0
12512                 cf_cv_abi_version=6
12513                 { echo "$as_me:12513: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12514 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12515                 ;;
12516         esac
12517 fi
12518
12519 else
12520         cf_cv_enable_reentrant=0
12521         cf_cv_enable_opaque="NCURSES_OPAQUE"
12522         NCURSES_OPAQUE=0
12523         NCURSES_SIZE_T=short
12524 fi
12525
12526 ### Allow using a different wrap-prefix
12527 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12528         echo "$as_me:12528: checking for prefix used to wrap public variables" >&5
12529 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12530
12531 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12532 if test "${with_wrap_prefix+set}" = set; then
12533   withval="$with_wrap_prefix"
12534   NCURSES_WRAP_PREFIX=$withval
12535 else
12536   NCURSES_WRAP_PREFIX=_nc_
12537 fi;
12538         echo "$as_me:12538: result: $NCURSES_WRAP_PREFIX" >&5
12539 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12540 else
12541         NCURSES_WRAP_PREFIX=_nc_
12542 fi
12543
12544 cat >>confdefs.h <<EOF
12545 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12546 EOF
12547
12548 echo "$as_me:12548: checking if you want experimental safe-sprintf code" >&5
12549 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12550
12551 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12552 if test "${enable_safe_sprintf+set}" = set; then
12553   enableval="$enable_safe_sprintf"
12554   with_safe_sprintf=$enableval
12555 else
12556   with_safe_sprintf=no
12557 fi;
12558 echo "$as_me:12558: result: $with_safe_sprintf" >&5
12559 echo "${ECHO_T}$with_safe_sprintf" >&6
12560 test "x$with_safe_sprintf" = xyes &&
12561 cat >>confdefs.h <<\EOF
12562 #define USE_SAFE_SPRINTF 1
12563 EOF
12564
12565 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12566 # when hashmap is used scroll hints are useless
12567 if test "$with_hashmap" = no ; then
12568 echo "$as_me:12568: checking if you want to experiment without scrolling-hints code" >&5
12569 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12570
12571 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12572 if test "${enable_scroll_hints+set}" = set; then
12573   enableval="$enable_scroll_hints"
12574   with_scroll_hints=$enableval
12575 else
12576   with_scroll_hints=yes
12577 fi;
12578 echo "$as_me:12578: result: $with_scroll_hints" >&5
12579 echo "${ECHO_T}$with_scroll_hints" >&6
12580 test "x$with_scroll_hints" = xyes &&
12581 cat >>confdefs.h <<\EOF
12582 #define USE_SCROLL_HINTS 1
12583 EOF
12584
12585 fi
12586
12587 echo "$as_me:12587: checking if you want experimental wgetch-events code" >&5
12588 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12589
12590 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12591 if test "${enable_wgetch_events+set}" = set; then
12592   enableval="$enable_wgetch_events"
12593   with_wgetch_events=$enableval
12594 else
12595   with_wgetch_events=no
12596 fi;
12597 echo "$as_me:12597: result: $with_wgetch_events" >&5
12598 echo "${ECHO_T}$with_wgetch_events" >&6
12599 test "x$with_wgetch_events" = xyes &&
12600 cat >>confdefs.h <<\EOF
12601 #define NCURSES_WGETCH_EVENTS 1
12602 EOF
12603
12604 ###############################################################################
12605
12606 ###     use option --disable-echo to suppress full display compiling commands
12607
12608 echo "$as_me:12608: checking if you want to see long compiling messages" >&5
12609 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12610
12611 # Check whether --enable-echo or --disable-echo was given.
12612 if test "${enable_echo+set}" = set; then
12613   enableval="$enable_echo"
12614   test "$enableval" != no && enableval=yes
12615   if test "$enableval" != "yes" ; then
12616
12617     ECHO_LT='--silent'
12618     ECHO_LD='@echo linking $@;'
12619     RULE_CC='@echo compiling $<'
12620     SHOW_CC='@echo compiling $@'
12621     ECHO_CC='@'
12622
12623   else
12624
12625     ECHO_LT=''
12626     ECHO_LD=''
12627     RULE_CC=''
12628     SHOW_CC=''
12629     ECHO_CC=''
12630
12631   fi
12632 else
12633   enableval=yes
12634
12635     ECHO_LT=''
12636     ECHO_LD=''
12637     RULE_CC=''
12638     SHOW_CC=''
12639     ECHO_CC=''
12640
12641 fi;
12642 echo "$as_me:12642: result: $enableval" >&5
12643 echo "${ECHO_T}$enableval" >&6
12644
12645 if test "x$enable_echo" = xyes; then
12646         ECHO_LINK=
12647 else
12648         ECHO_LINK='@ echo linking $@ ... ;'
12649         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12650         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12651 fi
12652
12653 ###     use option --enable-warnings to turn on all gcc warnings
12654 echo "$as_me:12654: checking if you want to see compiler warnings" >&5
12655 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12656
12657 # Check whether --enable-warnings or --disable-warnings was given.
12658 if test "${enable_warnings+set}" = set; then
12659   enableval="$enable_warnings"
12660   with_warnings=$enableval
12661 fi;
12662 echo "$as_me:12662: result: $with_warnings" >&5
12663 echo "${ECHO_T}$with_warnings" >&6
12664
12665 if test "x$with_warnings" = "xyes"; then
12666
12667         ADAFLAGS="$ADAFLAGS -gnatg"
12668
12669 INTEL_COMPILER=no
12670
12671 if test "$GCC" = yes ; then
12672         case $host_os in
12673         linux*|gnu*)
12674                 echo "$as_me:12674: checking if this is really Intel C compiler" >&5
12675 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12676                 cf_save_CFLAGS="$CFLAGS"
12677                 CFLAGS="$CFLAGS -no-gcc"
12678                 cat >conftest.$ac_ext <<_ACEOF
12679 #line 12679 "configure"
12680 #include "confdefs.h"
12681
12682 int
12683 main ()
12684 {
12685
12686 #ifdef __INTEL_COMPILER
12687 #else
12688 make an error
12689 #endif
12690
12691   ;
12692   return 0;
12693 }
12694 _ACEOF
12695 rm -f conftest.$ac_objext
12696 if { (eval echo "$as_me:12696: \"$ac_compile\"") >&5
12697   (eval $ac_compile) 2>&5
12698   ac_status=$?
12699   echo "$as_me:12699: \$? = $ac_status" >&5
12700   (exit $ac_status); } &&
12701          { ac_try='test -s conftest.$ac_objext'
12702   { (eval echo "$as_me:12702: \"$ac_try\"") >&5
12703   (eval $ac_try) 2>&5
12704   ac_status=$?
12705   echo "$as_me:12705: \$? = $ac_status" >&5
12706   (exit $ac_status); }; }; then
12707   INTEL_COMPILER=yes
12708 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12709
12710 else
12711   echo "$as_me: failed program was:" >&5
12712 cat conftest.$ac_ext >&5
12713 fi
12714 rm -f conftest.$ac_objext conftest.$ac_ext
12715                 CFLAGS="$cf_save_CFLAGS"
12716                 echo "$as_me:12716: result: $INTEL_COMPILER" >&5
12717 echo "${ECHO_T}$INTEL_COMPILER" >&6
12718                 ;;
12719         esac
12720 fi
12721
12722 CLANG_COMPILER=no
12723
12724 if test "$GCC" = yes ; then
12725         echo "$as_me:12725: checking if this is really Clang C compiler" >&5
12726 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12727         cf_save_CFLAGS="$CFLAGS"
12728         CFLAGS="$CFLAGS -Qunused-arguments"
12729         cat >conftest.$ac_ext <<_ACEOF
12730 #line 12730 "configure"
12731 #include "confdefs.h"
12732
12733 int
12734 main ()
12735 {
12736
12737 #ifdef __clang__
12738 #else
12739 make an error
12740 #endif
12741
12742   ;
12743   return 0;
12744 }
12745 _ACEOF
12746 rm -f conftest.$ac_objext
12747 if { (eval echo "$as_me:12747: \"$ac_compile\"") >&5
12748   (eval $ac_compile) 2>&5
12749   ac_status=$?
12750   echo "$as_me:12750: \$? = $ac_status" >&5
12751   (exit $ac_status); } &&
12752          { ac_try='test -s conftest.$ac_objext'
12753   { (eval echo "$as_me:12753: \"$ac_try\"") >&5
12754   (eval $ac_try) 2>&5
12755   ac_status=$?
12756   echo "$as_me:12756: \$? = $ac_status" >&5
12757   (exit $ac_status); }; }; then
12758   CLANG_COMPILER=yes
12759 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12760
12761 else
12762   echo "$as_me: failed program was:" >&5
12763 cat conftest.$ac_ext >&5
12764 fi
12765 rm -f conftest.$ac_objext conftest.$ac_ext
12766         CFLAGS="$cf_save_CFLAGS"
12767         echo "$as_me:12767: result: $CLANG_COMPILER" >&5
12768 echo "${ECHO_T}$CLANG_COMPILER" >&6
12769 fi
12770
12771 cat > conftest.$ac_ext <<EOF
12772 #line 12772 "${as_me:-configure}"
12773 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12774 EOF
12775
12776 if test "$INTEL_COMPILER" = yes
12777 then
12778 # The "-wdXXX" options suppress warnings:
12779 # remark #1419: external declaration in primary source file
12780 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12781 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12782 # remark #193: zero used for undefined preprocessing identifier
12783 # remark #593: variable "curs_sb_left_arrow" was set but never used
12784 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12785 # remark #869: parameter "tw" was never referenced
12786 # remark #981: operands are evaluated in unspecified order
12787 # warning #279: controlling expression is constant
12788
12789         { echo "$as_me:12789: checking for $CC warning options..." >&5
12790 echo "$as_me: checking for $CC warning options..." >&6;}
12791         cf_save_CFLAGS="$CFLAGS"
12792         EXTRA_CFLAGS="-Wall"
12793         for cf_opt in \
12794                 wd1419 \
12795                 wd1683 \
12796                 wd1684 \
12797                 wd193 \
12798                 wd593 \
12799                 wd279 \
12800                 wd810 \
12801                 wd869 \
12802                 wd981
12803         do
12804                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12805                 if { (eval echo "$as_me:12805: \"$ac_compile\"") >&5
12806   (eval $ac_compile) 2>&5
12807   ac_status=$?
12808   echo "$as_me:12808: \$? = $ac_status" >&5
12809   (exit $ac_status); }; then
12810                         test -n "$verbose" && echo "$as_me:12810: result: ... -$cf_opt" >&5
12811 echo "${ECHO_T}... -$cf_opt" >&6
12812                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12813                 fi
12814         done
12815         CFLAGS="$cf_save_CFLAGS"
12816
12817 elif test "$GCC" = yes
12818 then
12819         { echo "$as_me:12819: checking for $CC warning options..." >&5
12820 echo "$as_me: checking for $CC warning options..." >&6;}
12821         cf_save_CFLAGS="$CFLAGS"
12822         EXTRA_CFLAGS=
12823         cf_warn_CONST=""
12824         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12825         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12826         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12827         for cf_opt in W Wall \
12828                 Wbad-function-cast \
12829                 Wcast-align \
12830                 Wcast-qual \
12831                 Wdeclaration-after-statement \
12832                 Wextra \
12833                 Winline \
12834                 Wmissing-declarations \
12835                 Wmissing-prototypes \
12836                 Wnested-externs \
12837                 Wpointer-arith \
12838                 Wshadow \
12839                 Wstrict-prototypes \
12840                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12841         do
12842                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12843                 if { (eval echo "$as_me:12843: \"$ac_compile\"") >&5
12844   (eval $ac_compile) 2>&5
12845   ac_status=$?
12846   echo "$as_me:12846: \$? = $ac_status" >&5
12847   (exit $ac_status); }; then
12848                         test -n "$verbose" && echo "$as_me:12848: result: ... -$cf_opt" >&5
12849 echo "${ECHO_T}... -$cf_opt" >&6
12850                         case $cf_opt in #(vi
12851                         Wcast-qual) #(vi
12852                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12853                                 ;;
12854                         Winline) #(vi
12855                                 case $GCC_VERSION in
12856                                 [34].*)
12857                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12858
12859 echo "${as_me:-configure}:12859: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12860
12861                                         continue;;
12862                                 esac
12863                                 ;;
12864                         Wpointer-arith) #(vi
12865                                 case $GCC_VERSION in
12866                                 [12].*)
12867                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12868
12869 echo "${as_me:-configure}:12869: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12870
12871                                         continue;;
12872                                 esac
12873                                 ;;
12874                         esac
12875                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12876                 fi
12877         done
12878         CFLAGS="$cf_save_CFLAGS"
12879 fi
12880 rm -rf conftest*
12881
12882         if test "x$cf_with_cxx" = xyes ; then
12883
12884 INTEL_CPLUSPLUS=no
12885
12886 if test "$GCC" = yes ; then
12887         case $host_os in
12888         linux*|gnu*)
12889                 echo "$as_me:12889: checking if this is really Intel C++ compiler" >&5
12890 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12891                 cf_save_CFLAGS="$CXXFLAGS"
12892                 CXXFLAGS="$CXXFLAGS -no-gcc"
12893                 cat >conftest.$ac_ext <<_ACEOF
12894 #line 12894 "configure"
12895 #include "confdefs.h"
12896
12897 int
12898 main ()
12899 {
12900
12901 #ifdef __INTEL_COMPILER
12902 #else
12903 make an error
12904 #endif
12905
12906   ;
12907   return 0;
12908 }
12909 _ACEOF
12910 rm -f conftest.$ac_objext
12911 if { (eval echo "$as_me:12911: \"$ac_compile\"") >&5
12912   (eval $ac_compile) 2>&5
12913   ac_status=$?
12914   echo "$as_me:12914: \$? = $ac_status" >&5
12915   (exit $ac_status); } &&
12916          { ac_try='test -s conftest.$ac_objext'
12917   { (eval echo "$as_me:12917: \"$ac_try\"") >&5
12918   (eval $ac_try) 2>&5
12919   ac_status=$?
12920   echo "$as_me:12920: \$? = $ac_status" >&5
12921   (exit $ac_status); }; }; then
12922   INTEL_CPLUSPLUS=yes
12923 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12924
12925 else
12926   echo "$as_me: failed program was:" >&5
12927 cat conftest.$ac_ext >&5
12928 fi
12929 rm -f conftest.$ac_objext conftest.$ac_ext
12930                 CXXFLAGS="$cf_save_CFLAGS"
12931                 echo "$as_me:12931: result: $INTEL_CPLUSPLUS" >&5
12932 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12933                 ;;
12934         esac
12935 fi
12936
12937 CLANG_CPLUSPLUS=no
12938
12939 if test "$GCC" = yes ; then
12940         echo "$as_me:12940: checking if this is really Clang C++ compiler" >&5
12941 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12942         cf_save_CFLAGS="$CXXFLAGS"
12943         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12944         cat >conftest.$ac_ext <<_ACEOF
12945 #line 12945 "configure"
12946 #include "confdefs.h"
12947
12948 int
12949 main ()
12950 {
12951
12952 #ifdef __clang__
12953 #else
12954 make an error
12955 #endif
12956
12957   ;
12958   return 0;
12959 }
12960 _ACEOF
12961 rm -f conftest.$ac_objext
12962 if { (eval echo "$as_me:12962: \"$ac_compile\"") >&5
12963   (eval $ac_compile) 2>&5
12964   ac_status=$?
12965   echo "$as_me:12965: \$? = $ac_status" >&5
12966   (exit $ac_status); } &&
12967          { ac_try='test -s conftest.$ac_objext'
12968   { (eval echo "$as_me:12968: \"$ac_try\"") >&5
12969   (eval $ac_try) 2>&5
12970   ac_status=$?
12971   echo "$as_me:12971: \$? = $ac_status" >&5
12972   (exit $ac_status); }; }; then
12973   CLANG_CPLUSPLUS=yes
12974 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12975
12976 else
12977   echo "$as_me: failed program was:" >&5
12978 cat conftest.$ac_ext >&5
12979 fi
12980 rm -f conftest.$ac_objext conftest.$ac_ext
12981         CXXFLAGS="$cf_save_CFLAGS"
12982         echo "$as_me:12982: result: $CLANG_CPLUSPLUS" >&5
12983 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12984 fi
12985
12986 ac_ext=cc
12987 ac_cpp='$CXXCPP $CPPFLAGS'
12988 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12989 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12990 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12991 ac_main_return=return
12992
12993 cat > conftest.$ac_ext <<EOF
12994 #line 12994 "configure"
12995 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12996 EOF
12997
12998 if test "$INTEL_CPLUSPLUS" = yes
12999 then
13000 # The "-wdXXX" options suppress warnings:
13001 # remark #1419: external declaration in primary source file
13002 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13003 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13004 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13005 # remark #193: zero used for undefined preprocessing identifier
13006 # remark #593: variable "curs_sb_left_arrow" was set but never used
13007 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13008 # remark #869: parameter "tw" was never referenced
13009 # remark #981: operands are evaluated in unspecified order
13010 # warning #269: invalid format string conversion
13011
13012         { echo "$as_me:13012: checking for $CC warning options..." >&5
13013 echo "$as_me: checking for $CC warning options..." >&6;}
13014         cf_save_CXXFLAGS="$CXXFLAGS"
13015         EXTRA_CXXFLAGS="-Wall"
13016         for cf_opt in \
13017                 wd1419 \
13018                 wd1682 \
13019                 wd1683 \
13020                 wd1684 \
13021                 wd193 \
13022                 wd279 \
13023                 wd593 \
13024                 wd810 \
13025                 wd869 \
13026                 wd981
13027         do
13028                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13029                 if { (eval echo "$as_me:13029: \"$ac_compile\"") >&5
13030   (eval $ac_compile) 2>&5
13031   ac_status=$?
13032   echo "$as_me:13032: \$? = $ac_status" >&5
13033   (exit $ac_status); }; then
13034                         test -n "$verbose" && echo "$as_me:13034: result: ... -$cf_opt" >&5
13035 echo "${ECHO_T}... -$cf_opt" >&6
13036                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13037                 fi
13038         done
13039         CXXFLAGS="$cf_save_CXXFLAGS"
13040
13041 elif test "$GXX" = yes
13042 then
13043         { echo "$as_me:13043: checking for $CXX warning options..." >&5
13044 echo "$as_me: checking for $CXX warning options..." >&6;}
13045         cf_save_CXXFLAGS="$CXXFLAGS"
13046         EXTRA_CXXFLAGS="-W -Wall"
13047         cf_gxx_extra_warnings=""
13048         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13049         case "$GCC_VERSION" in
13050         [1-2].*)
13051                 ;;
13052         *)
13053                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13054                 ;;
13055         esac
13056         for cf_opt in \
13057                 Wabi \
13058                 fabi-version=0 \
13059                 Wextra \
13060                 Wignored-qualifiers \
13061                 Wlogical-op \
13062                 Woverloaded-virtual \
13063                 Wsign-promo \
13064                 Wsynth \
13065                 Wold-style-cast \
13066                 Wcast-align \
13067                 Wcast-qual \
13068                 Wpointer-arith \
13069                 Wshadow \
13070                 Wundef $cf_gxx_extra_warnings Wno-unused
13071         do
13072                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13073                 if { (eval echo "$as_me:13073: \"$ac_compile\"") >&5
13074   (eval $ac_compile) 2>&5
13075   ac_status=$?
13076   echo "$as_me:13076: \$? = $ac_status" >&5
13077   (exit $ac_status); }; then
13078                         test -n "$verbose" && echo "$as_me:13078: result: ... -$cf_opt" >&5
13079 echo "${ECHO_T}... -$cf_opt" >&6
13080                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13081                 else
13082                         test -n "$verbose" && echo "$as_me:13082: result: ... no -$cf_opt" >&5
13083 echo "${ECHO_T}... no -$cf_opt" >&6
13084                 fi
13085         done
13086         CXXFLAGS="$cf_save_CXXFLAGS"
13087 fi
13088
13089 rm -rf conftest*
13090 ac_ext=c
13091 ac_cpp='$CPP $CPPFLAGS'
13092 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13093 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13094 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13095 ac_main_return=return
13096
13097         fi
13098 fi
13099
13100 if test "$GCC" = yes
13101 then
13102 cat > conftest.i <<EOF
13103 #ifndef GCC_PRINTF
13104 #define GCC_PRINTF 0
13105 #endif
13106 #ifndef GCC_SCANF
13107 #define GCC_SCANF 0
13108 #endif
13109 #ifndef GCC_NORETURN
13110 #define GCC_NORETURN /* nothing */
13111 #endif
13112 #ifndef GCC_UNUSED
13113 #define GCC_UNUSED /* nothing */
13114 #endif
13115 EOF
13116 if test "$GCC" = yes
13117 then
13118         { echo "$as_me:13118: checking for $CC __attribute__ directives..." >&5
13119 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13120 cat > conftest.$ac_ext <<EOF
13121 #line 13121 "${as_me:-configure}"
13122 #include "confdefs.h"
13123 #include "conftest.h"
13124 #include "conftest.i"
13125 #if     GCC_PRINTF
13126 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13127 #else
13128 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13129 #endif
13130 #if     GCC_SCANF
13131 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13132 #else
13133 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13134 #endif
13135 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13136 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13137 extern void foo(void) GCC_NORETURN;
13138 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13139 EOF
13140         cf_printf_attribute=no
13141         cf_scanf_attribute=no
13142         for cf_attribute in scanf printf unused noreturn
13143         do
13144
13145 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13146
13147                 cf_directive="__attribute__(($cf_attribute))"
13148                 echo "checking for $CC $cf_directive" 1>&5
13149
13150                 case $cf_attribute in #(vi
13151                 printf) #(vi
13152                         cf_printf_attribute=yes
13153                         cat >conftest.h <<EOF
13154 #define GCC_$cf_ATTRIBUTE 1
13155 EOF
13156                         ;;
13157                 scanf) #(vi
13158                         cf_scanf_attribute=yes
13159                         cat >conftest.h <<EOF
13160 #define GCC_$cf_ATTRIBUTE 1
13161 EOF
13162                         ;;
13163                 *) #(vi
13164                         cat >conftest.h <<EOF
13165 #define GCC_$cf_ATTRIBUTE $cf_directive
13166 EOF
13167                         ;;
13168                 esac
13169
13170                 if { (eval echo "$as_me:13170: \"$ac_compile\"") >&5
13171   (eval $ac_compile) 2>&5
13172   ac_status=$?
13173   echo "$as_me:13173: \$? = $ac_status" >&5
13174   (exit $ac_status); }; then
13175                         test -n "$verbose" && echo "$as_me:13175: result: ... $cf_attribute" >&5
13176 echo "${ECHO_T}... $cf_attribute" >&6
13177                         cat conftest.h >>confdefs.h
13178                         case $cf_attribute in #(vi
13179                         noreturn) #(vi
13180
13181 cat >>confdefs.h <<EOF
13182 #define GCC_NORETURN $cf_directive
13183 EOF
13184
13185                                 ;;
13186                         printf) #(vi
13187                                 cf_value='/* nothing */'
13188                                 if test "$cf_printf_attribute" != no ; then
13189                                         cf_value='__attribute__((format(printf,fmt,var)))'
13190
13191 cat >>confdefs.h <<\EOF
13192 #define GCC_PRINTF 1
13193 EOF
13194
13195                                 fi
13196
13197 cat >>confdefs.h <<EOF
13198 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13199 EOF
13200
13201                                 ;;
13202                         scanf) #(vi
13203                                 cf_value='/* nothing */'
13204                                 if test "$cf_scanf_attribute" != no ; then
13205                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13206
13207 cat >>confdefs.h <<\EOF
13208 #define GCC_SCANF 1
13209 EOF
13210
13211                                 fi
13212
13213 cat >>confdefs.h <<EOF
13214 #define GCC_SCANFLIKE(fmt,var) $cf_value
13215 EOF
13216
13217                                 ;;
13218                         unused) #(vi
13219
13220 cat >>confdefs.h <<EOF
13221 #define GCC_UNUSED $cf_directive
13222 EOF
13223
13224                                 ;;
13225                         esac
13226                 fi
13227         done
13228 else
13229         fgrep define conftest.i >>confdefs.h
13230 fi
13231 rm -rf conftest*
13232 fi
13233
13234 echo "$as_me:13234: checking if you want to work around bogus compiler/loader warnings" >&5
13235 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13236
13237 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13238 if test "${enable_string_hacks+set}" = set; then
13239   enableval="$enable_string_hacks"
13240   with_string_hacks=$enableval
13241 else
13242   with_string_hacks=no
13243 fi;
13244 echo "$as_me:13244: result: $with_string_hacks" >&5
13245 echo "${ECHO_T}$with_string_hacks" >&6
13246
13247 if test "x$with_string_hacks" = "xyes"; then
13248
13249 cat >>confdefs.h <<\EOF
13250 #define USE_STRING_HACKS 1
13251 EOF
13252
13253         { echo "$as_me:13253: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13254 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13255
13256 for ac_func in strlcat strlcpy snprintf
13257 do
13258 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13259 echo "$as_me:13259: checking for $ac_func" >&5
13260 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13261 if eval "test \"\${$as_ac_var+set}\" = set"; then
13262   echo $ECHO_N "(cached) $ECHO_C" >&6
13263 else
13264   cat >conftest.$ac_ext <<_ACEOF
13265 #line 13265 "configure"
13266 #include "confdefs.h"
13267 /* System header to define __stub macros and hopefully few prototypes,
13268     which can conflict with char $ac_func (); below.  */
13269 #include <assert.h>
13270 /* Override any gcc2 internal prototype to avoid an error.  */
13271 #ifdef __cplusplus
13272 extern "C"
13273 #endif
13274 /* We use char because int might match the return type of a gcc2
13275    builtin and then its argument prototype would still apply.  */
13276 char $ac_func ();
13277 char (*f) ();
13278
13279 int
13280 main ()
13281 {
13282 /* The GNU C library defines this for functions which it implements
13283     to always fail with ENOSYS.  Some functions are actually named
13284     something starting with __ and the normal name is an alias.  */
13285 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13286 choke me
13287 #else
13288 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13289 #endif
13290
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   eval "$as_ac_var=yes"
13308 else
13309   echo "$as_me: failed program was:" >&5
13310 cat conftest.$ac_ext >&5
13311 eval "$as_ac_var=no"
13312 fi
13313 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13314 fi
13315 echo "$as_me:13315: result: `eval echo '${'$as_ac_var'}'`" >&5
13316 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13317 if test `eval echo '${'$as_ac_var'}'` = yes; then
13318   cat >>confdefs.h <<EOF
13319 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13320 EOF
13321
13322 fi
13323 done
13324
13325 fi
13326
13327 ###     use option --enable-assertions to turn on generation of assertion code
13328 echo "$as_me:13328: checking if you want to enable runtime assertions" >&5
13329 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13330
13331 # Check whether --enable-assertions or --disable-assertions was given.
13332 if test "${enable_assertions+set}" = set; then
13333   enableval="$enable_assertions"
13334   with_assertions=$enableval
13335 else
13336   with_assertions=no
13337 fi;
13338 echo "$as_me:13338: result: $with_assertions" >&5
13339 echo "${ECHO_T}$with_assertions" >&6
13340 if test -n "$GCC"
13341 then
13342         if test "$with_assertions" = no
13343         then
13344                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13345         else
13346
13347         ADAFLAGS="$ADAFLAGS -gnata"
13348
13349         fi
13350 fi
13351
13352 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13353
13354 echo "$as_me:13354: checking if you want to use dmalloc for testing" >&5
13355 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13356
13357 # Check whether --with-dmalloc or --without-dmalloc was given.
13358 if test "${with_dmalloc+set}" = set; then
13359   withval="$with_dmalloc"
13360
13361 cat >>confdefs.h <<EOF
13362 #define USE_DMALLOC 1
13363 EOF
13364
13365         : ${with_cflags:=-g}
13366         : ${with_no_leaks:=yes}
13367          with_dmalloc=yes
13368 else
13369   with_dmalloc=
13370 fi;
13371 echo "$as_me:13371: result: ${with_dmalloc:-no}" >&5
13372 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13373
13374 case .$with_cflags in #(vi
13375 .*-g*)
13376         case .$CFLAGS in #(vi
13377         .*-g*) #(vi
13378                 ;;
13379         *)
13380
13381 cf_fix_cppflags=no
13382 cf_new_cflags=
13383 cf_new_cppflags=
13384 cf_new_extra_cppflags=
13385
13386 for cf_add_cflags in -g
13387 do
13388 case $cf_fix_cppflags in
13389 no)
13390         case $cf_add_cflags in #(vi
13391         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13392                 case $cf_add_cflags in
13393                 -D*)
13394                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13395
13396                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13397                                 && test -z "${cf_tst_cflags}" \
13398                                 && cf_fix_cppflags=yes
13399
13400                         if test $cf_fix_cppflags = yes ; then
13401                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13402                                 continue
13403                         elif test "${cf_tst_cflags}" = "\"'" ; then
13404                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13405                                 continue
13406                         fi
13407                         ;;
13408                 esac
13409                 case "$CPPFLAGS" in
13410                 *$cf_add_cflags) #(vi
13411                         ;;
13412                 *) #(vi
13413                         case $cf_add_cflags in #(vi
13414                         -D*)
13415                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13416
13417 CPPFLAGS=`echo "$CPPFLAGS" | \
13418         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13419                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13420
13421                                 ;;
13422                         esac
13423                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13424                         ;;
13425                 esac
13426                 ;;
13427         *)
13428                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13429                 ;;
13430         esac
13431         ;;
13432 yes)
13433         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13434
13435         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13436
13437         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13438                 && test -z "${cf_tst_cflags}" \
13439                 && cf_fix_cppflags=no
13440         ;;
13441 esac
13442 done
13443
13444 if test -n "$cf_new_cflags" ; then
13445
13446         CFLAGS="$CFLAGS $cf_new_cflags"
13447 fi
13448
13449 if test -n "$cf_new_cppflags" ; then
13450
13451         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13452 fi
13453
13454 if test -n "$cf_new_extra_cppflags" ; then
13455
13456         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13457 fi
13458
13459                 ;;
13460         esac
13461         ;;
13462 esac
13463
13464 if test "$with_dmalloc" = yes ; then
13465         echo "$as_me:13465: checking for dmalloc.h" >&5
13466 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13467 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13468   echo $ECHO_N "(cached) $ECHO_C" >&6
13469 else
13470   cat >conftest.$ac_ext <<_ACEOF
13471 #line 13471 "configure"
13472 #include "confdefs.h"
13473 #include <dmalloc.h>
13474 _ACEOF
13475 if { (eval echo "$as_me:13475: \"$ac_cpp conftest.$ac_ext\"") >&5
13476   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13477   ac_status=$?
13478   egrep -v '^ *\+' conftest.er1 >conftest.err
13479   rm -f conftest.er1
13480   cat conftest.err >&5
13481   echo "$as_me:13481: \$? = $ac_status" >&5
13482   (exit $ac_status); } >/dev/null; then
13483   if test -s conftest.err; then
13484     ac_cpp_err=$ac_c_preproc_warn_flag
13485   else
13486     ac_cpp_err=
13487   fi
13488 else
13489   ac_cpp_err=yes
13490 fi
13491 if test -z "$ac_cpp_err"; then
13492   ac_cv_header_dmalloc_h=yes
13493 else
13494   echo "$as_me: failed program was:" >&5
13495   cat conftest.$ac_ext >&5
13496   ac_cv_header_dmalloc_h=no
13497 fi
13498 rm -f conftest.err conftest.$ac_ext
13499 fi
13500 echo "$as_me:13500: result: $ac_cv_header_dmalloc_h" >&5
13501 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13502 if test $ac_cv_header_dmalloc_h = yes; then
13503
13504 echo "$as_me:13504: checking for dmalloc_debug in -ldmalloc" >&5
13505 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13506 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13507   echo $ECHO_N "(cached) $ECHO_C" >&6
13508 else
13509   ac_check_lib_save_LIBS=$LIBS
13510 LIBS="-ldmalloc  $LIBS"
13511 cat >conftest.$ac_ext <<_ACEOF
13512 #line 13512 "configure"
13513 #include "confdefs.h"
13514
13515 /* Override any gcc2 internal prototype to avoid an error.  */
13516 #ifdef __cplusplus
13517 extern "C"
13518 #endif
13519 /* We use char because int might match the return type of a gcc2
13520    builtin and then its argument prototype would still apply.  */
13521 char dmalloc_debug ();
13522 int
13523 main ()
13524 {
13525 dmalloc_debug ();
13526   ;
13527   return 0;
13528 }
13529 _ACEOF
13530 rm -f conftest.$ac_objext conftest$ac_exeext
13531 if { (eval echo "$as_me:13531: \"$ac_link\"") >&5
13532   (eval $ac_link) 2>&5
13533   ac_status=$?
13534   echo "$as_me:13534: \$? = $ac_status" >&5
13535   (exit $ac_status); } &&
13536          { ac_try='test -s conftest$ac_exeext'
13537   { (eval echo "$as_me:13537: \"$ac_try\"") >&5
13538   (eval $ac_try) 2>&5
13539   ac_status=$?
13540   echo "$as_me:13540: \$? = $ac_status" >&5
13541   (exit $ac_status); }; }; then
13542   ac_cv_lib_dmalloc_dmalloc_debug=yes
13543 else
13544   echo "$as_me: failed program was:" >&5
13545 cat conftest.$ac_ext >&5
13546 ac_cv_lib_dmalloc_dmalloc_debug=no
13547 fi
13548 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13549 LIBS=$ac_check_lib_save_LIBS
13550 fi
13551 echo "$as_me:13551: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13552 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13553 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13554   cat >>confdefs.h <<EOF
13555 #define HAVE_LIBDMALLOC 1
13556 EOF
13557
13558   LIBS="-ldmalloc $LIBS"
13559
13560 fi
13561
13562 fi
13563
13564 fi
13565
13566 echo "$as_me:13566: checking if you want to use dbmalloc for testing" >&5
13567 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13568
13569 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13570 if test "${with_dbmalloc+set}" = set; then
13571   withval="$with_dbmalloc"
13572
13573 cat >>confdefs.h <<EOF
13574 #define USE_DBMALLOC 1
13575 EOF
13576
13577         : ${with_cflags:=-g}
13578         : ${with_no_leaks:=yes}
13579          with_dbmalloc=yes
13580 else
13581   with_dbmalloc=
13582 fi;
13583 echo "$as_me:13583: result: ${with_dbmalloc:-no}" >&5
13584 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13585
13586 case .$with_cflags in #(vi
13587 .*-g*)
13588         case .$CFLAGS in #(vi
13589         .*-g*) #(vi
13590                 ;;
13591         *)
13592
13593 cf_fix_cppflags=no
13594 cf_new_cflags=
13595 cf_new_cppflags=
13596 cf_new_extra_cppflags=
13597
13598 for cf_add_cflags in -g
13599 do
13600 case $cf_fix_cppflags in
13601 no)
13602         case $cf_add_cflags in #(vi
13603         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13604                 case $cf_add_cflags in
13605                 -D*)
13606                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13607
13608                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13609                                 && test -z "${cf_tst_cflags}" \
13610                                 && cf_fix_cppflags=yes
13611
13612                         if test $cf_fix_cppflags = yes ; then
13613                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13614                                 continue
13615                         elif test "${cf_tst_cflags}" = "\"'" ; then
13616                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13617                                 continue
13618                         fi
13619                         ;;
13620                 esac
13621                 case "$CPPFLAGS" in
13622                 *$cf_add_cflags) #(vi
13623                         ;;
13624                 *) #(vi
13625                         case $cf_add_cflags in #(vi
13626                         -D*)
13627                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13628
13629 CPPFLAGS=`echo "$CPPFLAGS" | \
13630         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13631                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13632
13633                                 ;;
13634                         esac
13635                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13636                         ;;
13637                 esac
13638                 ;;
13639         *)
13640                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13641                 ;;
13642         esac
13643         ;;
13644 yes)
13645         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13646
13647         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13648
13649         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13650                 && test -z "${cf_tst_cflags}" \
13651                 && cf_fix_cppflags=no
13652         ;;
13653 esac
13654 done
13655
13656 if test -n "$cf_new_cflags" ; then
13657
13658         CFLAGS="$CFLAGS $cf_new_cflags"
13659 fi
13660
13661 if test -n "$cf_new_cppflags" ; then
13662
13663         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13664 fi
13665
13666 if test -n "$cf_new_extra_cppflags" ; then
13667
13668         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13669 fi
13670
13671                 ;;
13672         esac
13673         ;;
13674 esac
13675
13676 if test "$with_dbmalloc" = yes ; then
13677         echo "$as_me:13677: checking for dbmalloc.h" >&5
13678 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13679 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13680   echo $ECHO_N "(cached) $ECHO_C" >&6
13681 else
13682   cat >conftest.$ac_ext <<_ACEOF
13683 #line 13683 "configure"
13684 #include "confdefs.h"
13685 #include <dbmalloc.h>
13686 _ACEOF
13687 if { (eval echo "$as_me:13687: \"$ac_cpp conftest.$ac_ext\"") >&5
13688   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13689   ac_status=$?
13690   egrep -v '^ *\+' conftest.er1 >conftest.err
13691   rm -f conftest.er1
13692   cat conftest.err >&5
13693   echo "$as_me:13693: \$? = $ac_status" >&5
13694   (exit $ac_status); } >/dev/null; then
13695   if test -s conftest.err; then
13696     ac_cpp_err=$ac_c_preproc_warn_flag
13697   else
13698     ac_cpp_err=
13699   fi
13700 else
13701   ac_cpp_err=yes
13702 fi
13703 if test -z "$ac_cpp_err"; then
13704   ac_cv_header_dbmalloc_h=yes
13705 else
13706   echo "$as_me: failed program was:" >&5
13707   cat conftest.$ac_ext >&5
13708   ac_cv_header_dbmalloc_h=no
13709 fi
13710 rm -f conftest.err conftest.$ac_ext
13711 fi
13712 echo "$as_me:13712: result: $ac_cv_header_dbmalloc_h" >&5
13713 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13714 if test $ac_cv_header_dbmalloc_h = yes; then
13715
13716 echo "$as_me:13716: checking for debug_malloc in -ldbmalloc" >&5
13717 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13718 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13719   echo $ECHO_N "(cached) $ECHO_C" >&6
13720 else
13721   ac_check_lib_save_LIBS=$LIBS
13722 LIBS="-ldbmalloc  $LIBS"
13723 cat >conftest.$ac_ext <<_ACEOF
13724 #line 13724 "configure"
13725 #include "confdefs.h"
13726
13727 /* Override any gcc2 internal prototype to avoid an error.  */
13728 #ifdef __cplusplus
13729 extern "C"
13730 #endif
13731 /* We use char because int might match the return type of a gcc2
13732    builtin and then its argument prototype would still apply.  */
13733 char debug_malloc ();
13734 int
13735 main ()
13736 {
13737 debug_malloc ();
13738   ;
13739   return 0;
13740 }
13741 _ACEOF
13742 rm -f conftest.$ac_objext conftest$ac_exeext
13743 if { (eval echo "$as_me:13743: \"$ac_link\"") >&5
13744   (eval $ac_link) 2>&5
13745   ac_status=$?
13746   echo "$as_me:13746: \$? = $ac_status" >&5
13747   (exit $ac_status); } &&
13748          { ac_try='test -s 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   ac_cv_lib_dbmalloc_debug_malloc=yes
13755 else
13756   echo "$as_me: failed program was:" >&5
13757 cat conftest.$ac_ext >&5
13758 ac_cv_lib_dbmalloc_debug_malloc=no
13759 fi
13760 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13761 LIBS=$ac_check_lib_save_LIBS
13762 fi
13763 echo "$as_me:13763: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13764 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13765 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13766   cat >>confdefs.h <<EOF
13767 #define HAVE_LIBDBMALLOC 1
13768 EOF
13769
13770   LIBS="-ldbmalloc $LIBS"
13771
13772 fi
13773
13774 fi
13775
13776 fi
13777
13778 echo "$as_me:13778: checking if you want to use valgrind for testing" >&5
13779 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13780
13781 # Check whether --with-valgrind or --without-valgrind was given.
13782 if test "${with_valgrind+set}" = set; then
13783   withval="$with_valgrind"
13784
13785 cat >>confdefs.h <<EOF
13786 #define USE_VALGRIND 1
13787 EOF
13788
13789         : ${with_cflags:=-g}
13790         : ${with_no_leaks:=yes}
13791          with_valgrind=yes
13792 else
13793   with_valgrind=
13794 fi;
13795 echo "$as_me:13795: result: ${with_valgrind:-no}" >&5
13796 echo "${ECHO_T}${with_valgrind:-no}" >&6
13797
13798 case .$with_cflags in #(vi
13799 .*-g*)
13800         case .$CFLAGS in #(vi
13801         .*-g*) #(vi
13802                 ;;
13803         *)
13804
13805 cf_fix_cppflags=no
13806 cf_new_cflags=
13807 cf_new_cppflags=
13808 cf_new_extra_cppflags=
13809
13810 for cf_add_cflags in -g
13811 do
13812 case $cf_fix_cppflags in
13813 no)
13814         case $cf_add_cflags in #(vi
13815         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13816                 case $cf_add_cflags in
13817                 -D*)
13818                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13819
13820                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13821                                 && test -z "${cf_tst_cflags}" \
13822                                 && cf_fix_cppflags=yes
13823
13824                         if test $cf_fix_cppflags = yes ; then
13825                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13826                                 continue
13827                         elif test "${cf_tst_cflags}" = "\"'" ; then
13828                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13829                                 continue
13830                         fi
13831                         ;;
13832                 esac
13833                 case "$CPPFLAGS" in
13834                 *$cf_add_cflags) #(vi
13835                         ;;
13836                 *) #(vi
13837                         case $cf_add_cflags in #(vi
13838                         -D*)
13839                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13840
13841 CPPFLAGS=`echo "$CPPFLAGS" | \
13842         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13843                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13844
13845                                 ;;
13846                         esac
13847                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13848                         ;;
13849                 esac
13850                 ;;
13851         *)
13852                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13853                 ;;
13854         esac
13855         ;;
13856 yes)
13857         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13858
13859         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13860
13861         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13862                 && test -z "${cf_tst_cflags}" \
13863                 && cf_fix_cppflags=no
13864         ;;
13865 esac
13866 done
13867
13868 if test -n "$cf_new_cflags" ; then
13869
13870         CFLAGS="$CFLAGS $cf_new_cflags"
13871 fi
13872
13873 if test -n "$cf_new_cppflags" ; then
13874
13875         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13876 fi
13877
13878 if test -n "$cf_new_extra_cppflags" ; then
13879
13880         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13881 fi
13882
13883                 ;;
13884         esac
13885         ;;
13886 esac
13887
13888 echo "$as_me:13888: checking if you want to perform memory-leak testing" >&5
13889 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13890
13891 # Check whether --enable-leaks or --disable-leaks was given.
13892 if test "${enable_leaks+set}" = set; then
13893   enableval="$enable_leaks"
13894   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13895 else
13896   : ${with_no_leaks:=no}
13897 fi;
13898 echo "$as_me:13898: result: $with_no_leaks" >&5
13899 echo "${ECHO_T}$with_no_leaks" >&6
13900
13901 if test "$with_no_leaks" = yes ; then
13902
13903 cat >>confdefs.h <<\EOF
13904 #define NO_LEAKS 1
13905 EOF
13906
13907 cat >>confdefs.h <<\EOF
13908 #define YY_NO_LEAKS 1
13909 EOF
13910
13911 fi
13912
13913 cat >>confdefs.h <<\EOF
13914 #define HAVE_NC_ALLOC_H 1
13915 EOF
13916
13917 ###     use option --enable-expanded to generate certain macros as functions
13918
13919 # Check whether --enable-expanded or --disable-expanded was given.
13920 if test "${enable_expanded+set}" = set; then
13921   enableval="$enable_expanded"
13922   test "x$enableval" = xyes &&
13923 cat >>confdefs.h <<\EOF
13924 #define NCURSES_EXPANDED 1
13925 EOF
13926
13927 fi;
13928
13929 ###     use option --disable-macros to suppress macros in favor of functions
13930
13931 # Check whether --enable-macros or --disable-macros was given.
13932 if test "${enable_macros+set}" = set; then
13933   enableval="$enable_macros"
13934   test "$enableval" = no &&
13935 cat >>confdefs.h <<\EOF
13936 #define NCURSES_NOMACROS 1
13937 EOF
13938
13939 fi;
13940
13941 # Normally we only add trace() to the debug-library.  Allow this to be
13942 # extended to all models of the ncurses library:
13943 cf_all_traces=no
13944 case "$CFLAGS $CPPFLAGS" in
13945 *-DTRACE*)
13946         cf_all_traces=yes
13947         ;;
13948 esac
13949
13950 echo "$as_me:13950: checking whether to add trace feature to all models" >&5
13951 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13952
13953 # Check whether --with-trace or --without-trace was given.
13954 if test "${with_trace+set}" = set; then
13955   withval="$with_trace"
13956   cf_with_trace=$withval
13957 else
13958   cf_with_trace=$cf_all_traces
13959 fi;
13960 echo "$as_me:13960: result: $cf_with_trace" >&5
13961 echo "${ECHO_T}$cf_with_trace" >&6
13962
13963 if test "x$cf_with_trace" = xyes ; then
13964         LIB_TRACING=all
13965         ADA_TRACE=TRUE
13966
13967 cf_fix_cppflags=no
13968 cf_new_cflags=
13969 cf_new_cppflags=
13970 cf_new_extra_cppflags=
13971
13972 for cf_add_cflags in -DTRACE
13973 do
13974 case $cf_fix_cppflags in
13975 no)
13976         case $cf_add_cflags in #(vi
13977         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13978                 case $cf_add_cflags in
13979                 -D*)
13980                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13981
13982                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13983                                 && test -z "${cf_tst_cflags}" \
13984                                 && cf_fix_cppflags=yes
13985
13986                         if test $cf_fix_cppflags = yes ; then
13987                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13988                                 continue
13989                         elif test "${cf_tst_cflags}" = "\"'" ; then
13990                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13991                                 continue
13992                         fi
13993                         ;;
13994                 esac
13995                 case "$CPPFLAGS" in
13996                 *$cf_add_cflags) #(vi
13997                         ;;
13998                 *) #(vi
13999                         case $cf_add_cflags in #(vi
14000                         -D*)
14001                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14002
14003 CPPFLAGS=`echo "$CPPFLAGS" | \
14004         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14005                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14006
14007                                 ;;
14008                         esac
14009                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14010                         ;;
14011                 esac
14012                 ;;
14013         *)
14014                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14015                 ;;
14016         esac
14017         ;;
14018 yes)
14019         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14020
14021         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14022
14023         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14024                 && test -z "${cf_tst_cflags}" \
14025                 && cf_fix_cppflags=no
14026         ;;
14027 esac
14028 done
14029
14030 if test -n "$cf_new_cflags" ; then
14031
14032         CFLAGS="$CFLAGS $cf_new_cflags"
14033 fi
14034
14035 if test -n "$cf_new_cppflags" ; then
14036
14037         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14038 fi
14039
14040 if test -n "$cf_new_extra_cppflags" ; then
14041
14042         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14043 fi
14044
14045 else
14046         LIB_TRACING=DEBUG
14047         ADA_TRACE=FALSE
14048 fi
14049
14050 echo "$as_me:14050: checking if we want to use GNAT projects" >&5
14051 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14052
14053 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14054 if test "${enable_gnat_projects+set}" = set; then
14055   enableval="$enable_gnat_projects"
14056   test "$enableval" != no && enableval=yes
14057   if test "$enableval" != "yes" ; then
14058     enable_gnat_projects=no
14059   else
14060     enable_gnat_projects=yes
14061   fi
14062 else
14063   enableval=yes
14064   enable_gnat_projects=yes
14065
14066 fi;
14067 echo "$as_me:14067: result: $enable_gnat_projects" >&5
14068 echo "${ECHO_T}$enable_gnat_projects" >&6
14069
14070 ###     Checks for libraries.
14071 case $cf_cv_system_name in #(vi
14072 *mingw32*|*mingw64*) #(vi
14073         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14074         LIBS=" -lpsapi $LIBS"
14075         ;;
14076 *)
14077 echo "$as_me:14077: checking for gettimeofday" >&5
14078 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14079 if test "${ac_cv_func_gettimeofday+set}" = set; then
14080   echo $ECHO_N "(cached) $ECHO_C" >&6
14081 else
14082   cat >conftest.$ac_ext <<_ACEOF
14083 #line 14083 "configure"
14084 #include "confdefs.h"
14085 /* System header to define __stub macros and hopefully few prototypes,
14086     which can conflict with char gettimeofday (); below.  */
14087 #include <assert.h>
14088 /* Override any gcc2 internal prototype to avoid an error.  */
14089 #ifdef __cplusplus
14090 extern "C"
14091 #endif
14092 /* We use char because int might match the return type of a gcc2
14093    builtin and then its argument prototype would still apply.  */
14094 char gettimeofday ();
14095 char (*f) ();
14096
14097 int
14098 main ()
14099 {
14100 /* The GNU C library defines this for functions which it implements
14101     to always fail with ENOSYS.  Some functions are actually named
14102     something starting with __ and the normal name is an alias.  */
14103 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14104 choke me
14105 #else
14106 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14107 #endif
14108
14109   ;
14110   return 0;
14111 }
14112 _ACEOF
14113 rm -f conftest.$ac_objext conftest$ac_exeext
14114 if { (eval echo "$as_me:14114: \"$ac_link\"") >&5
14115   (eval $ac_link) 2>&5
14116   ac_status=$?
14117   echo "$as_me:14117: \$? = $ac_status" >&5
14118   (exit $ac_status); } &&
14119          { ac_try='test -s conftest$ac_exeext'
14120   { (eval echo "$as_me:14120: \"$ac_try\"") >&5
14121   (eval $ac_try) 2>&5
14122   ac_status=$?
14123   echo "$as_me:14123: \$? = $ac_status" >&5
14124   (exit $ac_status); }; }; then
14125   ac_cv_func_gettimeofday=yes
14126 else
14127   echo "$as_me: failed program was:" >&5
14128 cat conftest.$ac_ext >&5
14129 ac_cv_func_gettimeofday=no
14130 fi
14131 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14132 fi
14133 echo "$as_me:14133: result: $ac_cv_func_gettimeofday" >&5
14134 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14135 if test $ac_cv_func_gettimeofday = yes; then
14136
14137 cat >>confdefs.h <<\EOF
14138 #define HAVE_GETTIMEOFDAY 1
14139 EOF
14140
14141 else
14142
14143 echo "$as_me:14143: checking for gettimeofday in -lbsd" >&5
14144 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14145 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14146   echo $ECHO_N "(cached) $ECHO_C" >&6
14147 else
14148   ac_check_lib_save_LIBS=$LIBS
14149 LIBS="-lbsd  $LIBS"
14150 cat >conftest.$ac_ext <<_ACEOF
14151 #line 14151 "configure"
14152 #include "confdefs.h"
14153
14154 /* Override any gcc2 internal prototype to avoid an error.  */
14155 #ifdef __cplusplus
14156 extern "C"
14157 #endif
14158 /* We use char because int might match the return type of a gcc2
14159    builtin and then its argument prototype would still apply.  */
14160 char gettimeofday ();
14161 int
14162 main ()
14163 {
14164 gettimeofday ();
14165   ;
14166   return 0;
14167 }
14168 _ACEOF
14169 rm -f conftest.$ac_objext conftest$ac_exeext
14170 if { (eval echo "$as_me:14170: \"$ac_link\"") >&5
14171   (eval $ac_link) 2>&5
14172   ac_status=$?
14173   echo "$as_me:14173: \$? = $ac_status" >&5
14174   (exit $ac_status); } &&
14175          { ac_try='test -s conftest$ac_exeext'
14176   { (eval echo "$as_me:14176: \"$ac_try\"") >&5
14177   (eval $ac_try) 2>&5
14178   ac_status=$?
14179   echo "$as_me:14179: \$? = $ac_status" >&5
14180   (exit $ac_status); }; }; then
14181   ac_cv_lib_bsd_gettimeofday=yes
14182 else
14183   echo "$as_me: failed program was:" >&5
14184 cat conftest.$ac_ext >&5
14185 ac_cv_lib_bsd_gettimeofday=no
14186 fi
14187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14188 LIBS=$ac_check_lib_save_LIBS
14189 fi
14190 echo "$as_me:14190: result: $ac_cv_lib_bsd_gettimeofday" >&5
14191 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14192 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14193
14194 cat >>confdefs.h <<\EOF
14195 #define HAVE_GETTIMEOFDAY 1
14196 EOF
14197
14198 cf_add_libs="-lbsd"
14199 # Filter out duplicates - this happens with badly-designed ".pc" files...
14200 for cf_add_1lib in $LIBS
14201 do
14202         for cf_add_2lib in $cf_add_libs
14203         do
14204                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14205                 then
14206                         cf_add_1lib=
14207                         break
14208                 fi
14209         done
14210         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14211 done
14212 LIBS="$cf_add_libs"
14213
14214 fi
14215
14216 fi
14217         ;;
14218 esac
14219
14220 echo "$as_me:14220: checking if -lm needed for math functions" >&5
14221 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14222 if test "${cf_cv_need_libm+set}" = set; then
14223   echo $ECHO_N "(cached) $ECHO_C" >&6
14224 else
14225
14226         cat >conftest.$ac_ext <<_ACEOF
14227 #line 14227 "configure"
14228 #include "confdefs.h"
14229
14230         #include <stdio.h>
14231         #include <math.h>
14232
14233 int
14234 main ()
14235 {
14236 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14237   ;
14238   return 0;
14239 }
14240 _ACEOF
14241 rm -f conftest.$ac_objext conftest$ac_exeext
14242 if { (eval echo "$as_me:14242: \"$ac_link\"") >&5
14243   (eval $ac_link) 2>&5
14244   ac_status=$?
14245   echo "$as_me:14245: \$? = $ac_status" >&5
14246   (exit $ac_status); } &&
14247          { ac_try='test -s conftest$ac_exeext'
14248   { (eval echo "$as_me:14248: \"$ac_try\"") >&5
14249   (eval $ac_try) 2>&5
14250   ac_status=$?
14251   echo "$as_me:14251: \$? = $ac_status" >&5
14252   (exit $ac_status); }; }; then
14253   cf_cv_need_libm=no
14254 else
14255   echo "$as_me: failed program was:" >&5
14256 cat conftest.$ac_ext >&5
14257 cf_cv_need_libm=yes
14258 fi
14259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14260 fi
14261 echo "$as_me:14261: result: $cf_cv_need_libm" >&5
14262 echo "${ECHO_T}$cf_cv_need_libm" >&6
14263 if test "$cf_cv_need_libm" = yes
14264 then
14265 MATH_LIB=-lm
14266 fi
14267
14268 ###     Checks for header files.
14269 echo "$as_me:14269: checking for ANSI C header files" >&5
14270 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14271 if test "${ac_cv_header_stdc+set}" = set; then
14272   echo $ECHO_N "(cached) $ECHO_C" >&6
14273 else
14274   cat >conftest.$ac_ext <<_ACEOF
14275 #line 14275 "configure"
14276 #include "confdefs.h"
14277 #include <stdlib.h>
14278 #include <stdarg.h>
14279 #include <string.h>
14280 #include <float.h>
14281
14282 _ACEOF
14283 if { (eval echo "$as_me:14283: \"$ac_cpp conftest.$ac_ext\"") >&5
14284   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14285   ac_status=$?
14286   egrep -v '^ *\+' conftest.er1 >conftest.err
14287   rm -f conftest.er1
14288   cat conftest.err >&5
14289   echo "$as_me:14289: \$? = $ac_status" >&5
14290   (exit $ac_status); } >/dev/null; then
14291   if test -s conftest.err; then
14292     ac_cpp_err=$ac_c_preproc_warn_flag
14293   else
14294     ac_cpp_err=
14295   fi
14296 else
14297   ac_cpp_err=yes
14298 fi
14299 if test -z "$ac_cpp_err"; then
14300   ac_cv_header_stdc=yes
14301 else
14302   echo "$as_me: failed program was:" >&5
14303   cat conftest.$ac_ext >&5
14304   ac_cv_header_stdc=no
14305 fi
14306 rm -f conftest.err conftest.$ac_ext
14307
14308 if test $ac_cv_header_stdc = yes; then
14309   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14310   cat >conftest.$ac_ext <<_ACEOF
14311 #line 14311 "configure"
14312 #include "confdefs.h"
14313 #include <string.h>
14314
14315 _ACEOF
14316 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14317   egrep "memchr" >/dev/null 2>&1; then
14318   :
14319 else
14320   ac_cv_header_stdc=no
14321 fi
14322 rm -rf conftest*
14323
14324 fi
14325
14326 if test $ac_cv_header_stdc = yes; then
14327   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14328   cat >conftest.$ac_ext <<_ACEOF
14329 #line 14329 "configure"
14330 #include "confdefs.h"
14331 #include <stdlib.h>
14332
14333 _ACEOF
14334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14335   egrep "free" >/dev/null 2>&1; then
14336   :
14337 else
14338   ac_cv_header_stdc=no
14339 fi
14340 rm -rf conftest*
14341
14342 fi
14343
14344 if test $ac_cv_header_stdc = yes; then
14345   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14346   if test "$cross_compiling" = yes; then
14347   :
14348 else
14349   cat >conftest.$ac_ext <<_ACEOF
14350 #line 14350 "configure"
14351 #include "confdefs.h"
14352 #include <ctype.h>
14353 #if ((' ' & 0x0FF) == 0x020)
14354 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14355 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14356 #else
14357 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14358                      || ('j' <= (c) && (c) <= 'r') \
14359                      || ('s' <= (c) && (c) <= 'z'))
14360 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14361 #endif
14362
14363 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14364 int
14365 main ()
14366 {
14367   int i;
14368   for (i = 0; i < 256; i++)
14369     if (XOR (islower (i), ISLOWER (i))
14370         || toupper (i) != TOUPPER (i))
14371       $ac_main_return(2);
14372   $ac_main_return (0);
14373 }
14374 _ACEOF
14375 rm -f conftest$ac_exeext
14376 if { (eval echo "$as_me:14376: \"$ac_link\"") >&5
14377   (eval $ac_link) 2>&5
14378   ac_status=$?
14379   echo "$as_me:14379: \$? = $ac_status" >&5
14380   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14381   { (eval echo "$as_me:14381: \"$ac_try\"") >&5
14382   (eval $ac_try) 2>&5
14383   ac_status=$?
14384   echo "$as_me:14384: \$? = $ac_status" >&5
14385   (exit $ac_status); }; }; then
14386   :
14387 else
14388   echo "$as_me: program exited with status $ac_status" >&5
14389 echo "$as_me: failed program was:" >&5
14390 cat conftest.$ac_ext >&5
14391 ac_cv_header_stdc=no
14392 fi
14393 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14394 fi
14395 fi
14396 fi
14397 echo "$as_me:14397: result: $ac_cv_header_stdc" >&5
14398 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14399 if test $ac_cv_header_stdc = yes; then
14400
14401 cat >>confdefs.h <<\EOF
14402 #define STDC_HEADERS 1
14403 EOF
14404
14405 fi
14406
14407 ac_header_dirent=no
14408 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14409   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14410 echo "$as_me:14410: checking for $ac_hdr that defines DIR" >&5
14411 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14412 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14413   echo $ECHO_N "(cached) $ECHO_C" >&6
14414 else
14415   cat >conftest.$ac_ext <<_ACEOF
14416 #line 14416 "configure"
14417 #include "confdefs.h"
14418 #include <sys/types.h>
14419 #include <$ac_hdr>
14420
14421 int
14422 main ()
14423 {
14424 if ((DIR *) 0)
14425 return 0;
14426   ;
14427   return 0;
14428 }
14429 _ACEOF
14430 rm -f conftest.$ac_objext
14431 if { (eval echo "$as_me:14431: \"$ac_compile\"") >&5
14432   (eval $ac_compile) 2>&5
14433   ac_status=$?
14434   echo "$as_me:14434: \$? = $ac_status" >&5
14435   (exit $ac_status); } &&
14436          { ac_try='test -s conftest.$ac_objext'
14437   { (eval echo "$as_me:14437: \"$ac_try\"") >&5
14438   (eval $ac_try) 2>&5
14439   ac_status=$?
14440   echo "$as_me:14440: \$? = $ac_status" >&5
14441   (exit $ac_status); }; }; then
14442   eval "$as_ac_Header=yes"
14443 else
14444   echo "$as_me: failed program was:" >&5
14445 cat conftest.$ac_ext >&5
14446 eval "$as_ac_Header=no"
14447 fi
14448 rm -f conftest.$ac_objext conftest.$ac_ext
14449 fi
14450 echo "$as_me:14450: result: `eval echo '${'$as_ac_Header'}'`" >&5
14451 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14452 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14453   cat >>confdefs.h <<EOF
14454 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14455 EOF
14456
14457 ac_header_dirent=$ac_hdr; break
14458 fi
14459
14460 done
14461 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14462 if test $ac_header_dirent = dirent.h; then
14463   echo "$as_me:14463: checking for opendir in -ldir" >&5
14464 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14465 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14466   echo $ECHO_N "(cached) $ECHO_C" >&6
14467 else
14468   ac_check_lib_save_LIBS=$LIBS
14469 LIBS="-ldir  $LIBS"
14470 cat >conftest.$ac_ext <<_ACEOF
14471 #line 14471 "configure"
14472 #include "confdefs.h"
14473
14474 /* Override any gcc2 internal prototype to avoid an error.  */
14475 #ifdef __cplusplus
14476 extern "C"
14477 #endif
14478 /* We use char because int might match the return type of a gcc2
14479    builtin and then its argument prototype would still apply.  */
14480 char opendir ();
14481 int
14482 main ()
14483 {
14484 opendir ();
14485   ;
14486   return 0;
14487 }
14488 _ACEOF
14489 rm -f conftest.$ac_objext conftest$ac_exeext
14490 if { (eval echo "$as_me:14490: \"$ac_link\"") >&5
14491   (eval $ac_link) 2>&5
14492   ac_status=$?
14493   echo "$as_me:14493: \$? = $ac_status" >&5
14494   (exit $ac_status); } &&
14495          { ac_try='test -s conftest$ac_exeext'
14496   { (eval echo "$as_me:14496: \"$ac_try\"") >&5
14497   (eval $ac_try) 2>&5
14498   ac_status=$?
14499   echo "$as_me:14499: \$? = $ac_status" >&5
14500   (exit $ac_status); }; }; then
14501   ac_cv_lib_dir_opendir=yes
14502 else
14503   echo "$as_me: failed program was:" >&5
14504 cat conftest.$ac_ext >&5
14505 ac_cv_lib_dir_opendir=no
14506 fi
14507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14508 LIBS=$ac_check_lib_save_LIBS
14509 fi
14510 echo "$as_me:14510: result: $ac_cv_lib_dir_opendir" >&5
14511 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14512 if test $ac_cv_lib_dir_opendir = yes; then
14513   LIBS="$LIBS -ldir"
14514 fi
14515
14516 else
14517   echo "$as_me:14517: checking for opendir in -lx" >&5
14518 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14519 if test "${ac_cv_lib_x_opendir+set}" = set; then
14520   echo $ECHO_N "(cached) $ECHO_C" >&6
14521 else
14522   ac_check_lib_save_LIBS=$LIBS
14523 LIBS="-lx  $LIBS"
14524 cat >conftest.$ac_ext <<_ACEOF
14525 #line 14525 "configure"
14526 #include "confdefs.h"
14527
14528 /* Override any gcc2 internal prototype to avoid an error.  */
14529 #ifdef __cplusplus
14530 extern "C"
14531 #endif
14532 /* We use char because int might match the return type of a gcc2
14533    builtin and then its argument prototype would still apply.  */
14534 char opendir ();
14535 int
14536 main ()
14537 {
14538 opendir ();
14539   ;
14540   return 0;
14541 }
14542 _ACEOF
14543 rm -f conftest.$ac_objext conftest$ac_exeext
14544 if { (eval echo "$as_me:14544: \"$ac_link\"") >&5
14545   (eval $ac_link) 2>&5
14546   ac_status=$?
14547   echo "$as_me:14547: \$? = $ac_status" >&5
14548   (exit $ac_status); } &&
14549          { ac_try='test -s conftest$ac_exeext'
14550   { (eval echo "$as_me:14550: \"$ac_try\"") >&5
14551   (eval $ac_try) 2>&5
14552   ac_status=$?
14553   echo "$as_me:14553: \$? = $ac_status" >&5
14554   (exit $ac_status); }; }; then
14555   ac_cv_lib_x_opendir=yes
14556 else
14557   echo "$as_me: failed program was:" >&5
14558 cat conftest.$ac_ext >&5
14559 ac_cv_lib_x_opendir=no
14560 fi
14561 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14562 LIBS=$ac_check_lib_save_LIBS
14563 fi
14564 echo "$as_me:14564: result: $ac_cv_lib_x_opendir" >&5
14565 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14566 if test $ac_cv_lib_x_opendir = yes; then
14567   LIBS="$LIBS -lx"
14568 fi
14569
14570 fi
14571
14572 echo "$as_me:14572: checking whether time.h and sys/time.h may both be included" >&5
14573 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14574 if test "${ac_cv_header_time+set}" = set; then
14575   echo $ECHO_N "(cached) $ECHO_C" >&6
14576 else
14577   cat >conftest.$ac_ext <<_ACEOF
14578 #line 14578 "configure"
14579 #include "confdefs.h"
14580 #include <sys/types.h>
14581 #include <sys/time.h>
14582 #include <time.h>
14583
14584 int
14585 main ()
14586 {
14587 if ((struct tm *) 0)
14588 return 0;
14589   ;
14590   return 0;
14591 }
14592 _ACEOF
14593 rm -f conftest.$ac_objext
14594 if { (eval echo "$as_me:14594: \"$ac_compile\"") >&5
14595   (eval $ac_compile) 2>&5
14596   ac_status=$?
14597   echo "$as_me:14597: \$? = $ac_status" >&5
14598   (exit $ac_status); } &&
14599          { ac_try='test -s conftest.$ac_objext'
14600   { (eval echo "$as_me:14600: \"$ac_try\"") >&5
14601   (eval $ac_try) 2>&5
14602   ac_status=$?
14603   echo "$as_me:14603: \$? = $ac_status" >&5
14604   (exit $ac_status); }; }; then
14605   ac_cv_header_time=yes
14606 else
14607   echo "$as_me: failed program was:" >&5
14608 cat conftest.$ac_ext >&5
14609 ac_cv_header_time=no
14610 fi
14611 rm -f conftest.$ac_objext conftest.$ac_ext
14612 fi
14613 echo "$as_me:14613: result: $ac_cv_header_time" >&5
14614 echo "${ECHO_T}$ac_cv_header_time" >&6
14615 if test $ac_cv_header_time = yes; then
14616
14617 cat >>confdefs.h <<\EOF
14618 #define TIME_WITH_SYS_TIME 1
14619 EOF
14620
14621 fi
14622
14623 cf_regex_func=no
14624
14625 cf_regex_libs="regex re"
14626 case $host_os in #(vi
14627 mingw*)
14628         cf_regex_libs="gnurx $cf_regex_libs"
14629         ;;
14630 esac
14631
14632 echo "$as_me:14632: checking for regcomp" >&5
14633 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14634 if test "${ac_cv_func_regcomp+set}" = set; then
14635   echo $ECHO_N "(cached) $ECHO_C" >&6
14636 else
14637   cat >conftest.$ac_ext <<_ACEOF
14638 #line 14638 "configure"
14639 #include "confdefs.h"
14640 /* System header to define __stub macros and hopefully few prototypes,
14641     which can conflict with char regcomp (); below.  */
14642 #include <assert.h>
14643 /* Override any gcc2 internal prototype to avoid an error.  */
14644 #ifdef __cplusplus
14645 extern "C"
14646 #endif
14647 /* We use char because int might match the return type of a gcc2
14648    builtin and then its argument prototype would still apply.  */
14649 char regcomp ();
14650 char (*f) ();
14651
14652 int
14653 main ()
14654 {
14655 /* The GNU C library defines this for functions which it implements
14656     to always fail with ENOSYS.  Some functions are actually named
14657     something starting with __ and the normal name is an alias.  */
14658 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14659 choke me
14660 #else
14661 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14662 #endif
14663
14664   ;
14665   return 0;
14666 }
14667 _ACEOF
14668 rm -f conftest.$ac_objext conftest$ac_exeext
14669 if { (eval echo "$as_me:14669: \"$ac_link\"") >&5
14670   (eval $ac_link) 2>&5
14671   ac_status=$?
14672   echo "$as_me:14672: \$? = $ac_status" >&5
14673   (exit $ac_status); } &&
14674          { ac_try='test -s conftest$ac_exeext'
14675   { (eval echo "$as_me:14675: \"$ac_try\"") >&5
14676   (eval $ac_try) 2>&5
14677   ac_status=$?
14678   echo "$as_me:14678: \$? = $ac_status" >&5
14679   (exit $ac_status); }; }; then
14680   ac_cv_func_regcomp=yes
14681 else
14682   echo "$as_me: failed program was:" >&5
14683 cat conftest.$ac_ext >&5
14684 ac_cv_func_regcomp=no
14685 fi
14686 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14687 fi
14688 echo "$as_me:14688: result: $ac_cv_func_regcomp" >&5
14689 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14690 if test $ac_cv_func_regcomp = yes; then
14691   cf_regex_func=regcomp
14692 else
14693
14694         for cf_regex_lib in $cf_regex_libs
14695         do
14696                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14697 echo "$as_me:14697: checking for regcomp in -l$cf_regex_lib" >&5
14698 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14699 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14700   echo $ECHO_N "(cached) $ECHO_C" >&6
14701 else
14702   ac_check_lib_save_LIBS=$LIBS
14703 LIBS="-l$cf_regex_lib  $LIBS"
14704 cat >conftest.$ac_ext <<_ACEOF
14705 #line 14705 "configure"
14706 #include "confdefs.h"
14707
14708 /* Override any gcc2 internal prototype to avoid an error.  */
14709 #ifdef __cplusplus
14710 extern "C"
14711 #endif
14712 /* We use char because int might match the return type of a gcc2
14713    builtin and then its argument prototype would still apply.  */
14714 char regcomp ();
14715 int
14716 main ()
14717 {
14718 regcomp ();
14719   ;
14720   return 0;
14721 }
14722 _ACEOF
14723 rm -f conftest.$ac_objext conftest$ac_exeext
14724 if { (eval echo "$as_me:14724: \"$ac_link\"") >&5
14725   (eval $ac_link) 2>&5
14726   ac_status=$?
14727   echo "$as_me:14727: \$? = $ac_status" >&5
14728   (exit $ac_status); } &&
14729          { ac_try='test -s conftest$ac_exeext'
14730   { (eval echo "$as_me:14730: \"$ac_try\"") >&5
14731   (eval $ac_try) 2>&5
14732   ac_status=$?
14733   echo "$as_me:14733: \$? = $ac_status" >&5
14734   (exit $ac_status); }; }; then
14735   eval "$as_ac_Lib=yes"
14736 else
14737   echo "$as_me: failed program was:" >&5
14738 cat conftest.$ac_ext >&5
14739 eval "$as_ac_Lib=no"
14740 fi
14741 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14742 LIBS=$ac_check_lib_save_LIBS
14743 fi
14744 echo "$as_me:14744: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14745 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14746 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14747
14748 cf_add_libs="-l$cf_regex_lib"
14749 # Filter out duplicates - this happens with badly-designed ".pc" files...
14750 for cf_add_1lib in $LIBS
14751 do
14752         for cf_add_2lib in $cf_add_libs
14753         do
14754                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14755                 then
14756                         cf_add_1lib=
14757                         break
14758                 fi
14759         done
14760         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14761 done
14762 LIBS="$cf_add_libs"
14763
14764                                 cf_regex_func=regcomp
14765                                 break
14766 fi
14767
14768         done
14769
14770 fi
14771
14772 if test "$cf_regex_func" = no ; then
14773         echo "$as_me:14773: checking for compile" >&5
14774 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14775 if test "${ac_cv_func_compile+set}" = set; then
14776   echo $ECHO_N "(cached) $ECHO_C" >&6
14777 else
14778   cat >conftest.$ac_ext <<_ACEOF
14779 #line 14779 "configure"
14780 #include "confdefs.h"
14781 /* System header to define __stub macros and hopefully few prototypes,
14782     which can conflict with char compile (); below.  */
14783 #include <assert.h>
14784 /* Override any gcc2 internal prototype to avoid an error.  */
14785 #ifdef __cplusplus
14786 extern "C"
14787 #endif
14788 /* We use char because int might match the return type of a gcc2
14789    builtin and then its argument prototype would still apply.  */
14790 char compile ();
14791 char (*f) ();
14792
14793 int
14794 main ()
14795 {
14796 /* The GNU C library defines this for functions which it implements
14797     to always fail with ENOSYS.  Some functions are actually named
14798     something starting with __ and the normal name is an alias.  */
14799 #if defined (__stub_compile) || defined (__stub___compile)
14800 choke me
14801 #else
14802 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14803 #endif
14804
14805   ;
14806   return 0;
14807 }
14808 _ACEOF
14809 rm -f conftest.$ac_objext conftest$ac_exeext
14810 if { (eval echo "$as_me:14810: \"$ac_link\"") >&5
14811   (eval $ac_link) 2>&5
14812   ac_status=$?
14813   echo "$as_me:14813: \$? = $ac_status" >&5
14814   (exit $ac_status); } &&
14815          { ac_try='test -s conftest$ac_exeext'
14816   { (eval echo "$as_me:14816: \"$ac_try\"") >&5
14817   (eval $ac_try) 2>&5
14818   ac_status=$?
14819   echo "$as_me:14819: \$? = $ac_status" >&5
14820   (exit $ac_status); }; }; then
14821   ac_cv_func_compile=yes
14822 else
14823   echo "$as_me: failed program was:" >&5
14824 cat conftest.$ac_ext >&5
14825 ac_cv_func_compile=no
14826 fi
14827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14828 fi
14829 echo "$as_me:14829: result: $ac_cv_func_compile" >&5
14830 echo "${ECHO_T}$ac_cv_func_compile" >&6
14831 if test $ac_cv_func_compile = yes; then
14832   cf_regex_func=compile
14833 else
14834
14835                 echo "$as_me:14835: checking for compile in -lgen" >&5
14836 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14837 if test "${ac_cv_lib_gen_compile+set}" = set; then
14838   echo $ECHO_N "(cached) $ECHO_C" >&6
14839 else
14840   ac_check_lib_save_LIBS=$LIBS
14841 LIBS="-lgen  $LIBS"
14842 cat >conftest.$ac_ext <<_ACEOF
14843 #line 14843 "configure"
14844 #include "confdefs.h"
14845
14846 /* Override any gcc2 internal prototype to avoid an error.  */
14847 #ifdef __cplusplus
14848 extern "C"
14849 #endif
14850 /* We use char because int might match the return type of a gcc2
14851    builtin and then its argument prototype would still apply.  */
14852 char compile ();
14853 int
14854 main ()
14855 {
14856 compile ();
14857   ;
14858   return 0;
14859 }
14860 _ACEOF
14861 rm -f conftest.$ac_objext conftest$ac_exeext
14862 if { (eval echo "$as_me:14862: \"$ac_link\"") >&5
14863   (eval $ac_link) 2>&5
14864   ac_status=$?
14865   echo "$as_me:14865: \$? = $ac_status" >&5
14866   (exit $ac_status); } &&
14867          { ac_try='test -s conftest$ac_exeext'
14868   { (eval echo "$as_me:14868: \"$ac_try\"") >&5
14869   (eval $ac_try) 2>&5
14870   ac_status=$?
14871   echo "$as_me:14871: \$? = $ac_status" >&5
14872   (exit $ac_status); }; }; then
14873   ac_cv_lib_gen_compile=yes
14874 else
14875   echo "$as_me: failed program was:" >&5
14876 cat conftest.$ac_ext >&5
14877 ac_cv_lib_gen_compile=no
14878 fi
14879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14880 LIBS=$ac_check_lib_save_LIBS
14881 fi
14882 echo "$as_me:14882: result: $ac_cv_lib_gen_compile" >&5
14883 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14884 if test $ac_cv_lib_gen_compile = yes; then
14885
14886 cf_add_libs="-lgen"
14887 # Filter out duplicates - this happens with badly-designed ".pc" files...
14888 for cf_add_1lib in $LIBS
14889 do
14890         for cf_add_2lib in $cf_add_libs
14891         do
14892                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14893                 then
14894                         cf_add_1lib=
14895                         break
14896                 fi
14897         done
14898         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14899 done
14900 LIBS="$cf_add_libs"
14901
14902                                 cf_regex_func=compile
14903 fi
14904
14905 fi
14906
14907 fi
14908
14909 if test "$cf_regex_func" = no ; then
14910         { echo "$as_me:14910: WARNING: cannot find regular expression library" >&5
14911 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14912 fi
14913
14914 echo "$as_me:14914: checking for regular-expression headers" >&5
14915 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14916 if test "${cf_cv_regex_hdrs+set}" = set; then
14917   echo $ECHO_N "(cached) $ECHO_C" >&6
14918 else
14919
14920 cf_cv_regex_hdrs=no
14921 case $cf_regex_func in #(vi
14922 compile) #(vi
14923         for cf_regex_hdr in regexp.h regexpr.h
14924         do
14925                 cat >conftest.$ac_ext <<_ACEOF
14926 #line 14926 "configure"
14927 #include "confdefs.h"
14928 #include <$cf_regex_hdr>
14929 int
14930 main ()
14931 {
14932
14933                         char *p = compile("", "", "", 0);
14934                         int x = step("", "");
14935
14936   ;
14937   return 0;
14938 }
14939 _ACEOF
14940 rm -f conftest.$ac_objext conftest$ac_exeext
14941 if { (eval echo "$as_me:14941: \"$ac_link\"") >&5
14942   (eval $ac_link) 2>&5
14943   ac_status=$?
14944   echo "$as_me:14944: \$? = $ac_status" >&5
14945   (exit $ac_status); } &&
14946          { ac_try='test -s conftest$ac_exeext'
14947   { (eval echo "$as_me:14947: \"$ac_try\"") >&5
14948   (eval $ac_try) 2>&5
14949   ac_status=$?
14950   echo "$as_me:14950: \$? = $ac_status" >&5
14951   (exit $ac_status); }; }; then
14952
14953                         cf_cv_regex_hdrs=$cf_regex_hdr
14954                         break
14955
14956 else
14957   echo "$as_me: failed program was:" >&5
14958 cat conftest.$ac_ext >&5
14959 fi
14960 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14961         done
14962         ;;
14963 *)
14964         for cf_regex_hdr in regex.h
14965         do
14966                 cat >conftest.$ac_ext <<_ACEOF
14967 #line 14967 "configure"
14968 #include "confdefs.h"
14969 #include <sys/types.h>
14970 #include <$cf_regex_hdr>
14971 int
14972 main ()
14973 {
14974
14975                         regex_t *p;
14976                         int x = regcomp(p, "", 0);
14977                         int y = regexec(p, "", 0, 0, 0);
14978                         regfree(p);
14979
14980   ;
14981   return 0;
14982 }
14983 _ACEOF
14984 rm -f conftest.$ac_objext conftest$ac_exeext
14985 if { (eval echo "$as_me:14985: \"$ac_link\"") >&5
14986   (eval $ac_link) 2>&5
14987   ac_status=$?
14988   echo "$as_me:14988: \$? = $ac_status" >&5
14989   (exit $ac_status); } &&
14990          { ac_try='test -s conftest$ac_exeext'
14991   { (eval echo "$as_me:14991: \"$ac_try\"") >&5
14992   (eval $ac_try) 2>&5
14993   ac_status=$?
14994   echo "$as_me:14994: \$? = $ac_status" >&5
14995   (exit $ac_status); }; }; then
14996
14997                         cf_cv_regex_hdrs=$cf_regex_hdr
14998                         break
14999
15000 else
15001   echo "$as_me: failed program was:" >&5
15002 cat conftest.$ac_ext >&5
15003 fi
15004 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15005         done
15006         ;;
15007 esac
15008
15009 fi
15010 echo "$as_me:15010: result: $cf_cv_regex_hdrs" >&5
15011 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15012
15013 case $cf_cv_regex_hdrs in #(vi
15014     no)        { echo "$as_me:15014: WARNING: no regular expression header found" >&5
15015 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
15016     regex.h)
15017 cat >>confdefs.h <<\EOF
15018 #define HAVE_REGEX_H_FUNCS 1
15019 EOF
15020  ;; #(vi
15021     regexp.h)
15022 cat >>confdefs.h <<\EOF
15023 #define HAVE_REGEXP_H_FUNCS 1
15024 EOF
15025  ;; #(vi
15026     regexpr.h)
15027 cat >>confdefs.h <<\EOF
15028 #define HAVE_REGEXPR_H_FUNCS 1
15029 EOF
15030  ;;
15031 esac
15032
15033 for ac_header in \
15034 fcntl.h \
15035 getopt.h \
15036 limits.h \
15037 locale.h \
15038 math.h \
15039 poll.h \
15040 sys/bsdtypes.h \
15041 sys/ioctl.h \
15042 sys/param.h \
15043 sys/poll.h \
15044 sys/select.h \
15045 sys/time.h \
15046 sys/times.h \
15047 ttyent.h \
15048 unistd.h \
15049 wctype.h \
15050
15051 do
15052 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15053 echo "$as_me:15053: checking for $ac_header" >&5
15054 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15055 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15056   echo $ECHO_N "(cached) $ECHO_C" >&6
15057 else
15058   cat >conftest.$ac_ext <<_ACEOF
15059 #line 15059 "configure"
15060 #include "confdefs.h"
15061 #include <$ac_header>
15062 _ACEOF
15063 if { (eval echo "$as_me:15063: \"$ac_cpp conftest.$ac_ext\"") >&5
15064   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15065   ac_status=$?
15066   egrep -v '^ *\+' conftest.er1 >conftest.err
15067   rm -f conftest.er1
15068   cat conftest.err >&5
15069   echo "$as_me:15069: \$? = $ac_status" >&5
15070   (exit $ac_status); } >/dev/null; then
15071   if test -s conftest.err; then
15072     ac_cpp_err=$ac_c_preproc_warn_flag
15073   else
15074     ac_cpp_err=
15075   fi
15076 else
15077   ac_cpp_err=yes
15078 fi
15079 if test -z "$ac_cpp_err"; then
15080   eval "$as_ac_Header=yes"
15081 else
15082   echo "$as_me: failed program was:" >&5
15083   cat conftest.$ac_ext >&5
15084   eval "$as_ac_Header=no"
15085 fi
15086 rm -f conftest.err conftest.$ac_ext
15087 fi
15088 echo "$as_me:15088: result: `eval echo '${'$as_ac_Header'}'`" >&5
15089 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15090 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15091   cat >>confdefs.h <<EOF
15092 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15093 EOF
15094
15095 fi
15096 done
15097
15098 for ac_header in unistd.h getopt.h
15099 do
15100 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15101 echo "$as_me:15101: checking for $ac_header" >&5
15102 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15103 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15104   echo $ECHO_N "(cached) $ECHO_C" >&6
15105 else
15106   cat >conftest.$ac_ext <<_ACEOF
15107 #line 15107 "configure"
15108 #include "confdefs.h"
15109 #include <$ac_header>
15110 _ACEOF
15111 if { (eval echo "$as_me:15111: \"$ac_cpp conftest.$ac_ext\"") >&5
15112   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15113   ac_status=$?
15114   egrep -v '^ *\+' conftest.er1 >conftest.err
15115   rm -f conftest.er1
15116   cat conftest.err >&5
15117   echo "$as_me:15117: \$? = $ac_status" >&5
15118   (exit $ac_status); } >/dev/null; then
15119   if test -s conftest.err; then
15120     ac_cpp_err=$ac_c_preproc_warn_flag
15121   else
15122     ac_cpp_err=
15123   fi
15124 else
15125   ac_cpp_err=yes
15126 fi
15127 if test -z "$ac_cpp_err"; then
15128   eval "$as_ac_Header=yes"
15129 else
15130   echo "$as_me: failed program was:" >&5
15131   cat conftest.$ac_ext >&5
15132   eval "$as_ac_Header=no"
15133 fi
15134 rm -f conftest.err conftest.$ac_ext
15135 fi
15136 echo "$as_me:15136: result: `eval echo '${'$as_ac_Header'}'`" >&5
15137 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15138 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15139   cat >>confdefs.h <<EOF
15140 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15141 EOF
15142
15143 fi
15144 done
15145
15146 echo "$as_me:15146: checking for header declaring getopt variables" >&5
15147 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15148 if test "${cf_cv_getopt_header+set}" = set; then
15149   echo $ECHO_N "(cached) $ECHO_C" >&6
15150 else
15151
15152 cf_cv_getopt_header=none
15153 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15154 do
15155 cat >conftest.$ac_ext <<_ACEOF
15156 #line 15156 "configure"
15157 #include "confdefs.h"
15158
15159 #include <$cf_header>
15160 int
15161 main ()
15162 {
15163 int x = optind; char *y = optarg
15164   ;
15165   return 0;
15166 }
15167 _ACEOF
15168 rm -f conftest.$ac_objext
15169 if { (eval echo "$as_me:15169: \"$ac_compile\"") >&5
15170   (eval $ac_compile) 2>&5
15171   ac_status=$?
15172   echo "$as_me:15172: \$? = $ac_status" >&5
15173   (exit $ac_status); } &&
15174          { ac_try='test -s conftest.$ac_objext'
15175   { (eval echo "$as_me:15175: \"$ac_try\"") >&5
15176   (eval $ac_try) 2>&5
15177   ac_status=$?
15178   echo "$as_me:15178: \$? = $ac_status" >&5
15179   (exit $ac_status); }; }; then
15180   cf_cv_getopt_header=$cf_header
15181  break
15182 else
15183   echo "$as_me: failed program was:" >&5
15184 cat conftest.$ac_ext >&5
15185 fi
15186 rm -f conftest.$ac_objext conftest.$ac_ext
15187 done
15188
15189 fi
15190 echo "$as_me:15190: result: $cf_cv_getopt_header" >&5
15191 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15192 if test $cf_cv_getopt_header != none ; then
15193
15194 cat >>confdefs.h <<\EOF
15195 #define HAVE_GETOPT_HEADER 1
15196 EOF
15197
15198 fi
15199 if test $cf_cv_getopt_header = getopt.h ; then
15200
15201 cat >>confdefs.h <<\EOF
15202 #define NEED_GETOPT_H 1
15203 EOF
15204
15205 fi
15206
15207 # check for ISC (this may also define _POSIX_SOURCE)
15208 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15209 if test "x$ISC" = xyes ; then
15210
15211 echo "$as_me:15211: checking for main in -lcposix" >&5
15212 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15213 if test "${ac_cv_lib_cposix_main+set}" = set; then
15214   echo $ECHO_N "(cached) $ECHO_C" >&6
15215 else
15216   ac_check_lib_save_LIBS=$LIBS
15217 LIBS="-lcposix  $LIBS"
15218 cat >conftest.$ac_ext <<_ACEOF
15219 #line 15219 "configure"
15220 #include "confdefs.h"
15221
15222 int
15223 main ()
15224 {
15225 main ();
15226   ;
15227   return 0;
15228 }
15229 _ACEOF
15230 rm -f conftest.$ac_objext conftest$ac_exeext
15231 if { (eval echo "$as_me:15231: \"$ac_link\"") >&5
15232   (eval $ac_link) 2>&5
15233   ac_status=$?
15234   echo "$as_me:15234: \$? = $ac_status" >&5
15235   (exit $ac_status); } &&
15236          { ac_try='test -s conftest$ac_exeext'
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   ac_cv_lib_cposix_main=yes
15243 else
15244   echo "$as_me: failed program was:" >&5
15245 cat conftest.$ac_ext >&5
15246 ac_cv_lib_cposix_main=no
15247 fi
15248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15249 LIBS=$ac_check_lib_save_LIBS
15250 fi
15251 echo "$as_me:15251: result: $ac_cv_lib_cposix_main" >&5
15252 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15253 if test $ac_cv_lib_cposix_main = yes; then
15254   cat >>confdefs.h <<EOF
15255 #define HAVE_LIBCPOSIX 1
15256 EOF
15257
15258   LIBS="-lcposix $LIBS"
15259
15260 fi
15261
15262         echo "$as_me:15262: checking for bzero in -linet" >&5
15263 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15264 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15265   echo $ECHO_N "(cached) $ECHO_C" >&6
15266 else
15267   ac_check_lib_save_LIBS=$LIBS
15268 LIBS="-linet  $LIBS"
15269 cat >conftest.$ac_ext <<_ACEOF
15270 #line 15270 "configure"
15271 #include "confdefs.h"
15272
15273 /* Override any gcc2 internal prototype to avoid an error.  */
15274 #ifdef __cplusplus
15275 extern "C"
15276 #endif
15277 /* We use char because int might match the return type of a gcc2
15278    builtin and then its argument prototype would still apply.  */
15279 char bzero ();
15280 int
15281 main ()
15282 {
15283 bzero ();
15284   ;
15285   return 0;
15286 }
15287 _ACEOF
15288 rm -f conftest.$ac_objext conftest$ac_exeext
15289 if { (eval echo "$as_me:15289: \"$ac_link\"") >&5
15290   (eval $ac_link) 2>&5
15291   ac_status=$?
15292   echo "$as_me:15292: \$? = $ac_status" >&5
15293   (exit $ac_status); } &&
15294          { ac_try='test -s conftest$ac_exeext'
15295   { (eval echo "$as_me:15295: \"$ac_try\"") >&5
15296   (eval $ac_try) 2>&5
15297   ac_status=$?
15298   echo "$as_me:15298: \$? = $ac_status" >&5
15299   (exit $ac_status); }; }; then
15300   ac_cv_lib_inet_bzero=yes
15301 else
15302   echo "$as_me: failed program was:" >&5
15303 cat conftest.$ac_ext >&5
15304 ac_cv_lib_inet_bzero=no
15305 fi
15306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15307 LIBS=$ac_check_lib_save_LIBS
15308 fi
15309 echo "$as_me:15309: result: $ac_cv_lib_inet_bzero" >&5
15310 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15311 if test $ac_cv_lib_inet_bzero = yes; then
15312
15313 cf_add_libs="-linet"
15314 # Filter out duplicates - this happens with badly-designed ".pc" files...
15315 for cf_add_1lib in $LIBS
15316 do
15317         for cf_add_2lib in $cf_add_libs
15318         do
15319                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15320                 then
15321                         cf_add_1lib=
15322                         break
15323                 fi
15324         done
15325         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15326 done
15327 LIBS="$cf_add_libs"
15328
15329 fi
15330 fi
15331
15332 echo "$as_me:15332: checking if sys/time.h works with sys/select.h" >&5
15333 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15334 if test "${cf_cv_sys_time_select+set}" = set; then
15335   echo $ECHO_N "(cached) $ECHO_C" >&6
15336 else
15337
15338 cat >conftest.$ac_ext <<_ACEOF
15339 #line 15339 "configure"
15340 #include "confdefs.h"
15341
15342 #include <sys/types.h>
15343 #ifdef HAVE_SYS_TIME_H
15344 #include <sys/time.h>
15345 #endif
15346 #ifdef HAVE_SYS_SELECT_H
15347 #include <sys/select.h>
15348 #endif
15349
15350 int
15351 main ()
15352 {
15353
15354   ;
15355   return 0;
15356 }
15357 _ACEOF
15358 rm -f conftest.$ac_objext
15359 if { (eval echo "$as_me:15359: \"$ac_compile\"") >&5
15360   (eval $ac_compile) 2>&5
15361   ac_status=$?
15362   echo "$as_me:15362: \$? = $ac_status" >&5
15363   (exit $ac_status); } &&
15364          { ac_try='test -s conftest.$ac_objext'
15365   { (eval echo "$as_me:15365: \"$ac_try\"") >&5
15366   (eval $ac_try) 2>&5
15367   ac_status=$?
15368   echo "$as_me:15368: \$? = $ac_status" >&5
15369   (exit $ac_status); }; }; then
15370   cf_cv_sys_time_select=yes
15371 else
15372   echo "$as_me: failed program was:" >&5
15373 cat conftest.$ac_ext >&5
15374 cf_cv_sys_time_select=no
15375 fi
15376 rm -f conftest.$ac_objext conftest.$ac_ext
15377
15378 fi
15379
15380 echo "$as_me:15380: result: $cf_cv_sys_time_select" >&5
15381 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15382 test "$cf_cv_sys_time_select" = yes &&
15383 cat >>confdefs.h <<\EOF
15384 #define HAVE_SYS_TIME_SELECT 1
15385 EOF
15386
15387 ###     checks for compiler characteristics
15388 ac_ext=c
15389 ac_cpp='$CPP $CPPFLAGS'
15390 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15391 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15392 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15393 ac_main_return=return
15394
15395 echo "$as_me:15395: checking for an ANSI C-conforming const" >&5
15396 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15397 if test "${ac_cv_c_const+set}" = set; then
15398   echo $ECHO_N "(cached) $ECHO_C" >&6
15399 else
15400   cat >conftest.$ac_ext <<_ACEOF
15401 #line 15401 "configure"
15402 #include "confdefs.h"
15403
15404 int
15405 main ()
15406 {
15407 /* FIXME: Include the comments suggested by Paul. */
15408 #ifndef __cplusplus
15409   /* Ultrix mips cc rejects this.  */
15410   typedef int charset[2];
15411   const charset x;
15412   /* SunOS 4.1.1 cc rejects this.  */
15413   char const *const *ccp;
15414   char **p;
15415   /* NEC SVR4.0.2 mips cc rejects this.  */
15416   struct point {int x, y;};
15417   static struct point const zero = {0,0};
15418   /* AIX XL C 1.02.0.0 rejects this.
15419      It does not let you subtract one const X* pointer from another in
15420      an arm of an if-expression whose if-part is not a constant
15421      expression */
15422   const char *g = "string";
15423   ccp = &g + (g ? g-g : 0);
15424   /* HPUX 7.0 cc rejects these. */
15425   ++ccp;
15426   p = (char**) ccp;
15427   ccp = (char const *const *) p;
15428   { /* SCO 3.2v4 cc rejects this.  */
15429     char *t;
15430     char const *s = 0 ? (char *) 0 : (char const *) 0;
15431
15432     *t++ = 0;
15433   }
15434   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15435     int x[] = {25, 17};
15436     const int *foo = &x[0];
15437     ++foo;
15438   }
15439   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15440     typedef const int *iptr;
15441     iptr p = 0;
15442     ++p;
15443   }
15444   { /* AIX XL C 1.02.0.0 rejects this saying
15445        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15446     struct s { int j; const int *ap[3]; };
15447     struct s *b; b->j = 5;
15448   }
15449   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15450     const int foo = 10;
15451   }
15452 #endif
15453
15454   ;
15455   return 0;
15456 }
15457 _ACEOF
15458 rm -f conftest.$ac_objext
15459 if { (eval echo "$as_me:15459: \"$ac_compile\"") >&5
15460   (eval $ac_compile) 2>&5
15461   ac_status=$?
15462   echo "$as_me:15462: \$? = $ac_status" >&5
15463   (exit $ac_status); } &&
15464          { ac_try='test -s conftest.$ac_objext'
15465   { (eval echo "$as_me:15465: \"$ac_try\"") >&5
15466   (eval $ac_try) 2>&5
15467   ac_status=$?
15468   echo "$as_me:15468: \$? = $ac_status" >&5
15469   (exit $ac_status); }; }; then
15470   ac_cv_c_const=yes
15471 else
15472   echo "$as_me: failed program was:" >&5
15473 cat conftest.$ac_ext >&5
15474 ac_cv_c_const=no
15475 fi
15476 rm -f conftest.$ac_objext conftest.$ac_ext
15477 fi
15478 echo "$as_me:15478: result: $ac_cv_c_const" >&5
15479 echo "${ECHO_T}$ac_cv_c_const" >&6
15480 if test $ac_cv_c_const = no; then
15481
15482 cat >>confdefs.h <<\EOF
15483 #define const
15484 EOF
15485
15486 fi
15487
15488 echo "$as_me:15488: checking for inline" >&5
15489 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15490 if test "${ac_cv_c_inline+set}" = set; then
15491   echo $ECHO_N "(cached) $ECHO_C" >&6
15492 else
15493   ac_cv_c_inline=no
15494 for ac_kw in inline __inline__ __inline; do
15495   cat >conftest.$ac_ext <<_ACEOF
15496 #line 15496 "configure"
15497 #include "confdefs.h"
15498 #ifndef __cplusplus
15499 static $ac_kw int static_foo () {return 0; }
15500 $ac_kw int foo () {return 0; }
15501 #endif
15502
15503 _ACEOF
15504 rm -f conftest.$ac_objext
15505 if { (eval echo "$as_me:15505: \"$ac_compile\"") >&5
15506   (eval $ac_compile) 2>&5
15507   ac_status=$?
15508   echo "$as_me:15508: \$? = $ac_status" >&5
15509   (exit $ac_status); } &&
15510          { ac_try='test -s conftest.$ac_objext'
15511   { (eval echo "$as_me:15511: \"$ac_try\"") >&5
15512   (eval $ac_try) 2>&5
15513   ac_status=$?
15514   echo "$as_me:15514: \$? = $ac_status" >&5
15515   (exit $ac_status); }; }; then
15516   ac_cv_c_inline=$ac_kw; break
15517 else
15518   echo "$as_me: failed program was:" >&5
15519 cat conftest.$ac_ext >&5
15520 fi
15521 rm -f conftest.$ac_objext conftest.$ac_ext
15522 done
15523
15524 fi
15525 echo "$as_me:15525: result: $ac_cv_c_inline" >&5
15526 echo "${ECHO_T}$ac_cv_c_inline" >&6
15527 case $ac_cv_c_inline in
15528   inline | yes) ;;
15529   no)
15530 cat >>confdefs.h <<\EOF
15531 #define inline
15532 EOF
15533  ;;
15534   *)  cat >>confdefs.h <<EOF
15535 #define inline $ac_cv_c_inline
15536 EOF
15537  ;;
15538 esac
15539
15540 NCURSES_INLINE=
15541 if test "$ac_cv_c_inline" != no ; then
15542   NCURSES_INLINE=inline
15543   if test "$INTEL_COMPILER" = yes
15544   then
15545     :
15546   elif test "$CLANG_COMPILER" = yes
15547   then
15548     :
15549   elif test "$GCC" = yes
15550   then
15551     echo "$as_me:15551: checking if $CC supports options to tune inlining" >&5
15552 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15553 if test "${cf_cv_gcc_inline+set}" = set; then
15554   echo $ECHO_N "(cached) $ECHO_C" >&6
15555 else
15556
15557       cf_save_CFLAGS=$CFLAGS
15558       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15559       cat >conftest.$ac_ext <<_ACEOF
15560 #line 15560 "configure"
15561 #include "confdefs.h"
15562 inline int foo(void) { return 1; }
15563 int
15564 main ()
15565 {
15566 ${cf_cv_main_return:-return} foo()
15567   ;
15568   return 0;
15569 }
15570 _ACEOF
15571 rm -f conftest.$ac_objext
15572 if { (eval echo "$as_me:15572: \"$ac_compile\"") >&5
15573   (eval $ac_compile) 2>&5
15574   ac_status=$?
15575   echo "$as_me:15575: \$? = $ac_status" >&5
15576   (exit $ac_status); } &&
15577          { ac_try='test -s conftest.$ac_objext'
15578   { (eval echo "$as_me:15578: \"$ac_try\"") >&5
15579   (eval $ac_try) 2>&5
15580   ac_status=$?
15581   echo "$as_me:15581: \$? = $ac_status" >&5
15582   (exit $ac_status); }; }; then
15583   cf_cv_gcc_inline=yes
15584 else
15585   echo "$as_me: failed program was:" >&5
15586 cat conftest.$ac_ext >&5
15587 cf_cv_gcc_inline=no
15588 fi
15589 rm -f conftest.$ac_objext conftest.$ac_ext
15590       CFLAGS=$cf_save_CFLAGS
15591
15592 fi
15593 echo "$as_me:15593: result: $cf_cv_gcc_inline" >&5
15594 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15595     if test "$cf_cv_gcc_inline" = yes ; then
15596
15597 cf_fix_cppflags=no
15598 cf_new_cflags=
15599 cf_new_cppflags=
15600 cf_new_extra_cppflags=
15601
15602 for cf_add_cflags in --param max-inline-insns-single=1200
15603 do
15604 case $cf_fix_cppflags in
15605 no)
15606         case $cf_add_cflags in #(vi
15607         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15608                 case $cf_add_cflags in
15609                 -D*)
15610                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15611
15612                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15613                                 && test -z "${cf_tst_cflags}" \
15614                                 && cf_fix_cppflags=yes
15615
15616                         if test $cf_fix_cppflags = yes ; then
15617                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15618                                 continue
15619                         elif test "${cf_tst_cflags}" = "\"'" ; then
15620                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15621                                 continue
15622                         fi
15623                         ;;
15624                 esac
15625                 case "$CPPFLAGS" in
15626                 *$cf_add_cflags) #(vi
15627                         ;;
15628                 *) #(vi
15629                         case $cf_add_cflags in #(vi
15630                         -D*)
15631                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15632
15633 CPPFLAGS=`echo "$CPPFLAGS" | \
15634         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15635                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15636
15637                                 ;;
15638                         esac
15639                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15640                         ;;
15641                 esac
15642                 ;;
15643         *)
15644                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15645                 ;;
15646         esac
15647         ;;
15648 yes)
15649         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15650
15651         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15652
15653         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15654                 && test -z "${cf_tst_cflags}" \
15655                 && cf_fix_cppflags=no
15656         ;;
15657 esac
15658 done
15659
15660 if test -n "$cf_new_cflags" ; then
15661
15662         CFLAGS="$CFLAGS $cf_new_cflags"
15663 fi
15664
15665 if test -n "$cf_new_cppflags" ; then
15666
15667         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15668 fi
15669
15670 if test -n "$cf_new_extra_cppflags" ; then
15671
15672         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15673 fi
15674
15675     fi
15676   fi
15677 fi
15678
15679 echo "$as_me:15679: checking for signal global datatype" >&5
15680 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15681 if test "${cf_cv_sig_atomic_t+set}" = set; then
15682   echo $ECHO_N "(cached) $ECHO_C" >&6
15683 else
15684
15685         for cf_type in \
15686                 "volatile sig_atomic_t" \
15687                 "sig_atomic_t" \
15688                 "int"
15689         do
15690         cat >conftest.$ac_ext <<_ACEOF
15691 #line 15691 "configure"
15692 #include "confdefs.h"
15693
15694 #include <sys/types.h>
15695 #include <signal.h>
15696 #include <stdio.h>
15697
15698 extern $cf_type x;
15699 $cf_type x;
15700 static void handler(int sig)
15701 {
15702         x = 5;
15703 }
15704 int
15705 main ()
15706 {
15707 signal(SIGINT, handler);
15708                  x = 1
15709   ;
15710   return 0;
15711 }
15712 _ACEOF
15713 rm -f conftest.$ac_objext
15714 if { (eval echo "$as_me:15714: \"$ac_compile\"") >&5
15715   (eval $ac_compile) 2>&5
15716   ac_status=$?
15717   echo "$as_me:15717: \$? = $ac_status" >&5
15718   (exit $ac_status); } &&
15719          { ac_try='test -s conftest.$ac_objext'
15720   { (eval echo "$as_me:15720: \"$ac_try\"") >&5
15721   (eval $ac_try) 2>&5
15722   ac_status=$?
15723   echo "$as_me:15723: \$? = $ac_status" >&5
15724   (exit $ac_status); }; }; then
15725   cf_cv_sig_atomic_t=$cf_type
15726 else
15727   echo "$as_me: failed program was:" >&5
15728 cat conftest.$ac_ext >&5
15729 cf_cv_sig_atomic_t=no
15730 fi
15731 rm -f conftest.$ac_objext conftest.$ac_ext
15732                 test "$cf_cv_sig_atomic_t" != no && break
15733         done
15734
15735 fi
15736
15737 echo "$as_me:15737: result: $cf_cv_sig_atomic_t" >&5
15738 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15739 test "$cf_cv_sig_atomic_t" != no &&
15740 cat >>confdefs.h <<EOF
15741 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15742 EOF
15743
15744 if test $NCURSES_CHTYPE = auto ; then
15745
15746 echo "$as_me:15746: checking for type of chtype" >&5
15747 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15748 if test "${cf_cv_typeof_chtype+set}" = set; then
15749   echo $ECHO_N "(cached) $ECHO_C" >&6
15750 else
15751
15752                 if test "$cross_compiling" = yes; then
15753   cf_cv_typeof_chtype=long
15754 else
15755   cat >conftest.$ac_ext <<_ACEOF
15756 #line 15756 "configure"
15757 #include "confdefs.h"
15758
15759 #define WANT_BITS 31
15760 #include <stdio.h>
15761 int main()
15762 {
15763         FILE *fp = fopen("cf_test.out", "w");
15764         if (fp != 0) {
15765                 char *result = "long";
15766                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15767                         int n;
15768                         unsigned int x, y;
15769                         for (n = 0; n < WANT_BITS; n++) {
15770                                 x = (1 << n);
15771                                 y = (x >> n);
15772                                 if (y != 1 || x == 0) {
15773                                         x = 0;
15774                                         break;
15775                                 }
15776                         }
15777                         /*
15778                          * If x is nonzero, an int is big enough for the bits
15779                          * that we want.
15780                          */
15781                         result = (x != 0) ? "int" : "long";
15782                 }
15783                 fputs(result, fp);
15784                 fclose(fp);
15785         }
15786         ${cf_cv_main_return:-return}(0);
15787 }
15788
15789 _ACEOF
15790 rm -f conftest$ac_exeext
15791 if { (eval echo "$as_me:15791: \"$ac_link\"") >&5
15792   (eval $ac_link) 2>&5
15793   ac_status=$?
15794   echo "$as_me:15794: \$? = $ac_status" >&5
15795   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15796   { (eval echo "$as_me:15796: \"$ac_try\"") >&5
15797   (eval $ac_try) 2>&5
15798   ac_status=$?
15799   echo "$as_me:15799: \$? = $ac_status" >&5
15800   (exit $ac_status); }; }; then
15801   cf_cv_typeof_chtype=`cat cf_test.out`
15802 else
15803   echo "$as_me: program exited with status $ac_status" >&5
15804 echo "$as_me: failed program was:" >&5
15805 cat conftest.$ac_ext >&5
15806 cf_cv_typeof_chtype=long
15807 fi
15808 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15809 fi
15810                 rm -f cf_test.out
15811
15812 fi
15813
15814 echo "$as_me:15814: result: $cf_cv_typeof_chtype" >&5
15815 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15816
15817 cat >>confdefs.h <<EOF
15818 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15819 EOF
15820
15821 else
15822         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15823 fi
15824 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15825
15826 echo "$as_me:15826: checking if unsigned literals are legal" >&5
15827 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15828 if test "${cf_cv_unsigned_literals+set}" = set; then
15829   echo $ECHO_N "(cached) $ECHO_C" >&6
15830 else
15831
15832         cat >conftest.$ac_ext <<_ACEOF
15833 #line 15833 "configure"
15834 #include "confdefs.h"
15835
15836 int
15837 main ()
15838 {
15839 long x = 1L + 1UL + 1U + 1
15840   ;
15841   return 0;
15842 }
15843 _ACEOF
15844 rm -f conftest.$ac_objext
15845 if { (eval echo "$as_me:15845: \"$ac_compile\"") >&5
15846   (eval $ac_compile) 2>&5
15847   ac_status=$?
15848   echo "$as_me:15848: \$? = $ac_status" >&5
15849   (exit $ac_status); } &&
15850          { ac_try='test -s conftest.$ac_objext'
15851   { (eval echo "$as_me:15851: \"$ac_try\"") >&5
15852   (eval $ac_try) 2>&5
15853   ac_status=$?
15854   echo "$as_me:15854: \$? = $ac_status" >&5
15855   (exit $ac_status); }; }; then
15856   cf_cv_unsigned_literals=yes
15857 else
15858   echo "$as_me: failed program was:" >&5
15859 cat conftest.$ac_ext >&5
15860 cf_cv_unsigned_literals=no
15861 fi
15862 rm -f conftest.$ac_objext conftest.$ac_ext
15863
15864 fi
15865
15866 echo "$as_me:15866: result: $cf_cv_unsigned_literals" >&5
15867 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15868
15869 cf_cv_1UL="1"
15870 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15871 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15872
15873 if test $NCURSES_MMASK_T = auto ; then
15874         cf_cv_typeof_mmask_t=long
15875 else
15876         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15877 fi
15878 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15879
15880 ###     Checks for external-data
15881
15882 echo "$as_me:15882: checking if external errno is declared" >&5
15883 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15884 if test "${cf_cv_dcl_errno+set}" = set; then
15885   echo $ECHO_N "(cached) $ECHO_C" >&6
15886 else
15887
15888     cat >conftest.$ac_ext <<_ACEOF
15889 #line 15889 "configure"
15890 #include "confdefs.h"
15891
15892 #ifdef HAVE_STDLIB_H
15893 #include <stdlib.h>
15894 #endif
15895 #include <stdio.h>
15896 #include <sys/types.h>
15897 #include <errno.h>
15898 int
15899 main ()
15900 {
15901 int x = (int) errno
15902   ;
15903   return 0;
15904 }
15905 _ACEOF
15906 rm -f conftest.$ac_objext
15907 if { (eval echo "$as_me:15907: \"$ac_compile\"") >&5
15908   (eval $ac_compile) 2>&5
15909   ac_status=$?
15910   echo "$as_me:15910: \$? = $ac_status" >&5
15911   (exit $ac_status); } &&
15912          { ac_try='test -s conftest.$ac_objext'
15913   { (eval echo "$as_me:15913: \"$ac_try\"") >&5
15914   (eval $ac_try) 2>&5
15915   ac_status=$?
15916   echo "$as_me:15916: \$? = $ac_status" >&5
15917   (exit $ac_status); }; }; then
15918   cf_cv_dcl_errno=yes
15919 else
15920   echo "$as_me: failed program was:" >&5
15921 cat conftest.$ac_ext >&5
15922 cf_cv_dcl_errno=no
15923 fi
15924 rm -f conftest.$ac_objext conftest.$ac_ext
15925
15926 fi
15927 echo "$as_me:15927: result: $cf_cv_dcl_errno" >&5
15928 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15929
15930 if test "$cf_cv_dcl_errno" = no ; then
15931
15932 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15933
15934     cat >>confdefs.h <<EOF
15935 #define $cf_result 1
15936 EOF
15937
15938 fi
15939
15940 # It's possible (for near-UNIX clones) that the data doesn't exist
15941
15942 echo "$as_me:15942: checking if external errno exists" >&5
15943 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15944 if test "${cf_cv_have_errno+set}" = set; then
15945   echo $ECHO_N "(cached) $ECHO_C" >&6
15946 else
15947
15948     cat >conftest.$ac_ext <<_ACEOF
15949 #line 15949 "configure"
15950 #include "confdefs.h"
15951
15952 #undef errno
15953 extern int errno;
15954
15955 int
15956 main ()
15957 {
15958 errno = 2
15959   ;
15960   return 0;
15961 }
15962 _ACEOF
15963 rm -f conftest.$ac_objext conftest$ac_exeext
15964 if { (eval echo "$as_me:15964: \"$ac_link\"") >&5
15965   (eval $ac_link) 2>&5
15966   ac_status=$?
15967   echo "$as_me:15967: \$? = $ac_status" >&5
15968   (exit $ac_status); } &&
15969          { ac_try='test -s conftest$ac_exeext'
15970   { (eval echo "$as_me:15970: \"$ac_try\"") >&5
15971   (eval $ac_try) 2>&5
15972   ac_status=$?
15973   echo "$as_me:15973: \$? = $ac_status" >&5
15974   (exit $ac_status); }; }; then
15975   cf_cv_have_errno=yes
15976 else
15977   echo "$as_me: failed program was:" >&5
15978 cat conftest.$ac_ext >&5
15979 cf_cv_have_errno=no
15980 fi
15981 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15982
15983 fi
15984 echo "$as_me:15984: result: $cf_cv_have_errno" >&5
15985 echo "${ECHO_T}$cf_cv_have_errno" >&6
15986
15987 if test "$cf_cv_have_errno" = yes ; then
15988
15989 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15990
15991     cat >>confdefs.h <<EOF
15992 #define $cf_result 1
15993 EOF
15994
15995 fi
15996
15997 echo "$as_me:15997: checking if data-only library module links" >&5
15998 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15999 if test "${cf_cv_link_dataonly+set}" = set; then
16000   echo $ECHO_N "(cached) $ECHO_C" >&6
16001 else
16002
16003         rm -f conftest.a
16004         cat >conftest.$ac_ext <<EOF
16005 #line 16005 "configure"
16006 int     testdata[3] = { 123, 456, 789 };
16007 EOF
16008         if { (eval echo "$as_me:16008: \"$ac_compile\"") >&5
16009   (eval $ac_compile) 2>&5
16010   ac_status=$?
16011   echo "$as_me:16011: \$? = $ac_status" >&5
16012   (exit $ac_status); } ; then
16013                 mv conftest.o data.o && \
16014                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16015         fi
16016         rm -f conftest.$ac_ext data.o
16017         cat >conftest.$ac_ext <<EOF
16018 #line 16018 "configure"
16019 int     testfunc()
16020 {
16021 #if defined(NeXT)
16022         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16023 #else
16024         extern int testdata[3];
16025         return testdata[0] == 123
16026            &&  testdata[1] == 456
16027            &&  testdata[2] == 789;
16028 #endif
16029 }
16030 EOF
16031         if { (eval echo "$as_me:16031: \"$ac_compile\"") >&5
16032   (eval $ac_compile) 2>&5
16033   ac_status=$?
16034   echo "$as_me:16034: \$? = $ac_status" >&5
16035   (exit $ac_status); }; then
16036                 mv conftest.o func.o && \
16037                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16038         fi
16039         rm -f conftest.$ac_ext func.o
16040         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16041         cf_saveLIBS="$LIBS"
16042         LIBS="conftest.a $LIBS"
16043         if test "$cross_compiling" = yes; then
16044   cf_cv_link_dataonly=unknown
16045 else
16046   cat >conftest.$ac_ext <<_ACEOF
16047 #line 16047 "configure"
16048 #include "confdefs.h"
16049
16050         int main()
16051         {
16052                 extern int testfunc();
16053                 ${cf_cv_main_return:-return} (!testfunc());
16054         }
16055
16056 _ACEOF
16057 rm -f conftest$ac_exeext
16058 if { (eval echo "$as_me:16058: \"$ac_link\"") >&5
16059   (eval $ac_link) 2>&5
16060   ac_status=$?
16061   echo "$as_me:16061: \$? = $ac_status" >&5
16062   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16063   { (eval echo "$as_me:16063: \"$ac_try\"") >&5
16064   (eval $ac_try) 2>&5
16065   ac_status=$?
16066   echo "$as_me:16066: \$? = $ac_status" >&5
16067   (exit $ac_status); }; }; then
16068   cf_cv_link_dataonly=yes
16069 else
16070   echo "$as_me: program exited with status $ac_status" >&5
16071 echo "$as_me: failed program was:" >&5
16072 cat conftest.$ac_ext >&5
16073 cf_cv_link_dataonly=no
16074 fi
16075 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16076 fi
16077         LIBS="$cf_saveLIBS"
16078
16079 fi
16080
16081 echo "$as_me:16081: result: $cf_cv_link_dataonly" >&5
16082 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16083
16084 if test "$cf_cv_link_dataonly" = no ; then
16085
16086 cat >>confdefs.h <<\EOF
16087 #define BROKEN_LINKER 1
16088 EOF
16089
16090         BROKEN_LINKER=1
16091 fi
16092
16093 ###     Checks for library functions.
16094
16095 for ac_func in \
16096 getcwd \
16097 getegid \
16098 geteuid \
16099 getopt \
16100 getttynam \
16101 issetugid \
16102 poll \
16103 putenv \
16104 remove \
16105 select \
16106 setbuf \
16107 setbuffer \
16108 setenv \
16109 setvbuf \
16110 sigaction \
16111 sigvec \
16112 strdup \
16113 strstr \
16114 tcgetpgrp \
16115 times \
16116 vsnprintf \
16117
16118 do
16119 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16120 echo "$as_me:16120: checking for $ac_func" >&5
16121 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16122 if eval "test \"\${$as_ac_var+set}\" = set"; then
16123   echo $ECHO_N "(cached) $ECHO_C" >&6
16124 else
16125   cat >conftest.$ac_ext <<_ACEOF
16126 #line 16126 "configure"
16127 #include "confdefs.h"
16128 /* System header to define __stub macros and hopefully few prototypes,
16129     which can conflict with char $ac_func (); below.  */
16130 #include <assert.h>
16131 /* Override any gcc2 internal prototype to avoid an error.  */
16132 #ifdef __cplusplus
16133 extern "C"
16134 #endif
16135 /* We use char because int might match the return type of a gcc2
16136    builtin and then its argument prototype would still apply.  */
16137 char $ac_func ();
16138 char (*f) ();
16139
16140 int
16141 main ()
16142 {
16143 /* The GNU C library defines this for functions which it implements
16144     to always fail with ENOSYS.  Some functions are actually named
16145     something starting with __ and the normal name is an alias.  */
16146 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16147 choke me
16148 #else
16149 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16150 #endif
16151
16152   ;
16153   return 0;
16154 }
16155 _ACEOF
16156 rm -f conftest.$ac_objext conftest$ac_exeext
16157 if { (eval echo "$as_me:16157: \"$ac_link\"") >&5
16158   (eval $ac_link) 2>&5
16159   ac_status=$?
16160   echo "$as_me:16160: \$? = $ac_status" >&5
16161   (exit $ac_status); } &&
16162          { ac_try='test -s conftest$ac_exeext'
16163   { (eval echo "$as_me:16163: \"$ac_try\"") >&5
16164   (eval $ac_try) 2>&5
16165   ac_status=$?
16166   echo "$as_me:16166: \$? = $ac_status" >&5
16167   (exit $ac_status); }; }; then
16168   eval "$as_ac_var=yes"
16169 else
16170   echo "$as_me: failed program was:" >&5
16171 cat conftest.$ac_ext >&5
16172 eval "$as_ac_var=no"
16173 fi
16174 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16175 fi
16176 echo "$as_me:16176: result: `eval echo '${'$as_ac_var'}'`" >&5
16177 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16178 if test `eval echo '${'$as_ac_var'}'` = yes; then
16179   cat >>confdefs.h <<EOF
16180 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16181 EOF
16182
16183 fi
16184 done
16185
16186 if test "x$ac_cv_func_getopt" = xno &&
16187    test "x$cf_with_progs$cf_with_tests" != xnono; then
16188         { { echo "$as_me:16188: error: getopt is required for building programs" >&5
16189 echo "$as_me: error: getopt is required for building programs" >&2;}
16190    { (exit 1); exit 1; }; }
16191 fi
16192
16193 if test "x$with_getcap" = "xyes" ; then
16194
16195 echo "$as_me:16195: checking for terminal-capability database functions" >&5
16196 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16197 if test "${cf_cv_cgetent+set}" = set; then
16198   echo $ECHO_N "(cached) $ECHO_C" >&6
16199 else
16200
16201 cat >conftest.$ac_ext <<_ACEOF
16202 #line 16202 "configure"
16203 #include "confdefs.h"
16204
16205 #include <stdlib.h>
16206 int
16207 main ()
16208 {
16209
16210         char temp[128];
16211         char *buf = temp;
16212         char *db_array = temp;
16213         cgetent(&buf, &db_array, "vt100");
16214         cgetcap(buf, "tc", '=');
16215         cgetmatch(buf, "tc");
16216
16217   ;
16218   return 0;
16219 }
16220 _ACEOF
16221 rm -f conftest.$ac_objext conftest$ac_exeext
16222 if { (eval echo "$as_me:16222: \"$ac_link\"") >&5
16223   (eval $ac_link) 2>&5
16224   ac_status=$?
16225   echo "$as_me:16225: \$? = $ac_status" >&5
16226   (exit $ac_status); } &&
16227          { ac_try='test -s conftest$ac_exeext'
16228   { (eval echo "$as_me:16228: \"$ac_try\"") >&5
16229   (eval $ac_try) 2>&5
16230   ac_status=$?
16231   echo "$as_me:16231: \$? = $ac_status" >&5
16232   (exit $ac_status); }; }; then
16233   cf_cv_cgetent=yes
16234 else
16235   echo "$as_me: failed program was:" >&5
16236 cat conftest.$ac_ext >&5
16237 cf_cv_cgetent=no
16238 fi
16239 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16240
16241 fi
16242 echo "$as_me:16242: result: $cf_cv_cgetent" >&5
16243 echo "${ECHO_T}$cf_cv_cgetent" >&6
16244
16245 if test "$cf_cv_cgetent" = yes
16246 then
16247
16248 cat >>confdefs.h <<\EOF
16249 #define HAVE_BSD_CGETENT 1
16250 EOF
16251
16252 echo "$as_me:16252: checking if cgetent uses const parameter" >&5
16253 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16254 if test "${cf_cv_cgetent_const+set}" = set; then
16255   echo $ECHO_N "(cached) $ECHO_C" >&6
16256 else
16257
16258 cat >conftest.$ac_ext <<_ACEOF
16259 #line 16259 "configure"
16260 #include "confdefs.h"
16261
16262 #include <stdlib.h>
16263 int
16264 main ()
16265 {
16266
16267         char temp[128];
16268         char *buf = temp;
16269 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16270         const char *db_array = temp;
16271         cgetent(&buf, &db_array, "vt100");
16272 #endif
16273         cgetcap(buf, "tc", '=');
16274         cgetmatch(buf, "tc");
16275
16276   ;
16277   return 0;
16278 }
16279 _ACEOF
16280 rm -f conftest.$ac_objext conftest$ac_exeext
16281 if { (eval echo "$as_me:16281: \"$ac_link\"") >&5
16282   (eval $ac_link) 2>&5
16283   ac_status=$?
16284   echo "$as_me:16284: \$? = $ac_status" >&5
16285   (exit $ac_status); } &&
16286          { ac_try='test -s conftest$ac_exeext'
16287   { (eval echo "$as_me:16287: \"$ac_try\"") >&5
16288   (eval $ac_try) 2>&5
16289   ac_status=$?
16290   echo "$as_me:16290: \$? = $ac_status" >&5
16291   (exit $ac_status); }; }; then
16292   cf_cv_cgetent_const=yes
16293 else
16294   echo "$as_me: failed program was:" >&5
16295 cat conftest.$ac_ext >&5
16296 cf_cv_cgetent_const=no
16297 fi
16298 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16299
16300 fi
16301 echo "$as_me:16301: result: $cf_cv_cgetent_const" >&5
16302 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16303         if test "$cf_cv_cgetent_const" = yes
16304         then
16305
16306 cat >>confdefs.h <<EOF
16307 #define CGETENT_CONST const
16308 EOF
16309
16310         fi
16311 fi
16312
16313 fi
16314
16315 echo "$as_me:16315: checking for isascii" >&5
16316 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16317 if test "${cf_cv_have_isascii+set}" = set; then
16318   echo $ECHO_N "(cached) $ECHO_C" >&6
16319 else
16320
16321         cat >conftest.$ac_ext <<_ACEOF
16322 #line 16322 "configure"
16323 #include "confdefs.h"
16324 #include <ctype.h>
16325 int
16326 main ()
16327 {
16328 int x = isascii(' ')
16329   ;
16330   return 0;
16331 }
16332 _ACEOF
16333 rm -f conftest.$ac_objext conftest$ac_exeext
16334 if { (eval echo "$as_me:16334: \"$ac_link\"") >&5
16335   (eval $ac_link) 2>&5
16336   ac_status=$?
16337   echo "$as_me:16337: \$? = $ac_status" >&5
16338   (exit $ac_status); } &&
16339          { ac_try='test -s conftest$ac_exeext'
16340   { (eval echo "$as_me:16340: \"$ac_try\"") >&5
16341   (eval $ac_try) 2>&5
16342   ac_status=$?
16343   echo "$as_me:16343: \$? = $ac_status" >&5
16344   (exit $ac_status); }; }; then
16345   cf_cv_have_isascii=yes
16346 else
16347   echo "$as_me: failed program was:" >&5
16348 cat conftest.$ac_ext >&5
16349 cf_cv_have_isascii=no
16350 fi
16351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16352
16353 fi
16354 echo "$as_me:16354: result: $cf_cv_have_isascii" >&5
16355 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16356 test "$cf_cv_have_isascii" = yes &&
16357 cat >>confdefs.h <<\EOF
16358 #define HAVE_ISASCII 1
16359 EOF
16360
16361 if test "$ac_cv_func_sigaction" = yes; then
16362 echo "$as_me:16362: checking whether sigaction needs _POSIX_SOURCE" >&5
16363 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16364 cat >conftest.$ac_ext <<_ACEOF
16365 #line 16365 "configure"
16366 #include "confdefs.h"
16367
16368 #include <sys/types.h>
16369 #include <signal.h>
16370 int
16371 main ()
16372 {
16373 struct sigaction act
16374   ;
16375   return 0;
16376 }
16377 _ACEOF
16378 rm -f conftest.$ac_objext
16379 if { (eval echo "$as_me:16379: \"$ac_compile\"") >&5
16380   (eval $ac_compile) 2>&5
16381   ac_status=$?
16382   echo "$as_me:16382: \$? = $ac_status" >&5
16383   (exit $ac_status); } &&
16384          { ac_try='test -s conftest.$ac_objext'
16385   { (eval echo "$as_me:16385: \"$ac_try\"") >&5
16386   (eval $ac_try) 2>&5
16387   ac_status=$?
16388   echo "$as_me:16388: \$? = $ac_status" >&5
16389   (exit $ac_status); }; }; then
16390   sigact_bad=no
16391 else
16392   echo "$as_me: failed program was:" >&5
16393 cat conftest.$ac_ext >&5
16394
16395 cat >conftest.$ac_ext <<_ACEOF
16396 #line 16396 "configure"
16397 #include "confdefs.h"
16398
16399 #define _POSIX_SOURCE
16400 #include <sys/types.h>
16401 #include <signal.h>
16402 int
16403 main ()
16404 {
16405 struct sigaction act
16406   ;
16407   return 0;
16408 }
16409 _ACEOF
16410 rm -f conftest.$ac_objext
16411 if { (eval echo "$as_me:16411: \"$ac_compile\"") >&5
16412   (eval $ac_compile) 2>&5
16413   ac_status=$?
16414   echo "$as_me:16414: \$? = $ac_status" >&5
16415   (exit $ac_status); } &&
16416          { ac_try='test -s conftest.$ac_objext'
16417   { (eval echo "$as_me:16417: \"$ac_try\"") >&5
16418   (eval $ac_try) 2>&5
16419   ac_status=$?
16420   echo "$as_me:16420: \$? = $ac_status" >&5
16421   (exit $ac_status); }; }; then
16422   sigact_bad=yes
16423
16424 cat >>confdefs.h <<\EOF
16425 #define _POSIX_SOURCE 1
16426 EOF
16427
16428 else
16429   echo "$as_me: failed program was:" >&5
16430 cat conftest.$ac_ext >&5
16431 sigact_bad=unknown
16432 fi
16433 rm -f conftest.$ac_objext conftest.$ac_ext
16434 fi
16435 rm -f conftest.$ac_objext conftest.$ac_ext
16436 echo "$as_me:16436: result: $sigact_bad" >&5
16437 echo "${ECHO_T}$sigact_bad" >&6
16438 fi
16439
16440 echo "$as_me:16440: checking if nanosleep really works" >&5
16441 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16442 if test "${cf_cv_func_nanosleep+set}" = set; then
16443   echo $ECHO_N "(cached) $ECHO_C" >&6
16444 else
16445
16446 if test "$cross_compiling" = yes; then
16447   cf_cv_func_nanosleep=unknown
16448 else
16449   cat >conftest.$ac_ext <<_ACEOF
16450 #line 16450 "configure"
16451 #include "confdefs.h"
16452
16453 #include <stdio.h>
16454 #include <errno.h>
16455 #include <time.h>
16456
16457 #ifdef HAVE_SYS_TIME_H
16458 #include <sys/time.h>
16459 #endif
16460
16461 int main() {
16462         struct timespec ts1, ts2;
16463         int code;
16464         ts1.tv_sec  = 0;
16465         ts1.tv_nsec = 750000000;
16466         ts2.tv_sec  = 0;
16467         ts2.tv_nsec = 0;
16468         errno = 0;
16469         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16470         ${cf_cv_main_return:-return}(code != 0);
16471 }
16472
16473 _ACEOF
16474 rm -f conftest$ac_exeext
16475 if { (eval echo "$as_me:16475: \"$ac_link\"") >&5
16476   (eval $ac_link) 2>&5
16477   ac_status=$?
16478   echo "$as_me:16478: \$? = $ac_status" >&5
16479   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16480   { (eval echo "$as_me:16480: \"$ac_try\"") >&5
16481   (eval $ac_try) 2>&5
16482   ac_status=$?
16483   echo "$as_me:16483: \$? = $ac_status" >&5
16484   (exit $ac_status); }; }; then
16485   cf_cv_func_nanosleep=yes
16486 else
16487   echo "$as_me: program exited with status $ac_status" >&5
16488 echo "$as_me: failed program was:" >&5
16489 cat conftest.$ac_ext >&5
16490 cf_cv_func_nanosleep=no
16491 fi
16492 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16493 fi
16494 fi
16495 echo "$as_me:16495: result: $cf_cv_func_nanosleep" >&5
16496 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16497
16498 test "$cf_cv_func_nanosleep" = "yes" &&
16499 cat >>confdefs.h <<\EOF
16500 #define HAVE_NANOSLEEP 1
16501 EOF
16502
16503 for ac_header in \
16504 termio.h \
16505 termios.h \
16506 unistd.h \
16507
16508 do
16509 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16510 echo "$as_me:16510: checking for $ac_header" >&5
16511 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16512 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16513   echo $ECHO_N "(cached) $ECHO_C" >&6
16514 else
16515   cat >conftest.$ac_ext <<_ACEOF
16516 #line 16516 "configure"
16517 #include "confdefs.h"
16518 #include <$ac_header>
16519 _ACEOF
16520 if { (eval echo "$as_me:16520: \"$ac_cpp conftest.$ac_ext\"") >&5
16521   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16522   ac_status=$?
16523   egrep -v '^ *\+' conftest.er1 >conftest.err
16524   rm -f conftest.er1
16525   cat conftest.err >&5
16526   echo "$as_me:16526: \$? = $ac_status" >&5
16527   (exit $ac_status); } >/dev/null; then
16528   if test -s conftest.err; then
16529     ac_cpp_err=$ac_c_preproc_warn_flag
16530   else
16531     ac_cpp_err=
16532   fi
16533 else
16534   ac_cpp_err=yes
16535 fi
16536 if test -z "$ac_cpp_err"; then
16537   eval "$as_ac_Header=yes"
16538 else
16539   echo "$as_me: failed program was:" >&5
16540   cat conftest.$ac_ext >&5
16541   eval "$as_ac_Header=no"
16542 fi
16543 rm -f conftest.err conftest.$ac_ext
16544 fi
16545 echo "$as_me:16545: result: `eval echo '${'$as_ac_Header'}'`" >&5
16546 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16547 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16548   cat >>confdefs.h <<EOF
16549 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16550 EOF
16551
16552 fi
16553 done
16554
16555 if test "$ISC" = yes ; then
16556
16557 for ac_header in sys/termio.h
16558 do
16559 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16560 echo "$as_me:16560: checking for $ac_header" >&5
16561 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16562 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16563   echo $ECHO_N "(cached) $ECHO_C" >&6
16564 else
16565   cat >conftest.$ac_ext <<_ACEOF
16566 #line 16566 "configure"
16567 #include "confdefs.h"
16568 #include <$ac_header>
16569 _ACEOF
16570 if { (eval echo "$as_me:16570: \"$ac_cpp conftest.$ac_ext\"") >&5
16571   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16572   ac_status=$?
16573   egrep -v '^ *\+' conftest.er1 >conftest.err
16574   rm -f conftest.er1
16575   cat conftest.err >&5
16576   echo "$as_me:16576: \$? = $ac_status" >&5
16577   (exit $ac_status); } >/dev/null; then
16578   if test -s conftest.err; then
16579     ac_cpp_err=$ac_c_preproc_warn_flag
16580   else
16581     ac_cpp_err=
16582   fi
16583 else
16584   ac_cpp_err=yes
16585 fi
16586 if test -z "$ac_cpp_err"; then
16587   eval "$as_ac_Header=yes"
16588 else
16589   echo "$as_me: failed program was:" >&5
16590   cat conftest.$ac_ext >&5
16591   eval "$as_ac_Header=no"
16592 fi
16593 rm -f conftest.err conftest.$ac_ext
16594 fi
16595 echo "$as_me:16595: result: `eval echo '${'$as_ac_Header'}'`" >&5
16596 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16597 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16598   cat >>confdefs.h <<EOF
16599 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16600 EOF
16601
16602 fi
16603 done
16604
16605 fi
16606 if test "$ac_cv_header_termios_h" = yes ; then
16607         case "$CFLAGS $CPPFLAGS" in
16608         *-D_POSIX_SOURCE*)
16609                 termios_bad=dunno ;;
16610         *)      termios_bad=maybe ;;
16611         esac
16612         if test "$termios_bad" = maybe ; then
16613         echo "$as_me:16613: checking whether termios.h needs _POSIX_SOURCE" >&5
16614 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16615         cat >conftest.$ac_ext <<_ACEOF
16616 #line 16616 "configure"
16617 #include "confdefs.h"
16618 #include <termios.h>
16619 int
16620 main ()
16621 {
16622 struct termios foo; int x = foo.c_iflag
16623   ;
16624   return 0;
16625 }
16626 _ACEOF
16627 rm -f conftest.$ac_objext
16628 if { (eval echo "$as_me:16628: \"$ac_compile\"") >&5
16629   (eval $ac_compile) 2>&5
16630   ac_status=$?
16631   echo "$as_me:16631: \$? = $ac_status" >&5
16632   (exit $ac_status); } &&
16633          { ac_try='test -s conftest.$ac_objext'
16634   { (eval echo "$as_me:16634: \"$ac_try\"") >&5
16635   (eval $ac_try) 2>&5
16636   ac_status=$?
16637   echo "$as_me:16637: \$? = $ac_status" >&5
16638   (exit $ac_status); }; }; then
16639   termios_bad=no
16640 else
16641   echo "$as_me: failed program was:" >&5
16642 cat conftest.$ac_ext >&5
16643
16644                 cat >conftest.$ac_ext <<_ACEOF
16645 #line 16645 "configure"
16646 #include "confdefs.h"
16647
16648 #define _POSIX_SOURCE
16649 #include <termios.h>
16650 int
16651 main ()
16652 {
16653 struct termios foo; int x = foo.c_iflag
16654   ;
16655   return 0;
16656 }
16657 _ACEOF
16658 rm -f conftest.$ac_objext
16659 if { (eval echo "$as_me:16659: \"$ac_compile\"") >&5
16660   (eval $ac_compile) 2>&5
16661   ac_status=$?
16662   echo "$as_me:16662: \$? = $ac_status" >&5
16663   (exit $ac_status); } &&
16664          { ac_try='test -s conftest.$ac_objext'
16665   { (eval echo "$as_me:16665: \"$ac_try\"") >&5
16666   (eval $ac_try) 2>&5
16667   ac_status=$?
16668   echo "$as_me:16668: \$? = $ac_status" >&5
16669   (exit $ac_status); }; }; then
16670   termios_bad=unknown
16671 else
16672   echo "$as_me: failed program was:" >&5
16673 cat conftest.$ac_ext >&5
16674 termios_bad=yes
16675 cat >>confdefs.h <<\EOF
16676 #define _POSIX_SOURCE 1
16677 EOF
16678
16679 fi
16680 rm -f conftest.$ac_objext conftest.$ac_ext
16681
16682 fi
16683 rm -f conftest.$ac_objext conftest.$ac_ext
16684         echo "$as_me:16684: result: $termios_bad" >&5
16685 echo "${ECHO_T}$termios_bad" >&6
16686         fi
16687 fi
16688
16689 echo "$as_me:16689: checking for tcgetattr" >&5
16690 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16691 if test "${cf_cv_have_tcgetattr+set}" = set; then
16692   echo $ECHO_N "(cached) $ECHO_C" >&6
16693 else
16694
16695 cat >conftest.$ac_ext <<_ACEOF
16696 #line 16696 "configure"
16697 #include "confdefs.h"
16698
16699 #include <sys/types.h>
16700 #ifdef HAVE_UNISTD_H
16701 #include <unistd.h>
16702 #endif
16703 #ifdef HAVE_TERMIOS_H
16704 #include <termios.h>
16705 #define TTY struct termios
16706 #else
16707 #ifdef HAVE_TERMIO_H
16708 #include <termio.h>
16709 #define TTY struct termio
16710 #endif
16711 #endif
16712
16713 int
16714 main ()
16715 {
16716
16717 TTY foo;
16718 tcgetattr(1, &foo);
16719   ;
16720   return 0;
16721 }
16722 _ACEOF
16723 rm -f conftest.$ac_objext conftest$ac_exeext
16724 if { (eval echo "$as_me:16724: \"$ac_link\"") >&5
16725   (eval $ac_link) 2>&5
16726   ac_status=$?
16727   echo "$as_me:16727: \$? = $ac_status" >&5
16728   (exit $ac_status); } &&
16729          { ac_try='test -s conftest$ac_exeext'
16730   { (eval echo "$as_me:16730: \"$ac_try\"") >&5
16731   (eval $ac_try) 2>&5
16732   ac_status=$?
16733   echo "$as_me:16733: \$? = $ac_status" >&5
16734   (exit $ac_status); }; }; then
16735   cf_cv_have_tcgetattr=yes
16736 else
16737   echo "$as_me: failed program was:" >&5
16738 cat conftest.$ac_ext >&5
16739 cf_cv_have_tcgetattr=no
16740 fi
16741 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16742 fi
16743 echo "$as_me:16743: result: $cf_cv_have_tcgetattr" >&5
16744 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16745 test "$cf_cv_have_tcgetattr" = yes &&
16746 cat >>confdefs.h <<\EOF
16747 #define HAVE_TCGETATTR 1
16748 EOF
16749
16750 echo "$as_me:16750: checking for vsscanf function or workaround" >&5
16751 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16752 if test "${cf_cv_func_vsscanf+set}" = set; then
16753   echo $ECHO_N "(cached) $ECHO_C" >&6
16754 else
16755
16756 cat >conftest.$ac_ext <<_ACEOF
16757 #line 16757 "configure"
16758 #include "confdefs.h"
16759
16760 #include <stdarg.h>
16761 #include <stdio.h>
16762 int
16763 main ()
16764 {
16765
16766         va_list ap;
16767         vsscanf("from", "%d", ap)
16768   ;
16769   return 0;
16770 }
16771 _ACEOF
16772 rm -f conftest.$ac_objext conftest$ac_exeext
16773 if { (eval echo "$as_me:16773: \"$ac_link\"") >&5
16774   (eval $ac_link) 2>&5
16775   ac_status=$?
16776   echo "$as_me:16776: \$? = $ac_status" >&5
16777   (exit $ac_status); } &&
16778          { ac_try='test -s conftest$ac_exeext'
16779   { (eval echo "$as_me:16779: \"$ac_try\"") >&5
16780   (eval $ac_try) 2>&5
16781   ac_status=$?
16782   echo "$as_me:16782: \$? = $ac_status" >&5
16783   (exit $ac_status); }; }; then
16784   cf_cv_func_vsscanf=vsscanf
16785 else
16786   echo "$as_me: failed program was:" >&5
16787 cat conftest.$ac_ext >&5
16788
16789 cat >conftest.$ac_ext <<_ACEOF
16790 #line 16790 "configure"
16791 #include "confdefs.h"
16792
16793 #include <stdarg.h>
16794 #include <stdio.h>
16795 int
16796 main ()
16797 {
16798
16799     FILE strbuf;
16800     char *str = "from";
16801
16802     strbuf._flag = _IOREAD;
16803     strbuf._ptr = strbuf._base = (unsigned char *) str;
16804     strbuf._cnt = strlen(str);
16805     strbuf._file = _NFILE;
16806     return (vfscanf(&strbuf, "%d", ap))
16807   ;
16808   return 0;
16809 }
16810 _ACEOF
16811 rm -f conftest.$ac_objext conftest$ac_exeext
16812 if { (eval echo "$as_me:16812: \"$ac_link\"") >&5
16813   (eval $ac_link) 2>&5
16814   ac_status=$?
16815   echo "$as_me:16815: \$? = $ac_status" >&5
16816   (exit $ac_status); } &&
16817          { ac_try='test -s conftest$ac_exeext'
16818   { (eval echo "$as_me:16818: \"$ac_try\"") >&5
16819   (eval $ac_try) 2>&5
16820   ac_status=$?
16821   echo "$as_me:16821: \$? = $ac_status" >&5
16822   (exit $ac_status); }; }; then
16823   cf_cv_func_vsscanf=vfscanf
16824 else
16825   echo "$as_me: failed program was:" >&5
16826 cat conftest.$ac_ext >&5
16827
16828 cat >conftest.$ac_ext <<_ACEOF
16829 #line 16829 "configure"
16830 #include "confdefs.h"
16831
16832 #include <stdarg.h>
16833 #include <stdio.h>
16834 int
16835 main ()
16836 {
16837
16838     FILE strbuf;
16839     char *str = "from";
16840
16841     strbuf._flag = _IOREAD;
16842     strbuf._ptr = strbuf._base = (unsigned char *) str;
16843     strbuf._cnt = strlen(str);
16844     strbuf._file = _NFILE;
16845     return (_doscan(&strbuf, "%d", ap))
16846   ;
16847   return 0;
16848 }
16849 _ACEOF
16850 rm -f conftest.$ac_objext conftest$ac_exeext
16851 if { (eval echo "$as_me:16851: \"$ac_link\"") >&5
16852   (eval $ac_link) 2>&5
16853   ac_status=$?
16854   echo "$as_me:16854: \$? = $ac_status" >&5
16855   (exit $ac_status); } &&
16856          { ac_try='test -s conftest$ac_exeext'
16857   { (eval echo "$as_me:16857: \"$ac_try\"") >&5
16858   (eval $ac_try) 2>&5
16859   ac_status=$?
16860   echo "$as_me:16860: \$? = $ac_status" >&5
16861   (exit $ac_status); }; }; then
16862   cf_cv_func_vsscanf=_doscan
16863 else
16864   echo "$as_me: failed program was:" >&5
16865 cat conftest.$ac_ext >&5
16866
16867 cf_cv_func_vsscanf=no
16868 fi
16869 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16870 fi
16871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16872 fi
16873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16874 fi
16875 echo "$as_me:16875: result: $cf_cv_func_vsscanf" >&5
16876 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16877
16878 case $cf_cv_func_vsscanf in #(vi
16879 vsscanf)
16880 cat >>confdefs.h <<\EOF
16881 #define HAVE_VSSCANF 1
16882 EOF
16883 ;; #(vi
16884 vfscanf)
16885 cat >>confdefs.h <<\EOF
16886 #define HAVE_VFSCANF 1
16887 EOF
16888 ;; #(vi
16889 _doscan)
16890 cat >>confdefs.h <<\EOF
16891 #define HAVE__DOSCAN 1
16892 EOF
16893 ;;
16894 esac
16895
16896 echo "$as_me:16896: checking for working mkstemp" >&5
16897 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16898 if test "${cf_cv_func_mkstemp+set}" = set; then
16899   echo $ECHO_N "(cached) $ECHO_C" >&6
16900 else
16901
16902 rm -rf conftest*
16903 if test "$cross_compiling" = yes; then
16904   cf_cv_func_mkstemp=maybe
16905 else
16906   cat >conftest.$ac_ext <<_ACEOF
16907 #line 16907 "configure"
16908 #include "confdefs.h"
16909
16910 #include <sys/types.h>
16911 #include <stdlib.h>
16912 #include <stdio.h>
16913 #include <string.h>
16914 #include <sys/stat.h>
16915 int main()
16916 {
16917         char *tmpl = "conftestXXXXXX";
16918         char name[2][80];
16919         int n;
16920         int result = 0;
16921         int fd;
16922         struct stat sb;
16923
16924         umask(077);
16925         for (n = 0; n < 2; ++n) {
16926                 strcpy(name[n], tmpl);
16927                 if ((fd = mkstemp(name[n])) >= 0) {
16928                         if (!strcmp(name[n], tmpl)
16929                          || stat(name[n], &sb) != 0
16930                          || (sb.st_mode & S_IFMT) != S_IFREG
16931                          || (sb.st_mode & 077) != 0) {
16932                                 result = 1;
16933                         }
16934                         close(fd);
16935                 }
16936         }
16937         if (result == 0
16938          && !strcmp(name[0], name[1]))
16939                 result = 1;
16940         ${cf_cv_main_return:-return}(result);
16941 }
16942
16943 _ACEOF
16944 rm -f conftest$ac_exeext
16945 if { (eval echo "$as_me:16945: \"$ac_link\"") >&5
16946   (eval $ac_link) 2>&5
16947   ac_status=$?
16948   echo "$as_me:16948: \$? = $ac_status" >&5
16949   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16950   { (eval echo "$as_me:16950: \"$ac_try\"") >&5
16951   (eval $ac_try) 2>&5
16952   ac_status=$?
16953   echo "$as_me:16953: \$? = $ac_status" >&5
16954   (exit $ac_status); }; }; then
16955   cf_cv_func_mkstemp=yes
16956
16957 else
16958   echo "$as_me: program exited with status $ac_status" >&5
16959 echo "$as_me: failed program was:" >&5
16960 cat conftest.$ac_ext >&5
16961 cf_cv_func_mkstemp=no
16962
16963 fi
16964 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16965 fi
16966
16967 fi
16968 echo "$as_me:16968: result: $cf_cv_func_mkstemp" >&5
16969 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16970 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16971         echo "$as_me:16971: checking for mkstemp" >&5
16972 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16973 if test "${ac_cv_func_mkstemp+set}" = set; then
16974   echo $ECHO_N "(cached) $ECHO_C" >&6
16975 else
16976   cat >conftest.$ac_ext <<_ACEOF
16977 #line 16977 "configure"
16978 #include "confdefs.h"
16979 /* System header to define __stub macros and hopefully few prototypes,
16980     which can conflict with char mkstemp (); below.  */
16981 #include <assert.h>
16982 /* Override any gcc2 internal prototype to avoid an error.  */
16983 #ifdef __cplusplus
16984 extern "C"
16985 #endif
16986 /* We use char because int might match the return type of a gcc2
16987    builtin and then its argument prototype would still apply.  */
16988 char mkstemp ();
16989 char (*f) ();
16990
16991 int
16992 main ()
16993 {
16994 /* The GNU C library defines this for functions which it implements
16995     to always fail with ENOSYS.  Some functions are actually named
16996     something starting with __ and the normal name is an alias.  */
16997 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16998 choke me
16999 #else
17000 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17001 #endif
17002
17003   ;
17004   return 0;
17005 }
17006 _ACEOF
17007 rm -f conftest.$ac_objext conftest$ac_exeext
17008 if { (eval echo "$as_me:17008: \"$ac_link\"") >&5
17009   (eval $ac_link) 2>&5
17010   ac_status=$?
17011   echo "$as_me:17011: \$? = $ac_status" >&5
17012   (exit $ac_status); } &&
17013          { ac_try='test -s conftest$ac_exeext'
17014   { (eval echo "$as_me:17014: \"$ac_try\"") >&5
17015   (eval $ac_try) 2>&5
17016   ac_status=$?
17017   echo "$as_me:17017: \$? = $ac_status" >&5
17018   (exit $ac_status); }; }; then
17019   ac_cv_func_mkstemp=yes
17020 else
17021   echo "$as_me: failed program was:" >&5
17022 cat conftest.$ac_ext >&5
17023 ac_cv_func_mkstemp=no
17024 fi
17025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17026 fi
17027 echo "$as_me:17027: result: $ac_cv_func_mkstemp" >&5
17028 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17029
17030 fi
17031 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17032
17033 cat >>confdefs.h <<\EOF
17034 #define HAVE_MKSTEMP 1
17035 EOF
17036
17037 fi
17038
17039 # setup for prototype of fallback for vsscanf()
17040
17041 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17042         HAVE_VSSCANF=1
17043 else
17044         HAVE_VSSCANF=0
17045 fi
17046
17047 if test "x$cross_compiling" = xyes ; then
17048         { echo "$as_me:17048: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17049 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17050 else
17051         echo "$as_me:17051: checking whether setvbuf arguments are reversed" >&5
17052 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17053 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17054   echo $ECHO_N "(cached) $ECHO_C" >&6
17055 else
17056   if test "$cross_compiling" = yes; then
17057   { { echo "$as_me:17057: error: cannot run test program while cross compiling" >&5
17058 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17059    { (exit 1); exit 1; }; }
17060 else
17061   cat >conftest.$ac_ext <<_ACEOF
17062 #line 17062 "configure"
17063 #include "confdefs.h"
17064 #include <stdio.h>
17065 /* If setvbuf has the reversed format, exit 0. */
17066 int
17067 main ()
17068 {
17069   /* This call has the arguments reversed.
17070      A reversed system may check and see that the address of main
17071      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17072   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17073     $ac_main_return(1);
17074   putc('\r', stdout);
17075   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17076 }
17077 _ACEOF
17078 rm -f conftest$ac_exeext
17079 if { (eval echo "$as_me:17079: \"$ac_link\"") >&5
17080   (eval $ac_link) 2>&5
17081   ac_status=$?
17082   echo "$as_me:17082: \$? = $ac_status" >&5
17083   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17084   { (eval echo "$as_me:17084: \"$ac_try\"") >&5
17085   (eval $ac_try) 2>&5
17086   ac_status=$?
17087   echo "$as_me:17087: \$? = $ac_status" >&5
17088   (exit $ac_status); }; }; then
17089   ac_cv_func_setvbuf_reversed=yes
17090 else
17091   echo "$as_me: program exited with status $ac_status" >&5
17092 echo "$as_me: failed program was:" >&5
17093 cat conftest.$ac_ext >&5
17094 ac_cv_func_setvbuf_reversed=no
17095 fi
17096 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17097 fi
17098 rm -f core core.* *.core
17099 fi
17100 echo "$as_me:17100: result: $ac_cv_func_setvbuf_reversed" >&5
17101 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17102 if test $ac_cv_func_setvbuf_reversed = yes; then
17103
17104 cat >>confdefs.h <<\EOF
17105 #define SETVBUF_REVERSED 1
17106 EOF
17107
17108 fi
17109
17110 fi
17111 echo "$as_me:17111: checking for intptr_t" >&5
17112 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17113 if test "${ac_cv_type_intptr_t+set}" = set; then
17114   echo $ECHO_N "(cached) $ECHO_C" >&6
17115 else
17116   cat >conftest.$ac_ext <<_ACEOF
17117 #line 17117 "configure"
17118 #include "confdefs.h"
17119 $ac_includes_default
17120 int
17121 main ()
17122 {
17123 if ((intptr_t *) 0)
17124   return 0;
17125 if (sizeof (intptr_t))
17126   return 0;
17127   ;
17128   return 0;
17129 }
17130 _ACEOF
17131 rm -f conftest.$ac_objext
17132 if { (eval echo "$as_me:17132: \"$ac_compile\"") >&5
17133   (eval $ac_compile) 2>&5
17134   ac_status=$?
17135   echo "$as_me:17135: \$? = $ac_status" >&5
17136   (exit $ac_status); } &&
17137          { ac_try='test -s conftest.$ac_objext'
17138   { (eval echo "$as_me:17138: \"$ac_try\"") >&5
17139   (eval $ac_try) 2>&5
17140   ac_status=$?
17141   echo "$as_me:17141: \$? = $ac_status" >&5
17142   (exit $ac_status); }; }; then
17143   ac_cv_type_intptr_t=yes
17144 else
17145   echo "$as_me: failed program was:" >&5
17146 cat conftest.$ac_ext >&5
17147 ac_cv_type_intptr_t=no
17148 fi
17149 rm -f conftest.$ac_objext conftest.$ac_ext
17150 fi
17151 echo "$as_me:17151: result: $ac_cv_type_intptr_t" >&5
17152 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17153 if test $ac_cv_type_intptr_t = yes; then
17154   :
17155 else
17156
17157 cat >>confdefs.h <<EOF
17158 #define intptr_t long
17159 EOF
17160
17161 fi
17162
17163 echo "$as_me:17163: checking for type sigaction_t" >&5
17164 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17165 if test "${cf_cv_type_sigaction+set}" = set; then
17166   echo $ECHO_N "(cached) $ECHO_C" >&6
17167 else
17168
17169         cat >conftest.$ac_ext <<_ACEOF
17170 #line 17170 "configure"
17171 #include "confdefs.h"
17172
17173 #include <signal.h>
17174 int
17175 main ()
17176 {
17177 sigaction_t x
17178   ;
17179   return 0;
17180 }
17181 _ACEOF
17182 rm -f conftest.$ac_objext
17183 if { (eval echo "$as_me:17183: \"$ac_compile\"") >&5
17184   (eval $ac_compile) 2>&5
17185   ac_status=$?
17186   echo "$as_me:17186: \$? = $ac_status" >&5
17187   (exit $ac_status); } &&
17188          { ac_try='test -s conftest.$ac_objext'
17189   { (eval echo "$as_me:17189: \"$ac_try\"") >&5
17190   (eval $ac_try) 2>&5
17191   ac_status=$?
17192   echo "$as_me:17192: \$? = $ac_status" >&5
17193   (exit $ac_status); }; }; then
17194   cf_cv_type_sigaction=yes
17195 else
17196   echo "$as_me: failed program was:" >&5
17197 cat conftest.$ac_ext >&5
17198 cf_cv_type_sigaction=no
17199 fi
17200 rm -f conftest.$ac_objext conftest.$ac_ext
17201 fi
17202
17203 echo "$as_me:17203: result: $cf_cv_type_sigaction" >&5
17204 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17205 test "$cf_cv_type_sigaction" = yes &&
17206 cat >>confdefs.h <<\EOF
17207 #define HAVE_TYPE_SIGACTION 1
17208 EOF
17209
17210 echo "$as_me:17210: checking declaration of size-change" >&5
17211 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17212 if test "${cf_cv_sizechange+set}" = set; then
17213   echo $ECHO_N "(cached) $ECHO_C" >&6
17214 else
17215
17216     cf_cv_sizechange=unknown
17217     cf_save_CPPFLAGS="$CPPFLAGS"
17218
17219 for cf_opts in "" "NEED_PTEM_H"
17220 do
17221
17222     CPPFLAGS="$cf_save_CPPFLAGS"
17223     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17224     cat >conftest.$ac_ext <<_ACEOF
17225 #line 17225 "configure"
17226 #include "confdefs.h"
17227 #include <sys/types.h>
17228 #ifdef HAVE_TERMIOS_H
17229 #include <termios.h>
17230 #else
17231 #ifdef HAVE_TERMIO_H
17232 #include <termio.h>
17233 #endif
17234 #endif
17235 #ifdef NEED_PTEM_H
17236 /* This is a workaround for SCO:  they neglected to define struct winsize in
17237  * termios.h -- it's only in termio.h and ptem.h
17238  */
17239 #include        <sys/stream.h>
17240 #include        <sys/ptem.h>
17241 #endif
17242 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17243 #include <sys/ioctl.h>
17244 #endif
17245
17246 int
17247 main ()
17248 {
17249
17250 #ifdef TIOCGSIZE
17251         struct ttysize win;     /* FIXME: what system is this? */
17252         int y = win.ts_lines;
17253         int x = win.ts_cols;
17254 #else
17255 #ifdef TIOCGWINSZ
17256         struct winsize win;
17257         int y = win.ws_row;
17258         int x = win.ws_col;
17259 #else
17260         no TIOCGSIZE or TIOCGWINSZ
17261 #endif /* TIOCGWINSZ */
17262 #endif /* TIOCGSIZE */
17263
17264   ;
17265   return 0;
17266 }
17267 _ACEOF
17268 rm -f conftest.$ac_objext
17269 if { (eval echo "$as_me:17269: \"$ac_compile\"") >&5
17270   (eval $ac_compile) 2>&5
17271   ac_status=$?
17272   echo "$as_me:17272: \$? = $ac_status" >&5
17273   (exit $ac_status); } &&
17274          { ac_try='test -s conftest.$ac_objext'
17275   { (eval echo "$as_me:17275: \"$ac_try\"") >&5
17276   (eval $ac_try) 2>&5
17277   ac_status=$?
17278   echo "$as_me:17278: \$? = $ac_status" >&5
17279   (exit $ac_status); }; }; then
17280   cf_cv_sizechange=yes
17281 else
17282   echo "$as_me: failed program was:" >&5
17283 cat conftest.$ac_ext >&5
17284 cf_cv_sizechange=no
17285 fi
17286 rm -f conftest.$ac_objext conftest.$ac_ext
17287
17288         CPPFLAGS="$cf_save_CPPFLAGS"
17289         if test "$cf_cv_sizechange" = yes ; then
17290                 echo "size-change succeeded ($cf_opts)" >&5
17291                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17292                 break
17293         fi
17294 done
17295
17296 fi
17297 echo "$as_me:17297: result: $cf_cv_sizechange" >&5
17298 echo "${ECHO_T}$cf_cv_sizechange" >&6
17299 if test "$cf_cv_sizechange" != no ; then
17300
17301 cat >>confdefs.h <<\EOF
17302 #define HAVE_SIZECHANGE 1
17303 EOF
17304
17305         case $cf_cv_sizechange in #(vi
17306         NEED*)
17307                 cat >>confdefs.h <<EOF
17308 #define $cf_cv_sizechange  1
17309 EOF
17310
17311                 ;;
17312         esac
17313 fi
17314
17315 echo "$as_me:17315: checking for memmove" >&5
17316 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17317 if test "${ac_cv_func_memmove+set}" = set; then
17318   echo $ECHO_N "(cached) $ECHO_C" >&6
17319 else
17320   cat >conftest.$ac_ext <<_ACEOF
17321 #line 17321 "configure"
17322 #include "confdefs.h"
17323 /* System header to define __stub macros and hopefully few prototypes,
17324     which can conflict with char memmove (); below.  */
17325 #include <assert.h>
17326 /* Override any gcc2 internal prototype to avoid an error.  */
17327 #ifdef __cplusplus
17328 extern "C"
17329 #endif
17330 /* We use char because int might match the return type of a gcc2
17331    builtin and then its argument prototype would still apply.  */
17332 char memmove ();
17333 char (*f) ();
17334
17335 int
17336 main ()
17337 {
17338 /* The GNU C library defines this for functions which it implements
17339     to always fail with ENOSYS.  Some functions are actually named
17340     something starting with __ and the normal name is an alias.  */
17341 #if defined (__stub_memmove) || defined (__stub___memmove)
17342 choke me
17343 #else
17344 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17345 #endif
17346
17347   ;
17348   return 0;
17349 }
17350 _ACEOF
17351 rm -f conftest.$ac_objext conftest$ac_exeext
17352 if { (eval echo "$as_me:17352: \"$ac_link\"") >&5
17353   (eval $ac_link) 2>&5
17354   ac_status=$?
17355   echo "$as_me:17355: \$? = $ac_status" >&5
17356   (exit $ac_status); } &&
17357          { ac_try='test -s conftest$ac_exeext'
17358   { (eval echo "$as_me:17358: \"$ac_try\"") >&5
17359   (eval $ac_try) 2>&5
17360   ac_status=$?
17361   echo "$as_me:17361: \$? = $ac_status" >&5
17362   (exit $ac_status); }; }; then
17363   ac_cv_func_memmove=yes
17364 else
17365   echo "$as_me: failed program was:" >&5
17366 cat conftest.$ac_ext >&5
17367 ac_cv_func_memmove=no
17368 fi
17369 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17370 fi
17371 echo "$as_me:17371: result: $ac_cv_func_memmove" >&5
17372 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17373 if test $ac_cv_func_memmove = yes; then
17374   :
17375 else
17376
17377 echo "$as_me:17377: checking for bcopy" >&5
17378 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17379 if test "${ac_cv_func_bcopy+set}" = set; then
17380   echo $ECHO_N "(cached) $ECHO_C" >&6
17381 else
17382   cat >conftest.$ac_ext <<_ACEOF
17383 #line 17383 "configure"
17384 #include "confdefs.h"
17385 /* System header to define __stub macros and hopefully few prototypes,
17386     which can conflict with char bcopy (); below.  */
17387 #include <assert.h>
17388 /* Override any gcc2 internal prototype to avoid an error.  */
17389 #ifdef __cplusplus
17390 extern "C"
17391 #endif
17392 /* We use char because int might match the return type of a gcc2
17393    builtin and then its argument prototype would still apply.  */
17394 char bcopy ();
17395 char (*f) ();
17396
17397 int
17398 main ()
17399 {
17400 /* The GNU C library defines this for functions which it implements
17401     to always fail with ENOSYS.  Some functions are actually named
17402     something starting with __ and the normal name is an alias.  */
17403 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17404 choke me
17405 #else
17406 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17407 #endif
17408
17409   ;
17410   return 0;
17411 }
17412 _ACEOF
17413 rm -f conftest.$ac_objext conftest$ac_exeext
17414 if { (eval echo "$as_me:17414: \"$ac_link\"") >&5
17415   (eval $ac_link) 2>&5
17416   ac_status=$?
17417   echo "$as_me:17417: \$? = $ac_status" >&5
17418   (exit $ac_status); } &&
17419          { ac_try='test -s conftest$ac_exeext'
17420   { (eval echo "$as_me:17420: \"$ac_try\"") >&5
17421   (eval $ac_try) 2>&5
17422   ac_status=$?
17423   echo "$as_me:17423: \$? = $ac_status" >&5
17424   (exit $ac_status); }; }; then
17425   ac_cv_func_bcopy=yes
17426 else
17427   echo "$as_me: failed program was:" >&5
17428 cat conftest.$ac_ext >&5
17429 ac_cv_func_bcopy=no
17430 fi
17431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17432 fi
17433 echo "$as_me:17433: result: $ac_cv_func_bcopy" >&5
17434 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17435 if test $ac_cv_func_bcopy = yes; then
17436
17437         echo "$as_me:17437: checking if bcopy does overlapping moves" >&5
17438 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17439 if test "${cf_cv_good_bcopy+set}" = set; then
17440   echo $ECHO_N "(cached) $ECHO_C" >&6
17441 else
17442
17443                 if test "$cross_compiling" = yes; then
17444   cf_cv_good_bcopy=unknown
17445 else
17446   cat >conftest.$ac_ext <<_ACEOF
17447 #line 17447 "configure"
17448 #include "confdefs.h"
17449
17450 int main() {
17451         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17452         char temp[40];
17453         bcopy(data, temp, sizeof(data));
17454         bcopy(temp+10, temp, 15);
17455         bcopy(temp+5, temp+15, 10);
17456         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17457 }
17458
17459 _ACEOF
17460 rm -f conftest$ac_exeext
17461 if { (eval echo "$as_me:17461: \"$ac_link\"") >&5
17462   (eval $ac_link) 2>&5
17463   ac_status=$?
17464   echo "$as_me:17464: \$? = $ac_status" >&5
17465   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17466   { (eval echo "$as_me:17466: \"$ac_try\"") >&5
17467   (eval $ac_try) 2>&5
17468   ac_status=$?
17469   echo "$as_me:17469: \$? = $ac_status" >&5
17470   (exit $ac_status); }; }; then
17471   cf_cv_good_bcopy=yes
17472 else
17473   echo "$as_me: program exited with status $ac_status" >&5
17474 echo "$as_me: failed program was:" >&5
17475 cat conftest.$ac_ext >&5
17476 cf_cv_good_bcopy=no
17477 fi
17478 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17479 fi
17480
17481 fi
17482 echo "$as_me:17482: result: $cf_cv_good_bcopy" >&5
17483 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17484
17485 else
17486   cf_cv_good_bcopy=no
17487 fi
17488
17489         if test "$cf_cv_good_bcopy" = yes ; then
17490
17491 cat >>confdefs.h <<\EOF
17492 #define USE_OK_BCOPY 1
17493 EOF
17494
17495         else
17496
17497 cat >>confdefs.h <<\EOF
17498 #define USE_MY_MEMMOVE 1
17499 EOF
17500
17501         fi
17502
17503 fi
17504
17505 echo "$as_me:17505: checking if poll really works" >&5
17506 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17507 if test "${cf_cv_working_poll+set}" = set; then
17508   echo $ECHO_N "(cached) $ECHO_C" >&6
17509 else
17510
17511 if test "$cross_compiling" = yes; then
17512   cf_cv_working_poll=unknown
17513 else
17514   cat >conftest.$ac_ext <<_ACEOF
17515 #line 17515 "configure"
17516 #include "confdefs.h"
17517
17518 #include <stdlib.h>
17519 #include <stdio.h>
17520 #include <unistd.h>
17521 #include <fcntl.h>
17522 #ifdef HAVE_POLL_H
17523 #include <poll.h>
17524 #else
17525 #include <sys/poll.h>
17526 #endif
17527 int main() {
17528         struct pollfd myfds;
17529         int ret;
17530
17531         /* check for Darwin bug with respect to "devices" */
17532         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17533         if (myfds.fd < 0)
17534                 myfds.fd = 0;
17535         myfds.events = POLLIN;
17536         myfds.revents = 0;
17537
17538         ret = poll(&myfds, 1, 100);
17539
17540         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17541                 ret = -1;
17542         } else {
17543                 int fd = 0;
17544                 if (!isatty(fd)) {
17545                         fd = open("/dev/tty", 2);       /* O_RDWR */
17546                 }
17547
17548                 if (fd >= 0) {
17549                         /* also check with standard input */
17550                         myfds.fd = fd;
17551                         myfds.events = POLLIN;
17552                         myfds.revents = 0;
17553                         ret = poll(&myfds, 1, 100);
17554                 } else {
17555                         ret = -1;
17556                 }
17557         }
17558         ${cf_cv_main_return:-return}(ret < 0);
17559 }
17560 _ACEOF
17561 rm -f conftest$ac_exeext
17562 if { (eval echo "$as_me:17562: \"$ac_link\"") >&5
17563   (eval $ac_link) 2>&5
17564   ac_status=$?
17565   echo "$as_me:17565: \$? = $ac_status" >&5
17566   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17567   { (eval echo "$as_me:17567: \"$ac_try\"") >&5
17568   (eval $ac_try) 2>&5
17569   ac_status=$?
17570   echo "$as_me:17570: \$? = $ac_status" >&5
17571   (exit $ac_status); }; }; then
17572   cf_cv_working_poll=yes
17573 else
17574   echo "$as_me: program exited with status $ac_status" >&5
17575 echo "$as_me: failed program was:" >&5
17576 cat conftest.$ac_ext >&5
17577 cf_cv_working_poll=no
17578 fi
17579 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17580 fi
17581 fi
17582 echo "$as_me:17582: result: $cf_cv_working_poll" >&5
17583 echo "${ECHO_T}$cf_cv_working_poll" >&6
17584 test "$cf_cv_working_poll" = "yes" &&
17585 cat >>confdefs.h <<\EOF
17586 #define HAVE_WORKING_POLL 1
17587 EOF
17588
17589 echo "$as_me:17589: checking for va_copy" >&5
17590 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17591 if test "${cf_cv_have_va_copy+set}" = set; then
17592   echo $ECHO_N "(cached) $ECHO_C" >&6
17593 else
17594
17595 cat >conftest.$ac_ext <<_ACEOF
17596 #line 17596 "configure"
17597 #include "confdefs.h"
17598
17599 #include <stdarg.h>
17600
17601 int
17602 main ()
17603 {
17604
17605         static va_list dst;
17606         static va_list src;
17607         va_copy(dst, src)
17608   ;
17609   return 0;
17610 }
17611 _ACEOF
17612 rm -f conftest.$ac_objext conftest$ac_exeext
17613 if { (eval echo "$as_me:17613: \"$ac_link\"") >&5
17614   (eval $ac_link) 2>&5
17615   ac_status=$?
17616   echo "$as_me:17616: \$? = $ac_status" >&5
17617   (exit $ac_status); } &&
17618          { ac_try='test -s conftest$ac_exeext'
17619   { (eval echo "$as_me:17619: \"$ac_try\"") >&5
17620   (eval $ac_try) 2>&5
17621   ac_status=$?
17622   echo "$as_me:17622: \$? = $ac_status" >&5
17623   (exit $ac_status); }; }; then
17624   cf_cv_have_va_copy=yes
17625 else
17626   echo "$as_me: failed program was:" >&5
17627 cat conftest.$ac_ext >&5
17628 cf_cv_have_va_copy=no
17629 fi
17630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17631 fi
17632 echo "$as_me:17632: result: $cf_cv_have_va_copy" >&5
17633 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17634
17635 test "$cf_cv_have_va_copy" = yes &&
17636 cat >>confdefs.h <<\EOF
17637 #define HAVE_VA_COPY 1
17638 EOF
17639
17640 echo "$as_me:17640: checking for __va_copy" >&5
17641 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17642 if test "${cf_cv_have___va_copy+set}" = set; then
17643   echo $ECHO_N "(cached) $ECHO_C" >&6
17644 else
17645
17646 cat >conftest.$ac_ext <<_ACEOF
17647 #line 17647 "configure"
17648 #include "confdefs.h"
17649
17650 #include <stdarg.h>
17651
17652 int
17653 main ()
17654 {
17655
17656         static va_list dst;
17657         static va_list src;
17658         __va_copy(dst, src)
17659   ;
17660   return 0;
17661 }
17662 _ACEOF
17663 rm -f conftest.$ac_objext conftest$ac_exeext
17664 if { (eval echo "$as_me:17664: \"$ac_link\"") >&5
17665   (eval $ac_link) 2>&5
17666   ac_status=$?
17667   echo "$as_me:17667: \$? = $ac_status" >&5
17668   (exit $ac_status); } &&
17669          { ac_try='test -s conftest$ac_exeext'
17670   { (eval echo "$as_me:17670: \"$ac_try\"") >&5
17671   (eval $ac_try) 2>&5
17672   ac_status=$?
17673   echo "$as_me:17673: \$? = $ac_status" >&5
17674   (exit $ac_status); }; }; then
17675   cf_cv_have___va_copy=yes
17676 else
17677   echo "$as_me: failed program was:" >&5
17678 cat conftest.$ac_ext >&5
17679 cf_cv_have___va_copy=no
17680 fi
17681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17682 fi
17683 echo "$as_me:17683: result: $cf_cv_have___va_copy" >&5
17684 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17685
17686 test "$cf_cv_have___va_copy" = yes &&
17687 cat >>confdefs.h <<\EOF
17688 #define HAVE___VA_COPY 1
17689 EOF
17690
17691 echo "$as_me:17691: checking for pid_t" >&5
17692 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17693 if test "${ac_cv_type_pid_t+set}" = set; then
17694   echo $ECHO_N "(cached) $ECHO_C" >&6
17695 else
17696   cat >conftest.$ac_ext <<_ACEOF
17697 #line 17697 "configure"
17698 #include "confdefs.h"
17699 $ac_includes_default
17700 int
17701 main ()
17702 {
17703 if ((pid_t *) 0)
17704   return 0;
17705 if (sizeof (pid_t))
17706   return 0;
17707   ;
17708   return 0;
17709 }
17710 _ACEOF
17711 rm -f conftest.$ac_objext
17712 if { (eval echo "$as_me:17712: \"$ac_compile\"") >&5
17713   (eval $ac_compile) 2>&5
17714   ac_status=$?
17715   echo "$as_me:17715: \$? = $ac_status" >&5
17716   (exit $ac_status); } &&
17717          { ac_try='test -s conftest.$ac_objext'
17718   { (eval echo "$as_me:17718: \"$ac_try\"") >&5
17719   (eval $ac_try) 2>&5
17720   ac_status=$?
17721   echo "$as_me:17721: \$? = $ac_status" >&5
17722   (exit $ac_status); }; }; then
17723   ac_cv_type_pid_t=yes
17724 else
17725   echo "$as_me: failed program was:" >&5
17726 cat conftest.$ac_ext >&5
17727 ac_cv_type_pid_t=no
17728 fi
17729 rm -f conftest.$ac_objext conftest.$ac_ext
17730 fi
17731 echo "$as_me:17731: result: $ac_cv_type_pid_t" >&5
17732 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17733 if test $ac_cv_type_pid_t = yes; then
17734   :
17735 else
17736
17737 cat >>confdefs.h <<EOF
17738 #define pid_t int
17739 EOF
17740
17741 fi
17742
17743 for ac_header in unistd.h vfork.h
17744 do
17745 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17746 echo "$as_me:17746: checking for $ac_header" >&5
17747 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17748 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17749   echo $ECHO_N "(cached) $ECHO_C" >&6
17750 else
17751   cat >conftest.$ac_ext <<_ACEOF
17752 #line 17752 "configure"
17753 #include "confdefs.h"
17754 #include <$ac_header>
17755 _ACEOF
17756 if { (eval echo "$as_me:17756: \"$ac_cpp conftest.$ac_ext\"") >&5
17757   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17758   ac_status=$?
17759   egrep -v '^ *\+' conftest.er1 >conftest.err
17760   rm -f conftest.er1
17761   cat conftest.err >&5
17762   echo "$as_me:17762: \$? = $ac_status" >&5
17763   (exit $ac_status); } >/dev/null; then
17764   if test -s conftest.err; then
17765     ac_cpp_err=$ac_c_preproc_warn_flag
17766   else
17767     ac_cpp_err=
17768   fi
17769 else
17770   ac_cpp_err=yes
17771 fi
17772 if test -z "$ac_cpp_err"; then
17773   eval "$as_ac_Header=yes"
17774 else
17775   echo "$as_me: failed program was:" >&5
17776   cat conftest.$ac_ext >&5
17777   eval "$as_ac_Header=no"
17778 fi
17779 rm -f conftest.err conftest.$ac_ext
17780 fi
17781 echo "$as_me:17781: result: `eval echo '${'$as_ac_Header'}'`" >&5
17782 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17783 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17784   cat >>confdefs.h <<EOF
17785 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17786 EOF
17787
17788 fi
17789 done
17790
17791 for ac_func in fork vfork
17792 do
17793 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17794 echo "$as_me:17794: checking for $ac_func" >&5
17795 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17796 if eval "test \"\${$as_ac_var+set}\" = set"; then
17797   echo $ECHO_N "(cached) $ECHO_C" >&6
17798 else
17799   cat >conftest.$ac_ext <<_ACEOF
17800 #line 17800 "configure"
17801 #include "confdefs.h"
17802 /* System header to define __stub macros and hopefully few prototypes,
17803     which can conflict with char $ac_func (); below.  */
17804 #include <assert.h>
17805 /* Override any gcc2 internal prototype to avoid an error.  */
17806 #ifdef __cplusplus
17807 extern "C"
17808 #endif
17809 /* We use char because int might match the return type of a gcc2
17810    builtin and then its argument prototype would still apply.  */
17811 char $ac_func ();
17812 char (*f) ();
17813
17814 int
17815 main ()
17816 {
17817 /* The GNU C library defines this for functions which it implements
17818     to always fail with ENOSYS.  Some functions are actually named
17819     something starting with __ and the normal name is an alias.  */
17820 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17821 choke me
17822 #else
17823 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17824 #endif
17825
17826   ;
17827   return 0;
17828 }
17829 _ACEOF
17830 rm -f conftest.$ac_objext conftest$ac_exeext
17831 if { (eval echo "$as_me:17831: \"$ac_link\"") >&5
17832   (eval $ac_link) 2>&5
17833   ac_status=$?
17834   echo "$as_me:17834: \$? = $ac_status" >&5
17835   (exit $ac_status); } &&
17836          { ac_try='test -s conftest$ac_exeext'
17837   { (eval echo "$as_me:17837: \"$ac_try\"") >&5
17838   (eval $ac_try) 2>&5
17839   ac_status=$?
17840   echo "$as_me:17840: \$? = $ac_status" >&5
17841   (exit $ac_status); }; }; then
17842   eval "$as_ac_var=yes"
17843 else
17844   echo "$as_me: failed program was:" >&5
17845 cat conftest.$ac_ext >&5
17846 eval "$as_ac_var=no"
17847 fi
17848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17849 fi
17850 echo "$as_me:17850: result: `eval echo '${'$as_ac_var'}'`" >&5
17851 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17852 if test `eval echo '${'$as_ac_var'}'` = yes; then
17853   cat >>confdefs.h <<EOF
17854 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17855 EOF
17856
17857 fi
17858 done
17859
17860 ac_cv_func_fork_works=$ac_cv_func_fork
17861 if test "x$ac_cv_func_fork" = xyes; then
17862   echo "$as_me:17862: checking for working fork" >&5
17863 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17864 if test "${ac_cv_func_fork_works+set}" = set; then
17865   echo $ECHO_N "(cached) $ECHO_C" >&6
17866 else
17867   if test "$cross_compiling" = yes; then
17868   ac_cv_func_fork_works=cross
17869 else
17870   cat >conftest.$ac_ext <<_ACEOF
17871 /* By Rüdiger Kuhlmann. */
17872       #include <sys/types.h>
17873       #if HAVE_UNISTD_H
17874       # include <unistd.h>
17875       #endif
17876       /* Some systems only have a dummy stub for fork() */
17877       int main ()
17878       {
17879         if (fork() < 0)
17880           $ac_main_return (1);
17881         $ac_main_return (0);
17882       }
17883 _ACEOF
17884 rm -f conftest$ac_exeext
17885 if { (eval echo "$as_me:17885: \"$ac_link\"") >&5
17886   (eval $ac_link) 2>&5
17887   ac_status=$?
17888   echo "$as_me:17888: \$? = $ac_status" >&5
17889   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17890   { (eval echo "$as_me:17890: \"$ac_try\"") >&5
17891   (eval $ac_try) 2>&5
17892   ac_status=$?
17893   echo "$as_me:17893: \$? = $ac_status" >&5
17894   (exit $ac_status); }; }; then
17895   ac_cv_func_fork_works=yes
17896 else
17897   echo "$as_me: program exited with status $ac_status" >&5
17898 echo "$as_me: failed program was:" >&5
17899 cat conftest.$ac_ext >&5
17900 ac_cv_func_fork_works=no
17901 fi
17902 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17903 fi
17904 fi
17905 echo "$as_me:17905: result: $ac_cv_func_fork_works" >&5
17906 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17907
17908 fi
17909 if test "x$ac_cv_func_fork_works" = xcross; then
17910   case $host in
17911     *-*-amigaos* | *-*-msdosdjgpp*)
17912       # Override, as these systems have only a dummy fork() stub
17913       ac_cv_func_fork_works=no
17914       ;;
17915     *)
17916       ac_cv_func_fork_works=yes
17917       ;;
17918   esac
17919   { echo "$as_me:17919: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17920 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17921 fi
17922 ac_cv_func_vfork_works=$ac_cv_func_vfork
17923 if test "x$ac_cv_func_vfork" = xyes; then
17924   echo "$as_me:17924: checking for working vfork" >&5
17925 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17926 if test "${ac_cv_func_vfork_works+set}" = set; then
17927   echo $ECHO_N "(cached) $ECHO_C" >&6
17928 else
17929   if test "$cross_compiling" = yes; then
17930   ac_cv_func_vfork_works=cross
17931 else
17932   cat >conftest.$ac_ext <<_ACEOF
17933 #line 17933 "configure"
17934 #include "confdefs.h"
17935 /* Thanks to Paul Eggert for this test.  */
17936 #include <stdio.h>
17937 #include <sys/types.h>
17938 #include <sys/stat.h>
17939 #if HAVE_UNISTD_H
17940 # include <unistd.h>
17941 #endif
17942 #if HAVE_VFORK_H
17943 # include <vfork.h>
17944 #endif
17945 /* On some sparc systems, changes by the child to local and incoming
17946    argument registers are propagated back to the parent.  The compiler
17947    is told about this with #include <vfork.h>, but some compilers
17948    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17949    static variable whose address is put into a register that is
17950    clobbered by the vfork.  */
17951 static
17952 #ifdef __cplusplus
17953 sparc_address_test (int arg)
17954 # else
17955 sparc_address_test (arg) int arg;
17956 #endif
17957 {
17958   static pid_t child;
17959   if (!child) {
17960     child = vfork ();
17961     if (child < 0) {
17962       perror ("vfork");
17963       _exit(2);
17964     }
17965     if (!child) {
17966       arg = getpid();
17967       write(-1, "", 0);
17968       _exit (arg);
17969     }
17970   }
17971 }
17972
17973 int
17974 main ()
17975 {
17976   pid_t parent = getpid ();
17977   pid_t child;
17978
17979   sparc_address_test ();
17980
17981   child = vfork ();
17982
17983   if (child == 0) {
17984     /* Here is another test for sparc vfork register problems.  This
17985        test uses lots of local variables, at least as many local
17986        variables as main has allocated so far including compiler
17987        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17988        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17989        reuse the register of parent for one of the local variables,
17990        since it will think that parent can't possibly be used any more
17991        in this routine.  Assigning to the local variable will thus
17992        munge parent in the parent process.  */
17993     pid_t
17994       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17995       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17996     /* Convince the compiler that p..p7 are live; otherwise, it might
17997        use the same hardware register for all 8 local variables.  */
17998     if (p != p1 || p != p2 || p != p3 || p != p4
17999         || p != p5 || p != p6 || p != p7)
18000       _exit(1);
18001
18002     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18003        from child file descriptors.  If the child closes a descriptor
18004        before it execs or exits, this munges the parent's descriptor
18005        as well.  Test for this by closing stdout in the child.  */
18006     _exit(close(fileno(stdout)) != 0);
18007   } else {
18008     int status;
18009     struct stat st;
18010
18011     while (wait(&status) != child)
18012       ;
18013     $ac_main_return(
18014          /* Was there some problem with vforking?  */
18015          child < 0
18016
18017          /* Did the child fail?  (This shouldn't happen.)  */
18018          || status
18019
18020          /* Did the vfork/compiler bug occur?  */
18021          || parent != getpid()
18022
18023          /* Did the file descriptor bug occur?  */
18024          || fstat(fileno(stdout), &st) != 0
18025          );
18026   }
18027 }
18028 _ACEOF
18029 rm -f conftest$ac_exeext
18030 if { (eval echo "$as_me:18030: \"$ac_link\"") >&5
18031   (eval $ac_link) 2>&5
18032   ac_status=$?
18033   echo "$as_me:18033: \$? = $ac_status" >&5
18034   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18035   { (eval echo "$as_me:18035: \"$ac_try\"") >&5
18036   (eval $ac_try) 2>&5
18037   ac_status=$?
18038   echo "$as_me:18038: \$? = $ac_status" >&5
18039   (exit $ac_status); }; }; then
18040   ac_cv_func_vfork_works=yes
18041 else
18042   echo "$as_me: program exited with status $ac_status" >&5
18043 echo "$as_me: failed program was:" >&5
18044 cat conftest.$ac_ext >&5
18045 ac_cv_func_vfork_works=no
18046 fi
18047 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18048 fi
18049 fi
18050 echo "$as_me:18050: result: $ac_cv_func_vfork_works" >&5
18051 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18052
18053 fi;
18054 if test "x$ac_cv_func_fork_works" = xcross; then
18055   ac_cv_func_vfork_works=ac_cv_func_vfork
18056   { echo "$as_me:18056: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18057 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18058 fi
18059
18060 if test "x$ac_cv_func_vfork_works" = xyes; then
18061
18062 cat >>confdefs.h <<\EOF
18063 #define HAVE_WORKING_VFORK 1
18064 EOF
18065
18066 else
18067
18068 cat >>confdefs.h <<\EOF
18069 #define vfork fork
18070 EOF
18071
18072 fi
18073 if test "x$ac_cv_func_fork_works" = xyes; then
18074
18075 cat >>confdefs.h <<\EOF
18076 #define HAVE_WORKING_FORK 1
18077 EOF
18078
18079 fi
18080
18081 # special check for test/ditto.c
18082
18083 echo "$as_me:18083: checking for openpty in -lutil" >&5
18084 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18085 if test "${ac_cv_lib_util_openpty+set}" = set; then
18086   echo $ECHO_N "(cached) $ECHO_C" >&6
18087 else
18088   ac_check_lib_save_LIBS=$LIBS
18089 LIBS="-lutil  $LIBS"
18090 cat >conftest.$ac_ext <<_ACEOF
18091 #line 18091 "configure"
18092 #include "confdefs.h"
18093
18094 /* Override any gcc2 internal prototype to avoid an error.  */
18095 #ifdef __cplusplus
18096 extern "C"
18097 #endif
18098 /* We use char because int might match the return type of a gcc2
18099    builtin and then its argument prototype would still apply.  */
18100 char openpty ();
18101 int
18102 main ()
18103 {
18104 openpty ();
18105   ;
18106   return 0;
18107 }
18108 _ACEOF
18109 rm -f conftest.$ac_objext conftest$ac_exeext
18110 if { (eval echo "$as_me:18110: \"$ac_link\"") >&5
18111   (eval $ac_link) 2>&5
18112   ac_status=$?
18113   echo "$as_me:18113: \$? = $ac_status" >&5
18114   (exit $ac_status); } &&
18115          { ac_try='test -s conftest$ac_exeext'
18116   { (eval echo "$as_me:18116: \"$ac_try\"") >&5
18117   (eval $ac_try) 2>&5
18118   ac_status=$?
18119   echo "$as_me:18119: \$? = $ac_status" >&5
18120   (exit $ac_status); }; }; then
18121   ac_cv_lib_util_openpty=yes
18122 else
18123   echo "$as_me: failed program was:" >&5
18124 cat conftest.$ac_ext >&5
18125 ac_cv_lib_util_openpty=no
18126 fi
18127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18128 LIBS=$ac_check_lib_save_LIBS
18129 fi
18130 echo "$as_me:18130: result: $ac_cv_lib_util_openpty" >&5
18131 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18132 if test $ac_cv_lib_util_openpty = yes; then
18133   cf_cv_lib_util=yes
18134 else
18135   cf_cv_lib_util=no
18136 fi
18137
18138 echo "$as_me:18138: checking for openpty header" >&5
18139 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18140 if test "${cf_cv_func_openpty+set}" = set; then
18141   echo $ECHO_N "(cached) $ECHO_C" >&6
18142 else
18143
18144     cf_save_LIBS="$LIBS"
18145     test $cf_cv_lib_util = yes &&
18146 cf_add_libs="-lutil"
18147 # Filter out duplicates - this happens with badly-designed ".pc" files...
18148 for cf_add_1lib in $LIBS
18149 do
18150         for cf_add_2lib in $cf_add_libs
18151         do
18152                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18153                 then
18154                         cf_add_1lib=
18155                         break
18156                 fi
18157         done
18158         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18159 done
18160 LIBS="$cf_add_libs"
18161
18162     for cf_header in pty.h libutil.h util.h
18163     do
18164     cat >conftest.$ac_ext <<_ACEOF
18165 #line 18165 "configure"
18166 #include "confdefs.h"
18167
18168 #include <$cf_header>
18169
18170 int
18171 main ()
18172 {
18173
18174     int x = openpty((int *)0, (int *)0, (char *)0,
18175                    (struct termios *)0, (struct winsize *)0);
18176
18177   ;
18178   return 0;
18179 }
18180 _ACEOF
18181 rm -f conftest.$ac_objext conftest$ac_exeext
18182 if { (eval echo "$as_me:18182: \"$ac_link\"") >&5
18183   (eval $ac_link) 2>&5
18184   ac_status=$?
18185   echo "$as_me:18185: \$? = $ac_status" >&5
18186   (exit $ac_status); } &&
18187          { ac_try='test -s conftest$ac_exeext'
18188   { (eval echo "$as_me:18188: \"$ac_try\"") >&5
18189   (eval $ac_try) 2>&5
18190   ac_status=$?
18191   echo "$as_me:18191: \$? = $ac_status" >&5
18192   (exit $ac_status); }; }; then
18193
18194         cf_cv_func_openpty=$cf_header
18195         break
18196
18197 else
18198   echo "$as_me: failed program was:" >&5
18199 cat conftest.$ac_ext >&5
18200
18201         cf_cv_func_openpty=no
18202
18203 fi
18204 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18205     done
18206     LIBS="$cf_save_LIBS"
18207
18208 fi
18209 echo "$as_me:18209: result: $cf_cv_func_openpty" >&5
18210 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18211
18212 if test "$cf_cv_func_openpty" != no ; then
18213
18214 cat >>confdefs.h <<EOF
18215 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18216 EOF
18217
18218 cat >>confdefs.h <<\EOF
18219 #define USE_XTERM_PTY 1
18220 EOF
18221
18222     if test "x$cf_cv_lib_util" = xyes ; then
18223
18224 cf_add_libs="-lutil"
18225 # Filter out duplicates - this happens with badly-designed ".pc" files...
18226 for cf_add_1lib in $TEST_LIBS
18227 do
18228         for cf_add_2lib in $cf_add_libs
18229         do
18230                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18231                 then
18232                         cf_add_1lib=
18233                         break
18234                 fi
18235         done
18236         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18237 done
18238 TEST_LIBS="$cf_add_libs"
18239
18240     fi
18241 fi
18242
18243 if test "$with_hashed_db" != no ; then
18244
18245 cat >>confdefs.h <<\EOF
18246 #define USE_HASHED_DB 1
18247 EOF
18248
18249 case $with_hashed_db in #(vi
18250 yes|*able*) #(vi
18251     ;;
18252 *)
18253     if test -d "$with_hashed_db" ; then
18254
18255 if test -n "$with_hashed_db/include" ; then
18256   for cf_add_incdir in $with_hashed_db/include
18257   do
18258         while test $cf_add_incdir != /usr/include
18259         do
18260           if test -d $cf_add_incdir
18261           then
18262                 cf_have_incdir=no
18263                 if test -n "$CFLAGS$CPPFLAGS" ; then
18264                   # a loop is needed to ensure we can add subdirs of existing dirs
18265                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18266                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18267                           cf_have_incdir=yes; break
18268                         fi
18269                   done
18270                 fi
18271
18272                 if test "$cf_have_incdir" = no ; then
18273                   if test "$cf_add_incdir" = /usr/local/include ; then
18274                         if test "$GCC" = yes
18275                         then
18276                           cf_save_CPPFLAGS=$CPPFLAGS
18277                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18278                           cat >conftest.$ac_ext <<_ACEOF
18279 #line 18279 "configure"
18280 #include "confdefs.h"
18281 #include <stdio.h>
18282 int
18283 main ()
18284 {
18285 printf("Hello")
18286   ;
18287   return 0;
18288 }
18289 _ACEOF
18290 rm -f conftest.$ac_objext
18291 if { (eval echo "$as_me:18291: \"$ac_compile\"") >&5
18292   (eval $ac_compile) 2>&5
18293   ac_status=$?
18294   echo "$as_me:18294: \$? = $ac_status" >&5
18295   (exit $ac_status); } &&
18296          { ac_try='test -s conftest.$ac_objext'
18297   { (eval echo "$as_me:18297: \"$ac_try\"") >&5
18298   (eval $ac_try) 2>&5
18299   ac_status=$?
18300   echo "$as_me:18300: \$? = $ac_status" >&5
18301   (exit $ac_status); }; }; then
18302   :
18303 else
18304   echo "$as_me: failed program was:" >&5
18305 cat conftest.$ac_ext >&5
18306 cf_have_incdir=yes
18307 fi
18308 rm -f conftest.$ac_objext conftest.$ac_ext
18309                           CPPFLAGS=$cf_save_CPPFLAGS
18310                         fi
18311                   fi
18312                 fi
18313
18314                 if test "$cf_have_incdir" = no ; then
18315                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18316
18317 echo "${as_me:-configure}:18317: testing adding $cf_add_incdir to include-path ..." 1>&5
18318
18319                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18320
18321                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18322                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18323                   cf_add_incdir="$cf_top_incdir"
18324                 else
18325                   break
18326                 fi
18327           fi
18328         done
18329   done
18330 fi
18331
18332 if test -n "$with_hashed_db/lib" ; then
18333   for cf_add_libdir in $with_hashed_db/lib
18334   do
18335     if test $cf_add_libdir = /usr/lib ; then
18336       :
18337     elif test -d $cf_add_libdir
18338     then
18339       cf_have_libdir=no
18340       if test -n "$LDFLAGS$LIBS" ; then
18341         # a loop is needed to ensure we can add subdirs of existing dirs
18342         for cf_test_libdir in $LDFLAGS $LIBS ; do
18343           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18344             cf_have_libdir=yes; break
18345           fi
18346         done
18347       fi
18348       if test "$cf_have_libdir" = no ; then
18349         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18350
18351 echo "${as_me:-configure}:18351: testing adding $cf_add_libdir to library-path ..." 1>&5
18352
18353         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18354       fi
18355     fi
18356   done
18357 fi
18358
18359         else
18360                 case "$with_hashed_db" in #(vi
18361                 ./*|../*|/*)
18362                         { echo "$as_me:18362: WARNING: no such directory $with_hashed_db" >&5
18363 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18364                         ;; #(vi
18365                 *)
18366
18367 cf_search=
18368
18369 test "x$prefix" != "xNONE" && \
18370 test -d "$prefix" && \
18371  {
18372         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18373         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18374         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18375         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18376         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18377         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18378 }
18379
18380 for cf_subdir_prefix in \
18381         /usr \
18382         /usr/local \
18383         /usr/pkg \
18384         /opt \
18385         /opt/local \
18386         $HOME
18387 do
18388
18389 test "x$cf_subdir_prefix" != "x$prefix" && \
18390 test -d "$cf_subdir_prefix" && \
18391 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18392         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18393         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18394         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18395         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18396         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18397         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"
18398 }
18399
18400 done
18401
18402         for cf_item in $cf_search
18403         do
18404                 case $cf_item in #(vi
18405                 */$with_hashed_db)
18406
18407 if test -n "$cf_item" ; then
18408   for cf_add_incdir in $cf_item
18409   do
18410         while test $cf_add_incdir != /usr/include
18411         do
18412           if test -d $cf_add_incdir
18413           then
18414                 cf_have_incdir=no
18415                 if test -n "$CFLAGS$CPPFLAGS" ; then
18416                   # a loop is needed to ensure we can add subdirs of existing dirs
18417                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18418                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18419                           cf_have_incdir=yes; break
18420                         fi
18421                   done
18422                 fi
18423
18424                 if test "$cf_have_incdir" = no ; then
18425                   if test "$cf_add_incdir" = /usr/local/include ; then
18426                         if test "$GCC" = yes
18427                         then
18428                           cf_save_CPPFLAGS=$CPPFLAGS
18429                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18430                           cat >conftest.$ac_ext <<_ACEOF
18431 #line 18431 "configure"
18432 #include "confdefs.h"
18433 #include <stdio.h>
18434 int
18435 main ()
18436 {
18437 printf("Hello")
18438   ;
18439   return 0;
18440 }
18441 _ACEOF
18442 rm -f conftest.$ac_objext
18443 if { (eval echo "$as_me:18443: \"$ac_compile\"") >&5
18444   (eval $ac_compile) 2>&5
18445   ac_status=$?
18446   echo "$as_me:18446: \$? = $ac_status" >&5
18447   (exit $ac_status); } &&
18448          { ac_try='test -s conftest.$ac_objext'
18449   { (eval echo "$as_me:18449: \"$ac_try\"") >&5
18450   (eval $ac_try) 2>&5
18451   ac_status=$?
18452   echo "$as_me:18452: \$? = $ac_status" >&5
18453   (exit $ac_status); }; }; then
18454   :
18455 else
18456   echo "$as_me: failed program was:" >&5
18457 cat conftest.$ac_ext >&5
18458 cf_have_incdir=yes
18459 fi
18460 rm -f conftest.$ac_objext conftest.$ac_ext
18461                           CPPFLAGS=$cf_save_CPPFLAGS
18462                         fi
18463                   fi
18464                 fi
18465
18466                 if test "$cf_have_incdir" = no ; then
18467                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18468
18469 echo "${as_me:-configure}:18469: testing adding $cf_add_incdir to include-path ..." 1>&5
18470
18471                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18472
18473                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18474                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18475                   cf_add_incdir="$cf_top_incdir"
18476                 else
18477                   break
18478                 fi
18479           fi
18480         done
18481   done
18482 fi
18483
18484                         ;;
18485                 esac
18486         done
18487
18488 cf_search=
18489
18490 test "x$prefix" != "xNONE" && \
18491 test -d "$prefix" && \
18492  {
18493         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18494         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18495         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18496         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18497         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18498         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18499 }
18500
18501 for cf_subdir_prefix in \
18502         /usr \
18503         /usr/local \
18504         /usr/pkg \
18505         /opt \
18506         /opt/local \
18507         $HOME
18508 do
18509
18510 test "x$cf_subdir_prefix" != "x$prefix" && \
18511 test -d "$cf_subdir_prefix" && \
18512 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18513         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18514         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18515         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18516         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18517         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18518         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"
18519 }
18520
18521 done
18522
18523         for cf_item in $cf_search
18524         do
18525                 case $cf_item in #(vi
18526                 */$with_hashed_db)
18527
18528 if test -n "$cf_item" ; then
18529   for cf_add_libdir in $cf_item
18530   do
18531     if test $cf_add_libdir = /usr/lib ; then
18532       :
18533     elif test -d $cf_add_libdir
18534     then
18535       cf_have_libdir=no
18536       if test -n "$LDFLAGS$LIBS" ; then
18537         # a loop is needed to ensure we can add subdirs of existing dirs
18538         for cf_test_libdir in $LDFLAGS $LIBS ; do
18539           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18540             cf_have_libdir=yes; break
18541           fi
18542         done
18543       fi
18544       if test "$cf_have_libdir" = no ; then
18545         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18546
18547 echo "${as_me:-configure}:18547: testing adding $cf_add_libdir to library-path ..." 1>&5
18548
18549         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18550       fi
18551     fi
18552   done
18553 fi
18554
18555                         ;;
18556                 esac
18557         done
18558
18559                         ;;
18560                 esac
18561     fi
18562 esac
18563
18564 echo "$as_me:18564: checking for db.h" >&5
18565 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18566 if test "${ac_cv_header_db_h+set}" = set; then
18567   echo $ECHO_N "(cached) $ECHO_C" >&6
18568 else
18569   cat >conftest.$ac_ext <<_ACEOF
18570 #line 18570 "configure"
18571 #include "confdefs.h"
18572 #include <db.h>
18573 _ACEOF
18574 if { (eval echo "$as_me:18574: \"$ac_cpp conftest.$ac_ext\"") >&5
18575   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18576   ac_status=$?
18577   egrep -v '^ *\+' conftest.er1 >conftest.err
18578   rm -f conftest.er1
18579   cat conftest.err >&5
18580   echo "$as_me:18580: \$? = $ac_status" >&5
18581   (exit $ac_status); } >/dev/null; then
18582   if test -s conftest.err; then
18583     ac_cpp_err=$ac_c_preproc_warn_flag
18584   else
18585     ac_cpp_err=
18586   fi
18587 else
18588   ac_cpp_err=yes
18589 fi
18590 if test -z "$ac_cpp_err"; then
18591   ac_cv_header_db_h=yes
18592 else
18593   echo "$as_me: failed program was:" >&5
18594   cat conftest.$ac_ext >&5
18595   ac_cv_header_db_h=no
18596 fi
18597 rm -f conftest.err conftest.$ac_ext
18598 fi
18599 echo "$as_me:18599: result: $ac_cv_header_db_h" >&5
18600 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18601 if test $ac_cv_header_db_h = yes; then
18602
18603 echo "$as_me:18603: checking for version of db" >&5
18604 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18605 if test "${cf_cv_hashed_db_version+set}" = set; then
18606   echo $ECHO_N "(cached) $ECHO_C" >&6
18607 else
18608
18609 cf_cv_hashed_db_version=unknown
18610
18611 for cf_db_version in 1 2 3 4 5 6
18612 do
18613
18614 echo "${as_me:-configure}:18614: testing checking for db version $cf_db_version ..." 1>&5
18615
18616         cat >conftest.$ac_ext <<_ACEOF
18617 #line 18617 "configure"
18618 #include "confdefs.h"
18619
18620 $ac_includes_default
18621 #include <db.h>
18622
18623 #ifdef DB_VERSION_MAJOR
18624         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18625 #if $cf_db_version == DB_VERSION_MAJOR
18626         /* ok */
18627 #else
18628         make an error
18629 #endif
18630 #else
18631 #if $cf_db_version == 1
18632         /* ok: assuming this is DB 1.8.5 */
18633 #else
18634         make an error
18635 #endif
18636 #endif
18637
18638 int
18639 main ()
18640 {
18641 DBT *foo = 0
18642   ;
18643   return 0;
18644 }
18645 _ACEOF
18646 rm -f conftest.$ac_objext
18647 if { (eval echo "$as_me:18647: \"$ac_compile\"") >&5
18648   (eval $ac_compile) 2>&5
18649   ac_status=$?
18650   echo "$as_me:18650: \$? = $ac_status" >&5
18651   (exit $ac_status); } &&
18652          { ac_try='test -s conftest.$ac_objext'
18653   { (eval echo "$as_me:18653: \"$ac_try\"") >&5
18654   (eval $ac_try) 2>&5
18655   ac_status=$?
18656   echo "$as_me:18656: \$? = $ac_status" >&5
18657   (exit $ac_status); }; }; then
18658
18659         cf_cv_hashed_db_version=$cf_db_version
18660         break
18661
18662 else
18663   echo "$as_me: failed program was:" >&5
18664 cat conftest.$ac_ext >&5
18665 fi
18666 rm -f conftest.$ac_objext conftest.$ac_ext
18667 done
18668
18669 fi
18670 echo "$as_me:18670: result: $cf_cv_hashed_db_version" >&5
18671 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18672
18673 if test "$cf_cv_hashed_db_version" = unknown ; then
18674         { { echo "$as_me:18674: error: Cannot determine version of db" >&5
18675 echo "$as_me: error: Cannot determine version of db" >&2;}
18676    { (exit 1); exit 1; }; }
18677 else
18678
18679 echo "$as_me:18679: checking for db libraries" >&5
18680 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18681 if test "${cf_cv_hashed_db_libs+set}" = set; then
18682   echo $ECHO_N "(cached) $ECHO_C" >&6
18683 else
18684
18685 cf_cv_hashed_db_libs=unknown
18686 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18687 do
18688         cf_save_libs="$LIBS"
18689         if test -n "$cf_db_libs"; then
18690
18691 cf_add_libs="-l$cf_db_libs"
18692 # Filter out duplicates - this happens with badly-designed ".pc" files...
18693 for cf_add_1lib in $LIBS
18694 do
18695         for cf_add_2lib in $cf_add_libs
18696         do
18697                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18698                 then
18699                         cf_add_1lib=
18700                         break
18701                 fi
18702         done
18703         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18704 done
18705 LIBS="$cf_add_libs"
18706
18707         fi
18708
18709 echo "${as_me:-configure}:18709: testing checking for library "$cf_db_libs" ..." 1>&5
18710
18711         cat >conftest.$ac_ext <<_ACEOF
18712 #line 18712 "configure"
18713 #include "confdefs.h"
18714
18715 $ac_includes_default
18716 #include <db.h>
18717
18718 int
18719 main ()
18720 {
18721
18722         char *path = "/tmp/foo";
18723 #ifdef DB_VERSION_MAJOR
18724 #if DB_VERSION_MAJOR >= 4
18725         DB *result = 0;
18726         db_create(&result, NULL, 0);
18727         result->open(result,
18728                 NULL,
18729                 path,
18730                 path,
18731                 DB_HASH,
18732                 DB_CREATE,
18733                 0644);
18734 #elif DB_VERSION_MAJOR >= 3
18735         DB *result = 0;
18736         db_create(&result, NULL, 0);
18737         result->open(result,
18738                 path,
18739                 path,
18740                 DB_HASH,
18741                 DB_CREATE,
18742                 0644);
18743 #elif DB_VERSION_MAJOR >= 2
18744         DB *result = 0;
18745         db_open(path,
18746                 DB_HASH,
18747                 DB_CREATE,
18748                 0644,
18749                 (DB_ENV *) 0,
18750                 (DB_INFO *) 0,
18751                 &result);
18752 #endif /* DB_VERSION_MAJOR */
18753 #else
18754         DB *result = dbopen(path,
18755                      2,
18756                      0644,
18757                      DB_HASH,
18758                      0);
18759 #endif
18760         ${cf_cv_main_return:-return}(result != 0)
18761
18762   ;
18763   return 0;
18764 }
18765 _ACEOF
18766 rm -f conftest.$ac_objext conftest$ac_exeext
18767 if { (eval echo "$as_me:18767: \"$ac_link\"") >&5
18768   (eval $ac_link) 2>&5
18769   ac_status=$?
18770   echo "$as_me:18770: \$? = $ac_status" >&5
18771   (exit $ac_status); } &&
18772          { ac_try='test -s conftest$ac_exeext'
18773   { (eval echo "$as_me:18773: \"$ac_try\"") >&5
18774   (eval $ac_try) 2>&5
18775   ac_status=$?
18776   echo "$as_me:18776: \$? = $ac_status" >&5
18777   (exit $ac_status); }; }; then
18778
18779         if test -n "$cf_db_libs" ; then
18780                 cf_cv_hashed_db_libs=$cf_db_libs
18781         else
18782                 cf_cv_hashed_db_libs=default
18783         fi
18784         LIBS="$cf_save_libs"
18785         break
18786
18787 else
18788   echo "$as_me: failed program was:" >&5
18789 cat conftest.$ac_ext >&5
18790 fi
18791 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18792         LIBS="$cf_save_libs"
18793 done
18794
18795 fi
18796 echo "$as_me:18796: result: $cf_cv_hashed_db_libs" >&5
18797 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18798
18799         if test "$cf_cv_hashed_db_libs" = unknown ; then
18800                 { { echo "$as_me:18800: error: Cannot determine library for db" >&5
18801 echo "$as_me: error: Cannot determine library for db" >&2;}
18802    { (exit 1); exit 1; }; }
18803         elif test "$cf_cv_hashed_db_libs" != default ; then
18804
18805 cf_add_libs="-l$cf_cv_hashed_db_libs"
18806 # Filter out duplicates - this happens with badly-designed ".pc" files...
18807 for cf_add_1lib in $LIBS
18808 do
18809         for cf_add_2lib in $cf_add_libs
18810         do
18811                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18812                 then
18813                         cf_add_1lib=
18814                         break
18815                 fi
18816         done
18817         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18818 done
18819 LIBS="$cf_add_libs"
18820
18821         fi
18822 fi
18823
18824 else
18825
18826         { { echo "$as_me:18826: error: Cannot find db.h" >&5
18827 echo "$as_me: error: Cannot find db.h" >&2;}
18828    { (exit 1); exit 1; }; }
18829
18830 fi
18831
18832 fi
18833
18834 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18835         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18836         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18837 fi
18838
18839 # Just in case, check if the C compiler has a bool type.
18840
18841 echo "$as_me:18841: checking if we should include stdbool.h" >&5
18842 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18843
18844 if test "${cf_cv_header_stdbool_h+set}" = set; then
18845   echo $ECHO_N "(cached) $ECHO_C" >&6
18846 else
18847
18848         cat >conftest.$ac_ext <<_ACEOF
18849 #line 18849 "configure"
18850 #include "confdefs.h"
18851
18852 int
18853 main ()
18854 {
18855 bool foo = false
18856   ;
18857   return 0;
18858 }
18859 _ACEOF
18860 rm -f conftest.$ac_objext
18861 if { (eval echo "$as_me:18861: \"$ac_compile\"") >&5
18862   (eval $ac_compile) 2>&5
18863   ac_status=$?
18864   echo "$as_me:18864: \$? = $ac_status" >&5
18865   (exit $ac_status); } &&
18866          { ac_try='test -s conftest.$ac_objext'
18867   { (eval echo "$as_me:18867: \"$ac_try\"") >&5
18868   (eval $ac_try) 2>&5
18869   ac_status=$?
18870   echo "$as_me:18870: \$? = $ac_status" >&5
18871   (exit $ac_status); }; }; then
18872   cf_cv_header_stdbool_h=0
18873 else
18874   echo "$as_me: failed program was:" >&5
18875 cat conftest.$ac_ext >&5
18876 cat >conftest.$ac_ext <<_ACEOF
18877 #line 18877 "configure"
18878 #include "confdefs.h"
18879
18880 #ifndef __BEOS__
18881 #include <stdbool.h>
18882 #endif
18883
18884 int
18885 main ()
18886 {
18887 bool foo = false
18888   ;
18889   return 0;
18890 }
18891 _ACEOF
18892 rm -f conftest.$ac_objext
18893 if { (eval echo "$as_me:18893: \"$ac_compile\"") >&5
18894   (eval $ac_compile) 2>&5
18895   ac_status=$?
18896   echo "$as_me:18896: \$? = $ac_status" >&5
18897   (exit $ac_status); } &&
18898          { ac_try='test -s conftest.$ac_objext'
18899   { (eval echo "$as_me:18899: \"$ac_try\"") >&5
18900   (eval $ac_try) 2>&5
18901   ac_status=$?
18902   echo "$as_me:18902: \$? = $ac_status" >&5
18903   (exit $ac_status); }; }; then
18904   cf_cv_header_stdbool_h=1
18905 else
18906   echo "$as_me: failed program was:" >&5
18907 cat conftest.$ac_ext >&5
18908 cf_cv_header_stdbool_h=0
18909 fi
18910 rm -f conftest.$ac_objext conftest.$ac_ext
18911 fi
18912 rm -f conftest.$ac_objext conftest.$ac_ext
18913 fi
18914
18915 if test "$cf_cv_header_stdbool_h" = 1
18916 then    echo "$as_me:18916: result: yes" >&5
18917 echo "${ECHO_T}yes" >&6
18918 else    echo "$as_me:18918: result: no" >&5
18919 echo "${ECHO_T}no" >&6
18920 fi
18921
18922 echo "$as_me:18922: checking for builtin bool type" >&5
18923 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18924
18925 if test "${cf_cv_cc_bool_type+set}" = set; then
18926   echo $ECHO_N "(cached) $ECHO_C" >&6
18927 else
18928
18929         cat >conftest.$ac_ext <<_ACEOF
18930 #line 18930 "configure"
18931 #include "confdefs.h"
18932
18933 #include <stdio.h>
18934 #include <sys/types.h>
18935
18936 int
18937 main ()
18938 {
18939 bool x = false
18940   ;
18941   return 0;
18942 }
18943 _ACEOF
18944 rm -f conftest.$ac_objext
18945 if { (eval echo "$as_me:18945: \"$ac_compile\"") >&5
18946   (eval $ac_compile) 2>&5
18947   ac_status=$?
18948   echo "$as_me:18948: \$? = $ac_status" >&5
18949   (exit $ac_status); } &&
18950          { ac_try='test -s conftest.$ac_objext'
18951   { (eval echo "$as_me:18951: \"$ac_try\"") >&5
18952   (eval $ac_try) 2>&5
18953   ac_status=$?
18954   echo "$as_me:18954: \$? = $ac_status" >&5
18955   (exit $ac_status); }; }; then
18956   cf_cv_cc_bool_type=1
18957 else
18958   echo "$as_me: failed program was:" >&5
18959 cat conftest.$ac_ext >&5
18960 cf_cv_cc_bool_type=0
18961 fi
18962 rm -f conftest.$ac_objext conftest.$ac_ext
18963
18964 fi
18965
18966 if test "$cf_cv_cc_bool_type" = 1
18967 then    echo "$as_me:18967: result: yes" >&5
18968 echo "${ECHO_T}yes" >&6
18969 else    echo "$as_me:18969: result: no" >&5
18970 echo "${ECHO_T}no" >&6
18971 fi
18972
18973 # Check for C++ compiler characteristics (and ensure that it's there!)
18974 if test -n "$CXX" ; then
18975         ac_ext=cc
18976 ac_cpp='$CXXCPP $CPPFLAGS'
18977 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18978 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18979 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18980 ac_main_return=return
18981
18982 if test -n "$GXX" ; then
18983 case $cf_cv_system_name in #(vi
18984 os2*) #(vi
18985         cf_stdcpp_libname=stdcpp
18986         ;;
18987 *)
18988         cf_stdcpp_libname=stdc++
18989         ;;
18990 esac
18991 echo "$as_me:18991: checking for library $cf_stdcpp_libname" >&5
18992 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18993 if test "${cf_cv_libstdcpp+set}" = set; then
18994   echo $ECHO_N "(cached) $ECHO_C" >&6
18995 else
18996
18997         cf_save="$LIBS"
18998
18999 cf_add_libs="-l$cf_stdcpp_libname"
19000 # Filter out duplicates - this happens with badly-designed ".pc" files...
19001 for cf_add_1lib in $LIBS
19002 do
19003         for cf_add_2lib in $cf_add_libs
19004         do
19005                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19006                 then
19007                         cf_add_1lib=
19008                         break
19009                 fi
19010         done
19011         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19012 done
19013 LIBS="$cf_add_libs"
19014
19015 cat >conftest.$ac_ext <<_ACEOF
19016 #line 19016 "configure"
19017 #include "confdefs.h"
19018
19019 #include <strstream.h>
19020 int
19021 main ()
19022 {
19023
19024 char buf[80];
19025 strstreambuf foo(buf, sizeof(buf))
19026
19027   ;
19028   return 0;
19029 }
19030 _ACEOF
19031 rm -f conftest.$ac_objext conftest$ac_exeext
19032 if { (eval echo "$as_me:19032: \"$ac_link\"") >&5
19033   (eval $ac_link) 2>&5
19034   ac_status=$?
19035   echo "$as_me:19035: \$? = $ac_status" >&5
19036   (exit $ac_status); } &&
19037          { ac_try='test -s conftest$ac_exeext'
19038   { (eval echo "$as_me:19038: \"$ac_try\"") >&5
19039   (eval $ac_try) 2>&5
19040   ac_status=$?
19041   echo "$as_me:19041: \$? = $ac_status" >&5
19042   (exit $ac_status); }; }; then
19043   cf_cv_libstdcpp=yes
19044 else
19045   echo "$as_me: failed program was:" >&5
19046 cat conftest.$ac_ext >&5
19047 cf_cv_libstdcpp=no
19048 fi
19049 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19050         LIBS="$cf_save"
19051
19052 fi
19053 echo "$as_me:19053: result: $cf_cv_libstdcpp" >&5
19054 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19055 test "$cf_cv_libstdcpp" = yes &&
19056 cf_add_libs="-l$cf_stdcpp_libname"
19057 # Filter out duplicates - this happens with badly-designed ".pc" files...
19058 for cf_add_1lib in $CXXLIBS
19059 do
19060         for cf_add_2lib in $cf_add_libs
19061         do
19062                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19063                 then
19064                         cf_add_1lib=
19065                         break
19066                 fi
19067         done
19068         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19069 done
19070 CXXLIBS="$cf_add_libs"
19071
19072 fi
19073
19074         echo "$as_me:19074: checking whether $CXX understands -c and -o together" >&5
19075 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19076 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19077   echo $ECHO_N "(cached) $ECHO_C" >&6
19078 else
19079
19080 cat > conftest.$ac_ext <<CF_EOF
19081 #include <stdio.h>
19082 int main()
19083 {
19084         ${cf_cv_main_return:-return}(0);
19085 }
19086 CF_EOF
19087 # We do the test twice because some compilers refuse to overwrite an
19088 # existing .o file with -o, though they will create one.
19089 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19090 if { (eval echo "$as_me:19090: \"$ac_try\"") >&5
19091   (eval $ac_try) 2>&5
19092   ac_status=$?
19093   echo "$as_me:19093: \$? = $ac_status" >&5
19094   (exit $ac_status); } &&
19095   test -f conftest2.$ac_objext && { (eval echo "$as_me:19095: \"$ac_try\"") >&5
19096   (eval $ac_try) 2>&5
19097   ac_status=$?
19098   echo "$as_me:19098: \$? = $ac_status" >&5
19099   (exit $ac_status); };
19100 then
19101   eval cf_cv_prog_CXX_c_o=yes
19102 else
19103   eval cf_cv_prog_CXX_c_o=no
19104 fi
19105 rm -rf conftest*
19106
19107 fi
19108 if test $cf_cv_prog_CXX_c_o = yes; then
19109   echo "$as_me:19109: result: yes" >&5
19110 echo "${ECHO_T}yes" >&6
19111 else
19112   echo "$as_me:19112: result: no" >&5
19113 echo "${ECHO_T}no" >&6
19114 fi
19115
19116         case $GXX_VERSION in
19117         1*|2.0-6*)
19118                 cf_cxx_library=yes
19119                 ;;
19120         *-2.7*|2.7*)
19121
19122 cf_cxx_library=unknown
19123 case $cf_cv_system_name in #(vi
19124 os2*) #(vi
19125         cf_gpp_libname=gpp
19126         ;;
19127 *)
19128         cf_gpp_libname=g++
19129         ;;
19130 esac
19131 if test "$GXX" = yes; then
19132         echo "$as_me:19132: checking for lib$cf_gpp_libname" >&5
19133 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19134         cf_save="$LIBS"
19135
19136 cf_add_libs="-l$cf_gpp_libname"
19137 # Filter out duplicates - this happens with badly-designed ".pc" files...
19138 for cf_add_1lib in $LIBS
19139 do
19140         for cf_add_2lib in $cf_add_libs
19141         do
19142                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19143                 then
19144                         cf_add_1lib=
19145                         break
19146                 fi
19147         done
19148         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19149 done
19150 LIBS="$cf_add_libs"
19151
19152         cat >conftest.$ac_ext <<_ACEOF
19153 #line 19153 "configure"
19154 #include "confdefs.h"
19155
19156 #include <$cf_gpp_libname/builtin.h>
19157
19158 int
19159 main ()
19160 {
19161 two_arg_error_handler_t foo2 = lib_error_handler
19162   ;
19163   return 0;
19164 }
19165 _ACEOF
19166 rm -f conftest.$ac_objext conftest$ac_exeext
19167 if { (eval echo "$as_me:19167: \"$ac_link\"") >&5
19168   (eval $ac_link) 2>&5
19169   ac_status=$?
19170   echo "$as_me:19170: \$? = $ac_status" >&5
19171   (exit $ac_status); } &&
19172          { ac_try='test -s conftest$ac_exeext'
19173   { (eval echo "$as_me:19173: \"$ac_try\"") >&5
19174   (eval $ac_try) 2>&5
19175   ac_status=$?
19176   echo "$as_me:19176: \$? = $ac_status" >&5
19177   (exit $ac_status); }; }; then
19178   cf_cxx_library=yes
19179
19180 cf_add_libs="-l$cf_gpp_libname"
19181 # Filter out duplicates - this happens with badly-designed ".pc" files...
19182 for cf_add_1lib in $CXXLIBS
19183 do
19184         for cf_add_2lib in $cf_add_libs
19185         do
19186                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19187                 then
19188                         cf_add_1lib=
19189                         break
19190                 fi
19191         done
19192         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19193 done
19194 CXXLIBS="$cf_add_libs"
19195
19196          if test "$cf_gpp_libname" = cpp ; then
19197
19198 cat >>confdefs.h <<\EOF
19199 #define HAVE_GPP_BUILTIN_H 1
19200 EOF
19201
19202          else
19203
19204 cat >>confdefs.h <<\EOF
19205 #define HAVE_GXX_BUILTIN_H 1
19206 EOF
19207
19208          fi
19209 else
19210   echo "$as_me: failed program was:" >&5
19211 cat conftest.$ac_ext >&5
19212 cat >conftest.$ac_ext <<_ACEOF
19213 #line 19213 "configure"
19214 #include "confdefs.h"
19215
19216 #include <builtin.h>
19217
19218 int
19219 main ()
19220 {
19221 two_arg_error_handler_t foo2 = lib_error_handler
19222   ;
19223   return 0;
19224 }
19225 _ACEOF
19226 rm -f conftest.$ac_objext conftest$ac_exeext
19227 if { (eval echo "$as_me:19227: \"$ac_link\"") >&5
19228   (eval $ac_link) 2>&5
19229   ac_status=$?
19230   echo "$as_me:19230: \$? = $ac_status" >&5
19231   (exit $ac_status); } &&
19232          { ac_try='test -s conftest$ac_exeext'
19233   { (eval echo "$as_me:19233: \"$ac_try\"") >&5
19234   (eval $ac_try) 2>&5
19235   ac_status=$?
19236   echo "$as_me:19236: \$? = $ac_status" >&5
19237   (exit $ac_status); }; }; then
19238   cf_cxx_library=yes
19239
19240 cf_add_libs="-l$cf_gpp_libname"
19241 # Filter out duplicates - this happens with badly-designed ".pc" files...
19242 for cf_add_1lib in $CXXLIBS
19243 do
19244         for cf_add_2lib in $cf_add_libs
19245         do
19246                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19247                 then
19248                         cf_add_1lib=
19249                         break
19250                 fi
19251         done
19252         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19253 done
19254 CXXLIBS="$cf_add_libs"
19255
19256 cat >>confdefs.h <<\EOF
19257 #define HAVE_BUILTIN_H 1
19258 EOF
19259
19260 else
19261   echo "$as_me: failed program was:" >&5
19262 cat conftest.$ac_ext >&5
19263 cf_cxx_library=no
19264 fi
19265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19266 fi
19267 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19268         LIBS="$cf_save"
19269         echo "$as_me:19269: result: $cf_cxx_library" >&5
19270 echo "${ECHO_T}$cf_cxx_library" >&6
19271 fi
19272
19273                 ;;
19274         *)
19275                 cf_cxx_library=no
19276                 ;;
19277         esac
19278
19279         ac_ext=cc
19280 ac_cpp='$CXXCPP $CPPFLAGS'
19281 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19282 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19283 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19284 ac_main_return=return
19285 echo "$as_me:19285: checking how to run the C++ preprocessor" >&5
19286 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19287 if test -z "$CXXCPP"; then
19288   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19289   echo $ECHO_N "(cached) $ECHO_C" >&6
19290 else
19291       # Double quotes because CXXCPP needs to be expanded
19292     for CXXCPP in "$CXX -E" "/lib/cpp"
19293     do
19294       ac_preproc_ok=false
19295 for ac_cxx_preproc_warn_flag in '' yes
19296 do
19297   # Use a header file that comes with gcc, so configuring glibc
19298   # with a fresh cross-compiler works.
19299   # On the NeXT, cc -E runs the code through the compiler's parser,
19300   # not just through cpp. "Syntax error" is here to catch this case.
19301   cat >conftest.$ac_ext <<_ACEOF
19302 #line 19302 "configure"
19303 #include "confdefs.h"
19304 #include <assert.h>
19305                      Syntax error
19306 _ACEOF
19307 if { (eval echo "$as_me:19307: \"$ac_cpp conftest.$ac_ext\"") >&5
19308   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19309   ac_status=$?
19310   egrep -v '^ *\+' conftest.er1 >conftest.err
19311   rm -f conftest.er1
19312   cat conftest.err >&5
19313   echo "$as_me:19313: \$? = $ac_status" >&5
19314   (exit $ac_status); } >/dev/null; then
19315   if test -s conftest.err; then
19316     ac_cpp_err=$ac_cxx_preproc_warn_flag
19317   else
19318     ac_cpp_err=
19319   fi
19320 else
19321   ac_cpp_err=yes
19322 fi
19323 if test -z "$ac_cpp_err"; then
19324   :
19325 else
19326   echo "$as_me: failed program was:" >&5
19327   cat conftest.$ac_ext >&5
19328   # Broken: fails on valid input.
19329 continue
19330 fi
19331 rm -f conftest.err conftest.$ac_ext
19332
19333   # OK, works on sane cases.  Now check whether non-existent headers
19334   # can be detected and how.
19335   cat >conftest.$ac_ext <<_ACEOF
19336 #line 19336 "configure"
19337 #include "confdefs.h"
19338 #include <ac_nonexistent.h>
19339 _ACEOF
19340 if { (eval echo "$as_me:19340: \"$ac_cpp conftest.$ac_ext\"") >&5
19341   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19342   ac_status=$?
19343   egrep -v '^ *\+' conftest.er1 >conftest.err
19344   rm -f conftest.er1
19345   cat conftest.err >&5
19346   echo "$as_me:19346: \$? = $ac_status" >&5
19347   (exit $ac_status); } >/dev/null; then
19348   if test -s conftest.err; then
19349     ac_cpp_err=$ac_cxx_preproc_warn_flag
19350   else
19351     ac_cpp_err=
19352   fi
19353 else
19354   ac_cpp_err=yes
19355 fi
19356 if test -z "$ac_cpp_err"; then
19357   # Broken: success on invalid input.
19358 continue
19359 else
19360   echo "$as_me: failed program was:" >&5
19361   cat conftest.$ac_ext >&5
19362   # Passes both tests.
19363 ac_preproc_ok=:
19364 break
19365 fi
19366 rm -f conftest.err conftest.$ac_ext
19367
19368 done
19369 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19370 rm -f conftest.err conftest.$ac_ext
19371 if $ac_preproc_ok; then
19372   break
19373 fi
19374
19375     done
19376     ac_cv_prog_CXXCPP=$CXXCPP
19377
19378 fi
19379   CXXCPP=$ac_cv_prog_CXXCPP
19380 else
19381   ac_cv_prog_CXXCPP=$CXXCPP
19382 fi
19383 echo "$as_me:19383: result: $CXXCPP" >&5
19384 echo "${ECHO_T}$CXXCPP" >&6
19385 ac_preproc_ok=false
19386 for ac_cxx_preproc_warn_flag in '' yes
19387 do
19388   # Use a header file that comes with gcc, so configuring glibc
19389   # with a fresh cross-compiler works.
19390   # On the NeXT, cc -E runs the code through the compiler's parser,
19391   # not just through cpp. "Syntax error" is here to catch this case.
19392   cat >conftest.$ac_ext <<_ACEOF
19393 #line 19393 "configure"
19394 #include "confdefs.h"
19395 #include <assert.h>
19396                      Syntax error
19397 _ACEOF
19398 if { (eval echo "$as_me:19398: \"$ac_cpp conftest.$ac_ext\"") >&5
19399   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19400   ac_status=$?
19401   egrep -v '^ *\+' conftest.er1 >conftest.err
19402   rm -f conftest.er1
19403   cat conftest.err >&5
19404   echo "$as_me:19404: \$? = $ac_status" >&5
19405   (exit $ac_status); } >/dev/null; then
19406   if test -s conftest.err; then
19407     ac_cpp_err=$ac_cxx_preproc_warn_flag
19408   else
19409     ac_cpp_err=
19410   fi
19411 else
19412   ac_cpp_err=yes
19413 fi
19414 if test -z "$ac_cpp_err"; then
19415   :
19416 else
19417   echo "$as_me: failed program was:" >&5
19418   cat conftest.$ac_ext >&5
19419   # Broken: fails on valid input.
19420 continue
19421 fi
19422 rm -f conftest.err conftest.$ac_ext
19423
19424   # OK, works on sane cases.  Now check whether non-existent headers
19425   # can be detected and how.
19426   cat >conftest.$ac_ext <<_ACEOF
19427 #line 19427 "configure"
19428 #include "confdefs.h"
19429 #include <ac_nonexistent.h>
19430 _ACEOF
19431 if { (eval echo "$as_me:19431: \"$ac_cpp conftest.$ac_ext\"") >&5
19432   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19433   ac_status=$?
19434   egrep -v '^ *\+' conftest.er1 >conftest.err
19435   rm -f conftest.er1
19436   cat conftest.err >&5
19437   echo "$as_me:19437: \$? = $ac_status" >&5
19438   (exit $ac_status); } >/dev/null; then
19439   if test -s conftest.err; then
19440     ac_cpp_err=$ac_cxx_preproc_warn_flag
19441   else
19442     ac_cpp_err=
19443   fi
19444 else
19445   ac_cpp_err=yes
19446 fi
19447 if test -z "$ac_cpp_err"; then
19448   # Broken: success on invalid input.
19449 continue
19450 else
19451   echo "$as_me: failed program was:" >&5
19452   cat conftest.$ac_ext >&5
19453   # Passes both tests.
19454 ac_preproc_ok=:
19455 break
19456 fi
19457 rm -f conftest.err conftest.$ac_ext
19458
19459 done
19460 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19461 rm -f conftest.err conftest.$ac_ext
19462 if $ac_preproc_ok; then
19463   :
19464 else
19465   { { echo "$as_me:19465: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19466 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19467    { (exit 1); exit 1; }; }
19468 fi
19469
19470 ac_ext=cc
19471 ac_cpp='$CXXCPP $CPPFLAGS'
19472 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19473 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19474 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19475 ac_main_return=return
19476
19477 for ac_header in typeinfo
19478 do
19479 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19480 echo "$as_me:19480: checking for $ac_header" >&5
19481 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19482 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19483   echo $ECHO_N "(cached) $ECHO_C" >&6
19484 else
19485   cat >conftest.$ac_ext <<_ACEOF
19486 #line 19486 "configure"
19487 #include "confdefs.h"
19488 #include <$ac_header>
19489 _ACEOF
19490 if { (eval echo "$as_me:19490: \"$ac_cpp conftest.$ac_ext\"") >&5
19491   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19492   ac_status=$?
19493   egrep -v '^ *\+' conftest.er1 >conftest.err
19494   rm -f conftest.er1
19495   cat conftest.err >&5
19496   echo "$as_me:19496: \$? = $ac_status" >&5
19497   (exit $ac_status); } >/dev/null; then
19498   if test -s conftest.err; then
19499     ac_cpp_err=$ac_cxx_preproc_warn_flag
19500   else
19501     ac_cpp_err=
19502   fi
19503 else
19504   ac_cpp_err=yes
19505 fi
19506 if test -z "$ac_cpp_err"; then
19507   eval "$as_ac_Header=yes"
19508 else
19509   echo "$as_me: failed program was:" >&5
19510   cat conftest.$ac_ext >&5
19511   eval "$as_ac_Header=no"
19512 fi
19513 rm -f conftest.err conftest.$ac_ext
19514 fi
19515 echo "$as_me:19515: result: `eval echo '${'$as_ac_Header'}'`" >&5
19516 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19517 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19518   cat >>confdefs.h <<EOF
19519 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19520 EOF
19521
19522 fi
19523 done
19524
19525 for ac_header in iostream
19526 do
19527 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19528 echo "$as_me:19528: checking for $ac_header" >&5
19529 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19530 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19531   echo $ECHO_N "(cached) $ECHO_C" >&6
19532 else
19533   cat >conftest.$ac_ext <<_ACEOF
19534 #line 19534 "configure"
19535 #include "confdefs.h"
19536 #include <$ac_header>
19537 _ACEOF
19538 if { (eval echo "$as_me:19538: \"$ac_cpp conftest.$ac_ext\"") >&5
19539   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19540   ac_status=$?
19541   egrep -v '^ *\+' conftest.er1 >conftest.err
19542   rm -f conftest.er1
19543   cat conftest.err >&5
19544   echo "$as_me:19544: \$? = $ac_status" >&5
19545   (exit $ac_status); } >/dev/null; then
19546   if test -s conftest.err; then
19547     ac_cpp_err=$ac_cxx_preproc_warn_flag
19548   else
19549     ac_cpp_err=
19550   fi
19551 else
19552   ac_cpp_err=yes
19553 fi
19554 if test -z "$ac_cpp_err"; then
19555   eval "$as_ac_Header=yes"
19556 else
19557   echo "$as_me: failed program was:" >&5
19558   cat conftest.$ac_ext >&5
19559   eval "$as_ac_Header=no"
19560 fi
19561 rm -f conftest.err conftest.$ac_ext
19562 fi
19563 echo "$as_me:19563: result: `eval echo '${'$as_ac_Header'}'`" >&5
19564 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19565 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19566   cat >>confdefs.h <<EOF
19567 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19568 EOF
19569
19570 fi
19571 done
19572
19573 if test x"$ac_cv_header_iostream" = xyes ; then
19574         echo "$as_me:19574: checking if iostream uses std-namespace" >&5
19575 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19576         cat >conftest.$ac_ext <<_ACEOF
19577 #line 19577 "configure"
19578 #include "confdefs.h"
19579
19580 #include <iostream>
19581 using std::endl;
19582 using std::cerr;
19583 int
19584 main ()
19585 {
19586
19587 cerr << "testing" << endl;
19588
19589   ;
19590   return 0;
19591 }
19592 _ACEOF
19593 rm -f conftest.$ac_objext
19594 if { (eval echo "$as_me:19594: \"$ac_compile\"") >&5
19595   (eval $ac_compile) 2>&5
19596   ac_status=$?
19597   echo "$as_me:19597: \$? = $ac_status" >&5
19598   (exit $ac_status); } &&
19599          { ac_try='test -s conftest.$ac_objext'
19600   { (eval echo "$as_me:19600: \"$ac_try\"") >&5
19601   (eval $ac_try) 2>&5
19602   ac_status=$?
19603   echo "$as_me:19603: \$? = $ac_status" >&5
19604   (exit $ac_status); }; }; then
19605   cf_iostream_namespace=yes
19606 else
19607   echo "$as_me: failed program was:" >&5
19608 cat conftest.$ac_ext >&5
19609 cf_iostream_namespace=no
19610 fi
19611 rm -f conftest.$ac_objext conftest.$ac_ext
19612         echo "$as_me:19612: result: $cf_iostream_namespace" >&5
19613 echo "${ECHO_T}$cf_iostream_namespace" >&6
19614         if test "$cf_iostream_namespace" = yes ; then
19615
19616 cat >>confdefs.h <<\EOF
19617 #define IOSTREAM_NAMESPACE 1
19618 EOF
19619
19620         fi
19621 fi
19622
19623 echo "$as_me:19623: checking if we should include stdbool.h" >&5
19624 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19625
19626 if test "${cf_cv_header_stdbool_h+set}" = set; then
19627   echo $ECHO_N "(cached) $ECHO_C" >&6
19628 else
19629
19630         cat >conftest.$ac_ext <<_ACEOF
19631 #line 19631 "configure"
19632 #include "confdefs.h"
19633
19634 int
19635 main ()
19636 {
19637 bool foo = false
19638   ;
19639   return 0;
19640 }
19641 _ACEOF
19642 rm -f conftest.$ac_objext
19643 if { (eval echo "$as_me:19643: \"$ac_compile\"") >&5
19644   (eval $ac_compile) 2>&5
19645   ac_status=$?
19646   echo "$as_me:19646: \$? = $ac_status" >&5
19647   (exit $ac_status); } &&
19648          { ac_try='test -s conftest.$ac_objext'
19649   { (eval echo "$as_me:19649: \"$ac_try\"") >&5
19650   (eval $ac_try) 2>&5
19651   ac_status=$?
19652   echo "$as_me:19652: \$? = $ac_status" >&5
19653   (exit $ac_status); }; }; then
19654   cf_cv_header_stdbool_h=0
19655 else
19656   echo "$as_me: failed program was:" >&5
19657 cat conftest.$ac_ext >&5
19658 cat >conftest.$ac_ext <<_ACEOF
19659 #line 19659 "configure"
19660 #include "confdefs.h"
19661
19662 #ifndef __BEOS__
19663 #include <stdbool.h>
19664 #endif
19665
19666 int
19667 main ()
19668 {
19669 bool foo = false
19670   ;
19671   return 0;
19672 }
19673 _ACEOF
19674 rm -f conftest.$ac_objext
19675 if { (eval echo "$as_me:19675: \"$ac_compile\"") >&5
19676   (eval $ac_compile) 2>&5
19677   ac_status=$?
19678   echo "$as_me:19678: \$? = $ac_status" >&5
19679   (exit $ac_status); } &&
19680          { ac_try='test -s conftest.$ac_objext'
19681   { (eval echo "$as_me:19681: \"$ac_try\"") >&5
19682   (eval $ac_try) 2>&5
19683   ac_status=$?
19684   echo "$as_me:19684: \$? = $ac_status" >&5
19685   (exit $ac_status); }; }; then
19686   cf_cv_header_stdbool_h=1
19687 else
19688   echo "$as_me: failed program was:" >&5
19689 cat conftest.$ac_ext >&5
19690 cf_cv_header_stdbool_h=0
19691 fi
19692 rm -f conftest.$ac_objext conftest.$ac_ext
19693 fi
19694 rm -f conftest.$ac_objext conftest.$ac_ext
19695 fi
19696
19697 if test "$cf_cv_header_stdbool_h" = 1
19698 then    echo "$as_me:19698: result: yes" >&5
19699 echo "${ECHO_T}yes" >&6
19700 else    echo "$as_me:19700: result: no" >&5
19701 echo "${ECHO_T}no" >&6
19702 fi
19703
19704 echo "$as_me:19704: checking for builtin bool type" >&5
19705 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19706
19707 if test "${cf_cv_builtin_bool+set}" = set; then
19708   echo $ECHO_N "(cached) $ECHO_C" >&6
19709 else
19710
19711         cat >conftest.$ac_ext <<_ACEOF
19712 #line 19712 "configure"
19713 #include "confdefs.h"
19714
19715 #include <stdio.h>
19716 #include <sys/types.h>
19717
19718 int
19719 main ()
19720 {
19721 bool x = false
19722   ;
19723   return 0;
19724 }
19725 _ACEOF
19726 rm -f conftest.$ac_objext
19727 if { (eval echo "$as_me:19727: \"$ac_compile\"") >&5
19728   (eval $ac_compile) 2>&5
19729   ac_status=$?
19730   echo "$as_me:19730: \$? = $ac_status" >&5
19731   (exit $ac_status); } &&
19732          { ac_try='test -s conftest.$ac_objext'
19733   { (eval echo "$as_me:19733: \"$ac_try\"") >&5
19734   (eval $ac_try) 2>&5
19735   ac_status=$?
19736   echo "$as_me:19736: \$? = $ac_status" >&5
19737   (exit $ac_status); }; }; then
19738   cf_cv_builtin_bool=1
19739 else
19740   echo "$as_me: failed program was:" >&5
19741 cat conftest.$ac_ext >&5
19742 cf_cv_builtin_bool=0
19743 fi
19744 rm -f conftest.$ac_objext conftest.$ac_ext
19745
19746 fi
19747
19748 if test "$cf_cv_builtin_bool" = 1
19749 then    echo "$as_me:19749: result: yes" >&5
19750 echo "${ECHO_T}yes" >&6
19751 else    echo "$as_me:19751: result: no" >&5
19752 echo "${ECHO_T}no" >&6
19753 fi
19754
19755 echo "$as_me:19755: checking for size of bool" >&5
19756 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19757 if test "${cf_cv_type_of_bool+set}" = set; then
19758   echo $ECHO_N "(cached) $ECHO_C" >&6
19759 else
19760
19761         rm -f cf_test.out
19762         if test "$cross_compiling" = yes; then
19763   cf_cv_type_of_bool=unknown
19764 else
19765   cat >conftest.$ac_ext <<_ACEOF
19766 #line 19766 "configure"
19767 #include "confdefs.h"
19768
19769 #include <stdlib.h>
19770 #include <stdio.h>
19771
19772 #if defined(__cplusplus)
19773
19774 #ifdef HAVE_GXX_BUILTIN_H
19775 #include <g++/builtin.h>
19776 #elif HAVE_GPP_BUILTIN_H
19777 #include <gpp/builtin.h>
19778 #elif HAVE_BUILTIN_H
19779 #include <builtin.h>
19780 #endif
19781
19782 #else
19783
19784 #if $cf_cv_header_stdbool_h
19785 #include <stdbool.h>
19786 #endif
19787
19788 #endif
19789
19790 int main()
19791 {
19792         FILE *fp = fopen("cf_test.out", "w");
19793         if (fp != 0) {
19794                 bool x = true;
19795                 if ((bool)(-x) >= 0)
19796                         fputs("unsigned ", fp);
19797                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19798                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19799                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19800                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19801                 fclose(fp);
19802         }
19803         ${cf_cv_main_return:-return}(0);
19804 }
19805
19806 _ACEOF
19807 rm -f conftest$ac_exeext
19808 if { (eval echo "$as_me:19808: \"$ac_link\"") >&5
19809   (eval $ac_link) 2>&5
19810   ac_status=$?
19811   echo "$as_me:19811: \$? = $ac_status" >&5
19812   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19813   { (eval echo "$as_me:19813: \"$ac_try\"") >&5
19814   (eval $ac_try) 2>&5
19815   ac_status=$?
19816   echo "$as_me:19816: \$? = $ac_status" >&5
19817   (exit $ac_status); }; }; then
19818   cf_cv_type_of_bool=`cat cf_test.out`
19819                  if test -z "$cf_cv_type_of_bool"; then
19820                    cf_cv_type_of_bool=unknown
19821                  fi
19822 else
19823   echo "$as_me: program exited with status $ac_status" >&5
19824 echo "$as_me: failed program was:" >&5
19825 cat conftest.$ac_ext >&5
19826 cf_cv_type_of_bool=unknown
19827 fi
19828 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19829 fi
19830
19831 fi
19832
19833         rm -f cf_test.out
19834 echo "$as_me:19834: result: $cf_cv_type_of_bool" >&5
19835 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19836 if test "$cf_cv_type_of_bool" = unknown ; then
19837         case .$NCURSES_BOOL in #(vi
19838         .auto|.) NCURSES_BOOL=unsigned;;
19839         esac
19840         { echo "$as_me:19840: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19841 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19842         cf_cv_type_of_bool=$NCURSES_BOOL
19843 fi
19844
19845 echo "$as_me:19845: checking for special defines needed for etip.h" >&5
19846 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19847 cf_save_CXXFLAGS="$CXXFLAGS"
19848 cf_result="none"
19849
19850 # etip.h includes ncurses.h which includes ncurses_dll.h
19851 # But ncurses_dll.h is generated - fix here.
19852 test -d include || mkdir include
19853 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
19854
19855 for cf_math in "" MATH_H
19856 do
19857 for cf_excp in "" MATH_EXCEPTION
19858 do
19859         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19860         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19861         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19862 cat >conftest.$ac_ext <<_ACEOF
19863 #line 19863 "configure"
19864 #include "confdefs.h"
19865
19866 #include <etip.h.in>
19867
19868 int
19869 main ()
19870 {
19871
19872   ;
19873   return 0;
19874 }
19875 _ACEOF
19876 rm -f conftest.$ac_objext
19877 if { (eval echo "$as_me:19877: \"$ac_compile\"") >&5
19878   (eval $ac_compile) 2>&5
19879   ac_status=$?
19880   echo "$as_me:19880: \$? = $ac_status" >&5
19881   (exit $ac_status); } &&
19882          { ac_try='test -s conftest.$ac_objext'
19883   { (eval echo "$as_me:19883: \"$ac_try\"") >&5
19884   (eval $ac_try) 2>&5
19885   ac_status=$?
19886   echo "$as_me:19886: \$? = $ac_status" >&5
19887   (exit $ac_status); }; }; then
19888
19889         test -n "$cf_math" && cat >>confdefs.h <<EOF
19890 #define ETIP_NEEDS_${cf_math} 1
19891 EOF
19892
19893         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19894 #define ETIP_NEEDS_${cf_excp} 1
19895 EOF
19896
19897         cf_result="$cf_math $cf_excp"
19898         break 2
19899
19900 else
19901   echo "$as_me: failed program was:" >&5
19902 cat conftest.$ac_ext >&5
19903 fi
19904 rm -f conftest.$ac_objext conftest.$ac_ext
19905 done
19906 done
19907 echo "$as_me:19907: result: $cf_result" >&5
19908 echo "${ECHO_T}$cf_result" >&6
19909 CXXFLAGS="$cf_save_CXXFLAGS"
19910
19911 if test -n "$CXX"; then
19912 echo "$as_me:19912: checking if $CXX accepts parameter initialization" >&5
19913 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19914 if test "${cf_cv_cpp_param_init+set}" = set; then
19915   echo $ECHO_N "(cached) $ECHO_C" >&6
19916 else
19917
19918         ac_ext=cc
19919 ac_cpp='$CXXCPP $CPPFLAGS'
19920 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19921 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19922 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19923 ac_main_return=return
19924
19925         if test "$cross_compiling" = yes; then
19926   cf_cv_cpp_param_init=unknown
19927 else
19928   cat >conftest.$ac_ext <<_ACEOF
19929 #line 19929 "configure"
19930 #include "confdefs.h"
19931
19932 class TEST {
19933 private:
19934         int value;
19935 public:
19936         TEST(int x = 1);
19937         ~TEST();
19938 };
19939
19940 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19941 {
19942         value = x;
19943 }
19944 int main() { }
19945
19946 _ACEOF
19947 rm -f conftest$ac_exeext
19948 if { (eval echo "$as_me:19948: \"$ac_link\"") >&5
19949   (eval $ac_link) 2>&5
19950   ac_status=$?
19951   echo "$as_me:19951: \$? = $ac_status" >&5
19952   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19953   { (eval echo "$as_me:19953: \"$ac_try\"") >&5
19954   (eval $ac_try) 2>&5
19955   ac_status=$?
19956   echo "$as_me:19956: \$? = $ac_status" >&5
19957   (exit $ac_status); }; }; then
19958   cf_cv_cpp_param_init=yes
19959 else
19960   echo "$as_me: program exited with status $ac_status" >&5
19961 echo "$as_me: failed program was:" >&5
19962 cat conftest.$ac_ext >&5
19963 cf_cv_cpp_param_init=no
19964 fi
19965 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19966 fi
19967         ac_ext=cc
19968 ac_cpp='$CXXCPP $CPPFLAGS'
19969 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19970 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19971 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19972 ac_main_return=return
19973
19974 fi
19975 echo "$as_me:19975: result: $cf_cv_cpp_param_init" >&5
19976 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19977 fi
19978 test "$cf_cv_cpp_param_init" = yes &&
19979 cat >>confdefs.h <<\EOF
19980 #define CPP_HAS_PARAM_INIT 1
19981 EOF
19982
19983 if test -n "$CXX"; then
19984
19985 echo "$as_me:19985: checking if $CXX accepts static_cast" >&5
19986 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19987 if test "${cf_cv_cpp_static_cast+set}" = set; then
19988   echo $ECHO_N "(cached) $ECHO_C" >&6
19989 else
19990
19991         ac_ext=cc
19992 ac_cpp='$CXXCPP $CPPFLAGS'
19993 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19994 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19995 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19996 ac_main_return=return
19997
19998         cat >conftest.$ac_ext <<_ACEOF
19999 #line 19999 "configure"
20000 #include "confdefs.h"
20001
20002 class NCursesPanel
20003 {
20004 public:
20005   NCursesPanel(int nlines,
20006                int ncols,
20007                int begin_y = 0,
20008                int begin_x = 0)
20009   {
20010   }
20011   NCursesPanel();
20012   ~NCursesPanel();
20013 };
20014
20015 template<class T> class NCursesUserPanel : public NCursesPanel
20016 {
20017 public:
20018   NCursesUserPanel (int nlines,
20019                     int ncols,
20020                     int begin_y = 0,
20021                     int begin_x = 0,
20022                     const T* p_UserData = static_cast<T*>(0))
20023     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20024   {
20025   };
20026   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20027   {
20028   };
20029
20030   virtual ~NCursesUserPanel() {};
20031 };
20032
20033 int
20034 main ()
20035 {
20036
20037         const char* p_UserData = static_cast<char*>(0)
20038   ;
20039   return 0;
20040 }
20041 _ACEOF
20042 rm -f conftest.$ac_objext
20043 if { (eval echo "$as_me:20043: \"$ac_compile\"") >&5
20044   (eval $ac_compile) 2>&5
20045   ac_status=$?
20046   echo "$as_me:20046: \$? = $ac_status" >&5
20047   (exit $ac_status); } &&
20048          { ac_try='test -s conftest.$ac_objext'
20049   { (eval echo "$as_me:20049: \"$ac_try\"") >&5
20050   (eval $ac_try) 2>&5
20051   ac_status=$?
20052   echo "$as_me:20052: \$? = $ac_status" >&5
20053   (exit $ac_status); }; }; then
20054   cf_cv_cpp_static_cast=yes
20055 else
20056   echo "$as_me: failed program was:" >&5
20057 cat conftest.$ac_ext >&5
20058 cf_cv_cpp_static_cast=no
20059 fi
20060 rm -f conftest.$ac_objext conftest.$ac_ext
20061
20062         ac_ext=cc
20063 ac_cpp='$CXXCPP $CPPFLAGS'
20064 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20065 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20066 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20067 ac_main_return=return
20068
20069 fi
20070 echo "$as_me:20070: result: $cf_cv_cpp_static_cast" >&5
20071 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20072
20073 fi
20074
20075 test "$cf_cv_cpp_static_cast" = yes &&
20076 cat >>confdefs.h <<\EOF
20077 #define CPP_HAS_STATIC_CAST 1
20078 EOF
20079
20080         CXX_AR='$(AR)'
20081         CXX_ARFLAGS='$(ARFLAGS)'
20082         case $cf_cv_system_name in #(vi
20083         irix*) #(vi
20084             if test "$GXX" != yes ; then
20085                 CXX_AR='$(CXX)'
20086                 CXX_ARFLAGS='-ar -o'
20087             fi
20088             ;;
20089         sco3.2v5*) #(vi
20090             CXXLDFLAGS="-u main"
20091             ;;
20092         solaris2*)
20093             if test "$GXX" != yes ; then
20094                 CXX_AR='$(CXX)'
20095                 CXX_ARFLAGS='-xar -o'
20096             fi
20097             ;;
20098         esac
20099
20100 else
20101         cf_cxx_library=no
20102         cf_cv_builtin_bool=1
20103
20104         # Just because we are not configuring against C++ right now does not
20105         # mean that a user will not want to use C++.  Some distributors disable
20106         # the C++ portion of this configuration as a shortcut (or just to avoid
20107         # compiling the demo in the c++ directory).  So we need a reasonable
20108         # default for the 'bool' type.
20109         #
20110         # Caveat: since the storage of the bool type is not standardized, it
20111         # may change.
20112
20113         if test "$NCURSES_BOOL" != auto ; then
20114                 cf_cv_type_of_bool=$NCURSES_BOOL
20115                 cf_cv_header_stdbool_h=0
20116         else
20117                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20118
20119 echo "$as_me:20119: checking for size of bool" >&5
20120 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20121 if test "${cf_cv_type_of_bool+set}" = set; then
20122   echo $ECHO_N "(cached) $ECHO_C" >&6
20123 else
20124
20125         rm -f cf_test.out
20126         if test "$cross_compiling" = yes; then
20127   cf_cv_type_of_bool=unknown
20128 else
20129   cat >conftest.$ac_ext <<_ACEOF
20130 #line 20130 "configure"
20131 #include "confdefs.h"
20132
20133 #include <stdlib.h>
20134 #include <stdio.h>
20135
20136 #if defined(__cplusplus)
20137
20138 #ifdef HAVE_GXX_BUILTIN_H
20139 #include <g++/builtin.h>
20140 #elif HAVE_GPP_BUILTIN_H
20141 #include <gpp/builtin.h>
20142 #elif HAVE_BUILTIN_H
20143 #include <builtin.h>
20144 #endif
20145
20146 #else
20147
20148 #if $cf_cv_header_stdbool_h
20149 #include <stdbool.h>
20150 #endif
20151
20152 #endif
20153
20154 int main()
20155 {
20156         FILE *fp = fopen("cf_test.out", "w");
20157         if (fp != 0) {
20158                 bool x = true;
20159                 if ((bool)(-x) >= 0)
20160                         fputs("unsigned ", fp);
20161                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20162                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20163                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20164                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20165                 fclose(fp);
20166         }
20167         ${cf_cv_main_return:-return}(0);
20168 }
20169
20170 _ACEOF
20171 rm -f conftest$ac_exeext
20172 if { (eval echo "$as_me:20172: \"$ac_link\"") >&5
20173   (eval $ac_link) 2>&5
20174   ac_status=$?
20175   echo "$as_me:20175: \$? = $ac_status" >&5
20176   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20177   { (eval echo "$as_me:20177: \"$ac_try\"") >&5
20178   (eval $ac_try) 2>&5
20179   ac_status=$?
20180   echo "$as_me:20180: \$? = $ac_status" >&5
20181   (exit $ac_status); }; }; then
20182   cf_cv_type_of_bool=`cat cf_test.out`
20183                  if test -z "$cf_cv_type_of_bool"; then
20184                    cf_cv_type_of_bool=unknown
20185                  fi
20186 else
20187   echo "$as_me: program exited with status $ac_status" >&5
20188 echo "$as_me: failed program was:" >&5
20189 cat conftest.$ac_ext >&5
20190 cf_cv_type_of_bool=unknown
20191 fi
20192 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20193 fi
20194
20195 fi
20196
20197         rm -f cf_test.out
20198 echo "$as_me:20198: result: $cf_cv_type_of_bool" >&5
20199 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20200 if test "$cf_cv_type_of_bool" = unknown ; then
20201         case .$NCURSES_BOOL in #(vi
20202         .auto|.) NCURSES_BOOL=unsigned;;
20203         esac
20204         { echo "$as_me:20204: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20205 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20206         cf_cv_type_of_bool=$NCURSES_BOOL
20207 fi
20208
20209                 else
20210                         echo "$as_me:20210: checking for fallback type of bool" >&5
20211 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20212                         case "$host_cpu" in #(vi
20213                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20214                         *)      cf_cv_type_of_bool=int  ;;
20215                         esac
20216                         echo "$as_me:20216: result: $cf_cv_type_of_bool" >&5
20217 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20218                 fi
20219         fi
20220 fi
20221
20222 # If the C compiler did not declare bool, and we did not determine that the C++
20223 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20224 # ncurses library use the same type as C++ bool.  Note that this allows one to
20225 # specify the type of bool in a configure-script option and postpone
20226 # integration with the C++ compiler provided that the types are compatible.
20227 USE_CXX_BOOL=1
20228 if test $cf_cv_cc_bool_type = 1
20229 then
20230         # oops: C has a bool.  Unlikely, but C++ could differ.
20231         USE_CXX_BOOL=0
20232 elif test $cf_cv_builtin_bool = 0
20233 then
20234         # C++ has no bool
20235         USE_CXX_BOOL=0
20236 else
20237         # this is the normal case
20238         USE_CXX_BOOL='defined(__cplusplus)'
20239 fi
20240
20241 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20242
20243         if test "$cf_with_ada" != "no" ; then
20244                 if test "$with_libtool" != "no"; then
20245                         { echo "$as_me:20245: WARNING: libtool does not support Ada - disabling feature" >&5
20246 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20247                         cf_with_ada=no
20248                 fi
20249         fi
20250
20251         if test "$cf_with_ada" != "no" ; then
20252
20253 cf_ada_make=gnatmake
20254 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20255 set dummy $cf_ada_make; ac_word=$2
20256 echo "$as_me:20256: checking for $ac_word" >&5
20257 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20258 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20259   echo $ECHO_N "(cached) $ECHO_C" >&6
20260 else
20261   if test -n "$gnat_exists"; then
20262   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20263 else
20264   ac_save_IFS=$IFS; IFS=$ac_path_separator
20265 ac_dummy="$PATH"
20266 for ac_dir in $ac_dummy; do
20267   IFS=$ac_save_IFS
20268   test -z "$ac_dir" && ac_dir=.
20269   $as_executable_p "$ac_dir/$ac_word" || continue
20270 ac_cv_prog_gnat_exists="yes"
20271 echo "$as_me:20271: found $ac_dir/$ac_word" >&5
20272 break
20273 done
20274
20275   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20276 fi
20277 fi
20278 gnat_exists=$ac_cv_prog_gnat_exists
20279 if test -n "$gnat_exists"; then
20280   echo "$as_me:20280: result: $gnat_exists" >&5
20281 echo "${ECHO_T}$gnat_exists" >&6
20282 else
20283   echo "$as_me:20283: result: no" >&5
20284 echo "${ECHO_T}no" >&6
20285 fi
20286
20287 if test "$ac_cv_prog_gnat_exists" = no; then
20288    cf_ada_make=
20289    cf_cv_prog_gnat_correct=no
20290 else
20291
20292 echo "$as_me:20292: checking for gnat version" >&5
20293 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20294 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20295         grep '[0-9].[0-9][0-9]*' |\
20296     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20297 echo "$as_me:20297: result: $cf_gnat_version" >&5
20298 echo "${ECHO_T}$cf_gnat_version" >&6
20299
20300 case $cf_gnat_version in #(vi
20301 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20302         cf_cv_prog_gnat_correct=yes
20303         ;;
20304 *)
20305         { echo "$as_me:20305: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20306 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20307         cf_cv_prog_gnat_correct=no
20308         ;;
20309 esac
20310
20311    # Extract the first word of "m4", so it can be a program name with args.
20312 set dummy m4; ac_word=$2
20313 echo "$as_me:20313: checking for $ac_word" >&5
20314 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20315 if test "${ac_cv_prog_M4_exists+set}" = set; then
20316   echo $ECHO_N "(cached) $ECHO_C" >&6
20317 else
20318   if test -n "$M4_exists"; then
20319   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20320 else
20321   ac_save_IFS=$IFS; IFS=$ac_path_separator
20322 ac_dummy="$PATH"
20323 for ac_dir in $ac_dummy; do
20324   IFS=$ac_save_IFS
20325   test -z "$ac_dir" && ac_dir=.
20326   $as_executable_p "$ac_dir/$ac_word" || continue
20327 ac_cv_prog_M4_exists="yes"
20328 echo "$as_me:20328: found $ac_dir/$ac_word" >&5
20329 break
20330 done
20331
20332   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20333 fi
20334 fi
20335 M4_exists=$ac_cv_prog_M4_exists
20336 if test -n "$M4_exists"; then
20337   echo "$as_me:20337: result: $M4_exists" >&5
20338 echo "${ECHO_T}$M4_exists" >&6
20339 else
20340   echo "$as_me:20340: result: no" >&5
20341 echo "${ECHO_T}no" >&6
20342 fi
20343
20344    if test "$ac_cv_prog_M4_exists" = no; then
20345       cf_cv_prog_gnat_correct=no
20346       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20347    fi
20348    if test "$cf_cv_prog_gnat_correct" = yes; then
20349       echo "$as_me:20349: checking if GNAT works" >&5
20350 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20351
20352 rm -rf conftest* *~conftest*
20353 cat >>conftest.ads <<CF_EOF
20354 procedure conftest;
20355 CF_EOF
20356 cat >>conftest.adb <<CF_EOF
20357 with Text_IO;
20358 with GNAT.OS_Lib;
20359 procedure conftest is
20360 begin
20361    Text_IO.Put ("Hello World");
20362    Text_IO.New_Line;
20363    GNAT.OS_Lib.OS_Exit (0);
20364 end conftest;
20365 CF_EOF
20366 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20367    if ( ./conftest 1>&5 2>&1 ) ; then
20368       cf_cv_prog_gnat_correct=yes
20369    else
20370       cf_cv_prog_gnat_correct=no
20371    fi
20372 else
20373    cf_cv_prog_gnat_correct=no
20374 fi
20375 rm -rf conftest* *~conftest*
20376
20377       echo "$as_me:20377: result: $cf_cv_prog_gnat_correct" >&5
20378 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20379    fi
20380 fi
20381
20382                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20383
20384         ADAFLAGS="$ADAFLAGS -gnatpn"
20385
20386         echo "$as_me:20386: checking optimization options for ADAFLAGS" >&5
20387 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20388         case "$CFLAGS" in
20389         *-g*)
20390
20391         ADAFLAGS="$ADAFLAGS -g"
20392
20393                 ;;
20394         esac
20395         case "$CFLAGS" in
20396         *-O*)
20397                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20398
20399         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20400
20401                 ;;
20402         esac
20403         echo "$as_me:20403: result: $ADAFLAGS" >&5
20404 echo "${ECHO_T}$ADAFLAGS" >&6
20405
20406 echo "$as_me:20406: checking if GNATPREP supports -T option" >&5
20407 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20408 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20409   echo $ECHO_N "(cached) $ECHO_C" >&6
20410 else
20411
20412 cf_cv_gnatprep_opt_t=no
20413 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20414
20415 fi
20416 echo "$as_me:20416: result: $cf_cv_gnatprep_opt_t" >&5
20417 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20418 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20419
20420 echo "$as_me:20420: checking if GNAT supports generics" >&5
20421 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20422 case $cf_gnat_version in #(vi
20423 3.[1-9]*|[4-9].*) #(vi
20424         cf_gnat_generics=yes
20425         ;;
20426 *)
20427         cf_gnat_generics=no
20428         ;;
20429 esac
20430 echo "$as_me:20430: result: $cf_gnat_generics" >&5
20431 echo "${ECHO_T}$cf_gnat_generics" >&6
20432
20433 if test "$cf_gnat_generics" = yes
20434 then
20435         cf_compile_generics=generics
20436         cf_generic_objects="\${GENOBJS}"
20437 else
20438         cf_compile_generics=
20439         cf_generic_objects=
20440 fi
20441
20442 echo "$as_me:20442: checking if GNAT supports SIGINT" >&5
20443 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20444 if test "${cf_cv_gnat_sigint+set}" = set; then
20445   echo $ECHO_N "(cached) $ECHO_C" >&6
20446 else
20447
20448 rm -rf conftest* *~conftest*
20449 cat >>conftest.ads <<CF_EOF
20450 with Ada.Interrupts.Names;
20451
20452 package ConfTest is
20453
20454    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20455    pragma Unreserve_All_Interrupts;
20456    pragma Warnings (On);
20457
20458    protected Process is
20459       procedure Stop;
20460       function Continue return Boolean;
20461       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20462    private
20463       Done : Boolean := False;
20464    end Process;
20465
20466 end ConfTest;
20467 CF_EOF
20468 cat >>conftest.adb <<CF_EOF
20469 package body ConfTest is
20470    protected body Process is
20471       procedure Stop is
20472       begin
20473          Done := True;
20474       end Stop;
20475       function Continue return Boolean is
20476       begin
20477          return not Done;
20478       end Continue;
20479    end Process;
20480 end ConfTest;
20481 CF_EOF
20482 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20483       cf_cv_gnat_sigint=yes
20484 else
20485    cf_cv_gnat_sigint=no
20486 fi
20487 rm -rf conftest* *~conftest*
20488
20489 fi
20490 echo "$as_me:20490: result: $cf_cv_gnat_sigint" >&5
20491 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20492
20493 if test $cf_cv_gnat_sigint = yes ; then
20494         USE_GNAT_SIGINT=""
20495 else
20496         USE_GNAT_SIGINT="#"
20497 fi
20498
20499 cf_gnat_libraries=no
20500 cf_gnat_projects=no
20501
20502 if test "$enable_gnat_projects" != no ; then
20503 echo "$as_me:20503: checking if GNAT supports project files" >&5
20504 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20505 case $cf_gnat_version in #(vi
20506 3.[0-9]*) #(vi
20507         ;;
20508 *)
20509         case $cf_cv_system_name in #(vi
20510         cygwin*|msys*) #(vi
20511                 ;;
20512         *)
20513                 mkdir conftest.src conftest.bin conftest.lib
20514                 cd conftest.src
20515                 rm -rf conftest* *~conftest*
20516                 cat >>library.gpr <<CF_EOF
20517 project Library is
20518   Kind := External ("LIB_KIND");
20519   for Library_Name use "ConfTest";
20520   for Object_Dir use ".";
20521   for Library_ALI_Dir use External("LIBRARY_DIR");
20522   for Library_Version use External ("SONAME");
20523   for Library_Kind use Kind;
20524   for Library_Dir use External("BUILD_DIR");
20525   Source_Dir := External ("SOURCE_DIR");
20526   for Source_Dirs use (Source_Dir);
20527 end Library;
20528 CF_EOF
20529                 cat >>confpackage.ads <<CF_EOF
20530 package ConfPackage is
20531    procedure conftest;
20532 end ConfPackage;
20533 CF_EOF
20534                 cat >>confpackage.adb <<CF_EOF
20535 with Text_IO;
20536 package body ConfPackage is
20537    procedure conftest is
20538    begin
20539       Text_IO.Put ("Hello World");
20540       Text_IO.New_Line;
20541    end conftest;
20542 end ConfPackage;
20543 CF_EOF
20544                 if ( $cf_ada_make $ADAFLAGS \
20545                                 -Plibrary.gpr \
20546                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20547                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20548                                 -XSOURCE_DIR=`pwd` \
20549                                 -XSONAME=libConfTest.so.1 \
20550                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20551                         cf_gnat_projects=yes
20552                 fi
20553                 cd ..
20554                 if test -f conftest.lib/confpackage.ali
20555                 then
20556                         cf_gnat_libraries=yes
20557                 fi
20558                 rm -rf conftest* *~conftest*
20559                 ;;
20560         esac
20561         ;;
20562 esac
20563 echo "$as_me:20563: result: $cf_gnat_projects" >&5
20564 echo "${ECHO_T}$cf_gnat_projects" >&6
20565 fi # enable_gnat_projects
20566
20567 if test $cf_gnat_projects = yes
20568 then
20569         echo "$as_me:20569: checking if GNAT supports libraries" >&5
20570 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20571         echo "$as_me:20571: result: $cf_gnat_libraries" >&5
20572 echo "${ECHO_T}$cf_gnat_libraries" >&6
20573 fi
20574
20575 if test "$cf_gnat_projects" = yes
20576 then
20577         USE_OLD_MAKERULES="#"
20578         USE_GNAT_PROJECTS=""
20579 else
20580         USE_OLD_MAKERULES=""
20581         USE_GNAT_PROJECTS="#"
20582 fi
20583
20584 if test "$cf_gnat_libraries" = yes
20585 then
20586         USE_GNAT_LIBRARIES=""
20587 else
20588         USE_GNAT_LIBRARIES="#"
20589 fi
20590
20591 echo "$as_me:20591: checking for ada-compiler" >&5
20592 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20593
20594 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20595 if test "${with_ada_compiler+set}" = set; then
20596   withval="$with_ada_compiler"
20597   cf_ada_compiler=$withval
20598 else
20599   cf_ada_compiler=gnatmake
20600 fi;
20601
20602 echo "$as_me:20602: result: $cf_ada_compiler" >&5
20603 echo "${ECHO_T}$cf_ada_compiler" >&6
20604
20605                         cf_ada_package=terminal_interface
20606
20607 echo "$as_me:20607: checking for ada-include" >&5
20608 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20609
20610 # Check whether --with-ada-include or --without-ada-include was given.
20611 if test "${with_ada_include+set}" = set; then
20612   withval="$with_ada_include"
20613
20614 else
20615   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20616 fi; if test -n "$prefix/share/ada/adainclude" ; then
20617
20618 if test "x$prefix" != xNONE; then
20619   cf_path_syntax="$prefix"
20620 else
20621   cf_path_syntax="$ac_default_prefix"
20622 fi
20623
20624 case ".$withval" in #(vi
20625 .\$\(*\)*|.\'*\'*) #(vi
20626   ;;
20627 ..|./*|.\\*) #(vi
20628   ;;
20629 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20630   ;;
20631 .\${*prefix}*|.\${*dir}*) #(vi
20632   eval withval="$withval"
20633   case ".$withval" in #(vi
20634   .NONE/*)
20635     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20636     ;;
20637   esac
20638   ;; #(vi
20639 .no|.NONE/*)
20640   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20641   ;;
20642 *)
20643   { { echo "$as_me:20643: error: expected a pathname, not \"$withval\"" >&5
20644 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20645    { (exit 1); exit 1; }; }
20646   ;;
20647 esac
20648
20649 fi
20650 eval ADA_INCLUDE="$withval"
20651
20652 echo "$as_me:20652: result: $ADA_INCLUDE" >&5
20653 echo "${ECHO_T}$ADA_INCLUDE" >&6
20654
20655 echo "$as_me:20655: checking for ada-objects" >&5
20656 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20657
20658 # Check whether --with-ada-objects or --without-ada-objects was given.
20659 if test "${with_ada_objects+set}" = set; then
20660   withval="$with_ada_objects"
20661
20662 else
20663   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20664 fi; if test -n "$prefix/lib/ada/adalib" ; then
20665
20666 if test "x$prefix" != xNONE; then
20667   cf_path_syntax="$prefix"
20668 else
20669   cf_path_syntax="$ac_default_prefix"
20670 fi
20671
20672 case ".$withval" in #(vi
20673 .\$\(*\)*|.\'*\'*) #(vi
20674   ;;
20675 ..|./*|.\\*) #(vi
20676   ;;
20677 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20678   ;;
20679 .\${*prefix}*|.\${*dir}*) #(vi
20680   eval withval="$withval"
20681   case ".$withval" in #(vi
20682   .NONE/*)
20683     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20684     ;;
20685   esac
20686   ;; #(vi
20687 .no|.NONE/*)
20688   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20689   ;;
20690 *)
20691   { { echo "$as_me:20691: error: expected a pathname, not \"$withval\"" >&5
20692 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20693    { (exit 1); exit 1; }; }
20694   ;;
20695 esac
20696
20697 fi
20698 eval ADA_OBJECTS="$withval"
20699
20700 echo "$as_me:20700: result: $ADA_OBJECTS" >&5
20701 echo "${ECHO_T}$ADA_OBJECTS" >&6
20702
20703 echo "$as_me:20703: checking if an Ada95 shared-library should be built" >&5
20704 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20705
20706 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20707 if test "${with_ada_sharedlib+set}" = set; then
20708   withval="$with_ada_sharedlib"
20709   with_ada_sharedlib=$withval
20710 else
20711   with_ada_sharedlib=no
20712 fi;
20713 echo "$as_me:20713: result: $with_ada_sharedlib" >&5
20714 echo "${ECHO_T}$with_ada_sharedlib" >&6
20715
20716 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20717 MAKE_ADA_SHAREDLIB="#"
20718
20719 if test "x$with_ada_sharedlib" != xno
20720 then
20721         MAKE_ADA_SHAREDLIB=
20722         if test "x$with_ada_sharedlib" != xyes
20723         then
20724                 ADA_SHAREDLIB="$with_ada_sharedlib"
20725         fi
20726 fi
20727
20728                 fi
20729         fi
20730 else
20731         cf_with_ada=no
20732 fi
20733
20734 # do this "late" to avoid conflict with header-checks
20735 if test "x$with_widec" = xyes ; then
20736         echo "$as_me:20736: checking for wchar_t" >&5
20737 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20738 if test "${ac_cv_type_wchar_t+set}" = set; then
20739   echo $ECHO_N "(cached) $ECHO_C" >&6
20740 else
20741   cat >conftest.$ac_ext <<_ACEOF
20742 #line 20742 "configure"
20743 #include "confdefs.h"
20744 $ac_includes_default
20745 int
20746 main ()
20747 {
20748 if ((wchar_t *) 0)
20749   return 0;
20750 if (sizeof (wchar_t))
20751   return 0;
20752   ;
20753   return 0;
20754 }
20755 _ACEOF
20756 rm -f conftest.$ac_objext
20757 if { (eval echo "$as_me:20757: \"$ac_compile\"") >&5
20758   (eval $ac_compile) 2>&5
20759   ac_status=$?
20760   echo "$as_me:20760: \$? = $ac_status" >&5
20761   (exit $ac_status); } &&
20762          { ac_try='test -s conftest.$ac_objext'
20763   { (eval echo "$as_me:20763: \"$ac_try\"") >&5
20764   (eval $ac_try) 2>&5
20765   ac_status=$?
20766   echo "$as_me:20766: \$? = $ac_status" >&5
20767   (exit $ac_status); }; }; then
20768   ac_cv_type_wchar_t=yes
20769 else
20770   echo "$as_me: failed program was:" >&5
20771 cat conftest.$ac_ext >&5
20772 ac_cv_type_wchar_t=no
20773 fi
20774 rm -f conftest.$ac_objext conftest.$ac_ext
20775 fi
20776 echo "$as_me:20776: result: $ac_cv_type_wchar_t" >&5
20777 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20778
20779 echo "$as_me:20779: checking size of wchar_t" >&5
20780 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20781 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20782   echo $ECHO_N "(cached) $ECHO_C" >&6
20783 else
20784   if test "$ac_cv_type_wchar_t" = yes; then
20785   if test "$cross_compiling" = yes; then
20786   # Depending upon the size, compute the lo and hi bounds.
20787 cat >conftest.$ac_ext <<_ACEOF
20788 #line 20788 "configure"
20789 #include "confdefs.h"
20790 $ac_includes_default
20791 int
20792 main ()
20793 {
20794 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20795   ;
20796   return 0;
20797 }
20798 _ACEOF
20799 rm -f conftest.$ac_objext
20800 if { (eval echo "$as_me:20800: \"$ac_compile\"") >&5
20801   (eval $ac_compile) 2>&5
20802   ac_status=$?
20803   echo "$as_me:20803: \$? = $ac_status" >&5
20804   (exit $ac_status); } &&
20805          { ac_try='test -s conftest.$ac_objext'
20806   { (eval echo "$as_me:20806: \"$ac_try\"") >&5
20807   (eval $ac_try) 2>&5
20808   ac_status=$?
20809   echo "$as_me:20809: \$? = $ac_status" >&5
20810   (exit $ac_status); }; }; then
20811   ac_lo=0 ac_mid=0
20812   while :; do
20813     cat >conftest.$ac_ext <<_ACEOF
20814 #line 20814 "configure"
20815 #include "confdefs.h"
20816 $ac_includes_default
20817 int
20818 main ()
20819 {
20820 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20821   ;
20822   return 0;
20823 }
20824 _ACEOF
20825 rm -f conftest.$ac_objext
20826 if { (eval echo "$as_me:20826: \"$ac_compile\"") >&5
20827   (eval $ac_compile) 2>&5
20828   ac_status=$?
20829   echo "$as_me:20829: \$? = $ac_status" >&5
20830   (exit $ac_status); } &&
20831          { ac_try='test -s conftest.$ac_objext'
20832   { (eval echo "$as_me:20832: \"$ac_try\"") >&5
20833   (eval $ac_try) 2>&5
20834   ac_status=$?
20835   echo "$as_me:20835: \$? = $ac_status" >&5
20836   (exit $ac_status); }; }; then
20837   ac_hi=$ac_mid; break
20838 else
20839   echo "$as_me: failed program was:" >&5
20840 cat conftest.$ac_ext >&5
20841 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20842 fi
20843 rm -f conftest.$ac_objext conftest.$ac_ext
20844   done
20845 else
20846   echo "$as_me: failed program was:" >&5
20847 cat conftest.$ac_ext >&5
20848 ac_hi=-1 ac_mid=-1
20849   while :; do
20850     cat >conftest.$ac_ext <<_ACEOF
20851 #line 20851 "configure"
20852 #include "confdefs.h"
20853 $ac_includes_default
20854 int
20855 main ()
20856 {
20857 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20858   ;
20859   return 0;
20860 }
20861 _ACEOF
20862 rm -f conftest.$ac_objext
20863 if { (eval echo "$as_me:20863: \"$ac_compile\"") >&5
20864   (eval $ac_compile) 2>&5
20865   ac_status=$?
20866   echo "$as_me:20866: \$? = $ac_status" >&5
20867   (exit $ac_status); } &&
20868          { ac_try='test -s conftest.$ac_objext'
20869   { (eval echo "$as_me:20869: \"$ac_try\"") >&5
20870   (eval $ac_try) 2>&5
20871   ac_status=$?
20872   echo "$as_me:20872: \$? = $ac_status" >&5
20873   (exit $ac_status); }; }; then
20874   ac_lo=$ac_mid; break
20875 else
20876   echo "$as_me: failed program was:" >&5
20877 cat conftest.$ac_ext >&5
20878 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20879 fi
20880 rm -f conftest.$ac_objext conftest.$ac_ext
20881   done
20882 fi
20883 rm -f conftest.$ac_objext conftest.$ac_ext
20884 # Binary search between lo and hi bounds.
20885 while test "x$ac_lo" != "x$ac_hi"; do
20886   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20887   cat >conftest.$ac_ext <<_ACEOF
20888 #line 20888 "configure"
20889 #include "confdefs.h"
20890 $ac_includes_default
20891 int
20892 main ()
20893 {
20894 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20895   ;
20896   return 0;
20897 }
20898 _ACEOF
20899 rm -f conftest.$ac_objext
20900 if { (eval echo "$as_me:20900: \"$ac_compile\"") >&5
20901   (eval $ac_compile) 2>&5
20902   ac_status=$?
20903   echo "$as_me:20903: \$? = $ac_status" >&5
20904   (exit $ac_status); } &&
20905          { ac_try='test -s conftest.$ac_objext'
20906   { (eval echo "$as_me:20906: \"$ac_try\"") >&5
20907   (eval $ac_try) 2>&5
20908   ac_status=$?
20909   echo "$as_me:20909: \$? = $ac_status" >&5
20910   (exit $ac_status); }; }; then
20911   ac_hi=$ac_mid
20912 else
20913   echo "$as_me: failed program was:" >&5
20914 cat conftest.$ac_ext >&5
20915 ac_lo=`expr $ac_mid + 1`
20916 fi
20917 rm -f conftest.$ac_objext conftest.$ac_ext
20918 done
20919 ac_cv_sizeof_wchar_t=$ac_lo
20920 else
20921   if test "$cross_compiling" = yes; then
20922   { { echo "$as_me:20922: error: cannot run test program while cross compiling" >&5
20923 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20924    { (exit 1); exit 1; }; }
20925 else
20926   cat >conftest.$ac_ext <<_ACEOF
20927 #line 20927 "configure"
20928 #include "confdefs.h"
20929 $ac_includes_default
20930 int
20931 main ()
20932 {
20933 FILE *f = fopen ("conftest.val", "w");
20934 if (!f)
20935   $ac_main_return (1);
20936 fprintf (f, "%d", (sizeof (wchar_t)));
20937 fclose (f);
20938   ;
20939   return 0;
20940 }
20941 _ACEOF
20942 rm -f conftest$ac_exeext
20943 if { (eval echo "$as_me:20943: \"$ac_link\"") >&5
20944   (eval $ac_link) 2>&5
20945   ac_status=$?
20946   echo "$as_me:20946: \$? = $ac_status" >&5
20947   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20948   { (eval echo "$as_me:20948: \"$ac_try\"") >&5
20949   (eval $ac_try) 2>&5
20950   ac_status=$?
20951   echo "$as_me:20951: \$? = $ac_status" >&5
20952   (exit $ac_status); }; }; then
20953   ac_cv_sizeof_wchar_t=`cat conftest.val`
20954 else
20955   echo "$as_me: program exited with status $ac_status" >&5
20956 echo "$as_me: failed program was:" >&5
20957 cat conftest.$ac_ext >&5
20958 fi
20959 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20960 fi
20961 fi
20962 rm -f conftest.val
20963 else
20964   ac_cv_sizeof_wchar_t=0
20965 fi
20966 fi
20967 echo "$as_me:20967: result: $ac_cv_sizeof_wchar_t" >&5
20968 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20969 cat >>confdefs.h <<EOF
20970 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20971 EOF
20972
20973 fi
20974
20975 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20976 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20977 ###
20978 ### ticlib modules may be a separate library, otherwise contained in termlib.
20979 ### termlib modules may be a separate library, otherwise contained in ncurses.
20980 ###
20981 ### The of "+" or " " between the tokens controls the way the script
20982 ### chooses to split module lists into libraries.
20983 ###
20984 ### (see CF_LIB_RULES).
20985 echo "$as_me:20985: checking for library subsets" >&5
20986 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20987 LIB_SUBSETS=
20988
20989 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20990         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20991         if test "$with_ticlib" != no ; then
20992                 LIB_SUBSETS="${LIB_SUBSETS} "
20993         else
20994                 LIB_SUBSETS="${LIB_SUBSETS}+"
20995         fi
20996 fi
20997
20998 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20999 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21000
21001 if test "$with_termlib" != no ; then
21002         LIB_SUBSETS="${LIB_SUBSETS} "
21003 else
21004         LIB_SUBSETS="${LIB_SUBSETS}+"
21005 fi
21006
21007 LIB_SUBSETS="${LIB_SUBSETS}base"
21008
21009 # Most term-driver calls are to tinfo, but some like init_pair are to the
21010 # base library (so it resides in base).
21011 if test "$with_term_driver" != no ; then
21012         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21013         case $cf_cv_system_name in #(vi
21014         *mingw32*|*mingw64*) #(vi
21015                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21016                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21017                 ;;
21018         *) #(vi
21019                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21020                 ;;
21021         esac
21022 fi
21023
21024 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21025 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21026
21027 echo "$as_me:21027: result: $LIB_SUBSETS" >&5
21028 echo "${ECHO_T}$LIB_SUBSETS" >&6
21029
21030 ### Construct the list of include-directories to be generated
21031
21032 if test "$srcdir" != "."; then
21033         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21034 fi
21035 CPPFLAGS="-I../include $CPPFLAGS"
21036 if test "$srcdir" != "."; then
21037         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21038 fi
21039 CPPFLAGS="-I. $CPPFLAGS"
21040
21041 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21042 if test "$srcdir" != "."; then
21043         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21044 fi
21045 if test "$GCC" != yes; then
21046         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21047 elif test "$includedir" != "/usr/include"; then
21048         if test "$includedir" = '${prefix}/include' ; then
21049                 if test x$prefix != x/usr ; then
21050                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21051                 fi
21052         else
21053                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21054         fi
21055 fi
21056
21057 ### Build up pieces for makefile rules
21058 echo "$as_me:21058: checking default library suffix" >&5
21059 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21060
21061         case $DFT_LWR_MODEL in
21062         libtool) DFT_ARG_SUFFIX=''   ;;
21063         normal)  DFT_ARG_SUFFIX=''   ;;
21064         debug)   DFT_ARG_SUFFIX='_g' ;;
21065         profile) DFT_ARG_SUFFIX='_p' ;;
21066         shared)  DFT_ARG_SUFFIX=''   ;;
21067         esac
21068         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21069 echo "$as_me:21069: result: $DFT_ARG_SUFFIX" >&5
21070 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21071
21072 echo "$as_me:21072: checking default library-dependency suffix" >&5
21073 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21074
21075         case X$DFT_LWR_MODEL in #(vi
21076         Xlibtool) #(vi
21077                 DFT_LIB_SUFFIX='.la'
21078                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21079                 ;;
21080         Xdebug) #(vi
21081                 DFT_LIB_SUFFIX='_g.a'
21082                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21083                 ;;
21084         Xprofile) #(vi
21085                 DFT_LIB_SUFFIX='_p.a'
21086                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21087                 ;;
21088         Xshared) #(vi
21089                 case $cf_cv_system_name in
21090                 aix[5-7]*) #(vi
21091                         DFT_LIB_SUFFIX='.so'
21092                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21093                         ;;
21094                 cygwin*|msys*|mingw*) #(vi
21095                         DFT_LIB_SUFFIX='.dll'
21096                         DFT_DEP_SUFFIX='.dll.a'
21097                         ;;
21098                 darwin*) #(vi
21099                         DFT_LIB_SUFFIX='.dylib'
21100                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21101                         ;;
21102                 hpux*) #(vi
21103                         case $target in
21104                         ia64*) #(vi
21105                                 DFT_LIB_SUFFIX='.so'
21106                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21107                                 ;;
21108                         *) #(vi
21109                                 DFT_LIB_SUFFIX='.sl'
21110                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21111                                 ;;
21112                         esac
21113                         ;;
21114                 *) #(vi
21115                         DFT_LIB_SUFFIX='.so'
21116                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21117                         ;;
21118                 esac
21119                 ;;
21120         *)
21121                 DFT_LIB_SUFFIX='.a'
21122                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21123                 ;;
21124         esac
21125         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
21126         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
21127 echo "$as_me:21127: result: $DFT_DEP_SUFFIX" >&5
21128 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21129
21130 echo "$as_me:21130: checking default object directory" >&5
21131 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21132
21133         case $DFT_LWR_MODEL in
21134         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21135         normal)  DFT_OBJ_SUBDIR='objects' ;;
21136         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21137         profile) DFT_OBJ_SUBDIR='obj_p' ;;
21138         shared)
21139                 case $cf_cv_system_name in #(vi
21140                 cygwin|msys) #(vi
21141                         DFT_OBJ_SUBDIR='objects' ;;
21142                 *)
21143                         DFT_OBJ_SUBDIR='obj_s' ;;
21144                 esac
21145         esac
21146 echo "$as_me:21146: result: $DFT_OBJ_SUBDIR" >&5
21147 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21148
21149 if test "x$cf_with_cxx" = xyes ; then
21150 echo "$as_me:21150: checking c++ library-dependency suffix" >&5
21151 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21152 if test "$with_libtool" != "no"; then
21153         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21154         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21155 elif test "$with_shared_cxx" != "no"; then
21156         # also for g++ users...
21157         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21158 else
21159         # we normally make a static library because C/C++ library rules differ
21160
21161         case Xnormal in #(vi
21162         Xlibtool) #(vi
21163                 CXX_LIB_SUFFIX='.la'
21164                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21165                 ;;
21166         Xdebug) #(vi
21167                 CXX_LIB_SUFFIX='_g.a'
21168                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21169                 ;;
21170         Xprofile) #(vi
21171                 CXX_LIB_SUFFIX='_p.a'
21172                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21173                 ;;
21174         Xshared) #(vi
21175                 case $cf_cv_system_name in
21176                 aix[5-7]*) #(vi
21177                         CXX_LIB_SUFFIX='.so'
21178                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21179                         ;;
21180                 cygwin*|msys*|mingw*) #(vi
21181                         CXX_LIB_SUFFIX='.dll'
21182                         CXX_DEP_SUFFIX='.dll.a'
21183                         ;;
21184                 darwin*) #(vi
21185                         CXX_LIB_SUFFIX='.dylib'
21186                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21187                         ;;
21188                 hpux*) #(vi
21189                         case $target in
21190                         ia64*) #(vi
21191                                 CXX_LIB_SUFFIX='.so'
21192                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21193                                 ;;
21194                         *) #(vi
21195                                 CXX_LIB_SUFFIX='.sl'
21196                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21197                                 ;;
21198                         esac
21199                         ;;
21200                 *) #(vi
21201                         CXX_LIB_SUFFIX='.so'
21202                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21203                         ;;
21204                 esac
21205                 ;;
21206         *)
21207                 CXX_LIB_SUFFIX='.a'
21208                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21209                 ;;
21210         esac
21211         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21212         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21213
21214 fi
21215 echo "$as_me:21215: result: $CXX_LIB_SUFFIX" >&5
21216 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21217
21218 fi
21219
21220 # do not want -ldl in build except as needed for -lncurses dependency
21221 if test "x$with_dlsym" = xyes ; then
21222 if test $DFT_LWR_MODEL = shared || \
21223    test $DFT_LWR_MODEL = libtool ; then
21224
21225 # remove dl library from $LIBS
21226 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21227
21228 fi
21229 fi
21230 ### Set up low-level terminfo dependencies for makefiles.
21231
21232 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21233 # do not need libdl
21234 TICS_LIST=
21235 if test "x$with_dlsym" = xyes ; then
21236
21237 # remove dl library from $SHLIB_LIST
21238 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21239
21240 fi
21241
21242 if test "$with_ticlib" != no ; then
21243
21244         if test "x$with_ticlib" != xyes ; then
21245                 TICS_NAME=$with_ticlib
21246                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21247                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21248                 TICS_LIB_SUFFIX="${with_ticlib}"
21249         else
21250                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21251                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21252                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21253         fi
21254         TICS_LDFLAGS="-L${LIB_DIR}"
21255         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21256 else
21257         TICS_LDFLAGS="-L${LIB_DIR}"
21258         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21259 fi
21260
21261 if test "$with_termlib" != no ; then
21262
21263         if test "x$with_termlib" != xyes ; then
21264                 TINFO_NAME=$with_termlib
21265                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21266                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21267                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21268                 TINFO_LIB_SUFFIX="${with_termlib}"
21269         else
21270                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21271                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21272                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21273                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21274         fi
21275
21276         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21277         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21278         if test "$DFT_LWR_MODEL" = "libtool"; then
21279                 TEST_ARGS="${TEST_DEPS}"
21280                 TEST_ARG2="${TEST_DEP2}"
21281                 TINFO_LDFLAGS="-L${LIB_DIR}"
21282                 TINFO_LIBS="$TEST_ARGS"
21283                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21284                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21285         else
21286                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21287                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21288                 if test "x$with_term_driver" != xno ; then
21289                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21290                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21291                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21292                 else
21293                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21294                         TINFO_LIBS="$TEST_ARGS"
21295                 fi
21296                 TINFO_LDFLAGS="-L${LIB_DIR}"
21297                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21298         fi
21299 else
21300         # the next lines are needed for linking libtic over libncurses
21301         TINFO_NAME=${LIB_NAME}
21302         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21303         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21304         if test "x$with_tic_depends" = xyes ; then
21305                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21306         else
21307                 TICS_LIST="$SHLIB_LIST"
21308         fi
21309
21310         TINFO_LDFLAGS="-L${LIB_DIR}"
21311         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21312 fi
21313
21314 if test "$DFT_LWR_MODEL" = shared ; then
21315         case $cf_cv_system_name in #(vi
21316         cygwin*|msys*)
21317                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21318                 TINFO_SUFFIX=.dll
21319                 ;;
21320         esac
21321 fi
21322
21323 if test "x$with_dlsym" = xyes ; then
21324
21325 # remove dl library from $TICS_LIST
21326 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21327
21328 fi
21329
21330 if test "$DFT_LWR_MODEL" = "libtool"; then
21331     OBJEXT=lo
21332 fi
21333
21334 # needed for Ada95
21335 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21336
21337 case $DFT_LWR_MODEL in
21338 normal|debug|profile)
21339
21340 if test "$GCC" = yes ; then
21341         case $cf_cv_system_name in #(
21342         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21343                 LDFLAGS_STATIC=
21344                 LDFLAGS_SHARED=
21345                 ;;
21346     *)  #( normally, except when broken
21347         LDFLAGS_STATIC=-static
21348         LDFLAGS_SHARED=-dynamic
21349         ;;
21350     esac
21351 else
21352         case $cf_cv_system_name in #(
21353         aix[4-7]*)      #( from ld manpage
21354                 LDFLAGS_STATIC=-bstatic
21355                 LDFLAGS_SHARED=-bdynamic
21356                 ;;
21357         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21358                 # We could also use just "archive" and "shared".
21359                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21360                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21361                 ;;
21362         irix*)          #( from ld manpage IRIX64
21363                 LDFLAGS_STATIC=-Bstatic
21364                 LDFLAGS_SHARED=-Bdynamic
21365                 ;;
21366         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21367                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21368                 LDFLAGS_STATIC=-noso
21369                 LDFLAGS_SHARED=-so_archive
21370                 ;;
21371         solaris2*)
21372                 LDFLAGS_STATIC=-Bstatic
21373                 LDFLAGS_SHARED=-Bdynamic
21374                 ;;
21375         esac
21376 fi
21377
21378 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21379 then
21380         echo "$as_me:21380: checking if linker supports switching between static/dynamic" >&5
21381 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21382
21383         rm -f libconftest.a
21384         cat >conftest.$ac_ext <<EOF
21385 #line 21385 "configure"
21386 #include <stdio.h>
21387 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21388 EOF
21389         if { (eval echo "$as_me:21389: \"$ac_compile\"") >&5
21390   (eval $ac_compile) 2>&5
21391   ac_status=$?
21392   echo "$as_me:21392: \$? = $ac_status" >&5
21393   (exit $ac_status); } ; then
21394                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21395                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21396         fi
21397         rm -f conftest.*
21398
21399         cf_save_LIBS="$LIBS"
21400
21401         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21402         cat >conftest.$ac_ext <<_ACEOF
21403 #line 21403 "configure"
21404 #include "confdefs.h"
21405
21406 #line 21406 "configure"
21407 #include <stdio.h>
21408 int cf_ldflags_static(FILE *fp);
21409
21410 int
21411 main ()
21412 {
21413
21414         return cf_ldflags_static(stdin);
21415
21416   ;
21417   return 0;
21418 }
21419 _ACEOF
21420 rm -f conftest.$ac_objext conftest$ac_exeext
21421 if { (eval echo "$as_me:21421: \"$ac_link\"") >&5
21422   (eval $ac_link) 2>&5
21423   ac_status=$?
21424   echo "$as_me:21424: \$? = $ac_status" >&5
21425   (exit $ac_status); } &&
21426          { ac_try='test -s conftest$ac_exeext'
21427   { (eval echo "$as_me:21427: \"$ac_try\"") >&5
21428   (eval $ac_try) 2>&5
21429   ac_status=$?
21430   echo "$as_me:21430: \$? = $ac_status" >&5
21431   (exit $ac_status); }; }; then
21432
21433         # some linkers simply ignore the -dynamic
21434         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21435         *static*) # (vi
21436                 cf_ldflags_static=no
21437                 ;;
21438         *)
21439                 cf_ldflags_static=yes
21440                 ;;
21441         esac
21442
21443 else
21444   echo "$as_me: failed program was:" >&5
21445 cat conftest.$ac_ext >&5
21446 cf_ldflags_static=no
21447 fi
21448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21449
21450         rm -f libconftest.*
21451         LIBS="$cf_save_LIBS"
21452
21453         echo "$as_me:21453: result: $cf_ldflags_static" >&5
21454 echo "${ECHO_T}$cf_ldflags_static" >&6
21455
21456         if test $cf_ldflags_static != yes
21457         then
21458                 LDFLAGS_STATIC=
21459                 LDFLAGS_SHARED=
21460         fi
21461 else
21462         LDFLAGS_STATIC=
21463         LDFLAGS_SHARED=
21464 fi
21465
21466         ;;
21467 esac
21468
21469 echo "$as_me:21469: checking where we will install curses.h" >&5
21470 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21471
21472 includesubdir=
21473 if test "$with_overwrite" = no && \
21474  ( test "x$includedir" = 'x${prefix}/include' || \
21475    test "x$includedir" = "x${prefix}/include" )
21476 then
21477         includesubdir="/ncurses${LIB_SUFFIX}"
21478 fi
21479 echo "$as_me:21479: result: ${includedir}${includesubdir}" >&5
21480 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21481
21482 ### Resolve a conflict between normal and wide-curses by forcing applications
21483 ### that will need libutf8 to add it to their configure script.
21484 if test "$with_overwrite" != no ; then
21485 if test "$NCURSES_LIBUTF8" = 1 ; then
21486         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21487         { echo "$as_me:21487: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21488 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21489 fi
21490 fi
21491 WITH_OVERWRITE=$with_overwrite
21492
21493 # used to separate tack out of the tree
21494 NCURSES_TREE=
21495
21496 ### predefined stuff for the test programs
21497
21498 cat >>confdefs.h <<\EOF
21499 #define HAVE_SLK_COLOR 1
21500 EOF
21501
21502 ### Construct the list of subdirectories for which we'll customize makefiles
21503 ### with the appropriate compile-rules.
21504
21505 echo "$as_me:21505: checking for src modules" >&5
21506 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21507
21508 # dependencies and linker-arguments for test-programs
21509 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21510 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21511 if test "$DFT_LWR_MODEL" = "libtool"; then
21512         TEST_ARGS="${TEST_DEPS}"
21513         TEST_ARG2="${TEST_DEP2}"
21514 else
21515         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21516         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21517 fi
21518
21519 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21520 cf_cv_src_modules=
21521 for cf_dir in $modules_to_build
21522 do
21523         if test -f $srcdir/$cf_dir/modules; then
21524
21525                 # We may/may not have tack in the distribution, though the
21526                 # makefile is.
21527                 if test $cf_dir = tack ; then
21528                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21529                                 continue
21530                         fi
21531                 fi
21532
21533                 if test -z "$cf_cv_src_modules"; then
21534                         cf_cv_src_modules=$cf_dir
21535                 else
21536                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21537                 fi
21538
21539                 # Make the ncurses_cfg.h file record the library interface files as
21540                 # well.  These are header files that are the same name as their
21541                 # directory.  Ncurses is the only library that does not follow
21542                 # that pattern.
21543                 if test $cf_dir = tack ; then
21544                         continue
21545                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21546
21547 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21548
21549                         cat >>confdefs.h <<EOF
21550 #define HAVE_${cf_have_include}_H 1
21551 EOF
21552
21553                         cat >>confdefs.h <<EOF
21554 #define HAVE_LIB${cf_have_include} 1
21555 EOF
21556
21557                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21558                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21559                         if test "$DFT_LWR_MODEL" = "libtool"; then
21560                                 TEST_ARGS="${TEST_DEPS}"
21561                                 TEST_ARG2="${TEST_DEP2}"
21562                         else
21563                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21564                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21565                         fi
21566                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21567                 fi
21568         fi
21569 done
21570 echo "$as_me:21570: result: $cf_cv_src_modules" >&5
21571 echo "${ECHO_T}$cf_cv_src_modules" >&6
21572
21573 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21574 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21575
21576 SRC_SUBDIRS=
21577 if test "x$cf_with_manpages" != xno ; then
21578         SRC_SUBDIRS="$SRC_SUBDIRS man"
21579 fi
21580 SRC_SUBDIRS="$SRC_SUBDIRS include"
21581 for cf_dir in $cf_cv_src_modules
21582 do
21583         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21584 done
21585 if test "x$cf_with_tests" != "xno" ; then
21586         SRC_SUBDIRS="$SRC_SUBDIRS test"
21587 fi
21588 # always make this, to install the ncurses-config script
21589 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21590 if test "$cf_with_cxx_binding" != no; then
21591         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21592         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21593 fi
21594
21595 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21596 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21597
21598 ADA_SUBDIRS=
21599 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21600         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21601         ADA_SUBDIRS="gen src"
21602         if test "x$cf_with_tests" != "xno" ; then
21603                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21604         fi
21605 fi
21606
21607 SUB_MAKEFILES=
21608 for cf_dir in $SRC_SUBDIRS
21609 do
21610         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21611 done
21612
21613 if test -n "$ADA_SUBDIRS"; then
21614         for cf_dir in $ADA_SUBDIRS
21615         do
21616                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21617         done
21618
21619 fi
21620
21621 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21622    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21623    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21624 fi
21625
21626 DIRS_TO_MAKE="lib"
21627 for cf_item in $cf_list_models
21628 do
21629
21630         case $cf_item in
21631         libtool) cf_subdir='obj_lo'  ;;
21632         normal)  cf_subdir='objects' ;;
21633         debug)   cf_subdir='obj_g' ;;
21634         profile) cf_subdir='obj_p' ;;
21635         shared)
21636                 case $cf_cv_system_name in #(vi
21637                 cygwin|msys) #(vi
21638                         cf_subdir='objects' ;;
21639                 *)
21640                         cf_subdir='obj_s' ;;
21641                 esac
21642         esac
21643
21644         for cf_item2 in $DIRS_TO_MAKE
21645         do
21646                 test $cf_item2 = $cf_subdir && break
21647         done
21648         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21649 done
21650 for cf_dir in $DIRS_TO_MAKE
21651 do
21652         test ! -d $cf_dir && mkdir $cf_dir
21653 done
21654
21655 # symbols that differ when compiling Ada95 by itself.
21656 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21657
21658 # values to use as strings
21659
21660 cat >>confdefs.h <<EOF
21661 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21662 EOF
21663
21664 cat >>confdefs.h <<EOF
21665 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21666 EOF
21667
21668 ### Now that we're done running tests, add the compiler-warnings, if any
21669
21670 cf_fix_cppflags=no
21671 cf_new_cflags=
21672 cf_new_cppflags=
21673 cf_new_extra_cppflags=
21674
21675 for cf_add_cflags in $EXTRA_CFLAGS
21676 do
21677 case $cf_fix_cppflags in
21678 no)
21679         case $cf_add_cflags in #(vi
21680         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21681                 case $cf_add_cflags in
21682                 -D*)
21683                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21684
21685                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21686                                 && test -z "${cf_tst_cflags}" \
21687                                 && cf_fix_cppflags=yes
21688
21689                         if test $cf_fix_cppflags = yes ; then
21690                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21691                                 continue
21692                         elif test "${cf_tst_cflags}" = "\"'" ; then
21693                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21694                                 continue
21695                         fi
21696                         ;;
21697                 esac
21698                 case "$CPPFLAGS" in
21699                 *$cf_add_cflags) #(vi
21700                         ;;
21701                 *) #(vi
21702                         case $cf_add_cflags in #(vi
21703                         -D*)
21704                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21705
21706 CPPFLAGS=`echo "$CPPFLAGS" | \
21707         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21708                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21709
21710                                 ;;
21711                         esac
21712                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21713                         ;;
21714                 esac
21715                 ;;
21716         *)
21717                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21718                 ;;
21719         esac
21720         ;;
21721 yes)
21722         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21723
21724         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21725
21726         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21727                 && test -z "${cf_tst_cflags}" \
21728                 && cf_fix_cppflags=no
21729         ;;
21730 esac
21731 done
21732
21733 if test -n "$cf_new_cflags" ; then
21734
21735         CFLAGS="$CFLAGS $cf_new_cflags"
21736 fi
21737
21738 if test -n "$cf_new_cppflags" ; then
21739
21740         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21741 fi
21742
21743 if test -n "$cf_new_extra_cppflags" ; then
21744
21745         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21746 fi
21747
21748 ### Define substitutions for header files to avoid name-pollution
21749
21750 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21751         HAVE_TCGETATTR=1
21752 else
21753         HAVE_TCGETATTR=0
21754 fi
21755
21756 if test "x$ac_cv_header_stdint_h" = xyes ; then
21757         HAVE_STDINT_H=1
21758 else
21759         HAVE_STDINT_H=0
21760 fi
21761
21762 if test "x$ac_cv_header_termio_h" = xyes ; then
21763         HAVE_TERMIO_H=1
21764 else
21765         HAVE_TERMIO_H=0
21766 fi
21767
21768 if test "x$ac_cv_header_termios_h" = xyes ; then
21769         HAVE_TERMIOS_H=1
21770 else
21771         HAVE_TERMIOS_H=0
21772 fi
21773
21774 ################################################################################
21775 test "x$use_database" = xyes && \
21776 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21777
21778 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21779 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21780
21781 if test "x$enable_pc_files" = xyes ; then \
21782 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21783 MAKE_PC_FILES=
21784 else
21785 MAKE_PC_FILES="#"
21786 fi
21787
21788 # Extract the first word of "tic", so it can be a program name with args.
21789 set dummy tic; ac_word=$2
21790 echo "$as_me:21790: checking for $ac_word" >&5
21791 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21792 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21793   echo $ECHO_N "(cached) $ECHO_C" >&6
21794 else
21795   case $TIC_PATH in
21796   [\\/]* | ?:[\\/]*)
21797   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21798   ;;
21799   *)
21800   ac_save_IFS=$IFS; IFS=$ac_path_separator
21801 ac_dummy="$PATH:/usr/local/ncurses/bin"
21802 for ac_dir in $ac_dummy; do
21803   IFS=$ac_save_IFS
21804   test -z "$ac_dir" && ac_dir=.
21805   if $as_executable_p "$ac_dir/$ac_word"; then
21806    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21807    echo "$as_me:21807: found $ac_dir/$ac_word" >&5
21808    break
21809 fi
21810 done
21811
21812   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21813   ;;
21814 esac
21815 fi
21816 TIC_PATH=$ac_cv_path_TIC_PATH
21817
21818 if test -n "$TIC_PATH"; then
21819   echo "$as_me:21819: result: $TIC_PATH" >&5
21820 echo "${ECHO_T}$TIC_PATH" >&6
21821 else
21822   echo "$as_me:21822: result: no" >&5
21823 echo "${ECHO_T}no" >&6
21824 fi
21825
21826 if test -n "$FALLBACK_LIST"
21827 then
21828         if test "$TIC_PATH" = unknown
21829         then
21830                 { echo "$as_me:21830: WARNING: no tic program found for fallbacks" >&5
21831 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21832         fi
21833 fi
21834
21835 if test "x$cf_with_tests" != xno ; then
21836         MAKE_TESTS=
21837 else
21838         MAKE_TESTS="#"
21839 fi
21840
21841 ADAHTML_DIR=../../doc/html/ada
21842
21843 # these could be configurable, but are not currently
21844 PANEL_NAME=panel
21845 MENU_NAME=menu
21846 FORM_NAME=form
21847 CXX_NAME=ncurses++
21848
21849 # workaround for g++ versus Solaris (20131116)
21850 case $cf_cv_system_name in #(vi
21851 solaris2*) #(vi
21852         case "x$CPPFLAGS" in #(vi
21853         *-D_XOPEN_SOURCE_EXTENDED*)
21854                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21855
21856 echo "${as_me:-configure}:21856: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21857
21858                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21859                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21860                 ;;
21861         esac
21862         ;;
21863 esac
21864
21865 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21866 case "x$NCURSES_OSPEED" in #(vi
21867 *short*) #(vi
21868         cf_compatible=1
21869         ;;
21870 *)
21871         cf_compatible=0
21872         ;;
21873 esac
21874
21875 cat >>confdefs.h <<EOF
21876 #define NCURSES_OSPEED_COMPAT $cf_compatible
21877 EOF
21878
21879 case "x$cf_cv_typeof_chtype" in
21880 xshort|xint|xlong)
21881         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
21882         ;;
21883 esac
21884
21885 case "x$cf_cv_typeof_mmask_t" in
21886 xshort|xint|xlong)
21887         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
21888         ;;
21889 esac
21890
21891 # substitute into misc/Makefile to suppress
21892 # (un)install.data from the
21893 # (un)install rules.
21894 if test "x$cf_with_db_install" = "xno"; then
21895         MISC_INSTALL_DATA=
21896         MISC_UNINSTALL_DATA=
21897 else
21898         MISC_INSTALL_DATA=install.data
21899         MISC_UNINSTALL_DATA=uninstall.data
21900 fi
21901
21902 SUB_SCRIPTS=
21903
21904 if test -n "$PACKAGE"
21905 then
21906         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
21907         export PACKAGE
21908         echo "package: $PACKAGE"
21909 fi
21910
21911 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_SCRIPTS $SUB_MAKEFILES Makefile"
21912 ac_config_commands="$ac_config_commands default"
21913 cat >confcache <<\_ACEOF
21914 # This file is a shell script that caches the results of configure
21915 # tests run on this system so they can be shared between configure
21916 # scripts and configure runs, see configure's option --config-cache.
21917 # It is not useful on other systems.  If it contains results you don't
21918 # want to keep, you may remove or edit it.
21919 #
21920 # config.status only pays attention to the cache file if you give it
21921 # the --recheck option to rerun configure.
21922 #
21923 # `ac_cv_env_foo' variables (set or unset) will be overriden when
21924 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21925 # following values.
21926
21927 _ACEOF
21928
21929 # The following way of writing the cache mishandles newlines in values,
21930 # but we know of no workaround that is simple, portable, and efficient.
21931 # So, don't put newlines in cache variables' values.
21932 # Ultrix sh set writes to stderr and can't be redirected directly,
21933 # and sets the high bit in the cache file unless we assign to the vars.
21934 {
21935   (set) 2>&1 |
21936     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21937     *ac_space=\ *)
21938       # `set' does not quote correctly, so add quotes (double-quote
21939       # substitution turns \\\\ into \\, and sed turns \\ into \).
21940       sed -n \
21941         "s/'/'\\\\''/g;
21942           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21943       ;;
21944     *)
21945       # `set' quotes correctly as required by POSIX, so do not add quotes.
21946       sed -n \
21947         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21948       ;;
21949     esac;
21950 } |
21951   sed '
21952      t clear
21953      : clear
21954      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21955      t end
21956      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21957      : end' >>confcache
21958 if cmp -s $cache_file confcache; then :; else
21959   if test -w $cache_file; then
21960     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21961     cat confcache >$cache_file
21962   else
21963     echo "not updating unwritable cache $cache_file"
21964   fi
21965 fi
21966 rm -f confcache
21967
21968 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21969 # Let make expand exec_prefix.
21970 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21971
21972 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21973 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21974 # trailing colons and then remove the whole line if VPATH becomes empty
21975 # (actually we leave an empty line to preserve line numbers).
21976 if test "x$srcdir" = x.; then
21977   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21978 s/:*\$(srcdir):*/:/;
21979 s/:*\${srcdir}:*/:/;
21980 s/:*@srcdir@:*/:/;
21981 s/^\([^=]*=[    ]*\):*/\1/;
21982 s/:*$//;
21983 s/^[^=]*=[      ]*$//;
21984 }'
21985 fi
21986
21987 DEFS=-DHAVE_CONFIG_H
21988
21989 : ${CONFIG_STATUS=./config.status}
21990 ac_clean_files_save=$ac_clean_files
21991 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21992 { echo "$as_me:21992: creating $CONFIG_STATUS" >&5
21993 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21994 cat >$CONFIG_STATUS <<_ACEOF
21995 #! $SHELL
21996 # Generated automatically by configure.
21997 # Run this file to recreate the current configuration.
21998 # Compiler output produced by configure, useful for debugging
21999 # configure, is in config.log if it exists.
22000
22001 debug=false
22002 SHELL=\${CONFIG_SHELL-$SHELL}
22003 ac_cs_invocation="\$0 \$@"
22004
22005 _ACEOF
22006
22007 cat >>$CONFIG_STATUS <<\_ACEOF
22008 # Be Bourne compatible
22009 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22010   emulate sh
22011   NULLCMD=:
22012 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22013   set -o posix
22014 fi
22015
22016 # Name of the executable.
22017 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22018
22019 if expr a : '\(a\)' >/dev/null 2>&1; then
22020   as_expr=expr
22021 else
22022   as_expr=false
22023 fi
22024
22025 rm -f conf$$ conf$$.exe conf$$.file
22026 echo >conf$$.file
22027 if ln -s conf$$.file conf$$ 2>/dev/null; then
22028   # We could just check for DJGPP; but this test a) works b) is more generic
22029   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22030   if test -f conf$$.exe; then
22031     # Don't use ln at all; we don't have any links
22032     as_ln_s='cp -p'
22033   else
22034     as_ln_s='ln -s'
22035   fi
22036 elif ln conf$$.file conf$$ 2>/dev/null; then
22037   as_ln_s=ln
22038 else
22039   as_ln_s='cp -p'
22040 fi
22041 rm -f conf$$ conf$$.exe conf$$.file
22042
22043 as_executable_p="test -f"
22044
22045 # Support unset when possible.
22046 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22047   as_unset=unset
22048 else
22049   as_unset=false
22050 fi
22051
22052 # NLS nuisances.
22053 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22054 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22055 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22056 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22057 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22058 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22059 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22060 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22061
22062 # IFS
22063 # We need space, tab and new line, in precisely that order.
22064 as_nl='
22065 '
22066 IFS="   $as_nl"
22067
22068 # CDPATH.
22069 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22070
22071 exec 6>&1
22072
22073 _ACEOF
22074
22075 # Files that config.status was made for.
22076 if test -n "$ac_config_files"; then
22077   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22078 fi
22079
22080 if test -n "$ac_config_headers"; then
22081   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22082 fi
22083
22084 if test -n "$ac_config_links"; then
22085   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22086 fi
22087
22088 if test -n "$ac_config_commands"; then
22089   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22090 fi
22091
22092 cat >>$CONFIG_STATUS <<\EOF
22093
22094 ac_cs_usage="\
22095 \`$as_me' instantiates files from templates according to the
22096 current configuration.
22097
22098 Usage: $0 [OPTIONS] [FILE]...
22099
22100   -h, --help       print this help, then exit
22101   -V, --version    print version number, then exit
22102   -d, --debug      don't remove temporary files
22103       --recheck    update $as_me by reconfiguring in the same conditions
22104   --file=FILE[:TEMPLATE]
22105                    instantiate the configuration file FILE
22106   --header=FILE[:TEMPLATE]
22107                    instantiate the configuration header FILE
22108
22109 Configuration files:
22110 $config_files
22111
22112 Configuration headers:
22113 $config_headers
22114
22115 Configuration commands:
22116 $config_commands
22117
22118 Report bugs to <dickey@invisible-island.net>."
22119 EOF
22120
22121 cat >>$CONFIG_STATUS <<EOF
22122 ac_cs_version="\\
22123 config.status
22124 configured by $0, generated by GNU Autoconf 2.52.20141204,
22125   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22126
22127 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22128 Free Software Foundation, Inc.
22129 This config.status script is free software; the Free Software Foundation
22130 gives unlimited permission to copy, distribute and modify it."
22131 srcdir=$srcdir
22132 INSTALL="$INSTALL"
22133 EOF
22134
22135 cat >>$CONFIG_STATUS <<\EOF
22136 # If no file are specified by the user, then we need to provide default
22137 # value.  By we need to know if files were specified by the user.
22138 ac_need_defaults=:
22139 while test $# != 0
22140 do
22141   case $1 in
22142   --*=*)
22143     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22144     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22145     shift
22146     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22147     shift
22148     ;;
22149   -*);;
22150   *) # This is not an option, so the user has probably given explicit
22151      # arguments.
22152      ac_need_defaults=false;;
22153   esac
22154
22155   case $1 in
22156   # Handling of the options.
22157 EOF
22158 cat >>$CONFIG_STATUS <<EOF
22159   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22160     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22161     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22162 EOF
22163 cat >>$CONFIG_STATUS <<\EOF
22164   --version | --vers* | -V )
22165     echo "$ac_cs_version"; exit 0 ;;
22166   --he | --h)
22167     # Conflict between --help and --header
22168     { { echo "$as_me:22168: error: ambiguous option: $1
22169 Try \`$0 --help' for more information." >&5
22170 echo "$as_me: error: ambiguous option: $1
22171 Try \`$0 --help' for more information." >&2;}
22172    { (exit 1); exit 1; }; };;
22173   --help | --hel | -h )
22174     echo "$ac_cs_usage"; exit 0 ;;
22175   --debug | --d* | -d )
22176     debug=: ;;
22177   --file | --fil | --fi | --f )
22178     shift
22179     CONFIG_FILES="$CONFIG_FILES $1"
22180     ac_need_defaults=false;;
22181   --header | --heade | --head | --hea )
22182     shift
22183     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22184     ac_need_defaults=false;;
22185
22186   # This is an error.
22187   -*) { { echo "$as_me:22187: error: unrecognized option: $1
22188 Try \`$0 --help' for more information." >&5
22189 echo "$as_me: error: unrecognized option: $1
22190 Try \`$0 --help' for more information." >&2;}
22191    { (exit 1); exit 1; }; } ;;
22192
22193   *) ac_config_targets="$ac_config_targets $1" ;;
22194
22195   esac
22196   shift
22197 done
22198
22199 exec 5>>config.log
22200 cat >&5 << _ACEOF
22201
22202 ## ----------------------- ##
22203 ## Running config.status.  ##
22204 ## ----------------------- ##
22205
22206 This file was extended by $as_me 2.52.20141204, executed with
22207   CONFIG_FILES    = $CONFIG_FILES
22208   CONFIG_HEADERS  = $CONFIG_HEADERS
22209   CONFIG_LINKS    = $CONFIG_LINKS
22210   CONFIG_COMMANDS = $CONFIG_COMMANDS
22211   > $ac_cs_invocation
22212 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22213
22214 _ACEOF
22215 EOF
22216
22217 cat >>$CONFIG_STATUS <<EOF
22218 #
22219 # INIT-COMMANDS section.
22220 #
22221
22222 ### Special initialization commands, used to pass information from the
22223 ### configuration-run into config.status
22224
22225 AWK="$AWK"
22226 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22227 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22228 ECHO_LD="$ECHO_LD"
22229 LDCONFIG="$LDCONFIG"
22230 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22231 LIB_NAME="$LIB_NAME"
22232 LIB_PREFIX="$LIB_PREFIX"
22233 LIB_SUBSETS="$LIB_SUBSETS"
22234 LIB_SUFFIX="$LIB_SUFFIX"
22235 LIB_TRACING="$LIB_TRACING"
22236 LN_S="$LN_S"
22237 MAKE_TERMINFO="$MAKE_TERMINFO"
22238 NCURSES_MAJOR="$NCURSES_MAJOR"
22239 NCURSES_MINOR="$NCURSES_MINOR"
22240 NCURSES_OSPEED="$NCURSES_OSPEED"
22241 NCURSES_PATCH="$NCURSES_PATCH"
22242 SRC_SUBDIRS="$SRC_SUBDIRS"
22243 TERMINFO="$TERMINFO"
22244 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22245 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22246 TICS_NAME="$TICS_NAME"
22247 TIC_PATH="$TIC_PATH"
22248 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22249 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22250 TINFO_NAME="$TINFO_NAME"
22251 TINFO_SUFFIX="$TINFO_SUFFIX"
22252 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22253 WITH_CURSES_H="$with_curses_h"
22254 WITH_ECHO="${enable_echo:=yes}"
22255 WITH_OVERWRITE="$with_overwrite"
22256 cf_LIST_MODELS="$cf_list_models"
22257 cf_cv_abi_version="$cf_cv_abi_version"
22258 cf_cv_do_relink="$cf_cv_do_relink"
22259 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22260 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22261 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22262 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22263 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22264 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22265 cf_cv_rel_version="$cf_cv_rel_version"
22266 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22267 cf_cv_shared_soname='$cf_cv_shared_soname'
22268 cf_cv_shlib_version="$cf_cv_shlib_version"
22269 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22270 cf_cv_system_name="$cf_cv_system_name"
22271 cf_cv_term_driver="$with_term_driver"
22272 cf_with_ada="$cf_with_ada"
22273 cf_with_cxx_binding="$cf_with_cxx_binding"
22274 cf_with_db_install="$cf_with_db_install"
22275 cf_with_manpages="$cf_with_manpages"
22276 cf_with_tests="$cf_with_tests"
22277 with_shared_cxx="$with_shared_cxx"
22278 host="$host"
22279 target="$target"
22280
22281 EOF
22282
22283 cat >>$CONFIG_STATUS <<\EOF
22284 for ac_config_target in $ac_config_targets
22285 do
22286   case "$ac_config_target" in
22287   # Handling of arguments.
22288   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22289   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22290   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22291   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22292   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22293   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22294   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22295   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22296   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22297   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22298   *) { { echo "$as_me:22298: error: invalid argument: $ac_config_target" >&5
22299 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22300    { (exit 1); exit 1; }; };;
22301   esac
22302 done
22303
22304 # If the user did not use the arguments to specify the items to instantiate,
22305 # then the envvar interface is used.  Set only those that are not.
22306 # We use the long form for the default assignment because of an extremely
22307 # bizarre bug on SunOS 4.1.3.
22308 if $ac_need_defaults; then
22309   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22310   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22311   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22312 fi
22313
22314 # Create a temporary directory, and hook for its removal unless debugging.
22315 $debug ||
22316 {
22317   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22318   trap '{ (exit 1); exit 1; }' 1 2 13 15
22319 }
22320
22321 # Create a (secure) tmp directory for tmp files.
22322 : ${TMPDIR=/tmp}
22323 {
22324   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22325   test -n "$tmp" && test -d "$tmp"
22326 }  ||
22327 {
22328   tmp=$TMPDIR/cs$$-$RANDOM
22329   (umask 077 && mkdir $tmp)
22330 } ||
22331 {
22332    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22333    { (exit 1); exit 1; }
22334 }
22335
22336 EOF
22337
22338 cat >>$CONFIG_STATUS <<EOF
22339
22340 #
22341 # CONFIG_FILES section.
22342 #
22343
22344 # No need to generate the scripts if there are no CONFIG_FILES.
22345 # This happens for instance when ./config.status config.h
22346 if test -n "\$CONFIG_FILES"; then
22347   # Protect against being on the right side of a sed subst in config.status.
22348   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22349    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22350 s,@SHELL@,$SHELL,;t t
22351 s,@exec_prefix@,$exec_prefix,;t t
22352 s,@prefix@,$prefix,;t t
22353 s,@program_transform_name@,$program_transform_name,;t t
22354 s,@bindir@,$bindir,;t t
22355 s,@sbindir@,$sbindir,;t t
22356 s,@libexecdir@,$libexecdir,;t t
22357 s,@datarootdir@,$datarootdir,;t t
22358 s,@datadir@,$datadir,;t t
22359 s,@sysconfdir@,$sysconfdir,;t t
22360 s,@sharedstatedir@,$sharedstatedir,;t t
22361 s,@localstatedir@,$localstatedir,;t t
22362 s,@libdir@,$libdir,;t t
22363 s,@includedir@,$includedir,;t t
22364 s,@oldincludedir@,$oldincludedir,;t t
22365 s,@infodir@,$infodir,;t t
22366 s,@mandir@,$mandir,;t t
22367 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22368 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22369 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22370 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22371 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22372 s,@build_alias@,$build_alias,;t t
22373 s,@host_alias@,$host_alias,;t t
22374 s,@target_alias@,$target_alias,;t t
22375 s,@ECHO_C@,$ECHO_C,;t t
22376 s,@ECHO_N@,$ECHO_N,;t t
22377 s,@ECHO_T@,$ECHO_T,;t t
22378 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22379 s,@DEFS@,$DEFS,;t t
22380 s,@LIBS@,$LIBS,;t t
22381 s,@top_builddir@,$top_builddir,;t t
22382 s,@EGREP@,$EGREP,;t t
22383 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22384 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22385 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22386 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22387 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22388 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22389 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22390 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22391 s,@VERSION@,$VERSION,;t t
22392 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22393 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22394 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22395 s,@PACKAGE@,$PACKAGE,;t t
22396 s,@build@,$build,;t t
22397 s,@build_cpu@,$build_cpu,;t t
22398 s,@build_vendor@,$build_vendor,;t t
22399 s,@build_os@,$build_os,;t t
22400 s,@host@,$host,;t t
22401 s,@host_cpu@,$host_cpu,;t t
22402 s,@host_vendor@,$host_vendor,;t t
22403 s,@host_os@,$host_os,;t t
22404 s,@target@,$target,;t t
22405 s,@target_cpu@,$target_cpu,;t t
22406 s,@target_vendor@,$target_vendor,;t t
22407 s,@target_os@,$target_os,;t t
22408 s,@CC@,$CC,;t t
22409 s,@CFLAGS@,$CFLAGS,;t t
22410 s,@LDFLAGS@,$LDFLAGS,;t t
22411 s,@CPPFLAGS@,$CPPFLAGS,;t t
22412 s,@ac_ct_CC@,$ac_ct_CC,;t t
22413 s,@EXEEXT@,$EXEEXT,;t t
22414 s,@OBJEXT@,$OBJEXT,;t t
22415 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22416 s,@CPP@,$CPP,;t t
22417 s,@LDCONFIG@,$LDCONFIG,;t t
22418 s,@CXX@,$CXX,;t t
22419 s,@CXXFLAGS@,$CXXFLAGS,;t t
22420 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22421 s,@AWK@,$AWK,;t t
22422 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22423 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22424 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22425 s,@LINT@,$LINT,;t t
22426 s,@LINT_OPTS@,$LINT_OPTS,;t t
22427 s,@LN_S@,$LN_S,;t t
22428 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22429 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22430 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22431 s,@SET_MAKE@,$SET_MAKE,;t t
22432 s,@CTAGS@,$CTAGS,;t t
22433 s,@ETAGS@,$ETAGS,;t t
22434 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22435 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22436 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22437 s,@RANLIB@,$RANLIB,;t t
22438 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22439 s,@LD@,$LD,;t t
22440 s,@ac_ct_LD@,$ac_ct_LD,;t t
22441 s,@AR@,$AR,;t t
22442 s,@ac_ct_AR@,$ac_ct_AR,;t t
22443 s,@NM@,$NM,;t t
22444 s,@ac_ct_NM@,$ac_ct_NM,;t t
22445 s,@ARFLAGS@,$ARFLAGS,;t t
22446 s,@DESTDIR@,$DESTDIR,;t t
22447 s,@BUILD_CC@,$BUILD_CC,;t t
22448 s,@BUILD_CPP@,$BUILD_CPP,;t t
22449 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22450 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22451 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22452 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22453 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22454 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22455 s,@cf_list_models@,$cf_list_models,;t t
22456 s,@ABI_VERSION@,$ABI_VERSION,;t t
22457 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22458 s,@LIBTOOL@,$LIBTOOL,;t t
22459 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22460 s,@LT_UNDEF@,$LT_UNDEF,;t t
22461 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22462 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22463 s,@LIB_CREATE@,$LIB_CREATE,;t t
22464 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22465 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22466 s,@LIB_PREP@,$LIB_PREP,;t t
22467 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22468 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22469 s,@LIB_LINK@,$LIB_LINK,;t t
22470 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22471 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22472 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22473 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22474 s,@TICS_NAME@,$TICS_NAME,;t t
22475 s,@TINFO_NAME@,$TINFO_NAME,;t t
22476 s,@LIB_NAME@,$LIB_NAME,;t t
22477 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22478 s,@CC_G_OPT@,$CC_G_OPT,;t t
22479 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22480 s,@LD_MODEL@,$LD_MODEL,;t t
22481 s,@shlibdir@,$shlibdir,;t t
22482 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22483 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22484 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22485 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22486 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22487 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22488 s,@LINK_PROGS@,$LINK_PROGS,;t t
22489 s,@LINK_TESTS@,$LINK_TESTS,;t t
22490 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22491 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22492 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22493 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22494 s,@RPATH_LIST@,$RPATH_LIST,;t t
22495 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22496 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22497 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22498 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22499 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22500 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22501 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22502 s,@XTERM_KBS@,$XTERM_KBS,;t t
22503 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22504 s,@TERMINFO@,$TERMINFO,;t t
22505 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22506 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22507 s,@TERMPATH@,$TERMPATH,;t t
22508 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22509 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22510 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22511 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22512 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22513 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22514 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22515 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22516 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22517 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22518 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22519 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22520 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22521 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22522 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22523 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22524 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22525 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22526 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22527 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22528 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22529 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22530 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22531 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22532 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22533 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22534 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22535 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22536 s,@PTHREAD@,$PTHREAD,;t t
22537 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22538 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22539 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22540 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22541 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22542 s,@ECHO_LT@,$ECHO_LT,;t t
22543 s,@ECHO_LD@,$ECHO_LD,;t t
22544 s,@RULE_CC@,$RULE_CC,;t t
22545 s,@SHOW_CC@,$SHOW_CC,;t t
22546 s,@ECHO_CC@,$ECHO_CC,;t t
22547 s,@ECHO_LINK@,$ECHO_LINK,;t t
22548 s,@ADAFLAGS@,$ADAFLAGS,;t t
22549 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22550 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22551 s,@ADA_TRACE@,$ADA_TRACE,;t t
22552 s,@MATH_LIB@,$MATH_LIB,;t t
22553 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22554 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22555 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22556 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22557 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22558 s,@TEST_LIBS@,$TEST_LIBS,;t t
22559 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22560 s,@CXXCPP@,$CXXCPP,;t t
22561 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22562 s,@CXX_AR@,$CXX_AR,;t t
22563 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22564 s,@CXXLIBS@,$CXXLIBS,;t t
22565 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22566 s,@gnat_exists@,$gnat_exists,;t t
22567 s,@M4_exists@,$M4_exists,;t t
22568 s,@cf_ada_make@,$cf_ada_make,;t t
22569 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22570 s,@cf_compile_generics@,$cf_compile_generics,;t t
22571 s,@cf_generic_objects@,$cf_generic_objects,;t t
22572 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22573 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22574 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22575 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22576 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22577 s,@cf_ada_package@,$cf_ada_package,;t t
22578 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22579 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22580 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22581 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22582 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22583 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22584 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22585 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22586 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22587 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22588 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22589 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22590 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22591 s,@TICS_LIBS@,$TICS_LIBS,;t t
22592 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22593 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22594 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22595 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22596 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22597 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22598 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22599 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22600 s,@includesubdir@,$includesubdir,;t t
22601 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22602 s,@TICS_LIST@,$TICS_LIST,;t t
22603 s,@TINFO_LIST@,$TINFO_LIST,;t t
22604 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22605 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22606 s,@TEST_ARGS@,$TEST_ARGS,;t t
22607 s,@TEST_DEPS@,$TEST_DEPS,;t t
22608 s,@TEST_ARG2@,$TEST_ARG2,;t t
22609 s,@TEST_DEP2@,$TEST_DEP2,;t t
22610 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22611 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22612 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22613 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22614 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22615 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22616 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22617 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22618 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22619 s,@cross_compiling@,$cross_compiling,;t t
22620 s,@TIC_PATH@,$TIC_PATH,;t t
22621 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22622 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22623 s,@PANEL_NAME@,$PANEL_NAME,;t t
22624 s,@MENU_NAME@,$MENU_NAME,;t t
22625 s,@FORM_NAME@,$FORM_NAME,;t t
22626 s,@CXX_NAME@,$CXX_NAME,;t t
22627 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
22628 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
22629 CEOF
22630
22631 EOF
22632
22633   cat >>$CONFIG_STATUS <<\EOF
22634   # Split the substitutions into bite-sized pieces for seds with
22635   # small command number limits, like on Digital OSF/1 and HP-UX.
22636   ac_max_sed_lines=48
22637   ac_sed_frag=1 # Number of current file.
22638   ac_beg=1 # First line for current file.
22639   ac_end=$ac_max_sed_lines # Line after last line for current file.
22640   ac_more_lines=:
22641   ac_sed_cmds=
22642   while $ac_more_lines; do
22643     if test $ac_beg -gt 1; then
22644       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22645     else
22646       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22647     fi
22648     if test ! -s $tmp/subs.frag; then
22649       ac_more_lines=false
22650     else
22651       # The purpose of the label and of the branching condition is to
22652       # speed up the sed processing (if there are no `@' at all, there
22653       # is no need to browse any of the substitutions).
22654       # These are the two extra sed commands mentioned above.
22655       (echo ':t
22656   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22657       if test -z "$ac_sed_cmds"; then
22658         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22659       else
22660         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22661       fi
22662       ac_sed_frag=`expr $ac_sed_frag + 1`
22663       ac_beg=$ac_end
22664       ac_end=`expr $ac_end + $ac_max_sed_lines`
22665     fi
22666   done
22667   if test -z "$ac_sed_cmds"; then
22668     ac_sed_cmds=cat
22669   fi
22670 fi # test -n "$CONFIG_FILES"
22671
22672 EOF
22673 cat >>$CONFIG_STATUS <<\EOF
22674 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22675   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22676   case $ac_file in
22677   - | *:- | *:-:* ) # input from stdin
22678         cat >$tmp/stdin
22679         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22680         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22681   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22682         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22683   * )   ac_file_in=$ac_file.in ;;
22684   esac
22685
22686   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22687   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22688          X"$ac_file" : 'X\(//\)[^/]' \| \
22689          X"$ac_file" : 'X\(//\)$' \| \
22690          X"$ac_file" : 'X\(/\)' \| \
22691          .     : '\(.\)' 2>/dev/null ||
22692 echo X"$ac_file" |
22693     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22694           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22695           /^X\(\/\/\)$/{ s//\1/; q; }
22696           /^X\(\/\).*/{ s//\1/; q; }
22697           s/.*/./; q'`
22698   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22699     { case "$ac_dir" in
22700   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22701   *)                      as_incr_dir=.;;
22702 esac
22703 as_dummy="$ac_dir"
22704 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22705   case $as_mkdir_dir in
22706     # Skip DOS drivespec
22707     ?:) as_incr_dir=$as_mkdir_dir ;;
22708     *)
22709       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22710       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22711     ;;
22712   esac
22713 done; }
22714
22715     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22716     # A "../" for each directory in $ac_dir_suffix.
22717     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22718   else
22719     ac_dir_suffix= ac_dots=
22720   fi
22721
22722   case $srcdir in
22723   .)  ac_srcdir=.
22724       if test -z "$ac_dots"; then
22725          ac_top_srcdir=.
22726       else
22727          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22728       fi ;;
22729   [\\/]* | ?:[\\/]* )
22730       ac_srcdir=$srcdir$ac_dir_suffix;
22731       ac_top_srcdir=$srcdir ;;
22732   *) # Relative path.
22733     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22734     ac_top_srcdir=$ac_dots$srcdir ;;
22735   esac
22736
22737   case $INSTALL in
22738   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22739   *) ac_INSTALL=$ac_dots$INSTALL ;;
22740   esac
22741
22742   if test x"$ac_file" != x-; then
22743     { echo "$as_me:22743: creating $ac_file" >&5
22744 echo "$as_me: creating $ac_file" >&6;}
22745     rm -f "$ac_file"
22746   fi
22747   # Let's still pretend it is `configure' which instantiates (i.e., don't
22748   # use $as_me), people would be surprised to read:
22749   #    /* config.h.  Generated automatically by config.status.  */
22750   configure_input="Generated automatically from `echo $ac_file_in |
22751                                                  sed 's,.*/,,'` by configure."
22752
22753   # First look for the input files in the build tree, otherwise in the
22754   # src tree.
22755   ac_file_inputs=`IFS=:
22756     for f in $ac_file_in; do
22757       case $f in
22758       -) echo $tmp/stdin ;;
22759       [\\/$]*)
22760          # Absolute (can't be DOS-style, as IFS=:)
22761          test -f "$f" || { { echo "$as_me:22761: error: cannot find input file: $f" >&5
22762 echo "$as_me: error: cannot find input file: $f" >&2;}
22763    { (exit 1); exit 1; }; }
22764          echo $f;;
22765       *) # Relative
22766          if test -f "$f"; then
22767            # Build tree
22768            echo $f
22769          elif test -f "$srcdir/$f"; then
22770            # Source tree
22771            echo $srcdir/$f
22772          else
22773            # /dev/null tree
22774            { { echo "$as_me:22774: error: cannot find input file: $f" >&5
22775 echo "$as_me: error: cannot find input file: $f" >&2;}
22776    { (exit 1); exit 1; }; }
22777          fi;;
22778       esac
22779     done` || { (exit 1); exit 1; }
22780 EOF
22781 cat >>$CONFIG_STATUS <<\EOF
22782   ac_warn_datarootdir=no
22783   if test x"$ac_file" != x-; then
22784     for ac_item in $ac_file_inputs
22785     do
22786       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22787       if test -n "$ac_seen"; then
22788         ac_used=`grep '@datarootdir@' $ac_item`
22789         if test -z "$ac_used"; then
22790           { echo "$as_me:22790: WARNING: datarootdir was used implicitly but not set:
22791 $ac_seen" >&5
22792 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22793 $ac_seen" >&2;}
22794           ac_warn_datarootdir=yes
22795         fi
22796       fi
22797       ac_seen=`grep '${datarootdir}' $ac_item`
22798       if test -n "$ac_seen"; then
22799         { echo "$as_me:22799: WARNING: datarootdir was used explicitly but not set:
22800 $ac_seen" >&5
22801 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22802 $ac_seen" >&2;}
22803         ac_warn_datarootdir=yes
22804       fi
22805     done
22806   fi
22807
22808 if test "x$ac_warn_datarootdir" = xyes; then
22809   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22810 fi
22811
22812 EOF
22813 cat >>$CONFIG_STATUS <<EOF
22814   sed "$ac_vpsub
22815 $extrasub
22816 EOF
22817 cat >>$CONFIG_STATUS <<\EOF
22818 :t
22819 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22820 s,@configure_input@,$configure_input,;t t
22821 s,@srcdir@,$ac_srcdir,;t t
22822 s,@top_srcdir@,$ac_top_srcdir,;t t
22823 s,@INSTALL@,$ac_INSTALL,;t t
22824 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22825   rm -f $tmp/stdin
22826   if test x"$ac_file" != x-; then
22827     cp $tmp/out $ac_file
22828
22829     for ac_name in prefix exec_prefix datarootdir
22830     do
22831         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22832         if test -n "$ac_seen"; then
22833             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22834             if test -z "$ac_init"; then
22835               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22836               { echo "$as_me:22836: WARNING: Variable $ac_name is used but was not set:
22837 $ac_seen" >&5
22838 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22839 $ac_seen" >&2;}
22840             fi
22841         fi
22842     done
22843     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22844     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22845     if test -s $tmp/out; then
22846       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22847       { echo "$as_me:22847: WARNING: Some variables may not be substituted:
22848 $ac_seen" >&5
22849 echo "$as_me: WARNING: Some variables may not be substituted:
22850 $ac_seen" >&2;}
22851     fi
22852   else
22853     cat $tmp/out
22854   fi
22855   rm -f $tmp/out
22856
22857 done
22858 EOF
22859 cat >>$CONFIG_STATUS <<\EOF
22860
22861 #
22862 # CONFIG_HEADER section.
22863 #
22864
22865 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22866 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22867 #
22868 # ac_d sets the value in "#define NAME VALUE" lines.
22869 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22870 ac_dB='[        ].*$,\1#\2'
22871 ac_dC=' '
22872 ac_dD=',;t'
22873 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22874 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22875 ac_iB='\([      ]\),\1#\2define\3'
22876 ac_iC=' '
22877 ac_iD='\4,;t'
22878 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22879 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22880 ac_uB='$,\1#\2define\3'
22881 ac_uC=' '
22882 ac_uD=',;t'
22883
22884 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22885   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22886   case $ac_file in
22887   - | *:- | *:-:* ) # input from stdin
22888         cat >$tmp/stdin
22889         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22890         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22891   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22892         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22893   * )   ac_file_in=$ac_file.in ;;
22894   esac
22895
22896   test x"$ac_file" != x- && { echo "$as_me:22896: creating $ac_file" >&5
22897 echo "$as_me: creating $ac_file" >&6;}
22898
22899   # First look for the input files in the build tree, otherwise in the
22900   # src tree.
22901   ac_file_inputs=`IFS=:
22902     for f in $ac_file_in; do
22903       case $f in
22904       -) echo $tmp/stdin ;;
22905       [\\/$]*)
22906          # Absolute (can't be DOS-style, as IFS=:)
22907          test -f "$f" || { { echo "$as_me:22907: error: cannot find input file: $f" >&5
22908 echo "$as_me: error: cannot find input file: $f" >&2;}
22909    { (exit 1); exit 1; }; }
22910          echo $f;;
22911       *) # Relative
22912          if test -f "$f"; then
22913            # Build tree
22914            echo $f
22915          elif test -f "$srcdir/$f"; then
22916            # Source tree
22917            echo $srcdir/$f
22918          else
22919            # /dev/null tree
22920            { { echo "$as_me:22920: error: cannot find input file: $f" >&5
22921 echo "$as_me: error: cannot find input file: $f" >&2;}
22922    { (exit 1); exit 1; }; }
22923          fi;;
22924       esac
22925     done` || { (exit 1); exit 1; }
22926   # Remove the trailing spaces.
22927   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
22928
22929 EOF
22930
22931 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
22932 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
22933 # be either 'cat' or 'sort'.
22934 cat confdefs.h | uniq >conftest.vals
22935
22936 # Break up conftest.vals because some shells have a limit on
22937 # the size of here documents, and old seds have small limits too.
22938
22939 rm -f conftest.tail
22940 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
22941 while grep . conftest.vals >/dev/null
22942 do
22943   # Write chunks of a limited-size here document to conftest.frag.
22944   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22945   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22946   echo 'CEOF' >> $CONFIG_STATUS
22947   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22948   rm -f conftest.vals
22949   mv conftest.tail conftest.vals
22950 done
22951 rm -f conftest.vals
22952
22953 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
22954 # marker @DEFS@.
22955 echo '  cat >> conftest.edit <<CEOF
22956 /@DEFS@/r conftest.frag
22957 /@DEFS@/d
22958 CEOF
22959 sed -f conftest.edit $tmp/in > $tmp/out
22960 rm -f $tmp/in
22961 mv $tmp/out $tmp/in
22962 rm -f conftest.edit conftest.frag
22963 ' >> $CONFIG_STATUS
22964
22965 cat >>$CONFIG_STATUS <<\EOF
22966   # Let's still pretend it is `configure' which instantiates (i.e., don't
22967   # use $as_me), people would be surprised to read:
22968   #    /* config.h.  Generated automatically by config.status.  */
22969   if test x"$ac_file" = x-; then
22970     echo "/* Generated automatically by configure.  */" >$tmp/config.h
22971   else
22972     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22973   fi
22974   cat $tmp/in >>$tmp/config.h
22975   rm -f $tmp/in
22976   if test x"$ac_file" != x-; then
22977     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22978       { echo "$as_me:22978: $ac_file is unchanged" >&5
22979 echo "$as_me: $ac_file is unchanged" >&6;}
22980     else
22981       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22982          X"$ac_file" : 'X\(//\)[^/]' \| \
22983          X"$ac_file" : 'X\(//\)$' \| \
22984          X"$ac_file" : 'X\(/\)' \| \
22985          .     : '\(.\)' 2>/dev/null ||
22986 echo X"$ac_file" |
22987     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22988           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22989           /^X\(\/\/\)$/{ s//\1/; q; }
22990           /^X\(\/\).*/{ s//\1/; q; }
22991           s/.*/./; q'`
22992       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22993         { case "$ac_dir" in
22994   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22995   *)                      as_incr_dir=.;;
22996 esac
22997 as_dummy="$ac_dir"
22998 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22999   case $as_mkdir_dir in
23000     # Skip DOS drivespec
23001     ?:) as_incr_dir=$as_mkdir_dir ;;
23002     *)
23003       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23004       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23005     ;;
23006   esac
23007 done; }
23008
23009       fi
23010       rm -f $ac_file
23011       mv $tmp/config.h $ac_file
23012     fi
23013   else
23014     cat $tmp/config.h
23015     rm -f $tmp/config.h
23016   fi
23017 done
23018 EOF
23019 cat >>$CONFIG_STATUS <<\EOF
23020 #
23021 # CONFIG_COMMANDS section.
23022 #
23023 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23024   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23025   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23026
23027   case $ac_dest in
23028     default )
23029 if test "x$cf_with_tests" != xno ; then
23030
23031 for cf_dir in test
23032 do
23033         if test ! -d $srcdir/$cf_dir; then
23034                 continue
23035         elif test -f $srcdir/$cf_dir/programs; then
23036                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23037         fi
23038 done
23039
23040 fi
23041
23042 cf_prefix=$LIB_PREFIX
23043
23044 case $cf_cv_shlib_version in #(vi
23045 cygdll|msysdll|mingw)
23046         TINFO_NAME=$TINFO_ARG_SUFFIX
23047         TINFO_SUFFIX=.dll
23048         ;;
23049 esac
23050
23051 if test -n "$TINFO_SUFFIX" ; then
23052         case $TINFO_SUFFIX in
23053         tw*)
23054                 TINFO_NAME="${TINFO_NAME}tw"
23055                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
23056                 ;;
23057         t*)
23058                 TINFO_NAME="${TINFO_NAME}t"
23059                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
23060                 ;;
23061         w*)
23062                 TINFO_NAME="${TINFO_NAME}w"
23063                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
23064                 ;;
23065         esac
23066 fi
23067
23068 for cf_dir in $SRC_SUBDIRS
23069 do
23070         if test ! -d $srcdir/$cf_dir ; then
23071                 continue
23072         elif test -f $srcdir/$cf_dir/modules; then
23073
23074                 SHARED_LIB=
23075                 Libs_To_Make=
23076                 for cf_item in $cf_LIST_MODELS
23077                 do
23078
23079         case X$cf_item in #(vi
23080         Xlibtool) #(vi
23081                 cf_suffix='.la'
23082                 cf_depsuf=$cf_suffix
23083                 ;;
23084         Xdebug) #(vi
23085                 cf_suffix='_g.a'
23086                 cf_depsuf=$cf_suffix
23087                 ;;
23088         Xprofile) #(vi
23089                 cf_suffix='_p.a'
23090                 cf_depsuf=$cf_suffix
23091                 ;;
23092         Xshared) #(vi
23093                 case $cf_cv_system_name in
23094                 aix[5-7]*) #(vi
23095                         cf_suffix='.so'
23096                         cf_depsuf=$cf_suffix
23097                         ;;
23098                 cygwin*|msys*|mingw*) #(vi
23099                         cf_suffix='.dll'
23100                         cf_depsuf='.dll.a'
23101                         ;;
23102                 darwin*) #(vi
23103                         cf_suffix='.dylib'
23104                         cf_depsuf=$cf_suffix
23105                         ;;
23106                 hpux*) #(vi
23107                         case $target in
23108                         ia64*) #(vi
23109                                 cf_suffix='.so'
23110                                 cf_depsuf=$cf_suffix
23111                                 ;;
23112                         *) #(vi
23113                                 cf_suffix='.sl'
23114                                 cf_depsuf=$cf_suffix
23115                                 ;;
23116                         esac
23117                         ;;
23118                 *) #(vi
23119                         cf_suffix='.so'
23120                         cf_depsuf=$cf_suffix
23121                         ;;
23122                 esac
23123                 ;;
23124         *)
23125                 cf_suffix='.a'
23126                 cf_depsuf=$cf_suffix
23127                 ;;
23128         esac
23129         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23130         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23131
23132                         cf_libname=$cf_dir
23133                         test "$cf_dir" = c++ && cf_libname=ncurses++
23134                         if test $cf_item = shared ; then
23135                                 if test -n "${LIB_SUFFIX}"
23136                                 then
23137                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23138                                 else
23139                                         cf_shared_suffix="$cf_suffix"
23140                                 fi
23141                                 if test "$cf_cv_do_symlinks" = yes ; then
23142                                         cf_version_name=
23143
23144                                         case "$cf_cv_shlib_version" in #(vi
23145                                         rel) #(vi
23146                                                 cf_version_name=REL_VERSION
23147                                                 ;;
23148                                         abi)
23149                                                 cf_version_name=ABI_VERSION
23150                                                 ;;
23151                                         esac
23152
23153                                         if test -n "$cf_version_name"
23154                                         then
23155                                                 case "$cf_cv_system_name" in #(vi
23156                                                 darwin*)
23157                                                         # "w", etc?
23158                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23159                                                         ;; #(vi
23160                                                 *)
23161                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23162                                                         ;;
23163                                                 esac
23164                                         fi
23165                                         if test -n "${LIB_SUFFIX}"
23166                                         then
23167                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23168                                         else
23169                                                 cf_shared_suffix="$cf_suffix"
23170                                         fi
23171                                 fi
23172                                 # cygwin needs import library, and has unique naming convention
23173                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23174                                 # use 'cyg' prefix for shared lib.
23175                                 case $cf_cv_shlib_version in #(vi
23176                                 cygdll) #(vi
23177                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23178                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
23179                                         continue
23180                                         ;;
23181                                 msysdll) #(vi
23182                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23183                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
23184                                         continue
23185                                         ;;
23186                                 mingw)
23187                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23188                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
23189                                         continue
23190                                         ;;
23191                                 esac
23192                         fi
23193                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23194                 done
23195
23196                 if test $cf_dir = ncurses ; then
23197                         cf_subsets="$LIB_SUBSETS"
23198                         cf_r_parts="$cf_subsets"
23199                         cf_liblist="$Libs_To_Make"
23200
23201                         while test -n "$cf_r_parts"
23202                         do
23203                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23204                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23205                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23206                                         cf_item=
23207                                         case $cf_l_parts in #(vi
23208                                         *termlib*) #(vi
23209                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23210                                                 ;;
23211                                         *ticlib*)
23212                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23213                                                 ;;
23214                                         *)
23215                                                 break
23216                                                 ;;
23217                                         esac
23218                                         if test -n "$cf_item"; then
23219                                                 Libs_To_Make="$cf_item $Libs_To_Make"
23220                                         fi
23221                                 else
23222                                         break
23223                                 fi
23224                         done
23225                 else
23226                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23227                 fi
23228
23229                 if test $cf_dir = c++; then
23230                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23231                                 cf_list=
23232                                 for cf_item in $Libs_To_Make
23233                                 do
23234                                         case $cf_item in
23235                                         *.a)
23236                                                 ;;
23237                                         *)
23238                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23239                                                 ;;
23240                                         esac
23241                                         for cf_test in $cf_list
23242                                         do
23243                                                 if test "$cf_test" = "$cf_item"
23244                                                 then
23245                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23246                                                         cf_item=
23247                                                         break
23248                                                 fi
23249                                         done
23250                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23251                                 done
23252                                 Libs_To_Make="$cf_list"
23253                         fi
23254                 fi
23255
23256                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23257                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23258                         $cf_dir/Makefile >$cf_dir/Makefile.out
23259                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23260
23261                 $AWK -f $srcdir/mk-0th.awk \
23262                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23263                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23264
23265                 for cf_subset in $cf_subsets
23266                 do
23267                         cf_subdirs=
23268                         for cf_item in $cf_LIST_MODELS
23269                         do
23270
23271                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23272
23273 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23274
23275                         CXX_MODEL=$cf_ITEM
23276                         if test "$CXX_MODEL" = SHARED; then
23277                                 case $cf_cv_shlib_version in #(vi
23278                                 cygdll|msysdll|mingw) #(vi
23279                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23280
23281 echo "${as_me:-configure}:23281: testing overriding CXX_MODEL to SHARED ..." 1>&5
23282
23283                                         with_shared_cxx=yes
23284                                         ;;
23285                                 *)
23286                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23287                                         ;;
23288                                 esac
23289                         fi
23290
23291         case X$cf_item in #(vi
23292         Xlibtool) #(vi
23293                 cf_suffix='.la'
23294                 cf_depsuf=$cf_suffix
23295                 ;;
23296         Xdebug) #(vi
23297                 cf_suffix='_g.a'
23298                 cf_depsuf=$cf_suffix
23299                 ;;
23300         Xprofile) #(vi
23301                 cf_suffix='_p.a'
23302                 cf_depsuf=$cf_suffix
23303                 ;;
23304         Xshared) #(vi
23305                 case $cf_cv_system_name in
23306                 aix[5-7]*) #(vi
23307                         cf_suffix='.so'
23308                         cf_depsuf=$cf_suffix
23309                         ;;
23310                 cygwin*|msys*|mingw*) #(vi
23311                         cf_suffix='.dll'
23312                         cf_depsuf='.dll.a'
23313                         ;;
23314                 darwin*) #(vi
23315                         cf_suffix='.dylib'
23316                         cf_depsuf=$cf_suffix
23317                         ;;
23318                 hpux*) #(vi
23319                         case $target in
23320                         ia64*) #(vi
23321                                 cf_suffix='.so'
23322                                 cf_depsuf=$cf_suffix
23323                                 ;;
23324                         *) #(vi
23325                                 cf_suffix='.sl'
23326                                 cf_depsuf=$cf_suffix
23327                                 ;;
23328                         esac
23329                         ;;
23330                 *) #(vi
23331                         cf_suffix='.so'
23332                         cf_depsuf=$cf_suffix
23333                         ;;
23334                 esac
23335                 ;;
23336         *)
23337                 cf_suffix='.a'
23338                 cf_depsuf=$cf_suffix
23339                 ;;
23340         esac
23341         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23342         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23343
23344         case $cf_item in
23345         libtool) cf_subdir='obj_lo'  ;;
23346         normal)  cf_subdir='objects' ;;
23347         debug)   cf_subdir='obj_g' ;;
23348         profile) cf_subdir='obj_p' ;;
23349         shared)
23350                 case $cf_cv_system_name in #(vi
23351                 cygwin|msys) #(vi
23352                         cf_subdir='objects' ;;
23353                 *)
23354                         cf_subdir='obj_s' ;;
23355                 esac
23356         esac
23357
23358                         # Test for case where we build libtinfo with a different name.
23359                         cf_libname=$cf_dir
23360                         if test $cf_dir = ncurses ; then
23361                                 case $cf_subset in
23362                                 *base*)
23363                                         cf_libname=${cf_libname}$LIB_SUFFIX
23364                                         ;;
23365                                 *termlib*)
23366                                         cf_libname=$TINFO_LIB_SUFFIX
23367                                         ;;
23368                                 ticlib*)
23369                                         cf_libname=$TICS_LIB_SUFFIX
23370                                         ;;
23371                                 esac
23372                         elif test $cf_dir = c++ ; then
23373                                 cf_libname=ncurses++$LIB_SUFFIX
23374                         else
23375                                 cf_libname=${cf_libname}$LIB_SUFFIX
23376                         fi
23377                         if test -n "${DFT_ARG_SUFFIX}" ; then
23378                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23379                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23380                         fi
23381
23382                         # These dependencies really are for development, not
23383                         # builds, but they are useful in porting, too.
23384                         cf_depend="../include/ncurses_cfg.h"
23385                         if test "$srcdir" = "."; then
23386                                 cf_reldir="."
23387                         else
23388                                 cf_reldir="\${srcdir}"
23389                         fi
23390
23391                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23392                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23393                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23394                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23395                         fi
23396
23397                         cf_dir_suffix=
23398                         old_cf_suffix="$cf_suffix"
23399                         if test "$cf_cv_shlib_version_infix" = yes ; then
23400                         if test -n "$LIB_SUFFIX" ; then
23401                                 case $LIB_SUFFIX in
23402                                 tw*)
23403                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23404                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23405                                         cf_dir_suffix=tw
23406                                         ;;
23407                                 t*)
23408                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23409                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23410                                         cf_dir_suffix=t
23411                                         ;;
23412                                 w*)
23413                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23414                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23415                                         cf_dir_suffix=w
23416                                         ;;
23417                                 esac
23418                         fi
23419                         fi
23420
23421                         $AWK -f $srcdir/mk-1st.awk \
23422                                 name=${cf_libname}${cf_dir_suffix} \
23423                                 traces=$LIB_TRACING \
23424                                 MODEL=$cf_ITEM \
23425                                 CXX_MODEL=$CXX_MODEL \
23426                                 model=$cf_subdir \
23427                                 prefix=$cf_prefix \
23428                                 suffix=$cf_suffix \
23429                                 subset=$cf_subset \
23430                                 driver=$cf_cv_term_driver \
23431                                 SymLink="$LN_S" \
23432                                 TermlibRoot=$TINFO_NAME \
23433                                 TermlibSuffix=$TINFO_SUFFIX \
23434                                 ShlibVer=$cf_cv_shlib_version \
23435                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23436                                 ReLink=${cf_cv_do_relink:-no} \
23437                                 DoLinks=$cf_cv_do_symlinks \
23438                                 rmSoLocs=$cf_cv_rm_so_locs \
23439                                 ldconfig="$LDCONFIG" \
23440                                 overwrite=$WITH_OVERWRITE \
23441                                 depend="$cf_depend" \
23442                                 host="$host" \
23443                                 libtool_version="$LIBTOOL_VERSION" \
23444                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23445
23446                         cf_suffix="$old_cf_suffix"
23447
23448                         for cf_subdir2 in $cf_subdirs lib
23449                         do
23450                                 test $cf_subdir = $cf_subdir2 && break
23451                         done
23452                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23453                         $AWK -f $srcdir/mk-2nd.awk \
23454                                 name=$cf_dir \
23455                                 traces=$LIB_TRACING \
23456                                 MODEL=$cf_ITEM \
23457                                 model=$cf_subdir \
23458                                 subset=$cf_subset \
23459                                 srcdir=$srcdir \
23460                                 echo=$WITH_ECHO \
23461                                 crenames=$cf_cv_prog_CC_c_o \
23462                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23463                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23464                         cf_subdirs="$cf_subdirs $cf_subdir"
23465                         done
23466                 done
23467         fi
23468
23469         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23470 done
23471
23472 for cf_dir in $SRC_SUBDIRS
23473 do
23474         if test ! -d $srcdir/$cf_dir ; then
23475                 continue
23476         fi
23477
23478         if test -f $cf_dir/Makefile ; then
23479                 case "$cf_dir" in
23480                 Ada95) #(vi
23481                         echo 'libs \' >> Makefile
23482                         echo 'install.libs \' >> Makefile
23483                         echo 'uninstall.libs ::' >> Makefile
23484                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23485                         ;;
23486                 esac
23487         fi
23488
23489         if test -f $srcdir/$cf_dir/modules; then
23490                 echo >> Makefile
23491                 if test -f $srcdir/$cf_dir/headers; then
23492 cat >> Makefile <<CF_EOF
23493 install.includes \\
23494 uninstall.includes \\
23495 CF_EOF
23496                 fi
23497 if test "$cf_dir" != "c++" ; then
23498 echo 'lint \' >> Makefile
23499 fi
23500 cat >> Makefile <<CF_EOF
23501 libs \\
23502 lintlib \\
23503 install.libs \\
23504 uninstall.libs \\
23505 install.$cf_dir \\
23506 uninstall.$cf_dir ::
23507         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23508 CF_EOF
23509         elif test -f $srcdir/$cf_dir/headers; then
23510 cat >> Makefile <<CF_EOF
23511
23512 libs \\
23513 install.libs \\
23514 uninstall.libs \\
23515 install.includes \\
23516 uninstall.includes ::
23517         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23518 CF_EOF
23519 fi
23520 done
23521
23522 if test "x$cf_with_db_install" = xyes; then
23523 cat >> Makefile <<CF_EOF
23524
23525 install.libs uninstall.libs \\
23526 install.data uninstall.data ::
23527 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23528 CF_EOF
23529 else
23530 cat >> Makefile <<CF_EOF
23531
23532 install.libs uninstall.libs ::
23533         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23534 CF_EOF
23535 fi
23536
23537 if test "x$cf_with_manpages" = xyes; then
23538 cat >> Makefile <<CF_EOF
23539
23540 install.man \\
23541 uninstall.man ::
23542         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23543 CF_EOF
23544 fi
23545
23546 cat >> Makefile <<CF_EOF
23547
23548 distclean ::
23549         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23550         rm -f headers.sh headers.sed mk_shared_lib.sh
23551         rm -f edit_man.* man_alias.*
23552         rm -rf \${DIRS_TO_MAKE}
23553 CF_EOF
23554
23555 # Special case: tack's manpage lives in its own directory.
23556 if test "x$cf_with_manpages" = xyes; then
23557 if test -d tack ; then
23558 if test -f $srcdir/$tack.h; then
23559 cat >> Makefile <<CF_EOF
23560
23561 install.man \\
23562 uninstall.man ::
23563         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23564 CF_EOF
23565 fi
23566 fi
23567 fi
23568
23569 rm -f headers.sed headers.sh
23570
23571 echo creating headers.sh
23572 cat >headers.sh <<CF_EOF
23573 #! /bin/sh
23574 # This shell script is generated by the 'configure' script.  It is invoked in a
23575 # subdirectory of the build tree.  It generates a sed-script in the parent
23576 # directory that is used to adjust includes for header files that reside in a
23577 # subdirectory of /usr/include, etc.
23578 PRG=""
23579 while test \$# != 3
23580 do
23581 PRG="\$PRG \$1"; shift
23582 done
23583 DST=\$1
23584 REF=\$2
23585 SRC=\$3
23586 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23587 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23588 echo installing \$SRC in \$DST
23589 CF_EOF
23590
23591 if test $WITH_CURSES_H = yes; then
23592         cat >>headers.sh <<CF_EOF
23593 case \$DST in
23594 /*/include/*)
23595         END=\`basename \$DST\`
23596         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23597         do
23598                 NAME=\`basename \$i\`
23599                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23600         done
23601         ;;
23602 *)
23603         echo "" >> \$TMPSED
23604         ;;
23605 esac
23606 CF_EOF
23607
23608 else
23609         cat >>headers.sh <<CF_EOF
23610 case \$DST in
23611 /*/include/*)
23612         END=\`basename \$DST\`
23613         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23614         do
23615                 NAME=\`basename \$i\`
23616                 if test "\$NAME" = "curses.h"
23617                 then
23618                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23619                         NAME=ncurses.h
23620                 fi
23621                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23622         done
23623         ;;
23624 *)
23625         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23626         ;;
23627 esac
23628 CF_EOF
23629 fi
23630 cat >>headers.sh <<CF_EOF
23631 rm -f \$TMPSRC
23632 sed -f \$TMPSED \$SRC > \$TMPSRC
23633 NAME=\`basename \$SRC\`
23634 CF_EOF
23635 if test $WITH_CURSES_H != yes; then
23636         cat >>headers.sh <<CF_EOF
23637 test "\$NAME" = "curses.h" && NAME=ncurses.h
23638 CF_EOF
23639 fi
23640 cat >>headers.sh <<CF_EOF
23641 # Just in case someone gzip'd manpages, remove the conflicting copy.
23642 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23643
23644 eval \$PRG \$TMPSRC \$DST/\$NAME
23645 rm -f \$TMPSRC \$TMPSED
23646 CF_EOF
23647
23648 chmod 0755 headers.sh
23649
23650 for cf_dir in $SRC_SUBDIRS
23651 do
23652         if test ! -d $srcdir/$cf_dir ; then
23653                 continue
23654         fi
23655
23656         if test -f $srcdir/$cf_dir/headers; then
23657                 $AWK -f $srcdir/mk-hdr.awk \
23658                         subset="$LIB_SUBSETS" \
23659                         compat="$WITH_CURSES_H" \
23660                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23661         fi
23662
23663         if test -f $srcdir/$cf_dir/modules; then
23664                 if test "$cf_dir" != "c++" ; then
23665                         cat >>$cf_dir/Makefile <<"CF_EOF"
23666 depend : ${AUTO_SRC}
23667         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23668
23669 # DO NOT DELETE THIS LINE -- make depend depends on it.
23670 CF_EOF
23671                 fi
23672         fi
23673 done
23674
23675 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23676 if test -z "$USE_OLD_MAKERULES" ; then
23677         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23678 fi
23679 fi
23680  ;;
23681   esac
23682 done
23683 EOF
23684
23685 cat >>$CONFIG_STATUS <<\EOF
23686
23687 { (exit 0); exit 0; }
23688 EOF
23689 chmod +x $CONFIG_STATUS
23690 ac_clean_files=$ac_clean_files_save
23691
23692 # configure is writing to config.log, and then calls config.status.
23693 # config.status does its own redirection, appending to config.log.
23694 # Unfortunately, on DOS this fails, as config.log is still kept open
23695 # by configure, so config.status won't be able to write to it; its
23696 # output is simply discarded.  So we exec the FD to /dev/null,
23697 # effectively closing config.log, so it can be properly (re)opened and
23698 # appended to by config.status.  When coming back to configure, we
23699 # need to make the FD available again.
23700 if test "$no_create" != yes; then
23701   ac_cs_success=:
23702   exec 5>/dev/null
23703   $SHELL $CONFIG_STATUS || ac_cs_success=false
23704   exec 5>>config.log
23705   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23706   # would make configure fail if this is the last instruction.
23707   $ac_cs_success || { (exit 1); exit 1; }
23708 fi
23709 ${MAKE:-make} preinstall