]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
e32ae9ea7ca18a2e115c154685bb328486f3389b
[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.20121002.
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.20121002.  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"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1114   *c*,-n*) ECHO_N= ECHO_C='
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/usr" != "x$prefix" && \
9366 test -d "/usr" && \
9367 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9368         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
9369         test -d /usr/include &&          cf_search="$cf_search /usr/include"
9370         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
9371         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
9372         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
9373         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
9374 }
9375
9376 test "x$prefix" != "xNONE" && \
9377 test -d "$prefix" && \
9378  {
9379         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9380         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9381         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9382         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9383         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9384         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9385 }
9386
9387 test "x/usr/local" != "x$prefix" && \
9388 test -d "/usr/local" && \
9389 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9390         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
9391         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9392         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
9393         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
9394         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
9395         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
9396 }
9397
9398 test "x/opt" != "x$prefix" && \
9399 test -d "/opt" && \
9400 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9401         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
9402         test -d /opt/include &&          cf_search="$cf_search /opt/include"
9403         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
9404         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
9405         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9406         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9407 }
9408
9409 test "x$HOME" != "x$prefix" && \
9410 test -d "$HOME" && \
9411 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9412         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9413         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9414         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9415         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9416         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9417         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9418 }
9419
9420 test "$includedir" != NONE && \
9421 test "$includedir" != "/usr/include" && \
9422 test -d "$includedir" && {
9423         test -d $includedir &&    cf_search="$cf_search $includedir"
9424         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9425 }
9426
9427 test "$oldincludedir" != NONE && \
9428 test "$oldincludedir" != "/usr/include" && \
9429 test -d "$oldincludedir" && {
9430         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9431         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9432 }
9433
9434 cf_search="$cf_search $cf_header_path_list"
9435
9436     for cf_cv_header_path_utf8 in $cf_search
9437     do
9438       if test -d $cf_cv_header_path_utf8 ; then
9439         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9440
9441 echo "${as_me:-configure}:9441: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9442
9443         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9444         cat >conftest.$ac_ext <<_ACEOF
9445 #line 9445 "configure"
9446 #include "confdefs.h"
9447
9448 #include <libutf8.h>
9449 int
9450 main ()
9451 {
9452 putwc(0,0);
9453   ;
9454   return 0;
9455 }
9456 _ACEOF
9457 rm -f conftest.$ac_objext
9458 if { (eval echo "$as_me:9458: \"$ac_compile\"") >&5
9459   (eval $ac_compile) 2>&5
9460   ac_status=$?
9461   echo "$as_me:9461: \$? = $ac_status" >&5
9462   (exit $ac_status); } &&
9463          { ac_try='test -s conftest.$ac_objext'
9464   { (eval echo "$as_me:9464: \"$ac_try\"") >&5
9465   (eval $ac_try) 2>&5
9466   ac_status=$?
9467   echo "$as_me:9467: \$? = $ac_status" >&5
9468   (exit $ac_status); }; }; then
9469
9470             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9471
9472 echo "${as_me:-configure}:9472: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9473
9474             cf_cv_find_linkage_utf8=maybe
9475             cf_test_CPPFLAGS="$CPPFLAGS"
9476             break
9477 else
9478   echo "$as_me: failed program was:" >&5
9479 cat conftest.$ac_ext >&5
9480
9481             CPPFLAGS="$cf_save_CPPFLAGS"
9482
9483 fi
9484 rm -f conftest.$ac_objext conftest.$ac_ext
9485       fi
9486     done
9487
9488     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9489
9490 echo "${as_me:-configure}:9490: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9491
9492       cf_save_LIBS="$LIBS"
9493       cf_save_LDFLAGS="$LDFLAGS"
9494
9495       if test "$cf_cv_find_linkage_utf8" != yes ; then
9496
9497 cf_search=
9498 cf_library_path_list=""
9499 if test -n "${LDFLAGS}${LIBS}" ; then
9500         for cf_library_path in $LDFLAGS $LIBS
9501         do
9502                 case $cf_library_path in #(vi
9503                 -L*)
9504                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9505
9506 test "x$cf_library_path" != "xNONE" && \
9507 test -d "$cf_library_path" && \
9508  {
9509         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9510         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9511         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9512         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9513         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9514         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9515 }
9516
9517                         cf_library_path_list="$cf_library_path_list $cf_search"
9518                         ;;
9519                 esac
9520         done
9521 fi
9522
9523 cf_search=
9524
9525 test "x/usr" != "x$prefix" && \
9526 test -d "/usr" && \
9527 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9528         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9529         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9530         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9531         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9532         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9533         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9534 }
9535
9536 test "x$prefix" != "xNONE" && \
9537 test -d "$prefix" && \
9538  {
9539         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9540         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9541         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9542         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9543         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9544         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9545 }
9546
9547 test "x/usr/local" != "x$prefix" && \
9548 test -d "/usr/local" && \
9549 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9550         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9551         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9552         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9553         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9554         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9555         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9556 }
9557
9558 test "x/opt" != "x$prefix" && \
9559 test -d "/opt" && \
9560 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9561         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9562         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9563         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9564         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9565         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9566         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9567 }
9568
9569 test "x$HOME" != "x$prefix" && \
9570 test -d "$HOME" && \
9571 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9572         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9573         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9574         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9575         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9576         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9577         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9578 }
9579
9580 cf_search="$cf_library_path_list $cf_search"
9581
9582         for cf_cv_library_path_utf8 in $cf_search
9583         do
9584           if test -d $cf_cv_library_path_utf8 ; then
9585             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9586
9587 echo "${as_me:-configure}:9587: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9588
9589             CPPFLAGS="$cf_test_CPPFLAGS"
9590             LIBS="-lutf8  $cf_save_LIBS"
9591             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9592             cat >conftest.$ac_ext <<_ACEOF
9593 #line 9593 "configure"
9594 #include "confdefs.h"
9595
9596 #include <libutf8.h>
9597 int
9598 main ()
9599 {
9600 putwc(0,0);
9601   ;
9602   return 0;
9603 }
9604 _ACEOF
9605 rm -f conftest.$ac_objext conftest$ac_exeext
9606 if { (eval echo "$as_me:9606: \"$ac_link\"") >&5
9607   (eval $ac_link) 2>&5
9608   ac_status=$?
9609   echo "$as_me:9609: \$? = $ac_status" >&5
9610   (exit $ac_status); } &&
9611          { ac_try='test -s conftest$ac_exeext'
9612   { (eval echo "$as_me:9612: \"$ac_try\"") >&5
9613   (eval $ac_try) 2>&5
9614   ac_status=$?
9615   echo "$as_me:9615: \$? = $ac_status" >&5
9616   (exit $ac_status); }; }; then
9617
9618                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9619
9620 echo "${as_me:-configure}:9620: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9621
9622                 cf_cv_find_linkage_utf8=yes
9623                 cf_cv_library_file_utf8="-lutf8"
9624                 break
9625 else
9626   echo "$as_me: failed program was:" >&5
9627 cat conftest.$ac_ext >&5
9628
9629                 CPPFLAGS="$cf_save_CPPFLAGS"
9630                 LIBS="$cf_save_LIBS"
9631                 LDFLAGS="$cf_save_LDFLAGS"
9632
9633 fi
9634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9635           fi
9636         done
9637         CPPFLAGS="$cf_save_CPPFLAGS"
9638         LDFLAGS="$cf_save_LDFLAGS"
9639       fi
9640
9641     else
9642       cf_cv_find_linkage_utf8=no
9643     fi
9644
9645 fi
9646 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9647
9648 fi
9649 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9650
9651 LIBS="$cf_save_LIBS"
9652
9653 if test "$cf_cv_find_linkage_utf8" = yes ; then
9654 cf_cv_utf8_lib=add-on
9655 else
9656 cf_cv_utf8_lib=no
9657 fi
9658
9659 fi
9660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9661 fi
9662 echo "$as_me:9662: result: $cf_cv_utf8_lib" >&5
9663 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9664
9665 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9666 # ncurses/ncursesw:
9667 if test "$cf_cv_utf8_lib" = "add-on" ; then
9668
9669 cat >>confdefs.h <<\EOF
9670 #define HAVE_LIBUTF8_H 1
9671 EOF
9672
9673 if test -n "$cf_cv_header_path_utf8" ; then
9674   for cf_add_incdir in $cf_cv_header_path_utf8
9675   do
9676         while test $cf_add_incdir != /usr/include
9677         do
9678           if test -d $cf_add_incdir
9679           then
9680                 cf_have_incdir=no
9681                 if test -n "$CFLAGS$CPPFLAGS" ; then
9682                   # a loop is needed to ensure we can add subdirs of existing dirs
9683                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9684                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9685                           cf_have_incdir=yes; break
9686                         fi
9687                   done
9688                 fi
9689
9690                 if test "$cf_have_incdir" = no ; then
9691                   if test "$cf_add_incdir" = /usr/local/include ; then
9692                         if test "$GCC" = yes
9693                         then
9694                           cf_save_CPPFLAGS=$CPPFLAGS
9695                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9696                           cat >conftest.$ac_ext <<_ACEOF
9697 #line 9697 "configure"
9698 #include "confdefs.h"
9699 #include <stdio.h>
9700 int
9701 main ()
9702 {
9703 printf("Hello")
9704   ;
9705   return 0;
9706 }
9707 _ACEOF
9708 rm -f conftest.$ac_objext
9709 if { (eval echo "$as_me:9709: \"$ac_compile\"") >&5
9710   (eval $ac_compile) 2>&5
9711   ac_status=$?
9712   echo "$as_me:9712: \$? = $ac_status" >&5
9713   (exit $ac_status); } &&
9714          { ac_try='test -s conftest.$ac_objext'
9715   { (eval echo "$as_me:9715: \"$ac_try\"") >&5
9716   (eval $ac_try) 2>&5
9717   ac_status=$?
9718   echo "$as_me:9718: \$? = $ac_status" >&5
9719   (exit $ac_status); }; }; then
9720   :
9721 else
9722   echo "$as_me: failed program was:" >&5
9723 cat conftest.$ac_ext >&5
9724 cf_have_incdir=yes
9725 fi
9726 rm -f conftest.$ac_objext conftest.$ac_ext
9727                           CPPFLAGS=$cf_save_CPPFLAGS
9728                         fi
9729                   fi
9730                 fi
9731
9732                 if test "$cf_have_incdir" = no ; then
9733                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9734
9735 echo "${as_me:-configure}:9735: testing adding $cf_add_incdir to include-path ..." 1>&5
9736
9737                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9738
9739                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9740                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9741                   cf_add_incdir="$cf_top_incdir"
9742                 else
9743                   break
9744                 fi
9745           fi
9746         done
9747   done
9748 fi
9749
9750 if test -n "$cf_cv_library_path_utf8" ; then
9751   for cf_add_libdir in $cf_cv_library_path_utf8
9752   do
9753     if test $cf_add_libdir = /usr/lib ; then
9754       :
9755     elif test -d $cf_add_libdir
9756     then
9757       cf_have_libdir=no
9758       if test -n "$LDFLAGS$LIBS" ; then
9759         # a loop is needed to ensure we can add subdirs of existing dirs
9760         for cf_test_libdir in $LDFLAGS $LIBS ; do
9761           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9762             cf_have_libdir=yes; break
9763           fi
9764         done
9765       fi
9766       if test "$cf_have_libdir" = no ; then
9767         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9768
9769 echo "${as_me:-configure}:9769: testing adding $cf_add_libdir to library-path ..." 1>&5
9770
9771         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9772       fi
9773     fi
9774   done
9775 fi
9776
9777 cf_add_libs="$cf_cv_library_file_utf8"
9778 # Filter out duplicates - this happens with badly-designed ".pc" files...
9779 for cf_add_1lib in $LIBS
9780 do
9781         for cf_add_2lib in $cf_add_libs
9782         do
9783                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9784                 then
9785                         cf_add_1lib=
9786                         break
9787                 fi
9788         done
9789         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9790 done
9791 LIBS="$cf_add_libs"
9792
9793 fi
9794
9795                 if test "$cf_cv_utf8_lib" != no ; then
9796                         NCURSES_LIBUTF8=1
9797                 fi
9798         fi
9799
9800 # This is needed on Tru64 5.0 to declare mbstate_t
9801 echo "$as_me:9801: checking if we must include wchar.h to declare mbstate_t" >&5
9802 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9803 if test "${cf_cv_mbstate_t+set}" = set; then
9804   echo $ECHO_N "(cached) $ECHO_C" >&6
9805 else
9806
9807 cat >conftest.$ac_ext <<_ACEOF
9808 #line 9808 "configure"
9809 #include "confdefs.h"
9810
9811 #include <stdlib.h>
9812 #include <stdarg.h>
9813 #include <stdio.h>
9814 #ifdef HAVE_LIBUTF8_H
9815 #include <libutf8.h>
9816 #endif
9817 int
9818 main ()
9819 {
9820 mbstate_t state
9821   ;
9822   return 0;
9823 }
9824 _ACEOF
9825 rm -f conftest.$ac_objext
9826 if { (eval echo "$as_me:9826: \"$ac_compile\"") >&5
9827   (eval $ac_compile) 2>&5
9828   ac_status=$?
9829   echo "$as_me:9829: \$? = $ac_status" >&5
9830   (exit $ac_status); } &&
9831          { ac_try='test -s conftest.$ac_objext'
9832   { (eval echo "$as_me:9832: \"$ac_try\"") >&5
9833   (eval $ac_try) 2>&5
9834   ac_status=$?
9835   echo "$as_me:9835: \$? = $ac_status" >&5
9836   (exit $ac_status); }; }; then
9837   cf_cv_mbstate_t=no
9838 else
9839   echo "$as_me: failed program was:" >&5
9840 cat conftest.$ac_ext >&5
9841 cat >conftest.$ac_ext <<_ACEOF
9842 #line 9842 "configure"
9843 #include "confdefs.h"
9844
9845 #include <stdlib.h>
9846 #include <stdarg.h>
9847 #include <stdio.h>
9848 #include <wchar.h>
9849 #ifdef HAVE_LIBUTF8_H
9850 #include <libutf8.h>
9851 #endif
9852 int
9853 main ()
9854 {
9855 mbstate_t value
9856   ;
9857   return 0;
9858 }
9859 _ACEOF
9860 rm -f conftest.$ac_objext
9861 if { (eval echo "$as_me:9861: \"$ac_compile\"") >&5
9862   (eval $ac_compile) 2>&5
9863   ac_status=$?
9864   echo "$as_me:9864: \$? = $ac_status" >&5
9865   (exit $ac_status); } &&
9866          { ac_try='test -s conftest.$ac_objext'
9867   { (eval echo "$as_me:9867: \"$ac_try\"") >&5
9868   (eval $ac_try) 2>&5
9869   ac_status=$?
9870   echo "$as_me:9870: \$? = $ac_status" >&5
9871   (exit $ac_status); }; }; then
9872   cf_cv_mbstate_t=yes
9873 else
9874   echo "$as_me: failed program was:" >&5
9875 cat conftest.$ac_ext >&5
9876 cf_cv_mbstate_t=unknown
9877 fi
9878 rm -f conftest.$ac_objext conftest.$ac_ext
9879 fi
9880 rm -f conftest.$ac_objext conftest.$ac_ext
9881 fi
9882 echo "$as_me:9882: result: $cf_cv_mbstate_t" >&5
9883 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9884
9885 if test "$cf_cv_mbstate_t" = yes ; then
9886
9887 cat >>confdefs.h <<\EOF
9888 #define NEED_WCHAR_H 1
9889 EOF
9890
9891         NEED_WCHAR_H=1
9892 fi
9893
9894 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9895 if test "$cf_cv_mbstate_t" = unknown ; then
9896         NCURSES_MBSTATE_T=1
9897 fi
9898
9899 # This is needed on Tru64 5.0 to declare wchar_t
9900 echo "$as_me:9900: checking if we must include wchar.h to declare wchar_t" >&5
9901 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9902 if test "${cf_cv_wchar_t+set}" = set; then
9903   echo $ECHO_N "(cached) $ECHO_C" >&6
9904 else
9905
9906 cat >conftest.$ac_ext <<_ACEOF
9907 #line 9907 "configure"
9908 #include "confdefs.h"
9909
9910 #include <stdlib.h>
9911 #include <stdarg.h>
9912 #include <stdio.h>
9913 #ifdef HAVE_LIBUTF8_H
9914 #include <libutf8.h>
9915 #endif
9916 int
9917 main ()
9918 {
9919 wchar_t state
9920   ;
9921   return 0;
9922 }
9923 _ACEOF
9924 rm -f conftest.$ac_objext
9925 if { (eval echo "$as_me:9925: \"$ac_compile\"") >&5
9926   (eval $ac_compile) 2>&5
9927   ac_status=$?
9928   echo "$as_me:9928: \$? = $ac_status" >&5
9929   (exit $ac_status); } &&
9930          { ac_try='test -s conftest.$ac_objext'
9931   { (eval echo "$as_me:9931: \"$ac_try\"") >&5
9932   (eval $ac_try) 2>&5
9933   ac_status=$?
9934   echo "$as_me:9934: \$? = $ac_status" >&5
9935   (exit $ac_status); }; }; then
9936   cf_cv_wchar_t=no
9937 else
9938   echo "$as_me: failed program was:" >&5
9939 cat conftest.$ac_ext >&5
9940 cat >conftest.$ac_ext <<_ACEOF
9941 #line 9941 "configure"
9942 #include "confdefs.h"
9943
9944 #include <stdlib.h>
9945 #include <stdarg.h>
9946 #include <stdio.h>
9947 #include <wchar.h>
9948 #ifdef HAVE_LIBUTF8_H
9949 #include <libutf8.h>
9950 #endif
9951 int
9952 main ()
9953 {
9954 wchar_t value
9955   ;
9956   return 0;
9957 }
9958 _ACEOF
9959 rm -f conftest.$ac_objext
9960 if { (eval echo "$as_me:9960: \"$ac_compile\"") >&5
9961   (eval $ac_compile) 2>&5
9962   ac_status=$?
9963   echo "$as_me:9963: \$? = $ac_status" >&5
9964   (exit $ac_status); } &&
9965          { ac_try='test -s conftest.$ac_objext'
9966   { (eval echo "$as_me:9966: \"$ac_try\"") >&5
9967   (eval $ac_try) 2>&5
9968   ac_status=$?
9969   echo "$as_me:9969: \$? = $ac_status" >&5
9970   (exit $ac_status); }; }; then
9971   cf_cv_wchar_t=yes
9972 else
9973   echo "$as_me: failed program was:" >&5
9974 cat conftest.$ac_ext >&5
9975 cf_cv_wchar_t=unknown
9976 fi
9977 rm -f conftest.$ac_objext conftest.$ac_ext
9978 fi
9979 rm -f conftest.$ac_objext conftest.$ac_ext
9980 fi
9981 echo "$as_me:9981: result: $cf_cv_wchar_t" >&5
9982 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9983
9984 if test "$cf_cv_wchar_t" = yes ; then
9985
9986 cat >>confdefs.h <<\EOF
9987 #define NEED_WCHAR_H 1
9988 EOF
9989
9990         NEED_WCHAR_H=1
9991 fi
9992
9993 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9994 if test "$cf_cv_wchar_t" = unknown ; then
9995         NCURSES_WCHAR_T=1
9996 fi
9997
9998 # if we find wchar_t in either place, use substitution to provide a fallback.
9999 if test "$cf_cv_wchar_t" != unknown ; then
10000         NCURSES_OK_WCHAR_T=1
10001 fi
10002
10003 # This is needed on Tru64 5.0 to declare wint_t
10004 echo "$as_me:10004: checking if we must include wchar.h to declare wint_t" >&5
10005 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10006 if test "${cf_cv_wint_t+set}" = set; then
10007   echo $ECHO_N "(cached) $ECHO_C" >&6
10008 else
10009
10010 cat >conftest.$ac_ext <<_ACEOF
10011 #line 10011 "configure"
10012 #include "confdefs.h"
10013
10014 #include <stdlib.h>
10015 #include <stdarg.h>
10016 #include <stdio.h>
10017 #ifdef HAVE_LIBUTF8_H
10018 #include <libutf8.h>
10019 #endif
10020 int
10021 main ()
10022 {
10023 wint_t state
10024   ;
10025   return 0;
10026 }
10027 _ACEOF
10028 rm -f conftest.$ac_objext
10029 if { (eval echo "$as_me:10029: \"$ac_compile\"") >&5
10030   (eval $ac_compile) 2>&5
10031   ac_status=$?
10032   echo "$as_me:10032: \$? = $ac_status" >&5
10033   (exit $ac_status); } &&
10034          { ac_try='test -s conftest.$ac_objext'
10035   { (eval echo "$as_me:10035: \"$ac_try\"") >&5
10036   (eval $ac_try) 2>&5
10037   ac_status=$?
10038   echo "$as_me:10038: \$? = $ac_status" >&5
10039   (exit $ac_status); }; }; then
10040   cf_cv_wint_t=no
10041 else
10042   echo "$as_me: failed program was:" >&5
10043 cat conftest.$ac_ext >&5
10044 cat >conftest.$ac_ext <<_ACEOF
10045 #line 10045 "configure"
10046 #include "confdefs.h"
10047
10048 #include <stdlib.h>
10049 #include <stdarg.h>
10050 #include <stdio.h>
10051 #include <wchar.h>
10052 #ifdef HAVE_LIBUTF8_H
10053 #include <libutf8.h>
10054 #endif
10055 int
10056 main ()
10057 {
10058 wint_t value
10059   ;
10060   return 0;
10061 }
10062 _ACEOF
10063 rm -f conftest.$ac_objext
10064 if { (eval echo "$as_me:10064: \"$ac_compile\"") >&5
10065   (eval $ac_compile) 2>&5
10066   ac_status=$?
10067   echo "$as_me:10067: \$? = $ac_status" >&5
10068   (exit $ac_status); } &&
10069          { ac_try='test -s conftest.$ac_objext'
10070   { (eval echo "$as_me:10070: \"$ac_try\"") >&5
10071   (eval $ac_try) 2>&5
10072   ac_status=$?
10073   echo "$as_me:10073: \$? = $ac_status" >&5
10074   (exit $ac_status); }; }; then
10075   cf_cv_wint_t=yes
10076 else
10077   echo "$as_me: failed program was:" >&5
10078 cat conftest.$ac_ext >&5
10079 cf_cv_wint_t=unknown
10080 fi
10081 rm -f conftest.$ac_objext conftest.$ac_ext
10082 fi
10083 rm -f conftest.$ac_objext conftest.$ac_ext
10084 fi
10085 echo "$as_me:10085: result: $cf_cv_wint_t" >&5
10086 echo "${ECHO_T}$cf_cv_wint_t" >&6
10087
10088 if test "$cf_cv_wint_t" = yes ; then
10089
10090 cat >>confdefs.h <<\EOF
10091 #define NEED_WCHAR_H 1
10092 EOF
10093
10094         NEED_WCHAR_H=1
10095 fi
10096
10097 # if we do not find wint_t in either place, use substitution to provide a fallback.
10098 if test "$cf_cv_wint_t" = unknown ; then
10099         NCURSES_WINT_T=1
10100 fi
10101
10102 # if we find wint_t in either place, use substitution to provide a fallback.
10103 if test "$cf_cv_wint_t" != unknown ; then
10104         NCURSES_OK_WINT_T=1
10105 fi
10106
10107         if test "$NCURSES_MBSTATE_T" != 0; then
10108
10109 cat >>confdefs.h <<\EOF
10110 #define NEED_MBSTATE_T_DEF 1
10111 EOF
10112
10113         fi
10114 fi
10115
10116 ###   use option --disable-lp64 to allow long chtype
10117 case $cf_cv_abi_version in
10118 [345]*)
10119         default_with_lp64=no
10120         ;;
10121 *)
10122         default_with_lp64=yes
10123         ;;
10124 esac
10125
10126 echo "$as_me:10126: checking whether to enable _LP64 definition in curses.h" >&5
10127 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10128
10129 # Check whether --enable-lp64 or --disable-lp64 was given.
10130 if test "${enable_lp64+set}" = set; then
10131   enableval="$enable_lp64"
10132   with_lp64=$enableval
10133 else
10134   with_lp64=$default_with_lp64
10135 fi;
10136 echo "$as_me:10136: result: $with_lp64" >&5
10137 echo "${ECHO_T}$with_lp64" >&6
10138
10139 if test "x$with_lp64" = xyes ; then
10140         cf_cv_enable_lp64=1
10141 else
10142         cf_cv_enable_lp64=0
10143 fi
10144
10145 # Check whether --enable-largefile or --disable-largefile was given.
10146 if test "${enable_largefile+set}" = set; then
10147   enableval="$enable_largefile"
10148
10149 fi;
10150 if test "$enable_largefile" != no; then
10151
10152   echo "$as_me:10152: checking for special C compiler options needed for large files" >&5
10153 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10154 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10155   echo $ECHO_N "(cached) $ECHO_C" >&6
10156 else
10157   ac_cv_sys_largefile_CC=no
10158      if test "$GCC" != yes; then
10159        ac_save_CC=$CC
10160        while :; do
10161          # IRIX 6.2 and later do not support large files by default,
10162          # so use the C compiler's -n32 option if that helps.
10163          cat >conftest.$ac_ext <<_ACEOF
10164 #line 10164 "configure"
10165 #include "confdefs.h"
10166 #include <sys/types.h>
10167  /* Check that off_t can represent 2**63 - 1 correctly.
10168     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10169     since some C++ compilers masquerading as C compilers
10170     incorrectly reject 9223372036854775807.  */
10171 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10172   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10173                        && LARGE_OFF_T % 2147483647 == 1)
10174                       ? 1 : -1];
10175 int
10176 main ()
10177 {
10178
10179   ;
10180   return 0;
10181 }
10182 _ACEOF
10183          rm -f conftest.$ac_objext
10184 if { (eval echo "$as_me:10184: \"$ac_compile\"") >&5
10185   (eval $ac_compile) 2>&5
10186   ac_status=$?
10187   echo "$as_me:10187: \$? = $ac_status" >&5
10188   (exit $ac_status); } &&
10189          { ac_try='test -s conftest.$ac_objext'
10190   { (eval echo "$as_me:10190: \"$ac_try\"") >&5
10191   (eval $ac_try) 2>&5
10192   ac_status=$?
10193   echo "$as_me:10193: \$? = $ac_status" >&5
10194   (exit $ac_status); }; }; then
10195   break
10196 else
10197   echo "$as_me: failed program was:" >&5
10198 cat conftest.$ac_ext >&5
10199 fi
10200 rm -f conftest.$ac_objext
10201          CC="$CC -n32"
10202          rm -f conftest.$ac_objext
10203 if { (eval echo "$as_me:10203: \"$ac_compile\"") >&5
10204   (eval $ac_compile) 2>&5
10205   ac_status=$?
10206   echo "$as_me:10206: \$? = $ac_status" >&5
10207   (exit $ac_status); } &&
10208          { ac_try='test -s conftest.$ac_objext'
10209   { (eval echo "$as_me:10209: \"$ac_try\"") >&5
10210   (eval $ac_try) 2>&5
10211   ac_status=$?
10212   echo "$as_me:10212: \$? = $ac_status" >&5
10213   (exit $ac_status); }; }; then
10214   ac_cv_sys_largefile_CC=' -n32'; break
10215 else
10216   echo "$as_me: failed program was:" >&5
10217 cat conftest.$ac_ext >&5
10218 fi
10219 rm -f conftest.$ac_objext
10220          break
10221        done
10222        CC=$ac_save_CC
10223        rm -f conftest.$ac_ext
10224     fi
10225 fi
10226 echo "$as_me:10226: result: $ac_cv_sys_largefile_CC" >&5
10227 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10228   if test "$ac_cv_sys_largefile_CC" != no; then
10229     CC=$CC$ac_cv_sys_largefile_CC
10230   fi
10231
10232   echo "$as_me:10232: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10233 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10234 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10235   echo $ECHO_N "(cached) $ECHO_C" >&6
10236 else
10237   while :; do
10238   ac_cv_sys_file_offset_bits=no
10239   cat >conftest.$ac_ext <<_ACEOF
10240 #line 10240 "configure"
10241 #include "confdefs.h"
10242 #include <sys/types.h>
10243  /* Check that off_t can represent 2**63 - 1 correctly.
10244     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10245     since some C++ compilers masquerading as C compilers
10246     incorrectly reject 9223372036854775807.  */
10247 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10248   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10249                        && LARGE_OFF_T % 2147483647 == 1)
10250                       ? 1 : -1];
10251 int
10252 main ()
10253 {
10254
10255   ;
10256   return 0;
10257 }
10258 _ACEOF
10259 rm -f conftest.$ac_objext
10260 if { (eval echo "$as_me:10260: \"$ac_compile\"") >&5
10261   (eval $ac_compile) 2>&5
10262   ac_status=$?
10263   echo "$as_me:10263: \$? = $ac_status" >&5
10264   (exit $ac_status); } &&
10265          { ac_try='test -s conftest.$ac_objext'
10266   { (eval echo "$as_me:10266: \"$ac_try\"") >&5
10267   (eval $ac_try) 2>&5
10268   ac_status=$?
10269   echo "$as_me:10269: \$? = $ac_status" >&5
10270   (exit $ac_status); }; }; then
10271   break
10272 else
10273   echo "$as_me: failed program was:" >&5
10274 cat conftest.$ac_ext >&5
10275 fi
10276 rm -f conftest.$ac_objext conftest.$ac_ext
10277   cat >conftest.$ac_ext <<_ACEOF
10278 #line 10278 "configure"
10279 #include "confdefs.h"
10280 #define _FILE_OFFSET_BITS 64
10281 #include <sys/types.h>
10282  /* Check that off_t can represent 2**63 - 1 correctly.
10283     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10284     since some C++ compilers masquerading as C compilers
10285     incorrectly reject 9223372036854775807.  */
10286 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10287   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10288                        && LARGE_OFF_T % 2147483647 == 1)
10289                       ? 1 : -1];
10290 int
10291 main ()
10292 {
10293
10294   ;
10295   return 0;
10296 }
10297 _ACEOF
10298 rm -f conftest.$ac_objext
10299 if { (eval echo "$as_me:10299: \"$ac_compile\"") >&5
10300   (eval $ac_compile) 2>&5
10301   ac_status=$?
10302   echo "$as_me:10302: \$? = $ac_status" >&5
10303   (exit $ac_status); } &&
10304          { ac_try='test -s conftest.$ac_objext'
10305   { (eval echo "$as_me:10305: \"$ac_try\"") >&5
10306   (eval $ac_try) 2>&5
10307   ac_status=$?
10308   echo "$as_me:10308: \$? = $ac_status" >&5
10309   (exit $ac_status); }; }; then
10310   ac_cv_sys_file_offset_bits=64; break
10311 else
10312   echo "$as_me: failed program was:" >&5
10313 cat conftest.$ac_ext >&5
10314 fi
10315 rm -f conftest.$ac_objext conftest.$ac_ext
10316   break
10317 done
10318 fi
10319 echo "$as_me:10319: result: $ac_cv_sys_file_offset_bits" >&5
10320 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10321 if test "$ac_cv_sys_file_offset_bits" != no; then
10322
10323 cat >>confdefs.h <<EOF
10324 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10325 EOF
10326
10327 fi
10328 rm -rf conftest*
10329   echo "$as_me:10329: checking for _LARGE_FILES value needed for large files" >&5
10330 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10331 if test "${ac_cv_sys_large_files+set}" = set; then
10332   echo $ECHO_N "(cached) $ECHO_C" >&6
10333 else
10334   while :; do
10335   ac_cv_sys_large_files=no
10336   cat >conftest.$ac_ext <<_ACEOF
10337 #line 10337 "configure"
10338 #include "confdefs.h"
10339 #include <sys/types.h>
10340  /* Check that off_t can represent 2**63 - 1 correctly.
10341     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10342     since some C++ compilers masquerading as C compilers
10343     incorrectly reject 9223372036854775807.  */
10344 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10345   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10346                        && LARGE_OFF_T % 2147483647 == 1)
10347                       ? 1 : -1];
10348 int
10349 main ()
10350 {
10351
10352   ;
10353   return 0;
10354 }
10355 _ACEOF
10356 rm -f conftest.$ac_objext
10357 if { (eval echo "$as_me:10357: \"$ac_compile\"") >&5
10358   (eval $ac_compile) 2>&5
10359   ac_status=$?
10360   echo "$as_me:10360: \$? = $ac_status" >&5
10361   (exit $ac_status); } &&
10362          { ac_try='test -s conftest.$ac_objext'
10363   { (eval echo "$as_me:10363: \"$ac_try\"") >&5
10364   (eval $ac_try) 2>&5
10365   ac_status=$?
10366   echo "$as_me:10366: \$? = $ac_status" >&5
10367   (exit $ac_status); }; }; then
10368   break
10369 else
10370   echo "$as_me: failed program was:" >&5
10371 cat conftest.$ac_ext >&5
10372 fi
10373 rm -f conftest.$ac_objext conftest.$ac_ext
10374   cat >conftest.$ac_ext <<_ACEOF
10375 #line 10375 "configure"
10376 #include "confdefs.h"
10377 #define _LARGE_FILES 1
10378 #include <sys/types.h>
10379  /* Check that off_t can represent 2**63 - 1 correctly.
10380     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10381     since some C++ compilers masquerading as C compilers
10382     incorrectly reject 9223372036854775807.  */
10383 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10384   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10385                        && LARGE_OFF_T % 2147483647 == 1)
10386                       ? 1 : -1];
10387 int
10388 main ()
10389 {
10390
10391   ;
10392   return 0;
10393 }
10394 _ACEOF
10395 rm -f conftest.$ac_objext
10396 if { (eval echo "$as_me:10396: \"$ac_compile\"") >&5
10397   (eval $ac_compile) 2>&5
10398   ac_status=$?
10399   echo "$as_me:10399: \$? = $ac_status" >&5
10400   (exit $ac_status); } &&
10401          { ac_try='test -s conftest.$ac_objext'
10402   { (eval echo "$as_me:10402: \"$ac_try\"") >&5
10403   (eval $ac_try) 2>&5
10404   ac_status=$?
10405   echo "$as_me:10405: \$? = $ac_status" >&5
10406   (exit $ac_status); }; }; then
10407   ac_cv_sys_large_files=1; break
10408 else
10409   echo "$as_me: failed program was:" >&5
10410 cat conftest.$ac_ext >&5
10411 fi
10412 rm -f conftest.$ac_objext conftest.$ac_ext
10413   break
10414 done
10415 fi
10416 echo "$as_me:10416: result: $ac_cv_sys_large_files" >&5
10417 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10418 if test "$ac_cv_sys_large_files" != no; then
10419
10420 cat >>confdefs.h <<EOF
10421 #define _LARGE_FILES $ac_cv_sys_large_files
10422 EOF
10423
10424 fi
10425 rm -rf conftest*
10426 fi
10427
10428     if test "$enable_largefile" != no ; then
10429         echo "$as_me:10429: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10430 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10431 if test "${ac_cv_sys_largefile_source+set}" = set; then
10432   echo $ECHO_N "(cached) $ECHO_C" >&6
10433 else
10434   while :; do
10435   ac_cv_sys_largefile_source=no
10436   cat >conftest.$ac_ext <<_ACEOF
10437 #line 10437 "configure"
10438 #include "confdefs.h"
10439 #include <stdio.h>
10440 int
10441 main ()
10442 {
10443 return !fseeko;
10444   ;
10445   return 0;
10446 }
10447 _ACEOF
10448 rm -f conftest.$ac_objext
10449 if { (eval echo "$as_me:10449: \"$ac_compile\"") >&5
10450   (eval $ac_compile) 2>&5
10451   ac_status=$?
10452   echo "$as_me:10452: \$? = $ac_status" >&5
10453   (exit $ac_status); } &&
10454          { ac_try='test -s conftest.$ac_objext'
10455   { (eval echo "$as_me:10455: \"$ac_try\"") >&5
10456   (eval $ac_try) 2>&5
10457   ac_status=$?
10458   echo "$as_me:10458: \$? = $ac_status" >&5
10459   (exit $ac_status); }; }; then
10460   break
10461 else
10462   echo "$as_me: failed program was:" >&5
10463 cat conftest.$ac_ext >&5
10464 fi
10465 rm -f conftest.$ac_objext conftest.$ac_ext
10466   cat >conftest.$ac_ext <<_ACEOF
10467 #line 10467 "configure"
10468 #include "confdefs.h"
10469 #define _LARGEFILE_SOURCE 1
10470 #include <stdio.h>
10471 int
10472 main ()
10473 {
10474 return !fseeko;
10475   ;
10476   return 0;
10477 }
10478 _ACEOF
10479 rm -f conftest.$ac_objext
10480 if { (eval echo "$as_me:10480: \"$ac_compile\"") >&5
10481   (eval $ac_compile) 2>&5
10482   ac_status=$?
10483   echo "$as_me:10483: \$? = $ac_status" >&5
10484   (exit $ac_status); } &&
10485          { ac_try='test -s conftest.$ac_objext'
10486   { (eval echo "$as_me:10486: \"$ac_try\"") >&5
10487   (eval $ac_try) 2>&5
10488   ac_status=$?
10489   echo "$as_me:10489: \$? = $ac_status" >&5
10490   (exit $ac_status); }; }; then
10491   ac_cv_sys_largefile_source=1; break
10492 else
10493   echo "$as_me: failed program was:" >&5
10494 cat conftest.$ac_ext >&5
10495 fi
10496 rm -f conftest.$ac_objext conftest.$ac_ext
10497   break
10498 done
10499 fi
10500 echo "$as_me:10500: result: $ac_cv_sys_largefile_source" >&5
10501 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10502 if test "$ac_cv_sys_largefile_source" != no; then
10503
10504 cat >>confdefs.h <<EOF
10505 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10506 EOF
10507
10508 fi
10509 rm -rf conftest*
10510
10511 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10512 # in glibc 2.1.3, but that breaks too many other things.
10513 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10514 echo "$as_me:10514: checking for fseeko" >&5
10515 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10516 if test "${ac_cv_func_fseeko+set}" = set; then
10517   echo $ECHO_N "(cached) $ECHO_C" >&6
10518 else
10519   cat >conftest.$ac_ext <<_ACEOF
10520 #line 10520 "configure"
10521 #include "confdefs.h"
10522 #include <stdio.h>
10523 int
10524 main ()
10525 {
10526 return fseeko && fseeko (stdin, 0, 0);
10527   ;
10528   return 0;
10529 }
10530 _ACEOF
10531 rm -f conftest.$ac_objext conftest$ac_exeext
10532 if { (eval echo "$as_me:10532: \"$ac_link\"") >&5
10533   (eval $ac_link) 2>&5
10534   ac_status=$?
10535   echo "$as_me:10535: \$? = $ac_status" >&5
10536   (exit $ac_status); } &&
10537          { ac_try='test -s conftest$ac_exeext'
10538   { (eval echo "$as_me:10538: \"$ac_try\"") >&5
10539   (eval $ac_try) 2>&5
10540   ac_status=$?
10541   echo "$as_me:10541: \$? = $ac_status" >&5
10542   (exit $ac_status); }; }; then
10543   ac_cv_func_fseeko=yes
10544 else
10545   echo "$as_me: failed program was:" >&5
10546 cat conftest.$ac_ext >&5
10547 ac_cv_func_fseeko=no
10548 fi
10549 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10550 fi
10551 echo "$as_me:10551: result: $ac_cv_func_fseeko" >&5
10552 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10553 if test $ac_cv_func_fseeko = yes; then
10554
10555 cat >>confdefs.h <<\EOF
10556 #define HAVE_FSEEKO 1
10557 EOF
10558
10559 fi
10560
10561         # Normally we would collect these definitions in the config.h,
10562         # but (like _XOPEN_SOURCE), some environments rely on having these
10563         # defined before any of the system headers are included.  Another
10564         # case comes up with C++, e.g., on AIX the compiler compiles the
10565         # header files by themselves before looking at the body files it is
10566         # told to compile.  For ncurses, those header files do not include
10567         # the config.h
10568         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10569         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10570         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10571
10572         echo "$as_me:10572: checking whether to use struct dirent64" >&5
10573 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10574 if test "${cf_cv_struct_dirent64+set}" = set; then
10575   echo $ECHO_N "(cached) $ECHO_C" >&6
10576 else
10577
10578                 cat >conftest.$ac_ext <<_ACEOF
10579 #line 10579 "configure"
10580 #include "confdefs.h"
10581
10582 #include <sys/types.h>
10583 #include <dirent.h>
10584
10585 int
10586 main ()
10587 {
10588
10589                 /* if transitional largefile support is setup, this is true */
10590                 extern struct dirent64 * readdir(DIR *);
10591                 struct dirent64 *x = readdir((DIR *)0);
10592                 struct dirent *y = readdir((DIR *)0);
10593                 int z = x - y;
10594
10595   ;
10596   return 0;
10597 }
10598 _ACEOF
10599 rm -f conftest.$ac_objext
10600 if { (eval echo "$as_me:10600: \"$ac_compile\"") >&5
10601   (eval $ac_compile) 2>&5
10602   ac_status=$?
10603   echo "$as_me:10603: \$? = $ac_status" >&5
10604   (exit $ac_status); } &&
10605          { ac_try='test -s conftest.$ac_objext'
10606   { (eval echo "$as_me:10606: \"$ac_try\"") >&5
10607   (eval $ac_try) 2>&5
10608   ac_status=$?
10609   echo "$as_me:10609: \$? = $ac_status" >&5
10610   (exit $ac_status); }; }; then
10611   cf_cv_struct_dirent64=yes
10612 else
10613   echo "$as_me: failed program was:" >&5
10614 cat conftest.$ac_ext >&5
10615 cf_cv_struct_dirent64=no
10616 fi
10617 rm -f conftest.$ac_objext conftest.$ac_ext
10618
10619 fi
10620 echo "$as_me:10620: result: $cf_cv_struct_dirent64" >&5
10621 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10622         test "$cf_cv_struct_dirent64" = yes &&
10623 cat >>confdefs.h <<\EOF
10624 #define HAVE_STRUCT_DIRENT64 1
10625 EOF
10626
10627     fi
10628
10629 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10630 echo "$as_me:10630: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10631 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10632
10633 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10634 if test "${enable_tparm_varargs+set}" = set; then
10635   enableval="$enable_tparm_varargs"
10636   with_tparm_varargs=$enableval
10637 else
10638   with_tparm_varargs=yes
10639 fi;
10640 echo "$as_me:10640: result: $with_tparm_varargs" >&5
10641 echo "${ECHO_T}$with_tparm_varargs" >&6
10642 NCURSES_TPARM_VARARGS=0
10643 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10644
10645 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10646 if test "$with_ticlib" != no ; then
10647 echo "$as_me:10647: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10648 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10649
10650 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10651 if test "${enable_tic_depends+set}" = set; then
10652   enableval="$enable_tic_depends"
10653   with_tic_depends=$enableval
10654 else
10655   with_tic_depends=yes
10656 fi;
10657 echo "$as_me:10657: result: $with_tic_depends" >&5
10658 echo "${ECHO_T}$with_tic_depends" >&6
10659 else
10660         with_tic_depends=no
10661 fi
10662
10663 ###   use option --with-bool to override bool's type
10664 echo "$as_me:10664: checking for type of bool" >&5
10665 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10666
10667 # Check whether --with-bool or --without-bool was given.
10668 if test "${with_bool+set}" = set; then
10669   withval="$with_bool"
10670   NCURSES_BOOL="$withval"
10671 else
10672   NCURSES_BOOL=auto
10673 fi;
10674 echo "$as_me:10674: result: $NCURSES_BOOL" >&5
10675 echo "${ECHO_T}$NCURSES_BOOL" >&6
10676
10677 echo "$as_me:10677: checking for alternate terminal capabilities file" >&5
10678 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10679
10680 # Check whether --with-caps or --without-caps was given.
10681 if test "${with_caps+set}" = set; then
10682   withval="$with_caps"
10683   TERMINFO_CAPS=Caps.$withval
10684 else
10685   TERMINFO_CAPS=Caps
10686 fi;
10687 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10688 echo "$as_me:10688: result: $TERMINFO_CAPS" >&5
10689 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10690
10691 ###   use option --with-chtype to override chtype's type
10692 echo "$as_me:10692: checking for type of chtype" >&5
10693 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10694
10695 # Check whether --with-chtype or --without-chtype was given.
10696 if test "${with_chtype+set}" = set; then
10697   withval="$with_chtype"
10698   NCURSES_CHTYPE="$withval"
10699 else
10700   NCURSES_CHTYPE=auto
10701 fi;
10702 echo "$as_me:10702: result: $NCURSES_CHTYPE" >&5
10703 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10704
10705 ###   use option --with-ospeed to override ospeed's type
10706 echo "$as_me:10706: checking for type of ospeed" >&5
10707 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10708
10709 # Check whether --with-ospeed or --without-ospeed was given.
10710 if test "${with_ospeed+set}" = set; then
10711   withval="$with_ospeed"
10712   NCURSES_OSPEED="$withval"
10713 else
10714   NCURSES_OSPEED=short
10715 fi;
10716 echo "$as_me:10716: result: $NCURSES_OSPEED" >&5
10717 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10718
10719 ###   use option --with-mmask-t to override mmask_t's type
10720 echo "$as_me:10720: checking for type of mmask_t" >&5
10721 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10722
10723 # Check whether --with-mmask-t or --without-mmask-t was given.
10724 if test "${with_mmask_t+set}" = set; then
10725   withval="$with_mmask_t"
10726   NCURSES_MMASK_T="$withval"
10727 else
10728   NCURSES_MMASK_T=auto
10729 fi;
10730 echo "$as_me:10730: result: $NCURSES_MMASK_T" >&5
10731 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10732
10733 ###   use option --with-ccharw-max to override CCHARW_MAX size
10734 echo "$as_me:10734: checking for size CCHARW_MAX" >&5
10735 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10736
10737 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10738 if test "${with_ccharw_max+set}" = set; then
10739   withval="$with_ccharw_max"
10740   NCURSES_CCHARW_MAX="$withval"
10741 else
10742   NCURSES_CCHARW_MAX=5
10743 fi;
10744 echo "$as_me:10744: result: $NCURSES_CCHARW_MAX" >&5
10745 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10746
10747 ###   use option --with-tparm-arg to override tparm's argument type
10748 echo "$as_me:10748: checking for type of tparm args" >&5
10749 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10750
10751 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10752 if test "${with_tparm_arg+set}" = set; then
10753   withval="$with_tparm_arg"
10754   NCURSES_TPARM_ARG="$withval"
10755 else
10756   NCURSES_TPARM_ARG=long
10757 fi;
10758 echo "$as_me:10758: result: $NCURSES_TPARM_ARG" >&5
10759 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10760
10761 ### Enable compiling-in rcs id's
10762 echo "$as_me:10762: checking if RCS identifiers should be compiled-in" >&5
10763 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10764
10765 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10766 if test "${with_rcs_ids+set}" = set; then
10767   withval="$with_rcs_ids"
10768   with_rcs_ids=$withval
10769 else
10770   with_rcs_ids=no
10771 fi;
10772 echo "$as_me:10772: result: $with_rcs_ids" >&5
10773 echo "${ECHO_T}$with_rcs_ids" >&6
10774 test "x$with_rcs_ids" = xyes &&
10775 cat >>confdefs.h <<\EOF
10776 #define USE_RCS_IDS 1
10777 EOF
10778
10779 ###############################################################################
10780
10781 echo "$as_me:10781: checking format of man-pages" >&5
10782 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10783
10784 # Check whether --with-manpage-format or --without-manpage-format was given.
10785 if test "${with_manpage_format+set}" = set; then
10786   withval="$with_manpage_format"
10787   MANPAGE_FORMAT=$withval
10788 else
10789   MANPAGE_FORMAT=unknown
10790 fi;
10791
10792 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10793 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10794
10795 cf_unknown=
10796
10797 case $MANPAGE_FORMAT in
10798 unknown)
10799   if test -z "$MANPATH" ; then
10800     MANPATH="/usr/man:/usr/share/man"
10801   fi
10802
10803   # look for the 'date' man-page (it's most likely to be installed!)
10804   MANPAGE_FORMAT=
10805   cf_preform=no
10806   cf_catonly=yes
10807   cf_example=date
10808
10809   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10810   for cf_dir in $MANPATH; do
10811     test -z "$cf_dir" && cf_dir=/usr/man
10812     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
10813     do
10814       cf_test=`echo $cf_name | sed -e 's/*//'`
10815       if test "x$cf_test" = "x$cf_name" ; then
10816
10817         case "$cf_name" in
10818         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10819         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10820         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10821         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10822         esac
10823
10824         case "$cf_name" in
10825         $cf_dir/man*)
10826           cf_catonly=no
10827           ;;
10828         $cf_dir/cat*)
10829           cf_preform=yes
10830           ;;
10831         esac
10832         break
10833       fi
10834
10835       # if we found a match in either man* or cat*, stop looking
10836       if test -n "$MANPAGE_FORMAT" ; then
10837         cf_found=no
10838         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10839         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10840         case "$cf_name" in
10841         $cf_dir/cat*)
10842           cf_found=yes
10843           ;;
10844         esac
10845         test $cf_found=yes && break
10846       fi
10847     done
10848     # only check the first directory in $MANPATH where we find manpages
10849     if test -n "$MANPAGE_FORMAT" ; then
10850        break
10851     fi
10852   done
10853   # if we did not find the example, just assume it is normal
10854   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10855   IFS="$ac_save_ifs"
10856   ;;
10857 *)
10858   for cf_option in $MANPAGE_FORMAT; do
10859      case $cf_option in #(vi
10860      gzip|compress|BSDI|normal|formatted|catonly)
10861        ;;
10862      *)
10863        cf_unknown="$cf_unknown $cf_option"
10864        ;;
10865      esac
10866   done
10867   ;;
10868 esac
10869
10870 echo "$as_me:10870: result: $MANPAGE_FORMAT" >&5
10871 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10872 if test -n "$cf_unknown" ; then
10873   { echo "$as_me:10873: WARNING: Unexpected manpage-format $cf_unknown" >&5
10874 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10875 fi
10876
10877 echo "$as_me:10877: checking for manpage renaming" >&5
10878 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10879
10880 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10881 if test "${with_manpage_renames+set}" = set; then
10882   withval="$with_manpage_renames"
10883   MANPAGE_RENAMES=$withval
10884 else
10885   MANPAGE_RENAMES=yes
10886 fi;
10887
10888 case ".$MANPAGE_RENAMES" in #(vi
10889 .no) #(vi
10890   ;;
10891 .|.yes)
10892   # Debian 'man' program?
10893   if test -f /etc/debian_version ; then
10894     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10895   else
10896     MANPAGE_RENAMES=no
10897   fi
10898   ;;
10899 esac
10900
10901 if test "$MANPAGE_RENAMES" != no ; then
10902   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10903     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10904   elif test ! -f $MANPAGE_RENAMES ; then
10905     { { echo "$as_me:10905: error: not a filename: $MANPAGE_RENAMES" >&5
10906 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10907    { (exit 1); exit 1; }; }
10908   fi
10909
10910   test ! -d man && mkdir man
10911
10912   # Construct a sed-script to perform renaming within man-pages
10913   if test -n "$MANPAGE_RENAMES" ; then
10914     test ! -d man && mkdir man
10915     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10916   fi
10917 fi
10918
10919 echo "$as_me:10919: result: $MANPAGE_RENAMES" >&5
10920 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10921
10922 echo "$as_me:10922: checking if manpage aliases will be installed" >&5
10923 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10924
10925 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10926 if test "${with_manpage_aliases+set}" = set; then
10927   withval="$with_manpage_aliases"
10928   MANPAGE_ALIASES=$withval
10929 else
10930   MANPAGE_ALIASES=yes
10931 fi;
10932
10933 echo "$as_me:10933: result: $MANPAGE_ALIASES" >&5
10934 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10935
10936 case "x$LN_S" in #(vi
10937 xln*) #(vi
10938         cf_use_symlinks=yes
10939         ;;
10940 *)
10941         cf_use_symlinks=no
10942         ;;
10943 esac
10944
10945 MANPAGE_SYMLINKS=no
10946 if test "$MANPAGE_ALIASES" = yes ; then
10947 echo "$as_me:10947: checking if manpage symlinks should be used" >&5
10948 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10949
10950 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10951 if test "${with_manpage_symlinks+set}" = set; then
10952   withval="$with_manpage_symlinks"
10953   MANPAGE_SYMLINKS=$withval
10954 else
10955   MANPAGE_SYMLINKS=$cf_use_symlinks
10956 fi;
10957
10958 if test "$$cf_use_symlinks" = no; then
10959 if test "$MANPAGE_SYMLINKS" = yes ; then
10960         { echo "$as_me:10960: WARNING: cannot make symlinks" >&5
10961 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10962         MANPAGE_SYMLINKS=no
10963 fi
10964 fi
10965
10966 echo "$as_me:10966: result: $MANPAGE_SYMLINKS" >&5
10967 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10968 fi
10969
10970 echo "$as_me:10970: checking for manpage tbl" >&5
10971 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10972
10973 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10974 if test "${with_manpage_tbl+set}" = set; then
10975   withval="$with_manpage_tbl"
10976   MANPAGE_TBL=$withval
10977 else
10978   MANPAGE_TBL=no
10979 fi;
10980
10981 echo "$as_me:10981: result: $MANPAGE_TBL" >&5
10982 echo "${ECHO_T}$MANPAGE_TBL" >&6
10983
10984   if test "$prefix" = "NONE" ; then
10985      cf_prefix="$ac_default_prefix"
10986   else
10987      cf_prefix="$prefix"
10988   fi
10989
10990   case "$MANPAGE_FORMAT" in # (vi
10991   *catonly*) # (vi
10992     cf_format=yes
10993     cf_inboth=no
10994     ;;
10995   *formatted*) # (vi
10996     cf_format=yes
10997     cf_inboth=yes
10998     ;;
10999   *)
11000     cf_format=no
11001     cf_inboth=no
11002     ;;
11003   esac
11004
11005 test ! -d man && mkdir man
11006
11007 cf_so_strip=
11008 cf_compress=
11009 case "$MANPAGE_FORMAT" in #(vi
11010 *compress*) #(vi
11011         cf_so_strip="Z"
11012         cf_compress=compress
11013   ;;
11014 *gzip*)
11015         cf_so_strip="gz"
11016         cf_compress=gzip
11017   ;;
11018 esac
11019
11020 cf_edit_man=./edit_man.sh
11021 cf_man_alias=`pwd`/man_alias.sed
11022
11023 cat >$cf_edit_man <<CF_EOF
11024 #! /bin/sh
11025 # this script is generated by the configure-script CF_MAN_PAGES macro.
11026
11027 prefix="$cf_prefix"
11028 datarootdir="$datarootdir"
11029 datadir="$datadir"
11030
11031 NCURSES_MAJOR="$NCURSES_MAJOR"
11032 NCURSES_MINOR="$NCURSES_MINOR"
11033 NCURSES_PATCH="$NCURSES_PATCH"
11034
11035 NCURSES_OSPEED="$NCURSES_OSPEED"
11036 TERMINFO="$TERMINFO"
11037
11038 INSTALL="$INSTALL"
11039 INSTALL_DATA="$INSTALL_DATA"
11040
11041 transform="$program_transform_name"
11042
11043 TMP=\${TMPDIR:=/tmp}/man\$\$
11044 trap "rm -f \$TMP" 0 1 2 5 15
11045
11046 form=\$1
11047 shift || exit 1
11048
11049 verb=\$1
11050 shift || exit 1
11051
11052 mandir=\$1
11053 shift || exit 1
11054
11055 srcdir=\$1
11056 top_srcdir=\$srcdir/..
11057 shift || exit 1
11058
11059 if test "\$form" = normal ; then
11060         if test "$cf_format" = yes ; then
11061         if test "$cf_inboth" = no ; then
11062                 sh \$0 format \$verb \$mandir \$srcdir \$*
11063                 exit $?
11064         fi
11065         fi
11066         cf_subdir=\$mandir/man
11067         cf_tables=$MANPAGE_TBL
11068 else
11069         cf_subdir=\$mandir/cat
11070         cf_tables=yes
11071 fi
11072
11073 # process the list of source-files
11074 for i in \$* ; do
11075 case \$i in #(vi
11076 *.orig|*.rej) ;; #(vi
11077 *.[0-9]*)
11078         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11079         if test \$verb = installing ; then
11080         if test ! -d \$cf_subdir\${section} ; then
11081                 mkdir -p \$cf_subdir\$section
11082         fi
11083         fi
11084
11085         # replace variables in man page
11086         if test ! -f $cf_man_alias ; then
11087 cat >>$cf_man_alias <<-CF_EOF2
11088                 s,@DATADIR@,\$datadir,g
11089                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11090                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11091                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11092                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11093                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11094                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11095 CF_EOF
11096
11097         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11098         do
11099                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11100                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11101 cat >>$cf_edit_man <<-CF_EOF
11102                 s,@$cf_NAME@,$cf_name,g
11103 CF_EOF
11104         done
11105
11106 cat >>$cf_edit_man <<CF_EOF
11107 CF_EOF2
11108                 echo "...made $cf_man_alias"
11109         fi
11110
11111         aliases=
11112         cf_source=\`basename \$i\`
11113         inalias=\$cf_source
11114         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11115         if test ! -f \$inalias ; then
11116                 echo .. skipped \$cf_source
11117                 continue
11118         fi
11119 CF_EOF
11120
11121 if test "$MANPAGE_ALIASES" != no ; then
11122 cat >>$cf_edit_man <<CF_EOF
11123         nCurses=ignore.3x
11124         test $with_curses_h = yes && nCurses=ncurses.3x
11125         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11126 CF_EOF
11127 fi
11128
11129 if test "$MANPAGE_RENAMES" = no ; then
11130 cat >>$cf_edit_man <<CF_EOF
11131         # perform program transformations for section 1 man pages
11132         if test \$section = 1 ; then
11133                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11134         else
11135                 cf_target=\$cf_subdir\${section}/\$cf_source
11136         fi
11137 CF_EOF
11138 else
11139 cat >>$cf_edit_man <<CF_EOF
11140         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11141         if test -z "\$cf_target" ; then
11142                 echo '? missing rename for '\$cf_source
11143                 cf_target="\$cf_source"
11144         fi
11145         cf_target="\$cf_subdir\${section}/\${cf_target}"
11146
11147 CF_EOF
11148 fi
11149
11150 cat >>$cf_edit_man <<CF_EOF
11151         sed     -f $cf_man_alias \\
11152 CF_EOF
11153
11154 if test -f $MANPAGE_RENAMES ; then
11155 cat >>$cf_edit_man <<CF_EOF
11156                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11157 CF_EOF
11158 else
11159 cat >>$cf_edit_man <<CF_EOF
11160                 < \$i >\$TMP
11161 CF_EOF
11162 fi
11163
11164 cat >>$cf_edit_man <<CF_EOF
11165 if test \$cf_tables = yes ; then
11166         tbl \$TMP >\$TMP.out
11167         mv \$TMP.out \$TMP
11168 fi
11169 CF_EOF
11170
11171 if test $with_overwrite != yes ; then
11172 cat >>$cf_edit_man <<CF_EOF
11173         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11174         mv \$TMP.out \$TMP
11175 CF_EOF
11176 fi
11177
11178 if test $with_curses_h != yes ; then
11179 cat >>$cf_edit_man <<CF_EOF
11180         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11181         mv \$TMP.out \$TMP
11182 CF_EOF
11183 fi
11184
11185 cat >>$cf_edit_man <<CF_EOF
11186         if test \$form = format ; then
11187                 nroff -man \$TMP >\$TMP.out
11188                 mv \$TMP.out \$TMP
11189         fi
11190 CF_EOF
11191
11192 if test -n "$cf_compress" ; then
11193 cat >>$cf_edit_man <<CF_EOF
11194         if test \$verb = installing ; then
11195         if ( $cf_compress -f \$TMP )
11196         then
11197                 mv \$TMP.$cf_so_strip \$TMP
11198         fi
11199         fi
11200         cf_target="\$cf_target.$cf_so_strip"
11201 CF_EOF
11202 fi
11203
11204 case "$MANPAGE_FORMAT" in #(vi
11205 *BSDI*)
11206 cat >>$cf_edit_man <<CF_EOF
11207         if test \$form = format ; then
11208                 # BSDI installs only .0 suffixes in the cat directories
11209                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11210         fi
11211 CF_EOF
11212   ;;
11213 esac
11214
11215 cat >>$cf_edit_man <<CF_EOF
11216         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11217         if test \$verb = installing ; then
11218                 echo \$verb \$cf_target
11219                 \$INSTALL_DATA \$TMP \$cf_target
11220                 test -d \$cf_subdir\${section} &&
11221                 test -n "\$aliases" && (
11222                         cd \$cf_subdir\${section} && (
11223                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11224                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11225                                 cf_target=\`basename \$cf_target\`
11226                                 for cf_alias in \$aliases
11227                                 do
11228                                         if test \$section = 1 ; then
11229                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11230                                         fi
11231
11232                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11233                                                 if test -f \$cf_alias\${suffix} ; then
11234                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11235                                                         then
11236                                                                 continue
11237                                                         fi
11238                                                 fi
11239                                                 echo .. \$verb alias \$cf_alias\${suffix}
11240 CF_EOF
11241 case "x$LN_S" in #(vi
11242 *-f) #(vi
11243 cat >>$cf_edit_man <<CF_EOF
11244                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11245 CF_EOF
11246         ;;
11247 *)
11248 cat >>$cf_edit_man <<CF_EOF
11249                                                 rm -f \$cf_alias\${suffix}
11250                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11251 CF_EOF
11252         ;;
11253 esac
11254 cat >>$cf_edit_man <<CF_EOF
11255                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11256                                                 echo ".so \$cf_source" >\$TMP
11257 CF_EOF
11258 if test -n "$cf_compress" ; then
11259 cat >>$cf_edit_man <<CF_EOF
11260                                                 if test -n "$cf_so_strip" ; then
11261                                                         $cf_compress -f \$TMP
11262                                                         mv \$TMP.$cf_so_strip \$TMP
11263                                                 fi
11264 CF_EOF
11265 fi
11266 cat >>$cf_edit_man <<CF_EOF
11267                                                 echo .. \$verb alias \$cf_alias\${suffix}
11268                                                 rm -f \$cf_alias\${suffix}
11269                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11270                                         fi
11271                                 done
11272                         )
11273                 )
11274         elif test \$verb = removing ; then
11275                 test -f \$cf_target && (
11276                         echo \$verb \$cf_target
11277                         rm -f \$cf_target
11278                 )
11279                 test -d \$cf_subdir\${section} &&
11280                 test -n "\$aliases" && (
11281                         cd \$cf_subdir\${section} && (
11282                                 for cf_alias in \$aliases
11283                                 do
11284                                         if test \$section = 1 ; then
11285                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11286                                         fi
11287
11288                                         echo .. \$verb alias \$cf_alias\${suffix}
11289                                         rm -f \$cf_alias\${suffix}
11290                                 done
11291                         )
11292                 )
11293         else
11294 #               echo ".hy 0"
11295                 cat \$TMP
11296         fi
11297         ;;
11298 esac
11299 done
11300
11301 if test $cf_inboth = yes ; then
11302 if test \$form != format ; then
11303         sh \$0 format \$verb \$mandir \$srcdir \$*
11304 fi
11305 fi
11306
11307 exit 0
11308 CF_EOF
11309 chmod 755 $cf_edit_man
11310
11311 ###############################################################################
11312
11313 ### Note that some functions (such as const) are normally disabled anyway.
11314 echo "$as_me:11314: checking if you want to build with function extensions" >&5
11315 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11316
11317 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11318 if test "${enable_ext_funcs+set}" = set; then
11319   enableval="$enable_ext_funcs"
11320   with_ext_funcs=$enableval
11321 else
11322   with_ext_funcs=yes
11323 fi;
11324 echo "$as_me:11324: result: $with_ext_funcs" >&5
11325 echo "${ECHO_T}$with_ext_funcs" >&6
11326 if test "x$with_ext_funcs" = xyes ; then
11327         NCURSES_EXT_FUNCS=1
11328
11329 cat >>confdefs.h <<\EOF
11330 #define HAVE_ASSUME_DEFAULT_COLORS 1
11331 EOF
11332
11333 cat >>confdefs.h <<\EOF
11334 #define HAVE_CURSES_VERSION 1
11335 EOF
11336
11337 cat >>confdefs.h <<\EOF
11338 #define HAVE_HAS_KEY 1
11339 EOF
11340
11341 cat >>confdefs.h <<\EOF
11342 #define HAVE_RESIZETERM 1
11343 EOF
11344
11345 cat >>confdefs.h <<\EOF
11346 #define HAVE_RESIZE_TERM 1
11347 EOF
11348
11349 cat >>confdefs.h <<\EOF
11350 #define HAVE_TERM_ENTRY_H 1
11351 EOF
11352
11353 cat >>confdefs.h <<\EOF
11354 #define HAVE_USE_DEFAULT_COLORS 1
11355 EOF
11356
11357 cat >>confdefs.h <<\EOF
11358 #define HAVE_USE_SCREEN 1
11359 EOF
11360
11361 cat >>confdefs.h <<\EOF
11362 #define HAVE_USE_WINDOW 1
11363 EOF
11364
11365 cat >>confdefs.h <<\EOF
11366 #define HAVE_WRESIZE 1
11367 EOF
11368
11369 cat >>confdefs.h <<\EOF
11370 #define NCURSES_EXT_FUNCS 1
11371 EOF
11372
11373         GENERATED_EXT_FUNCS=generated
11374 else
11375         NCURSES_EXT_FUNCS=0
11376         GENERATED_EXT_FUNCS=
11377 fi
11378
11379 echo "$as_me:11379: checking if you want to build with experimental SCREEN extensions" >&5
11380 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11381
11382 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11383 if test "${enable_sp_funcs+set}" = set; then
11384   enableval="$enable_sp_funcs"
11385   with_sp_funcs=$enableval
11386 else
11387   with_sp_funcs=no
11388 fi;
11389 echo "$as_me:11389: result: $with_sp_funcs" >&5
11390 echo "${ECHO_T}$with_sp_funcs" >&6
11391 if test "x$with_sp_funcs" = xyes ; then
11392         NCURSES_SP_FUNCS=1
11393
11394 cat >>confdefs.h <<\EOF
11395 #define NCURSES_SP_FUNCS 1
11396 EOF
11397
11398         GENERATED_SP_FUNCS=generated
11399 else
11400         NCURSES_SP_FUNCS=0
11401         GENERATED_SP_FUNCS=
11402 fi
11403
11404 echo "$as_me:11404: checking if you want to build with experimental terminal-driver" >&5
11405 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11406
11407 # Check whether --enable-term-driver or --disable-term-driver was given.
11408 if test "${enable_term_driver+set}" = set; then
11409   enableval="$enable_term_driver"
11410   with_term_driver=$enableval
11411 else
11412   with_term_driver=no
11413 fi;
11414 echo "$as_me:11414: result: $with_term_driver" >&5
11415 echo "${ECHO_T}$with_term_driver" >&6
11416 if test "x$with_term_driver" = xyes ; then
11417
11418 cat >>confdefs.h <<\EOF
11419 #define USE_TERM_DRIVER 1
11420 EOF
11421
11422         if test "x$with_sp_funcs" != xyes ; then
11423                 { { echo "$as_me:11423: error: The term-driver option relies upon sp-funcs" >&5
11424 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11425    { (exit 1); exit 1; }; }
11426         fi
11427 fi
11428
11429 ###   use option --enable-const to turn on use of const beyond that in XSI.
11430 echo "$as_me:11430: checking for extended use of const keyword" >&5
11431 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11432
11433 # Check whether --enable-const or --disable-const was given.
11434 if test "${enable_const+set}" = set; then
11435   enableval="$enable_const"
11436   with_ext_const=$enableval
11437 else
11438   with_ext_const=no
11439 fi;
11440 echo "$as_me:11440: result: $with_ext_const" >&5
11441 echo "${ECHO_T}$with_ext_const" >&6
11442 NCURSES_CONST='/*nothing*/'
11443 if test "x$with_ext_const" = xyes ; then
11444         NCURSES_CONST=const
11445 fi
11446
11447 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11448 echo "$as_me:11448: checking if you want to use extended colors" >&5
11449 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11450
11451 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11452 if test "${enable_ext_colors+set}" = set; then
11453   enableval="$enable_ext_colors"
11454   with_ext_colors=$enableval
11455 else
11456   with_ext_colors=no
11457 fi;
11458 echo "$as_me:11458: result: $with_ext_colors" >&5
11459 echo "${ECHO_T}$with_ext_colors" >&6
11460 NCURSES_EXT_COLORS=0
11461 if test "x$with_ext_colors" = xyes ; then
11462         if test "x$with_widec" != xyes ; then
11463                 { { echo "$as_me:11463: error: This option applies only to wide-character library" >&5
11464 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11465    { (exit 1); exit 1; }; }
11466         else
11467                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11468
11469 if test "${with_abi_version+set}" != set; then
11470         case $cf_cv_rel_version in
11471         5.*)
11472                 cf_cv_rel_version=6.0
11473                 cf_cv_abi_version=6
11474                 { echo "$as_me:11474: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11475 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11476                 ;;
11477         esac
11478 fi
11479
11480         fi
11481         NCURSES_EXT_COLORS=1
11482
11483 cat >>confdefs.h <<\EOF
11484 #define NCURSES_EXT_COLORS 1
11485 EOF
11486
11487 fi
11488
11489 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11490 echo "$as_me:11490: checking if you want to use extended mouse encoding" >&5
11491 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11492
11493 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11494 if test "${enable_ext_mouse+set}" = set; then
11495   enableval="$enable_ext_mouse"
11496   with_ext_mouse=$enableval
11497 else
11498   with_ext_mouse=no
11499 fi;
11500 echo "$as_me:11500: result: $with_ext_mouse" >&5
11501 echo "${ECHO_T}$with_ext_mouse" >&6
11502 NCURSES_MOUSE_VERSION=1
11503 if test "x$with_ext_mouse" = xyes ; then
11504         NCURSES_MOUSE_VERSION=2
11505
11506 if test "${with_abi_version+set}" != set; then
11507         case $cf_cv_rel_version in
11508         5.*)
11509                 cf_cv_rel_version=6.0
11510                 cf_cv_abi_version=6
11511                 { echo "$as_me:11511: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11512 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11513                 ;;
11514         esac
11515 fi
11516
11517 fi
11518
11519 echo "$as_me:11519: checking if you want \$NCURSES_NO_PADDING code" >&5
11520 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11521
11522 # Check whether --enable-no-padding or --disable-no-padding was given.
11523 if test "${enable_no_padding+set}" = set; then
11524   enableval="$enable_no_padding"
11525   with_no_padding=$enableval
11526 else
11527   with_no_padding=$with_ext_funcs
11528 fi;
11529 echo "$as_me:11529: result: $with_no_padding" >&5
11530 echo "${ECHO_T}$with_no_padding" >&6
11531 test "x$with_no_padding" = xyes &&
11532 cat >>confdefs.h <<\EOF
11533 #define NCURSES_NO_PADDING 1
11534 EOF
11535
11536 echo "$as_me:11536: checking for ANSI C header files" >&5
11537 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11538 if test "${ac_cv_header_stdc+set}" = set; then
11539   echo $ECHO_N "(cached) $ECHO_C" >&6
11540 else
11541   cat >conftest.$ac_ext <<_ACEOF
11542 #line 11542 "configure"
11543 #include "confdefs.h"
11544 #include <stdlib.h>
11545 #include <stdarg.h>
11546 #include <string.h>
11547 #include <float.h>
11548
11549 _ACEOF
11550 if { (eval echo "$as_me:11550: \"$ac_cpp conftest.$ac_ext\"") >&5
11551   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11552   ac_status=$?
11553   egrep -v '^ *\+' conftest.er1 >conftest.err
11554   rm -f conftest.er1
11555   cat conftest.err >&5
11556   echo "$as_me:11556: \$? = $ac_status" >&5
11557   (exit $ac_status); } >/dev/null; then
11558   if test -s conftest.err; then
11559     ac_cpp_err=$ac_c_preproc_warn_flag
11560   else
11561     ac_cpp_err=
11562   fi
11563 else
11564   ac_cpp_err=yes
11565 fi
11566 if test -z "$ac_cpp_err"; then
11567   ac_cv_header_stdc=yes
11568 else
11569   echo "$as_me: failed program was:" >&5
11570   cat conftest.$ac_ext >&5
11571   ac_cv_header_stdc=no
11572 fi
11573 rm -f conftest.err conftest.$ac_ext
11574
11575 if test $ac_cv_header_stdc = yes; then
11576   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11577   cat >conftest.$ac_ext <<_ACEOF
11578 #line 11578 "configure"
11579 #include "confdefs.h"
11580 #include <string.h>
11581
11582 _ACEOF
11583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11584   egrep "memchr" >/dev/null 2>&1; then
11585   :
11586 else
11587   ac_cv_header_stdc=no
11588 fi
11589 rm -rf conftest*
11590
11591 fi
11592
11593 if test $ac_cv_header_stdc = yes; then
11594   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11595   cat >conftest.$ac_ext <<_ACEOF
11596 #line 11596 "configure"
11597 #include "confdefs.h"
11598 #include <stdlib.h>
11599
11600 _ACEOF
11601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11602   egrep "free" >/dev/null 2>&1; then
11603   :
11604 else
11605   ac_cv_header_stdc=no
11606 fi
11607 rm -rf conftest*
11608
11609 fi
11610
11611 if test $ac_cv_header_stdc = yes; then
11612   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11613   if test "$cross_compiling" = yes; then
11614   :
11615 else
11616   cat >conftest.$ac_ext <<_ACEOF
11617 #line 11617 "configure"
11618 #include "confdefs.h"
11619 #include <ctype.h>
11620 #if ((' ' & 0x0FF) == 0x020)
11621 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11622 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11623 #else
11624 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11625                      || ('j' <= (c) && (c) <= 'r') \
11626                      || ('s' <= (c) && (c) <= 'z'))
11627 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11628 #endif
11629
11630 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11631 int
11632 main ()
11633 {
11634   int i;
11635   for (i = 0; i < 256; i++)
11636     if (XOR (islower (i), ISLOWER (i))
11637         || toupper (i) != TOUPPER (i))
11638       $ac_main_return(2);
11639   $ac_main_return (0);
11640 }
11641 _ACEOF
11642 rm -f conftest$ac_exeext
11643 if { (eval echo "$as_me:11643: \"$ac_link\"") >&5
11644   (eval $ac_link) 2>&5
11645   ac_status=$?
11646   echo "$as_me:11646: \$? = $ac_status" >&5
11647   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11648   { (eval echo "$as_me:11648: \"$ac_try\"") >&5
11649   (eval $ac_try) 2>&5
11650   ac_status=$?
11651   echo "$as_me:11651: \$? = $ac_status" >&5
11652   (exit $ac_status); }; }; then
11653   :
11654 else
11655   echo "$as_me: program exited with status $ac_status" >&5
11656 echo "$as_me: failed program was:" >&5
11657 cat conftest.$ac_ext >&5
11658 ac_cv_header_stdc=no
11659 fi
11660 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11661 fi
11662 fi
11663 fi
11664 echo "$as_me:11664: result: $ac_cv_header_stdc" >&5
11665 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11666 if test $ac_cv_header_stdc = yes; then
11667
11668 cat >>confdefs.h <<\EOF
11669 #define STDC_HEADERS 1
11670 EOF
11671
11672 fi
11673
11674 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11675
11676 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11677                   inttypes.h stdint.h unistd.h
11678 do
11679 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11680 echo "$as_me:11680: checking for $ac_header" >&5
11681 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11682 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11683   echo $ECHO_N "(cached) $ECHO_C" >&6
11684 else
11685   cat >conftest.$ac_ext <<_ACEOF
11686 #line 11686 "configure"
11687 #include "confdefs.h"
11688 $ac_includes_default
11689 #include <$ac_header>
11690 _ACEOF
11691 rm -f conftest.$ac_objext
11692 if { (eval echo "$as_me:11692: \"$ac_compile\"") >&5
11693   (eval $ac_compile) 2>&5
11694   ac_status=$?
11695   echo "$as_me:11695: \$? = $ac_status" >&5
11696   (exit $ac_status); } &&
11697          { ac_try='test -s conftest.$ac_objext'
11698   { (eval echo "$as_me:11698: \"$ac_try\"") >&5
11699   (eval $ac_try) 2>&5
11700   ac_status=$?
11701   echo "$as_me:11701: \$? = $ac_status" >&5
11702   (exit $ac_status); }; }; then
11703   eval "$as_ac_Header=yes"
11704 else
11705   echo "$as_me: failed program was:" >&5
11706 cat conftest.$ac_ext >&5
11707 eval "$as_ac_Header=no"
11708 fi
11709 rm -f conftest.$ac_objext conftest.$ac_ext
11710 fi
11711 echo "$as_me:11711: result: `eval echo '${'$as_ac_Header'}'`" >&5
11712 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11713 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11714   cat >>confdefs.h <<EOF
11715 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11716 EOF
11717
11718 fi
11719 done
11720
11721 echo "$as_me:11721: checking for signed char" >&5
11722 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11723 if test "${ac_cv_type_signed_char+set}" = set; then
11724   echo $ECHO_N "(cached) $ECHO_C" >&6
11725 else
11726   cat >conftest.$ac_ext <<_ACEOF
11727 #line 11727 "configure"
11728 #include "confdefs.h"
11729 $ac_includes_default
11730 int
11731 main ()
11732 {
11733 if ((signed char *) 0)
11734   return 0;
11735 if (sizeof (signed char))
11736   return 0;
11737   ;
11738   return 0;
11739 }
11740 _ACEOF
11741 rm -f conftest.$ac_objext
11742 if { (eval echo "$as_me:11742: \"$ac_compile\"") >&5
11743   (eval $ac_compile) 2>&5
11744   ac_status=$?
11745   echo "$as_me:11745: \$? = $ac_status" >&5
11746   (exit $ac_status); } &&
11747          { ac_try='test -s conftest.$ac_objext'
11748   { (eval echo "$as_me:11748: \"$ac_try\"") >&5
11749   (eval $ac_try) 2>&5
11750   ac_status=$?
11751   echo "$as_me:11751: \$? = $ac_status" >&5
11752   (exit $ac_status); }; }; then
11753   ac_cv_type_signed_char=yes
11754 else
11755   echo "$as_me: failed program was:" >&5
11756 cat conftest.$ac_ext >&5
11757 ac_cv_type_signed_char=no
11758 fi
11759 rm -f conftest.$ac_objext conftest.$ac_ext
11760 fi
11761 echo "$as_me:11761: result: $ac_cv_type_signed_char" >&5
11762 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11763
11764 echo "$as_me:11764: checking size of signed char" >&5
11765 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11766 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11767   echo $ECHO_N "(cached) $ECHO_C" >&6
11768 else
11769   if test "$ac_cv_type_signed_char" = yes; then
11770   if test "$cross_compiling" = yes; then
11771   # Depending upon the size, compute the lo and hi bounds.
11772 cat >conftest.$ac_ext <<_ACEOF
11773 #line 11773 "configure"
11774 #include "confdefs.h"
11775 $ac_includes_default
11776 int
11777 main ()
11778 {
11779 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11780   ;
11781   return 0;
11782 }
11783 _ACEOF
11784 rm -f conftest.$ac_objext
11785 if { (eval echo "$as_me:11785: \"$ac_compile\"") >&5
11786   (eval $ac_compile) 2>&5
11787   ac_status=$?
11788   echo "$as_me:11788: \$? = $ac_status" >&5
11789   (exit $ac_status); } &&
11790          { ac_try='test -s conftest.$ac_objext'
11791   { (eval echo "$as_me:11791: \"$ac_try\"") >&5
11792   (eval $ac_try) 2>&5
11793   ac_status=$?
11794   echo "$as_me:11794: \$? = $ac_status" >&5
11795   (exit $ac_status); }; }; then
11796   ac_lo=0 ac_mid=0
11797   while :; do
11798     cat >conftest.$ac_ext <<_ACEOF
11799 #line 11799 "configure"
11800 #include "confdefs.h"
11801 $ac_includes_default
11802 int
11803 main ()
11804 {
11805 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11806   ;
11807   return 0;
11808 }
11809 _ACEOF
11810 rm -f conftest.$ac_objext
11811 if { (eval echo "$as_me:11811: \"$ac_compile\"") >&5
11812   (eval $ac_compile) 2>&5
11813   ac_status=$?
11814   echo "$as_me:11814: \$? = $ac_status" >&5
11815   (exit $ac_status); } &&
11816          { ac_try='test -s conftest.$ac_objext'
11817   { (eval echo "$as_me:11817: \"$ac_try\"") >&5
11818   (eval $ac_try) 2>&5
11819   ac_status=$?
11820   echo "$as_me:11820: \$? = $ac_status" >&5
11821   (exit $ac_status); }; }; then
11822   ac_hi=$ac_mid; break
11823 else
11824   echo "$as_me: failed program was:" >&5
11825 cat conftest.$ac_ext >&5
11826 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11827 fi
11828 rm -f conftest.$ac_objext conftest.$ac_ext
11829   done
11830 else
11831   echo "$as_me: failed program was:" >&5
11832 cat conftest.$ac_ext >&5
11833 ac_hi=-1 ac_mid=-1
11834   while :; do
11835     cat >conftest.$ac_ext <<_ACEOF
11836 #line 11836 "configure"
11837 #include "confdefs.h"
11838 $ac_includes_default
11839 int
11840 main ()
11841 {
11842 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11843   ;
11844   return 0;
11845 }
11846 _ACEOF
11847 rm -f conftest.$ac_objext
11848 if { (eval echo "$as_me:11848: \"$ac_compile\"") >&5
11849   (eval $ac_compile) 2>&5
11850   ac_status=$?
11851   echo "$as_me:11851: \$? = $ac_status" >&5
11852   (exit $ac_status); } &&
11853          { ac_try='test -s conftest.$ac_objext'
11854   { (eval echo "$as_me:11854: \"$ac_try\"") >&5
11855   (eval $ac_try) 2>&5
11856   ac_status=$?
11857   echo "$as_me:11857: \$? = $ac_status" >&5
11858   (exit $ac_status); }; }; then
11859   ac_lo=$ac_mid; break
11860 else
11861   echo "$as_me: failed program was:" >&5
11862 cat conftest.$ac_ext >&5
11863 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11864 fi
11865 rm -f conftest.$ac_objext conftest.$ac_ext
11866   done
11867 fi
11868 rm -f conftest.$ac_objext conftest.$ac_ext
11869 # Binary search between lo and hi bounds.
11870 while test "x$ac_lo" != "x$ac_hi"; do
11871   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11872   cat >conftest.$ac_ext <<_ACEOF
11873 #line 11873 "configure"
11874 #include "confdefs.h"
11875 $ac_includes_default
11876 int
11877 main ()
11878 {
11879 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11880   ;
11881   return 0;
11882 }
11883 _ACEOF
11884 rm -f conftest.$ac_objext
11885 if { (eval echo "$as_me:11885: \"$ac_compile\"") >&5
11886   (eval $ac_compile) 2>&5
11887   ac_status=$?
11888   echo "$as_me:11888: \$? = $ac_status" >&5
11889   (exit $ac_status); } &&
11890          { ac_try='test -s conftest.$ac_objext'
11891   { (eval echo "$as_me:11891: \"$ac_try\"") >&5
11892   (eval $ac_try) 2>&5
11893   ac_status=$?
11894   echo "$as_me:11894: \$? = $ac_status" >&5
11895   (exit $ac_status); }; }; then
11896   ac_hi=$ac_mid
11897 else
11898   echo "$as_me: failed program was:" >&5
11899 cat conftest.$ac_ext >&5
11900 ac_lo=`expr $ac_mid + 1`
11901 fi
11902 rm -f conftest.$ac_objext conftest.$ac_ext
11903 done
11904 ac_cv_sizeof_signed_char=$ac_lo
11905 else
11906   if test "$cross_compiling" = yes; then
11907   { { echo "$as_me:11907: error: cannot run test program while cross compiling" >&5
11908 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11909    { (exit 1); exit 1; }; }
11910 else
11911   cat >conftest.$ac_ext <<_ACEOF
11912 #line 11912 "configure"
11913 #include "confdefs.h"
11914 $ac_includes_default
11915 int
11916 main ()
11917 {
11918 FILE *f = fopen ("conftest.val", "w");
11919 if (!f)
11920   $ac_main_return (1);
11921 fprintf (f, "%d", (sizeof (signed char)));
11922 fclose (f);
11923   ;
11924   return 0;
11925 }
11926 _ACEOF
11927 rm -f conftest$ac_exeext
11928 if { (eval echo "$as_me:11928: \"$ac_link\"") >&5
11929   (eval $ac_link) 2>&5
11930   ac_status=$?
11931   echo "$as_me:11931: \$? = $ac_status" >&5
11932   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11933   { (eval echo "$as_me:11933: \"$ac_try\"") >&5
11934   (eval $ac_try) 2>&5
11935   ac_status=$?
11936   echo "$as_me:11936: \$? = $ac_status" >&5
11937   (exit $ac_status); }; }; then
11938   ac_cv_sizeof_signed_char=`cat conftest.val`
11939 else
11940   echo "$as_me: program exited with status $ac_status" >&5
11941 echo "$as_me: failed program was:" >&5
11942 cat conftest.$ac_ext >&5
11943 fi
11944 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11945 fi
11946 fi
11947 rm -f conftest.val
11948 else
11949   ac_cv_sizeof_signed_char=0
11950 fi
11951 fi
11952 echo "$as_me:11952: result: $ac_cv_sizeof_signed_char" >&5
11953 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11954 cat >>confdefs.h <<EOF
11955 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11956 EOF
11957
11958 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11959         NCURSES_SBOOL="signed char"
11960 else
11961         NCURSES_SBOOL="char"
11962 fi
11963 echo "$as_me:11963: checking if you want to use signed Boolean array in term.h" >&5
11964 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11965
11966 # Check whether --enable-signed-char or --disable-signed-char was given.
11967 if test "${enable_signed_char+set}" = set; then
11968   enableval="$enable_signed_char"
11969   with_signed_char=$enableval
11970 else
11971   with_signed_char=no
11972 fi;
11973 echo "$as_me:11973: result: $with_signed_char" >&5
11974 echo "${ECHO_T}$with_signed_char" >&6
11975 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11976
11977 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11978 echo "$as_me:11978: checking if you want SIGWINCH handler" >&5
11979 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11980
11981 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11982 if test "${enable_sigwinch+set}" = set; then
11983   enableval="$enable_sigwinch"
11984   with_sigwinch=$enableval
11985 else
11986   with_sigwinch=$with_ext_funcs
11987 fi;
11988 echo "$as_me:11988: result: $with_sigwinch" >&5
11989 echo "${ECHO_T}$with_sigwinch" >&6
11990 test "x$with_sigwinch" = xyes &&
11991 cat >>confdefs.h <<\EOF
11992 #define USE_SIGWINCH 1
11993 EOF
11994
11995 ###   use option --enable-tcap-names to allow user to define new capabilities
11996 echo "$as_me:11996: checking if you want user-definable terminal capabilities like termcap" >&5
11997 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11998
11999 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12000 if test "${enable_tcap_names+set}" = set; then
12001   enableval="$enable_tcap_names"
12002   with_tcap_names=$enableval
12003 else
12004   with_tcap_names=$with_ext_funcs
12005 fi;
12006 echo "$as_me:12006: result: $with_tcap_names" >&5
12007 echo "${ECHO_T}$with_tcap_names" >&6
12008 NCURSES_XNAMES=0
12009 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12010
12011 ###############################################################################
12012 # These options are relatively safe to experiment with.
12013
12014 echo "$as_me:12014: checking if you want all development code" >&5
12015 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12016
12017 # Check whether --with-develop or --without-develop was given.
12018 if test "${with_develop+set}" = set; then
12019   withval="$with_develop"
12020   with_develop=$withval
12021 else
12022   with_develop=no
12023 fi;
12024 echo "$as_me:12024: result: $with_develop" >&5
12025 echo "${ECHO_T}$with_develop" >&6
12026
12027 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12028 echo "$as_me:12028: checking if you want hard-tabs code" >&5
12029 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12030
12031 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12032 if test "${enable_hard_tabs+set}" = set; then
12033   enableval="$enable_hard_tabs"
12034
12035 else
12036   enable_hard_tabs=$with_develop
12037 fi;
12038 echo "$as_me:12038: result: $enable_hard_tabs" >&5
12039 echo "${ECHO_T}$enable_hard_tabs" >&6
12040 test "x$enable_hard_tabs" = xyes &&
12041 cat >>confdefs.h <<\EOF
12042 #define USE_HARD_TABS 1
12043 EOF
12044
12045 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12046 echo "$as_me:12046: checking if you want limited support for xmc" >&5
12047 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12048
12049 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12050 if test "${enable_xmc_glitch+set}" = set; then
12051   enableval="$enable_xmc_glitch"
12052
12053 else
12054   enable_xmc_glitch=$with_develop
12055 fi;
12056 echo "$as_me:12056: result: $enable_xmc_glitch" >&5
12057 echo "${ECHO_T}$enable_xmc_glitch" >&6
12058 test "x$enable_xmc_glitch" = xyes &&
12059 cat >>confdefs.h <<\EOF
12060 #define USE_XMC_SUPPORT 1
12061 EOF
12062
12063 ###############################################################################
12064 # These are just experimental, probably should not be in a package:
12065
12066 echo "$as_me:12066: checking if you do not want to assume colors are white-on-black" >&5
12067 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12068
12069 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12070 if test "${enable_assumed_color+set}" = set; then
12071   enableval="$enable_assumed_color"
12072   with_assumed_color=$enableval
12073 else
12074   with_assumed_color=yes
12075 fi;
12076 echo "$as_me:12076: result: $with_assumed_color" >&5
12077 echo "${ECHO_T}$with_assumed_color" >&6
12078 test "x$with_assumed_color" = xyes &&
12079 cat >>confdefs.h <<\EOF
12080 #define USE_ASSUMED_COLOR 1
12081 EOF
12082
12083 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12084 echo "$as_me:12084: checking if you want hashmap scrolling-optimization code" >&5
12085 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12086
12087 # Check whether --enable-hashmap or --disable-hashmap was given.
12088 if test "${enable_hashmap+set}" = set; then
12089   enableval="$enable_hashmap"
12090   with_hashmap=$enableval
12091 else
12092   with_hashmap=yes
12093 fi;
12094 echo "$as_me:12094: result: $with_hashmap" >&5
12095 echo "${ECHO_T}$with_hashmap" >&6
12096 test "x$with_hashmap" = xyes &&
12097 cat >>confdefs.h <<\EOF
12098 #define USE_HASHMAP 1
12099 EOF
12100
12101 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12102 echo "$as_me:12102: checking if you want colorfgbg code" >&5
12103 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12104
12105 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12106 if test "${enable_colorfgbg+set}" = set; then
12107   enableval="$enable_colorfgbg"
12108   with_colorfgbg=$enableval
12109 else
12110   with_colorfgbg=no
12111 fi;
12112 echo "$as_me:12112: result: $with_colorfgbg" >&5
12113 echo "${ECHO_T}$with_colorfgbg" >&6
12114 test "x$with_colorfgbg" = xyes &&
12115 cat >>confdefs.h <<\EOF
12116 #define USE_COLORFGBG 1
12117 EOF
12118
12119 ###   use option --enable-interop to turn on use of bindings used for interop
12120 echo "$as_me:12120: checking if you want interop bindings" >&5
12121 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12122
12123 # Check whether --enable-interop or --disable-interop was given.
12124 if test "${enable_interop+set}" = set; then
12125   enableval="$enable_interop"
12126   with_exp_interop=$enableval
12127 else
12128   with_exp_interop=no
12129 fi;
12130 echo "$as_me:12130: result: $with_exp_interop" >&5
12131 echo "${ECHO_T}$with_exp_interop" >&6
12132
12133 NCURSES_INTEROP_FUNCS=0
12134 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12135
12136 # This is still experimental (20080329), but should ultimately be moved to
12137 # the script-block --with-normal, etc.
12138
12139 echo "$as_me:12139: checking if you want to link with the pthread library" >&5
12140 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12141
12142 # Check whether --with-pthread or --without-pthread was given.
12143 if test "${with_pthread+set}" = set; then
12144   withval="$with_pthread"
12145   with_pthread=$withval
12146 else
12147   with_pthread=no
12148 fi;
12149 echo "$as_me:12149: result: $with_pthread" >&5
12150 echo "${ECHO_T}$with_pthread" >&6
12151
12152 if test "$with_pthread" != no ; then
12153     echo "$as_me:12153: checking for pthread.h" >&5
12154 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12155 if test "${ac_cv_header_pthread_h+set}" = set; then
12156   echo $ECHO_N "(cached) $ECHO_C" >&6
12157 else
12158   cat >conftest.$ac_ext <<_ACEOF
12159 #line 12159 "configure"
12160 #include "confdefs.h"
12161 #include <pthread.h>
12162 _ACEOF
12163 if { (eval echo "$as_me:12163: \"$ac_cpp conftest.$ac_ext\"") >&5
12164   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12165   ac_status=$?
12166   egrep -v '^ *\+' conftest.er1 >conftest.err
12167   rm -f conftest.er1
12168   cat conftest.err >&5
12169   echo "$as_me:12169: \$? = $ac_status" >&5
12170   (exit $ac_status); } >/dev/null; then
12171   if test -s conftest.err; then
12172     ac_cpp_err=$ac_c_preproc_warn_flag
12173   else
12174     ac_cpp_err=
12175   fi
12176 else
12177   ac_cpp_err=yes
12178 fi
12179 if test -z "$ac_cpp_err"; then
12180   ac_cv_header_pthread_h=yes
12181 else
12182   echo "$as_me: failed program was:" >&5
12183   cat conftest.$ac_ext >&5
12184   ac_cv_header_pthread_h=no
12185 fi
12186 rm -f conftest.err conftest.$ac_ext
12187 fi
12188 echo "$as_me:12188: result: $ac_cv_header_pthread_h" >&5
12189 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12190 if test $ac_cv_header_pthread_h = yes; then
12191
12192 cat >>confdefs.h <<\EOF
12193 #define HAVE_PTHREADS_H 1
12194 EOF
12195
12196         for cf_lib_pthread in pthread c_r
12197         do
12198             echo "$as_me:12198: checking if we can link with the $cf_lib_pthread library" >&5
12199 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12200             cf_save_LIBS="$LIBS"
12201
12202 cf_add_libs="-l$cf_lib_pthread"
12203 # Filter out duplicates - this happens with badly-designed ".pc" files...
12204 for cf_add_1lib in $LIBS
12205 do
12206         for cf_add_2lib in $cf_add_libs
12207         do
12208                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12209                 then
12210                         cf_add_1lib=
12211                         break
12212                 fi
12213         done
12214         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12215 done
12216 LIBS="$cf_add_libs"
12217
12218             cat >conftest.$ac_ext <<_ACEOF
12219 #line 12219 "configure"
12220 #include "confdefs.h"
12221
12222 #include <pthread.h>
12223
12224 int
12225 main ()
12226 {
12227
12228                 int rc = pthread_create(0,0,0,0);
12229                 int r2 = pthread_mutexattr_settype(0, 0);
12230
12231   ;
12232   return 0;
12233 }
12234 _ACEOF
12235 rm -f conftest.$ac_objext conftest$ac_exeext
12236 if { (eval echo "$as_me:12236: \"$ac_link\"") >&5
12237   (eval $ac_link) 2>&5
12238   ac_status=$?
12239   echo "$as_me:12239: \$? = $ac_status" >&5
12240   (exit $ac_status); } &&
12241          { ac_try='test -s conftest$ac_exeext'
12242   { (eval echo "$as_me:12242: \"$ac_try\"") >&5
12243   (eval $ac_try) 2>&5
12244   ac_status=$?
12245   echo "$as_me:12245: \$? = $ac_status" >&5
12246   (exit $ac_status); }; }; then
12247   with_pthread=yes
12248 else
12249   echo "$as_me: failed program was:" >&5
12250 cat conftest.$ac_ext >&5
12251 with_pthread=no
12252 fi
12253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12254             LIBS="$cf_save_LIBS"
12255             echo "$as_me:12255: result: $with_pthread" >&5
12256 echo "${ECHO_T}$with_pthread" >&6
12257             test "$with_pthread" = yes && break
12258         done
12259
12260         if test "$with_pthread" = yes ; then
12261
12262 cf_add_libs="-l$cf_lib_pthread"
12263 # Filter out duplicates - this happens with badly-designed ".pc" files...
12264 for cf_add_1lib in $LIBS
12265 do
12266         for cf_add_2lib in $cf_add_libs
12267         do
12268                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12269                 then
12270                         cf_add_1lib=
12271                         break
12272                 fi
12273         done
12274         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12275 done
12276 LIBS="$cf_add_libs"
12277
12278 cat >>confdefs.h <<\EOF
12279 #define HAVE_LIBPTHREADS 1
12280 EOF
12281
12282         else
12283             { { echo "$as_me:12283: error: Cannot link with pthread library" >&5
12284 echo "$as_me: error: Cannot link with pthread library" >&2;}
12285    { (exit 1); exit 1; }; }
12286         fi
12287
12288 fi
12289
12290 fi
12291
12292 if test "x$with_pthread" != xno; then
12293         echo "$as_me:12293: checking for pthread_kill" >&5
12294 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12295 if test "${ac_cv_func_pthread_kill+set}" = set; then
12296   echo $ECHO_N "(cached) $ECHO_C" >&6
12297 else
12298   cat >conftest.$ac_ext <<_ACEOF
12299 #line 12299 "configure"
12300 #include "confdefs.h"
12301 /* System header to define __stub macros and hopefully few prototypes,
12302     which can conflict with char pthread_kill (); below.  */
12303 #include <assert.h>
12304 /* Override any gcc2 internal prototype to avoid an error.  */
12305 #ifdef __cplusplus
12306 extern "C"
12307 #endif
12308 /* We use char because int might match the return type of a gcc2
12309    builtin and then its argument prototype would still apply.  */
12310 char pthread_kill ();
12311 char (*f) ();
12312
12313 int
12314 main ()
12315 {
12316 /* The GNU C library defines this for functions which it implements
12317     to always fail with ENOSYS.  Some functions are actually named
12318     something starting with __ and the normal name is an alias.  */
12319 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12320 choke me
12321 #else
12322 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12323 #endif
12324
12325   ;
12326   return 0;
12327 }
12328 _ACEOF
12329 rm -f conftest.$ac_objext conftest$ac_exeext
12330 if { (eval echo "$as_me:12330: \"$ac_link\"") >&5
12331   (eval $ac_link) 2>&5
12332   ac_status=$?
12333   echo "$as_me:12333: \$? = $ac_status" >&5
12334   (exit $ac_status); } &&
12335          { ac_try='test -s conftest$ac_exeext'
12336   { (eval echo "$as_me:12336: \"$ac_try\"") >&5
12337   (eval $ac_try) 2>&5
12338   ac_status=$?
12339   echo "$as_me:12339: \$? = $ac_status" >&5
12340   (exit $ac_status); }; }; then
12341   ac_cv_func_pthread_kill=yes
12342 else
12343   echo "$as_me: failed program was:" >&5
12344 cat conftest.$ac_ext >&5
12345 ac_cv_func_pthread_kill=no
12346 fi
12347 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12348 fi
12349 echo "$as_me:12349: result: $ac_cv_func_pthread_kill" >&5
12350 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12351 if test $ac_cv_func_pthread_kill = yes; then
12352
12353                 echo "$as_me:12353: checking if you want to allow EINTR in wgetch with pthreads" >&5
12354 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12355
12356 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12357 if test "${enable_pthreads_eintr+set}" = set; then
12358   enableval="$enable_pthreads_eintr"
12359   use_pthreads_eintr=$enableval
12360 else
12361   use_pthreads_eintr=no
12362 fi;
12363                 echo "$as_me:12363: result: $use_pthreads_eintr" >&5
12364 echo "${ECHO_T}$use_pthreads_eintr" >&6
12365                 if test "x$use_pthreads_eintr" = xyes ; then
12366
12367 cat >>confdefs.h <<\EOF
12368 #define USE_PTHREADS_EINTR 1
12369 EOF
12370
12371                 fi
12372 fi
12373
12374         echo "$as_me:12374: checking if you want to use weak-symbols for pthreads" >&5
12375 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12376
12377 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12378 if test "${enable_weak_symbols+set}" = set; then
12379   enableval="$enable_weak_symbols"
12380   use_weak_symbols=$enableval
12381 else
12382   use_weak_symbols=no
12383 fi;
12384         echo "$as_me:12384: result: $use_weak_symbols" >&5
12385 echo "${ECHO_T}$use_weak_symbols" >&6
12386         if test "x$use_weak_symbols" = xyes ; then
12387
12388 echo "$as_me:12388: checking if $CC supports weak symbols" >&5
12389 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12390 if test "${cf_cv_weak_symbols+set}" = set; then
12391   echo $ECHO_N "(cached) $ECHO_C" >&6
12392 else
12393
12394 cat >conftest.$ac_ext <<_ACEOF
12395 #line 12395 "configure"
12396 #include "confdefs.h"
12397
12398 #include <stdio.h>
12399 int
12400 main ()
12401 {
12402
12403 #if defined(__GNUC__)
12404 #  if defined __USE_ISOC99
12405 #    define _cat_pragma(exp)    _Pragma(#exp)
12406 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12407 #  else
12408 #    define _weak_pragma(exp)
12409 #  endif
12410 #  define _declare(name)        __extension__ extern __typeof__(name) name
12411 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12412 #endif
12413
12414 weak_symbol(fopen);
12415
12416   ;
12417   return 0;
12418 }
12419 _ACEOF
12420 rm -f conftest.$ac_objext
12421 if { (eval echo "$as_me:12421: \"$ac_compile\"") >&5
12422   (eval $ac_compile) 2>&5
12423   ac_status=$?
12424   echo "$as_me:12424: \$? = $ac_status" >&5
12425   (exit $ac_status); } &&
12426          { ac_try='test -s conftest.$ac_objext'
12427   { (eval echo "$as_me:12427: \"$ac_try\"") >&5
12428   (eval $ac_try) 2>&5
12429   ac_status=$?
12430   echo "$as_me:12430: \$? = $ac_status" >&5
12431   (exit $ac_status); }; }; then
12432   cf_cv_weak_symbols=yes
12433 else
12434   echo "$as_me: failed program was:" >&5
12435 cat conftest.$ac_ext >&5
12436 cf_cv_weak_symbols=no
12437 fi
12438 rm -f conftest.$ac_objext conftest.$ac_ext
12439
12440 fi
12441 echo "$as_me:12441: result: $cf_cv_weak_symbols" >&5
12442 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12443
12444         else
12445                 cf_cv_weak_symbols=no
12446         fi
12447
12448         if test "x$cf_cv_weak_symbols" = xyes ; then
12449
12450 cat >>confdefs.h <<\EOF
12451 #define USE_WEAK_SYMBOLS 1
12452 EOF
12453
12454         fi
12455 fi
12456
12457 PTHREAD=
12458 if test "x$with_pthread" = "xyes" ; then
12459
12460 cat >>confdefs.h <<\EOF
12461 #define USE_PTHREADS 1
12462 EOF
12463
12464     enable_reentrant=yes
12465     if test "x$cf_cv_weak_symbols" = xyes ; then
12466         PTHREAD=-lpthread
12467     fi
12468 fi
12469
12470 # Reentrant code has to be opaque; there's little advantage to making ncurses
12471 # opaque outside of that, so there is no --enable-opaque option.  We can use
12472 # this option without --with-pthreads, but this will be always set for
12473 # pthreads.
12474 echo "$as_me:12474: checking if you want experimental reentrant code" >&5
12475 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12476
12477 # Check whether --enable-reentrant or --disable-reentrant was given.
12478 if test "${enable_reentrant+set}" = set; then
12479   enableval="$enable_reentrant"
12480   with_reentrant=$enableval
12481 else
12482   with_reentrant=no
12483 fi;
12484 echo "$as_me:12484: result: $with_reentrant" >&5
12485 echo "${ECHO_T}$with_reentrant" >&6
12486 if test "x$with_reentrant" = xyes ; then
12487         cf_cv_enable_reentrant=1
12488         cf_cv_enable_opaque="NCURSES_INTERNALS"
12489         NCURSES_OPAQUE=1
12490         NCURSES_SIZE_T=int
12491         if test "x$cf_cv_weak_symbols" = xyes ; then
12492
12493 # remove pthread library from $LIBS
12494 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12495
12496 cf_add_libs="-lpthread"
12497 # Filter out duplicates - this happens with badly-designed ".pc" files...
12498 for cf_add_1lib in $TEST_LIBS
12499 do
12500         for cf_add_2lib in $cf_add_libs
12501         do
12502                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12503                 then
12504                         cf_add_1lib=
12505                         break
12506                 fi
12507         done
12508         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12509 done
12510 TEST_LIBS="$cf_add_libs"
12511
12512 cf_add_libs="-lpthread"
12513 # Filter out duplicates - this happens with badly-designed ".pc" files...
12514 for cf_add_1lib in $TEST_LIBS2
12515 do
12516         for cf_add_2lib in $cf_add_libs
12517         do
12518                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12519                 then
12520                         cf_add_1lib=
12521                         break
12522                 fi
12523         done
12524         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12525 done
12526 TEST_LIBS2="$cf_add_libs"
12527
12528         else
12529                 # when not using weak symbols but with_reentrant,
12530                 # add 't' to the library suffix on all platforms
12531                 # except cygwin, where we only do that if ALSO
12532                 # compiling with full thread support.
12533                 case "$host" in
12534                 *cygwin* | *msys*) #(vi
12535                         if test "$with_pthread" = "yes" ; then
12536                                 if test "x$disable_lib_suffixes" = "xno" ; then
12537                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12538                                 fi
12539                         fi ;;
12540                 *)
12541                         if test "x$disable_lib_suffixes" = "xno" ; then
12542                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12543                         fi
12544                         ;;
12545                 esac
12546         fi
12547
12548 cat >>confdefs.h <<\EOF
12549 #define USE_REENTRANT 1
12550 EOF
12551
12552 if test "${with_abi_version+set}" != set; then
12553         case $cf_cv_rel_version in
12554         5.*)
12555                 cf_cv_rel_version=6.0
12556                 cf_cv_abi_version=6
12557                 { echo "$as_me:12557: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12558 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12559                 ;;
12560         esac
12561 fi
12562
12563 else
12564         cf_cv_enable_reentrant=0
12565         cf_cv_enable_opaque="NCURSES_OPAQUE"
12566         NCURSES_OPAQUE=0
12567         NCURSES_SIZE_T=short
12568 fi
12569
12570 ### Allow using a different wrap-prefix
12571 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12572         echo "$as_me:12572: checking for prefix used to wrap public variables" >&5
12573 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12574
12575 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12576 if test "${with_wrap_prefix+set}" = set; then
12577   withval="$with_wrap_prefix"
12578   NCURSES_WRAP_PREFIX=$withval
12579 else
12580   NCURSES_WRAP_PREFIX=_nc_
12581 fi;
12582         echo "$as_me:12582: result: $NCURSES_WRAP_PREFIX" >&5
12583 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12584 else
12585         NCURSES_WRAP_PREFIX=_nc_
12586 fi
12587
12588 cat >>confdefs.h <<EOF
12589 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12590 EOF
12591
12592 echo "$as_me:12592: checking if you want experimental safe-sprintf code" >&5
12593 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12594
12595 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12596 if test "${enable_safe_sprintf+set}" = set; then
12597   enableval="$enable_safe_sprintf"
12598   with_safe_sprintf=$enableval
12599 else
12600   with_safe_sprintf=no
12601 fi;
12602 echo "$as_me:12602: result: $with_safe_sprintf" >&5
12603 echo "${ECHO_T}$with_safe_sprintf" >&6
12604 test "x$with_safe_sprintf" = xyes &&
12605 cat >>confdefs.h <<\EOF
12606 #define USE_SAFE_SPRINTF 1
12607 EOF
12608
12609 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12610 # when hashmap is used scroll hints are useless
12611 if test "$with_hashmap" = no ; then
12612 echo "$as_me:12612: checking if you want to experiment without scrolling-hints code" >&5
12613 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12614
12615 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12616 if test "${enable_scroll_hints+set}" = set; then
12617   enableval="$enable_scroll_hints"
12618   with_scroll_hints=$enableval
12619 else
12620   with_scroll_hints=yes
12621 fi;
12622 echo "$as_me:12622: result: $with_scroll_hints" >&5
12623 echo "${ECHO_T}$with_scroll_hints" >&6
12624 test "x$with_scroll_hints" = xyes &&
12625 cat >>confdefs.h <<\EOF
12626 #define USE_SCROLL_HINTS 1
12627 EOF
12628
12629 fi
12630
12631 echo "$as_me:12631: checking if you want experimental wgetch-events code" >&5
12632 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12633
12634 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12635 if test "${enable_wgetch_events+set}" = set; then
12636   enableval="$enable_wgetch_events"
12637   with_wgetch_events=$enableval
12638 else
12639   with_wgetch_events=no
12640 fi;
12641 echo "$as_me:12641: result: $with_wgetch_events" >&5
12642 echo "${ECHO_T}$with_wgetch_events" >&6
12643 test "x$with_wgetch_events" = xyes &&
12644 cat >>confdefs.h <<\EOF
12645 #define NCURSES_WGETCH_EVENTS 1
12646 EOF
12647
12648 ###############################################################################
12649
12650 ###     use option --disable-echo to suppress full display compiling commands
12651
12652 echo "$as_me:12652: checking if you want to see long compiling messages" >&5
12653 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12654
12655 # Check whether --enable-echo or --disable-echo was given.
12656 if test "${enable_echo+set}" = set; then
12657   enableval="$enable_echo"
12658   test "$enableval" != no && enableval=yes
12659   if test "$enableval" != "yes" ; then
12660
12661     ECHO_LT='--silent'
12662     ECHO_LD='@echo linking $@;'
12663     RULE_CC='@echo compiling $<'
12664     SHOW_CC='@echo compiling $@'
12665     ECHO_CC='@'
12666
12667   else
12668
12669     ECHO_LT=''
12670     ECHO_LD=''
12671     RULE_CC=''
12672     SHOW_CC=''
12673     ECHO_CC=''
12674
12675   fi
12676 else
12677   enableval=yes
12678
12679     ECHO_LT=''
12680     ECHO_LD=''
12681     RULE_CC=''
12682     SHOW_CC=''
12683     ECHO_CC=''
12684
12685 fi;
12686 echo "$as_me:12686: result: $enableval" >&5
12687 echo "${ECHO_T}$enableval" >&6
12688
12689 if test "x$enable_echo" = xyes; then
12690         ECHO_LINK=
12691 else
12692         ECHO_LINK='@ echo linking $@ ... ;'
12693         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12694         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12695 fi
12696
12697 ###     use option --enable-warnings to turn on all gcc warnings
12698 echo "$as_me:12698: checking if you want to see compiler warnings" >&5
12699 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12700
12701 # Check whether --enable-warnings or --disable-warnings was given.
12702 if test "${enable_warnings+set}" = set; then
12703   enableval="$enable_warnings"
12704   with_warnings=$enableval
12705 fi;
12706 echo "$as_me:12706: result: $with_warnings" >&5
12707 echo "${ECHO_T}$with_warnings" >&6
12708
12709 if test "x$with_warnings" = "xyes"; then
12710
12711         ADAFLAGS="$ADAFLAGS -gnatg"
12712
12713 INTEL_COMPILER=no
12714
12715 if test "$GCC" = yes ; then
12716         case $host_os in
12717         linux*|gnu*)
12718                 echo "$as_me:12718: checking if this is really Intel C compiler" >&5
12719 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12720                 cf_save_CFLAGS="$CFLAGS"
12721                 CFLAGS="$CFLAGS -no-gcc"
12722                 cat >conftest.$ac_ext <<_ACEOF
12723 #line 12723 "configure"
12724 #include "confdefs.h"
12725
12726 int
12727 main ()
12728 {
12729
12730 #ifdef __INTEL_COMPILER
12731 #else
12732 make an error
12733 #endif
12734
12735   ;
12736   return 0;
12737 }
12738 _ACEOF
12739 rm -f conftest.$ac_objext
12740 if { (eval echo "$as_me:12740: \"$ac_compile\"") >&5
12741   (eval $ac_compile) 2>&5
12742   ac_status=$?
12743   echo "$as_me:12743: \$? = $ac_status" >&5
12744   (exit $ac_status); } &&
12745          { ac_try='test -s conftest.$ac_objext'
12746   { (eval echo "$as_me:12746: \"$ac_try\"") >&5
12747   (eval $ac_try) 2>&5
12748   ac_status=$?
12749   echo "$as_me:12749: \$? = $ac_status" >&5
12750   (exit $ac_status); }; }; then
12751   INTEL_COMPILER=yes
12752 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12753
12754 else
12755   echo "$as_me: failed program was:" >&5
12756 cat conftest.$ac_ext >&5
12757 fi
12758 rm -f conftest.$ac_objext conftest.$ac_ext
12759                 CFLAGS="$cf_save_CFLAGS"
12760                 echo "$as_me:12760: result: $INTEL_COMPILER" >&5
12761 echo "${ECHO_T}$INTEL_COMPILER" >&6
12762                 ;;
12763         esac
12764 fi
12765
12766 CLANG_COMPILER=no
12767
12768 if test "$GCC" = yes ; then
12769         echo "$as_me:12769: checking if this is really Clang C compiler" >&5
12770 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12771         cf_save_CFLAGS="$CFLAGS"
12772         CFLAGS="$CFLAGS -Qunused-arguments"
12773         cat >conftest.$ac_ext <<_ACEOF
12774 #line 12774 "configure"
12775 #include "confdefs.h"
12776
12777 int
12778 main ()
12779 {
12780
12781 #ifdef __clang__
12782 #else
12783 make an error
12784 #endif
12785
12786   ;
12787   return 0;
12788 }
12789 _ACEOF
12790 rm -f conftest.$ac_objext
12791 if { (eval echo "$as_me:12791: \"$ac_compile\"") >&5
12792   (eval $ac_compile) 2>&5
12793   ac_status=$?
12794   echo "$as_me:12794: \$? = $ac_status" >&5
12795   (exit $ac_status); } &&
12796          { ac_try='test -s conftest.$ac_objext'
12797   { (eval echo "$as_me:12797: \"$ac_try\"") >&5
12798   (eval $ac_try) 2>&5
12799   ac_status=$?
12800   echo "$as_me:12800: \$? = $ac_status" >&5
12801   (exit $ac_status); }; }; then
12802   CLANG_COMPILER=yes
12803 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12804
12805 else
12806   echo "$as_me: failed program was:" >&5
12807 cat conftest.$ac_ext >&5
12808 fi
12809 rm -f conftest.$ac_objext conftest.$ac_ext
12810         CFLAGS="$cf_save_CFLAGS"
12811         echo "$as_me:12811: result: $CLANG_COMPILER" >&5
12812 echo "${ECHO_T}$CLANG_COMPILER" >&6
12813 fi
12814
12815 cat > conftest.$ac_ext <<EOF
12816 #line 12816 "${as_me:-configure}"
12817 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12818 EOF
12819
12820 if test "$INTEL_COMPILER" = yes
12821 then
12822 # The "-wdXXX" options suppress warnings:
12823 # remark #1419: external declaration in primary source file
12824 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12825 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12826 # remark #193: zero used for undefined preprocessing identifier
12827 # remark #593: variable "curs_sb_left_arrow" was set but never used
12828 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12829 # remark #869: parameter "tw" was never referenced
12830 # remark #981: operands are evaluated in unspecified order
12831 # warning #279: controlling expression is constant
12832
12833         { echo "$as_me:12833: checking for $CC warning options..." >&5
12834 echo "$as_me: checking for $CC warning options..." >&6;}
12835         cf_save_CFLAGS="$CFLAGS"
12836         EXTRA_CFLAGS="-Wall"
12837         for cf_opt in \
12838                 wd1419 \
12839                 wd1683 \
12840                 wd1684 \
12841                 wd193 \
12842                 wd593 \
12843                 wd279 \
12844                 wd810 \
12845                 wd869 \
12846                 wd981
12847         do
12848                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12849                 if { (eval echo "$as_me:12849: \"$ac_compile\"") >&5
12850   (eval $ac_compile) 2>&5
12851   ac_status=$?
12852   echo "$as_me:12852: \$? = $ac_status" >&5
12853   (exit $ac_status); }; then
12854                         test -n "$verbose" && echo "$as_me:12854: result: ... -$cf_opt" >&5
12855 echo "${ECHO_T}... -$cf_opt" >&6
12856                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12857                 fi
12858         done
12859         CFLAGS="$cf_save_CFLAGS"
12860
12861 elif test "$GCC" = yes
12862 then
12863         { echo "$as_me:12863: checking for $CC warning options..." >&5
12864 echo "$as_me: checking for $CC warning options..." >&6;}
12865         cf_save_CFLAGS="$CFLAGS"
12866         EXTRA_CFLAGS=
12867         cf_warn_CONST=""
12868         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12869         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12870         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12871         for cf_opt in W Wall \
12872                 Wbad-function-cast \
12873                 Wcast-align \
12874                 Wcast-qual \
12875                 Wdeclaration-after-statement \
12876                 Wextra \
12877                 Winline \
12878                 Wmissing-declarations \
12879                 Wmissing-prototypes \
12880                 Wnested-externs \
12881                 Wpointer-arith \
12882                 Wshadow \
12883                 Wstrict-prototypes \
12884                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12885         do
12886                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12887                 if { (eval echo "$as_me:12887: \"$ac_compile\"") >&5
12888   (eval $ac_compile) 2>&5
12889   ac_status=$?
12890   echo "$as_me:12890: \$? = $ac_status" >&5
12891   (exit $ac_status); }; then
12892                         test -n "$verbose" && echo "$as_me:12892: result: ... -$cf_opt" >&5
12893 echo "${ECHO_T}... -$cf_opt" >&6
12894                         case $cf_opt in #(vi
12895                         Wcast-qual) #(vi
12896                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12897                                 ;;
12898                         Winline) #(vi
12899                                 case $GCC_VERSION in
12900                                 [34].*)
12901                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12902
12903 echo "${as_me:-configure}:12903: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12904
12905                                         continue;;
12906                                 esac
12907                                 ;;
12908                         Wpointer-arith) #(vi
12909                                 case $GCC_VERSION in
12910                                 [12].*)
12911                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12912
12913 echo "${as_me:-configure}:12913: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12914
12915                                         continue;;
12916                                 esac
12917                                 ;;
12918                         esac
12919                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12920                 fi
12921         done
12922         CFLAGS="$cf_save_CFLAGS"
12923 fi
12924 rm -rf conftest*
12925
12926         if test "x$cf_with_cxx" = xyes ; then
12927
12928 INTEL_CPLUSPLUS=no
12929
12930 if test "$GCC" = yes ; then
12931         case $host_os in
12932         linux*|gnu*)
12933                 echo "$as_me:12933: checking if this is really Intel C++ compiler" >&5
12934 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12935                 cf_save_CFLAGS="$CXXFLAGS"
12936                 CXXFLAGS="$CXXFLAGS -no-gcc"
12937                 cat >conftest.$ac_ext <<_ACEOF
12938 #line 12938 "configure"
12939 #include "confdefs.h"
12940
12941 int
12942 main ()
12943 {
12944
12945 #ifdef __INTEL_COMPILER
12946 #else
12947 make an error
12948 #endif
12949
12950   ;
12951   return 0;
12952 }
12953 _ACEOF
12954 rm -f conftest.$ac_objext
12955 if { (eval echo "$as_me:12955: \"$ac_compile\"") >&5
12956   (eval $ac_compile) 2>&5
12957   ac_status=$?
12958   echo "$as_me:12958: \$? = $ac_status" >&5
12959   (exit $ac_status); } &&
12960          { ac_try='test -s conftest.$ac_objext'
12961   { (eval echo "$as_me:12961: \"$ac_try\"") >&5
12962   (eval $ac_try) 2>&5
12963   ac_status=$?
12964   echo "$as_me:12964: \$? = $ac_status" >&5
12965   (exit $ac_status); }; }; then
12966   INTEL_CPLUSPLUS=yes
12967 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12968
12969 else
12970   echo "$as_me: failed program was:" >&5
12971 cat conftest.$ac_ext >&5
12972 fi
12973 rm -f conftest.$ac_objext conftest.$ac_ext
12974                 CXXFLAGS="$cf_save_CFLAGS"
12975                 echo "$as_me:12975: result: $INTEL_CPLUSPLUS" >&5
12976 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12977                 ;;
12978         esac
12979 fi
12980
12981 CLANG_CPLUSPLUS=no
12982
12983 if test "$GCC" = yes ; then
12984         echo "$as_me:12984: checking if this is really Clang C++ compiler" >&5
12985 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12986         cf_save_CFLAGS="$CXXFLAGS"
12987         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12988         cat >conftest.$ac_ext <<_ACEOF
12989 #line 12989 "configure"
12990 #include "confdefs.h"
12991
12992 int
12993 main ()
12994 {
12995
12996 #ifdef __clang__
12997 #else
12998 make an error
12999 #endif
13000
13001   ;
13002   return 0;
13003 }
13004 _ACEOF
13005 rm -f conftest.$ac_objext
13006 if { (eval echo "$as_me:13006: \"$ac_compile\"") >&5
13007   (eval $ac_compile) 2>&5
13008   ac_status=$?
13009   echo "$as_me:13009: \$? = $ac_status" >&5
13010   (exit $ac_status); } &&
13011          { ac_try='test -s conftest.$ac_objext'
13012   { (eval echo "$as_me:13012: \"$ac_try\"") >&5
13013   (eval $ac_try) 2>&5
13014   ac_status=$?
13015   echo "$as_me:13015: \$? = $ac_status" >&5
13016   (exit $ac_status); }; }; then
13017   CLANG_CPLUSPLUS=yes
13018 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13019
13020 else
13021   echo "$as_me: failed program was:" >&5
13022 cat conftest.$ac_ext >&5
13023 fi
13024 rm -f conftest.$ac_objext conftest.$ac_ext
13025         CXXFLAGS="$cf_save_CFLAGS"
13026         echo "$as_me:13026: result: $CLANG_CPLUSPLUS" >&5
13027 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13028 fi
13029
13030 ac_ext=cc
13031 ac_cpp='$CXXCPP $CPPFLAGS'
13032 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13033 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13034 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13035 ac_main_return=return
13036
13037 cat > conftest.$ac_ext <<EOF
13038 #line 13038 "configure"
13039 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13040 EOF
13041
13042 if test "$INTEL_CPLUSPLUS" = yes
13043 then
13044 # The "-wdXXX" options suppress warnings:
13045 # remark #1419: external declaration in primary source file
13046 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13047 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13048 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13049 # remark #193: zero used for undefined preprocessing identifier
13050 # remark #593: variable "curs_sb_left_arrow" was set but never used
13051 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13052 # remark #869: parameter "tw" was never referenced
13053 # remark #981: operands are evaluated in unspecified order
13054 # warning #269: invalid format string conversion
13055
13056         { echo "$as_me:13056: checking for $CC warning options..." >&5
13057 echo "$as_me: checking for $CC warning options..." >&6;}
13058         cf_save_CXXFLAGS="$CXXFLAGS"
13059         EXTRA_CXXFLAGS="-Wall"
13060         for cf_opt in \
13061                 wd1419 \
13062                 wd1682 \
13063                 wd1683 \
13064                 wd1684 \
13065                 wd193 \
13066                 wd279 \
13067                 wd593 \
13068                 wd810 \
13069                 wd869 \
13070                 wd981
13071         do
13072                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$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                 fi
13082         done
13083         CXXFLAGS="$cf_save_CXXFLAGS"
13084
13085 elif test "$GXX" = yes
13086 then
13087         { echo "$as_me:13087: checking for $CXX warning options..." >&5
13088 echo "$as_me: checking for $CXX warning options..." >&6;}
13089         cf_save_CXXFLAGS="$CXXFLAGS"
13090         EXTRA_CXXFLAGS="-W -Wall"
13091         cf_gxx_extra_warnings=""
13092         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13093         case "$GCC_VERSION" in
13094         [1-2].*)
13095                 ;;
13096         *)
13097                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13098                 ;;
13099         esac
13100         for cf_opt in \
13101                 Wabi \
13102                 fabi-version=0 \
13103                 Wextra \
13104                 Wignored-qualifiers \
13105                 Wlogical-op \
13106                 Woverloaded-virtual \
13107                 Wsign-promo \
13108                 Wsynth \
13109                 Wold-style-cast \
13110                 Wcast-align \
13111                 Wcast-qual \
13112                 Wpointer-arith \
13113                 Wshadow \
13114                 Wundef $cf_gxx_extra_warnings Wno-unused
13115         do
13116                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13117                 if { (eval echo "$as_me:13117: \"$ac_compile\"") >&5
13118   (eval $ac_compile) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit $ac_status); }; then
13122                         test -n "$verbose" && echo "$as_me:13122: result: ... -$cf_opt" >&5
13123 echo "${ECHO_T}... -$cf_opt" >&6
13124                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13125                 else
13126                         test -n "$verbose" && echo "$as_me:13126: result: ... no -$cf_opt" >&5
13127 echo "${ECHO_T}... no -$cf_opt" >&6
13128                 fi
13129         done
13130         CXXFLAGS="$cf_save_CXXFLAGS"
13131 fi
13132
13133 rm -rf conftest*
13134 ac_ext=c
13135 ac_cpp='$CPP $CPPFLAGS'
13136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13139 ac_main_return=return
13140
13141         fi
13142 fi
13143
13144 if test "$GCC" = yes
13145 then
13146 cat > conftest.i <<EOF
13147 #ifndef GCC_PRINTF
13148 #define GCC_PRINTF 0
13149 #endif
13150 #ifndef GCC_SCANF
13151 #define GCC_SCANF 0
13152 #endif
13153 #ifndef GCC_NORETURN
13154 #define GCC_NORETURN /* nothing */
13155 #endif
13156 #ifndef GCC_UNUSED
13157 #define GCC_UNUSED /* nothing */
13158 #endif
13159 EOF
13160 if test "$GCC" = yes
13161 then
13162         { echo "$as_me:13162: checking for $CC __attribute__ directives..." >&5
13163 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13164 cat > conftest.$ac_ext <<EOF
13165 #line 13165 "${as_me:-configure}"
13166 #include "confdefs.h"
13167 #include "conftest.h"
13168 #include "conftest.i"
13169 #if     GCC_PRINTF
13170 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13171 #else
13172 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13173 #endif
13174 #if     GCC_SCANF
13175 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13176 #else
13177 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13178 #endif
13179 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13180 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13181 extern void foo(void) GCC_NORETURN;
13182 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13183 EOF
13184         cf_printf_attribute=no
13185         cf_scanf_attribute=no
13186         for cf_attribute in scanf printf unused noreturn
13187         do
13188
13189 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13190
13191                 cf_directive="__attribute__(($cf_attribute))"
13192                 echo "checking for $CC $cf_directive" 1>&5
13193
13194                 case $cf_attribute in #(vi
13195                 printf) #(vi
13196                         cf_printf_attribute=yes
13197                         cat >conftest.h <<EOF
13198 #define GCC_$cf_ATTRIBUTE 1
13199 EOF
13200                         ;;
13201                 scanf) #(vi
13202                         cf_scanf_attribute=yes
13203                         cat >conftest.h <<EOF
13204 #define GCC_$cf_ATTRIBUTE 1
13205 EOF
13206                         ;;
13207                 *) #(vi
13208                         cat >conftest.h <<EOF
13209 #define GCC_$cf_ATTRIBUTE $cf_directive
13210 EOF
13211                         ;;
13212                 esac
13213
13214                 if { (eval echo "$as_me:13214: \"$ac_compile\"") >&5
13215   (eval $ac_compile) 2>&5
13216   ac_status=$?
13217   echo "$as_me:13217: \$? = $ac_status" >&5
13218   (exit $ac_status); }; then
13219                         test -n "$verbose" && echo "$as_me:13219: result: ... $cf_attribute" >&5
13220 echo "${ECHO_T}... $cf_attribute" >&6
13221                         cat conftest.h >>confdefs.h
13222                         case $cf_attribute in #(vi
13223                         noreturn) #(vi
13224
13225 cat >>confdefs.h <<EOF
13226 #define GCC_NORETURN $cf_directive
13227 EOF
13228
13229                                 ;;
13230                         printf) #(vi
13231                                 cf_value='/* nothing */'
13232                                 if test "$cf_printf_attribute" != no ; then
13233                                         cf_value='__attribute__((format(printf,fmt,var)))'
13234
13235 cat >>confdefs.h <<\EOF
13236 #define GCC_PRINTF 1
13237 EOF
13238
13239                                 fi
13240
13241 cat >>confdefs.h <<EOF
13242 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13243 EOF
13244
13245                                 ;;
13246                         scanf) #(vi
13247                                 cf_value='/* nothing */'
13248                                 if test "$cf_scanf_attribute" != no ; then
13249                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13250
13251 cat >>confdefs.h <<\EOF
13252 #define GCC_SCANF 1
13253 EOF
13254
13255                                 fi
13256
13257 cat >>confdefs.h <<EOF
13258 #define GCC_SCANFLIKE(fmt,var) $cf_value
13259 EOF
13260
13261                                 ;;
13262                         unused) #(vi
13263
13264 cat >>confdefs.h <<EOF
13265 #define GCC_UNUSED $cf_directive
13266 EOF
13267
13268                                 ;;
13269                         esac
13270                 fi
13271         done
13272 else
13273         fgrep define conftest.i >>confdefs.h
13274 fi
13275 rm -rf conftest*
13276 fi
13277
13278 echo "$as_me:13278: checking if you want to work around bogus compiler/loader warnings" >&5
13279 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13280
13281 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13282 if test "${enable_string_hacks+set}" = set; then
13283   enableval="$enable_string_hacks"
13284   with_string_hacks=$enableval
13285 else
13286   with_string_hacks=no
13287 fi;
13288 echo "$as_me:13288: result: $with_string_hacks" >&5
13289 echo "${ECHO_T}$with_string_hacks" >&6
13290
13291 if test "x$with_string_hacks" = "xyes"; then
13292
13293 cat >>confdefs.h <<\EOF
13294 #define USE_STRING_HACKS 1
13295 EOF
13296
13297         { echo "$as_me:13297: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13298 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13299
13300 for ac_func in strlcat strlcpy snprintf
13301 do
13302 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13303 echo "$as_me:13303: checking for $ac_func" >&5
13304 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13305 if eval "test \"\${$as_ac_var+set}\" = set"; then
13306   echo $ECHO_N "(cached) $ECHO_C" >&6
13307 else
13308   cat >conftest.$ac_ext <<_ACEOF
13309 #line 13309 "configure"
13310 #include "confdefs.h"
13311 /* System header to define __stub macros and hopefully few prototypes,
13312     which can conflict with char $ac_func (); below.  */
13313 #include <assert.h>
13314 /* Override any gcc2 internal prototype to avoid an error.  */
13315 #ifdef __cplusplus
13316 extern "C"
13317 #endif
13318 /* We use char because int might match the return type of a gcc2
13319    builtin and then its argument prototype would still apply.  */
13320 char $ac_func ();
13321 char (*f) ();
13322
13323 int
13324 main ()
13325 {
13326 /* The GNU C library defines this for functions which it implements
13327     to always fail with ENOSYS.  Some functions are actually named
13328     something starting with __ and the normal name is an alias.  */
13329 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13330 choke me
13331 #else
13332 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13333 #endif
13334
13335   ;
13336   return 0;
13337 }
13338 _ACEOF
13339 rm -f conftest.$ac_objext conftest$ac_exeext
13340 if { (eval echo "$as_me:13340: \"$ac_link\"") >&5
13341   (eval $ac_link) 2>&5
13342   ac_status=$?
13343   echo "$as_me:13343: \$? = $ac_status" >&5
13344   (exit $ac_status); } &&
13345          { ac_try='test -s conftest$ac_exeext'
13346   { (eval echo "$as_me:13346: \"$ac_try\"") >&5
13347   (eval $ac_try) 2>&5
13348   ac_status=$?
13349   echo "$as_me:13349: \$? = $ac_status" >&5
13350   (exit $ac_status); }; }; then
13351   eval "$as_ac_var=yes"
13352 else
13353   echo "$as_me: failed program was:" >&5
13354 cat conftest.$ac_ext >&5
13355 eval "$as_ac_var=no"
13356 fi
13357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13358 fi
13359 echo "$as_me:13359: result: `eval echo '${'$as_ac_var'}'`" >&5
13360 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13361 if test `eval echo '${'$as_ac_var'}'` = yes; then
13362   cat >>confdefs.h <<EOF
13363 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13364 EOF
13365
13366 fi
13367 done
13368
13369 fi
13370
13371 ###     use option --enable-assertions to turn on generation of assertion code
13372 echo "$as_me:13372: checking if you want to enable runtime assertions" >&5
13373 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13374
13375 # Check whether --enable-assertions or --disable-assertions was given.
13376 if test "${enable_assertions+set}" = set; then
13377   enableval="$enable_assertions"
13378   with_assertions=$enableval
13379 else
13380   with_assertions=no
13381 fi;
13382 echo "$as_me:13382: result: $with_assertions" >&5
13383 echo "${ECHO_T}$with_assertions" >&6
13384 if test -n "$GCC"
13385 then
13386         if test "$with_assertions" = no
13387         then
13388                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13389         else
13390
13391         ADAFLAGS="$ADAFLAGS -gnata"
13392
13393         fi
13394 fi
13395
13396 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13397
13398 echo "$as_me:13398: checking if you want to use dmalloc for testing" >&5
13399 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13400
13401 # Check whether --with-dmalloc or --without-dmalloc was given.
13402 if test "${with_dmalloc+set}" = set; then
13403   withval="$with_dmalloc"
13404
13405 cat >>confdefs.h <<EOF
13406 #define USE_DMALLOC 1
13407 EOF
13408
13409         : ${with_cflags:=-g}
13410         : ${with_no_leaks:=yes}
13411          with_dmalloc=yes
13412 else
13413   with_dmalloc=
13414 fi;
13415 echo "$as_me:13415: result: ${with_dmalloc:-no}" >&5
13416 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13417
13418 case .$with_cflags in #(vi
13419 .*-g*)
13420         case .$CFLAGS in #(vi
13421         .*-g*) #(vi
13422                 ;;
13423         *)
13424
13425 cf_fix_cppflags=no
13426 cf_new_cflags=
13427 cf_new_cppflags=
13428 cf_new_extra_cppflags=
13429
13430 for cf_add_cflags in -g
13431 do
13432 case $cf_fix_cppflags in
13433 no)
13434         case $cf_add_cflags in #(vi
13435         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13436                 case $cf_add_cflags in
13437                 -D*)
13438                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13439
13440                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13441                                 && test -z "${cf_tst_cflags}" \
13442                                 && cf_fix_cppflags=yes
13443
13444                         if test $cf_fix_cppflags = yes ; then
13445                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13446                                 continue
13447                         elif test "${cf_tst_cflags}" = "\"'" ; then
13448                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13449                                 continue
13450                         fi
13451                         ;;
13452                 esac
13453                 case "$CPPFLAGS" in
13454                 *$cf_add_cflags) #(vi
13455                         ;;
13456                 *) #(vi
13457                         case $cf_add_cflags in #(vi
13458                         -D*)
13459                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13460
13461 CPPFLAGS=`echo "$CPPFLAGS" | \
13462         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13463                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13464
13465                                 ;;
13466                         esac
13467                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13468                         ;;
13469                 esac
13470                 ;;
13471         *)
13472                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13473                 ;;
13474         esac
13475         ;;
13476 yes)
13477         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13478
13479         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13480
13481         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13482                 && test -z "${cf_tst_cflags}" \
13483                 && cf_fix_cppflags=no
13484         ;;
13485 esac
13486 done
13487
13488 if test -n "$cf_new_cflags" ; then
13489
13490         CFLAGS="$CFLAGS $cf_new_cflags"
13491 fi
13492
13493 if test -n "$cf_new_cppflags" ; then
13494
13495         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13496 fi
13497
13498 if test -n "$cf_new_extra_cppflags" ; then
13499
13500         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13501 fi
13502
13503                 ;;
13504         esac
13505         ;;
13506 esac
13507
13508 if test "$with_dmalloc" = yes ; then
13509         echo "$as_me:13509: checking for dmalloc.h" >&5
13510 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13511 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13512   echo $ECHO_N "(cached) $ECHO_C" >&6
13513 else
13514   cat >conftest.$ac_ext <<_ACEOF
13515 #line 13515 "configure"
13516 #include "confdefs.h"
13517 #include <dmalloc.h>
13518 _ACEOF
13519 if { (eval echo "$as_me:13519: \"$ac_cpp conftest.$ac_ext\"") >&5
13520   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13521   ac_status=$?
13522   egrep -v '^ *\+' conftest.er1 >conftest.err
13523   rm -f conftest.er1
13524   cat conftest.err >&5
13525   echo "$as_me:13525: \$? = $ac_status" >&5
13526   (exit $ac_status); } >/dev/null; then
13527   if test -s conftest.err; then
13528     ac_cpp_err=$ac_c_preproc_warn_flag
13529   else
13530     ac_cpp_err=
13531   fi
13532 else
13533   ac_cpp_err=yes
13534 fi
13535 if test -z "$ac_cpp_err"; then
13536   ac_cv_header_dmalloc_h=yes
13537 else
13538   echo "$as_me: failed program was:" >&5
13539   cat conftest.$ac_ext >&5
13540   ac_cv_header_dmalloc_h=no
13541 fi
13542 rm -f conftest.err conftest.$ac_ext
13543 fi
13544 echo "$as_me:13544: result: $ac_cv_header_dmalloc_h" >&5
13545 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13546 if test $ac_cv_header_dmalloc_h = yes; then
13547
13548 echo "$as_me:13548: checking for dmalloc_debug in -ldmalloc" >&5
13549 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13550 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13551   echo $ECHO_N "(cached) $ECHO_C" >&6
13552 else
13553   ac_check_lib_save_LIBS=$LIBS
13554 LIBS="-ldmalloc  $LIBS"
13555 cat >conftest.$ac_ext <<_ACEOF
13556 #line 13556 "configure"
13557 #include "confdefs.h"
13558
13559 /* Override any gcc2 internal prototype to avoid an error.  */
13560 #ifdef __cplusplus
13561 extern "C"
13562 #endif
13563 /* We use char because int might match the return type of a gcc2
13564    builtin and then its argument prototype would still apply.  */
13565 char dmalloc_debug ();
13566 int
13567 main ()
13568 {
13569 dmalloc_debug ();
13570   ;
13571   return 0;
13572 }
13573 _ACEOF
13574 rm -f conftest.$ac_objext conftest$ac_exeext
13575 if { (eval echo "$as_me:13575: \"$ac_link\"") >&5
13576   (eval $ac_link) 2>&5
13577   ac_status=$?
13578   echo "$as_me:13578: \$? = $ac_status" >&5
13579   (exit $ac_status); } &&
13580          { ac_try='test -s conftest$ac_exeext'
13581   { (eval echo "$as_me:13581: \"$ac_try\"") >&5
13582   (eval $ac_try) 2>&5
13583   ac_status=$?
13584   echo "$as_me:13584: \$? = $ac_status" >&5
13585   (exit $ac_status); }; }; then
13586   ac_cv_lib_dmalloc_dmalloc_debug=yes
13587 else
13588   echo "$as_me: failed program was:" >&5
13589 cat conftest.$ac_ext >&5
13590 ac_cv_lib_dmalloc_dmalloc_debug=no
13591 fi
13592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13593 LIBS=$ac_check_lib_save_LIBS
13594 fi
13595 echo "$as_me:13595: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13596 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13597 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13598   cat >>confdefs.h <<EOF
13599 #define HAVE_LIBDMALLOC 1
13600 EOF
13601
13602   LIBS="-ldmalloc $LIBS"
13603
13604 fi
13605
13606 fi
13607
13608 fi
13609
13610 echo "$as_me:13610: checking if you want to use dbmalloc for testing" >&5
13611 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13612
13613 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13614 if test "${with_dbmalloc+set}" = set; then
13615   withval="$with_dbmalloc"
13616
13617 cat >>confdefs.h <<EOF
13618 #define USE_DBMALLOC 1
13619 EOF
13620
13621         : ${with_cflags:=-g}
13622         : ${with_no_leaks:=yes}
13623          with_dbmalloc=yes
13624 else
13625   with_dbmalloc=
13626 fi;
13627 echo "$as_me:13627: result: ${with_dbmalloc:-no}" >&5
13628 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13629
13630 case .$with_cflags in #(vi
13631 .*-g*)
13632         case .$CFLAGS in #(vi
13633         .*-g*) #(vi
13634                 ;;
13635         *)
13636
13637 cf_fix_cppflags=no
13638 cf_new_cflags=
13639 cf_new_cppflags=
13640 cf_new_extra_cppflags=
13641
13642 for cf_add_cflags in -g
13643 do
13644 case $cf_fix_cppflags in
13645 no)
13646         case $cf_add_cflags in #(vi
13647         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13648                 case $cf_add_cflags in
13649                 -D*)
13650                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13651
13652                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13653                                 && test -z "${cf_tst_cflags}" \
13654                                 && cf_fix_cppflags=yes
13655
13656                         if test $cf_fix_cppflags = yes ; then
13657                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13658                                 continue
13659                         elif test "${cf_tst_cflags}" = "\"'" ; then
13660                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13661                                 continue
13662                         fi
13663                         ;;
13664                 esac
13665                 case "$CPPFLAGS" in
13666                 *$cf_add_cflags) #(vi
13667                         ;;
13668                 *) #(vi
13669                         case $cf_add_cflags in #(vi
13670                         -D*)
13671                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13672
13673 CPPFLAGS=`echo "$CPPFLAGS" | \
13674         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13675                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13676
13677                                 ;;
13678                         esac
13679                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13680                         ;;
13681                 esac
13682                 ;;
13683         *)
13684                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13685                 ;;
13686         esac
13687         ;;
13688 yes)
13689         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13690
13691         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13692
13693         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13694                 && test -z "${cf_tst_cflags}" \
13695                 && cf_fix_cppflags=no
13696         ;;
13697 esac
13698 done
13699
13700 if test -n "$cf_new_cflags" ; then
13701
13702         CFLAGS="$CFLAGS $cf_new_cflags"
13703 fi
13704
13705 if test -n "$cf_new_cppflags" ; then
13706
13707         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13708 fi
13709
13710 if test -n "$cf_new_extra_cppflags" ; then
13711
13712         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13713 fi
13714
13715                 ;;
13716         esac
13717         ;;
13718 esac
13719
13720 if test "$with_dbmalloc" = yes ; then
13721         echo "$as_me:13721: checking for dbmalloc.h" >&5
13722 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13723 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13724   echo $ECHO_N "(cached) $ECHO_C" >&6
13725 else
13726   cat >conftest.$ac_ext <<_ACEOF
13727 #line 13727 "configure"
13728 #include "confdefs.h"
13729 #include <dbmalloc.h>
13730 _ACEOF
13731 if { (eval echo "$as_me:13731: \"$ac_cpp conftest.$ac_ext\"") >&5
13732   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13733   ac_status=$?
13734   egrep -v '^ *\+' conftest.er1 >conftest.err
13735   rm -f conftest.er1
13736   cat conftest.err >&5
13737   echo "$as_me:13737: \$? = $ac_status" >&5
13738   (exit $ac_status); } >/dev/null; then
13739   if test -s conftest.err; then
13740     ac_cpp_err=$ac_c_preproc_warn_flag
13741   else
13742     ac_cpp_err=
13743   fi
13744 else
13745   ac_cpp_err=yes
13746 fi
13747 if test -z "$ac_cpp_err"; then
13748   ac_cv_header_dbmalloc_h=yes
13749 else
13750   echo "$as_me: failed program was:" >&5
13751   cat conftest.$ac_ext >&5
13752   ac_cv_header_dbmalloc_h=no
13753 fi
13754 rm -f conftest.err conftest.$ac_ext
13755 fi
13756 echo "$as_me:13756: result: $ac_cv_header_dbmalloc_h" >&5
13757 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13758 if test $ac_cv_header_dbmalloc_h = yes; then
13759
13760 echo "$as_me:13760: checking for debug_malloc in -ldbmalloc" >&5
13761 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13762 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13763   echo $ECHO_N "(cached) $ECHO_C" >&6
13764 else
13765   ac_check_lib_save_LIBS=$LIBS
13766 LIBS="-ldbmalloc  $LIBS"
13767 cat >conftest.$ac_ext <<_ACEOF
13768 #line 13768 "configure"
13769 #include "confdefs.h"
13770
13771 /* Override any gcc2 internal prototype to avoid an error.  */
13772 #ifdef __cplusplus
13773 extern "C"
13774 #endif
13775 /* We use char because int might match the return type of a gcc2
13776    builtin and then its argument prototype would still apply.  */
13777 char debug_malloc ();
13778 int
13779 main ()
13780 {
13781 debug_malloc ();
13782   ;
13783   return 0;
13784 }
13785 _ACEOF
13786 rm -f conftest.$ac_objext conftest$ac_exeext
13787 if { (eval echo "$as_me:13787: \"$ac_link\"") >&5
13788   (eval $ac_link) 2>&5
13789   ac_status=$?
13790   echo "$as_me:13790: \$? = $ac_status" >&5
13791   (exit $ac_status); } &&
13792          { ac_try='test -s conftest$ac_exeext'
13793   { (eval echo "$as_me:13793: \"$ac_try\"") >&5
13794   (eval $ac_try) 2>&5
13795   ac_status=$?
13796   echo "$as_me:13796: \$? = $ac_status" >&5
13797   (exit $ac_status); }; }; then
13798   ac_cv_lib_dbmalloc_debug_malloc=yes
13799 else
13800   echo "$as_me: failed program was:" >&5
13801 cat conftest.$ac_ext >&5
13802 ac_cv_lib_dbmalloc_debug_malloc=no
13803 fi
13804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13805 LIBS=$ac_check_lib_save_LIBS
13806 fi
13807 echo "$as_me:13807: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13808 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13809 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13810   cat >>confdefs.h <<EOF
13811 #define HAVE_LIBDBMALLOC 1
13812 EOF
13813
13814   LIBS="-ldbmalloc $LIBS"
13815
13816 fi
13817
13818 fi
13819
13820 fi
13821
13822 echo "$as_me:13822: checking if you want to use valgrind for testing" >&5
13823 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13824
13825 # Check whether --with-valgrind or --without-valgrind was given.
13826 if test "${with_valgrind+set}" = set; then
13827   withval="$with_valgrind"
13828
13829 cat >>confdefs.h <<EOF
13830 #define USE_VALGRIND 1
13831 EOF
13832
13833         : ${with_cflags:=-g}
13834         : ${with_no_leaks:=yes}
13835          with_valgrind=yes
13836 else
13837   with_valgrind=
13838 fi;
13839 echo "$as_me:13839: result: ${with_valgrind:-no}" >&5
13840 echo "${ECHO_T}${with_valgrind:-no}" >&6
13841
13842 case .$with_cflags in #(vi
13843 .*-g*)
13844         case .$CFLAGS in #(vi
13845         .*-g*) #(vi
13846                 ;;
13847         *)
13848
13849 cf_fix_cppflags=no
13850 cf_new_cflags=
13851 cf_new_cppflags=
13852 cf_new_extra_cppflags=
13853
13854 for cf_add_cflags in -g
13855 do
13856 case $cf_fix_cppflags in
13857 no)
13858         case $cf_add_cflags in #(vi
13859         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13860                 case $cf_add_cflags in
13861                 -D*)
13862                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13863
13864                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13865                                 && test -z "${cf_tst_cflags}" \
13866                                 && cf_fix_cppflags=yes
13867
13868                         if test $cf_fix_cppflags = yes ; then
13869                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13870                                 continue
13871                         elif test "${cf_tst_cflags}" = "\"'" ; then
13872                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13873                                 continue
13874                         fi
13875                         ;;
13876                 esac
13877                 case "$CPPFLAGS" in
13878                 *$cf_add_cflags) #(vi
13879                         ;;
13880                 *) #(vi
13881                         case $cf_add_cflags in #(vi
13882                         -D*)
13883                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13884
13885 CPPFLAGS=`echo "$CPPFLAGS" | \
13886         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13887                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13888
13889                                 ;;
13890                         esac
13891                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13892                         ;;
13893                 esac
13894                 ;;
13895         *)
13896                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13897                 ;;
13898         esac
13899         ;;
13900 yes)
13901         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13902
13903         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13904
13905         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13906                 && test -z "${cf_tst_cflags}" \
13907                 && cf_fix_cppflags=no
13908         ;;
13909 esac
13910 done
13911
13912 if test -n "$cf_new_cflags" ; then
13913
13914         CFLAGS="$CFLAGS $cf_new_cflags"
13915 fi
13916
13917 if test -n "$cf_new_cppflags" ; then
13918
13919         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13920 fi
13921
13922 if test -n "$cf_new_extra_cppflags" ; then
13923
13924         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13925 fi
13926
13927                 ;;
13928         esac
13929         ;;
13930 esac
13931
13932 echo "$as_me:13932: checking if you want to perform memory-leak testing" >&5
13933 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13934
13935 # Check whether --enable-leaks or --disable-leaks was given.
13936 if test "${enable_leaks+set}" = set; then
13937   enableval="$enable_leaks"
13938   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13939 else
13940   : ${with_no_leaks:=no}
13941 fi;
13942 echo "$as_me:13942: result: $with_no_leaks" >&5
13943 echo "${ECHO_T}$with_no_leaks" >&6
13944
13945 if test "$with_no_leaks" = yes ; then
13946
13947 cat >>confdefs.h <<\EOF
13948 #define NO_LEAKS 1
13949 EOF
13950
13951 cat >>confdefs.h <<\EOF
13952 #define YY_NO_LEAKS 1
13953 EOF
13954
13955 fi
13956
13957 cat >>confdefs.h <<\EOF
13958 #define HAVE_NC_ALLOC_H 1
13959 EOF
13960
13961 ###     use option --enable-expanded to generate certain macros as functions
13962
13963 # Check whether --enable-expanded or --disable-expanded was given.
13964 if test "${enable_expanded+set}" = set; then
13965   enableval="$enable_expanded"
13966   test "x$enableval" = xyes &&
13967 cat >>confdefs.h <<\EOF
13968 #define NCURSES_EXPANDED 1
13969 EOF
13970
13971 fi;
13972
13973 ###     use option --disable-macros to suppress macros in favor of functions
13974
13975 # Check whether --enable-macros or --disable-macros was given.
13976 if test "${enable_macros+set}" = set; then
13977   enableval="$enable_macros"
13978   test "$enableval" = no &&
13979 cat >>confdefs.h <<\EOF
13980 #define NCURSES_NOMACROS 1
13981 EOF
13982
13983 fi;
13984
13985 # Normally we only add trace() to the debug-library.  Allow this to be
13986 # extended to all models of the ncurses library:
13987 cf_all_traces=no
13988 case "$CFLAGS $CPPFLAGS" in
13989 *-DTRACE*)
13990         cf_all_traces=yes
13991         ;;
13992 esac
13993
13994 echo "$as_me:13994: checking whether to add trace feature to all models" >&5
13995 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13996
13997 # Check whether --with-trace or --without-trace was given.
13998 if test "${with_trace+set}" = set; then
13999   withval="$with_trace"
14000   cf_with_trace=$withval
14001 else
14002   cf_with_trace=$cf_all_traces
14003 fi;
14004 echo "$as_me:14004: result: $cf_with_trace" >&5
14005 echo "${ECHO_T}$cf_with_trace" >&6
14006
14007 if test "x$cf_with_trace" = xyes ; then
14008         LIB_TRACING=all
14009         ADA_TRACE=TRUE
14010
14011 cf_fix_cppflags=no
14012 cf_new_cflags=
14013 cf_new_cppflags=
14014 cf_new_extra_cppflags=
14015
14016 for cf_add_cflags in -DTRACE
14017 do
14018 case $cf_fix_cppflags in
14019 no)
14020         case $cf_add_cflags in #(vi
14021         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14022                 case $cf_add_cflags in
14023                 -D*)
14024                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14025
14026                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14027                                 && test -z "${cf_tst_cflags}" \
14028                                 && cf_fix_cppflags=yes
14029
14030                         if test $cf_fix_cppflags = yes ; then
14031                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14032                                 continue
14033                         elif test "${cf_tst_cflags}" = "\"'" ; then
14034                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14035                                 continue
14036                         fi
14037                         ;;
14038                 esac
14039                 case "$CPPFLAGS" in
14040                 *$cf_add_cflags) #(vi
14041                         ;;
14042                 *) #(vi
14043                         case $cf_add_cflags in #(vi
14044                         -D*)
14045                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14046
14047 CPPFLAGS=`echo "$CPPFLAGS" | \
14048         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14049                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14050
14051                                 ;;
14052                         esac
14053                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14054                         ;;
14055                 esac
14056                 ;;
14057         *)
14058                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14059                 ;;
14060         esac
14061         ;;
14062 yes)
14063         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14064
14065         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14066
14067         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14068                 && test -z "${cf_tst_cflags}" \
14069                 && cf_fix_cppflags=no
14070         ;;
14071 esac
14072 done
14073
14074 if test -n "$cf_new_cflags" ; then
14075
14076         CFLAGS="$CFLAGS $cf_new_cflags"
14077 fi
14078
14079 if test -n "$cf_new_cppflags" ; then
14080
14081         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14082 fi
14083
14084 if test -n "$cf_new_extra_cppflags" ; then
14085
14086         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14087 fi
14088
14089 else
14090         LIB_TRACING=DEBUG
14091         ADA_TRACE=FALSE
14092 fi
14093
14094 echo "$as_me:14094: checking if we want to use GNAT projects" >&5
14095 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14096
14097 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14098 if test "${enable_gnat_projects+set}" = set; then
14099   enableval="$enable_gnat_projects"
14100   test "$enableval" != no && enableval=yes
14101   if test "$enableval" != "yes" ; then
14102     enable_gnat_projects=no
14103   else
14104     enable_gnat_projects=yes
14105   fi
14106 else
14107   enableval=yes
14108   enable_gnat_projects=yes
14109
14110 fi;
14111 echo "$as_me:14111: result: $enable_gnat_projects" >&5
14112 echo "${ECHO_T}$enable_gnat_projects" >&6
14113
14114 ###     Checks for libraries.
14115 case $cf_cv_system_name in #(vi
14116 *mingw32*|*mingw64*) #(vi
14117         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14118         LIBS=" -lpsapi $LIBS"
14119         ;;
14120 *)
14121 echo "$as_me:14121: checking for gettimeofday" >&5
14122 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14123 if test "${ac_cv_func_gettimeofday+set}" = set; then
14124   echo $ECHO_N "(cached) $ECHO_C" >&6
14125 else
14126   cat >conftest.$ac_ext <<_ACEOF
14127 #line 14127 "configure"
14128 #include "confdefs.h"
14129 /* System header to define __stub macros and hopefully few prototypes,
14130     which can conflict with char gettimeofday (); below.  */
14131 #include <assert.h>
14132 /* Override any gcc2 internal prototype to avoid an error.  */
14133 #ifdef __cplusplus
14134 extern "C"
14135 #endif
14136 /* We use char because int might match the return type of a gcc2
14137    builtin and then its argument prototype would still apply.  */
14138 char gettimeofday ();
14139 char (*f) ();
14140
14141 int
14142 main ()
14143 {
14144 /* The GNU C library defines this for functions which it implements
14145     to always fail with ENOSYS.  Some functions are actually named
14146     something starting with __ and the normal name is an alias.  */
14147 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14148 choke me
14149 #else
14150 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14151 #endif
14152
14153   ;
14154   return 0;
14155 }
14156 _ACEOF
14157 rm -f conftest.$ac_objext conftest$ac_exeext
14158 if { (eval echo "$as_me:14158: \"$ac_link\"") >&5
14159   (eval $ac_link) 2>&5
14160   ac_status=$?
14161   echo "$as_me:14161: \$? = $ac_status" >&5
14162   (exit $ac_status); } &&
14163          { ac_try='test -s conftest$ac_exeext'
14164   { (eval echo "$as_me:14164: \"$ac_try\"") >&5
14165   (eval $ac_try) 2>&5
14166   ac_status=$?
14167   echo "$as_me:14167: \$? = $ac_status" >&5
14168   (exit $ac_status); }; }; then
14169   ac_cv_func_gettimeofday=yes
14170 else
14171   echo "$as_me: failed program was:" >&5
14172 cat conftest.$ac_ext >&5
14173 ac_cv_func_gettimeofday=no
14174 fi
14175 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14176 fi
14177 echo "$as_me:14177: result: $ac_cv_func_gettimeofday" >&5
14178 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14179 if test $ac_cv_func_gettimeofday = yes; then
14180
14181 cat >>confdefs.h <<\EOF
14182 #define HAVE_GETTIMEOFDAY 1
14183 EOF
14184
14185 else
14186
14187 echo "$as_me:14187: checking for gettimeofday in -lbsd" >&5
14188 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14189 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14190   echo $ECHO_N "(cached) $ECHO_C" >&6
14191 else
14192   ac_check_lib_save_LIBS=$LIBS
14193 LIBS="-lbsd  $LIBS"
14194 cat >conftest.$ac_ext <<_ACEOF
14195 #line 14195 "configure"
14196 #include "confdefs.h"
14197
14198 /* Override any gcc2 internal prototype to avoid an error.  */
14199 #ifdef __cplusplus
14200 extern "C"
14201 #endif
14202 /* We use char because int might match the return type of a gcc2
14203    builtin and then its argument prototype would still apply.  */
14204 char gettimeofday ();
14205 int
14206 main ()
14207 {
14208 gettimeofday ();
14209   ;
14210   return 0;
14211 }
14212 _ACEOF
14213 rm -f conftest.$ac_objext conftest$ac_exeext
14214 if { (eval echo "$as_me:14214: \"$ac_link\"") >&5
14215   (eval $ac_link) 2>&5
14216   ac_status=$?
14217   echo "$as_me:14217: \$? = $ac_status" >&5
14218   (exit $ac_status); } &&
14219          { ac_try='test -s conftest$ac_exeext'
14220   { (eval echo "$as_me:14220: \"$ac_try\"") >&5
14221   (eval $ac_try) 2>&5
14222   ac_status=$?
14223   echo "$as_me:14223: \$? = $ac_status" >&5
14224   (exit $ac_status); }; }; then
14225   ac_cv_lib_bsd_gettimeofday=yes
14226 else
14227   echo "$as_me: failed program was:" >&5
14228 cat conftest.$ac_ext >&5
14229 ac_cv_lib_bsd_gettimeofday=no
14230 fi
14231 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14232 LIBS=$ac_check_lib_save_LIBS
14233 fi
14234 echo "$as_me:14234: result: $ac_cv_lib_bsd_gettimeofday" >&5
14235 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14236 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14237
14238 cat >>confdefs.h <<\EOF
14239 #define HAVE_GETTIMEOFDAY 1
14240 EOF
14241
14242 cf_add_libs="-lbsd"
14243 # Filter out duplicates - this happens with badly-designed ".pc" files...
14244 for cf_add_1lib in $LIBS
14245 do
14246         for cf_add_2lib in $cf_add_libs
14247         do
14248                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14249                 then
14250                         cf_add_1lib=
14251                         break
14252                 fi
14253         done
14254         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14255 done
14256 LIBS="$cf_add_libs"
14257
14258 fi
14259
14260 fi
14261         ;;
14262 esac
14263
14264 echo "$as_me:14264: checking if -lm needed for math functions" >&5
14265 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14266 if test "${cf_cv_need_libm+set}" = set; then
14267   echo $ECHO_N "(cached) $ECHO_C" >&6
14268 else
14269
14270         cat >conftest.$ac_ext <<_ACEOF
14271 #line 14271 "configure"
14272 #include "confdefs.h"
14273
14274         #include <stdio.h>
14275         #include <math.h>
14276
14277 int
14278 main ()
14279 {
14280 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14281   ;
14282   return 0;
14283 }
14284 _ACEOF
14285 rm -f conftest.$ac_objext conftest$ac_exeext
14286 if { (eval echo "$as_me:14286: \"$ac_link\"") >&5
14287   (eval $ac_link) 2>&5
14288   ac_status=$?
14289   echo "$as_me:14289: \$? = $ac_status" >&5
14290   (exit $ac_status); } &&
14291          { ac_try='test -s conftest$ac_exeext'
14292   { (eval echo "$as_me:14292: \"$ac_try\"") >&5
14293   (eval $ac_try) 2>&5
14294   ac_status=$?
14295   echo "$as_me:14295: \$? = $ac_status" >&5
14296   (exit $ac_status); }; }; then
14297   cf_cv_need_libm=no
14298 else
14299   echo "$as_me: failed program was:" >&5
14300 cat conftest.$ac_ext >&5
14301 cf_cv_need_libm=yes
14302 fi
14303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14304 fi
14305 echo "$as_me:14305: result: $cf_cv_need_libm" >&5
14306 echo "${ECHO_T}$cf_cv_need_libm" >&6
14307 if test "$cf_cv_need_libm" = yes
14308 then
14309 MATH_LIB=-lm
14310 fi
14311
14312 ###     Checks for header files.
14313 echo "$as_me:14313: checking for ANSI C header files" >&5
14314 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14315 if test "${ac_cv_header_stdc+set}" = set; then
14316   echo $ECHO_N "(cached) $ECHO_C" >&6
14317 else
14318   cat >conftest.$ac_ext <<_ACEOF
14319 #line 14319 "configure"
14320 #include "confdefs.h"
14321 #include <stdlib.h>
14322 #include <stdarg.h>
14323 #include <string.h>
14324 #include <float.h>
14325
14326 _ACEOF
14327 if { (eval echo "$as_me:14327: \"$ac_cpp conftest.$ac_ext\"") >&5
14328   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14329   ac_status=$?
14330   egrep -v '^ *\+' conftest.er1 >conftest.err
14331   rm -f conftest.er1
14332   cat conftest.err >&5
14333   echo "$as_me:14333: \$? = $ac_status" >&5
14334   (exit $ac_status); } >/dev/null; then
14335   if test -s conftest.err; then
14336     ac_cpp_err=$ac_c_preproc_warn_flag
14337   else
14338     ac_cpp_err=
14339   fi
14340 else
14341   ac_cpp_err=yes
14342 fi
14343 if test -z "$ac_cpp_err"; then
14344   ac_cv_header_stdc=yes
14345 else
14346   echo "$as_me: failed program was:" >&5
14347   cat conftest.$ac_ext >&5
14348   ac_cv_header_stdc=no
14349 fi
14350 rm -f conftest.err conftest.$ac_ext
14351
14352 if test $ac_cv_header_stdc = yes; then
14353   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14354   cat >conftest.$ac_ext <<_ACEOF
14355 #line 14355 "configure"
14356 #include "confdefs.h"
14357 #include <string.h>
14358
14359 _ACEOF
14360 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14361   egrep "memchr" >/dev/null 2>&1; then
14362   :
14363 else
14364   ac_cv_header_stdc=no
14365 fi
14366 rm -rf conftest*
14367
14368 fi
14369
14370 if test $ac_cv_header_stdc = yes; then
14371   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14372   cat >conftest.$ac_ext <<_ACEOF
14373 #line 14373 "configure"
14374 #include "confdefs.h"
14375 #include <stdlib.h>
14376
14377 _ACEOF
14378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14379   egrep "free" >/dev/null 2>&1; then
14380   :
14381 else
14382   ac_cv_header_stdc=no
14383 fi
14384 rm -rf conftest*
14385
14386 fi
14387
14388 if test $ac_cv_header_stdc = yes; then
14389   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14390   if test "$cross_compiling" = yes; then
14391   :
14392 else
14393   cat >conftest.$ac_ext <<_ACEOF
14394 #line 14394 "configure"
14395 #include "confdefs.h"
14396 #include <ctype.h>
14397 #if ((' ' & 0x0FF) == 0x020)
14398 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14399 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14400 #else
14401 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14402                      || ('j' <= (c) && (c) <= 'r') \
14403                      || ('s' <= (c) && (c) <= 'z'))
14404 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14405 #endif
14406
14407 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14408 int
14409 main ()
14410 {
14411   int i;
14412   for (i = 0; i < 256; i++)
14413     if (XOR (islower (i), ISLOWER (i))
14414         || toupper (i) != TOUPPER (i))
14415       $ac_main_return(2);
14416   $ac_main_return (0);
14417 }
14418 _ACEOF
14419 rm -f conftest$ac_exeext
14420 if { (eval echo "$as_me:14420: \"$ac_link\"") >&5
14421   (eval $ac_link) 2>&5
14422   ac_status=$?
14423   echo "$as_me:14423: \$? = $ac_status" >&5
14424   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14425   { (eval echo "$as_me:14425: \"$ac_try\"") >&5
14426   (eval $ac_try) 2>&5
14427   ac_status=$?
14428   echo "$as_me:14428: \$? = $ac_status" >&5
14429   (exit $ac_status); }; }; then
14430   :
14431 else
14432   echo "$as_me: program exited with status $ac_status" >&5
14433 echo "$as_me: failed program was:" >&5
14434 cat conftest.$ac_ext >&5
14435 ac_cv_header_stdc=no
14436 fi
14437 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14438 fi
14439 fi
14440 fi
14441 echo "$as_me:14441: result: $ac_cv_header_stdc" >&5
14442 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14443 if test $ac_cv_header_stdc = yes; then
14444
14445 cat >>confdefs.h <<\EOF
14446 #define STDC_HEADERS 1
14447 EOF
14448
14449 fi
14450
14451 ac_header_dirent=no
14452 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14453   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14454 echo "$as_me:14454: checking for $ac_hdr that defines DIR" >&5
14455 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14456 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14457   echo $ECHO_N "(cached) $ECHO_C" >&6
14458 else
14459   cat >conftest.$ac_ext <<_ACEOF
14460 #line 14460 "configure"
14461 #include "confdefs.h"
14462 #include <sys/types.h>
14463 #include <$ac_hdr>
14464
14465 int
14466 main ()
14467 {
14468 if ((DIR *) 0)
14469 return 0;
14470   ;
14471   return 0;
14472 }
14473 _ACEOF
14474 rm -f conftest.$ac_objext
14475 if { (eval echo "$as_me:14475: \"$ac_compile\"") >&5
14476   (eval $ac_compile) 2>&5
14477   ac_status=$?
14478   echo "$as_me:14478: \$? = $ac_status" >&5
14479   (exit $ac_status); } &&
14480          { ac_try='test -s conftest.$ac_objext'
14481   { (eval echo "$as_me:14481: \"$ac_try\"") >&5
14482   (eval $ac_try) 2>&5
14483   ac_status=$?
14484   echo "$as_me:14484: \$? = $ac_status" >&5
14485   (exit $ac_status); }; }; then
14486   eval "$as_ac_Header=yes"
14487 else
14488   echo "$as_me: failed program was:" >&5
14489 cat conftest.$ac_ext >&5
14490 eval "$as_ac_Header=no"
14491 fi
14492 rm -f conftest.$ac_objext conftest.$ac_ext
14493 fi
14494 echo "$as_me:14494: result: `eval echo '${'$as_ac_Header'}'`" >&5
14495 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14496 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14497   cat >>confdefs.h <<EOF
14498 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14499 EOF
14500
14501 ac_header_dirent=$ac_hdr; break
14502 fi
14503
14504 done
14505 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14506 if test $ac_header_dirent = dirent.h; then
14507   echo "$as_me:14507: checking for opendir in -ldir" >&5
14508 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14509 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14510   echo $ECHO_N "(cached) $ECHO_C" >&6
14511 else
14512   ac_check_lib_save_LIBS=$LIBS
14513 LIBS="-ldir  $LIBS"
14514 cat >conftest.$ac_ext <<_ACEOF
14515 #line 14515 "configure"
14516 #include "confdefs.h"
14517
14518 /* Override any gcc2 internal prototype to avoid an error.  */
14519 #ifdef __cplusplus
14520 extern "C"
14521 #endif
14522 /* We use char because int might match the return type of a gcc2
14523    builtin and then its argument prototype would still apply.  */
14524 char opendir ();
14525 int
14526 main ()
14527 {
14528 opendir ();
14529   ;
14530   return 0;
14531 }
14532 _ACEOF
14533 rm -f conftest.$ac_objext conftest$ac_exeext
14534 if { (eval echo "$as_me:14534: \"$ac_link\"") >&5
14535   (eval $ac_link) 2>&5
14536   ac_status=$?
14537   echo "$as_me:14537: \$? = $ac_status" >&5
14538   (exit $ac_status); } &&
14539          { ac_try='test -s conftest$ac_exeext'
14540   { (eval echo "$as_me:14540: \"$ac_try\"") >&5
14541   (eval $ac_try) 2>&5
14542   ac_status=$?
14543   echo "$as_me:14543: \$? = $ac_status" >&5
14544   (exit $ac_status); }; }; then
14545   ac_cv_lib_dir_opendir=yes
14546 else
14547   echo "$as_me: failed program was:" >&5
14548 cat conftest.$ac_ext >&5
14549 ac_cv_lib_dir_opendir=no
14550 fi
14551 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14552 LIBS=$ac_check_lib_save_LIBS
14553 fi
14554 echo "$as_me:14554: result: $ac_cv_lib_dir_opendir" >&5
14555 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14556 if test $ac_cv_lib_dir_opendir = yes; then
14557   LIBS="$LIBS -ldir"
14558 fi
14559
14560 else
14561   echo "$as_me:14561: checking for opendir in -lx" >&5
14562 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14563 if test "${ac_cv_lib_x_opendir+set}" = set; then
14564   echo $ECHO_N "(cached) $ECHO_C" >&6
14565 else
14566   ac_check_lib_save_LIBS=$LIBS
14567 LIBS="-lx  $LIBS"
14568 cat >conftest.$ac_ext <<_ACEOF
14569 #line 14569 "configure"
14570 #include "confdefs.h"
14571
14572 /* Override any gcc2 internal prototype to avoid an error.  */
14573 #ifdef __cplusplus
14574 extern "C"
14575 #endif
14576 /* We use char because int might match the return type of a gcc2
14577    builtin and then its argument prototype would still apply.  */
14578 char opendir ();
14579 int
14580 main ()
14581 {
14582 opendir ();
14583   ;
14584   return 0;
14585 }
14586 _ACEOF
14587 rm -f conftest.$ac_objext conftest$ac_exeext
14588 if { (eval echo "$as_me:14588: \"$ac_link\"") >&5
14589   (eval $ac_link) 2>&5
14590   ac_status=$?
14591   echo "$as_me:14591: \$? = $ac_status" >&5
14592   (exit $ac_status); } &&
14593          { ac_try='test -s conftest$ac_exeext'
14594   { (eval echo "$as_me:14594: \"$ac_try\"") >&5
14595   (eval $ac_try) 2>&5
14596   ac_status=$?
14597   echo "$as_me:14597: \$? = $ac_status" >&5
14598   (exit $ac_status); }; }; then
14599   ac_cv_lib_x_opendir=yes
14600 else
14601   echo "$as_me: failed program was:" >&5
14602 cat conftest.$ac_ext >&5
14603 ac_cv_lib_x_opendir=no
14604 fi
14605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14606 LIBS=$ac_check_lib_save_LIBS
14607 fi
14608 echo "$as_me:14608: result: $ac_cv_lib_x_opendir" >&5
14609 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14610 if test $ac_cv_lib_x_opendir = yes; then
14611   LIBS="$LIBS -lx"
14612 fi
14613
14614 fi
14615
14616 echo "$as_me:14616: checking whether time.h and sys/time.h may both be included" >&5
14617 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14618 if test "${ac_cv_header_time+set}" = set; then
14619   echo $ECHO_N "(cached) $ECHO_C" >&6
14620 else
14621   cat >conftest.$ac_ext <<_ACEOF
14622 #line 14622 "configure"
14623 #include "confdefs.h"
14624 #include <sys/types.h>
14625 #include <sys/time.h>
14626 #include <time.h>
14627
14628 int
14629 main ()
14630 {
14631 if ((struct tm *) 0)
14632 return 0;
14633   ;
14634   return 0;
14635 }
14636 _ACEOF
14637 rm -f conftest.$ac_objext
14638 if { (eval echo "$as_me:14638: \"$ac_compile\"") >&5
14639   (eval $ac_compile) 2>&5
14640   ac_status=$?
14641   echo "$as_me:14641: \$? = $ac_status" >&5
14642   (exit $ac_status); } &&
14643          { ac_try='test -s conftest.$ac_objext'
14644   { (eval echo "$as_me:14644: \"$ac_try\"") >&5
14645   (eval $ac_try) 2>&5
14646   ac_status=$?
14647   echo "$as_me:14647: \$? = $ac_status" >&5
14648   (exit $ac_status); }; }; then
14649   ac_cv_header_time=yes
14650 else
14651   echo "$as_me: failed program was:" >&5
14652 cat conftest.$ac_ext >&5
14653 ac_cv_header_time=no
14654 fi
14655 rm -f conftest.$ac_objext conftest.$ac_ext
14656 fi
14657 echo "$as_me:14657: result: $ac_cv_header_time" >&5
14658 echo "${ECHO_T}$ac_cv_header_time" >&6
14659 if test $ac_cv_header_time = yes; then
14660
14661 cat >>confdefs.h <<\EOF
14662 #define TIME_WITH_SYS_TIME 1
14663 EOF
14664
14665 fi
14666
14667 cf_regex_func=no
14668
14669 cf_regex_libs="regex re"
14670 case $host_os in #(vi
14671 mingw*)
14672         cf_regex_libs="gnurx $cf_regex_libs"
14673         ;;
14674 esac
14675
14676 echo "$as_me:14676: checking for regcomp" >&5
14677 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14678 if test "${ac_cv_func_regcomp+set}" = set; then
14679   echo $ECHO_N "(cached) $ECHO_C" >&6
14680 else
14681   cat >conftest.$ac_ext <<_ACEOF
14682 #line 14682 "configure"
14683 #include "confdefs.h"
14684 /* System header to define __stub macros and hopefully few prototypes,
14685     which can conflict with char regcomp (); below.  */
14686 #include <assert.h>
14687 /* Override any gcc2 internal prototype to avoid an error.  */
14688 #ifdef __cplusplus
14689 extern "C"
14690 #endif
14691 /* We use char because int might match the return type of a gcc2
14692    builtin and then its argument prototype would still apply.  */
14693 char regcomp ();
14694 char (*f) ();
14695
14696 int
14697 main ()
14698 {
14699 /* The GNU C library defines this for functions which it implements
14700     to always fail with ENOSYS.  Some functions are actually named
14701     something starting with __ and the normal name is an alias.  */
14702 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14703 choke me
14704 #else
14705 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14706 #endif
14707
14708   ;
14709   return 0;
14710 }
14711 _ACEOF
14712 rm -f conftest.$ac_objext conftest$ac_exeext
14713 if { (eval echo "$as_me:14713: \"$ac_link\"") >&5
14714   (eval $ac_link) 2>&5
14715   ac_status=$?
14716   echo "$as_me:14716: \$? = $ac_status" >&5
14717   (exit $ac_status); } &&
14718          { ac_try='test -s conftest$ac_exeext'
14719   { (eval echo "$as_me:14719: \"$ac_try\"") >&5
14720   (eval $ac_try) 2>&5
14721   ac_status=$?
14722   echo "$as_me:14722: \$? = $ac_status" >&5
14723   (exit $ac_status); }; }; then
14724   ac_cv_func_regcomp=yes
14725 else
14726   echo "$as_me: failed program was:" >&5
14727 cat conftest.$ac_ext >&5
14728 ac_cv_func_regcomp=no
14729 fi
14730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14731 fi
14732 echo "$as_me:14732: result: $ac_cv_func_regcomp" >&5
14733 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14734 if test $ac_cv_func_regcomp = yes; then
14735   cf_regex_func=regcomp
14736 else
14737
14738         for cf_regex_lib in $cf_regex_libs
14739         do
14740                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14741 echo "$as_me:14741: checking for regcomp in -l$cf_regex_lib" >&5
14742 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14743 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14744   echo $ECHO_N "(cached) $ECHO_C" >&6
14745 else
14746   ac_check_lib_save_LIBS=$LIBS
14747 LIBS="-l$cf_regex_lib  $LIBS"
14748 cat >conftest.$ac_ext <<_ACEOF
14749 #line 14749 "configure"
14750 #include "confdefs.h"
14751
14752 /* Override any gcc2 internal prototype to avoid an error.  */
14753 #ifdef __cplusplus
14754 extern "C"
14755 #endif
14756 /* We use char because int might match the return type of a gcc2
14757    builtin and then its argument prototype would still apply.  */
14758 char regcomp ();
14759 int
14760 main ()
14761 {
14762 regcomp ();
14763   ;
14764   return 0;
14765 }
14766 _ACEOF
14767 rm -f conftest.$ac_objext conftest$ac_exeext
14768 if { (eval echo "$as_me:14768: \"$ac_link\"") >&5
14769   (eval $ac_link) 2>&5
14770   ac_status=$?
14771   echo "$as_me:14771: \$? = $ac_status" >&5
14772   (exit $ac_status); } &&
14773          { ac_try='test -s conftest$ac_exeext'
14774   { (eval echo "$as_me:14774: \"$ac_try\"") >&5
14775   (eval $ac_try) 2>&5
14776   ac_status=$?
14777   echo "$as_me:14777: \$? = $ac_status" >&5
14778   (exit $ac_status); }; }; then
14779   eval "$as_ac_Lib=yes"
14780 else
14781   echo "$as_me: failed program was:" >&5
14782 cat conftest.$ac_ext >&5
14783 eval "$as_ac_Lib=no"
14784 fi
14785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14786 LIBS=$ac_check_lib_save_LIBS
14787 fi
14788 echo "$as_me:14788: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14789 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14790 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14791
14792 cf_add_libs="-l$cf_regex_lib"
14793 # Filter out duplicates - this happens with badly-designed ".pc" files...
14794 for cf_add_1lib in $LIBS
14795 do
14796         for cf_add_2lib in $cf_add_libs
14797         do
14798                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14799                 then
14800                         cf_add_1lib=
14801                         break
14802                 fi
14803         done
14804         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14805 done
14806 LIBS="$cf_add_libs"
14807
14808                                 cf_regex_func=regcomp
14809                                 break
14810 fi
14811
14812         done
14813
14814 fi
14815
14816 if test "$cf_regex_func" = no ; then
14817         echo "$as_me:14817: checking for compile" >&5
14818 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14819 if test "${ac_cv_func_compile+set}" = set; then
14820   echo $ECHO_N "(cached) $ECHO_C" >&6
14821 else
14822   cat >conftest.$ac_ext <<_ACEOF
14823 #line 14823 "configure"
14824 #include "confdefs.h"
14825 /* System header to define __stub macros and hopefully few prototypes,
14826     which can conflict with char compile (); below.  */
14827 #include <assert.h>
14828 /* Override any gcc2 internal prototype to avoid an error.  */
14829 #ifdef __cplusplus
14830 extern "C"
14831 #endif
14832 /* We use char because int might match the return type of a gcc2
14833    builtin and then its argument prototype would still apply.  */
14834 char compile ();
14835 char (*f) ();
14836
14837 int
14838 main ()
14839 {
14840 /* The GNU C library defines this for functions which it implements
14841     to always fail with ENOSYS.  Some functions are actually named
14842     something starting with __ and the normal name is an alias.  */
14843 #if defined (__stub_compile) || defined (__stub___compile)
14844 choke me
14845 #else
14846 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14847 #endif
14848
14849   ;
14850   return 0;
14851 }
14852 _ACEOF
14853 rm -f conftest.$ac_objext conftest$ac_exeext
14854 if { (eval echo "$as_me:14854: \"$ac_link\"") >&5
14855   (eval $ac_link) 2>&5
14856   ac_status=$?
14857   echo "$as_me:14857: \$? = $ac_status" >&5
14858   (exit $ac_status); } &&
14859          { ac_try='test -s conftest$ac_exeext'
14860   { (eval echo "$as_me:14860: \"$ac_try\"") >&5
14861   (eval $ac_try) 2>&5
14862   ac_status=$?
14863   echo "$as_me:14863: \$? = $ac_status" >&5
14864   (exit $ac_status); }; }; then
14865   ac_cv_func_compile=yes
14866 else
14867   echo "$as_me: failed program was:" >&5
14868 cat conftest.$ac_ext >&5
14869 ac_cv_func_compile=no
14870 fi
14871 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14872 fi
14873 echo "$as_me:14873: result: $ac_cv_func_compile" >&5
14874 echo "${ECHO_T}$ac_cv_func_compile" >&6
14875 if test $ac_cv_func_compile = yes; then
14876   cf_regex_func=compile
14877 else
14878
14879                 echo "$as_me:14879: checking for compile in -lgen" >&5
14880 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14881 if test "${ac_cv_lib_gen_compile+set}" = set; then
14882   echo $ECHO_N "(cached) $ECHO_C" >&6
14883 else
14884   ac_check_lib_save_LIBS=$LIBS
14885 LIBS="-lgen  $LIBS"
14886 cat >conftest.$ac_ext <<_ACEOF
14887 #line 14887 "configure"
14888 #include "confdefs.h"
14889
14890 /* Override any gcc2 internal prototype to avoid an error.  */
14891 #ifdef __cplusplus
14892 extern "C"
14893 #endif
14894 /* We use char because int might match the return type of a gcc2
14895    builtin and then its argument prototype would still apply.  */
14896 char compile ();
14897 int
14898 main ()
14899 {
14900 compile ();
14901   ;
14902   return 0;
14903 }
14904 _ACEOF
14905 rm -f conftest.$ac_objext conftest$ac_exeext
14906 if { (eval echo "$as_me:14906: \"$ac_link\"") >&5
14907   (eval $ac_link) 2>&5
14908   ac_status=$?
14909   echo "$as_me:14909: \$? = $ac_status" >&5
14910   (exit $ac_status); } &&
14911          { ac_try='test -s conftest$ac_exeext'
14912   { (eval echo "$as_me:14912: \"$ac_try\"") >&5
14913   (eval $ac_try) 2>&5
14914   ac_status=$?
14915   echo "$as_me:14915: \$? = $ac_status" >&5
14916   (exit $ac_status); }; }; then
14917   ac_cv_lib_gen_compile=yes
14918 else
14919   echo "$as_me: failed program was:" >&5
14920 cat conftest.$ac_ext >&5
14921 ac_cv_lib_gen_compile=no
14922 fi
14923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14924 LIBS=$ac_check_lib_save_LIBS
14925 fi
14926 echo "$as_me:14926: result: $ac_cv_lib_gen_compile" >&5
14927 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14928 if test $ac_cv_lib_gen_compile = yes; then
14929
14930 cf_add_libs="-lgen"
14931 # Filter out duplicates - this happens with badly-designed ".pc" files...
14932 for cf_add_1lib in $LIBS
14933 do
14934         for cf_add_2lib in $cf_add_libs
14935         do
14936                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14937                 then
14938                         cf_add_1lib=
14939                         break
14940                 fi
14941         done
14942         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14943 done
14944 LIBS="$cf_add_libs"
14945
14946                                 cf_regex_func=compile
14947 fi
14948
14949 fi
14950
14951 fi
14952
14953 if test "$cf_regex_func" = no ; then
14954         { echo "$as_me:14954: WARNING: cannot find regular expression library" >&5
14955 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14956 fi
14957
14958 echo "$as_me:14958: checking for regular-expression headers" >&5
14959 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14960 if test "${cf_cv_regex_hdrs+set}" = set; then
14961   echo $ECHO_N "(cached) $ECHO_C" >&6
14962 else
14963
14964 cf_cv_regex_hdrs=no
14965 case $cf_regex_func in #(vi
14966 compile) #(vi
14967         for cf_regex_hdr in regexp.h regexpr.h
14968         do
14969                 cat >conftest.$ac_ext <<_ACEOF
14970 #line 14970 "configure"
14971 #include "confdefs.h"
14972 #include <$cf_regex_hdr>
14973 int
14974 main ()
14975 {
14976
14977                         char *p = compile("", "", "", 0);
14978                         int x = step("", "");
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 *)
15008         for cf_regex_hdr in regex.h
15009         do
15010                 cat >conftest.$ac_ext <<_ACEOF
15011 #line 15011 "configure"
15012 #include "confdefs.h"
15013 #include <sys/types.h>
15014 #include <$cf_regex_hdr>
15015 int
15016 main ()
15017 {
15018
15019                         regex_t *p;
15020                         int x = regcomp(p, "", 0);
15021                         int y = regexec(p, "", 0, 0, 0);
15022                         regfree(p);
15023
15024   ;
15025   return 0;
15026 }
15027 _ACEOF
15028 rm -f conftest.$ac_objext conftest$ac_exeext
15029 if { (eval echo "$as_me:15029: \"$ac_link\"") >&5
15030   (eval $ac_link) 2>&5
15031   ac_status=$?
15032   echo "$as_me:15032: \$? = $ac_status" >&5
15033   (exit $ac_status); } &&
15034          { ac_try='test -s conftest$ac_exeext'
15035   { (eval echo "$as_me:15035: \"$ac_try\"") >&5
15036   (eval $ac_try) 2>&5
15037   ac_status=$?
15038   echo "$as_me:15038: \$? = $ac_status" >&5
15039   (exit $ac_status); }; }; then
15040
15041                         cf_cv_regex_hdrs=$cf_regex_hdr
15042                         break
15043
15044 else
15045   echo "$as_me: failed program was:" >&5
15046 cat conftest.$ac_ext >&5
15047 fi
15048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15049         done
15050         ;;
15051 esac
15052
15053 fi
15054 echo "$as_me:15054: result: $cf_cv_regex_hdrs" >&5
15055 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15056
15057 case $cf_cv_regex_hdrs in #(vi
15058     no)        { echo "$as_me:15058: WARNING: no regular expression header found" >&5
15059 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
15060     regex.h)
15061 cat >>confdefs.h <<\EOF
15062 #define HAVE_REGEX_H_FUNCS 1
15063 EOF
15064  ;; #(vi
15065     regexp.h)
15066 cat >>confdefs.h <<\EOF
15067 #define HAVE_REGEXP_H_FUNCS 1
15068 EOF
15069  ;; #(vi
15070     regexpr.h)
15071 cat >>confdefs.h <<\EOF
15072 #define HAVE_REGEXPR_H_FUNCS 1
15073 EOF
15074  ;;
15075 esac
15076
15077 for ac_header in \
15078 fcntl.h \
15079 getopt.h \
15080 limits.h \
15081 locale.h \
15082 math.h \
15083 poll.h \
15084 sys/bsdtypes.h \
15085 sys/ioctl.h \
15086 sys/param.h \
15087 sys/poll.h \
15088 sys/select.h \
15089 sys/time.h \
15090 sys/times.h \
15091 ttyent.h \
15092 unistd.h \
15093 wctype.h \
15094
15095 do
15096 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15097 echo "$as_me:15097: checking for $ac_header" >&5
15098 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15099 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15100   echo $ECHO_N "(cached) $ECHO_C" >&6
15101 else
15102   cat >conftest.$ac_ext <<_ACEOF
15103 #line 15103 "configure"
15104 #include "confdefs.h"
15105 #include <$ac_header>
15106 _ACEOF
15107 if { (eval echo "$as_me:15107: \"$ac_cpp conftest.$ac_ext\"") >&5
15108   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15109   ac_status=$?
15110   egrep -v '^ *\+' conftest.er1 >conftest.err
15111   rm -f conftest.er1
15112   cat conftest.err >&5
15113   echo "$as_me:15113: \$? = $ac_status" >&5
15114   (exit $ac_status); } >/dev/null; then
15115   if test -s conftest.err; then
15116     ac_cpp_err=$ac_c_preproc_warn_flag
15117   else
15118     ac_cpp_err=
15119   fi
15120 else
15121   ac_cpp_err=yes
15122 fi
15123 if test -z "$ac_cpp_err"; then
15124   eval "$as_ac_Header=yes"
15125 else
15126   echo "$as_me: failed program was:" >&5
15127   cat conftest.$ac_ext >&5
15128   eval "$as_ac_Header=no"
15129 fi
15130 rm -f conftest.err conftest.$ac_ext
15131 fi
15132 echo "$as_me:15132: result: `eval echo '${'$as_ac_Header'}'`" >&5
15133 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15134 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15135   cat >>confdefs.h <<EOF
15136 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15137 EOF
15138
15139 fi
15140 done
15141
15142 for ac_header in unistd.h getopt.h
15143 do
15144 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15145 echo "$as_me:15145: checking for $ac_header" >&5
15146 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15147 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15148   echo $ECHO_N "(cached) $ECHO_C" >&6
15149 else
15150   cat >conftest.$ac_ext <<_ACEOF
15151 #line 15151 "configure"
15152 #include "confdefs.h"
15153 #include <$ac_header>
15154 _ACEOF
15155 if { (eval echo "$as_me:15155: \"$ac_cpp conftest.$ac_ext\"") >&5
15156   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15157   ac_status=$?
15158   egrep -v '^ *\+' conftest.er1 >conftest.err
15159   rm -f conftest.er1
15160   cat conftest.err >&5
15161   echo "$as_me:15161: \$? = $ac_status" >&5
15162   (exit $ac_status); } >/dev/null; then
15163   if test -s conftest.err; then
15164     ac_cpp_err=$ac_c_preproc_warn_flag
15165   else
15166     ac_cpp_err=
15167   fi
15168 else
15169   ac_cpp_err=yes
15170 fi
15171 if test -z "$ac_cpp_err"; then
15172   eval "$as_ac_Header=yes"
15173 else
15174   echo "$as_me: failed program was:" >&5
15175   cat conftest.$ac_ext >&5
15176   eval "$as_ac_Header=no"
15177 fi
15178 rm -f conftest.err conftest.$ac_ext
15179 fi
15180 echo "$as_me:15180: result: `eval echo '${'$as_ac_Header'}'`" >&5
15181 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15182 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15183   cat >>confdefs.h <<EOF
15184 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15185 EOF
15186
15187 fi
15188 done
15189
15190 echo "$as_me:15190: checking for header declaring getopt variables" >&5
15191 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15192 if test "${cf_cv_getopt_header+set}" = set; then
15193   echo $ECHO_N "(cached) $ECHO_C" >&6
15194 else
15195
15196 cf_cv_getopt_header=none
15197 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15198 do
15199 cat >conftest.$ac_ext <<_ACEOF
15200 #line 15200 "configure"
15201 #include "confdefs.h"
15202
15203 #include <$cf_header>
15204 int
15205 main ()
15206 {
15207 int x = optind; char *y = optarg
15208   ;
15209   return 0;
15210 }
15211 _ACEOF
15212 rm -f conftest.$ac_objext
15213 if { (eval echo "$as_me:15213: \"$ac_compile\"") >&5
15214   (eval $ac_compile) 2>&5
15215   ac_status=$?
15216   echo "$as_me:15216: \$? = $ac_status" >&5
15217   (exit $ac_status); } &&
15218          { ac_try='test -s conftest.$ac_objext'
15219   { (eval echo "$as_me:15219: \"$ac_try\"") >&5
15220   (eval $ac_try) 2>&5
15221   ac_status=$?
15222   echo "$as_me:15222: \$? = $ac_status" >&5
15223   (exit $ac_status); }; }; then
15224   cf_cv_getopt_header=$cf_header
15225  break
15226 else
15227   echo "$as_me: failed program was:" >&5
15228 cat conftest.$ac_ext >&5
15229 fi
15230 rm -f conftest.$ac_objext conftest.$ac_ext
15231 done
15232
15233 fi
15234 echo "$as_me:15234: result: $cf_cv_getopt_header" >&5
15235 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15236 if test $cf_cv_getopt_header != none ; then
15237
15238 cat >>confdefs.h <<\EOF
15239 #define HAVE_GETOPT_HEADER 1
15240 EOF
15241
15242 fi
15243 if test $cf_cv_getopt_header = getopt.h ; then
15244
15245 cat >>confdefs.h <<\EOF
15246 #define NEED_GETOPT_H 1
15247 EOF
15248
15249 fi
15250
15251 # check for ISC (this may also define _POSIX_SOURCE)
15252 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15253 if test "x$ISC" = xyes ; then
15254
15255 echo "$as_me:15255: checking for main in -lcposix" >&5
15256 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15257 if test "${ac_cv_lib_cposix_main+set}" = set; then
15258   echo $ECHO_N "(cached) $ECHO_C" >&6
15259 else
15260   ac_check_lib_save_LIBS=$LIBS
15261 LIBS="-lcposix  $LIBS"
15262 cat >conftest.$ac_ext <<_ACEOF
15263 #line 15263 "configure"
15264 #include "confdefs.h"
15265
15266 int
15267 main ()
15268 {
15269 main ();
15270   ;
15271   return 0;
15272 }
15273 _ACEOF
15274 rm -f conftest.$ac_objext conftest$ac_exeext
15275 if { (eval echo "$as_me:15275: \"$ac_link\"") >&5
15276   (eval $ac_link) 2>&5
15277   ac_status=$?
15278   echo "$as_me:15278: \$? = $ac_status" >&5
15279   (exit $ac_status); } &&
15280          { ac_try='test -s conftest$ac_exeext'
15281   { (eval echo "$as_me:15281: \"$ac_try\"") >&5
15282   (eval $ac_try) 2>&5
15283   ac_status=$?
15284   echo "$as_me:15284: \$? = $ac_status" >&5
15285   (exit $ac_status); }; }; then
15286   ac_cv_lib_cposix_main=yes
15287 else
15288   echo "$as_me: failed program was:" >&5
15289 cat conftest.$ac_ext >&5
15290 ac_cv_lib_cposix_main=no
15291 fi
15292 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15293 LIBS=$ac_check_lib_save_LIBS
15294 fi
15295 echo "$as_me:15295: result: $ac_cv_lib_cposix_main" >&5
15296 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15297 if test $ac_cv_lib_cposix_main = yes; then
15298   cat >>confdefs.h <<EOF
15299 #define HAVE_LIBCPOSIX 1
15300 EOF
15301
15302   LIBS="-lcposix $LIBS"
15303
15304 fi
15305
15306         echo "$as_me:15306: checking for bzero in -linet" >&5
15307 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15308 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15309   echo $ECHO_N "(cached) $ECHO_C" >&6
15310 else
15311   ac_check_lib_save_LIBS=$LIBS
15312 LIBS="-linet  $LIBS"
15313 cat >conftest.$ac_ext <<_ACEOF
15314 #line 15314 "configure"
15315 #include "confdefs.h"
15316
15317 /* Override any gcc2 internal prototype to avoid an error.  */
15318 #ifdef __cplusplus
15319 extern "C"
15320 #endif
15321 /* We use char because int might match the return type of a gcc2
15322    builtin and then its argument prototype would still apply.  */
15323 char bzero ();
15324 int
15325 main ()
15326 {
15327 bzero ();
15328   ;
15329   return 0;
15330 }
15331 _ACEOF
15332 rm -f conftest.$ac_objext conftest$ac_exeext
15333 if { (eval echo "$as_me:15333: \"$ac_link\"") >&5
15334   (eval $ac_link) 2>&5
15335   ac_status=$?
15336   echo "$as_me:15336: \$? = $ac_status" >&5
15337   (exit $ac_status); } &&
15338          { ac_try='test -s conftest$ac_exeext'
15339   { (eval echo "$as_me:15339: \"$ac_try\"") >&5
15340   (eval $ac_try) 2>&5
15341   ac_status=$?
15342   echo "$as_me:15342: \$? = $ac_status" >&5
15343   (exit $ac_status); }; }; then
15344   ac_cv_lib_inet_bzero=yes
15345 else
15346   echo "$as_me: failed program was:" >&5
15347 cat conftest.$ac_ext >&5
15348 ac_cv_lib_inet_bzero=no
15349 fi
15350 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15351 LIBS=$ac_check_lib_save_LIBS
15352 fi
15353 echo "$as_me:15353: result: $ac_cv_lib_inet_bzero" >&5
15354 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15355 if test $ac_cv_lib_inet_bzero = yes; then
15356
15357 cf_add_libs="-linet"
15358 # Filter out duplicates - this happens with badly-designed ".pc" files...
15359 for cf_add_1lib in $LIBS
15360 do
15361         for cf_add_2lib in $cf_add_libs
15362         do
15363                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15364                 then
15365                         cf_add_1lib=
15366                         break
15367                 fi
15368         done
15369         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15370 done
15371 LIBS="$cf_add_libs"
15372
15373 fi
15374 fi
15375
15376 echo "$as_me:15376: checking if sys/time.h works with sys/select.h" >&5
15377 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15378 if test "${cf_cv_sys_time_select+set}" = set; then
15379   echo $ECHO_N "(cached) $ECHO_C" >&6
15380 else
15381
15382 cat >conftest.$ac_ext <<_ACEOF
15383 #line 15383 "configure"
15384 #include "confdefs.h"
15385
15386 #include <sys/types.h>
15387 #ifdef HAVE_SYS_TIME_H
15388 #include <sys/time.h>
15389 #endif
15390 #ifdef HAVE_SYS_SELECT_H
15391 #include <sys/select.h>
15392 #endif
15393
15394 int
15395 main ()
15396 {
15397
15398   ;
15399   return 0;
15400 }
15401 _ACEOF
15402 rm -f conftest.$ac_objext
15403 if { (eval echo "$as_me:15403: \"$ac_compile\"") >&5
15404   (eval $ac_compile) 2>&5
15405   ac_status=$?
15406   echo "$as_me:15406: \$? = $ac_status" >&5
15407   (exit $ac_status); } &&
15408          { ac_try='test -s conftest.$ac_objext'
15409   { (eval echo "$as_me:15409: \"$ac_try\"") >&5
15410   (eval $ac_try) 2>&5
15411   ac_status=$?
15412   echo "$as_me:15412: \$? = $ac_status" >&5
15413   (exit $ac_status); }; }; then
15414   cf_cv_sys_time_select=yes
15415 else
15416   echo "$as_me: failed program was:" >&5
15417 cat conftest.$ac_ext >&5
15418 cf_cv_sys_time_select=no
15419 fi
15420 rm -f conftest.$ac_objext conftest.$ac_ext
15421
15422 fi
15423
15424 echo "$as_me:15424: result: $cf_cv_sys_time_select" >&5
15425 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15426 test "$cf_cv_sys_time_select" = yes &&
15427 cat >>confdefs.h <<\EOF
15428 #define HAVE_SYS_TIME_SELECT 1
15429 EOF
15430
15431 ###     checks for compiler characteristics
15432 ac_ext=c
15433 ac_cpp='$CPP $CPPFLAGS'
15434 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15435 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15436 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15437 ac_main_return=return
15438
15439 echo "$as_me:15439: checking for an ANSI C-conforming const" >&5
15440 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15441 if test "${ac_cv_c_const+set}" = set; then
15442   echo $ECHO_N "(cached) $ECHO_C" >&6
15443 else
15444   cat >conftest.$ac_ext <<_ACEOF
15445 #line 15445 "configure"
15446 #include "confdefs.h"
15447
15448 int
15449 main ()
15450 {
15451 /* FIXME: Include the comments suggested by Paul. */
15452 #ifndef __cplusplus
15453   /* Ultrix mips cc rejects this.  */
15454   typedef int charset[2];
15455   const charset x;
15456   /* SunOS 4.1.1 cc rejects this.  */
15457   char const *const *ccp;
15458   char **p;
15459   /* NEC SVR4.0.2 mips cc rejects this.  */
15460   struct point {int x, y;};
15461   static struct point const zero = {0,0};
15462   /* AIX XL C 1.02.0.0 rejects this.
15463      It does not let you subtract one const X* pointer from another in
15464      an arm of an if-expression whose if-part is not a constant
15465      expression */
15466   const char *g = "string";
15467   ccp = &g + (g ? g-g : 0);
15468   /* HPUX 7.0 cc rejects these. */
15469   ++ccp;
15470   p = (char**) ccp;
15471   ccp = (char const *const *) p;
15472   { /* SCO 3.2v4 cc rejects this.  */
15473     char *t;
15474     char const *s = 0 ? (char *) 0 : (char const *) 0;
15475
15476     *t++ = 0;
15477   }
15478   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15479     int x[] = {25, 17};
15480     const int *foo = &x[0];
15481     ++foo;
15482   }
15483   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15484     typedef const int *iptr;
15485     iptr p = 0;
15486     ++p;
15487   }
15488   { /* AIX XL C 1.02.0.0 rejects this saying
15489        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15490     struct s { int j; const int *ap[3]; };
15491     struct s *b; b->j = 5;
15492   }
15493   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15494     const int foo = 10;
15495   }
15496 #endif
15497
15498   ;
15499   return 0;
15500 }
15501 _ACEOF
15502 rm -f conftest.$ac_objext
15503 if { (eval echo "$as_me:15503: \"$ac_compile\"") >&5
15504   (eval $ac_compile) 2>&5
15505   ac_status=$?
15506   echo "$as_me:15506: \$? = $ac_status" >&5
15507   (exit $ac_status); } &&
15508          { ac_try='test -s conftest.$ac_objext'
15509   { (eval echo "$as_me:15509: \"$ac_try\"") >&5
15510   (eval $ac_try) 2>&5
15511   ac_status=$?
15512   echo "$as_me:15512: \$? = $ac_status" >&5
15513   (exit $ac_status); }; }; then
15514   ac_cv_c_const=yes
15515 else
15516   echo "$as_me: failed program was:" >&5
15517 cat conftest.$ac_ext >&5
15518 ac_cv_c_const=no
15519 fi
15520 rm -f conftest.$ac_objext conftest.$ac_ext
15521 fi
15522 echo "$as_me:15522: result: $ac_cv_c_const" >&5
15523 echo "${ECHO_T}$ac_cv_c_const" >&6
15524 if test $ac_cv_c_const = no; then
15525
15526 cat >>confdefs.h <<\EOF
15527 #define const
15528 EOF
15529
15530 fi
15531
15532 echo "$as_me:15532: checking for inline" >&5
15533 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15534 if test "${ac_cv_c_inline+set}" = set; then
15535   echo $ECHO_N "(cached) $ECHO_C" >&6
15536 else
15537   ac_cv_c_inline=no
15538 for ac_kw in inline __inline__ __inline; do
15539   cat >conftest.$ac_ext <<_ACEOF
15540 #line 15540 "configure"
15541 #include "confdefs.h"
15542 #ifndef __cplusplus
15543 static $ac_kw int static_foo () {return 0; }
15544 $ac_kw int foo () {return 0; }
15545 #endif
15546
15547 _ACEOF
15548 rm -f conftest.$ac_objext
15549 if { (eval echo "$as_me:15549: \"$ac_compile\"") >&5
15550   (eval $ac_compile) 2>&5
15551   ac_status=$?
15552   echo "$as_me:15552: \$? = $ac_status" >&5
15553   (exit $ac_status); } &&
15554          { ac_try='test -s conftest.$ac_objext'
15555   { (eval echo "$as_me:15555: \"$ac_try\"") >&5
15556   (eval $ac_try) 2>&5
15557   ac_status=$?
15558   echo "$as_me:15558: \$? = $ac_status" >&5
15559   (exit $ac_status); }; }; then
15560   ac_cv_c_inline=$ac_kw; break
15561 else
15562   echo "$as_me: failed program was:" >&5
15563 cat conftest.$ac_ext >&5
15564 fi
15565 rm -f conftest.$ac_objext conftest.$ac_ext
15566 done
15567
15568 fi
15569 echo "$as_me:15569: result: $ac_cv_c_inline" >&5
15570 echo "${ECHO_T}$ac_cv_c_inline" >&6
15571 case $ac_cv_c_inline in
15572   inline | yes) ;;
15573   no)
15574 cat >>confdefs.h <<\EOF
15575 #define inline
15576 EOF
15577  ;;
15578   *)  cat >>confdefs.h <<EOF
15579 #define inline $ac_cv_c_inline
15580 EOF
15581  ;;
15582 esac
15583
15584 NCURSES_INLINE=
15585 if test "$ac_cv_c_inline" != no ; then
15586   NCURSES_INLINE=inline
15587   if test "$INTEL_COMPILER" = yes
15588   then
15589     :
15590   elif test "$CLANG_COMPILER" = yes
15591   then
15592     :
15593   elif test "$GCC" = yes
15594   then
15595     echo "$as_me:15595: checking if $CC supports options to tune inlining" >&5
15596 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15597 if test "${cf_cv_gcc_inline+set}" = set; then
15598   echo $ECHO_N "(cached) $ECHO_C" >&6
15599 else
15600
15601       cf_save_CFLAGS=$CFLAGS
15602       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15603       cat >conftest.$ac_ext <<_ACEOF
15604 #line 15604 "configure"
15605 #include "confdefs.h"
15606 inline int foo(void) { return 1; }
15607 int
15608 main ()
15609 {
15610 ${cf_cv_main_return:-return} foo()
15611   ;
15612   return 0;
15613 }
15614 _ACEOF
15615 rm -f conftest.$ac_objext
15616 if { (eval echo "$as_me:15616: \"$ac_compile\"") >&5
15617   (eval $ac_compile) 2>&5
15618   ac_status=$?
15619   echo "$as_me:15619: \$? = $ac_status" >&5
15620   (exit $ac_status); } &&
15621          { ac_try='test -s conftest.$ac_objext'
15622   { (eval echo "$as_me:15622: \"$ac_try\"") >&5
15623   (eval $ac_try) 2>&5
15624   ac_status=$?
15625   echo "$as_me:15625: \$? = $ac_status" >&5
15626   (exit $ac_status); }; }; then
15627   cf_cv_gcc_inline=yes
15628 else
15629   echo "$as_me: failed program was:" >&5
15630 cat conftest.$ac_ext >&5
15631 cf_cv_gcc_inline=no
15632 fi
15633 rm -f conftest.$ac_objext conftest.$ac_ext
15634       CFLAGS=$cf_save_CFLAGS
15635
15636 fi
15637 echo "$as_me:15637: result: $cf_cv_gcc_inline" >&5
15638 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15639     if test "$cf_cv_gcc_inline" = yes ; then
15640
15641 cf_fix_cppflags=no
15642 cf_new_cflags=
15643 cf_new_cppflags=
15644 cf_new_extra_cppflags=
15645
15646 for cf_add_cflags in --param max-inline-insns-single=1200
15647 do
15648 case $cf_fix_cppflags in
15649 no)
15650         case $cf_add_cflags in #(vi
15651         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15652                 case $cf_add_cflags in
15653                 -D*)
15654                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15655
15656                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15657                                 && test -z "${cf_tst_cflags}" \
15658                                 && cf_fix_cppflags=yes
15659
15660                         if test $cf_fix_cppflags = yes ; then
15661                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15662                                 continue
15663                         elif test "${cf_tst_cflags}" = "\"'" ; then
15664                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15665                                 continue
15666                         fi
15667                         ;;
15668                 esac
15669                 case "$CPPFLAGS" in
15670                 *$cf_add_cflags) #(vi
15671                         ;;
15672                 *) #(vi
15673                         case $cf_add_cflags in #(vi
15674                         -D*)
15675                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15676
15677 CPPFLAGS=`echo "$CPPFLAGS" | \
15678         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15679                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15680
15681                                 ;;
15682                         esac
15683                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15684                         ;;
15685                 esac
15686                 ;;
15687         *)
15688                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15689                 ;;
15690         esac
15691         ;;
15692 yes)
15693         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15694
15695         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15696
15697         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15698                 && test -z "${cf_tst_cflags}" \
15699                 && cf_fix_cppflags=no
15700         ;;
15701 esac
15702 done
15703
15704 if test -n "$cf_new_cflags" ; then
15705
15706         CFLAGS="$CFLAGS $cf_new_cflags"
15707 fi
15708
15709 if test -n "$cf_new_cppflags" ; then
15710
15711         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15712 fi
15713
15714 if test -n "$cf_new_extra_cppflags" ; then
15715
15716         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15717 fi
15718
15719     fi
15720   fi
15721 fi
15722
15723 echo "$as_me:15723: checking for signal global datatype" >&5
15724 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15725 if test "${cf_cv_sig_atomic_t+set}" = set; then
15726   echo $ECHO_N "(cached) $ECHO_C" >&6
15727 else
15728
15729         for cf_type in \
15730                 "volatile sig_atomic_t" \
15731                 "sig_atomic_t" \
15732                 "int"
15733         do
15734         cat >conftest.$ac_ext <<_ACEOF
15735 #line 15735 "configure"
15736 #include "confdefs.h"
15737
15738 #include <sys/types.h>
15739 #include <signal.h>
15740 #include <stdio.h>
15741
15742 extern $cf_type x;
15743 $cf_type x;
15744 static void handler(int sig)
15745 {
15746         x = 5;
15747 }
15748 int
15749 main ()
15750 {
15751 signal(SIGINT, handler);
15752                  x = 1
15753   ;
15754   return 0;
15755 }
15756 _ACEOF
15757 rm -f conftest.$ac_objext
15758 if { (eval echo "$as_me:15758: \"$ac_compile\"") >&5
15759   (eval $ac_compile) 2>&5
15760   ac_status=$?
15761   echo "$as_me:15761: \$? = $ac_status" >&5
15762   (exit $ac_status); } &&
15763          { ac_try='test -s conftest.$ac_objext'
15764   { (eval echo "$as_me:15764: \"$ac_try\"") >&5
15765   (eval $ac_try) 2>&5
15766   ac_status=$?
15767   echo "$as_me:15767: \$? = $ac_status" >&5
15768   (exit $ac_status); }; }; then
15769   cf_cv_sig_atomic_t=$cf_type
15770 else
15771   echo "$as_me: failed program was:" >&5
15772 cat conftest.$ac_ext >&5
15773 cf_cv_sig_atomic_t=no
15774 fi
15775 rm -f conftest.$ac_objext conftest.$ac_ext
15776                 test "$cf_cv_sig_atomic_t" != no && break
15777         done
15778
15779 fi
15780
15781 echo "$as_me:15781: result: $cf_cv_sig_atomic_t" >&5
15782 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15783 test "$cf_cv_sig_atomic_t" != no &&
15784 cat >>confdefs.h <<EOF
15785 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15786 EOF
15787
15788 if test $NCURSES_CHTYPE = auto ; then
15789
15790 echo "$as_me:15790: checking for type of chtype" >&5
15791 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15792 if test "${cf_cv_typeof_chtype+set}" = set; then
15793   echo $ECHO_N "(cached) $ECHO_C" >&6
15794 else
15795
15796                 if test "$cross_compiling" = yes; then
15797   cf_cv_typeof_chtype=long
15798 else
15799   cat >conftest.$ac_ext <<_ACEOF
15800 #line 15800 "configure"
15801 #include "confdefs.h"
15802
15803 #define WANT_BITS 31
15804 #include <stdio.h>
15805 int main()
15806 {
15807         FILE *fp = fopen("cf_test.out", "w");
15808         if (fp != 0) {
15809                 char *result = "long";
15810                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15811                         int n;
15812                         unsigned int x, y;
15813                         for (n = 0; n < WANT_BITS; n++) {
15814                                 x = (1 << n);
15815                                 y = (x >> n);
15816                                 if (y != 1 || x == 0) {
15817                                         x = 0;
15818                                         break;
15819                                 }
15820                         }
15821                         /*
15822                          * If x is nonzero, an int is big enough for the bits
15823                          * that we want.
15824                          */
15825                         result = (x != 0) ? "int" : "long";
15826                 }
15827                 fputs(result, fp);
15828                 fclose(fp);
15829         }
15830         ${cf_cv_main_return:-return}(0);
15831 }
15832
15833 _ACEOF
15834 rm -f conftest$ac_exeext
15835 if { (eval echo "$as_me:15835: \"$ac_link\"") >&5
15836   (eval $ac_link) 2>&5
15837   ac_status=$?
15838   echo "$as_me:15838: \$? = $ac_status" >&5
15839   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15840   { (eval echo "$as_me:15840: \"$ac_try\"") >&5
15841   (eval $ac_try) 2>&5
15842   ac_status=$?
15843   echo "$as_me:15843: \$? = $ac_status" >&5
15844   (exit $ac_status); }; }; then
15845   cf_cv_typeof_chtype=`cat cf_test.out`
15846 else
15847   echo "$as_me: program exited with status $ac_status" >&5
15848 echo "$as_me: failed program was:" >&5
15849 cat conftest.$ac_ext >&5
15850 cf_cv_typeof_chtype=long
15851 fi
15852 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15853 fi
15854                 rm -f cf_test.out
15855
15856 fi
15857
15858 echo "$as_me:15858: result: $cf_cv_typeof_chtype" >&5
15859 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15860
15861 cat >>confdefs.h <<EOF
15862 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15863 EOF
15864
15865 else
15866         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15867 fi
15868 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15869
15870 echo "$as_me:15870: checking if unsigned literals are legal" >&5
15871 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15872 if test "${cf_cv_unsigned_literals+set}" = set; then
15873   echo $ECHO_N "(cached) $ECHO_C" >&6
15874 else
15875
15876         cat >conftest.$ac_ext <<_ACEOF
15877 #line 15877 "configure"
15878 #include "confdefs.h"
15879
15880 int
15881 main ()
15882 {
15883 long x = 1L + 1UL + 1U + 1
15884   ;
15885   return 0;
15886 }
15887 _ACEOF
15888 rm -f conftest.$ac_objext
15889 if { (eval echo "$as_me:15889: \"$ac_compile\"") >&5
15890   (eval $ac_compile) 2>&5
15891   ac_status=$?
15892   echo "$as_me:15892: \$? = $ac_status" >&5
15893   (exit $ac_status); } &&
15894          { ac_try='test -s conftest.$ac_objext'
15895   { (eval echo "$as_me:15895: \"$ac_try\"") >&5
15896   (eval $ac_try) 2>&5
15897   ac_status=$?
15898   echo "$as_me:15898: \$? = $ac_status" >&5
15899   (exit $ac_status); }; }; then
15900   cf_cv_unsigned_literals=yes
15901 else
15902   echo "$as_me: failed program was:" >&5
15903 cat conftest.$ac_ext >&5
15904 cf_cv_unsigned_literals=no
15905 fi
15906 rm -f conftest.$ac_objext conftest.$ac_ext
15907
15908 fi
15909
15910 echo "$as_me:15910: result: $cf_cv_unsigned_literals" >&5
15911 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15912
15913 cf_cv_1UL="1"
15914 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15915 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15916
15917 if test $NCURSES_MMASK_T = auto ; then
15918         cf_cv_typeof_mmask_t=long
15919 else
15920         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15921 fi
15922 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15923
15924 ###     Checks for external-data
15925
15926 echo "$as_me:15926: checking if external errno is declared" >&5
15927 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15928 if test "${cf_cv_dcl_errno+set}" = set; then
15929   echo $ECHO_N "(cached) $ECHO_C" >&6
15930 else
15931
15932     cat >conftest.$ac_ext <<_ACEOF
15933 #line 15933 "configure"
15934 #include "confdefs.h"
15935
15936 #ifdef HAVE_STDLIB_H
15937 #include <stdlib.h>
15938 #endif
15939 #include <stdio.h>
15940 #include <sys/types.h>
15941 #include <errno.h>
15942 int
15943 main ()
15944 {
15945 int x = (int) errno
15946   ;
15947   return 0;
15948 }
15949 _ACEOF
15950 rm -f conftest.$ac_objext
15951 if { (eval echo "$as_me:15951: \"$ac_compile\"") >&5
15952   (eval $ac_compile) 2>&5
15953   ac_status=$?
15954   echo "$as_me:15954: \$? = $ac_status" >&5
15955   (exit $ac_status); } &&
15956          { ac_try='test -s conftest.$ac_objext'
15957   { (eval echo "$as_me:15957: \"$ac_try\"") >&5
15958   (eval $ac_try) 2>&5
15959   ac_status=$?
15960   echo "$as_me:15960: \$? = $ac_status" >&5
15961   (exit $ac_status); }; }; then
15962   cf_cv_dcl_errno=yes
15963 else
15964   echo "$as_me: failed program was:" >&5
15965 cat conftest.$ac_ext >&5
15966 cf_cv_dcl_errno=no
15967 fi
15968 rm -f conftest.$ac_objext conftest.$ac_ext
15969
15970 fi
15971 echo "$as_me:15971: result: $cf_cv_dcl_errno" >&5
15972 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15973
15974 if test "$cf_cv_dcl_errno" = no ; then
15975
15976 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15977
15978     cat >>confdefs.h <<EOF
15979 #define $cf_result 1
15980 EOF
15981
15982 fi
15983
15984 # It's possible (for near-UNIX clones) that the data doesn't exist
15985
15986 echo "$as_me:15986: checking if external errno exists" >&5
15987 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15988 if test "${cf_cv_have_errno+set}" = set; then
15989   echo $ECHO_N "(cached) $ECHO_C" >&6
15990 else
15991
15992     cat >conftest.$ac_ext <<_ACEOF
15993 #line 15993 "configure"
15994 #include "confdefs.h"
15995
15996 #undef errno
15997 extern int errno;
15998
15999 int
16000 main ()
16001 {
16002 errno = 2
16003   ;
16004   return 0;
16005 }
16006 _ACEOF
16007 rm -f conftest.$ac_objext conftest$ac_exeext
16008 if { (eval echo "$as_me:16008: \"$ac_link\"") >&5
16009   (eval $ac_link) 2>&5
16010   ac_status=$?
16011   echo "$as_me:16011: \$? = $ac_status" >&5
16012   (exit $ac_status); } &&
16013          { ac_try='test -s conftest$ac_exeext'
16014   { (eval echo "$as_me:16014: \"$ac_try\"") >&5
16015   (eval $ac_try) 2>&5
16016   ac_status=$?
16017   echo "$as_me:16017: \$? = $ac_status" >&5
16018   (exit $ac_status); }; }; then
16019   cf_cv_have_errno=yes
16020 else
16021   echo "$as_me: failed program was:" >&5
16022 cat conftest.$ac_ext >&5
16023 cf_cv_have_errno=no
16024 fi
16025 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16026
16027 fi
16028 echo "$as_me:16028: result: $cf_cv_have_errno" >&5
16029 echo "${ECHO_T}$cf_cv_have_errno" >&6
16030
16031 if test "$cf_cv_have_errno" = yes ; then
16032
16033 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16034
16035     cat >>confdefs.h <<EOF
16036 #define $cf_result 1
16037 EOF
16038
16039 fi
16040
16041 echo "$as_me:16041: checking if data-only library module links" >&5
16042 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16043 if test "${cf_cv_link_dataonly+set}" = set; then
16044   echo $ECHO_N "(cached) $ECHO_C" >&6
16045 else
16046
16047         rm -f conftest.a
16048         cat >conftest.$ac_ext <<EOF
16049 #line 16049 "configure"
16050 int     testdata[3] = { 123, 456, 789 };
16051 EOF
16052         if { (eval echo "$as_me:16052: \"$ac_compile\"") >&5
16053   (eval $ac_compile) 2>&5
16054   ac_status=$?
16055   echo "$as_me:16055: \$? = $ac_status" >&5
16056   (exit $ac_status); } ; then
16057                 mv conftest.o data.o && \
16058                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16059         fi
16060         rm -f conftest.$ac_ext data.o
16061         cat >conftest.$ac_ext <<EOF
16062 #line 16062 "configure"
16063 int     testfunc()
16064 {
16065 #if defined(NeXT)
16066         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16067 #else
16068         extern int testdata[3];
16069         return testdata[0] == 123
16070            &&  testdata[1] == 456
16071            &&  testdata[2] == 789;
16072 #endif
16073 }
16074 EOF
16075         if { (eval echo "$as_me:16075: \"$ac_compile\"") >&5
16076   (eval $ac_compile) 2>&5
16077   ac_status=$?
16078   echo "$as_me:16078: \$? = $ac_status" >&5
16079   (exit $ac_status); }; then
16080                 mv conftest.o func.o && \
16081                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16082         fi
16083         rm -f conftest.$ac_ext func.o
16084         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16085         cf_saveLIBS="$LIBS"
16086         LIBS="conftest.a $LIBS"
16087         if test "$cross_compiling" = yes; then
16088   cf_cv_link_dataonly=unknown
16089 else
16090   cat >conftest.$ac_ext <<_ACEOF
16091 #line 16091 "configure"
16092 #include "confdefs.h"
16093
16094         int main()
16095         {
16096                 extern int testfunc();
16097                 ${cf_cv_main_return:-return} (!testfunc());
16098         }
16099
16100 _ACEOF
16101 rm -f conftest$ac_exeext
16102 if { (eval echo "$as_me:16102: \"$ac_link\"") >&5
16103   (eval $ac_link) 2>&5
16104   ac_status=$?
16105   echo "$as_me:16105: \$? = $ac_status" >&5
16106   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16107   { (eval echo "$as_me:16107: \"$ac_try\"") >&5
16108   (eval $ac_try) 2>&5
16109   ac_status=$?
16110   echo "$as_me:16110: \$? = $ac_status" >&5
16111   (exit $ac_status); }; }; then
16112   cf_cv_link_dataonly=yes
16113 else
16114   echo "$as_me: program exited with status $ac_status" >&5
16115 echo "$as_me: failed program was:" >&5
16116 cat conftest.$ac_ext >&5
16117 cf_cv_link_dataonly=no
16118 fi
16119 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16120 fi
16121         LIBS="$cf_saveLIBS"
16122
16123 fi
16124
16125 echo "$as_me:16125: result: $cf_cv_link_dataonly" >&5
16126 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16127
16128 if test "$cf_cv_link_dataonly" = no ; then
16129
16130 cat >>confdefs.h <<\EOF
16131 #define BROKEN_LINKER 1
16132 EOF
16133
16134         BROKEN_LINKER=1
16135 fi
16136
16137 ###     Checks for library functions.
16138
16139 for ac_func in \
16140 getcwd \
16141 getegid \
16142 geteuid \
16143 getopt \
16144 getttynam \
16145 issetugid \
16146 poll \
16147 putenv \
16148 remove \
16149 select \
16150 setbuf \
16151 setbuffer \
16152 setenv \
16153 setvbuf \
16154 sigaction \
16155 sigvec \
16156 strdup \
16157 strstr \
16158 tcgetpgrp \
16159 times \
16160 vsnprintf \
16161
16162 do
16163 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16164 echo "$as_me:16164: checking for $ac_func" >&5
16165 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16166 if eval "test \"\${$as_ac_var+set}\" = set"; then
16167   echo $ECHO_N "(cached) $ECHO_C" >&6
16168 else
16169   cat >conftest.$ac_ext <<_ACEOF
16170 #line 16170 "configure"
16171 #include "confdefs.h"
16172 /* System header to define __stub macros and hopefully few prototypes,
16173     which can conflict with char $ac_func (); below.  */
16174 #include <assert.h>
16175 /* Override any gcc2 internal prototype to avoid an error.  */
16176 #ifdef __cplusplus
16177 extern "C"
16178 #endif
16179 /* We use char because int might match the return type of a gcc2
16180    builtin and then its argument prototype would still apply.  */
16181 char $ac_func ();
16182 char (*f) ();
16183
16184 int
16185 main ()
16186 {
16187 /* The GNU C library defines this for functions which it implements
16188     to always fail with ENOSYS.  Some functions are actually named
16189     something starting with __ and the normal name is an alias.  */
16190 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16191 choke me
16192 #else
16193 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16194 #endif
16195
16196   ;
16197   return 0;
16198 }
16199 _ACEOF
16200 rm -f conftest.$ac_objext conftest$ac_exeext
16201 if { (eval echo "$as_me:16201: \"$ac_link\"") >&5
16202   (eval $ac_link) 2>&5
16203   ac_status=$?
16204   echo "$as_me:16204: \$? = $ac_status" >&5
16205   (exit $ac_status); } &&
16206          { ac_try='test -s conftest$ac_exeext'
16207   { (eval echo "$as_me:16207: \"$ac_try\"") >&5
16208   (eval $ac_try) 2>&5
16209   ac_status=$?
16210   echo "$as_me:16210: \$? = $ac_status" >&5
16211   (exit $ac_status); }; }; then
16212   eval "$as_ac_var=yes"
16213 else
16214   echo "$as_me: failed program was:" >&5
16215 cat conftest.$ac_ext >&5
16216 eval "$as_ac_var=no"
16217 fi
16218 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16219 fi
16220 echo "$as_me:16220: result: `eval echo '${'$as_ac_var'}'`" >&5
16221 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16222 if test `eval echo '${'$as_ac_var'}'` = yes; then
16223   cat >>confdefs.h <<EOF
16224 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16225 EOF
16226
16227 fi
16228 done
16229
16230 if test "x$ac_cv_func_getopt" = xno &&
16231    test "x$cf_with_progs$cf_with_tests" != xnono; then
16232         { { echo "$as_me:16232: error: getopt is required for building programs" >&5
16233 echo "$as_me: error: getopt is required for building programs" >&2;}
16234    { (exit 1); exit 1; }; }
16235 fi
16236
16237 if test "x$with_getcap" = "xyes" ; then
16238
16239 echo "$as_me:16239: checking for terminal-capability database functions" >&5
16240 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16241 if test "${cf_cv_cgetent+set}" = set; then
16242   echo $ECHO_N "(cached) $ECHO_C" >&6
16243 else
16244
16245 cat >conftest.$ac_ext <<_ACEOF
16246 #line 16246 "configure"
16247 #include "confdefs.h"
16248
16249 #include <stdlib.h>
16250 int
16251 main ()
16252 {
16253
16254         char temp[128];
16255         char *buf = temp;
16256         char *db_array = temp;
16257         cgetent(&buf, &db_array, "vt100");
16258         cgetcap(buf, "tc", '=');
16259         cgetmatch(buf, "tc");
16260
16261   ;
16262   return 0;
16263 }
16264 _ACEOF
16265 rm -f conftest.$ac_objext conftest$ac_exeext
16266 if { (eval echo "$as_me:16266: \"$ac_link\"") >&5
16267   (eval $ac_link) 2>&5
16268   ac_status=$?
16269   echo "$as_me:16269: \$? = $ac_status" >&5
16270   (exit $ac_status); } &&
16271          { ac_try='test -s conftest$ac_exeext'
16272   { (eval echo "$as_me:16272: \"$ac_try\"") >&5
16273   (eval $ac_try) 2>&5
16274   ac_status=$?
16275   echo "$as_me:16275: \$? = $ac_status" >&5
16276   (exit $ac_status); }; }; then
16277   cf_cv_cgetent=yes
16278 else
16279   echo "$as_me: failed program was:" >&5
16280 cat conftest.$ac_ext >&5
16281 cf_cv_cgetent=no
16282 fi
16283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16284
16285 fi
16286 echo "$as_me:16286: result: $cf_cv_cgetent" >&5
16287 echo "${ECHO_T}$cf_cv_cgetent" >&6
16288
16289 if test "$cf_cv_cgetent" = yes
16290 then
16291
16292 cat >>confdefs.h <<\EOF
16293 #define HAVE_BSD_CGETENT 1
16294 EOF
16295
16296 echo "$as_me:16296: checking if cgetent uses const parameter" >&5
16297 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16298 if test "${cf_cv_cgetent_const+set}" = set; then
16299   echo $ECHO_N "(cached) $ECHO_C" >&6
16300 else
16301
16302 cat >conftest.$ac_ext <<_ACEOF
16303 #line 16303 "configure"
16304 #include "confdefs.h"
16305
16306 #include <stdlib.h>
16307 int
16308 main ()
16309 {
16310
16311         char temp[128];
16312         char *buf = temp;
16313 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16314         const char *db_array = temp;
16315         cgetent(&buf, &db_array, "vt100");
16316 #endif
16317         cgetcap(buf, "tc", '=');
16318         cgetmatch(buf, "tc");
16319
16320   ;
16321   return 0;
16322 }
16323 _ACEOF
16324 rm -f conftest.$ac_objext conftest$ac_exeext
16325 if { (eval echo "$as_me:16325: \"$ac_link\"") >&5
16326   (eval $ac_link) 2>&5
16327   ac_status=$?
16328   echo "$as_me:16328: \$? = $ac_status" >&5
16329   (exit $ac_status); } &&
16330          { ac_try='test -s conftest$ac_exeext'
16331   { (eval echo "$as_me:16331: \"$ac_try\"") >&5
16332   (eval $ac_try) 2>&5
16333   ac_status=$?
16334   echo "$as_me:16334: \$? = $ac_status" >&5
16335   (exit $ac_status); }; }; then
16336   cf_cv_cgetent_const=yes
16337 else
16338   echo "$as_me: failed program was:" >&5
16339 cat conftest.$ac_ext >&5
16340 cf_cv_cgetent_const=no
16341 fi
16342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16343
16344 fi
16345 echo "$as_me:16345: result: $cf_cv_cgetent_const" >&5
16346 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16347         if test "$cf_cv_cgetent_const" = yes
16348         then
16349
16350 cat >>confdefs.h <<EOF
16351 #define CGETENT_CONST const
16352 EOF
16353
16354         fi
16355 fi
16356
16357 fi
16358
16359 echo "$as_me:16359: checking for isascii" >&5
16360 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16361 if test "${cf_cv_have_isascii+set}" = set; then
16362   echo $ECHO_N "(cached) $ECHO_C" >&6
16363 else
16364
16365         cat >conftest.$ac_ext <<_ACEOF
16366 #line 16366 "configure"
16367 #include "confdefs.h"
16368 #include <ctype.h>
16369 int
16370 main ()
16371 {
16372 int x = isascii(' ')
16373   ;
16374   return 0;
16375 }
16376 _ACEOF
16377 rm -f conftest.$ac_objext conftest$ac_exeext
16378 if { (eval echo "$as_me:16378: \"$ac_link\"") >&5
16379   (eval $ac_link) 2>&5
16380   ac_status=$?
16381   echo "$as_me:16381: \$? = $ac_status" >&5
16382   (exit $ac_status); } &&
16383          { ac_try='test -s conftest$ac_exeext'
16384   { (eval echo "$as_me:16384: \"$ac_try\"") >&5
16385   (eval $ac_try) 2>&5
16386   ac_status=$?
16387   echo "$as_me:16387: \$? = $ac_status" >&5
16388   (exit $ac_status); }; }; then
16389   cf_cv_have_isascii=yes
16390 else
16391   echo "$as_me: failed program was:" >&5
16392 cat conftest.$ac_ext >&5
16393 cf_cv_have_isascii=no
16394 fi
16395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16396
16397 fi
16398 echo "$as_me:16398: result: $cf_cv_have_isascii" >&5
16399 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16400 test "$cf_cv_have_isascii" = yes &&
16401 cat >>confdefs.h <<\EOF
16402 #define HAVE_ISASCII 1
16403 EOF
16404
16405 if test "$ac_cv_func_sigaction" = yes; then
16406 echo "$as_me:16406: checking whether sigaction needs _POSIX_SOURCE" >&5
16407 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16408 cat >conftest.$ac_ext <<_ACEOF
16409 #line 16409 "configure"
16410 #include "confdefs.h"
16411
16412 #include <sys/types.h>
16413 #include <signal.h>
16414 int
16415 main ()
16416 {
16417 struct sigaction act
16418   ;
16419   return 0;
16420 }
16421 _ACEOF
16422 rm -f conftest.$ac_objext
16423 if { (eval echo "$as_me:16423: \"$ac_compile\"") >&5
16424   (eval $ac_compile) 2>&5
16425   ac_status=$?
16426   echo "$as_me:16426: \$? = $ac_status" >&5
16427   (exit $ac_status); } &&
16428          { ac_try='test -s conftest.$ac_objext'
16429   { (eval echo "$as_me:16429: \"$ac_try\"") >&5
16430   (eval $ac_try) 2>&5
16431   ac_status=$?
16432   echo "$as_me:16432: \$? = $ac_status" >&5
16433   (exit $ac_status); }; }; then
16434   sigact_bad=no
16435 else
16436   echo "$as_me: failed program was:" >&5
16437 cat conftest.$ac_ext >&5
16438
16439 cat >conftest.$ac_ext <<_ACEOF
16440 #line 16440 "configure"
16441 #include "confdefs.h"
16442
16443 #define _POSIX_SOURCE
16444 #include <sys/types.h>
16445 #include <signal.h>
16446 int
16447 main ()
16448 {
16449 struct sigaction act
16450   ;
16451   return 0;
16452 }
16453 _ACEOF
16454 rm -f conftest.$ac_objext
16455 if { (eval echo "$as_me:16455: \"$ac_compile\"") >&5
16456   (eval $ac_compile) 2>&5
16457   ac_status=$?
16458   echo "$as_me:16458: \$? = $ac_status" >&5
16459   (exit $ac_status); } &&
16460          { ac_try='test -s conftest.$ac_objext'
16461   { (eval echo "$as_me:16461: \"$ac_try\"") >&5
16462   (eval $ac_try) 2>&5
16463   ac_status=$?
16464   echo "$as_me:16464: \$? = $ac_status" >&5
16465   (exit $ac_status); }; }; then
16466   sigact_bad=yes
16467
16468 cat >>confdefs.h <<\EOF
16469 #define _POSIX_SOURCE 1
16470 EOF
16471
16472 else
16473   echo "$as_me: failed program was:" >&5
16474 cat conftest.$ac_ext >&5
16475 sigact_bad=unknown
16476 fi
16477 rm -f conftest.$ac_objext conftest.$ac_ext
16478 fi
16479 rm -f conftest.$ac_objext conftest.$ac_ext
16480 echo "$as_me:16480: result: $sigact_bad" >&5
16481 echo "${ECHO_T}$sigact_bad" >&6
16482 fi
16483
16484 echo "$as_me:16484: checking if nanosleep really works" >&5
16485 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16486 if test "${cf_cv_func_nanosleep+set}" = set; then
16487   echo $ECHO_N "(cached) $ECHO_C" >&6
16488 else
16489
16490 if test "$cross_compiling" = yes; then
16491   cf_cv_func_nanosleep=unknown
16492 else
16493   cat >conftest.$ac_ext <<_ACEOF
16494 #line 16494 "configure"
16495 #include "confdefs.h"
16496
16497 #include <stdio.h>
16498 #include <errno.h>
16499 #include <time.h>
16500
16501 #ifdef HAVE_SYS_TIME_H
16502 #include <sys/time.h>
16503 #endif
16504
16505 int main() {
16506         struct timespec ts1, ts2;
16507         int code;
16508         ts1.tv_sec  = 0;
16509         ts1.tv_nsec = 750000000;
16510         ts2.tv_sec  = 0;
16511         ts2.tv_nsec = 0;
16512         errno = 0;
16513         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16514         ${cf_cv_main_return:-return}(code != 0);
16515 }
16516
16517 _ACEOF
16518 rm -f conftest$ac_exeext
16519 if { (eval echo "$as_me:16519: \"$ac_link\"") >&5
16520   (eval $ac_link) 2>&5
16521   ac_status=$?
16522   echo "$as_me:16522: \$? = $ac_status" >&5
16523   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16524   { (eval echo "$as_me:16524: \"$ac_try\"") >&5
16525   (eval $ac_try) 2>&5
16526   ac_status=$?
16527   echo "$as_me:16527: \$? = $ac_status" >&5
16528   (exit $ac_status); }; }; then
16529   cf_cv_func_nanosleep=yes
16530 else
16531   echo "$as_me: program exited with status $ac_status" >&5
16532 echo "$as_me: failed program was:" >&5
16533 cat conftest.$ac_ext >&5
16534 cf_cv_func_nanosleep=no
16535 fi
16536 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16537 fi
16538 fi
16539 echo "$as_me:16539: result: $cf_cv_func_nanosleep" >&5
16540 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16541
16542 test "$cf_cv_func_nanosleep" = "yes" &&
16543 cat >>confdefs.h <<\EOF
16544 #define HAVE_NANOSLEEP 1
16545 EOF
16546
16547 for ac_header in \
16548 termio.h \
16549 termios.h \
16550 unistd.h \
16551
16552 do
16553 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16554 echo "$as_me:16554: checking for $ac_header" >&5
16555 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16556 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16557   echo $ECHO_N "(cached) $ECHO_C" >&6
16558 else
16559   cat >conftest.$ac_ext <<_ACEOF
16560 #line 16560 "configure"
16561 #include "confdefs.h"
16562 #include <$ac_header>
16563 _ACEOF
16564 if { (eval echo "$as_me:16564: \"$ac_cpp conftest.$ac_ext\"") >&5
16565   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16566   ac_status=$?
16567   egrep -v '^ *\+' conftest.er1 >conftest.err
16568   rm -f conftest.er1
16569   cat conftest.err >&5
16570   echo "$as_me:16570: \$? = $ac_status" >&5
16571   (exit $ac_status); } >/dev/null; then
16572   if test -s conftest.err; then
16573     ac_cpp_err=$ac_c_preproc_warn_flag
16574   else
16575     ac_cpp_err=
16576   fi
16577 else
16578   ac_cpp_err=yes
16579 fi
16580 if test -z "$ac_cpp_err"; then
16581   eval "$as_ac_Header=yes"
16582 else
16583   echo "$as_me: failed program was:" >&5
16584   cat conftest.$ac_ext >&5
16585   eval "$as_ac_Header=no"
16586 fi
16587 rm -f conftest.err conftest.$ac_ext
16588 fi
16589 echo "$as_me:16589: result: `eval echo '${'$as_ac_Header'}'`" >&5
16590 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16591 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16592   cat >>confdefs.h <<EOF
16593 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16594 EOF
16595
16596 fi
16597 done
16598
16599 if test "$ISC" = yes ; then
16600
16601 for ac_header in sys/termio.h
16602 do
16603 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16604 echo "$as_me:16604: checking for $ac_header" >&5
16605 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16606 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16607   echo $ECHO_N "(cached) $ECHO_C" >&6
16608 else
16609   cat >conftest.$ac_ext <<_ACEOF
16610 #line 16610 "configure"
16611 #include "confdefs.h"
16612 #include <$ac_header>
16613 _ACEOF
16614 if { (eval echo "$as_me:16614: \"$ac_cpp conftest.$ac_ext\"") >&5
16615   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16616   ac_status=$?
16617   egrep -v '^ *\+' conftest.er1 >conftest.err
16618   rm -f conftest.er1
16619   cat conftest.err >&5
16620   echo "$as_me:16620: \$? = $ac_status" >&5
16621   (exit $ac_status); } >/dev/null; then
16622   if test -s conftest.err; then
16623     ac_cpp_err=$ac_c_preproc_warn_flag
16624   else
16625     ac_cpp_err=
16626   fi
16627 else
16628   ac_cpp_err=yes
16629 fi
16630 if test -z "$ac_cpp_err"; then
16631   eval "$as_ac_Header=yes"
16632 else
16633   echo "$as_me: failed program was:" >&5
16634   cat conftest.$ac_ext >&5
16635   eval "$as_ac_Header=no"
16636 fi
16637 rm -f conftest.err conftest.$ac_ext
16638 fi
16639 echo "$as_me:16639: result: `eval echo '${'$as_ac_Header'}'`" >&5
16640 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16641 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16642   cat >>confdefs.h <<EOF
16643 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16644 EOF
16645
16646 fi
16647 done
16648
16649 fi
16650 if test "$ac_cv_header_termios_h" = yes ; then
16651         case "$CFLAGS $CPPFLAGS" in
16652         *-D_POSIX_SOURCE*)
16653                 termios_bad=dunno ;;
16654         *)      termios_bad=maybe ;;
16655         esac
16656         if test "$termios_bad" = maybe ; then
16657         echo "$as_me:16657: checking whether termios.h needs _POSIX_SOURCE" >&5
16658 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16659         cat >conftest.$ac_ext <<_ACEOF
16660 #line 16660 "configure"
16661 #include "confdefs.h"
16662 #include <termios.h>
16663 int
16664 main ()
16665 {
16666 struct termios foo; int x = foo.c_iflag
16667   ;
16668   return 0;
16669 }
16670 _ACEOF
16671 rm -f conftest.$ac_objext
16672 if { (eval echo "$as_me:16672: \"$ac_compile\"") >&5
16673   (eval $ac_compile) 2>&5
16674   ac_status=$?
16675   echo "$as_me:16675: \$? = $ac_status" >&5
16676   (exit $ac_status); } &&
16677          { ac_try='test -s conftest.$ac_objext'
16678   { (eval echo "$as_me:16678: \"$ac_try\"") >&5
16679   (eval $ac_try) 2>&5
16680   ac_status=$?
16681   echo "$as_me:16681: \$? = $ac_status" >&5
16682   (exit $ac_status); }; }; then
16683   termios_bad=no
16684 else
16685   echo "$as_me: failed program was:" >&5
16686 cat conftest.$ac_ext >&5
16687
16688                 cat >conftest.$ac_ext <<_ACEOF
16689 #line 16689 "configure"
16690 #include "confdefs.h"
16691
16692 #define _POSIX_SOURCE
16693 #include <termios.h>
16694 int
16695 main ()
16696 {
16697 struct termios foo; int x = foo.c_iflag
16698   ;
16699   return 0;
16700 }
16701 _ACEOF
16702 rm -f conftest.$ac_objext
16703 if { (eval echo "$as_me:16703: \"$ac_compile\"") >&5
16704   (eval $ac_compile) 2>&5
16705   ac_status=$?
16706   echo "$as_me:16706: \$? = $ac_status" >&5
16707   (exit $ac_status); } &&
16708          { ac_try='test -s conftest.$ac_objext'
16709   { (eval echo "$as_me:16709: \"$ac_try\"") >&5
16710   (eval $ac_try) 2>&5
16711   ac_status=$?
16712   echo "$as_me:16712: \$? = $ac_status" >&5
16713   (exit $ac_status); }; }; then
16714   termios_bad=unknown
16715 else
16716   echo "$as_me: failed program was:" >&5
16717 cat conftest.$ac_ext >&5
16718 termios_bad=yes
16719 cat >>confdefs.h <<\EOF
16720 #define _POSIX_SOURCE 1
16721 EOF
16722
16723 fi
16724 rm -f conftest.$ac_objext conftest.$ac_ext
16725
16726 fi
16727 rm -f conftest.$ac_objext conftest.$ac_ext
16728         echo "$as_me:16728: result: $termios_bad" >&5
16729 echo "${ECHO_T}$termios_bad" >&6
16730         fi
16731 fi
16732
16733 echo "$as_me:16733: checking for tcgetattr" >&5
16734 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16735 if test "${cf_cv_have_tcgetattr+set}" = set; then
16736   echo $ECHO_N "(cached) $ECHO_C" >&6
16737 else
16738
16739 cat >conftest.$ac_ext <<_ACEOF
16740 #line 16740 "configure"
16741 #include "confdefs.h"
16742
16743 #include <sys/types.h>
16744 #ifdef HAVE_UNISTD_H
16745 #include <unistd.h>
16746 #endif
16747 #ifdef HAVE_TERMIOS_H
16748 #include <termios.h>
16749 #define TTY struct termios
16750 #else
16751 #ifdef HAVE_TERMIO_H
16752 #include <termio.h>
16753 #define TTY struct termio
16754 #endif
16755 #endif
16756
16757 int
16758 main ()
16759 {
16760
16761 TTY foo;
16762 tcgetattr(1, &foo);
16763   ;
16764   return 0;
16765 }
16766 _ACEOF
16767 rm -f conftest.$ac_objext conftest$ac_exeext
16768 if { (eval echo "$as_me:16768: \"$ac_link\"") >&5
16769   (eval $ac_link) 2>&5
16770   ac_status=$?
16771   echo "$as_me:16771: \$? = $ac_status" >&5
16772   (exit $ac_status); } &&
16773          { ac_try='test -s conftest$ac_exeext'
16774   { (eval echo "$as_me:16774: \"$ac_try\"") >&5
16775   (eval $ac_try) 2>&5
16776   ac_status=$?
16777   echo "$as_me:16777: \$? = $ac_status" >&5
16778   (exit $ac_status); }; }; then
16779   cf_cv_have_tcgetattr=yes
16780 else
16781   echo "$as_me: failed program was:" >&5
16782 cat conftest.$ac_ext >&5
16783 cf_cv_have_tcgetattr=no
16784 fi
16785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16786 fi
16787 echo "$as_me:16787: result: $cf_cv_have_tcgetattr" >&5
16788 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16789 test "$cf_cv_have_tcgetattr" = yes &&
16790 cat >>confdefs.h <<\EOF
16791 #define HAVE_TCGETATTR 1
16792 EOF
16793
16794 echo "$as_me:16794: checking for vsscanf function or workaround" >&5
16795 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16796 if test "${cf_cv_func_vsscanf+set}" = set; then
16797   echo $ECHO_N "(cached) $ECHO_C" >&6
16798 else
16799
16800 cat >conftest.$ac_ext <<_ACEOF
16801 #line 16801 "configure"
16802 #include "confdefs.h"
16803
16804 #include <stdarg.h>
16805 #include <stdio.h>
16806 int
16807 main ()
16808 {
16809
16810         va_list ap;
16811         vsscanf("from", "%d", ap)
16812   ;
16813   return 0;
16814 }
16815 _ACEOF
16816 rm -f conftest.$ac_objext conftest$ac_exeext
16817 if { (eval echo "$as_me:16817: \"$ac_link\"") >&5
16818   (eval $ac_link) 2>&5
16819   ac_status=$?
16820   echo "$as_me:16820: \$? = $ac_status" >&5
16821   (exit $ac_status); } &&
16822          { ac_try='test -s conftest$ac_exeext'
16823   { (eval echo "$as_me:16823: \"$ac_try\"") >&5
16824   (eval $ac_try) 2>&5
16825   ac_status=$?
16826   echo "$as_me:16826: \$? = $ac_status" >&5
16827   (exit $ac_status); }; }; then
16828   cf_cv_func_vsscanf=vsscanf
16829 else
16830   echo "$as_me: failed program was:" >&5
16831 cat conftest.$ac_ext >&5
16832
16833 cat >conftest.$ac_ext <<_ACEOF
16834 #line 16834 "configure"
16835 #include "confdefs.h"
16836
16837 #include <stdarg.h>
16838 #include <stdio.h>
16839 int
16840 main ()
16841 {
16842
16843     FILE strbuf;
16844     char *str = "from";
16845
16846     strbuf._flag = _IOREAD;
16847     strbuf._ptr = strbuf._base = (unsigned char *) str;
16848     strbuf._cnt = strlen(str);
16849     strbuf._file = _NFILE;
16850     return (vfscanf(&strbuf, "%d", ap))
16851   ;
16852   return 0;
16853 }
16854 _ACEOF
16855 rm -f conftest.$ac_objext conftest$ac_exeext
16856 if { (eval echo "$as_me:16856: \"$ac_link\"") >&5
16857   (eval $ac_link) 2>&5
16858   ac_status=$?
16859   echo "$as_me:16859: \$? = $ac_status" >&5
16860   (exit $ac_status); } &&
16861          { ac_try='test -s conftest$ac_exeext'
16862   { (eval echo "$as_me:16862: \"$ac_try\"") >&5
16863   (eval $ac_try) 2>&5
16864   ac_status=$?
16865   echo "$as_me:16865: \$? = $ac_status" >&5
16866   (exit $ac_status); }; }; then
16867   cf_cv_func_vsscanf=vfscanf
16868 else
16869   echo "$as_me: failed program was:" >&5
16870 cat conftest.$ac_ext >&5
16871
16872 cat >conftest.$ac_ext <<_ACEOF
16873 #line 16873 "configure"
16874 #include "confdefs.h"
16875
16876 #include <stdarg.h>
16877 #include <stdio.h>
16878 int
16879 main ()
16880 {
16881
16882     FILE strbuf;
16883     char *str = "from";
16884
16885     strbuf._flag = _IOREAD;
16886     strbuf._ptr = strbuf._base = (unsigned char *) str;
16887     strbuf._cnt = strlen(str);
16888     strbuf._file = _NFILE;
16889     return (_doscan(&strbuf, "%d", ap))
16890   ;
16891   return 0;
16892 }
16893 _ACEOF
16894 rm -f conftest.$ac_objext conftest$ac_exeext
16895 if { (eval echo "$as_me:16895: \"$ac_link\"") >&5
16896   (eval $ac_link) 2>&5
16897   ac_status=$?
16898   echo "$as_me:16898: \$? = $ac_status" >&5
16899   (exit $ac_status); } &&
16900          { ac_try='test -s conftest$ac_exeext'
16901   { (eval echo "$as_me:16901: \"$ac_try\"") >&5
16902   (eval $ac_try) 2>&5
16903   ac_status=$?
16904   echo "$as_me:16904: \$? = $ac_status" >&5
16905   (exit $ac_status); }; }; then
16906   cf_cv_func_vsscanf=_doscan
16907 else
16908   echo "$as_me: failed program was:" >&5
16909 cat conftest.$ac_ext >&5
16910
16911 cf_cv_func_vsscanf=no
16912 fi
16913 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16914 fi
16915 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16916 fi
16917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16918 fi
16919 echo "$as_me:16919: result: $cf_cv_func_vsscanf" >&5
16920 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16921
16922 case $cf_cv_func_vsscanf in #(vi
16923 vsscanf)
16924 cat >>confdefs.h <<\EOF
16925 #define HAVE_VSSCANF 1
16926 EOF
16927 ;; #(vi
16928 vfscanf)
16929 cat >>confdefs.h <<\EOF
16930 #define HAVE_VFSCANF 1
16931 EOF
16932 ;; #(vi
16933 _doscan)
16934 cat >>confdefs.h <<\EOF
16935 #define HAVE__DOSCAN 1
16936 EOF
16937 ;;
16938 esac
16939
16940 echo "$as_me:16940: checking for working mkstemp" >&5
16941 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16942 if test "${cf_cv_func_mkstemp+set}" = set; then
16943   echo $ECHO_N "(cached) $ECHO_C" >&6
16944 else
16945
16946 rm -rf conftest*
16947 if test "$cross_compiling" = yes; then
16948   cf_cv_func_mkstemp=maybe
16949 else
16950   cat >conftest.$ac_ext <<_ACEOF
16951 #line 16951 "configure"
16952 #include "confdefs.h"
16953
16954 #include <sys/types.h>
16955 #include <stdlib.h>
16956 #include <stdio.h>
16957 #include <string.h>
16958 #include <sys/stat.h>
16959 int main()
16960 {
16961         char *tmpl = "conftestXXXXXX";
16962         char name[2][80];
16963         int n;
16964         int result = 0;
16965         int fd;
16966         struct stat sb;
16967
16968         umask(077);
16969         for (n = 0; n < 2; ++n) {
16970                 strcpy(name[n], tmpl);
16971                 if ((fd = mkstemp(name[n])) >= 0) {
16972                         if (!strcmp(name[n], tmpl)
16973                          || stat(name[n], &sb) != 0
16974                          || (sb.st_mode & S_IFMT) != S_IFREG
16975                          || (sb.st_mode & 077) != 0) {
16976                                 result = 1;
16977                         }
16978                         close(fd);
16979                 }
16980         }
16981         if (result == 0
16982          && !strcmp(name[0], name[1]))
16983                 result = 1;
16984         ${cf_cv_main_return:-return}(result);
16985 }
16986
16987 _ACEOF
16988 rm -f conftest$ac_exeext
16989 if { (eval echo "$as_me:16989: \"$ac_link\"") >&5
16990   (eval $ac_link) 2>&5
16991   ac_status=$?
16992   echo "$as_me:16992: \$? = $ac_status" >&5
16993   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16994   { (eval echo "$as_me:16994: \"$ac_try\"") >&5
16995   (eval $ac_try) 2>&5
16996   ac_status=$?
16997   echo "$as_me:16997: \$? = $ac_status" >&5
16998   (exit $ac_status); }; }; then
16999   cf_cv_func_mkstemp=yes
17000
17001 else
17002   echo "$as_me: program exited with status $ac_status" >&5
17003 echo "$as_me: failed program was:" >&5
17004 cat conftest.$ac_ext >&5
17005 cf_cv_func_mkstemp=no
17006
17007 fi
17008 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17009 fi
17010
17011 fi
17012 echo "$as_me:17012: result: $cf_cv_func_mkstemp" >&5
17013 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17014 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17015         echo "$as_me:17015: checking for mkstemp" >&5
17016 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17017 if test "${ac_cv_func_mkstemp+set}" = set; then
17018   echo $ECHO_N "(cached) $ECHO_C" >&6
17019 else
17020   cat >conftest.$ac_ext <<_ACEOF
17021 #line 17021 "configure"
17022 #include "confdefs.h"
17023 /* System header to define __stub macros and hopefully few prototypes,
17024     which can conflict with char mkstemp (); below.  */
17025 #include <assert.h>
17026 /* Override any gcc2 internal prototype to avoid an error.  */
17027 #ifdef __cplusplus
17028 extern "C"
17029 #endif
17030 /* We use char because int might match the return type of a gcc2
17031    builtin and then its argument prototype would still apply.  */
17032 char mkstemp ();
17033 char (*f) ();
17034
17035 int
17036 main ()
17037 {
17038 /* The GNU C library defines this for functions which it implements
17039     to always fail with ENOSYS.  Some functions are actually named
17040     something starting with __ and the normal name is an alias.  */
17041 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17042 choke me
17043 #else
17044 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17045 #endif
17046
17047   ;
17048   return 0;
17049 }
17050 _ACEOF
17051 rm -f conftest.$ac_objext conftest$ac_exeext
17052 if { (eval echo "$as_me:17052: \"$ac_link\"") >&5
17053   (eval $ac_link) 2>&5
17054   ac_status=$?
17055   echo "$as_me:17055: \$? = $ac_status" >&5
17056   (exit $ac_status); } &&
17057          { ac_try='test -s conftest$ac_exeext'
17058   { (eval echo "$as_me:17058: \"$ac_try\"") >&5
17059   (eval $ac_try) 2>&5
17060   ac_status=$?
17061   echo "$as_me:17061: \$? = $ac_status" >&5
17062   (exit $ac_status); }; }; then
17063   ac_cv_func_mkstemp=yes
17064 else
17065   echo "$as_me: failed program was:" >&5
17066 cat conftest.$ac_ext >&5
17067 ac_cv_func_mkstemp=no
17068 fi
17069 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17070 fi
17071 echo "$as_me:17071: result: $ac_cv_func_mkstemp" >&5
17072 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17073
17074 fi
17075 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17076
17077 cat >>confdefs.h <<\EOF
17078 #define HAVE_MKSTEMP 1
17079 EOF
17080
17081 fi
17082
17083 # setup for prototype of fallback for vsscanf()
17084
17085 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17086         HAVE_VSSCANF=1
17087 else
17088         HAVE_VSSCANF=0
17089 fi
17090
17091 if test "x$cross_compiling" = xyes ; then
17092         { echo "$as_me:17092: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17093 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17094 else
17095         echo "$as_me:17095: checking whether setvbuf arguments are reversed" >&5
17096 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17097 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17098   echo $ECHO_N "(cached) $ECHO_C" >&6
17099 else
17100   if test "$cross_compiling" = yes; then
17101   { { echo "$as_me:17101: error: cannot run test program while cross compiling" >&5
17102 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17103    { (exit 1); exit 1; }; }
17104 else
17105   cat >conftest.$ac_ext <<_ACEOF
17106 #line 17106 "configure"
17107 #include "confdefs.h"
17108 #include <stdio.h>
17109 /* If setvbuf has the reversed format, exit 0. */
17110 int
17111 main ()
17112 {
17113   /* This call has the arguments reversed.
17114      A reversed system may check and see that the address of main
17115      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17116   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17117     $ac_main_return(1);
17118   putc('\r', stdout);
17119   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17120 }
17121 _ACEOF
17122 rm -f conftest$ac_exeext
17123 if { (eval echo "$as_me:17123: \"$ac_link\"") >&5
17124   (eval $ac_link) 2>&5
17125   ac_status=$?
17126   echo "$as_me:17126: \$? = $ac_status" >&5
17127   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17128   { (eval echo "$as_me:17128: \"$ac_try\"") >&5
17129   (eval $ac_try) 2>&5
17130   ac_status=$?
17131   echo "$as_me:17131: \$? = $ac_status" >&5
17132   (exit $ac_status); }; }; then
17133   ac_cv_func_setvbuf_reversed=yes
17134 else
17135   echo "$as_me: program exited with status $ac_status" >&5
17136 echo "$as_me: failed program was:" >&5
17137 cat conftest.$ac_ext >&5
17138 ac_cv_func_setvbuf_reversed=no
17139 fi
17140 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17141 fi
17142 rm -f core core.* *.core
17143 fi
17144 echo "$as_me:17144: result: $ac_cv_func_setvbuf_reversed" >&5
17145 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17146 if test $ac_cv_func_setvbuf_reversed = yes; then
17147
17148 cat >>confdefs.h <<\EOF
17149 #define SETVBUF_REVERSED 1
17150 EOF
17151
17152 fi
17153
17154 fi
17155 echo "$as_me:17155: checking for intptr_t" >&5
17156 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17157 if test "${ac_cv_type_intptr_t+set}" = set; then
17158   echo $ECHO_N "(cached) $ECHO_C" >&6
17159 else
17160   cat >conftest.$ac_ext <<_ACEOF
17161 #line 17161 "configure"
17162 #include "confdefs.h"
17163 $ac_includes_default
17164 int
17165 main ()
17166 {
17167 if ((intptr_t *) 0)
17168   return 0;
17169 if (sizeof (intptr_t))
17170   return 0;
17171   ;
17172   return 0;
17173 }
17174 _ACEOF
17175 rm -f conftest.$ac_objext
17176 if { (eval echo "$as_me:17176: \"$ac_compile\"") >&5
17177   (eval $ac_compile) 2>&5
17178   ac_status=$?
17179   echo "$as_me:17179: \$? = $ac_status" >&5
17180   (exit $ac_status); } &&
17181          { ac_try='test -s conftest.$ac_objext'
17182   { (eval echo "$as_me:17182: \"$ac_try\"") >&5
17183   (eval $ac_try) 2>&5
17184   ac_status=$?
17185   echo "$as_me:17185: \$? = $ac_status" >&5
17186   (exit $ac_status); }; }; then
17187   ac_cv_type_intptr_t=yes
17188 else
17189   echo "$as_me: failed program was:" >&5
17190 cat conftest.$ac_ext >&5
17191 ac_cv_type_intptr_t=no
17192 fi
17193 rm -f conftest.$ac_objext conftest.$ac_ext
17194 fi
17195 echo "$as_me:17195: result: $ac_cv_type_intptr_t" >&5
17196 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17197 if test $ac_cv_type_intptr_t = yes; then
17198   :
17199 else
17200
17201 cat >>confdefs.h <<EOF
17202 #define intptr_t long
17203 EOF
17204
17205 fi
17206
17207 echo "$as_me:17207: checking for type sigaction_t" >&5
17208 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17209 if test "${cf_cv_type_sigaction+set}" = set; then
17210   echo $ECHO_N "(cached) $ECHO_C" >&6
17211 else
17212
17213         cat >conftest.$ac_ext <<_ACEOF
17214 #line 17214 "configure"
17215 #include "confdefs.h"
17216
17217 #include <signal.h>
17218 int
17219 main ()
17220 {
17221 sigaction_t x
17222   ;
17223   return 0;
17224 }
17225 _ACEOF
17226 rm -f conftest.$ac_objext
17227 if { (eval echo "$as_me:17227: \"$ac_compile\"") >&5
17228   (eval $ac_compile) 2>&5
17229   ac_status=$?
17230   echo "$as_me:17230: \$? = $ac_status" >&5
17231   (exit $ac_status); } &&
17232          { ac_try='test -s conftest.$ac_objext'
17233   { (eval echo "$as_me:17233: \"$ac_try\"") >&5
17234   (eval $ac_try) 2>&5
17235   ac_status=$?
17236   echo "$as_me:17236: \$? = $ac_status" >&5
17237   (exit $ac_status); }; }; then
17238   cf_cv_type_sigaction=yes
17239 else
17240   echo "$as_me: failed program was:" >&5
17241 cat conftest.$ac_ext >&5
17242 cf_cv_type_sigaction=no
17243 fi
17244 rm -f conftest.$ac_objext conftest.$ac_ext
17245 fi
17246
17247 echo "$as_me:17247: result: $cf_cv_type_sigaction" >&5
17248 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17249 test "$cf_cv_type_sigaction" = yes &&
17250 cat >>confdefs.h <<\EOF
17251 #define HAVE_TYPE_SIGACTION 1
17252 EOF
17253
17254 echo "$as_me:17254: checking declaration of size-change" >&5
17255 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17256 if test "${cf_cv_sizechange+set}" = set; then
17257   echo $ECHO_N "(cached) $ECHO_C" >&6
17258 else
17259
17260     cf_cv_sizechange=unknown
17261     cf_save_CPPFLAGS="$CPPFLAGS"
17262
17263 for cf_opts in "" "NEED_PTEM_H"
17264 do
17265
17266     CPPFLAGS="$cf_save_CPPFLAGS"
17267     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17268     cat >conftest.$ac_ext <<_ACEOF
17269 #line 17269 "configure"
17270 #include "confdefs.h"
17271 #include <sys/types.h>
17272 #ifdef HAVE_TERMIOS_H
17273 #include <termios.h>
17274 #else
17275 #ifdef HAVE_TERMIO_H
17276 #include <termio.h>
17277 #endif
17278 #endif
17279 #ifdef NEED_PTEM_H
17280 /* This is a workaround for SCO:  they neglected to define struct winsize in
17281  * termios.h -- it's only in termio.h and ptem.h
17282  */
17283 #include        <sys/stream.h>
17284 #include        <sys/ptem.h>
17285 #endif
17286 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17287 #include <sys/ioctl.h>
17288 #endif
17289
17290 int
17291 main ()
17292 {
17293
17294 #ifdef TIOCGSIZE
17295         struct ttysize win;     /* FIXME: what system is this? */
17296         int y = win.ts_lines;
17297         int x = win.ts_cols;
17298 #else
17299 #ifdef TIOCGWINSZ
17300         struct winsize win;
17301         int y = win.ws_row;
17302         int x = win.ws_col;
17303 #else
17304         no TIOCGSIZE or TIOCGWINSZ
17305 #endif /* TIOCGWINSZ */
17306 #endif /* TIOCGSIZE */
17307
17308   ;
17309   return 0;
17310 }
17311 _ACEOF
17312 rm -f conftest.$ac_objext
17313 if { (eval echo "$as_me:17313: \"$ac_compile\"") >&5
17314   (eval $ac_compile) 2>&5
17315   ac_status=$?
17316   echo "$as_me:17316: \$? = $ac_status" >&5
17317   (exit $ac_status); } &&
17318          { ac_try='test -s conftest.$ac_objext'
17319   { (eval echo "$as_me:17319: \"$ac_try\"") >&5
17320   (eval $ac_try) 2>&5
17321   ac_status=$?
17322   echo "$as_me:17322: \$? = $ac_status" >&5
17323   (exit $ac_status); }; }; then
17324   cf_cv_sizechange=yes
17325 else
17326   echo "$as_me: failed program was:" >&5
17327 cat conftest.$ac_ext >&5
17328 cf_cv_sizechange=no
17329 fi
17330 rm -f conftest.$ac_objext conftest.$ac_ext
17331
17332         CPPFLAGS="$cf_save_CPPFLAGS"
17333         if test "$cf_cv_sizechange" = yes ; then
17334                 echo "size-change succeeded ($cf_opts)" >&5
17335                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17336                 break
17337         fi
17338 done
17339
17340 fi
17341 echo "$as_me:17341: result: $cf_cv_sizechange" >&5
17342 echo "${ECHO_T}$cf_cv_sizechange" >&6
17343 if test "$cf_cv_sizechange" != no ; then
17344
17345 cat >>confdefs.h <<\EOF
17346 #define HAVE_SIZECHANGE 1
17347 EOF
17348
17349         case $cf_cv_sizechange in #(vi
17350         NEED*)
17351                 cat >>confdefs.h <<EOF
17352 #define $cf_cv_sizechange  1
17353 EOF
17354
17355                 ;;
17356         esac
17357 fi
17358
17359 echo "$as_me:17359: checking for memmove" >&5
17360 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17361 if test "${ac_cv_func_memmove+set}" = set; then
17362   echo $ECHO_N "(cached) $ECHO_C" >&6
17363 else
17364   cat >conftest.$ac_ext <<_ACEOF
17365 #line 17365 "configure"
17366 #include "confdefs.h"
17367 /* System header to define __stub macros and hopefully few prototypes,
17368     which can conflict with char memmove (); below.  */
17369 #include <assert.h>
17370 /* Override any gcc2 internal prototype to avoid an error.  */
17371 #ifdef __cplusplus
17372 extern "C"
17373 #endif
17374 /* We use char because int might match the return type of a gcc2
17375    builtin and then its argument prototype would still apply.  */
17376 char memmove ();
17377 char (*f) ();
17378
17379 int
17380 main ()
17381 {
17382 /* The GNU C library defines this for functions which it implements
17383     to always fail with ENOSYS.  Some functions are actually named
17384     something starting with __ and the normal name is an alias.  */
17385 #if defined (__stub_memmove) || defined (__stub___memmove)
17386 choke me
17387 #else
17388 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17389 #endif
17390
17391   ;
17392   return 0;
17393 }
17394 _ACEOF
17395 rm -f conftest.$ac_objext conftest$ac_exeext
17396 if { (eval echo "$as_me:17396: \"$ac_link\"") >&5
17397   (eval $ac_link) 2>&5
17398   ac_status=$?
17399   echo "$as_me:17399: \$? = $ac_status" >&5
17400   (exit $ac_status); } &&
17401          { ac_try='test -s conftest$ac_exeext'
17402   { (eval echo "$as_me:17402: \"$ac_try\"") >&5
17403   (eval $ac_try) 2>&5
17404   ac_status=$?
17405   echo "$as_me:17405: \$? = $ac_status" >&5
17406   (exit $ac_status); }; }; then
17407   ac_cv_func_memmove=yes
17408 else
17409   echo "$as_me: failed program was:" >&5
17410 cat conftest.$ac_ext >&5
17411 ac_cv_func_memmove=no
17412 fi
17413 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17414 fi
17415 echo "$as_me:17415: result: $ac_cv_func_memmove" >&5
17416 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17417 if test $ac_cv_func_memmove = yes; then
17418   :
17419 else
17420
17421 echo "$as_me:17421: checking for bcopy" >&5
17422 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17423 if test "${ac_cv_func_bcopy+set}" = set; then
17424   echo $ECHO_N "(cached) $ECHO_C" >&6
17425 else
17426   cat >conftest.$ac_ext <<_ACEOF
17427 #line 17427 "configure"
17428 #include "confdefs.h"
17429 /* System header to define __stub macros and hopefully few prototypes,
17430     which can conflict with char bcopy (); below.  */
17431 #include <assert.h>
17432 /* Override any gcc2 internal prototype to avoid an error.  */
17433 #ifdef __cplusplus
17434 extern "C"
17435 #endif
17436 /* We use char because int might match the return type of a gcc2
17437    builtin and then its argument prototype would still apply.  */
17438 char bcopy ();
17439 char (*f) ();
17440
17441 int
17442 main ()
17443 {
17444 /* The GNU C library defines this for functions which it implements
17445     to always fail with ENOSYS.  Some functions are actually named
17446     something starting with __ and the normal name is an alias.  */
17447 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17448 choke me
17449 #else
17450 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17451 #endif
17452
17453   ;
17454   return 0;
17455 }
17456 _ACEOF
17457 rm -f conftest.$ac_objext conftest$ac_exeext
17458 if { (eval echo "$as_me:17458: \"$ac_link\"") >&5
17459   (eval $ac_link) 2>&5
17460   ac_status=$?
17461   echo "$as_me:17461: \$? = $ac_status" >&5
17462   (exit $ac_status); } &&
17463          { ac_try='test -s conftest$ac_exeext'
17464   { (eval echo "$as_me:17464: \"$ac_try\"") >&5
17465   (eval $ac_try) 2>&5
17466   ac_status=$?
17467   echo "$as_me:17467: \$? = $ac_status" >&5
17468   (exit $ac_status); }; }; then
17469   ac_cv_func_bcopy=yes
17470 else
17471   echo "$as_me: failed program was:" >&5
17472 cat conftest.$ac_ext >&5
17473 ac_cv_func_bcopy=no
17474 fi
17475 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17476 fi
17477 echo "$as_me:17477: result: $ac_cv_func_bcopy" >&5
17478 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17479 if test $ac_cv_func_bcopy = yes; then
17480
17481         echo "$as_me:17481: checking if bcopy does overlapping moves" >&5
17482 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17483 if test "${cf_cv_good_bcopy+set}" = set; then
17484   echo $ECHO_N "(cached) $ECHO_C" >&6
17485 else
17486
17487                 if test "$cross_compiling" = yes; then
17488   cf_cv_good_bcopy=unknown
17489 else
17490   cat >conftest.$ac_ext <<_ACEOF
17491 #line 17491 "configure"
17492 #include "confdefs.h"
17493
17494 int main() {
17495         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17496         char temp[40];
17497         bcopy(data, temp, sizeof(data));
17498         bcopy(temp+10, temp, 15);
17499         bcopy(temp+5, temp+15, 10);
17500         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17501 }
17502
17503 _ACEOF
17504 rm -f conftest$ac_exeext
17505 if { (eval echo "$as_me:17505: \"$ac_link\"") >&5
17506   (eval $ac_link) 2>&5
17507   ac_status=$?
17508   echo "$as_me:17508: \$? = $ac_status" >&5
17509   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17510   { (eval echo "$as_me:17510: \"$ac_try\"") >&5
17511   (eval $ac_try) 2>&5
17512   ac_status=$?
17513   echo "$as_me:17513: \$? = $ac_status" >&5
17514   (exit $ac_status); }; }; then
17515   cf_cv_good_bcopy=yes
17516 else
17517   echo "$as_me: program exited with status $ac_status" >&5
17518 echo "$as_me: failed program was:" >&5
17519 cat conftest.$ac_ext >&5
17520 cf_cv_good_bcopy=no
17521 fi
17522 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17523 fi
17524
17525 fi
17526 echo "$as_me:17526: result: $cf_cv_good_bcopy" >&5
17527 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17528
17529 else
17530   cf_cv_good_bcopy=no
17531 fi
17532
17533         if test "$cf_cv_good_bcopy" = yes ; then
17534
17535 cat >>confdefs.h <<\EOF
17536 #define USE_OK_BCOPY 1
17537 EOF
17538
17539         else
17540
17541 cat >>confdefs.h <<\EOF
17542 #define USE_MY_MEMMOVE 1
17543 EOF
17544
17545         fi
17546
17547 fi
17548
17549 echo "$as_me:17549: checking if poll really works" >&5
17550 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17551 if test "${cf_cv_working_poll+set}" = set; then
17552   echo $ECHO_N "(cached) $ECHO_C" >&6
17553 else
17554
17555 if test "$cross_compiling" = yes; then
17556   cf_cv_working_poll=unknown
17557 else
17558   cat >conftest.$ac_ext <<_ACEOF
17559 #line 17559 "configure"
17560 #include "confdefs.h"
17561
17562 #include <stdlib.h>
17563 #include <stdio.h>
17564 #include <unistd.h>
17565 #include <fcntl.h>
17566 #ifdef HAVE_POLL_H
17567 #include <poll.h>
17568 #else
17569 #include <sys/poll.h>
17570 #endif
17571 int main() {
17572         struct pollfd myfds;
17573         int ret;
17574
17575         /* check for Darwin bug with respect to "devices" */
17576         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17577         if (myfds.fd < 0)
17578                 myfds.fd = 0;
17579         myfds.events = POLLIN;
17580         myfds.revents = 0;
17581
17582         ret = poll(&myfds, 1, 100);
17583
17584         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17585                 ret = -1;
17586         } else {
17587                 int fd = 0;
17588                 if (!isatty(fd)) {
17589                         fd = open("/dev/tty", 2);       /* O_RDWR */
17590                 }
17591
17592                 if (fd >= 0) {
17593                         /* also check with standard input */
17594                         myfds.fd = fd;
17595                         myfds.events = POLLIN;
17596                         myfds.revents = 0;
17597                         ret = poll(&myfds, 1, 100);
17598                 } else {
17599                         ret = -1;
17600                 }
17601         }
17602         ${cf_cv_main_return:-return}(ret < 0);
17603 }
17604 _ACEOF
17605 rm -f conftest$ac_exeext
17606 if { (eval echo "$as_me:17606: \"$ac_link\"") >&5
17607   (eval $ac_link) 2>&5
17608   ac_status=$?
17609   echo "$as_me:17609: \$? = $ac_status" >&5
17610   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17611   { (eval echo "$as_me:17611: \"$ac_try\"") >&5
17612   (eval $ac_try) 2>&5
17613   ac_status=$?
17614   echo "$as_me:17614: \$? = $ac_status" >&5
17615   (exit $ac_status); }; }; then
17616   cf_cv_working_poll=yes
17617 else
17618   echo "$as_me: program exited with status $ac_status" >&5
17619 echo "$as_me: failed program was:" >&5
17620 cat conftest.$ac_ext >&5
17621 cf_cv_working_poll=no
17622 fi
17623 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17624 fi
17625 fi
17626 echo "$as_me:17626: result: $cf_cv_working_poll" >&5
17627 echo "${ECHO_T}$cf_cv_working_poll" >&6
17628 test "$cf_cv_working_poll" = "yes" &&
17629 cat >>confdefs.h <<\EOF
17630 #define HAVE_WORKING_POLL 1
17631 EOF
17632
17633 echo "$as_me:17633: checking for va_copy" >&5
17634 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17635 if test "${cf_cv_have_va_copy+set}" = set; then
17636   echo $ECHO_N "(cached) $ECHO_C" >&6
17637 else
17638
17639 cat >conftest.$ac_ext <<_ACEOF
17640 #line 17640 "configure"
17641 #include "confdefs.h"
17642
17643 #include <stdarg.h>
17644
17645 int
17646 main ()
17647 {
17648
17649         static va_list dst;
17650         static va_list src;
17651         va_copy(dst, src)
17652   ;
17653   return 0;
17654 }
17655 _ACEOF
17656 rm -f conftest.$ac_objext conftest$ac_exeext
17657 if { (eval echo "$as_me:17657: \"$ac_link\"") >&5
17658   (eval $ac_link) 2>&5
17659   ac_status=$?
17660   echo "$as_me:17660: \$? = $ac_status" >&5
17661   (exit $ac_status); } &&
17662          { ac_try='test -s conftest$ac_exeext'
17663   { (eval echo "$as_me:17663: \"$ac_try\"") >&5
17664   (eval $ac_try) 2>&5
17665   ac_status=$?
17666   echo "$as_me:17666: \$? = $ac_status" >&5
17667   (exit $ac_status); }; }; then
17668   cf_cv_have_va_copy=yes
17669 else
17670   echo "$as_me: failed program was:" >&5
17671 cat conftest.$ac_ext >&5
17672 cf_cv_have_va_copy=no
17673 fi
17674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17675 fi
17676 echo "$as_me:17676: result: $cf_cv_have_va_copy" >&5
17677 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17678
17679 test "$cf_cv_have_va_copy" = yes &&
17680 cat >>confdefs.h <<\EOF
17681 #define HAVE_VA_COPY 1
17682 EOF
17683
17684 echo "$as_me:17684: checking for __va_copy" >&5
17685 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17686 if test "${cf_cv_have___va_copy+set}" = set; then
17687   echo $ECHO_N "(cached) $ECHO_C" >&6
17688 else
17689
17690 cat >conftest.$ac_ext <<_ACEOF
17691 #line 17691 "configure"
17692 #include "confdefs.h"
17693
17694 #include <stdarg.h>
17695
17696 int
17697 main ()
17698 {
17699
17700         static va_list dst;
17701         static va_list src;
17702         __va_copy(dst, src)
17703   ;
17704   return 0;
17705 }
17706 _ACEOF
17707 rm -f conftest.$ac_objext conftest$ac_exeext
17708 if { (eval echo "$as_me:17708: \"$ac_link\"") >&5
17709   (eval $ac_link) 2>&5
17710   ac_status=$?
17711   echo "$as_me:17711: \$? = $ac_status" >&5
17712   (exit $ac_status); } &&
17713          { ac_try='test -s conftest$ac_exeext'
17714   { (eval echo "$as_me:17714: \"$ac_try\"") >&5
17715   (eval $ac_try) 2>&5
17716   ac_status=$?
17717   echo "$as_me:17717: \$? = $ac_status" >&5
17718   (exit $ac_status); }; }; then
17719   cf_cv_have___va_copy=yes
17720 else
17721   echo "$as_me: failed program was:" >&5
17722 cat conftest.$ac_ext >&5
17723 cf_cv_have___va_copy=no
17724 fi
17725 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17726 fi
17727 echo "$as_me:17727: result: $cf_cv_have___va_copy" >&5
17728 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17729
17730 test "$cf_cv_have___va_copy" = yes &&
17731 cat >>confdefs.h <<\EOF
17732 #define HAVE___VA_COPY 1
17733 EOF
17734
17735 echo "$as_me:17735: checking for pid_t" >&5
17736 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17737 if test "${ac_cv_type_pid_t+set}" = set; then
17738   echo $ECHO_N "(cached) $ECHO_C" >&6
17739 else
17740   cat >conftest.$ac_ext <<_ACEOF
17741 #line 17741 "configure"
17742 #include "confdefs.h"
17743 $ac_includes_default
17744 int
17745 main ()
17746 {
17747 if ((pid_t *) 0)
17748   return 0;
17749 if (sizeof (pid_t))
17750   return 0;
17751   ;
17752   return 0;
17753 }
17754 _ACEOF
17755 rm -f conftest.$ac_objext
17756 if { (eval echo "$as_me:17756: \"$ac_compile\"") >&5
17757   (eval $ac_compile) 2>&5
17758   ac_status=$?
17759   echo "$as_me:17759: \$? = $ac_status" >&5
17760   (exit $ac_status); } &&
17761          { ac_try='test -s conftest.$ac_objext'
17762   { (eval echo "$as_me:17762: \"$ac_try\"") >&5
17763   (eval $ac_try) 2>&5
17764   ac_status=$?
17765   echo "$as_me:17765: \$? = $ac_status" >&5
17766   (exit $ac_status); }; }; then
17767   ac_cv_type_pid_t=yes
17768 else
17769   echo "$as_me: failed program was:" >&5
17770 cat conftest.$ac_ext >&5
17771 ac_cv_type_pid_t=no
17772 fi
17773 rm -f conftest.$ac_objext conftest.$ac_ext
17774 fi
17775 echo "$as_me:17775: result: $ac_cv_type_pid_t" >&5
17776 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17777 if test $ac_cv_type_pid_t = yes; then
17778   :
17779 else
17780
17781 cat >>confdefs.h <<EOF
17782 #define pid_t int
17783 EOF
17784
17785 fi
17786
17787 for ac_header in unistd.h vfork.h
17788 do
17789 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17790 echo "$as_me:17790: checking for $ac_header" >&5
17791 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17792 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17793   echo $ECHO_N "(cached) $ECHO_C" >&6
17794 else
17795   cat >conftest.$ac_ext <<_ACEOF
17796 #line 17796 "configure"
17797 #include "confdefs.h"
17798 #include <$ac_header>
17799 _ACEOF
17800 if { (eval echo "$as_me:17800: \"$ac_cpp conftest.$ac_ext\"") >&5
17801   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17802   ac_status=$?
17803   egrep -v '^ *\+' conftest.er1 >conftest.err
17804   rm -f conftest.er1
17805   cat conftest.err >&5
17806   echo "$as_me:17806: \$? = $ac_status" >&5
17807   (exit $ac_status); } >/dev/null; then
17808   if test -s conftest.err; then
17809     ac_cpp_err=$ac_c_preproc_warn_flag
17810   else
17811     ac_cpp_err=
17812   fi
17813 else
17814   ac_cpp_err=yes
17815 fi
17816 if test -z "$ac_cpp_err"; then
17817   eval "$as_ac_Header=yes"
17818 else
17819   echo "$as_me: failed program was:" >&5
17820   cat conftest.$ac_ext >&5
17821   eval "$as_ac_Header=no"
17822 fi
17823 rm -f conftest.err conftest.$ac_ext
17824 fi
17825 echo "$as_me:17825: result: `eval echo '${'$as_ac_Header'}'`" >&5
17826 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17827 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17828   cat >>confdefs.h <<EOF
17829 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17830 EOF
17831
17832 fi
17833 done
17834
17835 for ac_func in fork vfork
17836 do
17837 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17838 echo "$as_me:17838: checking for $ac_func" >&5
17839 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17840 if eval "test \"\${$as_ac_var+set}\" = set"; then
17841   echo $ECHO_N "(cached) $ECHO_C" >&6
17842 else
17843   cat >conftest.$ac_ext <<_ACEOF
17844 #line 17844 "configure"
17845 #include "confdefs.h"
17846 /* System header to define __stub macros and hopefully few prototypes,
17847     which can conflict with char $ac_func (); below.  */
17848 #include <assert.h>
17849 /* Override any gcc2 internal prototype to avoid an error.  */
17850 #ifdef __cplusplus
17851 extern "C"
17852 #endif
17853 /* We use char because int might match the return type of a gcc2
17854    builtin and then its argument prototype would still apply.  */
17855 char $ac_func ();
17856 char (*f) ();
17857
17858 int
17859 main ()
17860 {
17861 /* The GNU C library defines this for functions which it implements
17862     to always fail with ENOSYS.  Some functions are actually named
17863     something starting with __ and the normal name is an alias.  */
17864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17865 choke me
17866 #else
17867 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17868 #endif
17869
17870   ;
17871   return 0;
17872 }
17873 _ACEOF
17874 rm -f conftest.$ac_objext conftest$ac_exeext
17875 if { (eval echo "$as_me:17875: \"$ac_link\"") >&5
17876   (eval $ac_link) 2>&5
17877   ac_status=$?
17878   echo "$as_me:17878: \$? = $ac_status" >&5
17879   (exit $ac_status); } &&
17880          { ac_try='test -s conftest$ac_exeext'
17881   { (eval echo "$as_me:17881: \"$ac_try\"") >&5
17882   (eval $ac_try) 2>&5
17883   ac_status=$?
17884   echo "$as_me:17884: \$? = $ac_status" >&5
17885   (exit $ac_status); }; }; then
17886   eval "$as_ac_var=yes"
17887 else
17888   echo "$as_me: failed program was:" >&5
17889 cat conftest.$ac_ext >&5
17890 eval "$as_ac_var=no"
17891 fi
17892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17893 fi
17894 echo "$as_me:17894: result: `eval echo '${'$as_ac_var'}'`" >&5
17895 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17896 if test `eval echo '${'$as_ac_var'}'` = yes; then
17897   cat >>confdefs.h <<EOF
17898 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17899 EOF
17900
17901 fi
17902 done
17903
17904 ac_cv_func_fork_works=$ac_cv_func_fork
17905 if test "x$ac_cv_func_fork" = xyes; then
17906   echo "$as_me:17906: checking for working fork" >&5
17907 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17908 if test "${ac_cv_func_fork_works+set}" = set; then
17909   echo $ECHO_N "(cached) $ECHO_C" >&6
17910 else
17911   if test "$cross_compiling" = yes; then
17912   ac_cv_func_fork_works=cross
17913 else
17914   cat >conftest.$ac_ext <<_ACEOF
17915 /* By Rüdiger Kuhlmann. */
17916       #include <sys/types.h>
17917       #if HAVE_UNISTD_H
17918       # include <unistd.h>
17919       #endif
17920       /* Some systems only have a dummy stub for fork() */
17921       int main ()
17922       {
17923         if (fork() < 0)
17924           $ac_main_return (1);
17925         $ac_main_return (0);
17926       }
17927 _ACEOF
17928 rm -f conftest$ac_exeext
17929 if { (eval echo "$as_me:17929: \"$ac_link\"") >&5
17930   (eval $ac_link) 2>&5
17931   ac_status=$?
17932   echo "$as_me:17932: \$? = $ac_status" >&5
17933   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17934   { (eval echo "$as_me:17934: \"$ac_try\"") >&5
17935   (eval $ac_try) 2>&5
17936   ac_status=$?
17937   echo "$as_me:17937: \$? = $ac_status" >&5
17938   (exit $ac_status); }; }; then
17939   ac_cv_func_fork_works=yes
17940 else
17941   echo "$as_me: program exited with status $ac_status" >&5
17942 echo "$as_me: failed program was:" >&5
17943 cat conftest.$ac_ext >&5
17944 ac_cv_func_fork_works=no
17945 fi
17946 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17947 fi
17948 fi
17949 echo "$as_me:17949: result: $ac_cv_func_fork_works" >&5
17950 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17951
17952 fi
17953 if test "x$ac_cv_func_fork_works" = xcross; then
17954   case $host in
17955     *-*-amigaos* | *-*-msdosdjgpp*)
17956       # Override, as these systems have only a dummy fork() stub
17957       ac_cv_func_fork_works=no
17958       ;;
17959     *)
17960       ac_cv_func_fork_works=yes
17961       ;;
17962   esac
17963   { echo "$as_me:17963: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17964 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17965 fi
17966 ac_cv_func_vfork_works=$ac_cv_func_vfork
17967 if test "x$ac_cv_func_vfork" = xyes; then
17968   echo "$as_me:17968: checking for working vfork" >&5
17969 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17970 if test "${ac_cv_func_vfork_works+set}" = set; then
17971   echo $ECHO_N "(cached) $ECHO_C" >&6
17972 else
17973   if test "$cross_compiling" = yes; then
17974   ac_cv_func_vfork_works=cross
17975 else
17976   cat >conftest.$ac_ext <<_ACEOF
17977 #line 17977 "configure"
17978 #include "confdefs.h"
17979 /* Thanks to Paul Eggert for this test.  */
17980 #include <stdio.h>
17981 #include <sys/types.h>
17982 #include <sys/stat.h>
17983 #if HAVE_UNISTD_H
17984 # include <unistd.h>
17985 #endif
17986 #if HAVE_VFORK_H
17987 # include <vfork.h>
17988 #endif
17989 /* On some sparc systems, changes by the child to local and incoming
17990    argument registers are propagated back to the parent.  The compiler
17991    is told about this with #include <vfork.h>, but some compilers
17992    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17993    static variable whose address is put into a register that is
17994    clobbered by the vfork.  */
17995 static
17996 #ifdef __cplusplus
17997 sparc_address_test (int arg)
17998 # else
17999 sparc_address_test (arg) int arg;
18000 #endif
18001 {
18002   static pid_t child;
18003   if (!child) {
18004     child = vfork ();
18005     if (child < 0) {
18006       perror ("vfork");
18007       _exit(2);
18008     }
18009     if (!child) {
18010       arg = getpid();
18011       write(-1, "", 0);
18012       _exit (arg);
18013     }
18014   }
18015 }
18016
18017 int
18018 main ()
18019 {
18020   pid_t parent = getpid ();
18021   pid_t child;
18022
18023   sparc_address_test ();
18024
18025   child = vfork ();
18026
18027   if (child == 0) {
18028     /* Here is another test for sparc vfork register problems.  This
18029        test uses lots of local variables, at least as many local
18030        variables as main has allocated so far including compiler
18031        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18032        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18033        reuse the register of parent for one of the local variables,
18034        since it will think that parent can't possibly be used any more
18035        in this routine.  Assigning to the local variable will thus
18036        munge parent in the parent process.  */
18037     pid_t
18038       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18039       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18040     /* Convince the compiler that p..p7 are live; otherwise, it might
18041        use the same hardware register for all 8 local variables.  */
18042     if (p != p1 || p != p2 || p != p3 || p != p4
18043         || p != p5 || p != p6 || p != p7)
18044       _exit(1);
18045
18046     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18047        from child file descriptors.  If the child closes a descriptor
18048        before it execs or exits, this munges the parent's descriptor
18049        as well.  Test for this by closing stdout in the child.  */
18050     _exit(close(fileno(stdout)) != 0);
18051   } else {
18052     int status;
18053     struct stat st;
18054
18055     while (wait(&status) != child)
18056       ;
18057     $ac_main_return(
18058          /* Was there some problem with vforking?  */
18059          child < 0
18060
18061          /* Did the child fail?  (This shouldn't happen.)  */
18062          || status
18063
18064          /* Did the vfork/compiler bug occur?  */
18065          || parent != getpid()
18066
18067          /* Did the file descriptor bug occur?  */
18068          || fstat(fileno(stdout), &st) != 0
18069          );
18070   }
18071 }
18072 _ACEOF
18073 rm -f conftest$ac_exeext
18074 if { (eval echo "$as_me:18074: \"$ac_link\"") >&5
18075   (eval $ac_link) 2>&5
18076   ac_status=$?
18077   echo "$as_me:18077: \$? = $ac_status" >&5
18078   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18079   { (eval echo "$as_me:18079: \"$ac_try\"") >&5
18080   (eval $ac_try) 2>&5
18081   ac_status=$?
18082   echo "$as_me:18082: \$? = $ac_status" >&5
18083   (exit $ac_status); }; }; then
18084   ac_cv_func_vfork_works=yes
18085 else
18086   echo "$as_me: program exited with status $ac_status" >&5
18087 echo "$as_me: failed program was:" >&5
18088 cat conftest.$ac_ext >&5
18089 ac_cv_func_vfork_works=no
18090 fi
18091 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18092 fi
18093 fi
18094 echo "$as_me:18094: result: $ac_cv_func_vfork_works" >&5
18095 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18096
18097 fi;
18098 if test "x$ac_cv_func_fork_works" = xcross; then
18099   ac_cv_func_vfork_works=ac_cv_func_vfork
18100   { echo "$as_me:18100: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18101 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18102 fi
18103
18104 if test "x$ac_cv_func_vfork_works" = xyes; then
18105
18106 cat >>confdefs.h <<\EOF
18107 #define HAVE_WORKING_VFORK 1
18108 EOF
18109
18110 else
18111
18112 cat >>confdefs.h <<\EOF
18113 #define vfork fork
18114 EOF
18115
18116 fi
18117 if test "x$ac_cv_func_fork_works" = xyes; then
18118
18119 cat >>confdefs.h <<\EOF
18120 #define HAVE_WORKING_FORK 1
18121 EOF
18122
18123 fi
18124
18125 # special check for test/ditto.c
18126
18127 echo "$as_me:18127: checking for openpty in -lutil" >&5
18128 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18129 if test "${ac_cv_lib_util_openpty+set}" = set; then
18130   echo $ECHO_N "(cached) $ECHO_C" >&6
18131 else
18132   ac_check_lib_save_LIBS=$LIBS
18133 LIBS="-lutil  $LIBS"
18134 cat >conftest.$ac_ext <<_ACEOF
18135 #line 18135 "configure"
18136 #include "confdefs.h"
18137
18138 /* Override any gcc2 internal prototype to avoid an error.  */
18139 #ifdef __cplusplus
18140 extern "C"
18141 #endif
18142 /* We use char because int might match the return type of a gcc2
18143    builtin and then its argument prototype would still apply.  */
18144 char openpty ();
18145 int
18146 main ()
18147 {
18148 openpty ();
18149   ;
18150   return 0;
18151 }
18152 _ACEOF
18153 rm -f conftest.$ac_objext conftest$ac_exeext
18154 if { (eval echo "$as_me:18154: \"$ac_link\"") >&5
18155   (eval $ac_link) 2>&5
18156   ac_status=$?
18157   echo "$as_me:18157: \$? = $ac_status" >&5
18158   (exit $ac_status); } &&
18159          { ac_try='test -s conftest$ac_exeext'
18160   { (eval echo "$as_me:18160: \"$ac_try\"") >&5
18161   (eval $ac_try) 2>&5
18162   ac_status=$?
18163   echo "$as_me:18163: \$? = $ac_status" >&5
18164   (exit $ac_status); }; }; then
18165   ac_cv_lib_util_openpty=yes
18166 else
18167   echo "$as_me: failed program was:" >&5
18168 cat conftest.$ac_ext >&5
18169 ac_cv_lib_util_openpty=no
18170 fi
18171 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18172 LIBS=$ac_check_lib_save_LIBS
18173 fi
18174 echo "$as_me:18174: result: $ac_cv_lib_util_openpty" >&5
18175 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18176 if test $ac_cv_lib_util_openpty = yes; then
18177   cf_cv_lib_util=yes
18178 else
18179   cf_cv_lib_util=no
18180 fi
18181
18182 echo "$as_me:18182: checking for openpty header" >&5
18183 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18184 if test "${cf_cv_func_openpty+set}" = set; then
18185   echo $ECHO_N "(cached) $ECHO_C" >&6
18186 else
18187
18188     cf_save_LIBS="$LIBS"
18189     test $cf_cv_lib_util = yes &&
18190 cf_add_libs="-lutil"
18191 # Filter out duplicates - this happens with badly-designed ".pc" files...
18192 for cf_add_1lib in $LIBS
18193 do
18194         for cf_add_2lib in $cf_add_libs
18195         do
18196                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18197                 then
18198                         cf_add_1lib=
18199                         break
18200                 fi
18201         done
18202         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18203 done
18204 LIBS="$cf_add_libs"
18205
18206     for cf_header in pty.h libutil.h util.h
18207     do
18208     cat >conftest.$ac_ext <<_ACEOF
18209 #line 18209 "configure"
18210 #include "confdefs.h"
18211
18212 #include <$cf_header>
18213
18214 int
18215 main ()
18216 {
18217
18218     int x = openpty((int *)0, (int *)0, (char *)0,
18219                    (struct termios *)0, (struct winsize *)0);
18220
18221   ;
18222   return 0;
18223 }
18224 _ACEOF
18225 rm -f conftest.$ac_objext conftest$ac_exeext
18226 if { (eval echo "$as_me:18226: \"$ac_link\"") >&5
18227   (eval $ac_link) 2>&5
18228   ac_status=$?
18229   echo "$as_me:18229: \$? = $ac_status" >&5
18230   (exit $ac_status); } &&
18231          { ac_try='test -s conftest$ac_exeext'
18232   { (eval echo "$as_me:18232: \"$ac_try\"") >&5
18233   (eval $ac_try) 2>&5
18234   ac_status=$?
18235   echo "$as_me:18235: \$? = $ac_status" >&5
18236   (exit $ac_status); }; }; then
18237
18238         cf_cv_func_openpty=$cf_header
18239         break
18240
18241 else
18242   echo "$as_me: failed program was:" >&5
18243 cat conftest.$ac_ext >&5
18244
18245         cf_cv_func_openpty=no
18246
18247 fi
18248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18249     done
18250     LIBS="$cf_save_LIBS"
18251
18252 fi
18253 echo "$as_me:18253: result: $cf_cv_func_openpty" >&5
18254 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18255
18256 if test "$cf_cv_func_openpty" != no ; then
18257
18258 cat >>confdefs.h <<EOF
18259 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18260 EOF
18261
18262 cat >>confdefs.h <<\EOF
18263 #define USE_XTERM_PTY 1
18264 EOF
18265
18266     if test "x$cf_cv_lib_util" = xyes ; then
18267
18268 cf_add_libs="-lutil"
18269 # Filter out duplicates - this happens with badly-designed ".pc" files...
18270 for cf_add_1lib in $TEST_LIBS
18271 do
18272         for cf_add_2lib in $cf_add_libs
18273         do
18274                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18275                 then
18276                         cf_add_1lib=
18277                         break
18278                 fi
18279         done
18280         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18281 done
18282 TEST_LIBS="$cf_add_libs"
18283
18284     fi
18285 fi
18286
18287 if test "$with_hashed_db" != no ; then
18288
18289 cat >>confdefs.h <<\EOF
18290 #define USE_HASHED_DB 1
18291 EOF
18292
18293 case $with_hashed_db in #(vi
18294 yes|*able*) #(vi
18295     ;;
18296 *)
18297     if test -d "$with_hashed_db" ; then
18298
18299 if test -n "$with_hashed_db/include" ; then
18300   for cf_add_incdir in $with_hashed_db/include
18301   do
18302         while test $cf_add_incdir != /usr/include
18303         do
18304           if test -d $cf_add_incdir
18305           then
18306                 cf_have_incdir=no
18307                 if test -n "$CFLAGS$CPPFLAGS" ; then
18308                   # a loop is needed to ensure we can add subdirs of existing dirs
18309                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18310                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18311                           cf_have_incdir=yes; break
18312                         fi
18313                   done
18314                 fi
18315
18316                 if test "$cf_have_incdir" = no ; then
18317                   if test "$cf_add_incdir" = /usr/local/include ; then
18318                         if test "$GCC" = yes
18319                         then
18320                           cf_save_CPPFLAGS=$CPPFLAGS
18321                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18322                           cat >conftest.$ac_ext <<_ACEOF
18323 #line 18323 "configure"
18324 #include "confdefs.h"
18325 #include <stdio.h>
18326 int
18327 main ()
18328 {
18329 printf("Hello")
18330   ;
18331   return 0;
18332 }
18333 _ACEOF
18334 rm -f conftest.$ac_objext
18335 if { (eval echo "$as_me:18335: \"$ac_compile\"") >&5
18336   (eval $ac_compile) 2>&5
18337   ac_status=$?
18338   echo "$as_me:18338: \$? = $ac_status" >&5
18339   (exit $ac_status); } &&
18340          { ac_try='test -s conftest.$ac_objext'
18341   { (eval echo "$as_me:18341: \"$ac_try\"") >&5
18342   (eval $ac_try) 2>&5
18343   ac_status=$?
18344   echo "$as_me:18344: \$? = $ac_status" >&5
18345   (exit $ac_status); }; }; then
18346   :
18347 else
18348   echo "$as_me: failed program was:" >&5
18349 cat conftest.$ac_ext >&5
18350 cf_have_incdir=yes
18351 fi
18352 rm -f conftest.$ac_objext conftest.$ac_ext
18353                           CPPFLAGS=$cf_save_CPPFLAGS
18354                         fi
18355                   fi
18356                 fi
18357
18358                 if test "$cf_have_incdir" = no ; then
18359                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18360
18361 echo "${as_me:-configure}:18361: testing adding $cf_add_incdir to include-path ..." 1>&5
18362
18363                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18364
18365                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18366                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18367                   cf_add_incdir="$cf_top_incdir"
18368                 else
18369                   break
18370                 fi
18371           fi
18372         done
18373   done
18374 fi
18375
18376 if test -n "$with_hashed_db/lib" ; then
18377   for cf_add_libdir in $with_hashed_db/lib
18378   do
18379     if test $cf_add_libdir = /usr/lib ; then
18380       :
18381     elif test -d $cf_add_libdir
18382     then
18383       cf_have_libdir=no
18384       if test -n "$LDFLAGS$LIBS" ; then
18385         # a loop is needed to ensure we can add subdirs of existing dirs
18386         for cf_test_libdir in $LDFLAGS $LIBS ; do
18387           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18388             cf_have_libdir=yes; break
18389           fi
18390         done
18391       fi
18392       if test "$cf_have_libdir" = no ; then
18393         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18394
18395 echo "${as_me:-configure}:18395: testing adding $cf_add_libdir to library-path ..." 1>&5
18396
18397         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18398       fi
18399     fi
18400   done
18401 fi
18402
18403         else
18404                 case "$with_hashed_db" in #(vi
18405                 ./*|../*|/*)
18406                         { echo "$as_me:18406: WARNING: no such directory $with_hashed_db" >&5
18407 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18408                         ;; #(vi
18409                 *)
18410
18411 cf_search=
18412
18413 test "x/usr" != "x$prefix" && \
18414 test -d "/usr" && \
18415 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18416         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
18417         test -d /usr/include &&          cf_search="$cf_search /usr/include"
18418         test -d /usr/include/$with_hashed_db &&       cf_search="$cf_search /usr/include/$with_hashed_db"
18419         test -d /usr/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/include/$with_hashed_db/include"
18420         test -d /usr/$with_hashed_db/include &&       cf_search="$cf_search /usr/$with_hashed_db/include"
18421         test -d /usr/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/include/$with_hashed_db"
18422 }
18423
18424 test "x$prefix" != "xNONE" && \
18425 test -d "$prefix" && \
18426  {
18427         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18428         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18429         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18430         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18431         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18432         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18433 }
18434
18435 test "x/usr/local" != "x$prefix" && \
18436 test -d "/usr/local" && \
18437 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18438         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
18439         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
18440         test -d /usr/local/include/$with_hashed_db &&       cf_search="$cf_search /usr/local/include/$with_hashed_db"
18441         test -d /usr/local/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/local/include/$with_hashed_db/include"
18442         test -d /usr/local/$with_hashed_db/include &&       cf_search="$cf_search /usr/local/$with_hashed_db/include"
18443         test -d /usr/local/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/include/$with_hashed_db"
18444 }
18445
18446 test "x/opt" != "x$prefix" && \
18447 test -d "/opt" && \
18448 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18449         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
18450         test -d /opt/include &&          cf_search="$cf_search /opt/include"
18451         test -d /opt/include/$with_hashed_db &&       cf_search="$cf_search /opt/include/$with_hashed_db"
18452         test -d /opt/include/$with_hashed_db/include &&    cf_search="$cf_search /opt/include/$with_hashed_db/include"
18453         test -d /opt/$with_hashed_db/include &&       cf_search="$cf_search /opt/$with_hashed_db/include"
18454         test -d /opt/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/include/$with_hashed_db"
18455 }
18456
18457 test "x$HOME" != "x$prefix" && \
18458 test -d "$HOME" && \
18459 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18460         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
18461         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
18462         test -d $HOME/include/$with_hashed_db &&       cf_search="$cf_search $HOME/include/$with_hashed_db"
18463         test -d $HOME/include/$with_hashed_db/include &&    cf_search="$cf_search $HOME/include/$with_hashed_db/include"
18464         test -d $HOME/$with_hashed_db/include &&       cf_search="$cf_search $HOME/$with_hashed_db/include"
18465         test -d $HOME/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/include/$with_hashed_db"
18466 }
18467
18468         for cf_item in $cf_search
18469         do
18470                 case $cf_item in #(vi
18471                 */$with_hashed_db)
18472
18473 if test -n "$cf_item" ; then
18474   for cf_add_incdir in $cf_item
18475   do
18476         while test $cf_add_incdir != /usr/include
18477         do
18478           if test -d $cf_add_incdir
18479           then
18480                 cf_have_incdir=no
18481                 if test -n "$CFLAGS$CPPFLAGS" ; then
18482                   # a loop is needed to ensure we can add subdirs of existing dirs
18483                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18484                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18485                           cf_have_incdir=yes; break
18486                         fi
18487                   done
18488                 fi
18489
18490                 if test "$cf_have_incdir" = no ; then
18491                   if test "$cf_add_incdir" = /usr/local/include ; then
18492                         if test "$GCC" = yes
18493                         then
18494                           cf_save_CPPFLAGS=$CPPFLAGS
18495                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18496                           cat >conftest.$ac_ext <<_ACEOF
18497 #line 18497 "configure"
18498 #include "confdefs.h"
18499 #include <stdio.h>
18500 int
18501 main ()
18502 {
18503 printf("Hello")
18504   ;
18505   return 0;
18506 }
18507 _ACEOF
18508 rm -f conftest.$ac_objext
18509 if { (eval echo "$as_me:18509: \"$ac_compile\"") >&5
18510   (eval $ac_compile) 2>&5
18511   ac_status=$?
18512   echo "$as_me:18512: \$? = $ac_status" >&5
18513   (exit $ac_status); } &&
18514          { ac_try='test -s conftest.$ac_objext'
18515   { (eval echo "$as_me:18515: \"$ac_try\"") >&5
18516   (eval $ac_try) 2>&5
18517   ac_status=$?
18518   echo "$as_me:18518: \$? = $ac_status" >&5
18519   (exit $ac_status); }; }; then
18520   :
18521 else
18522   echo "$as_me: failed program was:" >&5
18523 cat conftest.$ac_ext >&5
18524 cf_have_incdir=yes
18525 fi
18526 rm -f conftest.$ac_objext conftest.$ac_ext
18527                           CPPFLAGS=$cf_save_CPPFLAGS
18528                         fi
18529                   fi
18530                 fi
18531
18532                 if test "$cf_have_incdir" = no ; then
18533                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18534
18535 echo "${as_me:-configure}:18535: testing adding $cf_add_incdir to include-path ..." 1>&5
18536
18537                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18538
18539                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18540                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18541                   cf_add_incdir="$cf_top_incdir"
18542                 else
18543                   break
18544                 fi
18545           fi
18546         done
18547   done
18548 fi
18549
18550                         ;;
18551                 esac
18552         done
18553
18554 cf_search=
18555
18556 test "x/usr" != "x$prefix" && \
18557 test -d "/usr" && \
18558 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18559         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
18560         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
18561         test -d /usr/lib/$with_hashed_db &&       cf_search="$cf_search /usr/lib/$with_hashed_db"
18562         test -d /usr/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/lib/$with_hashed_db/lib"
18563         test -d /usr/$with_hashed_db/lib &&       cf_search="$cf_search /usr/$with_hashed_db/lib"
18564         test -d /usr/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/lib/$with_hashed_db"
18565 }
18566
18567 test "x$prefix" != "xNONE" && \
18568 test -d "$prefix" && \
18569  {
18570         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18571         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18572         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18573         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18574         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18575         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18576 }
18577
18578 test "x/usr/local" != "x$prefix" && \
18579 test -d "/usr/local" && \
18580 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18581         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
18582         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
18583         test -d /usr/local/lib/$with_hashed_db &&       cf_search="$cf_search /usr/local/lib/$with_hashed_db"
18584         test -d /usr/local/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/local/lib/$with_hashed_db/lib"
18585         test -d /usr/local/$with_hashed_db/lib &&       cf_search="$cf_search /usr/local/$with_hashed_db/lib"
18586         test -d /usr/local/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/lib/$with_hashed_db"
18587 }
18588
18589 test "x/opt" != "x$prefix" && \
18590 test -d "/opt" && \
18591 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18592         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
18593         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
18594         test -d /opt/lib/$with_hashed_db &&       cf_search="$cf_search /opt/lib/$with_hashed_db"
18595         test -d /opt/lib/$with_hashed_db/lib &&    cf_search="$cf_search /opt/lib/$with_hashed_db/lib"
18596         test -d /opt/$with_hashed_db/lib &&       cf_search="$cf_search /opt/$with_hashed_db/lib"
18597         test -d /opt/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/lib/$with_hashed_db"
18598 }
18599
18600 test "x$HOME" != "x$prefix" && \
18601 test -d "$HOME" && \
18602 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18603         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
18604         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
18605         test -d $HOME/lib/$with_hashed_db &&       cf_search="$cf_search $HOME/lib/$with_hashed_db"
18606         test -d $HOME/lib/$with_hashed_db/lib &&    cf_search="$cf_search $HOME/lib/$with_hashed_db/lib"
18607         test -d $HOME/$with_hashed_db/lib &&       cf_search="$cf_search $HOME/$with_hashed_db/lib"
18608         test -d $HOME/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/lib/$with_hashed_db"
18609 }
18610
18611         for cf_item in $cf_search
18612         do
18613                 case $cf_item in #(vi
18614                 */$with_hashed_db)
18615
18616 if test -n "$cf_item" ; then
18617   for cf_add_libdir in $cf_item
18618   do
18619     if test $cf_add_libdir = /usr/lib ; then
18620       :
18621     elif test -d $cf_add_libdir
18622     then
18623       cf_have_libdir=no
18624       if test -n "$LDFLAGS$LIBS" ; then
18625         # a loop is needed to ensure we can add subdirs of existing dirs
18626         for cf_test_libdir in $LDFLAGS $LIBS ; do
18627           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18628             cf_have_libdir=yes; break
18629           fi
18630         done
18631       fi
18632       if test "$cf_have_libdir" = no ; then
18633         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18634
18635 echo "${as_me:-configure}:18635: testing adding $cf_add_libdir to library-path ..." 1>&5
18636
18637         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18638       fi
18639     fi
18640   done
18641 fi
18642
18643                         ;;
18644                 esac
18645         done
18646
18647                         ;;
18648                 esac
18649     fi
18650 esac
18651
18652 echo "$as_me:18652: checking for db.h" >&5
18653 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18654 if test "${ac_cv_header_db_h+set}" = set; then
18655   echo $ECHO_N "(cached) $ECHO_C" >&6
18656 else
18657   cat >conftest.$ac_ext <<_ACEOF
18658 #line 18658 "configure"
18659 #include "confdefs.h"
18660 #include <db.h>
18661 _ACEOF
18662 if { (eval echo "$as_me:18662: \"$ac_cpp conftest.$ac_ext\"") >&5
18663   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18664   ac_status=$?
18665   egrep -v '^ *\+' conftest.er1 >conftest.err
18666   rm -f conftest.er1
18667   cat conftest.err >&5
18668   echo "$as_me:18668: \$? = $ac_status" >&5
18669   (exit $ac_status); } >/dev/null; then
18670   if test -s conftest.err; then
18671     ac_cpp_err=$ac_c_preproc_warn_flag
18672   else
18673     ac_cpp_err=
18674   fi
18675 else
18676   ac_cpp_err=yes
18677 fi
18678 if test -z "$ac_cpp_err"; then
18679   ac_cv_header_db_h=yes
18680 else
18681   echo "$as_me: failed program was:" >&5
18682   cat conftest.$ac_ext >&5
18683   ac_cv_header_db_h=no
18684 fi
18685 rm -f conftest.err conftest.$ac_ext
18686 fi
18687 echo "$as_me:18687: result: $ac_cv_header_db_h" >&5
18688 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18689 if test $ac_cv_header_db_h = yes; then
18690
18691 echo "$as_me:18691: checking for version of db" >&5
18692 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18693 if test "${cf_cv_hashed_db_version+set}" = set; then
18694   echo $ECHO_N "(cached) $ECHO_C" >&6
18695 else
18696
18697 cf_cv_hashed_db_version=unknown
18698
18699 for cf_db_version in 1 2 3 4 5 6
18700 do
18701
18702 echo "${as_me:-configure}:18702: testing checking for db version $cf_db_version ..." 1>&5
18703
18704         cat >conftest.$ac_ext <<_ACEOF
18705 #line 18705 "configure"
18706 #include "confdefs.h"
18707
18708 $ac_includes_default
18709 #include <db.h>
18710
18711 #ifdef DB_VERSION_MAJOR
18712         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18713 #if $cf_db_version == DB_VERSION_MAJOR
18714         /* ok */
18715 #else
18716         make an error
18717 #endif
18718 #else
18719 #if $cf_db_version == 1
18720         /* ok: assuming this is DB 1.8.5 */
18721 #else
18722         make an error
18723 #endif
18724 #endif
18725
18726 int
18727 main ()
18728 {
18729 DBT *foo = 0
18730   ;
18731   return 0;
18732 }
18733 _ACEOF
18734 rm -f conftest.$ac_objext
18735 if { (eval echo "$as_me:18735: \"$ac_compile\"") >&5
18736   (eval $ac_compile) 2>&5
18737   ac_status=$?
18738   echo "$as_me:18738: \$? = $ac_status" >&5
18739   (exit $ac_status); } &&
18740          { ac_try='test -s conftest.$ac_objext'
18741   { (eval echo "$as_me:18741: \"$ac_try\"") >&5
18742   (eval $ac_try) 2>&5
18743   ac_status=$?
18744   echo "$as_me:18744: \$? = $ac_status" >&5
18745   (exit $ac_status); }; }; then
18746
18747         cf_cv_hashed_db_version=$cf_db_version
18748         break
18749
18750 else
18751   echo "$as_me: failed program was:" >&5
18752 cat conftest.$ac_ext >&5
18753 fi
18754 rm -f conftest.$ac_objext conftest.$ac_ext
18755 done
18756
18757 fi
18758 echo "$as_me:18758: result: $cf_cv_hashed_db_version" >&5
18759 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18760
18761 if test "$cf_cv_hashed_db_version" = unknown ; then
18762         { { echo "$as_me:18762: error: Cannot determine version of db" >&5
18763 echo "$as_me: error: Cannot determine version of db" >&2;}
18764    { (exit 1); exit 1; }; }
18765 else
18766
18767 echo "$as_me:18767: checking for db libraries" >&5
18768 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18769 if test "${cf_cv_hashed_db_libs+set}" = set; then
18770   echo $ECHO_N "(cached) $ECHO_C" >&6
18771 else
18772
18773 cf_cv_hashed_db_libs=unknown
18774 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18775 do
18776         cf_save_libs="$LIBS"
18777         if test -n "$cf_db_libs"; then
18778
18779 cf_add_libs="-l$cf_db_libs"
18780 # Filter out duplicates - this happens with badly-designed ".pc" files...
18781 for cf_add_1lib in $LIBS
18782 do
18783         for cf_add_2lib in $cf_add_libs
18784         do
18785                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18786                 then
18787                         cf_add_1lib=
18788                         break
18789                 fi
18790         done
18791         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18792 done
18793 LIBS="$cf_add_libs"
18794
18795         fi
18796
18797 echo "${as_me:-configure}:18797: testing checking for library "$cf_db_libs" ..." 1>&5
18798
18799         cat >conftest.$ac_ext <<_ACEOF
18800 #line 18800 "configure"
18801 #include "confdefs.h"
18802
18803 $ac_includes_default
18804 #include <db.h>
18805
18806 int
18807 main ()
18808 {
18809
18810         char *path = "/tmp/foo";
18811 #ifdef DB_VERSION_MAJOR
18812 #if DB_VERSION_MAJOR >= 4
18813         DB *result = 0;
18814         db_create(&result, NULL, 0);
18815         result->open(result,
18816                 NULL,
18817                 path,
18818                 path,
18819                 DB_HASH,
18820                 DB_CREATE,
18821                 0644);
18822 #elif DB_VERSION_MAJOR >= 3
18823         DB *result = 0;
18824         db_create(&result, NULL, 0);
18825         result->open(result,
18826                 path,
18827                 path,
18828                 DB_HASH,
18829                 DB_CREATE,
18830                 0644);
18831 #elif DB_VERSION_MAJOR >= 2
18832         DB *result = 0;
18833         db_open(path,
18834                 DB_HASH,
18835                 DB_CREATE,
18836                 0644,
18837                 (DB_ENV *) 0,
18838                 (DB_INFO *) 0,
18839                 &result);
18840 #endif /* DB_VERSION_MAJOR */
18841 #else
18842         DB *result = dbopen(path,
18843                      2,
18844                      0644,
18845                      DB_HASH,
18846                      0);
18847 #endif
18848         ${cf_cv_main_return:-return}(result != 0)
18849
18850   ;
18851   return 0;
18852 }
18853 _ACEOF
18854 rm -f conftest.$ac_objext conftest$ac_exeext
18855 if { (eval echo "$as_me:18855: \"$ac_link\"") >&5
18856   (eval $ac_link) 2>&5
18857   ac_status=$?
18858   echo "$as_me:18858: \$? = $ac_status" >&5
18859   (exit $ac_status); } &&
18860          { ac_try='test -s conftest$ac_exeext'
18861   { (eval echo "$as_me:18861: \"$ac_try\"") >&5
18862   (eval $ac_try) 2>&5
18863   ac_status=$?
18864   echo "$as_me:18864: \$? = $ac_status" >&5
18865   (exit $ac_status); }; }; then
18866
18867         if test -n "$cf_db_libs" ; then
18868                 cf_cv_hashed_db_libs=$cf_db_libs
18869         else
18870                 cf_cv_hashed_db_libs=default
18871         fi
18872         LIBS="$cf_save_libs"
18873         break
18874
18875 else
18876   echo "$as_me: failed program was:" >&5
18877 cat conftest.$ac_ext >&5
18878 fi
18879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18880         LIBS="$cf_save_libs"
18881 done
18882
18883 fi
18884 echo "$as_me:18884: result: $cf_cv_hashed_db_libs" >&5
18885 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18886
18887         if test "$cf_cv_hashed_db_libs" = unknown ; then
18888                 { { echo "$as_me:18888: error: Cannot determine library for db" >&5
18889 echo "$as_me: error: Cannot determine library for db" >&2;}
18890    { (exit 1); exit 1; }; }
18891         elif test "$cf_cv_hashed_db_libs" != default ; then
18892
18893 cf_add_libs="-l$cf_cv_hashed_db_libs"
18894 # Filter out duplicates - this happens with badly-designed ".pc" files...
18895 for cf_add_1lib in $LIBS
18896 do
18897         for cf_add_2lib in $cf_add_libs
18898         do
18899                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18900                 then
18901                         cf_add_1lib=
18902                         break
18903                 fi
18904         done
18905         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18906 done
18907 LIBS="$cf_add_libs"
18908
18909         fi
18910 fi
18911
18912 else
18913
18914         { { echo "$as_me:18914: error: Cannot find db.h" >&5
18915 echo "$as_me: error: Cannot find db.h" >&2;}
18916    { (exit 1); exit 1; }; }
18917
18918 fi
18919
18920 fi
18921
18922 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18923         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18924         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18925 fi
18926
18927 # Just in case, check if the C compiler has a bool type.
18928
18929 echo "$as_me:18929: checking if we should include stdbool.h" >&5
18930 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18931
18932 if test "${cf_cv_header_stdbool_h+set}" = set; then
18933   echo $ECHO_N "(cached) $ECHO_C" >&6
18934 else
18935
18936         cat >conftest.$ac_ext <<_ACEOF
18937 #line 18937 "configure"
18938 #include "confdefs.h"
18939
18940 int
18941 main ()
18942 {
18943 bool foo = false
18944   ;
18945   return 0;
18946 }
18947 _ACEOF
18948 rm -f conftest.$ac_objext
18949 if { (eval echo "$as_me:18949: \"$ac_compile\"") >&5
18950   (eval $ac_compile) 2>&5
18951   ac_status=$?
18952   echo "$as_me:18952: \$? = $ac_status" >&5
18953   (exit $ac_status); } &&
18954          { ac_try='test -s conftest.$ac_objext'
18955   { (eval echo "$as_me:18955: \"$ac_try\"") >&5
18956   (eval $ac_try) 2>&5
18957   ac_status=$?
18958   echo "$as_me:18958: \$? = $ac_status" >&5
18959   (exit $ac_status); }; }; then
18960   cf_cv_header_stdbool_h=0
18961 else
18962   echo "$as_me: failed program was:" >&5
18963 cat conftest.$ac_ext >&5
18964 cat >conftest.$ac_ext <<_ACEOF
18965 #line 18965 "configure"
18966 #include "confdefs.h"
18967
18968 #ifndef __BEOS__
18969 #include <stdbool.h>
18970 #endif
18971
18972 int
18973 main ()
18974 {
18975 bool foo = false
18976   ;
18977   return 0;
18978 }
18979 _ACEOF
18980 rm -f conftest.$ac_objext
18981 if { (eval echo "$as_me:18981: \"$ac_compile\"") >&5
18982   (eval $ac_compile) 2>&5
18983   ac_status=$?
18984   echo "$as_me:18984: \$? = $ac_status" >&5
18985   (exit $ac_status); } &&
18986          { ac_try='test -s conftest.$ac_objext'
18987   { (eval echo "$as_me:18987: \"$ac_try\"") >&5
18988   (eval $ac_try) 2>&5
18989   ac_status=$?
18990   echo "$as_me:18990: \$? = $ac_status" >&5
18991   (exit $ac_status); }; }; then
18992   cf_cv_header_stdbool_h=1
18993 else
18994   echo "$as_me: failed program was:" >&5
18995 cat conftest.$ac_ext >&5
18996 cf_cv_header_stdbool_h=0
18997 fi
18998 rm -f conftest.$ac_objext conftest.$ac_ext
18999 fi
19000 rm -f conftest.$ac_objext conftest.$ac_ext
19001 fi
19002
19003 if test "$cf_cv_header_stdbool_h" = 1
19004 then    echo "$as_me:19004: result: yes" >&5
19005 echo "${ECHO_T}yes" >&6
19006 else    echo "$as_me:19006: result: no" >&5
19007 echo "${ECHO_T}no" >&6
19008 fi
19009
19010 echo "$as_me:19010: checking for builtin bool type" >&5
19011 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19012
19013 if test "${cf_cv_cc_bool_type+set}" = set; then
19014   echo $ECHO_N "(cached) $ECHO_C" >&6
19015 else
19016
19017         cat >conftest.$ac_ext <<_ACEOF
19018 #line 19018 "configure"
19019 #include "confdefs.h"
19020
19021 #include <stdio.h>
19022 #include <sys/types.h>
19023
19024 int
19025 main ()
19026 {
19027 bool x = false
19028   ;
19029   return 0;
19030 }
19031 _ACEOF
19032 rm -f conftest.$ac_objext
19033 if { (eval echo "$as_me:19033: \"$ac_compile\"") >&5
19034   (eval $ac_compile) 2>&5
19035   ac_status=$?
19036   echo "$as_me:19036: \$? = $ac_status" >&5
19037   (exit $ac_status); } &&
19038          { ac_try='test -s conftest.$ac_objext'
19039   { (eval echo "$as_me:19039: \"$ac_try\"") >&5
19040   (eval $ac_try) 2>&5
19041   ac_status=$?
19042   echo "$as_me:19042: \$? = $ac_status" >&5
19043   (exit $ac_status); }; }; then
19044   cf_cv_cc_bool_type=1
19045 else
19046   echo "$as_me: failed program was:" >&5
19047 cat conftest.$ac_ext >&5
19048 cf_cv_cc_bool_type=0
19049 fi
19050 rm -f conftest.$ac_objext conftest.$ac_ext
19051
19052 fi
19053
19054 if test "$cf_cv_cc_bool_type" = 1
19055 then    echo "$as_me:19055: result: yes" >&5
19056 echo "${ECHO_T}yes" >&6
19057 else    echo "$as_me:19057: result: no" >&5
19058 echo "${ECHO_T}no" >&6
19059 fi
19060
19061 # Check for C++ compiler characteristics (and ensure that it's there!)
19062 if test -n "$CXX" ; then
19063         ac_ext=cc
19064 ac_cpp='$CXXCPP $CPPFLAGS'
19065 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19066 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19067 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19068 ac_main_return=return
19069
19070 if test -n "$GXX" ; then
19071 case $cf_cv_system_name in #(vi
19072 os2*) #(vi
19073         cf_stdcpp_libname=stdcpp
19074         ;;
19075 *)
19076         cf_stdcpp_libname=stdc++
19077         ;;
19078 esac
19079 echo "$as_me:19079: checking for library $cf_stdcpp_libname" >&5
19080 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19081 if test "${cf_cv_libstdcpp+set}" = set; then
19082   echo $ECHO_N "(cached) $ECHO_C" >&6
19083 else
19084
19085         cf_save="$LIBS"
19086
19087 cf_add_libs="-l$cf_stdcpp_libname"
19088 # Filter out duplicates - this happens with badly-designed ".pc" files...
19089 for cf_add_1lib in $LIBS
19090 do
19091         for cf_add_2lib in $cf_add_libs
19092         do
19093                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19094                 then
19095                         cf_add_1lib=
19096                         break
19097                 fi
19098         done
19099         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19100 done
19101 LIBS="$cf_add_libs"
19102
19103 cat >conftest.$ac_ext <<_ACEOF
19104 #line 19104 "configure"
19105 #include "confdefs.h"
19106
19107 #include <strstream.h>
19108 int
19109 main ()
19110 {
19111
19112 char buf[80];
19113 strstreambuf foo(buf, sizeof(buf))
19114
19115   ;
19116   return 0;
19117 }
19118 _ACEOF
19119 rm -f conftest.$ac_objext conftest$ac_exeext
19120 if { (eval echo "$as_me:19120: \"$ac_link\"") >&5
19121   (eval $ac_link) 2>&5
19122   ac_status=$?
19123   echo "$as_me:19123: \$? = $ac_status" >&5
19124   (exit $ac_status); } &&
19125          { ac_try='test -s conftest$ac_exeext'
19126   { (eval echo "$as_me:19126: \"$ac_try\"") >&5
19127   (eval $ac_try) 2>&5
19128   ac_status=$?
19129   echo "$as_me:19129: \$? = $ac_status" >&5
19130   (exit $ac_status); }; }; then
19131   cf_cv_libstdcpp=yes
19132 else
19133   echo "$as_me: failed program was:" >&5
19134 cat conftest.$ac_ext >&5
19135 cf_cv_libstdcpp=no
19136 fi
19137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19138         LIBS="$cf_save"
19139
19140 fi
19141 echo "$as_me:19141: result: $cf_cv_libstdcpp" >&5
19142 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19143 test "$cf_cv_libstdcpp" = yes &&
19144 cf_add_libs="-l$cf_stdcpp_libname"
19145 # Filter out duplicates - this happens with badly-designed ".pc" files...
19146 for cf_add_1lib in $CXXLIBS
19147 do
19148         for cf_add_2lib in $cf_add_libs
19149         do
19150                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19151                 then
19152                         cf_add_1lib=
19153                         break
19154                 fi
19155         done
19156         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19157 done
19158 CXXLIBS="$cf_add_libs"
19159
19160 fi
19161
19162         echo "$as_me:19162: checking whether $CXX understands -c and -o together" >&5
19163 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19164 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19165   echo $ECHO_N "(cached) $ECHO_C" >&6
19166 else
19167
19168 cat > conftest.$ac_ext <<CF_EOF
19169 #include <stdio.h>
19170 int main()
19171 {
19172         ${cf_cv_main_return:-return}(0);
19173 }
19174 CF_EOF
19175 # We do the test twice because some compilers refuse to overwrite an
19176 # existing .o file with -o, though they will create one.
19177 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19178 if { (eval echo "$as_me:19178: \"$ac_try\"") >&5
19179   (eval $ac_try) 2>&5
19180   ac_status=$?
19181   echo "$as_me:19181: \$? = $ac_status" >&5
19182   (exit $ac_status); } &&
19183   test -f conftest2.$ac_objext && { (eval echo "$as_me:19183: \"$ac_try\"") >&5
19184   (eval $ac_try) 2>&5
19185   ac_status=$?
19186   echo "$as_me:19186: \$? = $ac_status" >&5
19187   (exit $ac_status); };
19188 then
19189   eval cf_cv_prog_CXX_c_o=yes
19190 else
19191   eval cf_cv_prog_CXX_c_o=no
19192 fi
19193 rm -rf conftest*
19194
19195 fi
19196 if test $cf_cv_prog_CXX_c_o = yes; then
19197   echo "$as_me:19197: result: yes" >&5
19198 echo "${ECHO_T}yes" >&6
19199 else
19200   echo "$as_me:19200: result: no" >&5
19201 echo "${ECHO_T}no" >&6
19202 fi
19203
19204         case $GXX_VERSION in
19205         1*|2.0-6*)
19206                 cf_cxx_library=yes
19207                 ;;
19208         *-2.7*|2.7*)
19209
19210 cf_cxx_library=unknown
19211 case $cf_cv_system_name in #(vi
19212 os2*) #(vi
19213         cf_gpp_libname=gpp
19214         ;;
19215 *)
19216         cf_gpp_libname=g++
19217         ;;
19218 esac
19219 if test "$GXX" = yes; then
19220         echo "$as_me:19220: checking for lib$cf_gpp_libname" >&5
19221 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19222         cf_save="$LIBS"
19223
19224 cf_add_libs="-l$cf_gpp_libname"
19225 # Filter out duplicates - this happens with badly-designed ".pc" files...
19226 for cf_add_1lib in $LIBS
19227 do
19228         for cf_add_2lib in $cf_add_libs
19229         do
19230                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19231                 then
19232                         cf_add_1lib=
19233                         break
19234                 fi
19235         done
19236         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19237 done
19238 LIBS="$cf_add_libs"
19239
19240         cat >conftest.$ac_ext <<_ACEOF
19241 #line 19241 "configure"
19242 #include "confdefs.h"
19243
19244 #include <$cf_gpp_libname/builtin.h>
19245
19246 int
19247 main ()
19248 {
19249 two_arg_error_handler_t foo2 = lib_error_handler
19250   ;
19251   return 0;
19252 }
19253 _ACEOF
19254 rm -f conftest.$ac_objext conftest$ac_exeext
19255 if { (eval echo "$as_me:19255: \"$ac_link\"") >&5
19256   (eval $ac_link) 2>&5
19257   ac_status=$?
19258   echo "$as_me:19258: \$? = $ac_status" >&5
19259   (exit $ac_status); } &&
19260          { ac_try='test -s conftest$ac_exeext'
19261   { (eval echo "$as_me:19261: \"$ac_try\"") >&5
19262   (eval $ac_try) 2>&5
19263   ac_status=$?
19264   echo "$as_me:19264: \$? = $ac_status" >&5
19265   (exit $ac_status); }; }; then
19266   cf_cxx_library=yes
19267
19268 cf_add_libs="-l$cf_gpp_libname"
19269 # Filter out duplicates - this happens with badly-designed ".pc" files...
19270 for cf_add_1lib in $CXXLIBS
19271 do
19272         for cf_add_2lib in $cf_add_libs
19273         do
19274                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19275                 then
19276                         cf_add_1lib=
19277                         break
19278                 fi
19279         done
19280         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19281 done
19282 CXXLIBS="$cf_add_libs"
19283
19284          if test "$cf_gpp_libname" = cpp ; then
19285
19286 cat >>confdefs.h <<\EOF
19287 #define HAVE_GPP_BUILTIN_H 1
19288 EOF
19289
19290          else
19291
19292 cat >>confdefs.h <<\EOF
19293 #define HAVE_GXX_BUILTIN_H 1
19294 EOF
19295
19296          fi
19297 else
19298   echo "$as_me: failed program was:" >&5
19299 cat conftest.$ac_ext >&5
19300 cat >conftest.$ac_ext <<_ACEOF
19301 #line 19301 "configure"
19302 #include "confdefs.h"
19303
19304 #include <builtin.h>
19305
19306 int
19307 main ()
19308 {
19309 two_arg_error_handler_t foo2 = lib_error_handler
19310   ;
19311   return 0;
19312 }
19313 _ACEOF
19314 rm -f conftest.$ac_objext conftest$ac_exeext
19315 if { (eval echo "$as_me:19315: \"$ac_link\"") >&5
19316   (eval $ac_link) 2>&5
19317   ac_status=$?
19318   echo "$as_me:19318: \$? = $ac_status" >&5
19319   (exit $ac_status); } &&
19320          { ac_try='test -s conftest$ac_exeext'
19321   { (eval echo "$as_me:19321: \"$ac_try\"") >&5
19322   (eval $ac_try) 2>&5
19323   ac_status=$?
19324   echo "$as_me:19324: \$? = $ac_status" >&5
19325   (exit $ac_status); }; }; then
19326   cf_cxx_library=yes
19327
19328 cf_add_libs="-l$cf_gpp_libname"
19329 # Filter out duplicates - this happens with badly-designed ".pc" files...
19330 for cf_add_1lib in $CXXLIBS
19331 do
19332         for cf_add_2lib in $cf_add_libs
19333         do
19334                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19335                 then
19336                         cf_add_1lib=
19337                         break
19338                 fi
19339         done
19340         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19341 done
19342 CXXLIBS="$cf_add_libs"
19343
19344 cat >>confdefs.h <<\EOF
19345 #define HAVE_BUILTIN_H 1
19346 EOF
19347
19348 else
19349   echo "$as_me: failed program was:" >&5
19350 cat conftest.$ac_ext >&5
19351 cf_cxx_library=no
19352 fi
19353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19354 fi
19355 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19356         LIBS="$cf_save"
19357         echo "$as_me:19357: result: $cf_cxx_library" >&5
19358 echo "${ECHO_T}$cf_cxx_library" >&6
19359 fi
19360
19361                 ;;
19362         *)
19363                 cf_cxx_library=no
19364                 ;;
19365         esac
19366
19367         ac_ext=cc
19368 ac_cpp='$CXXCPP $CPPFLAGS'
19369 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19370 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19371 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19372 ac_main_return=return
19373 echo "$as_me:19373: checking how to run the C++ preprocessor" >&5
19374 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19375 if test -z "$CXXCPP"; then
19376   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19377   echo $ECHO_N "(cached) $ECHO_C" >&6
19378 else
19379       # Double quotes because CXXCPP needs to be expanded
19380     for CXXCPP in "$CXX -E" "/lib/cpp"
19381     do
19382       ac_preproc_ok=false
19383 for ac_cxx_preproc_warn_flag in '' yes
19384 do
19385   # Use a header file that comes with gcc, so configuring glibc
19386   # with a fresh cross-compiler works.
19387   # On the NeXT, cc -E runs the code through the compiler's parser,
19388   # not just through cpp. "Syntax error" is here to catch this case.
19389   cat >conftest.$ac_ext <<_ACEOF
19390 #line 19390 "configure"
19391 #include "confdefs.h"
19392 #include <assert.h>
19393                      Syntax error
19394 _ACEOF
19395 if { (eval echo "$as_me:19395: \"$ac_cpp conftest.$ac_ext\"") >&5
19396   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19397   ac_status=$?
19398   egrep -v '^ *\+' conftest.er1 >conftest.err
19399   rm -f conftest.er1
19400   cat conftest.err >&5
19401   echo "$as_me:19401: \$? = $ac_status" >&5
19402   (exit $ac_status); } >/dev/null; then
19403   if test -s conftest.err; then
19404     ac_cpp_err=$ac_cxx_preproc_warn_flag
19405   else
19406     ac_cpp_err=
19407   fi
19408 else
19409   ac_cpp_err=yes
19410 fi
19411 if test -z "$ac_cpp_err"; then
19412   :
19413 else
19414   echo "$as_me: failed program was:" >&5
19415   cat conftest.$ac_ext >&5
19416   # Broken: fails on valid input.
19417 continue
19418 fi
19419 rm -f conftest.err conftest.$ac_ext
19420
19421   # OK, works on sane cases.  Now check whether non-existent headers
19422   # can be detected and how.
19423   cat >conftest.$ac_ext <<_ACEOF
19424 #line 19424 "configure"
19425 #include "confdefs.h"
19426 #include <ac_nonexistent.h>
19427 _ACEOF
19428 if { (eval echo "$as_me:19428: \"$ac_cpp conftest.$ac_ext\"") >&5
19429   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19430   ac_status=$?
19431   egrep -v '^ *\+' conftest.er1 >conftest.err
19432   rm -f conftest.er1
19433   cat conftest.err >&5
19434   echo "$as_me:19434: \$? = $ac_status" >&5
19435   (exit $ac_status); } >/dev/null; then
19436   if test -s conftest.err; then
19437     ac_cpp_err=$ac_cxx_preproc_warn_flag
19438   else
19439     ac_cpp_err=
19440   fi
19441 else
19442   ac_cpp_err=yes
19443 fi
19444 if test -z "$ac_cpp_err"; then
19445   # Broken: success on invalid input.
19446 continue
19447 else
19448   echo "$as_me: failed program was:" >&5
19449   cat conftest.$ac_ext >&5
19450   # Passes both tests.
19451 ac_preproc_ok=:
19452 break
19453 fi
19454 rm -f conftest.err conftest.$ac_ext
19455
19456 done
19457 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19458 rm -f conftest.err conftest.$ac_ext
19459 if $ac_preproc_ok; then
19460   break
19461 fi
19462
19463     done
19464     ac_cv_prog_CXXCPP=$CXXCPP
19465
19466 fi
19467   CXXCPP=$ac_cv_prog_CXXCPP
19468 else
19469   ac_cv_prog_CXXCPP=$CXXCPP
19470 fi
19471 echo "$as_me:19471: result: $CXXCPP" >&5
19472 echo "${ECHO_T}$CXXCPP" >&6
19473 ac_preproc_ok=false
19474 for ac_cxx_preproc_warn_flag in '' yes
19475 do
19476   # Use a header file that comes with gcc, so configuring glibc
19477   # with a fresh cross-compiler works.
19478   # On the NeXT, cc -E runs the code through the compiler's parser,
19479   # not just through cpp. "Syntax error" is here to catch this case.
19480   cat >conftest.$ac_ext <<_ACEOF
19481 #line 19481 "configure"
19482 #include "confdefs.h"
19483 #include <assert.h>
19484                      Syntax error
19485 _ACEOF
19486 if { (eval echo "$as_me:19486: \"$ac_cpp conftest.$ac_ext\"") >&5
19487   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19488   ac_status=$?
19489   egrep -v '^ *\+' conftest.er1 >conftest.err
19490   rm -f conftest.er1
19491   cat conftest.err >&5
19492   echo "$as_me:19492: \$? = $ac_status" >&5
19493   (exit $ac_status); } >/dev/null; then
19494   if test -s conftest.err; then
19495     ac_cpp_err=$ac_cxx_preproc_warn_flag
19496   else
19497     ac_cpp_err=
19498   fi
19499 else
19500   ac_cpp_err=yes
19501 fi
19502 if test -z "$ac_cpp_err"; then
19503   :
19504 else
19505   echo "$as_me: failed program was:" >&5
19506   cat conftest.$ac_ext >&5
19507   # Broken: fails on valid input.
19508 continue
19509 fi
19510 rm -f conftest.err conftest.$ac_ext
19511
19512   # OK, works on sane cases.  Now check whether non-existent headers
19513   # can be detected and how.
19514   cat >conftest.$ac_ext <<_ACEOF
19515 #line 19515 "configure"
19516 #include "confdefs.h"
19517 #include <ac_nonexistent.h>
19518 _ACEOF
19519 if { (eval echo "$as_me:19519: \"$ac_cpp conftest.$ac_ext\"") >&5
19520   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19521   ac_status=$?
19522   egrep -v '^ *\+' conftest.er1 >conftest.err
19523   rm -f conftest.er1
19524   cat conftest.err >&5
19525   echo "$as_me:19525: \$? = $ac_status" >&5
19526   (exit $ac_status); } >/dev/null; then
19527   if test -s conftest.err; then
19528     ac_cpp_err=$ac_cxx_preproc_warn_flag
19529   else
19530     ac_cpp_err=
19531   fi
19532 else
19533   ac_cpp_err=yes
19534 fi
19535 if test -z "$ac_cpp_err"; then
19536   # Broken: success on invalid input.
19537 continue
19538 else
19539   echo "$as_me: failed program was:" >&5
19540   cat conftest.$ac_ext >&5
19541   # Passes both tests.
19542 ac_preproc_ok=:
19543 break
19544 fi
19545 rm -f conftest.err conftest.$ac_ext
19546
19547 done
19548 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19549 rm -f conftest.err conftest.$ac_ext
19550 if $ac_preproc_ok; then
19551   :
19552 else
19553   { { echo "$as_me:19553: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19554 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19555    { (exit 1); exit 1; }; }
19556 fi
19557
19558 ac_ext=cc
19559 ac_cpp='$CXXCPP $CPPFLAGS'
19560 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19561 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19562 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19563 ac_main_return=return
19564
19565 for ac_header in typeinfo
19566 do
19567 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19568 echo "$as_me:19568: checking for $ac_header" >&5
19569 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19570 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19571   echo $ECHO_N "(cached) $ECHO_C" >&6
19572 else
19573   cat >conftest.$ac_ext <<_ACEOF
19574 #line 19574 "configure"
19575 #include "confdefs.h"
19576 #include <$ac_header>
19577 _ACEOF
19578 if { (eval echo "$as_me:19578: \"$ac_cpp conftest.$ac_ext\"") >&5
19579   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19580   ac_status=$?
19581   egrep -v '^ *\+' conftest.er1 >conftest.err
19582   rm -f conftest.er1
19583   cat conftest.err >&5
19584   echo "$as_me:19584: \$? = $ac_status" >&5
19585   (exit $ac_status); } >/dev/null; then
19586   if test -s conftest.err; then
19587     ac_cpp_err=$ac_cxx_preproc_warn_flag
19588   else
19589     ac_cpp_err=
19590   fi
19591 else
19592   ac_cpp_err=yes
19593 fi
19594 if test -z "$ac_cpp_err"; then
19595   eval "$as_ac_Header=yes"
19596 else
19597   echo "$as_me: failed program was:" >&5
19598   cat conftest.$ac_ext >&5
19599   eval "$as_ac_Header=no"
19600 fi
19601 rm -f conftest.err conftest.$ac_ext
19602 fi
19603 echo "$as_me:19603: result: `eval echo '${'$as_ac_Header'}'`" >&5
19604 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19605 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19606   cat >>confdefs.h <<EOF
19607 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19608 EOF
19609
19610 fi
19611 done
19612
19613 for ac_header in iostream
19614 do
19615 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19616 echo "$as_me:19616: checking for $ac_header" >&5
19617 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19618 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19619   echo $ECHO_N "(cached) $ECHO_C" >&6
19620 else
19621   cat >conftest.$ac_ext <<_ACEOF
19622 #line 19622 "configure"
19623 #include "confdefs.h"
19624 #include <$ac_header>
19625 _ACEOF
19626 if { (eval echo "$as_me:19626: \"$ac_cpp conftest.$ac_ext\"") >&5
19627   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19628   ac_status=$?
19629   egrep -v '^ *\+' conftest.er1 >conftest.err
19630   rm -f conftest.er1
19631   cat conftest.err >&5
19632   echo "$as_me:19632: \$? = $ac_status" >&5
19633   (exit $ac_status); } >/dev/null; then
19634   if test -s conftest.err; then
19635     ac_cpp_err=$ac_cxx_preproc_warn_flag
19636   else
19637     ac_cpp_err=
19638   fi
19639 else
19640   ac_cpp_err=yes
19641 fi
19642 if test -z "$ac_cpp_err"; then
19643   eval "$as_ac_Header=yes"
19644 else
19645   echo "$as_me: failed program was:" >&5
19646   cat conftest.$ac_ext >&5
19647   eval "$as_ac_Header=no"
19648 fi
19649 rm -f conftest.err conftest.$ac_ext
19650 fi
19651 echo "$as_me:19651: result: `eval echo '${'$as_ac_Header'}'`" >&5
19652 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19653 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19654   cat >>confdefs.h <<EOF
19655 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19656 EOF
19657
19658 fi
19659 done
19660
19661 if test x"$ac_cv_header_iostream" = xyes ; then
19662         echo "$as_me:19662: checking if iostream uses std-namespace" >&5
19663 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19664         cat >conftest.$ac_ext <<_ACEOF
19665 #line 19665 "configure"
19666 #include "confdefs.h"
19667
19668 #include <iostream>
19669 using std::endl;
19670 using std::cerr;
19671 int
19672 main ()
19673 {
19674
19675 cerr << "testing" << endl;
19676
19677   ;
19678   return 0;
19679 }
19680 _ACEOF
19681 rm -f conftest.$ac_objext
19682 if { (eval echo "$as_me:19682: \"$ac_compile\"") >&5
19683   (eval $ac_compile) 2>&5
19684   ac_status=$?
19685   echo "$as_me:19685: \$? = $ac_status" >&5
19686   (exit $ac_status); } &&
19687          { ac_try='test -s conftest.$ac_objext'
19688   { (eval echo "$as_me:19688: \"$ac_try\"") >&5
19689   (eval $ac_try) 2>&5
19690   ac_status=$?
19691   echo "$as_me:19691: \$? = $ac_status" >&5
19692   (exit $ac_status); }; }; then
19693   cf_iostream_namespace=yes
19694 else
19695   echo "$as_me: failed program was:" >&5
19696 cat conftest.$ac_ext >&5
19697 cf_iostream_namespace=no
19698 fi
19699 rm -f conftest.$ac_objext conftest.$ac_ext
19700         echo "$as_me:19700: result: $cf_iostream_namespace" >&5
19701 echo "${ECHO_T}$cf_iostream_namespace" >&6
19702         if test "$cf_iostream_namespace" = yes ; then
19703
19704 cat >>confdefs.h <<\EOF
19705 #define IOSTREAM_NAMESPACE 1
19706 EOF
19707
19708         fi
19709 fi
19710
19711 echo "$as_me:19711: checking if we should include stdbool.h" >&5
19712 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19713
19714 if test "${cf_cv_header_stdbool_h+set}" = set; then
19715   echo $ECHO_N "(cached) $ECHO_C" >&6
19716 else
19717
19718         cat >conftest.$ac_ext <<_ACEOF
19719 #line 19719 "configure"
19720 #include "confdefs.h"
19721
19722 int
19723 main ()
19724 {
19725 bool foo = false
19726   ;
19727   return 0;
19728 }
19729 _ACEOF
19730 rm -f conftest.$ac_objext
19731 if { (eval echo "$as_me:19731: \"$ac_compile\"") >&5
19732   (eval $ac_compile) 2>&5
19733   ac_status=$?
19734   echo "$as_me:19734: \$? = $ac_status" >&5
19735   (exit $ac_status); } &&
19736          { ac_try='test -s conftest.$ac_objext'
19737   { (eval echo "$as_me:19737: \"$ac_try\"") >&5
19738   (eval $ac_try) 2>&5
19739   ac_status=$?
19740   echo "$as_me:19740: \$? = $ac_status" >&5
19741   (exit $ac_status); }; }; then
19742   cf_cv_header_stdbool_h=0
19743 else
19744   echo "$as_me: failed program was:" >&5
19745 cat conftest.$ac_ext >&5
19746 cat >conftest.$ac_ext <<_ACEOF
19747 #line 19747 "configure"
19748 #include "confdefs.h"
19749
19750 #ifndef __BEOS__
19751 #include <stdbool.h>
19752 #endif
19753
19754 int
19755 main ()
19756 {
19757 bool foo = false
19758   ;
19759   return 0;
19760 }
19761 _ACEOF
19762 rm -f conftest.$ac_objext
19763 if { (eval echo "$as_me:19763: \"$ac_compile\"") >&5
19764   (eval $ac_compile) 2>&5
19765   ac_status=$?
19766   echo "$as_me:19766: \$? = $ac_status" >&5
19767   (exit $ac_status); } &&
19768          { ac_try='test -s conftest.$ac_objext'
19769   { (eval echo "$as_me:19769: \"$ac_try\"") >&5
19770   (eval $ac_try) 2>&5
19771   ac_status=$?
19772   echo "$as_me:19772: \$? = $ac_status" >&5
19773   (exit $ac_status); }; }; then
19774   cf_cv_header_stdbool_h=1
19775 else
19776   echo "$as_me: failed program was:" >&5
19777 cat conftest.$ac_ext >&5
19778 cf_cv_header_stdbool_h=0
19779 fi
19780 rm -f conftest.$ac_objext conftest.$ac_ext
19781 fi
19782 rm -f conftest.$ac_objext conftest.$ac_ext
19783 fi
19784
19785 if test "$cf_cv_header_stdbool_h" = 1
19786 then    echo "$as_me:19786: result: yes" >&5
19787 echo "${ECHO_T}yes" >&6
19788 else    echo "$as_me:19788: result: no" >&5
19789 echo "${ECHO_T}no" >&6
19790 fi
19791
19792 echo "$as_me:19792: checking for builtin bool type" >&5
19793 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19794
19795 if test "${cf_cv_builtin_bool+set}" = set; then
19796   echo $ECHO_N "(cached) $ECHO_C" >&6
19797 else
19798
19799         cat >conftest.$ac_ext <<_ACEOF
19800 #line 19800 "configure"
19801 #include "confdefs.h"
19802
19803 #include <stdio.h>
19804 #include <sys/types.h>
19805
19806 int
19807 main ()
19808 {
19809 bool x = false
19810   ;
19811   return 0;
19812 }
19813 _ACEOF
19814 rm -f conftest.$ac_objext
19815 if { (eval echo "$as_me:19815: \"$ac_compile\"") >&5
19816   (eval $ac_compile) 2>&5
19817   ac_status=$?
19818   echo "$as_me:19818: \$? = $ac_status" >&5
19819   (exit $ac_status); } &&
19820          { ac_try='test -s conftest.$ac_objext'
19821   { (eval echo "$as_me:19821: \"$ac_try\"") >&5
19822   (eval $ac_try) 2>&5
19823   ac_status=$?
19824   echo "$as_me:19824: \$? = $ac_status" >&5
19825   (exit $ac_status); }; }; then
19826   cf_cv_builtin_bool=1
19827 else
19828   echo "$as_me: failed program was:" >&5
19829 cat conftest.$ac_ext >&5
19830 cf_cv_builtin_bool=0
19831 fi
19832 rm -f conftest.$ac_objext conftest.$ac_ext
19833
19834 fi
19835
19836 if test "$cf_cv_builtin_bool" = 1
19837 then    echo "$as_me:19837: result: yes" >&5
19838 echo "${ECHO_T}yes" >&6
19839 else    echo "$as_me:19839: result: no" >&5
19840 echo "${ECHO_T}no" >&6
19841 fi
19842
19843 echo "$as_me:19843: checking for size of bool" >&5
19844 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19845 if test "${cf_cv_type_of_bool+set}" = set; then
19846   echo $ECHO_N "(cached) $ECHO_C" >&6
19847 else
19848
19849         rm -f cf_test.out
19850         if test "$cross_compiling" = yes; then
19851   cf_cv_type_of_bool=unknown
19852 else
19853   cat >conftest.$ac_ext <<_ACEOF
19854 #line 19854 "configure"
19855 #include "confdefs.h"
19856
19857 #include <stdlib.h>
19858 #include <stdio.h>
19859
19860 #if defined(__cplusplus)
19861
19862 #ifdef HAVE_GXX_BUILTIN_H
19863 #include <g++/builtin.h>
19864 #elif HAVE_GPP_BUILTIN_H
19865 #include <gpp/builtin.h>
19866 #elif HAVE_BUILTIN_H
19867 #include <builtin.h>
19868 #endif
19869
19870 #else
19871
19872 #if $cf_cv_header_stdbool_h
19873 #include <stdbool.h>
19874 #endif
19875
19876 #endif
19877
19878 int main()
19879 {
19880         FILE *fp = fopen("cf_test.out", "w");
19881         if (fp != 0) {
19882                 bool x = true;
19883                 if ((bool)(-x) >= 0)
19884                         fputs("unsigned ", fp);
19885                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19886                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19887                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19888                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19889                 fclose(fp);
19890         }
19891         ${cf_cv_main_return:-return}(0);
19892 }
19893
19894 _ACEOF
19895 rm -f conftest$ac_exeext
19896 if { (eval echo "$as_me:19896: \"$ac_link\"") >&5
19897   (eval $ac_link) 2>&5
19898   ac_status=$?
19899   echo "$as_me:19899: \$? = $ac_status" >&5
19900   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19901   { (eval echo "$as_me:19901: \"$ac_try\"") >&5
19902   (eval $ac_try) 2>&5
19903   ac_status=$?
19904   echo "$as_me:19904: \$? = $ac_status" >&5
19905   (exit $ac_status); }; }; then
19906   cf_cv_type_of_bool=`cat cf_test.out`
19907                  if test -z "$cf_cv_type_of_bool"; then
19908                    cf_cv_type_of_bool=unknown
19909                  fi
19910 else
19911   echo "$as_me: program exited with status $ac_status" >&5
19912 echo "$as_me: failed program was:" >&5
19913 cat conftest.$ac_ext >&5
19914 cf_cv_type_of_bool=unknown
19915 fi
19916 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19917 fi
19918
19919 fi
19920
19921         rm -f cf_test.out
19922 echo "$as_me:19922: result: $cf_cv_type_of_bool" >&5
19923 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19924 if test "$cf_cv_type_of_bool" = unknown ; then
19925         case .$NCURSES_BOOL in #(vi
19926         .auto|.) NCURSES_BOOL=unsigned;;
19927         esac
19928         { echo "$as_me:19928: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19929 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19930         cf_cv_type_of_bool=$NCURSES_BOOL
19931 fi
19932
19933 echo "$as_me:19933: checking for special defines needed for etip.h" >&5
19934 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19935 cf_save_CXXFLAGS="$CXXFLAGS"
19936 cf_result="none"
19937
19938 # etip.h includes ncurses.h which includes ncurses_dll.h
19939 # But ncurses_dll.h is generated - fix here.
19940 test -d include || mkdir include
19941 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
19942
19943 for cf_math in "" MATH_H
19944 do
19945 for cf_excp in "" MATH_EXCEPTION
19946 do
19947         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19948         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19949         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19950 cat >conftest.$ac_ext <<_ACEOF
19951 #line 19951 "configure"
19952 #include "confdefs.h"
19953
19954 #include <etip.h.in>
19955
19956 int
19957 main ()
19958 {
19959
19960   ;
19961   return 0;
19962 }
19963 _ACEOF
19964 rm -f conftest.$ac_objext
19965 if { (eval echo "$as_me:19965: \"$ac_compile\"") >&5
19966   (eval $ac_compile) 2>&5
19967   ac_status=$?
19968   echo "$as_me:19968: \$? = $ac_status" >&5
19969   (exit $ac_status); } &&
19970          { ac_try='test -s conftest.$ac_objext'
19971   { (eval echo "$as_me:19971: \"$ac_try\"") >&5
19972   (eval $ac_try) 2>&5
19973   ac_status=$?
19974   echo "$as_me:19974: \$? = $ac_status" >&5
19975   (exit $ac_status); }; }; then
19976
19977         test -n "$cf_math" && cat >>confdefs.h <<EOF
19978 #define ETIP_NEEDS_${cf_math} 1
19979 EOF
19980
19981         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19982 #define ETIP_NEEDS_${cf_excp} 1
19983 EOF
19984
19985         cf_result="$cf_math $cf_excp"
19986         break 2
19987
19988 else
19989   echo "$as_me: failed program was:" >&5
19990 cat conftest.$ac_ext >&5
19991 fi
19992 rm -f conftest.$ac_objext conftest.$ac_ext
19993 done
19994 done
19995 echo "$as_me:19995: result: $cf_result" >&5
19996 echo "${ECHO_T}$cf_result" >&6
19997 CXXFLAGS="$cf_save_CXXFLAGS"
19998
19999 if test -n "$CXX"; then
20000 echo "$as_me:20000: checking if $CXX accepts parameter initialization" >&5
20001 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20002 if test "${cf_cv_cpp_param_init+set}" = set; then
20003   echo $ECHO_N "(cached) $ECHO_C" >&6
20004 else
20005
20006         ac_ext=cc
20007 ac_cpp='$CXXCPP $CPPFLAGS'
20008 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20009 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20010 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20011 ac_main_return=return
20012
20013         if test "$cross_compiling" = yes; then
20014   cf_cv_cpp_param_init=unknown
20015 else
20016   cat >conftest.$ac_ext <<_ACEOF
20017 #line 20017 "configure"
20018 #include "confdefs.h"
20019
20020 class TEST {
20021 private:
20022         int value;
20023 public:
20024         TEST(int x = 1);
20025         ~TEST();
20026 };
20027
20028 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20029 {
20030         value = x;
20031 }
20032 int main() { }
20033
20034 _ACEOF
20035 rm -f conftest$ac_exeext
20036 if { (eval echo "$as_me:20036: \"$ac_link\"") >&5
20037   (eval $ac_link) 2>&5
20038   ac_status=$?
20039   echo "$as_me:20039: \$? = $ac_status" >&5
20040   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20041   { (eval echo "$as_me:20041: \"$ac_try\"") >&5
20042   (eval $ac_try) 2>&5
20043   ac_status=$?
20044   echo "$as_me:20044: \$? = $ac_status" >&5
20045   (exit $ac_status); }; }; then
20046   cf_cv_cpp_param_init=yes
20047 else
20048   echo "$as_me: program exited with status $ac_status" >&5
20049 echo "$as_me: failed program was:" >&5
20050 cat conftest.$ac_ext >&5
20051 cf_cv_cpp_param_init=no
20052 fi
20053 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20054 fi
20055         ac_ext=cc
20056 ac_cpp='$CXXCPP $CPPFLAGS'
20057 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20058 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20059 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20060 ac_main_return=return
20061
20062 fi
20063 echo "$as_me:20063: result: $cf_cv_cpp_param_init" >&5
20064 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20065 fi
20066 test "$cf_cv_cpp_param_init" = yes &&
20067 cat >>confdefs.h <<\EOF
20068 #define CPP_HAS_PARAM_INIT 1
20069 EOF
20070
20071 if test -n "$CXX"; then
20072
20073 echo "$as_me:20073: checking if $CXX accepts static_cast" >&5
20074 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20075 if test "${cf_cv_cpp_static_cast+set}" = set; then
20076   echo $ECHO_N "(cached) $ECHO_C" >&6
20077 else
20078
20079         ac_ext=cc
20080 ac_cpp='$CXXCPP $CPPFLAGS'
20081 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20082 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20083 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20084 ac_main_return=return
20085
20086         cat >conftest.$ac_ext <<_ACEOF
20087 #line 20087 "configure"
20088 #include "confdefs.h"
20089
20090 class NCursesPanel
20091 {
20092 public:
20093   NCursesPanel(int nlines,
20094                int ncols,
20095                int begin_y = 0,
20096                int begin_x = 0)
20097   {
20098   }
20099   NCursesPanel();
20100   ~NCursesPanel();
20101 };
20102
20103 template<class T> class NCursesUserPanel : public NCursesPanel
20104 {
20105 public:
20106   NCursesUserPanel (int nlines,
20107                     int ncols,
20108                     int begin_y = 0,
20109                     int begin_x = 0,
20110                     const T* p_UserData = static_cast<T*>(0))
20111     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20112   {
20113   };
20114   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20115   {
20116   };
20117
20118   virtual ~NCursesUserPanel() {};
20119 };
20120
20121 int
20122 main ()
20123 {
20124
20125         const char* p_UserData = static_cast<char*>(0)
20126   ;
20127   return 0;
20128 }
20129 _ACEOF
20130 rm -f conftest.$ac_objext
20131 if { (eval echo "$as_me:20131: \"$ac_compile\"") >&5
20132   (eval $ac_compile) 2>&5
20133   ac_status=$?
20134   echo "$as_me:20134: \$? = $ac_status" >&5
20135   (exit $ac_status); } &&
20136          { ac_try='test -s conftest.$ac_objext'
20137   { (eval echo "$as_me:20137: \"$ac_try\"") >&5
20138   (eval $ac_try) 2>&5
20139   ac_status=$?
20140   echo "$as_me:20140: \$? = $ac_status" >&5
20141   (exit $ac_status); }; }; then
20142   cf_cv_cpp_static_cast=yes
20143 else
20144   echo "$as_me: failed program was:" >&5
20145 cat conftest.$ac_ext >&5
20146 cf_cv_cpp_static_cast=no
20147 fi
20148 rm -f conftest.$ac_objext conftest.$ac_ext
20149
20150         ac_ext=cc
20151 ac_cpp='$CXXCPP $CPPFLAGS'
20152 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20153 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20154 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20155 ac_main_return=return
20156
20157 fi
20158 echo "$as_me:20158: result: $cf_cv_cpp_static_cast" >&5
20159 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20160
20161 fi
20162
20163 test "$cf_cv_cpp_static_cast" = yes &&
20164 cat >>confdefs.h <<\EOF
20165 #define CPP_HAS_STATIC_CAST 1
20166 EOF
20167
20168         CXX_AR='$(AR)'
20169         CXX_ARFLAGS='$(ARFLAGS)'
20170         case $cf_cv_system_name in #(vi
20171         irix*) #(vi
20172             if test "$GXX" != yes ; then
20173                 CXX_AR='$(CXX)'
20174                 CXX_ARFLAGS='-ar -o'
20175             fi
20176             ;;
20177         sco3.2v5*) #(vi
20178             CXXLDFLAGS="-u main"
20179             ;;
20180         solaris2*)
20181             if test "$GXX" != yes ; then
20182                 CXX_AR='$(CXX)'
20183                 CXX_ARFLAGS='-xar -o'
20184             fi
20185             ;;
20186         esac
20187
20188 else
20189         cf_cxx_library=no
20190         cf_cv_builtin_bool=1
20191
20192         # Just because we are not configuring against C++ right now does not
20193         # mean that a user will not want to use C++.  Some distributors disable
20194         # the C++ portion of this configuration as a shortcut (or just to avoid
20195         # compiling the demo in the c++ directory).  So we need a reasonable
20196         # default for the 'bool' type.
20197         #
20198         # Caveat: since the storage of the bool type is not standardized, it
20199         # may change.
20200
20201         if test "$NCURSES_BOOL" != auto ; then
20202                 cf_cv_type_of_bool=$NCURSES_BOOL
20203                 cf_cv_header_stdbool_h=0
20204         else
20205                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20206
20207 echo "$as_me:20207: checking for size of bool" >&5
20208 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20209 if test "${cf_cv_type_of_bool+set}" = set; then
20210   echo $ECHO_N "(cached) $ECHO_C" >&6
20211 else
20212
20213         rm -f cf_test.out
20214         if test "$cross_compiling" = yes; then
20215   cf_cv_type_of_bool=unknown
20216 else
20217   cat >conftest.$ac_ext <<_ACEOF
20218 #line 20218 "configure"
20219 #include "confdefs.h"
20220
20221 #include <stdlib.h>
20222 #include <stdio.h>
20223
20224 #if defined(__cplusplus)
20225
20226 #ifdef HAVE_GXX_BUILTIN_H
20227 #include <g++/builtin.h>
20228 #elif HAVE_GPP_BUILTIN_H
20229 #include <gpp/builtin.h>
20230 #elif HAVE_BUILTIN_H
20231 #include <builtin.h>
20232 #endif
20233
20234 #else
20235
20236 #if $cf_cv_header_stdbool_h
20237 #include <stdbool.h>
20238 #endif
20239
20240 #endif
20241
20242 int main()
20243 {
20244         FILE *fp = fopen("cf_test.out", "w");
20245         if (fp != 0) {
20246                 bool x = true;
20247                 if ((bool)(-x) >= 0)
20248                         fputs("unsigned ", fp);
20249                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20250                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20251                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20252                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20253                 fclose(fp);
20254         }
20255         ${cf_cv_main_return:-return}(0);
20256 }
20257
20258 _ACEOF
20259 rm -f conftest$ac_exeext
20260 if { (eval echo "$as_me:20260: \"$ac_link\"") >&5
20261   (eval $ac_link) 2>&5
20262   ac_status=$?
20263   echo "$as_me:20263: \$? = $ac_status" >&5
20264   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20265   { (eval echo "$as_me:20265: \"$ac_try\"") >&5
20266   (eval $ac_try) 2>&5
20267   ac_status=$?
20268   echo "$as_me:20268: \$? = $ac_status" >&5
20269   (exit $ac_status); }; }; then
20270   cf_cv_type_of_bool=`cat cf_test.out`
20271                  if test -z "$cf_cv_type_of_bool"; then
20272                    cf_cv_type_of_bool=unknown
20273                  fi
20274 else
20275   echo "$as_me: program exited with status $ac_status" >&5
20276 echo "$as_me: failed program was:" >&5
20277 cat conftest.$ac_ext >&5
20278 cf_cv_type_of_bool=unknown
20279 fi
20280 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20281 fi
20282
20283 fi
20284
20285         rm -f cf_test.out
20286 echo "$as_me:20286: result: $cf_cv_type_of_bool" >&5
20287 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20288 if test "$cf_cv_type_of_bool" = unknown ; then
20289         case .$NCURSES_BOOL in #(vi
20290         .auto|.) NCURSES_BOOL=unsigned;;
20291         esac
20292         { echo "$as_me:20292: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20293 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20294         cf_cv_type_of_bool=$NCURSES_BOOL
20295 fi
20296
20297                 else
20298                         echo "$as_me:20298: checking for fallback type of bool" >&5
20299 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20300                         case "$host_cpu" in #(vi
20301                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20302                         *)      cf_cv_type_of_bool=int  ;;
20303                         esac
20304                         echo "$as_me:20304: result: $cf_cv_type_of_bool" >&5
20305 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20306                 fi
20307         fi
20308 fi
20309
20310 # If the C compiler did not declare bool, and we did not determine that the C++
20311 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20312 # ncurses library use the same type as C++ bool.  Note that this allows one to
20313 # specify the type of bool in a configure-script option and postpone
20314 # integration with the C++ compiler provided that the types are compatible.
20315 USE_CXX_BOOL=1
20316 if test $cf_cv_cc_bool_type = 1
20317 then
20318         # oops: C has a bool.  Unlikely, but C++ could differ.
20319         USE_CXX_BOOL=0
20320 elif test $cf_cv_builtin_bool = 0
20321 then
20322         # C++ has no bool
20323         USE_CXX_BOOL=0
20324 else
20325         # this is the normal case
20326         USE_CXX_BOOL='defined(__cplusplus)'
20327 fi
20328
20329 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20330
20331         if test "$cf_with_ada" != "no" ; then
20332                 if test "$with_libtool" != "no"; then
20333                         { echo "$as_me:20333: WARNING: libtool does not support Ada - disabling feature" >&5
20334 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20335                         cf_with_ada=no
20336                 fi
20337         fi
20338
20339         if test "$cf_with_ada" != "no" ; then
20340
20341 cf_ada_make=gnatmake
20342 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20343 set dummy $cf_ada_make; ac_word=$2
20344 echo "$as_me:20344: checking for $ac_word" >&5
20345 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20346 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20347   echo $ECHO_N "(cached) $ECHO_C" >&6
20348 else
20349   if test -n "$gnat_exists"; then
20350   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20351 else
20352   ac_save_IFS=$IFS; IFS=$ac_path_separator
20353 ac_dummy="$PATH"
20354 for ac_dir in $ac_dummy; do
20355   IFS=$ac_save_IFS
20356   test -z "$ac_dir" && ac_dir=.
20357   $as_executable_p "$ac_dir/$ac_word" || continue
20358 ac_cv_prog_gnat_exists="yes"
20359 echo "$as_me:20359: found $ac_dir/$ac_word" >&5
20360 break
20361 done
20362
20363   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20364 fi
20365 fi
20366 gnat_exists=$ac_cv_prog_gnat_exists
20367 if test -n "$gnat_exists"; then
20368   echo "$as_me:20368: result: $gnat_exists" >&5
20369 echo "${ECHO_T}$gnat_exists" >&6
20370 else
20371   echo "$as_me:20371: result: no" >&5
20372 echo "${ECHO_T}no" >&6
20373 fi
20374
20375 if test "$ac_cv_prog_gnat_exists" = no; then
20376    cf_ada_make=
20377    cf_cv_prog_gnat_correct=no
20378 else
20379
20380 echo "$as_me:20380: checking for gnat version" >&5
20381 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20382 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20383         grep '[0-9].[0-9][0-9]*' |\
20384     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20385 echo "$as_me:20385: result: $cf_gnat_version" >&5
20386 echo "${ECHO_T}$cf_gnat_version" >&6
20387
20388 case $cf_gnat_version in #(vi
20389 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20390         cf_cv_prog_gnat_correct=yes
20391         ;;
20392 *)
20393         { echo "$as_me:20393: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20394 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20395         cf_cv_prog_gnat_correct=no
20396         ;;
20397 esac
20398
20399    # Extract the first word of "m4", so it can be a program name with args.
20400 set dummy m4; ac_word=$2
20401 echo "$as_me:20401: checking for $ac_word" >&5
20402 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20403 if test "${ac_cv_prog_M4_exists+set}" = set; then
20404   echo $ECHO_N "(cached) $ECHO_C" >&6
20405 else
20406   if test -n "$M4_exists"; then
20407   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20408 else
20409   ac_save_IFS=$IFS; IFS=$ac_path_separator
20410 ac_dummy="$PATH"
20411 for ac_dir in $ac_dummy; do
20412   IFS=$ac_save_IFS
20413   test -z "$ac_dir" && ac_dir=.
20414   $as_executable_p "$ac_dir/$ac_word" || continue
20415 ac_cv_prog_M4_exists="yes"
20416 echo "$as_me:20416: found $ac_dir/$ac_word" >&5
20417 break
20418 done
20419
20420   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20421 fi
20422 fi
20423 M4_exists=$ac_cv_prog_M4_exists
20424 if test -n "$M4_exists"; then
20425   echo "$as_me:20425: result: $M4_exists" >&5
20426 echo "${ECHO_T}$M4_exists" >&6
20427 else
20428   echo "$as_me:20428: result: no" >&5
20429 echo "${ECHO_T}no" >&6
20430 fi
20431
20432    if test "$ac_cv_prog_M4_exists" = no; then
20433       cf_cv_prog_gnat_correct=no
20434       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20435    fi
20436    if test "$cf_cv_prog_gnat_correct" = yes; then
20437       echo "$as_me:20437: checking if GNAT works" >&5
20438 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20439
20440 rm -rf conftest* *~conftest*
20441 cat >>conftest.ads <<CF_EOF
20442 procedure conftest;
20443 CF_EOF
20444 cat >>conftest.adb <<CF_EOF
20445 with Text_IO;
20446 with GNAT.OS_Lib;
20447 procedure conftest is
20448 begin
20449    Text_IO.Put ("Hello World");
20450    Text_IO.New_Line;
20451    GNAT.OS_Lib.OS_Exit (0);
20452 end conftest;
20453 CF_EOF
20454 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20455    if ( ./conftest 1>&5 2>&1 ) ; then
20456       cf_cv_prog_gnat_correct=yes
20457    else
20458       cf_cv_prog_gnat_correct=no
20459    fi
20460 else
20461    cf_cv_prog_gnat_correct=no
20462 fi
20463 rm -rf conftest* *~conftest*
20464
20465       echo "$as_me:20465: result: $cf_cv_prog_gnat_correct" >&5
20466 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20467    fi
20468 fi
20469
20470                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20471
20472         ADAFLAGS="$ADAFLAGS -gnatpn"
20473
20474         echo "$as_me:20474: checking optimization options for ADAFLAGS" >&5
20475 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20476         case "$CFLAGS" in
20477         *-g*)
20478
20479         ADAFLAGS="$ADAFLAGS -g"
20480
20481                 ;;
20482         esac
20483         case "$CFLAGS" in
20484         *-O*)
20485                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20486
20487         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20488
20489                 ;;
20490         esac
20491         echo "$as_me:20491: result: $ADAFLAGS" >&5
20492 echo "${ECHO_T}$ADAFLAGS" >&6
20493
20494 echo "$as_me:20494: checking if GNATPREP supports -T option" >&5
20495 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20496 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20497   echo $ECHO_N "(cached) $ECHO_C" >&6
20498 else
20499
20500 cf_cv_gnatprep_opt_t=no
20501 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20502
20503 fi
20504 echo "$as_me:20504: result: $cf_cv_gnatprep_opt_t" >&5
20505 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20506 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20507
20508 echo "$as_me:20508: checking if GNAT supports generics" >&5
20509 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20510 case $cf_gnat_version in #(vi
20511 3.[1-9]*|[4-9].*) #(vi
20512         cf_gnat_generics=yes
20513         ;;
20514 *)
20515         cf_gnat_generics=no
20516         ;;
20517 esac
20518 echo "$as_me:20518: result: $cf_gnat_generics" >&5
20519 echo "${ECHO_T}$cf_gnat_generics" >&6
20520
20521 if test "$cf_gnat_generics" = yes
20522 then
20523         cf_compile_generics=generics
20524         cf_generic_objects="\${GENOBJS}"
20525 else
20526         cf_compile_generics=
20527         cf_generic_objects=
20528 fi
20529
20530 echo "$as_me:20530: checking if GNAT supports SIGINT" >&5
20531 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20532 if test "${cf_cv_gnat_sigint+set}" = set; then
20533   echo $ECHO_N "(cached) $ECHO_C" >&6
20534 else
20535
20536 rm -rf conftest* *~conftest*
20537 cat >>conftest.ads <<CF_EOF
20538 with Ada.Interrupts.Names;
20539
20540 package ConfTest is
20541
20542    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20543    pragma Unreserve_All_Interrupts;
20544    pragma Warnings (On);
20545
20546    protected Process is
20547       procedure Stop;
20548       function Continue return Boolean;
20549       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20550    private
20551       Done : Boolean := False;
20552    end Process;
20553
20554 end ConfTest;
20555 CF_EOF
20556 cat >>conftest.adb <<CF_EOF
20557 package body ConfTest is
20558    protected body Process is
20559       procedure Stop is
20560       begin
20561          Done := True;
20562       end Stop;
20563       function Continue return Boolean is
20564       begin
20565          return not Done;
20566       end Continue;
20567    end Process;
20568 end ConfTest;
20569 CF_EOF
20570 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20571       cf_cv_gnat_sigint=yes
20572 else
20573    cf_cv_gnat_sigint=no
20574 fi
20575 rm -rf conftest* *~conftest*
20576
20577 fi
20578 echo "$as_me:20578: result: $cf_cv_gnat_sigint" >&5
20579 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20580
20581 if test $cf_cv_gnat_sigint = yes ; then
20582         USE_GNAT_SIGINT=""
20583 else
20584         USE_GNAT_SIGINT="#"
20585 fi
20586
20587 cf_gnat_libraries=no
20588 cf_gnat_projects=no
20589
20590 if test "$enable_gnat_projects" != no ; then
20591 echo "$as_me:20591: checking if GNAT supports project files" >&5
20592 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20593 case $cf_gnat_version in #(vi
20594 3.[0-9]*) #(vi
20595         ;;
20596 *)
20597         case $cf_cv_system_name in #(vi
20598         cygwin*|msys*) #(vi
20599                 ;;
20600         *)
20601                 mkdir conftest.src conftest.bin conftest.lib
20602                 cd conftest.src
20603                 rm -rf conftest* *~conftest*
20604                 cat >>library.gpr <<CF_EOF
20605 project Library is
20606   Kind := External ("LIB_KIND");
20607   for Library_Name use "ConfTest";
20608   for Object_Dir use ".";
20609   for Library_ALI_Dir use External("LIBRARY_DIR");
20610   for Library_Version use External ("SONAME");
20611   for Library_Kind use Kind;
20612   for Library_Dir use External("BUILD_DIR");
20613   Source_Dir := External ("SOURCE_DIR");
20614   for Source_Dirs use (Source_Dir);
20615 end Library;
20616 CF_EOF
20617                 cat >>confpackage.ads <<CF_EOF
20618 package ConfPackage is
20619    procedure conftest;
20620 end ConfPackage;
20621 CF_EOF
20622                 cat >>confpackage.adb <<CF_EOF
20623 with Text_IO;
20624 package body ConfPackage is
20625    procedure conftest is
20626    begin
20627       Text_IO.Put ("Hello World");
20628       Text_IO.New_Line;
20629    end conftest;
20630 end ConfPackage;
20631 CF_EOF
20632                 if ( $cf_ada_make $ADAFLAGS \
20633                                 -Plibrary.gpr \
20634                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20635                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20636                                 -XSOURCE_DIR=`pwd` \
20637                                 -XSONAME=libConfTest.so.1 \
20638                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20639                         cf_gnat_projects=yes
20640                 fi
20641                 cd ..
20642                 if test -f conftest.lib/confpackage.ali
20643                 then
20644                         cf_gnat_libraries=yes
20645                 fi
20646                 rm -rf conftest* *~conftest*
20647                 ;;
20648         esac
20649         ;;
20650 esac
20651 echo "$as_me:20651: result: $cf_gnat_projects" >&5
20652 echo "${ECHO_T}$cf_gnat_projects" >&6
20653 fi # enable_gnat_projects
20654
20655 if test $cf_gnat_projects = yes
20656 then
20657         echo "$as_me:20657: checking if GNAT supports libraries" >&5
20658 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20659         echo "$as_me:20659: result: $cf_gnat_libraries" >&5
20660 echo "${ECHO_T}$cf_gnat_libraries" >&6
20661 fi
20662
20663 if test "$cf_gnat_projects" = yes
20664 then
20665         USE_OLD_MAKERULES="#"
20666         USE_GNAT_PROJECTS=""
20667 else
20668         USE_OLD_MAKERULES=""
20669         USE_GNAT_PROJECTS="#"
20670 fi
20671
20672 if test "$cf_gnat_libraries" = yes
20673 then
20674         USE_GNAT_LIBRARIES=""
20675 else
20676         USE_GNAT_LIBRARIES="#"
20677 fi
20678
20679 echo "$as_me:20679: checking for ada-compiler" >&5
20680 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20681
20682 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20683 if test "${with_ada_compiler+set}" = set; then
20684   withval="$with_ada_compiler"
20685   cf_ada_compiler=$withval
20686 else
20687   cf_ada_compiler=gnatmake
20688 fi;
20689
20690 echo "$as_me:20690: result: $cf_ada_compiler" >&5
20691 echo "${ECHO_T}$cf_ada_compiler" >&6
20692
20693                         cf_ada_package=terminal_interface
20694
20695 echo "$as_me:20695: checking for ada-include" >&5
20696 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20697
20698 # Check whether --with-ada-include or --without-ada-include was given.
20699 if test "${with_ada_include+set}" = set; then
20700   withval="$with_ada_include"
20701
20702 else
20703   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20704 fi; if test -n "$prefix/share/ada/adainclude" ; then
20705
20706 if test "x$prefix" != xNONE; then
20707   cf_path_syntax="$prefix"
20708 else
20709   cf_path_syntax="$ac_default_prefix"
20710 fi
20711
20712 case ".$withval" in #(vi
20713 .\$\(*\)*|.\'*\'*) #(vi
20714   ;;
20715 ..|./*|.\\*) #(vi
20716   ;;
20717 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20718   ;;
20719 .\${*prefix}*|.\${*dir}*) #(vi
20720   eval withval="$withval"
20721   case ".$withval" in #(vi
20722   .NONE/*)
20723     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20724     ;;
20725   esac
20726   ;; #(vi
20727 .no|.NONE/*)
20728   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20729   ;;
20730 *)
20731   { { echo "$as_me:20731: error: expected a pathname, not \"$withval\"" >&5
20732 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20733    { (exit 1); exit 1; }; }
20734   ;;
20735 esac
20736
20737 fi
20738 eval ADA_INCLUDE="$withval"
20739
20740 echo "$as_me:20740: result: $ADA_INCLUDE" >&5
20741 echo "${ECHO_T}$ADA_INCLUDE" >&6
20742
20743 echo "$as_me:20743: checking for ada-objects" >&5
20744 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20745
20746 # Check whether --with-ada-objects or --without-ada-objects was given.
20747 if test "${with_ada_objects+set}" = set; then
20748   withval="$with_ada_objects"
20749
20750 else
20751   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20752 fi; if test -n "$prefix/lib/ada/adalib" ; then
20753
20754 if test "x$prefix" != xNONE; then
20755   cf_path_syntax="$prefix"
20756 else
20757   cf_path_syntax="$ac_default_prefix"
20758 fi
20759
20760 case ".$withval" in #(vi
20761 .\$\(*\)*|.\'*\'*) #(vi
20762   ;;
20763 ..|./*|.\\*) #(vi
20764   ;;
20765 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20766   ;;
20767 .\${*prefix}*|.\${*dir}*) #(vi
20768   eval withval="$withval"
20769   case ".$withval" in #(vi
20770   .NONE/*)
20771     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20772     ;;
20773   esac
20774   ;; #(vi
20775 .no|.NONE/*)
20776   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20777   ;;
20778 *)
20779   { { echo "$as_me:20779: error: expected a pathname, not \"$withval\"" >&5
20780 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20781    { (exit 1); exit 1; }; }
20782   ;;
20783 esac
20784
20785 fi
20786 eval ADA_OBJECTS="$withval"
20787
20788 echo "$as_me:20788: result: $ADA_OBJECTS" >&5
20789 echo "${ECHO_T}$ADA_OBJECTS" >&6
20790
20791 echo "$as_me:20791: checking if an Ada95 shared-library should be built" >&5
20792 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20793
20794 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20795 if test "${with_ada_sharedlib+set}" = set; then
20796   withval="$with_ada_sharedlib"
20797   with_ada_sharedlib=$withval
20798 else
20799   with_ada_sharedlib=no
20800 fi;
20801 echo "$as_me:20801: result: $with_ada_sharedlib" >&5
20802 echo "${ECHO_T}$with_ada_sharedlib" >&6
20803
20804 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20805 MAKE_ADA_SHAREDLIB="#"
20806
20807 if test "x$with_ada_sharedlib" != xno
20808 then
20809         MAKE_ADA_SHAREDLIB=
20810         if test "x$with_ada_sharedlib" != xyes
20811         then
20812                 ADA_SHAREDLIB="$with_ada_sharedlib"
20813         fi
20814 fi
20815
20816                 fi
20817         fi
20818 else
20819         cf_with_ada=no
20820 fi
20821
20822 # do this "late" to avoid conflict with header-checks
20823 if test "x$with_widec" = xyes ; then
20824         echo "$as_me:20824: checking for wchar_t" >&5
20825 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20826 if test "${ac_cv_type_wchar_t+set}" = set; then
20827   echo $ECHO_N "(cached) $ECHO_C" >&6
20828 else
20829   cat >conftest.$ac_ext <<_ACEOF
20830 #line 20830 "configure"
20831 #include "confdefs.h"
20832 $ac_includes_default
20833 int
20834 main ()
20835 {
20836 if ((wchar_t *) 0)
20837   return 0;
20838 if (sizeof (wchar_t))
20839   return 0;
20840   ;
20841   return 0;
20842 }
20843 _ACEOF
20844 rm -f conftest.$ac_objext
20845 if { (eval echo "$as_me:20845: \"$ac_compile\"") >&5
20846   (eval $ac_compile) 2>&5
20847   ac_status=$?
20848   echo "$as_me:20848: \$? = $ac_status" >&5
20849   (exit $ac_status); } &&
20850          { ac_try='test -s conftest.$ac_objext'
20851   { (eval echo "$as_me:20851: \"$ac_try\"") >&5
20852   (eval $ac_try) 2>&5
20853   ac_status=$?
20854   echo "$as_me:20854: \$? = $ac_status" >&5
20855   (exit $ac_status); }; }; then
20856   ac_cv_type_wchar_t=yes
20857 else
20858   echo "$as_me: failed program was:" >&5
20859 cat conftest.$ac_ext >&5
20860 ac_cv_type_wchar_t=no
20861 fi
20862 rm -f conftest.$ac_objext conftest.$ac_ext
20863 fi
20864 echo "$as_me:20864: result: $ac_cv_type_wchar_t" >&5
20865 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20866
20867 echo "$as_me:20867: checking size of wchar_t" >&5
20868 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20869 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20870   echo $ECHO_N "(cached) $ECHO_C" >&6
20871 else
20872   if test "$ac_cv_type_wchar_t" = yes; then
20873   if test "$cross_compiling" = yes; then
20874   # Depending upon the size, compute the lo and hi bounds.
20875 cat >conftest.$ac_ext <<_ACEOF
20876 #line 20876 "configure"
20877 #include "confdefs.h"
20878 $ac_includes_default
20879 int
20880 main ()
20881 {
20882 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20883   ;
20884   return 0;
20885 }
20886 _ACEOF
20887 rm -f conftest.$ac_objext
20888 if { (eval echo "$as_me:20888: \"$ac_compile\"") >&5
20889   (eval $ac_compile) 2>&5
20890   ac_status=$?
20891   echo "$as_me:20891: \$? = $ac_status" >&5
20892   (exit $ac_status); } &&
20893          { ac_try='test -s conftest.$ac_objext'
20894   { (eval echo "$as_me:20894: \"$ac_try\"") >&5
20895   (eval $ac_try) 2>&5
20896   ac_status=$?
20897   echo "$as_me:20897: \$? = $ac_status" >&5
20898   (exit $ac_status); }; }; then
20899   ac_lo=0 ac_mid=0
20900   while :; do
20901     cat >conftest.$ac_ext <<_ACEOF
20902 #line 20902 "configure"
20903 #include "confdefs.h"
20904 $ac_includes_default
20905 int
20906 main ()
20907 {
20908 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20909   ;
20910   return 0;
20911 }
20912 _ACEOF
20913 rm -f conftest.$ac_objext
20914 if { (eval echo "$as_me:20914: \"$ac_compile\"") >&5
20915   (eval $ac_compile) 2>&5
20916   ac_status=$?
20917   echo "$as_me:20917: \$? = $ac_status" >&5
20918   (exit $ac_status); } &&
20919          { ac_try='test -s conftest.$ac_objext'
20920   { (eval echo "$as_me:20920: \"$ac_try\"") >&5
20921   (eval $ac_try) 2>&5
20922   ac_status=$?
20923   echo "$as_me:20923: \$? = $ac_status" >&5
20924   (exit $ac_status); }; }; then
20925   ac_hi=$ac_mid; break
20926 else
20927   echo "$as_me: failed program was:" >&5
20928 cat conftest.$ac_ext >&5
20929 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20930 fi
20931 rm -f conftest.$ac_objext conftest.$ac_ext
20932   done
20933 else
20934   echo "$as_me: failed program was:" >&5
20935 cat conftest.$ac_ext >&5
20936 ac_hi=-1 ac_mid=-1
20937   while :; do
20938     cat >conftest.$ac_ext <<_ACEOF
20939 #line 20939 "configure"
20940 #include "confdefs.h"
20941 $ac_includes_default
20942 int
20943 main ()
20944 {
20945 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20946   ;
20947   return 0;
20948 }
20949 _ACEOF
20950 rm -f conftest.$ac_objext
20951 if { (eval echo "$as_me:20951: \"$ac_compile\"") >&5
20952   (eval $ac_compile) 2>&5
20953   ac_status=$?
20954   echo "$as_me:20954: \$? = $ac_status" >&5
20955   (exit $ac_status); } &&
20956          { ac_try='test -s conftest.$ac_objext'
20957   { (eval echo "$as_me:20957: \"$ac_try\"") >&5
20958   (eval $ac_try) 2>&5
20959   ac_status=$?
20960   echo "$as_me:20960: \$? = $ac_status" >&5
20961   (exit $ac_status); }; }; then
20962   ac_lo=$ac_mid; break
20963 else
20964   echo "$as_me: failed program was:" >&5
20965 cat conftest.$ac_ext >&5
20966 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20967 fi
20968 rm -f conftest.$ac_objext conftest.$ac_ext
20969   done
20970 fi
20971 rm -f conftest.$ac_objext conftest.$ac_ext
20972 # Binary search between lo and hi bounds.
20973 while test "x$ac_lo" != "x$ac_hi"; do
20974   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20975   cat >conftest.$ac_ext <<_ACEOF
20976 #line 20976 "configure"
20977 #include "confdefs.h"
20978 $ac_includes_default
20979 int
20980 main ()
20981 {
20982 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20983   ;
20984   return 0;
20985 }
20986 _ACEOF
20987 rm -f conftest.$ac_objext
20988 if { (eval echo "$as_me:20988: \"$ac_compile\"") >&5
20989   (eval $ac_compile) 2>&5
20990   ac_status=$?
20991   echo "$as_me:20991: \$? = $ac_status" >&5
20992   (exit $ac_status); } &&
20993          { ac_try='test -s conftest.$ac_objext'
20994   { (eval echo "$as_me:20994: \"$ac_try\"") >&5
20995   (eval $ac_try) 2>&5
20996   ac_status=$?
20997   echo "$as_me:20997: \$? = $ac_status" >&5
20998   (exit $ac_status); }; }; then
20999   ac_hi=$ac_mid
21000 else
21001   echo "$as_me: failed program was:" >&5
21002 cat conftest.$ac_ext >&5
21003 ac_lo=`expr $ac_mid + 1`
21004 fi
21005 rm -f conftest.$ac_objext conftest.$ac_ext
21006 done
21007 ac_cv_sizeof_wchar_t=$ac_lo
21008 else
21009   if test "$cross_compiling" = yes; then
21010   { { echo "$as_me:21010: error: cannot run test program while cross compiling" >&5
21011 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21012    { (exit 1); exit 1; }; }
21013 else
21014   cat >conftest.$ac_ext <<_ACEOF
21015 #line 21015 "configure"
21016 #include "confdefs.h"
21017 $ac_includes_default
21018 int
21019 main ()
21020 {
21021 FILE *f = fopen ("conftest.val", "w");
21022 if (!f)
21023   $ac_main_return (1);
21024 fprintf (f, "%d", (sizeof (wchar_t)));
21025 fclose (f);
21026   ;
21027   return 0;
21028 }
21029 _ACEOF
21030 rm -f conftest$ac_exeext
21031 if { (eval echo "$as_me:21031: \"$ac_link\"") >&5
21032   (eval $ac_link) 2>&5
21033   ac_status=$?
21034   echo "$as_me:21034: \$? = $ac_status" >&5
21035   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21036   { (eval echo "$as_me:21036: \"$ac_try\"") >&5
21037   (eval $ac_try) 2>&5
21038   ac_status=$?
21039   echo "$as_me:21039: \$? = $ac_status" >&5
21040   (exit $ac_status); }; }; then
21041   ac_cv_sizeof_wchar_t=`cat conftest.val`
21042 else
21043   echo "$as_me: program exited with status $ac_status" >&5
21044 echo "$as_me: failed program was:" >&5
21045 cat conftest.$ac_ext >&5
21046 fi
21047 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21048 fi
21049 fi
21050 rm -f conftest.val
21051 else
21052   ac_cv_sizeof_wchar_t=0
21053 fi
21054 fi
21055 echo "$as_me:21055: result: $ac_cv_sizeof_wchar_t" >&5
21056 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21057 cat >>confdefs.h <<EOF
21058 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21059 EOF
21060
21061 fi
21062
21063 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21064 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21065 ###
21066 ### ticlib modules may be a separate library, otherwise contained in termlib.
21067 ### termlib modules may be a separate library, otherwise contained in ncurses.
21068 ###
21069 ### The of "+" or " " between the tokens controls the way the script
21070 ### chooses to split module lists into libraries.
21071 ###
21072 ### (see CF_LIB_RULES).
21073 echo "$as_me:21073: checking for library subsets" >&5
21074 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21075 LIB_SUBSETS=
21076
21077 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21078         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21079         if test "$with_ticlib" != no ; then
21080                 LIB_SUBSETS="${LIB_SUBSETS} "
21081         else
21082                 LIB_SUBSETS="${LIB_SUBSETS}+"
21083         fi
21084 fi
21085
21086 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21087 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21088
21089 if test "$with_termlib" != no ; then
21090         LIB_SUBSETS="${LIB_SUBSETS} "
21091 else
21092         LIB_SUBSETS="${LIB_SUBSETS}+"
21093 fi
21094
21095 LIB_SUBSETS="${LIB_SUBSETS}base"
21096
21097 # Most term-driver calls are to tinfo, but some like init_pair are to the
21098 # base library (so it resides in base).
21099 if test "$with_term_driver" != no ; then
21100         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21101         case $cf_cv_system_name in #(vi
21102         *mingw32*|*mingw64*) #(vi
21103                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21104                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21105                 ;;
21106         *) #(vi
21107                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21108                 ;;
21109         esac
21110 fi
21111
21112 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21113 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21114
21115 echo "$as_me:21115: result: $LIB_SUBSETS" >&5
21116 echo "${ECHO_T}$LIB_SUBSETS" >&6
21117
21118 ### Construct the list of include-directories to be generated
21119
21120 if test "$srcdir" != "."; then
21121         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21122 fi
21123 CPPFLAGS="-I../include $CPPFLAGS"
21124 if test "$srcdir" != "."; then
21125         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21126 fi
21127 CPPFLAGS="-I. $CPPFLAGS"
21128
21129 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21130 if test "$srcdir" != "."; then
21131         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21132 fi
21133 if test "$GCC" != yes; then
21134         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21135 elif test "$includedir" != "/usr/include"; then
21136         if test "$includedir" = '${prefix}/include' ; then
21137                 if test x$prefix != x/usr ; then
21138                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21139                 fi
21140         else
21141                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21142         fi
21143 fi
21144
21145 ### Build up pieces for makefile rules
21146 echo "$as_me:21146: checking default library suffix" >&5
21147 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21148
21149         case $DFT_LWR_MODEL in
21150         libtool) DFT_ARG_SUFFIX=''   ;;
21151         normal)  DFT_ARG_SUFFIX=''   ;;
21152         debug)   DFT_ARG_SUFFIX='_g' ;;
21153         profile) DFT_ARG_SUFFIX='_p' ;;
21154         shared)  DFT_ARG_SUFFIX=''   ;;
21155         esac
21156         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21157 echo "$as_me:21157: result: $DFT_ARG_SUFFIX" >&5
21158 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21159
21160 echo "$as_me:21160: checking default library-dependency suffix" >&5
21161 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21162
21163         case X$DFT_LWR_MODEL in #(vi
21164         Xlibtool) #(vi
21165                 DFT_LIB_SUFFIX='.la'
21166                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21167                 ;;
21168         Xdebug) #(vi
21169                 DFT_LIB_SUFFIX='_g.a'
21170                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21171                 ;;
21172         Xprofile) #(vi
21173                 DFT_LIB_SUFFIX='_p.a'
21174                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21175                 ;;
21176         Xshared) #(vi
21177                 case $cf_cv_system_name in
21178                 aix[5-7]*) #(vi
21179                         DFT_LIB_SUFFIX='.so'
21180                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21181                         ;;
21182                 cygwin*|msys*|mingw*) #(vi
21183                         DFT_LIB_SUFFIX='.dll'
21184                         DFT_DEP_SUFFIX='.dll.a'
21185                         ;;
21186                 darwin*) #(vi
21187                         DFT_LIB_SUFFIX='.dylib'
21188                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21189                         ;;
21190                 hpux*) #(vi
21191                         case $target in
21192                         ia64*) #(vi
21193                                 DFT_LIB_SUFFIX='.so'
21194                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21195                                 ;;
21196                         *) #(vi
21197                                 DFT_LIB_SUFFIX='.sl'
21198                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21199                                 ;;
21200                         esac
21201                         ;;
21202                 *) #(vi
21203                         DFT_LIB_SUFFIX='.so'
21204                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21205                         ;;
21206                 esac
21207                 ;;
21208         *)
21209                 DFT_LIB_SUFFIX='.a'
21210                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21211                 ;;
21212         esac
21213         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
21214         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
21215 echo "$as_me:21215: result: $DFT_DEP_SUFFIX" >&5
21216 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21217
21218 echo "$as_me:21218: checking default object directory" >&5
21219 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21220
21221         case $DFT_LWR_MODEL in
21222         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21223         normal)  DFT_OBJ_SUBDIR='objects' ;;
21224         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21225         profile) DFT_OBJ_SUBDIR='obj_p' ;;
21226         shared)
21227                 case $cf_cv_system_name in #(vi
21228                 cygwin|msys) #(vi
21229                         DFT_OBJ_SUBDIR='objects' ;;
21230                 *)
21231                         DFT_OBJ_SUBDIR='obj_s' ;;
21232                 esac
21233         esac
21234 echo "$as_me:21234: result: $DFT_OBJ_SUBDIR" >&5
21235 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21236
21237 if test "x$cf_with_cxx" = xyes ; then
21238 echo "$as_me:21238: checking c++ library-dependency suffix" >&5
21239 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21240 if test "$with_libtool" != "no"; then
21241         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21242         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21243 elif test "$with_shared_cxx" != "no"; then
21244         # also for g++ users...
21245         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21246 else
21247         # we normally make a static library because C/C++ library rules differ
21248
21249         case Xnormal in #(vi
21250         Xlibtool) #(vi
21251                 CXX_LIB_SUFFIX='.la'
21252                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21253                 ;;
21254         Xdebug) #(vi
21255                 CXX_LIB_SUFFIX='_g.a'
21256                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21257                 ;;
21258         Xprofile) #(vi
21259                 CXX_LIB_SUFFIX='_p.a'
21260                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21261                 ;;
21262         Xshared) #(vi
21263                 case $cf_cv_system_name in
21264                 aix[5-7]*) #(vi
21265                         CXX_LIB_SUFFIX='.so'
21266                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21267                         ;;
21268                 cygwin*|msys*|mingw*) #(vi
21269                         CXX_LIB_SUFFIX='.dll'
21270                         CXX_DEP_SUFFIX='.dll.a'
21271                         ;;
21272                 darwin*) #(vi
21273                         CXX_LIB_SUFFIX='.dylib'
21274                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21275                         ;;
21276                 hpux*) #(vi
21277                         case $target in
21278                         ia64*) #(vi
21279                                 CXX_LIB_SUFFIX='.so'
21280                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21281                                 ;;
21282                         *) #(vi
21283                                 CXX_LIB_SUFFIX='.sl'
21284                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21285                                 ;;
21286                         esac
21287                         ;;
21288                 *) #(vi
21289                         CXX_LIB_SUFFIX='.so'
21290                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21291                         ;;
21292                 esac
21293                 ;;
21294         *)
21295                 CXX_LIB_SUFFIX='.a'
21296                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21297                 ;;
21298         esac
21299         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21300         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21301
21302 fi
21303 echo "$as_me:21303: result: $CXX_LIB_SUFFIX" >&5
21304 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21305
21306 fi
21307
21308 # do not want -ldl in build except as needed for -lncurses dependency
21309 if test "x$with_dlsym" = xyes ; then
21310 if test $DFT_LWR_MODEL = shared || \
21311    test $DFT_LWR_MODEL = libtool ; then
21312
21313 # remove dl library from $LIBS
21314 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21315
21316 fi
21317 fi
21318 ### Set up low-level terminfo dependencies for makefiles.
21319
21320 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21321 # do not need libdl
21322 TICS_LIST=
21323 if test "x$with_dlsym" = xyes ; then
21324
21325 # remove dl library from $SHLIB_LIST
21326 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21327
21328 fi
21329
21330 if test "$with_ticlib" != no ; then
21331
21332         if test "x$with_ticlib" != xyes ; then
21333                 TICS_NAME=$with_ticlib
21334                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21335                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21336                 TICS_LIB_SUFFIX="${with_ticlib}"
21337         else
21338                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21339                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21340                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21341         fi
21342         TICS_LDFLAGS="-L${LIB_DIR}"
21343         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21344 else
21345         TICS_LDFLAGS="-L${LIB_DIR}"
21346         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21347 fi
21348
21349 if test "$with_termlib" != no ; then
21350
21351         if test "x$with_termlib" != xyes ; then
21352                 TINFO_NAME=$with_termlib
21353                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21354                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21355                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21356                 TINFO_LIB_SUFFIX="${with_termlib}"
21357         else
21358                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21359                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21360                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21361                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21362         fi
21363
21364         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21365         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21366         if test "$DFT_LWR_MODEL" = "libtool"; then
21367                 TEST_ARGS="${TEST_DEPS}"
21368                 TEST_ARG2="${TEST_DEP2}"
21369                 TINFO_LDFLAGS="-L${LIB_DIR}"
21370                 TINFO_LIBS="$TEST_ARGS"
21371                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21372                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21373         else
21374                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21375                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21376                 if test "x$with_term_driver" != xno ; then
21377                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21378                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21379                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21380                 else
21381                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21382                         TINFO_LIBS="$TEST_ARGS"
21383                 fi
21384                 TINFO_LDFLAGS="-L${LIB_DIR}"
21385                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21386         fi
21387 else
21388         # the next lines are needed for linking libtic over libncurses
21389         TINFO_NAME=${LIB_NAME}
21390         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21391         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21392         if test "x$with_tic_depends" = xyes ; then
21393                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21394         else
21395                 TICS_LIST="$SHLIB_LIST"
21396         fi
21397
21398         TINFO_LDFLAGS="-L${LIB_DIR}"
21399         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21400 fi
21401
21402 if test "$DFT_LWR_MODEL" = shared ; then
21403         case $cf_cv_system_name in #(vi
21404         cygwin*|msys*)
21405                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21406                 TINFO_SUFFIX=.dll
21407                 ;;
21408         esac
21409 fi
21410
21411 if test "x$with_dlsym" = xyes ; then
21412
21413 # remove dl library from $TICS_LIST
21414 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21415
21416 fi
21417
21418 if test "$DFT_LWR_MODEL" = "libtool"; then
21419     OBJEXT=lo
21420 fi
21421
21422 # needed for Ada95
21423 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21424
21425 case $DFT_LWR_MODEL in
21426 normal|debug|profile)
21427
21428 if test "$GCC" = yes ; then
21429         case $cf_cv_system_name in #(
21430         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21431                 LDFLAGS_STATIC=
21432                 LDFLAGS_SHARED=
21433                 ;;
21434     *)  #( normally, except when broken
21435         LDFLAGS_STATIC=-static
21436         LDFLAGS_SHARED=-dynamic
21437         ;;
21438     esac
21439 else
21440         case $cf_cv_system_name in #(
21441         aix[4-7]*)      #( from ld manpage
21442                 LDFLAGS_STATIC=-bstatic
21443                 LDFLAGS_SHARED=-bdynamic
21444                 ;;
21445         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21446                 # We could also use just "archive" and "shared".
21447                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21448                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21449                 ;;
21450         irix*)          #( from ld manpage IRIX64
21451                 LDFLAGS_STATIC=-Bstatic
21452                 LDFLAGS_SHARED=-Bdynamic
21453                 ;;
21454         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21455                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21456                 LDFLAGS_STATIC=-noso
21457                 LDFLAGS_SHARED=-so_archive
21458                 ;;
21459         solaris2*)
21460                 LDFLAGS_STATIC=-Bstatic
21461                 LDFLAGS_SHARED=-Bdynamic
21462                 ;;
21463         esac
21464 fi
21465
21466 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21467 then
21468         echo "$as_me:21468: checking if linker supports switching between static/dynamic" >&5
21469 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21470
21471         rm -f libconftest.a
21472         cat >conftest.$ac_ext <<EOF
21473 #line 21473 "configure"
21474 #include <stdio.h>
21475 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21476 EOF
21477         if { (eval echo "$as_me:21477: \"$ac_compile\"") >&5
21478   (eval $ac_compile) 2>&5
21479   ac_status=$?
21480   echo "$as_me:21480: \$? = $ac_status" >&5
21481   (exit $ac_status); } ; then
21482                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21483                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21484         fi
21485         rm -f conftest.*
21486
21487         cf_save_LIBS="$LIBS"
21488
21489         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21490         cat >conftest.$ac_ext <<_ACEOF
21491 #line 21491 "configure"
21492 #include "confdefs.h"
21493
21494 #line 21494 "configure"
21495 #include <stdio.h>
21496 int cf_ldflags_static(FILE *fp);
21497
21498 int
21499 main ()
21500 {
21501
21502         return cf_ldflags_static(stdin);
21503
21504   ;
21505   return 0;
21506 }
21507 _ACEOF
21508 rm -f conftest.$ac_objext conftest$ac_exeext
21509 if { (eval echo "$as_me:21509: \"$ac_link\"") >&5
21510   (eval $ac_link) 2>&5
21511   ac_status=$?
21512   echo "$as_me:21512: \$? = $ac_status" >&5
21513   (exit $ac_status); } &&
21514          { ac_try='test -s conftest$ac_exeext'
21515   { (eval echo "$as_me:21515: \"$ac_try\"") >&5
21516   (eval $ac_try) 2>&5
21517   ac_status=$?
21518   echo "$as_me:21518: \$? = $ac_status" >&5
21519   (exit $ac_status); }; }; then
21520
21521         # some linkers simply ignore the -dynamic
21522         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21523         *static*) # (vi
21524                 cf_ldflags_static=no
21525                 ;;
21526         *)
21527                 cf_ldflags_static=yes
21528                 ;;
21529         esac
21530
21531 else
21532   echo "$as_me: failed program was:" >&5
21533 cat conftest.$ac_ext >&5
21534 cf_ldflags_static=no
21535 fi
21536 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21537
21538         rm -f libconftest.*
21539         LIBS="$cf_save_LIBS"
21540
21541         echo "$as_me:21541: result: $cf_ldflags_static" >&5
21542 echo "${ECHO_T}$cf_ldflags_static" >&6
21543
21544         if test $cf_ldflags_static != yes
21545         then
21546                 LDFLAGS_STATIC=
21547                 LDFLAGS_SHARED=
21548         fi
21549 else
21550         LDFLAGS_STATIC=
21551         LDFLAGS_SHARED=
21552 fi
21553
21554         ;;
21555 esac
21556
21557 echo "$as_me:21557: checking where we will install curses.h" >&5
21558 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21559
21560 includesubdir=
21561 if test "$with_overwrite" = no && \
21562  ( test "x$includedir" = 'x${prefix}/include' || \
21563    test "x$includedir" = "x${prefix}/include" )
21564 then
21565         includesubdir="/ncurses${LIB_SUFFIX}"
21566 fi
21567 echo "$as_me:21567: result: ${includedir}${includesubdir}" >&5
21568 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21569
21570 ### Resolve a conflict between normal and wide-curses by forcing applications
21571 ### that will need libutf8 to add it to their configure script.
21572 if test "$with_overwrite" != no ; then
21573 if test "$NCURSES_LIBUTF8" = 1 ; then
21574         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21575         { echo "$as_me:21575: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21576 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21577 fi
21578 fi
21579 WITH_OVERWRITE=$with_overwrite
21580
21581 # used to separate tack out of the tree
21582 NCURSES_TREE=
21583
21584 ### predefined stuff for the test programs
21585
21586 cat >>confdefs.h <<\EOF
21587 #define HAVE_SLK_COLOR 1
21588 EOF
21589
21590 ### Construct the list of subdirectories for which we'll customize makefiles
21591 ### with the appropriate compile-rules.
21592
21593 echo "$as_me:21593: checking for src modules" >&5
21594 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21595
21596 # dependencies and linker-arguments for test-programs
21597 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21598 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21599 if test "$DFT_LWR_MODEL" = "libtool"; then
21600         TEST_ARGS="${TEST_DEPS}"
21601         TEST_ARG2="${TEST_DEP2}"
21602 else
21603         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21604         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21605 fi
21606
21607 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21608 cf_cv_src_modules=
21609 for cf_dir in $modules_to_build
21610 do
21611         if test -f $srcdir/$cf_dir/modules; then
21612
21613                 # We may/may not have tack in the distribution, though the
21614                 # makefile is.
21615                 if test $cf_dir = tack ; then
21616                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21617                                 continue
21618                         fi
21619                 fi
21620
21621                 if test -z "$cf_cv_src_modules"; then
21622                         cf_cv_src_modules=$cf_dir
21623                 else
21624                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21625                 fi
21626
21627                 # Make the ncurses_cfg.h file record the library interface files as
21628                 # well.  These are header files that are the same name as their
21629                 # directory.  Ncurses is the only library that does not follow
21630                 # that pattern.
21631                 if test $cf_dir = tack ; then
21632                         continue
21633                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21634
21635 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21636
21637                         cat >>confdefs.h <<EOF
21638 #define HAVE_${cf_have_include}_H 1
21639 EOF
21640
21641                         cat >>confdefs.h <<EOF
21642 #define HAVE_LIB${cf_have_include} 1
21643 EOF
21644
21645                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21646                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21647                         if test "$DFT_LWR_MODEL" = "libtool"; then
21648                                 TEST_ARGS="${TEST_DEPS}"
21649                                 TEST_ARG2="${TEST_DEP2}"
21650                         else
21651                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21652                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21653                         fi
21654                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21655                 fi
21656         fi
21657 done
21658 echo "$as_me:21658: result: $cf_cv_src_modules" >&5
21659 echo "${ECHO_T}$cf_cv_src_modules" >&6
21660
21661 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21662 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21663
21664 SRC_SUBDIRS=
21665 if test "x$cf_with_manpages" != xno ; then
21666         SRC_SUBDIRS="$SRC_SUBDIRS man"
21667 fi
21668 SRC_SUBDIRS="$SRC_SUBDIRS include"
21669 for cf_dir in $cf_cv_src_modules
21670 do
21671         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21672 done
21673 if test "x$cf_with_tests" != "xno" ; then
21674         SRC_SUBDIRS="$SRC_SUBDIRS test"
21675 fi
21676 # always make this, to install the ncurses-config script
21677 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21678 if test "$cf_with_cxx_binding" != no; then
21679         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21680         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21681 fi
21682
21683 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21684 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21685
21686 ADA_SUBDIRS=
21687 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21688         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21689         ADA_SUBDIRS="gen src"
21690         if test "x$cf_with_tests" != "xno" ; then
21691                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21692         fi
21693 fi
21694
21695 SUB_MAKEFILES=
21696 for cf_dir in $SRC_SUBDIRS
21697 do
21698         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21699 done
21700
21701 if test -n "$ADA_SUBDIRS"; then
21702         for cf_dir in $ADA_SUBDIRS
21703         do
21704                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21705         done
21706
21707 fi
21708
21709 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21710    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21711    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21712 fi
21713
21714 DIRS_TO_MAKE="lib"
21715 for cf_item in $cf_list_models
21716 do
21717
21718         case $cf_item in
21719         libtool) cf_subdir='obj_lo'  ;;
21720         normal)  cf_subdir='objects' ;;
21721         debug)   cf_subdir='obj_g' ;;
21722         profile) cf_subdir='obj_p' ;;
21723         shared)
21724                 case $cf_cv_system_name in #(vi
21725                 cygwin|msys) #(vi
21726                         cf_subdir='objects' ;;
21727                 *)
21728                         cf_subdir='obj_s' ;;
21729                 esac
21730         esac
21731
21732         for cf_item2 in $DIRS_TO_MAKE
21733         do
21734                 test $cf_item2 = $cf_subdir && break
21735         done
21736         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21737 done
21738 for cf_dir in $DIRS_TO_MAKE
21739 do
21740         test ! -d $cf_dir && mkdir $cf_dir
21741 done
21742
21743 # symbols that differ when compiling Ada95 by itself.
21744 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21745
21746 # values to use as strings
21747
21748 cat >>confdefs.h <<EOF
21749 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21750 EOF
21751
21752 cat >>confdefs.h <<EOF
21753 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21754 EOF
21755
21756 ### Now that we're done running tests, add the compiler-warnings, if any
21757
21758 cf_fix_cppflags=no
21759 cf_new_cflags=
21760 cf_new_cppflags=
21761 cf_new_extra_cppflags=
21762
21763 for cf_add_cflags in $EXTRA_CFLAGS
21764 do
21765 case $cf_fix_cppflags in
21766 no)
21767         case $cf_add_cflags in #(vi
21768         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21769                 case $cf_add_cflags in
21770                 -D*)
21771                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21772
21773                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21774                                 && test -z "${cf_tst_cflags}" \
21775                                 && cf_fix_cppflags=yes
21776
21777                         if test $cf_fix_cppflags = yes ; then
21778                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21779                                 continue
21780                         elif test "${cf_tst_cflags}" = "\"'" ; then
21781                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21782                                 continue
21783                         fi
21784                         ;;
21785                 esac
21786                 case "$CPPFLAGS" in
21787                 *$cf_add_cflags) #(vi
21788                         ;;
21789                 *) #(vi
21790                         case $cf_add_cflags in #(vi
21791                         -D*)
21792                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21793
21794 CPPFLAGS=`echo "$CPPFLAGS" | \
21795         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21796                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21797
21798                                 ;;
21799                         esac
21800                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21801                         ;;
21802                 esac
21803                 ;;
21804         *)
21805                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21806                 ;;
21807         esac
21808         ;;
21809 yes)
21810         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21811
21812         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21813
21814         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21815                 && test -z "${cf_tst_cflags}" \
21816                 && cf_fix_cppflags=no
21817         ;;
21818 esac
21819 done
21820
21821 if test -n "$cf_new_cflags" ; then
21822
21823         CFLAGS="$CFLAGS $cf_new_cflags"
21824 fi
21825
21826 if test -n "$cf_new_cppflags" ; then
21827
21828         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21829 fi
21830
21831 if test -n "$cf_new_extra_cppflags" ; then
21832
21833         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21834 fi
21835
21836 ### Define substitutions for header files to avoid name-pollution
21837
21838 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21839         HAVE_TCGETATTR=1
21840 else
21841         HAVE_TCGETATTR=0
21842 fi
21843
21844 if test "x$ac_cv_header_stdint_h" = xyes ; then
21845         HAVE_STDINT_H=1
21846 else
21847         HAVE_STDINT_H=0
21848 fi
21849
21850 if test "x$ac_cv_header_termio_h" = xyes ; then
21851         HAVE_TERMIO_H=1
21852 else
21853         HAVE_TERMIO_H=0
21854 fi
21855
21856 if test "x$ac_cv_header_termios_h" = xyes ; then
21857         HAVE_TERMIOS_H=1
21858 else
21859         HAVE_TERMIOS_H=0
21860 fi
21861
21862 ################################################################################
21863 test "x$use_database" = xyes && \
21864 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21865
21866 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21867 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21868
21869 if test "x$enable_pc_files" = xyes ; then \
21870 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21871 MAKE_PC_FILES=
21872 else
21873 MAKE_PC_FILES="#"
21874 fi
21875
21876 # Extract the first word of "tic", so it can be a program name with args.
21877 set dummy tic; ac_word=$2
21878 echo "$as_me:21878: checking for $ac_word" >&5
21879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21880 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21881   echo $ECHO_N "(cached) $ECHO_C" >&6
21882 else
21883   case $TIC_PATH in
21884   [\\/]* | ?:[\\/]*)
21885   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21886   ;;
21887   *)
21888   ac_save_IFS=$IFS; IFS=$ac_path_separator
21889 ac_dummy="$PATH:/usr/local/ncurses/bin"
21890 for ac_dir in $ac_dummy; do
21891   IFS=$ac_save_IFS
21892   test -z "$ac_dir" && ac_dir=.
21893   if $as_executable_p "$ac_dir/$ac_word"; then
21894    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21895    echo "$as_me:21895: found $ac_dir/$ac_word" >&5
21896    break
21897 fi
21898 done
21899
21900   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21901   ;;
21902 esac
21903 fi
21904 TIC_PATH=$ac_cv_path_TIC_PATH
21905
21906 if test -n "$TIC_PATH"; then
21907   echo "$as_me:21907: result: $TIC_PATH" >&5
21908 echo "${ECHO_T}$TIC_PATH" >&6
21909 else
21910   echo "$as_me:21910: result: no" >&5
21911 echo "${ECHO_T}no" >&6
21912 fi
21913
21914 if test -n "$FALLBACK_LIST"
21915 then
21916         if test "$TIC_PATH" = unknown
21917         then
21918                 { echo "$as_me:21918: WARNING: no tic program found for fallbacks" >&5
21919 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21920         fi
21921 fi
21922
21923 if test "x$cf_with_tests" != xno ; then
21924         MAKE_TESTS=
21925 else
21926         MAKE_TESTS="#"
21927 fi
21928
21929 ADAHTML_DIR=../../doc/html/ada
21930
21931 # these could be configurable, but are not currently
21932 PANEL_NAME=panel
21933 MENU_NAME=menu
21934 FORM_NAME=form
21935 CXX_NAME=ncurses++
21936
21937 # workaround for g++ versus Solaris (20131116)
21938 case $cf_cv_system_name in #(vi
21939 solaris2*) #(vi
21940         case "x$CPPFLAGS" in #(vi
21941         *-D_XOPEN_SOURCE_EXTENDED*)
21942                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21943
21944 echo "${as_me:-configure}:21944: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21945
21946                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21947                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21948                 ;;
21949         esac
21950         ;;
21951 esac
21952
21953 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21954 case "x$NCURSES_OSPEED" in #(vi
21955 *short*) #(vi
21956         cf_compatible=1
21957         ;;
21958 *)
21959         cf_compatible=0
21960         ;;
21961 esac
21962
21963 cat >>confdefs.h <<EOF
21964 #define NCURSES_OSPEED_COMPAT $cf_compatible
21965 EOF
21966
21967 case "x$cf_cv_typeof_chtype" in
21968 xshort|xint|xlong)
21969         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
21970         ;;
21971 esac
21972
21973 case "x$cf_cv_typeof_mmask_t" in
21974 xshort|xint|xlong)
21975         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
21976         ;;
21977 esac
21978
21979 # substitute into misc/Makefile to suppress
21980 # (un)install.data from the
21981 # (un)install rules.
21982 if test "x$cf_with_db_install" = "xno"; then
21983         MISC_INSTALL_DATA=
21984         MISC_UNINSTALL_DATA=
21985 else
21986         MISC_INSTALL_DATA=install.data
21987         MISC_UNINSTALL_DATA=uninstall.data
21988 fi
21989
21990 SUB_SCRIPTS=
21991
21992 if test -n "$PACKAGE"
21993 then
21994         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
21995         export PACKAGE
21996         echo "package: $PACKAGE"
21997 fi
21998
21999 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"
22000 ac_config_commands="$ac_config_commands default"
22001 cat >confcache <<\_ACEOF
22002 # This file is a shell script that caches the results of configure
22003 # tests run on this system so they can be shared between configure
22004 # scripts and configure runs, see configure's option --config-cache.
22005 # It is not useful on other systems.  If it contains results you don't
22006 # want to keep, you may remove or edit it.
22007 #
22008 # config.status only pays attention to the cache file if you give it
22009 # the --recheck option to rerun configure.
22010 #
22011 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22012 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22013 # following values.
22014
22015 _ACEOF
22016
22017 # The following way of writing the cache mishandles newlines in values,
22018 # but we know of no workaround that is simple, portable, and efficient.
22019 # So, don't put newlines in cache variables' values.
22020 # Ultrix sh set writes to stderr and can't be redirected directly,
22021 # and sets the high bit in the cache file unless we assign to the vars.
22022 {
22023   (set) 2>&1 |
22024     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22025     *ac_space=\ *)
22026       # `set' does not quote correctly, so add quotes (double-quote
22027       # substitution turns \\\\ into \\, and sed turns \\ into \).
22028       sed -n \
22029         "s/'/'\\\\''/g;
22030           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22031       ;;
22032     *)
22033       # `set' quotes correctly as required by POSIX, so do not add quotes.
22034       sed -n \
22035         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22036       ;;
22037     esac;
22038 } |
22039   sed '
22040      t clear
22041      : clear
22042      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22043      t end
22044      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22045      : end' >>confcache
22046 if cmp -s $cache_file confcache; then :; else
22047   if test -w $cache_file; then
22048     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22049     cat confcache >$cache_file
22050   else
22051     echo "not updating unwritable cache $cache_file"
22052   fi
22053 fi
22054 rm -f confcache
22055
22056 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22057 # Let make expand exec_prefix.
22058 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22059
22060 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22061 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22062 # trailing colons and then remove the whole line if VPATH becomes empty
22063 # (actually we leave an empty line to preserve line numbers).
22064 if test "x$srcdir" = x.; then
22065   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22066 s/:*\$(srcdir):*/:/;
22067 s/:*\${srcdir}:*/:/;
22068 s/:*@srcdir@:*/:/;
22069 s/^\([^=]*=[    ]*\):*/\1/;
22070 s/:*$//;
22071 s/^[^=]*=[      ]*$//;
22072 }'
22073 fi
22074
22075 DEFS=-DHAVE_CONFIG_H
22076
22077 : ${CONFIG_STATUS=./config.status}
22078 ac_clean_files_save=$ac_clean_files
22079 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22080 { echo "$as_me:22080: creating $CONFIG_STATUS" >&5
22081 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22082 cat >$CONFIG_STATUS <<_ACEOF
22083 #! $SHELL
22084 # Generated automatically by configure.
22085 # Run this file to recreate the current configuration.
22086 # Compiler output produced by configure, useful for debugging
22087 # configure, is in config.log if it exists.
22088
22089 debug=false
22090 SHELL=\${CONFIG_SHELL-$SHELL}
22091 ac_cs_invocation="\$0 \$@"
22092
22093 _ACEOF
22094
22095 cat >>$CONFIG_STATUS <<\_ACEOF
22096 # Be Bourne compatible
22097 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22098   emulate sh
22099   NULLCMD=:
22100 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22101   set -o posix
22102 fi
22103
22104 # Name of the executable.
22105 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22106
22107 if expr a : '\(a\)' >/dev/null 2>&1; then
22108   as_expr=expr
22109 else
22110   as_expr=false
22111 fi
22112
22113 rm -f conf$$ conf$$.exe conf$$.file
22114 echo >conf$$.file
22115 if ln -s conf$$.file conf$$ 2>/dev/null; then
22116   # We could just check for DJGPP; but this test a) works b) is more generic
22117   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22118   if test -f conf$$.exe; then
22119     # Don't use ln at all; we don't have any links
22120     as_ln_s='cp -p'
22121   else
22122     as_ln_s='ln -s'
22123   fi
22124 elif ln conf$$.file conf$$ 2>/dev/null; then
22125   as_ln_s=ln
22126 else
22127   as_ln_s='cp -p'
22128 fi
22129 rm -f conf$$ conf$$.exe conf$$.file
22130
22131 as_executable_p="test -f"
22132
22133 # Support unset when possible.
22134 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22135   as_unset=unset
22136 else
22137   as_unset=false
22138 fi
22139
22140 # NLS nuisances.
22141 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22142 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22143 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22144 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22145 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22146 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22147 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22148 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22149
22150 # IFS
22151 # We need space, tab and new line, in precisely that order.
22152 as_nl='
22153 '
22154 IFS="   $as_nl"
22155
22156 # CDPATH.
22157 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22158
22159 exec 6>&1
22160
22161 _ACEOF
22162
22163 # Files that config.status was made for.
22164 if test -n "$ac_config_files"; then
22165   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22166 fi
22167
22168 if test -n "$ac_config_headers"; then
22169   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22170 fi
22171
22172 if test -n "$ac_config_links"; then
22173   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22174 fi
22175
22176 if test -n "$ac_config_commands"; then
22177   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22178 fi
22179
22180 cat >>$CONFIG_STATUS <<\EOF
22181
22182 ac_cs_usage="\
22183 \`$as_me' instantiates files from templates according to the
22184 current configuration.
22185
22186 Usage: $0 [OPTIONS] [FILE]...
22187
22188   -h, --help       print this help, then exit
22189   -V, --version    print version number, then exit
22190   -d, --debug      don't remove temporary files
22191       --recheck    update $as_me by reconfiguring in the same conditions
22192   --file=FILE[:TEMPLATE]
22193                    instantiate the configuration file FILE
22194   --header=FILE[:TEMPLATE]
22195                    instantiate the configuration header FILE
22196
22197 Configuration files:
22198 $config_files
22199
22200 Configuration headers:
22201 $config_headers
22202
22203 Configuration commands:
22204 $config_commands
22205
22206 Report bugs to <dickey@invisible-island.net>."
22207 EOF
22208
22209 cat >>$CONFIG_STATUS <<EOF
22210 ac_cs_version="\\
22211 config.status
22212 configured by $0, generated by GNU Autoconf 2.52.20121002,
22213   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22214
22215 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22216 Free Software Foundation, Inc.
22217 This config.status script is free software; the Free Software Foundation
22218 gives unlimited permission to copy, distribute and modify it."
22219 srcdir=$srcdir
22220 INSTALL="$INSTALL"
22221 EOF
22222
22223 cat >>$CONFIG_STATUS <<\EOF
22224 # If no file are specified by the user, then we need to provide default
22225 # value.  By we need to know if files were specified by the user.
22226 ac_need_defaults=:
22227 while test $# != 0
22228 do
22229   case $1 in
22230   --*=*)
22231     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22232     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22233     shift
22234     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22235     shift
22236     ;;
22237   -*);;
22238   *) # This is not an option, so the user has probably given explicit
22239      # arguments.
22240      ac_need_defaults=false;;
22241   esac
22242
22243   case $1 in
22244   # Handling of the options.
22245 EOF
22246 cat >>$CONFIG_STATUS <<EOF
22247   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22248     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22249     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22250 EOF
22251 cat >>$CONFIG_STATUS <<\EOF
22252   --version | --vers* | -V )
22253     echo "$ac_cs_version"; exit 0 ;;
22254   --he | --h)
22255     # Conflict between --help and --header
22256     { { echo "$as_me:22256: error: ambiguous option: $1
22257 Try \`$0 --help' for more information." >&5
22258 echo "$as_me: error: ambiguous option: $1
22259 Try \`$0 --help' for more information." >&2;}
22260    { (exit 1); exit 1; }; };;
22261   --help | --hel | -h )
22262     echo "$ac_cs_usage"; exit 0 ;;
22263   --debug | --d* | -d )
22264     debug=: ;;
22265   --file | --fil | --fi | --f )
22266     shift
22267     CONFIG_FILES="$CONFIG_FILES $1"
22268     ac_need_defaults=false;;
22269   --header | --heade | --head | --hea )
22270     shift
22271     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22272     ac_need_defaults=false;;
22273
22274   # This is an error.
22275   -*) { { echo "$as_me:22275: error: unrecognized option: $1
22276 Try \`$0 --help' for more information." >&5
22277 echo "$as_me: error: unrecognized option: $1
22278 Try \`$0 --help' for more information." >&2;}
22279    { (exit 1); exit 1; }; } ;;
22280
22281   *) ac_config_targets="$ac_config_targets $1" ;;
22282
22283   esac
22284   shift
22285 done
22286
22287 exec 5>>config.log
22288 cat >&5 << _ACEOF
22289
22290 ## ----------------------- ##
22291 ## Running config.status.  ##
22292 ## ----------------------- ##
22293
22294 This file was extended by $as_me 2.52.20121002, executed with
22295   CONFIG_FILES    = $CONFIG_FILES
22296   CONFIG_HEADERS  = $CONFIG_HEADERS
22297   CONFIG_LINKS    = $CONFIG_LINKS
22298   CONFIG_COMMANDS = $CONFIG_COMMANDS
22299   > $ac_cs_invocation
22300 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22301
22302 _ACEOF
22303 EOF
22304
22305 cat >>$CONFIG_STATUS <<EOF
22306 #
22307 # INIT-COMMANDS section.
22308 #
22309
22310 ### Special initialization commands, used to pass information from the
22311 ### configuration-run into config.status
22312
22313 AWK="$AWK"
22314 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22315 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22316 ECHO_LD="$ECHO_LD"
22317 LDCONFIG="$LDCONFIG"
22318 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22319 LIB_NAME="$LIB_NAME"
22320 LIB_PREFIX="$LIB_PREFIX"
22321 LIB_SUBSETS="$LIB_SUBSETS"
22322 LIB_SUFFIX="$LIB_SUFFIX"
22323 LIB_TRACING="$LIB_TRACING"
22324 LN_S="$LN_S"
22325 MAKE_TERMINFO="$MAKE_TERMINFO"
22326 NCURSES_MAJOR="$NCURSES_MAJOR"
22327 NCURSES_MINOR="$NCURSES_MINOR"
22328 NCURSES_OSPEED="$NCURSES_OSPEED"
22329 NCURSES_PATCH="$NCURSES_PATCH"
22330 SRC_SUBDIRS="$SRC_SUBDIRS"
22331 TERMINFO="$TERMINFO"
22332 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22333 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22334 TICS_NAME="$TICS_NAME"
22335 TIC_PATH="$TIC_PATH"
22336 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22337 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22338 TINFO_NAME="$TINFO_NAME"
22339 TINFO_SUFFIX="$TINFO_SUFFIX"
22340 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22341 WITH_CURSES_H="$with_curses_h"
22342 WITH_ECHO="${enable_echo:=yes}"
22343 WITH_OVERWRITE="$with_overwrite"
22344 cf_LIST_MODELS="$cf_list_models"
22345 cf_cv_abi_version="$cf_cv_abi_version"
22346 cf_cv_do_relink="$cf_cv_do_relink"
22347 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22348 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22349 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22350 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22351 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22352 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22353 cf_cv_rel_version="$cf_cv_rel_version"
22354 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22355 cf_cv_shared_soname='$cf_cv_shared_soname'
22356 cf_cv_shlib_version="$cf_cv_shlib_version"
22357 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22358 cf_cv_system_name="$cf_cv_system_name"
22359 cf_cv_term_driver="$with_term_driver"
22360 cf_with_ada="$cf_with_ada"
22361 cf_with_cxx_binding="$cf_with_cxx_binding"
22362 cf_with_db_install="$cf_with_db_install"
22363 cf_with_manpages="$cf_with_manpages"
22364 cf_with_tests="$cf_with_tests"
22365 with_shared_cxx="$with_shared_cxx"
22366 host="$host"
22367 target="$target"
22368
22369 EOF
22370
22371 cat >>$CONFIG_STATUS <<\EOF
22372 for ac_config_target in $ac_config_targets
22373 do
22374   case "$ac_config_target" in
22375   # Handling of arguments.
22376   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22377   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22378   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22379   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22380   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22381   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22382   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22383   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22384   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22385   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22386   *) { { echo "$as_me:22386: error: invalid argument: $ac_config_target" >&5
22387 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22388    { (exit 1); exit 1; }; };;
22389   esac
22390 done
22391
22392 # If the user did not use the arguments to specify the items to instantiate,
22393 # then the envvar interface is used.  Set only those that are not.
22394 # We use the long form for the default assignment because of an extremely
22395 # bizarre bug on SunOS 4.1.3.
22396 if $ac_need_defaults; then
22397   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22398   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22399   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22400 fi
22401
22402 # Create a temporary directory, and hook for its removal unless debugging.
22403 $debug ||
22404 {
22405   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22406   trap '{ (exit 1); exit 1; }' 1 2 13 15
22407 }
22408
22409 # Create a (secure) tmp directory for tmp files.
22410 : ${TMPDIR=/tmp}
22411 {
22412   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22413   test -n "$tmp" && test -d "$tmp"
22414 }  ||
22415 {
22416   tmp=$TMPDIR/cs$$-$RANDOM
22417   (umask 077 && mkdir $tmp)
22418 } ||
22419 {
22420    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22421    { (exit 1); exit 1; }
22422 }
22423
22424 EOF
22425
22426 cat >>$CONFIG_STATUS <<EOF
22427
22428 #
22429 # CONFIG_FILES section.
22430 #
22431
22432 # No need to generate the scripts if there are no CONFIG_FILES.
22433 # This happens for instance when ./config.status config.h
22434 if test -n "\$CONFIG_FILES"; then
22435   # Protect against being on the right side of a sed subst in config.status.
22436   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22437    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22438 s,@SHELL@,$SHELL,;t t
22439 s,@exec_prefix@,$exec_prefix,;t t
22440 s,@prefix@,$prefix,;t t
22441 s,@program_transform_name@,$program_transform_name,;t t
22442 s,@bindir@,$bindir,;t t
22443 s,@sbindir@,$sbindir,;t t
22444 s,@libexecdir@,$libexecdir,;t t
22445 s,@datarootdir@,$datarootdir,;t t
22446 s,@datadir@,$datadir,;t t
22447 s,@sysconfdir@,$sysconfdir,;t t
22448 s,@sharedstatedir@,$sharedstatedir,;t t
22449 s,@localstatedir@,$localstatedir,;t t
22450 s,@libdir@,$libdir,;t t
22451 s,@includedir@,$includedir,;t t
22452 s,@oldincludedir@,$oldincludedir,;t t
22453 s,@infodir@,$infodir,;t t
22454 s,@mandir@,$mandir,;t t
22455 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22456 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22457 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22458 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22459 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22460 s,@build_alias@,$build_alias,;t t
22461 s,@host_alias@,$host_alias,;t t
22462 s,@target_alias@,$target_alias,;t t
22463 s,@ECHO_C@,$ECHO_C,;t t
22464 s,@ECHO_N@,$ECHO_N,;t t
22465 s,@ECHO_T@,$ECHO_T,;t t
22466 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22467 s,@DEFS@,$DEFS,;t t
22468 s,@LIBS@,$LIBS,;t t
22469 s,@top_builddir@,$top_builddir,;t t
22470 s,@EGREP@,$EGREP,;t t
22471 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22472 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22473 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22474 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22475 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22476 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22477 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22478 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22479 s,@VERSION@,$VERSION,;t t
22480 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22481 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22482 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22483 s,@PACKAGE@,$PACKAGE,;t t
22484 s,@build@,$build,;t t
22485 s,@build_cpu@,$build_cpu,;t t
22486 s,@build_vendor@,$build_vendor,;t t
22487 s,@build_os@,$build_os,;t t
22488 s,@host@,$host,;t t
22489 s,@host_cpu@,$host_cpu,;t t
22490 s,@host_vendor@,$host_vendor,;t t
22491 s,@host_os@,$host_os,;t t
22492 s,@target@,$target,;t t
22493 s,@target_cpu@,$target_cpu,;t t
22494 s,@target_vendor@,$target_vendor,;t t
22495 s,@target_os@,$target_os,;t t
22496 s,@CC@,$CC,;t t
22497 s,@CFLAGS@,$CFLAGS,;t t
22498 s,@LDFLAGS@,$LDFLAGS,;t t
22499 s,@CPPFLAGS@,$CPPFLAGS,;t t
22500 s,@ac_ct_CC@,$ac_ct_CC,;t t
22501 s,@EXEEXT@,$EXEEXT,;t t
22502 s,@OBJEXT@,$OBJEXT,;t t
22503 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22504 s,@CPP@,$CPP,;t t
22505 s,@LDCONFIG@,$LDCONFIG,;t t
22506 s,@CXX@,$CXX,;t t
22507 s,@CXXFLAGS@,$CXXFLAGS,;t t
22508 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22509 s,@AWK@,$AWK,;t t
22510 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22511 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22512 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22513 s,@LINT@,$LINT,;t t
22514 s,@LINT_OPTS@,$LINT_OPTS,;t t
22515 s,@LN_S@,$LN_S,;t t
22516 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22517 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22518 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22519 s,@SET_MAKE@,$SET_MAKE,;t t
22520 s,@CTAGS@,$CTAGS,;t t
22521 s,@ETAGS@,$ETAGS,;t t
22522 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22523 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22524 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22525 s,@RANLIB@,$RANLIB,;t t
22526 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22527 s,@LD@,$LD,;t t
22528 s,@ac_ct_LD@,$ac_ct_LD,;t t
22529 s,@AR@,$AR,;t t
22530 s,@ac_ct_AR@,$ac_ct_AR,;t t
22531 s,@NM@,$NM,;t t
22532 s,@ac_ct_NM@,$ac_ct_NM,;t t
22533 s,@ARFLAGS@,$ARFLAGS,;t t
22534 s,@DESTDIR@,$DESTDIR,;t t
22535 s,@BUILD_CC@,$BUILD_CC,;t t
22536 s,@BUILD_CPP@,$BUILD_CPP,;t t
22537 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22538 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22539 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22540 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22541 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22542 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22543 s,@cf_list_models@,$cf_list_models,;t t
22544 s,@ABI_VERSION@,$ABI_VERSION,;t t
22545 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22546 s,@LIBTOOL@,$LIBTOOL,;t t
22547 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22548 s,@LT_UNDEF@,$LT_UNDEF,;t t
22549 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22550 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22551 s,@LIB_CREATE@,$LIB_CREATE,;t t
22552 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22553 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22554 s,@LIB_PREP@,$LIB_PREP,;t t
22555 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22556 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22557 s,@LIB_LINK@,$LIB_LINK,;t t
22558 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22559 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22560 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22561 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22562 s,@TICS_NAME@,$TICS_NAME,;t t
22563 s,@TINFO_NAME@,$TINFO_NAME,;t t
22564 s,@LIB_NAME@,$LIB_NAME,;t t
22565 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22566 s,@CC_G_OPT@,$CC_G_OPT,;t t
22567 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22568 s,@LD_MODEL@,$LD_MODEL,;t t
22569 s,@shlibdir@,$shlibdir,;t t
22570 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22571 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22572 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22573 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22574 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22575 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22576 s,@LINK_PROGS@,$LINK_PROGS,;t t
22577 s,@LINK_TESTS@,$LINK_TESTS,;t t
22578 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22579 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22580 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22581 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22582 s,@RPATH_LIST@,$RPATH_LIST,;t t
22583 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22584 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22585 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22586 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22587 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22588 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22589 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22590 s,@XTERM_KBS@,$XTERM_KBS,;t t
22591 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22592 s,@TERMINFO@,$TERMINFO,;t t
22593 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22594 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22595 s,@TERMPATH@,$TERMPATH,;t t
22596 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22597 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22598 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22599 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22600 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22601 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22602 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22603 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22604 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22605 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22606 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22607 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22608 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22609 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22610 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22611 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22612 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22613 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22614 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22615 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22616 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22617 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22618 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22619 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22620 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22621 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22622 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22623 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22624 s,@PTHREAD@,$PTHREAD,;t t
22625 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22626 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22627 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22628 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22629 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22630 s,@ECHO_LT@,$ECHO_LT,;t t
22631 s,@ECHO_LD@,$ECHO_LD,;t t
22632 s,@RULE_CC@,$RULE_CC,;t t
22633 s,@SHOW_CC@,$SHOW_CC,;t t
22634 s,@ECHO_CC@,$ECHO_CC,;t t
22635 s,@ECHO_LINK@,$ECHO_LINK,;t t
22636 s,@ADAFLAGS@,$ADAFLAGS,;t t
22637 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22638 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22639 s,@ADA_TRACE@,$ADA_TRACE,;t t
22640 s,@MATH_LIB@,$MATH_LIB,;t t
22641 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22642 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22643 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22644 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22645 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22646 s,@TEST_LIBS@,$TEST_LIBS,;t t
22647 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22648 s,@CXXCPP@,$CXXCPP,;t t
22649 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22650 s,@CXX_AR@,$CXX_AR,;t t
22651 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22652 s,@CXXLIBS@,$CXXLIBS,;t t
22653 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22654 s,@gnat_exists@,$gnat_exists,;t t
22655 s,@M4_exists@,$M4_exists,;t t
22656 s,@cf_ada_make@,$cf_ada_make,;t t
22657 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22658 s,@cf_compile_generics@,$cf_compile_generics,;t t
22659 s,@cf_generic_objects@,$cf_generic_objects,;t t
22660 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22661 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22662 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22663 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22664 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22665 s,@cf_ada_package@,$cf_ada_package,;t t
22666 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22667 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22668 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22669 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22670 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22671 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22672 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22673 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22674 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22675 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22676 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22677 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22678 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22679 s,@TICS_LIBS@,$TICS_LIBS,;t t
22680 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22681 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22682 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22683 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22684 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22685 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22686 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22687 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22688 s,@includesubdir@,$includesubdir,;t t
22689 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22690 s,@TICS_LIST@,$TICS_LIST,;t t
22691 s,@TINFO_LIST@,$TINFO_LIST,;t t
22692 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22693 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22694 s,@TEST_ARGS@,$TEST_ARGS,;t t
22695 s,@TEST_DEPS@,$TEST_DEPS,;t t
22696 s,@TEST_ARG2@,$TEST_ARG2,;t t
22697 s,@TEST_DEP2@,$TEST_DEP2,;t t
22698 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22699 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22700 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22701 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22702 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22703 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22704 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22705 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22706 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22707 s,@cross_compiling@,$cross_compiling,;t t
22708 s,@TIC_PATH@,$TIC_PATH,;t t
22709 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22710 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22711 s,@PANEL_NAME@,$PANEL_NAME,;t t
22712 s,@MENU_NAME@,$MENU_NAME,;t t
22713 s,@FORM_NAME@,$FORM_NAME,;t t
22714 s,@CXX_NAME@,$CXX_NAME,;t t
22715 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
22716 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
22717 CEOF
22718
22719 EOF
22720
22721   cat >>$CONFIG_STATUS <<\EOF
22722   # Split the substitutions into bite-sized pieces for seds with
22723   # small command number limits, like on Digital OSF/1 and HP-UX.
22724   ac_max_sed_lines=48
22725   ac_sed_frag=1 # Number of current file.
22726   ac_beg=1 # First line for current file.
22727   ac_end=$ac_max_sed_lines # Line after last line for current file.
22728   ac_more_lines=:
22729   ac_sed_cmds=
22730   while $ac_more_lines; do
22731     if test $ac_beg -gt 1; then
22732       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22733     else
22734       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22735     fi
22736     if test ! -s $tmp/subs.frag; then
22737       ac_more_lines=false
22738     else
22739       # The purpose of the label and of the branching condition is to
22740       # speed up the sed processing (if there are no `@' at all, there
22741       # is no need to browse any of the substitutions).
22742       # These are the two extra sed commands mentioned above.
22743       (echo ':t
22744   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22745       if test -z "$ac_sed_cmds"; then
22746         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22747       else
22748         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22749       fi
22750       ac_sed_frag=`expr $ac_sed_frag + 1`
22751       ac_beg=$ac_end
22752       ac_end=`expr $ac_end + $ac_max_sed_lines`
22753     fi
22754   done
22755   if test -z "$ac_sed_cmds"; then
22756     ac_sed_cmds=cat
22757   fi
22758 fi # test -n "$CONFIG_FILES"
22759
22760 EOF
22761 cat >>$CONFIG_STATUS <<\EOF
22762 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22763   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22764   case $ac_file in
22765   - | *:- | *:-:* ) # input from stdin
22766         cat >$tmp/stdin
22767         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22768         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22769   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22770         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22771   * )   ac_file_in=$ac_file.in ;;
22772   esac
22773
22774   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22775   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22776          X"$ac_file" : 'X\(//\)[^/]' \| \
22777          X"$ac_file" : 'X\(//\)$' \| \
22778          X"$ac_file" : 'X\(/\)' \| \
22779          .     : '\(.\)' 2>/dev/null ||
22780 echo X"$ac_file" |
22781     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22782           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22783           /^X\(\/\/\)$/{ s//\1/; q; }
22784           /^X\(\/\).*/{ s//\1/; q; }
22785           s/.*/./; q'`
22786   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22787     { case "$ac_dir" in
22788   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22789   *)                      as_incr_dir=.;;
22790 esac
22791 as_dummy="$ac_dir"
22792 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22793   case $as_mkdir_dir in
22794     # Skip DOS drivespec
22795     ?:) as_incr_dir=$as_mkdir_dir ;;
22796     *)
22797       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22798       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22799     ;;
22800   esac
22801 done; }
22802
22803     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22804     # A "../" for each directory in $ac_dir_suffix.
22805     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22806   else
22807     ac_dir_suffix= ac_dots=
22808   fi
22809
22810   case $srcdir in
22811   .)  ac_srcdir=.
22812       if test -z "$ac_dots"; then
22813          ac_top_srcdir=.
22814       else
22815          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22816       fi ;;
22817   [\\/]* | ?:[\\/]* )
22818       ac_srcdir=$srcdir$ac_dir_suffix;
22819       ac_top_srcdir=$srcdir ;;
22820   *) # Relative path.
22821     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22822     ac_top_srcdir=$ac_dots$srcdir ;;
22823   esac
22824
22825   case $INSTALL in
22826   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22827   *) ac_INSTALL=$ac_dots$INSTALL ;;
22828   esac
22829
22830   if test x"$ac_file" != x-; then
22831     { echo "$as_me:22831: creating $ac_file" >&5
22832 echo "$as_me: creating $ac_file" >&6;}
22833     rm -f "$ac_file"
22834   fi
22835   # Let's still pretend it is `configure' which instantiates (i.e., don't
22836   # use $as_me), people would be surprised to read:
22837   #    /* config.h.  Generated automatically by config.status.  */
22838   configure_input="Generated automatically from `echo $ac_file_in |
22839                                                  sed 's,.*/,,'` by configure."
22840
22841   # First look for the input files in the build tree, otherwise in the
22842   # src tree.
22843   ac_file_inputs=`IFS=:
22844     for f in $ac_file_in; do
22845       case $f in
22846       -) echo $tmp/stdin ;;
22847       [\\/$]*)
22848          # Absolute (can't be DOS-style, as IFS=:)
22849          test -f "$f" || { { echo "$as_me:22849: error: cannot find input file: $f" >&5
22850 echo "$as_me: error: cannot find input file: $f" >&2;}
22851    { (exit 1); exit 1; }; }
22852          echo $f;;
22853       *) # Relative
22854          if test -f "$f"; then
22855            # Build tree
22856            echo $f
22857          elif test -f "$srcdir/$f"; then
22858            # Source tree
22859            echo $srcdir/$f
22860          else
22861            # /dev/null tree
22862            { { echo "$as_me:22862: error: cannot find input file: $f" >&5
22863 echo "$as_me: error: cannot find input file: $f" >&2;}
22864    { (exit 1); exit 1; }; }
22865          fi;;
22866       esac
22867     done` || { (exit 1); exit 1; }
22868 EOF
22869 cat >>$CONFIG_STATUS <<\EOF
22870   ac_warn_datarootdir=no
22871   if test x"$ac_file" != x-; then
22872     for ac_item in $ac_file_inputs
22873     do
22874       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22875       if test -n "$ac_seen"; then
22876         ac_used=`grep '@datarootdir@' $ac_item`
22877         if test -z "$ac_used"; then
22878           { echo "$as_me:22878: WARNING: datarootdir was used implicitly but not set:
22879 $ac_seen" >&5
22880 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22881 $ac_seen" >&2;}
22882           ac_warn_datarootdir=yes
22883         fi
22884       fi
22885       ac_seen=`grep '${datarootdir}' $ac_item`
22886       if test -n "$ac_seen"; then
22887         { echo "$as_me:22887: WARNING: datarootdir was used explicitly but not set:
22888 $ac_seen" >&5
22889 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22890 $ac_seen" >&2;}
22891         ac_warn_datarootdir=yes
22892       fi
22893     done
22894   fi
22895
22896 if test "x$ac_warn_datarootdir" = xyes; then
22897   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22898 fi
22899
22900 EOF
22901 cat >>$CONFIG_STATUS <<EOF
22902   sed "$ac_vpsub
22903 $extrasub
22904 EOF
22905 cat >>$CONFIG_STATUS <<\EOF
22906 :t
22907 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22908 s,@configure_input@,$configure_input,;t t
22909 s,@srcdir@,$ac_srcdir,;t t
22910 s,@top_srcdir@,$ac_top_srcdir,;t t
22911 s,@INSTALL@,$ac_INSTALL,;t t
22912 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22913   rm -f $tmp/stdin
22914   if test x"$ac_file" != x-; then
22915     cp $tmp/out $ac_file
22916
22917     for ac_name in prefix exec_prefix datarootdir
22918     do
22919         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22920         if test -n "$ac_seen"; then
22921             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22922             if test -z "$ac_init"; then
22923               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22924               { echo "$as_me:22924: WARNING: Variable $ac_name is used but was not set:
22925 $ac_seen" >&5
22926 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22927 $ac_seen" >&2;}
22928             fi
22929         fi
22930     done
22931     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22932     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22933     if test -s $tmp/out; then
22934       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22935       { echo "$as_me:22935: WARNING: Some variables may not be substituted:
22936 $ac_seen" >&5
22937 echo "$as_me: WARNING: Some variables may not be substituted:
22938 $ac_seen" >&2;}
22939     fi
22940   else
22941     cat $tmp/out
22942   fi
22943   rm -f $tmp/out
22944
22945 done
22946 EOF
22947 cat >>$CONFIG_STATUS <<\EOF
22948
22949 #
22950 # CONFIG_HEADER section.
22951 #
22952
22953 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22954 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22955 #
22956 # ac_d sets the value in "#define NAME VALUE" lines.
22957 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22958 ac_dB='[        ].*$,\1#\2'
22959 ac_dC=' '
22960 ac_dD=',;t'
22961 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22962 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22963 ac_iB='\([      ]\),\1#\2define\3'
22964 ac_iC=' '
22965 ac_iD='\4,;t'
22966 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22967 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22968 ac_uB='$,\1#\2define\3'
22969 ac_uC=' '
22970 ac_uD=',;t'
22971
22972 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22973   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22974   case $ac_file in
22975   - | *:- | *:-:* ) # input from stdin
22976         cat >$tmp/stdin
22977         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22978         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22979   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22980         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22981   * )   ac_file_in=$ac_file.in ;;
22982   esac
22983
22984   test x"$ac_file" != x- && { echo "$as_me:22984: creating $ac_file" >&5
22985 echo "$as_me: creating $ac_file" >&6;}
22986
22987   # First look for the input files in the build tree, otherwise in the
22988   # src tree.
22989   ac_file_inputs=`IFS=:
22990     for f in $ac_file_in; do
22991       case $f in
22992       -) echo $tmp/stdin ;;
22993       [\\/$]*)
22994          # Absolute (can't be DOS-style, as IFS=:)
22995          test -f "$f" || { { echo "$as_me:22995: error: cannot find input file: $f" >&5
22996 echo "$as_me: error: cannot find input file: $f" >&2;}
22997    { (exit 1); exit 1; }; }
22998          echo $f;;
22999       *) # Relative
23000          if test -f "$f"; then
23001            # Build tree
23002            echo $f
23003          elif test -f "$srcdir/$f"; then
23004            # Source tree
23005            echo $srcdir/$f
23006          else
23007            # /dev/null tree
23008            { { echo "$as_me:23008: error: cannot find input file: $f" >&5
23009 echo "$as_me: error: cannot find input file: $f" >&2;}
23010    { (exit 1); exit 1; }; }
23011          fi;;
23012       esac
23013     done` || { (exit 1); exit 1; }
23014   # Remove the trailing spaces.
23015   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23016
23017 EOF
23018
23019 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23020 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23021 # be either 'cat' or 'sort'.
23022 cat confdefs.h | uniq >conftest.vals
23023
23024 # Break up conftest.vals because some shells have a limit on
23025 # the size of here documents, and old seds have small limits too.
23026
23027 rm -f conftest.tail
23028 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23029 while grep . conftest.vals >/dev/null
23030 do
23031   # Write chunks of a limited-size here document to conftest.frag.
23032   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23033   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23034   echo 'CEOF' >> $CONFIG_STATUS
23035   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23036   rm -f conftest.vals
23037   mv conftest.tail conftest.vals
23038 done
23039 rm -f conftest.vals
23040
23041 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23042 # marker @DEFS@.
23043 echo '  cat >> conftest.edit <<CEOF
23044 /@DEFS@/r conftest.frag
23045 /@DEFS@/d
23046 CEOF
23047 sed -f conftest.edit $tmp/in > $tmp/out
23048 rm -f $tmp/in
23049 mv $tmp/out $tmp/in
23050 rm -f conftest.edit conftest.frag
23051 ' >> $CONFIG_STATUS
23052
23053 cat >>$CONFIG_STATUS <<\EOF
23054   # Let's still pretend it is `configure' which instantiates (i.e., don't
23055   # use $as_me), people would be surprised to read:
23056   #    /* config.h.  Generated automatically by config.status.  */
23057   if test x"$ac_file" = x-; then
23058     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23059   else
23060     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23061   fi
23062   cat $tmp/in >>$tmp/config.h
23063   rm -f $tmp/in
23064   if test x"$ac_file" != x-; then
23065     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23066       { echo "$as_me:23066: $ac_file is unchanged" >&5
23067 echo "$as_me: $ac_file is unchanged" >&6;}
23068     else
23069       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23070          X"$ac_file" : 'X\(//\)[^/]' \| \
23071          X"$ac_file" : 'X\(//\)$' \| \
23072          X"$ac_file" : 'X\(/\)' \| \
23073          .     : '\(.\)' 2>/dev/null ||
23074 echo X"$ac_file" |
23075     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23076           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23077           /^X\(\/\/\)$/{ s//\1/; q; }
23078           /^X\(\/\).*/{ s//\1/; q; }
23079           s/.*/./; q'`
23080       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23081         { case "$ac_dir" in
23082   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23083   *)                      as_incr_dir=.;;
23084 esac
23085 as_dummy="$ac_dir"
23086 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23087   case $as_mkdir_dir in
23088     # Skip DOS drivespec
23089     ?:) as_incr_dir=$as_mkdir_dir ;;
23090     *)
23091       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23092       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23093     ;;
23094   esac
23095 done; }
23096
23097       fi
23098       rm -f $ac_file
23099       mv $tmp/config.h $ac_file
23100     fi
23101   else
23102     cat $tmp/config.h
23103     rm -f $tmp/config.h
23104   fi
23105 done
23106 EOF
23107 cat >>$CONFIG_STATUS <<\EOF
23108 #
23109 # CONFIG_COMMANDS section.
23110 #
23111 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23112   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23113   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23114
23115   case $ac_dest in
23116     default )
23117 if test "x$cf_with_tests" != xno ; then
23118
23119 for cf_dir in test
23120 do
23121         if test ! -d $srcdir/$cf_dir; then
23122                 continue
23123         elif test -f $srcdir/$cf_dir/programs; then
23124                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23125         fi
23126 done
23127
23128 fi
23129
23130 cf_prefix=$LIB_PREFIX
23131
23132 case $cf_cv_shlib_version in #(vi
23133 cygdll|msysdll|mingw)
23134         TINFO_NAME=$TINFO_ARG_SUFFIX
23135         TINFO_SUFFIX=.dll
23136         ;;
23137 esac
23138
23139 if test -n "$TINFO_SUFFIX" ; then
23140         case $TINFO_SUFFIX in
23141         tw*)
23142                 TINFO_NAME="${TINFO_NAME}tw"
23143                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
23144                 ;;
23145         t*)
23146                 TINFO_NAME="${TINFO_NAME}t"
23147                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
23148                 ;;
23149         w*)
23150                 TINFO_NAME="${TINFO_NAME}w"
23151                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
23152                 ;;
23153         esac
23154 fi
23155
23156 for cf_dir in $SRC_SUBDIRS
23157 do
23158         if test ! -d $srcdir/$cf_dir ; then
23159                 continue
23160         elif test -f $srcdir/$cf_dir/modules; then
23161
23162                 SHARED_LIB=
23163                 Libs_To_Make=
23164                 for cf_item in $cf_LIST_MODELS
23165                 do
23166
23167         case X$cf_item in #(vi
23168         Xlibtool) #(vi
23169                 cf_suffix='.la'
23170                 cf_depsuf=$cf_suffix
23171                 ;;
23172         Xdebug) #(vi
23173                 cf_suffix='_g.a'
23174                 cf_depsuf=$cf_suffix
23175                 ;;
23176         Xprofile) #(vi
23177                 cf_suffix='_p.a'
23178                 cf_depsuf=$cf_suffix
23179                 ;;
23180         Xshared) #(vi
23181                 case $cf_cv_system_name in
23182                 aix[5-7]*) #(vi
23183                         cf_suffix='.so'
23184                         cf_depsuf=$cf_suffix
23185                         ;;
23186                 cygwin*|msys*|mingw*) #(vi
23187                         cf_suffix='.dll'
23188                         cf_depsuf='.dll.a'
23189                         ;;
23190                 darwin*) #(vi
23191                         cf_suffix='.dylib'
23192                         cf_depsuf=$cf_suffix
23193                         ;;
23194                 hpux*) #(vi
23195                         case $target in
23196                         ia64*) #(vi
23197                                 cf_suffix='.so'
23198                                 cf_depsuf=$cf_suffix
23199                                 ;;
23200                         *) #(vi
23201                                 cf_suffix='.sl'
23202                                 cf_depsuf=$cf_suffix
23203                                 ;;
23204                         esac
23205                         ;;
23206                 *) #(vi
23207                         cf_suffix='.so'
23208                         cf_depsuf=$cf_suffix
23209                         ;;
23210                 esac
23211                 ;;
23212         *)
23213                 cf_suffix='.a'
23214                 cf_depsuf=$cf_suffix
23215                 ;;
23216         esac
23217         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23218         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23219
23220                         cf_libname=$cf_dir
23221                         test "$cf_dir" = c++ && cf_libname=ncurses++
23222                         if test $cf_item = shared ; then
23223                                 if test -n "${LIB_SUFFIX}"
23224                                 then
23225                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23226                                 else
23227                                         cf_shared_suffix="$cf_suffix"
23228                                 fi
23229                                 if test "$cf_cv_do_symlinks" = yes ; then
23230                                         cf_version_name=
23231
23232                                         case "$cf_cv_shlib_version" in #(vi
23233                                         rel) #(vi
23234                                                 cf_version_name=REL_VERSION
23235                                                 ;;
23236                                         abi)
23237                                                 cf_version_name=ABI_VERSION
23238                                                 ;;
23239                                         esac
23240
23241                                         if test -n "$cf_version_name"
23242                                         then
23243                                                 case "$cf_cv_system_name" in #(vi
23244                                                 darwin*)
23245                                                         # "w", etc?
23246                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23247                                                         ;; #(vi
23248                                                 *)
23249                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23250                                                         ;;
23251                                                 esac
23252                                         fi
23253                                         if test -n "${LIB_SUFFIX}"
23254                                         then
23255                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
23256                                         else
23257                                                 cf_shared_suffix="$cf_suffix"
23258                                         fi
23259                                 fi
23260                                 # cygwin needs import library, and has unique naming convention
23261                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23262                                 # use 'cyg' prefix for shared lib.
23263                                 case $cf_cv_shlib_version in #(vi
23264                                 cygdll) #(vi
23265                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23266                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
23267                                         continue
23268                                         ;;
23269                                 msysdll) #(vi
23270                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23271                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
23272                                         continue
23273                                         ;;
23274                                 mingw)
23275                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23276                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
23277                                         continue
23278                                         ;;
23279                                 esac
23280                         fi
23281                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23282                 done
23283
23284                 if test $cf_dir = ncurses ; then
23285                         cf_subsets="$LIB_SUBSETS"
23286                         cf_r_parts="$cf_subsets"
23287                         cf_liblist="$Libs_To_Make"
23288
23289                         while test -n "$cf_r_parts"
23290                         do
23291                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23292                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23293                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23294                                         cf_item=
23295                                         case $cf_l_parts in #(vi
23296                                         *termlib*) #(vi
23297                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23298                                                 ;;
23299                                         *ticlib*)
23300                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23301                                                 ;;
23302                                         *)
23303                                                 break
23304                                                 ;;
23305                                         esac
23306                                         if test -n "$cf_item"; then
23307                                                 Libs_To_Make="$cf_item $Libs_To_Make"
23308                                         fi
23309                                 else
23310                                         break
23311                                 fi
23312                         done
23313                 else
23314                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23315                 fi
23316
23317                 if test $cf_dir = c++; then
23318                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23319                                 cf_list=
23320                                 for cf_item in $Libs_To_Make
23321                                 do
23322                                         case $cf_item in
23323                                         *.a)
23324                                                 ;;
23325                                         *)
23326                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23327                                                 ;;
23328                                         esac
23329                                         for cf_test in $cf_list
23330                                         do
23331                                                 if test "$cf_test" = "$cf_item"
23332                                                 then
23333                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23334                                                         cf_item=
23335                                                         break
23336                                                 fi
23337                                         done
23338                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23339                                 done
23340                                 Libs_To_Make="$cf_list"
23341                         fi
23342                 fi
23343
23344                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23345                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23346                         $cf_dir/Makefile >$cf_dir/Makefile.out
23347                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23348
23349                 $AWK -f $srcdir/mk-0th.awk \
23350                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23351                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23352
23353                 for cf_subset in $cf_subsets
23354                 do
23355                         cf_subdirs=
23356                         for cf_item in $cf_LIST_MODELS
23357                         do
23358
23359                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23360
23361 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23362
23363                         CXX_MODEL=$cf_ITEM
23364                         if test "$CXX_MODEL" = SHARED; then
23365                                 case $cf_cv_shlib_version in #(vi
23366                                 cygdll|msysdll|mingw) #(vi
23367                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23368
23369 echo "${as_me:-configure}:23369: testing overriding CXX_MODEL to SHARED ..." 1>&5
23370
23371                                         with_shared_cxx=yes
23372                                         ;;
23373                                 *)
23374                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23375                                         ;;
23376                                 esac
23377                         fi
23378
23379         case X$cf_item in #(vi
23380         Xlibtool) #(vi
23381                 cf_suffix='.la'
23382                 cf_depsuf=$cf_suffix
23383                 ;;
23384         Xdebug) #(vi
23385                 cf_suffix='_g.a'
23386                 cf_depsuf=$cf_suffix
23387                 ;;
23388         Xprofile) #(vi
23389                 cf_suffix='_p.a'
23390                 cf_depsuf=$cf_suffix
23391                 ;;
23392         Xshared) #(vi
23393                 case $cf_cv_system_name in
23394                 aix[5-7]*) #(vi
23395                         cf_suffix='.so'
23396                         cf_depsuf=$cf_suffix
23397                         ;;
23398                 cygwin*|msys*|mingw*) #(vi
23399                         cf_suffix='.dll'
23400                         cf_depsuf='.dll.a'
23401                         ;;
23402                 darwin*) #(vi
23403                         cf_suffix='.dylib'
23404                         cf_depsuf=$cf_suffix
23405                         ;;
23406                 hpux*) #(vi
23407                         case $target in
23408                         ia64*) #(vi
23409                                 cf_suffix='.so'
23410                                 cf_depsuf=$cf_suffix
23411                                 ;;
23412                         *) #(vi
23413                                 cf_suffix='.sl'
23414                                 cf_depsuf=$cf_suffix
23415                                 ;;
23416                         esac
23417                         ;;
23418                 *) #(vi
23419                         cf_suffix='.so'
23420                         cf_depsuf=$cf_suffix
23421                         ;;
23422                 esac
23423                 ;;
23424         *)
23425                 cf_suffix='.a'
23426                 cf_depsuf=$cf_suffix
23427                 ;;
23428         esac
23429         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23430         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23431
23432         case $cf_item in
23433         libtool) cf_subdir='obj_lo'  ;;
23434         normal)  cf_subdir='objects' ;;
23435         debug)   cf_subdir='obj_g' ;;
23436         profile) cf_subdir='obj_p' ;;
23437         shared)
23438                 case $cf_cv_system_name in #(vi
23439                 cygwin|msys) #(vi
23440                         cf_subdir='objects' ;;
23441                 *)
23442                         cf_subdir='obj_s' ;;
23443                 esac
23444         esac
23445
23446                         # Test for case where we build libtinfo with a different name.
23447                         cf_libname=$cf_dir
23448                         if test $cf_dir = ncurses ; then
23449                                 case $cf_subset in
23450                                 *base*)
23451                                         cf_libname=${cf_libname}$LIB_SUFFIX
23452                                         ;;
23453                                 *termlib*)
23454                                         cf_libname=$TINFO_LIB_SUFFIX
23455                                         ;;
23456                                 ticlib*)
23457                                         cf_libname=$TICS_LIB_SUFFIX
23458                                         ;;
23459                                 esac
23460                         elif test $cf_dir = c++ ; then
23461                                 cf_libname=ncurses++$LIB_SUFFIX
23462                         else
23463                                 cf_libname=${cf_libname}$LIB_SUFFIX
23464                         fi
23465                         if test -n "${DFT_ARG_SUFFIX}" ; then
23466                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23467                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23468                         fi
23469
23470                         # These dependencies really are for development, not
23471                         # builds, but they are useful in porting, too.
23472                         cf_depend="../include/ncurses_cfg.h"
23473                         if test "$srcdir" = "."; then
23474                                 cf_reldir="."
23475                         else
23476                                 cf_reldir="\${srcdir}"
23477                         fi
23478
23479                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23480                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23481                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23482                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23483                         fi
23484
23485                         cf_dir_suffix=
23486                         old_cf_suffix="$cf_suffix"
23487                         if test "$cf_cv_shlib_version_infix" = yes ; then
23488                         if test -n "$LIB_SUFFIX" ; then
23489                                 case $LIB_SUFFIX in
23490                                 tw*)
23491                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23492                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23493                                         cf_dir_suffix=tw
23494                                         ;;
23495                                 t*)
23496                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23497                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23498                                         cf_dir_suffix=t
23499                                         ;;
23500                                 w*)
23501                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23502                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23503                                         cf_dir_suffix=w
23504                                         ;;
23505                                 esac
23506                         fi
23507                         fi
23508
23509                         $AWK -f $srcdir/mk-1st.awk \
23510                                 name=${cf_libname}${cf_dir_suffix} \
23511                                 traces=$LIB_TRACING \
23512                                 MODEL=$cf_ITEM \
23513                                 CXX_MODEL=$CXX_MODEL \
23514                                 model=$cf_subdir \
23515                                 prefix=$cf_prefix \
23516                                 suffix=$cf_suffix \
23517                                 subset=$cf_subset \
23518                                 driver=$cf_cv_term_driver \
23519                                 SymLink="$LN_S" \
23520                                 TermlibRoot=$TINFO_NAME \
23521                                 TermlibSuffix=$TINFO_SUFFIX \
23522                                 ShlibVer=$cf_cv_shlib_version \
23523                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23524                                 ReLink=${cf_cv_do_relink:-no} \
23525                                 DoLinks=$cf_cv_do_symlinks \
23526                                 rmSoLocs=$cf_cv_rm_so_locs \
23527                                 ldconfig="$LDCONFIG" \
23528                                 overwrite=$WITH_OVERWRITE \
23529                                 depend="$cf_depend" \
23530                                 host="$host" \
23531                                 libtool_version="$LIBTOOL_VERSION" \
23532                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23533
23534                         cf_suffix="$old_cf_suffix"
23535
23536                         for cf_subdir2 in $cf_subdirs lib
23537                         do
23538                                 test $cf_subdir = $cf_subdir2 && break
23539                         done
23540                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23541                         $AWK -f $srcdir/mk-2nd.awk \
23542                                 name=$cf_dir \
23543                                 traces=$LIB_TRACING \
23544                                 MODEL=$cf_ITEM \
23545                                 model=$cf_subdir \
23546                                 subset=$cf_subset \
23547                                 srcdir=$srcdir \
23548                                 echo=$WITH_ECHO \
23549                                 crenames=$cf_cv_prog_CC_c_o \
23550                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23551                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23552                         cf_subdirs="$cf_subdirs $cf_subdir"
23553                         done
23554                 done
23555         fi
23556
23557         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23558 done
23559
23560 for cf_dir in $SRC_SUBDIRS
23561 do
23562         if test ! -d $srcdir/$cf_dir ; then
23563                 continue
23564         fi
23565
23566         if test -f $cf_dir/Makefile ; then
23567                 case "$cf_dir" in
23568                 Ada95) #(vi
23569                         echo 'libs \' >> Makefile
23570                         echo 'install.libs \' >> Makefile
23571                         echo 'uninstall.libs ::' >> Makefile
23572                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23573                         ;;
23574                 esac
23575         fi
23576
23577         if test -f $srcdir/$cf_dir/modules; then
23578                 echo >> Makefile
23579                 if test -f $srcdir/$cf_dir/headers; then
23580 cat >> Makefile <<CF_EOF
23581 install.includes \\
23582 uninstall.includes \\
23583 CF_EOF
23584                 fi
23585 if test "$cf_dir" != "c++" ; then
23586 echo 'lint \' >> Makefile
23587 fi
23588 cat >> Makefile <<CF_EOF
23589 libs \\
23590 lintlib \\
23591 install.libs \\
23592 uninstall.libs \\
23593 install.$cf_dir \\
23594 uninstall.$cf_dir ::
23595         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23596 CF_EOF
23597         elif test -f $srcdir/$cf_dir/headers; then
23598 cat >> Makefile <<CF_EOF
23599
23600 libs \\
23601 install.libs \\
23602 uninstall.libs \\
23603 install.includes \\
23604 uninstall.includes ::
23605         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23606 CF_EOF
23607 fi
23608 done
23609
23610 if test "x$cf_with_db_install" = xyes; then
23611 cat >> Makefile <<CF_EOF
23612
23613 install.libs uninstall.libs \\
23614 install.data uninstall.data ::
23615 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23616 CF_EOF
23617 else
23618 cat >> Makefile <<CF_EOF
23619
23620 install.libs uninstall.libs ::
23621         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23622 CF_EOF
23623 fi
23624
23625 if test "x$cf_with_manpages" = xyes; then
23626 cat >> Makefile <<CF_EOF
23627
23628 install.man \\
23629 uninstall.man ::
23630         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23631 CF_EOF
23632 fi
23633
23634 cat >> Makefile <<CF_EOF
23635
23636 distclean ::
23637         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23638         rm -f headers.sh headers.sed mk_shared_lib.sh
23639         rm -f edit_man.* man_alias.*
23640         rm -rf \${DIRS_TO_MAKE}
23641 CF_EOF
23642
23643 # Special case: tack's manpage lives in its own directory.
23644 if test "x$cf_with_manpages" = xyes; then
23645 if test -d tack ; then
23646 if test -f $srcdir/$tack.h; then
23647 cat >> Makefile <<CF_EOF
23648
23649 install.man \\
23650 uninstall.man ::
23651         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23652 CF_EOF
23653 fi
23654 fi
23655 fi
23656
23657 rm -f headers.sed headers.sh
23658
23659 echo creating headers.sh
23660 cat >headers.sh <<CF_EOF
23661 #! /bin/sh
23662 # This shell script is generated by the 'configure' script.  It is invoked in a
23663 # subdirectory of the build tree.  It generates a sed-script in the parent
23664 # directory that is used to adjust includes for header files that reside in a
23665 # subdirectory of /usr/include, etc.
23666 PRG=""
23667 while test \$# != 3
23668 do
23669 PRG="\$PRG \$1"; shift
23670 done
23671 DST=\$1
23672 REF=\$2
23673 SRC=\$3
23674 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23675 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23676 echo installing \$SRC in \$DST
23677 CF_EOF
23678
23679 if test $WITH_CURSES_H = yes; then
23680         cat >>headers.sh <<CF_EOF
23681 case \$DST in
23682 /*/include/*)
23683         END=\`basename \$DST\`
23684         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23685         do
23686                 NAME=\`basename \$i\`
23687                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23688         done
23689         ;;
23690 *)
23691         echo "" >> \$TMPSED
23692         ;;
23693 esac
23694 CF_EOF
23695
23696 else
23697         cat >>headers.sh <<CF_EOF
23698 case \$DST in
23699 /*/include/*)
23700         END=\`basename \$DST\`
23701         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23702         do
23703                 NAME=\`basename \$i\`
23704                 if test "\$NAME" = "curses.h"
23705                 then
23706                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23707                         NAME=ncurses.h
23708                 fi
23709                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23710         done
23711         ;;
23712 *)
23713         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23714         ;;
23715 esac
23716 CF_EOF
23717 fi
23718 cat >>headers.sh <<CF_EOF
23719 rm -f \$TMPSRC
23720 sed -f \$TMPSED \$SRC > \$TMPSRC
23721 NAME=\`basename \$SRC\`
23722 CF_EOF
23723 if test $WITH_CURSES_H != yes; then
23724         cat >>headers.sh <<CF_EOF
23725 test "\$NAME" = "curses.h" && NAME=ncurses.h
23726 CF_EOF
23727 fi
23728 cat >>headers.sh <<CF_EOF
23729 # Just in case someone gzip'd manpages, remove the conflicting copy.
23730 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23731
23732 eval \$PRG \$TMPSRC \$DST/\$NAME
23733 rm -f \$TMPSRC \$TMPSED
23734 CF_EOF
23735
23736 chmod 0755 headers.sh
23737
23738 for cf_dir in $SRC_SUBDIRS
23739 do
23740         if test ! -d $srcdir/$cf_dir ; then
23741                 continue
23742         fi
23743
23744         if test -f $srcdir/$cf_dir/headers; then
23745                 $AWK -f $srcdir/mk-hdr.awk \
23746                         subset="$LIB_SUBSETS" \
23747                         compat="$WITH_CURSES_H" \
23748                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23749         fi
23750
23751         if test -f $srcdir/$cf_dir/modules; then
23752                 if test "$cf_dir" != "c++" ; then
23753                         cat >>$cf_dir/Makefile <<"CF_EOF"
23754 depend : ${AUTO_SRC}
23755         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23756
23757 # DO NOT DELETE THIS LINE -- make depend depends on it.
23758 CF_EOF
23759                 fi
23760         fi
23761 done
23762
23763 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23764 if test -z "$USE_OLD_MAKERULES" ; then
23765         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23766 fi
23767 fi
23768  ;;
23769   esac
23770 done
23771 EOF
23772
23773 cat >>$CONFIG_STATUS <<\EOF
23774
23775 { (exit 0); exit 0; }
23776 EOF
23777 chmod +x $CONFIG_STATUS
23778 ac_clean_files=$ac_clean_files_save
23779
23780 # configure is writing to config.log, and then calls config.status.
23781 # config.status does its own redirection, appending to config.log.
23782 # Unfortunately, on DOS this fails, as config.log is still kept open
23783 # by configure, so config.status won't be able to write to it; its
23784 # output is simply discarded.  So we exec the FD to /dev/null,
23785 # effectively closing config.log, so it can be properly (re)opened and
23786 # appended to by config.status.  When coming back to configure, we
23787 # need to make the FD available again.
23788 if test "$no_create" != yes; then
23789   ac_cs_success=:
23790   exec 5>/dev/null
23791   $SHELL $CONFIG_STATUS || ac_cs_success=false
23792   exec 5>>config.log
23793   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23794   # would make configure fail if this is the last instruction.
23795   $ac_cs_success || { (exit 1); exit 1; }
23796 fi
23797 ${MAKE:-make} preinstall