]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20130706
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.571 .
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   --without-manpages      suppress install of manpages
710   --without-progs         suppress build with programs (e.g., tic)
711   --without-tests         suppress build with test-programs
712   --without-curses-h      install curses.h as ncurses.h only
713   --with-pkg-config{=path} enable/disable use of pkg-config
714   --with-pkg-config-libdir=XXX use given directory for installing pc-files
715   --enable-pc-files       generate and install .pc files for pkg-config
716   --enable-mixed-case     tic should assume mixed-case filenames
717   --with-install-prefix   prefixes actual install-location ($DESTDIR)
718 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
719   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
720   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
721   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
722   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
723   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
724   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
725 Options to Specify the Libraries Built/Used:
726   --disable-libtool-version  enable to use libtool's incompatible naming scheme
727   --with-libtool          generate libraries with libtool
728   --with-shared           generate shared-libraries
729   --with-normal           generate normal-libraries (default)
730   --with-debug            generate debug-libraries (default)
731   --with-profile          generate profile-libraries
732   --with-cxx-shared       generate C++ shared-libraries
733   --with-lib-prefix       override library-prefix
734   --with-termlib          generate separate terminfo library
735   --with-ticlib           generate separate tic library
736   --with-gpm              use Alessandro Rubini's GPM library
737   --without-dlsym         do not use dlsym() to load GPM dynamically
738   --with-sysmouse         use sysmouse (FreeBSD console)
739   --enable-rpath          use rpath option when generating shared libraries
740   --disable-relink        relink shared libraries during install
741   --with-shlib-version=X  Specify rel or abi version for shared libs
742   --disable-rpath-hack    don't add rpath options for additional libraries
743 Fine-Tuning Your Configuration:
744   --disable-overwrite     leave out the link to -lcurses
745   --disable-database      do not use terminfo, only fallbacks/termcap
746   --with-database=XXX     specify terminfo source to install
747   --with-hashed-db        specify hashed-database library
748   --with-fallbacks=XXX    specify list of fallback terminal descriptions
749   --without-xterm-new     specify if xterm terminfo should be old version
750   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
751   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
752   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
753   --disable-big-core      assume machine has little memory
754   --disable-big-strings   assume compiler has only standard-size strings
755   --enable-termcap        compile in termcap fallback support
756   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
757   --enable-getcap         fast termcap load, no xrefs to terminfo
758   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
759   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
760   --disable-root-environ  restrict environment when running as root
761   --enable-symlinks       make tic use symbolic links not hard links
762   --enable-broken_linker  compile with broken-linker support code
763   --enable-bsdpad         recognize BSD-style prefix padding
764   --enable-widec          compile with wide-char/UTF-8 code
765   --disable-lp64          allow chtype to be long (ignore _LP64)
766   --disable-largefile     omit support for large files
767   --disable-tparm-varargs compile tparm() without varargs interface
768   --disable-tic-depends   link tic library without explicit dependency on ncurses library
769   --with-bool=TYPE        override fallback type of bool variable
770   --with-caps=alt         compile with alternate Caps file
771   --with-chtype=TYPE      override type of chtype
772   --with-ospeed=TYPE      override type of ospeed variable
773   --with-mmask-t=TYPE     override type of mmask_t
774   --with-ccharw-max=XXX   override size CCHARW_MAX
775   --with-tparm-arg=TYPE   override parameter type of tparm
776   --with-rcs-ids          compile-in RCS identifiers
777 Options to Specify How Manpages are Installed:
778   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
779                           optionally formatted/catonly, e.g., gzip,formatted
780   --with-manpage-renames  specify manpage-renaming
781   --with-manpage-aliases  specify manpage-aliases using .so
782   --with-manpage-symlinks specify manpage-aliases using symlinks
783   --with-manpage-tbl      specify manpage processing with tbl
784 Extensions:
785   --disable-ext-funcs     disable function-extensions
786   --enable-sp-funcs       enable experimental SCREEN-extensions
787   --enable-term-driver    enable experimental terminal-driver
788   --enable-const          compile with extra/non-standard const
789   --enable-ext-colors     compile for 256-color support
790   --enable-ext-mouse      compile for extended mouse-encoding
791   --enable-no-padding     compile with $NCURSES_NO_PADDING code
792   --enable-signed-char    compile using signed Boolean's in term.h
793   --enable-sigwinch       compile with SIGWINCH handler
794   --enable-tcap-names     compile with user-definable terminal capabilities
795 Development Code:
796   --without-develop       disable development options
797   --enable-hard-tabs      compile with hard-tabs code
798   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
799 Experimental Code:
800   --disable-assumed-color do not assume anything about default-colors
801   --disable-hashmap       compile without hashmap scrolling-optimization
802   --enable-colorfgbg      compile-in experimental $COLORFGBG code
803   --enable-interop        compile-in experimental interop bindings
804   --with-pthread          use POSIX thread library
805   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
806   --enable-weak-symbols   enable weak-symbols for pthreads
807   --enable-reentrant      compile with experimental reentrant code
808   --with-wrap-prefix=XXX  override prefix used for public variables
809   --enable-safe-sprintf   compile with experimental safe-sprintf code
810   --disable-scroll-hints  compile without scroll-hints code
811   --enable-wgetch-events  compile with experimental wgetch-events code
812 Testing/development Options:
813   --disable-echo          do not display "compiling" commands
814   --enable-warnings       build: turn on GCC compiler warnings
815   --enable-string-hacks   work around bogus compiler/loader warnings
816   --enable-assertions     test: turn on generation of assertion code
817   --with-dmalloc          test: use Gray Watson's dmalloc library
818   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
819   --with-valgrind         test: use valgrind
820   --disable-leaks         test: free permanent memory, analyze leaks
821   --enable-expanded       test: generate functions for certain macros
822   --disable-macros        test: use functions rather than macros
823   --with-trace            test: add trace() function to all models of ncurses
824 Ada95 Binding Options:
825   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
826   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
827   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
828   --with-ada-sharedlib=XX build Ada95 shared-library
829
830 Some influential environment variables:
831   CC          C compiler command
832   CFLAGS      C compiler flags
833   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
834               nonstandard directory <lib dir>
835   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
836               headers in a nonstandard directory <include dir>
837   CPP         C preprocessor
838   CXX         C++ compiler command
839   CXXFLAGS    C++ compiler flags
840   CXXCPP      C++ preprocessor
841
842 Use these variables to override the choices made by `configure' or to help
843 it to find libraries and programs with nonstandard names/locations.
844
845 EOF
846 fi
847
848 if test "$ac_init_help" = "recursive"; then
849   # If there are subdirs, report their specific --help.
850   ac_popdir=`pwd`
851   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
852     cd $ac_subdir
853     # A "../" for each directory in /$ac_subdir.
854     ac_dots=`echo $ac_subdir |
855              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
856
857     case $srcdir in
858     .) # No --srcdir option.  We are building in place.
859       ac_sub_srcdir=$srcdir ;;
860     [\\/]* | ?:[\\/]* ) # Absolute path.
861       ac_sub_srcdir=$srcdir/$ac_subdir ;;
862     *) # Relative path.
863       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
864     esac
865
866     # Check for guested configure; otherwise get Cygnus style configure.
867     if test -f $ac_sub_srcdir/configure.gnu; then
868       echo
869       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
870     elif test -f $ac_sub_srcdir/configure; then
871       echo
872       $SHELL $ac_sub_srcdir/configure  --help=recursive
873     elif test -f $ac_sub_srcdir/configure.ac ||
874            test -f $ac_sub_srcdir/configure.in; then
875       echo
876       $ac_configure --help
877     else
878       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
879     fi
880     cd $ac_popdir
881   done
882 fi
883
884 test -n "$ac_init_help" && exit 0
885 if $ac_init_version; then
886   cat <<\EOF
887
888 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
889 Free Software Foundation, Inc.
890 This configure script is free software; the Free Software Foundation
891 gives unlimited permission to copy, distribute and modify it.
892 EOF
893   exit 0
894 fi
895 exec 5>config.log
896 cat >&5 <<EOF
897 This file contains any messages produced by compilers while
898 running configure, to aid debugging if configure makes a mistake.
899
900 It was created by $as_me, which was
901 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
902
903   $ $0 $@
904
905 EOF
906 {
907 cat <<_ASUNAME
908 ## ---------- ##
909 ## Platform.  ##
910 ## ---------- ##
911
912 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
913 uname -m = `(uname -m) 2>/dev/null || echo unknown`
914 uname -r = `(uname -r) 2>/dev/null || echo unknown`
915 uname -s = `(uname -s) 2>/dev/null || echo unknown`
916 uname -v = `(uname -v) 2>/dev/null || echo unknown`
917
918 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
919 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
920
921 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
922 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
923 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
924 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
925 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
926 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
927 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
928
929 PATH = $PATH
930
931 _ASUNAME
932 } >&5
933
934 cat >&5 <<EOF
935 ## ------------ ##
936 ## Core tests.  ##
937 ## ------------ ##
938
939 EOF
940
941 # Keep a trace of the command line.
942 # Strip out --no-create and --no-recursion so they do not pile up.
943 # Also quote any args containing shell meta-characters.
944 ac_configure_args=
945 ac_sep=
946 for ac_arg
947 do
948   case $ac_arg in
949   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
950   | --no-cr | --no-c) ;;
951   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
952   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
953   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
954     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
955     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
956     ac_sep=" " ;;
957   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
958      ac_sep=" " ;;
959   esac
960   # Get rid of the leading space.
961 done
962
963 # When interrupted or exit'd, cleanup temporary files, and complete
964 # config.log.  We remove comments because anyway the quotes in there
965 # would cause problems or look ugly.
966 trap 'exit_status=$?
967   # Save into config.log some information that might help in debugging.
968   echo >&5
969   echo "## ----------------- ##" >&5
970   echo "## Cache variables.  ##" >&5
971   echo "## ----------------- ##" >&5
972   echo >&5
973   # The following way of writing the cache mishandles newlines in values,
974 {
975   (set) 2>&1 |
976     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
977     *ac_space=\ *)
978       sed -n \
979         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
980           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
981       ;;
982     *)
983       sed -n \
984         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
985       ;;
986     esac;
987 } >&5
988   sed "/^$/d" confdefs.h >conftest.log
989   if test -s conftest.log; then
990     echo >&5
991     echo "## ------------ ##" >&5
992     echo "## confdefs.h.  ##" >&5
993     echo "## ------------ ##" >&5
994     echo >&5
995     cat conftest.log >&5
996   fi
997   (echo; echo) >&5
998   test "$ac_signal" != 0 &&
999     echo "$as_me: caught signal $ac_signal" >&5
1000   echo "$as_me: exit $exit_status" >&5
1001   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1002     exit $exit_status
1003      ' 0
1004 for ac_signal in 1 2 13 15; do
1005   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1006 done
1007 ac_signal=0
1008
1009 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1010 rm -rf conftest* confdefs.h
1011 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1012 echo >confdefs.h
1013
1014 # Let the site file select an alternate cache file if it wants to.
1015 # Prefer explicitly selected file to automatically selected ones.
1016 if test -z "$CONFIG_SITE"; then
1017   if test "x$prefix" != xNONE; then
1018     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1019   else
1020     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1021   fi
1022 fi
1023 for ac_site_file in $CONFIG_SITE; do
1024   if test -r "$ac_site_file"; then
1025     { echo "$as_me:1025: loading site script $ac_site_file" >&5
1026 echo "$as_me: loading site script $ac_site_file" >&6;}
1027     cat "$ac_site_file" >&5
1028     . "$ac_site_file"
1029   fi
1030 done
1031
1032 if test -r "$cache_file"; then
1033   # Some versions of bash will fail to source /dev/null (special
1034   # files actually), so we avoid doing that.
1035   if test -f "$cache_file"; then
1036     { echo "$as_me:1036: loading cache $cache_file" >&5
1037 echo "$as_me: loading cache $cache_file" >&6;}
1038     case $cache_file in
1039       [\\/]* | ?:[\\/]* ) . $cache_file;;
1040       *)                      . ./$cache_file;;
1041     esac
1042   fi
1043 else
1044   { echo "$as_me:1044: creating cache $cache_file" >&5
1045 echo "$as_me: creating cache $cache_file" >&6;}
1046   >$cache_file
1047 fi
1048
1049 # Check that the precious variables saved in the cache have kept the same
1050 # value.
1051 ac_cache_corrupted=false
1052 for ac_var in `(set) 2>&1 |
1053                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1054   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1055   eval ac_new_set=\$ac_env_${ac_var}_set
1056   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1057   eval ac_new_val="\$ac_env_${ac_var}_value"
1058   case $ac_old_set,$ac_new_set in
1059     set,)
1060       { echo "$as_me:1060: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1061 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1062       ac_cache_corrupted=: ;;
1063     ,set)
1064       { echo "$as_me:1064: error: \`$ac_var' was not set in the previous run" >&5
1065 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1066       ac_cache_corrupted=: ;;
1067     ,);;
1068     *)
1069       if test "x$ac_old_val" != "x$ac_new_val"; then
1070         { echo "$as_me:1070: error: \`$ac_var' has changed since the previous run:" >&5
1071 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1072         { echo "$as_me:1072:   former value:  $ac_old_val" >&5
1073 echo "$as_me:   former value:  $ac_old_val" >&2;}
1074         { echo "$as_me:1074:   current value: $ac_new_val" >&5
1075 echo "$as_me:   current value: $ac_new_val" >&2;}
1076         ac_cache_corrupted=:
1077       fi;;
1078   esac
1079   # Pass precious variables to config.status.  It doesn't matter if
1080   # we pass some twice (in addition to the command line arguments).
1081   if test "$ac_new_set" = set; then
1082     case $ac_new_val in
1083     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1084       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1085       ac_configure_args="$ac_configure_args '$ac_arg'"
1086       ;;
1087     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1088        ;;
1089     esac
1090   fi
1091 done
1092 if $ac_cache_corrupted; then
1093   { echo "$as_me:1093: error: changes in the environment can compromise the build" >&5
1094 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1095   { { echo "$as_me:1095: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1096 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1097    { (exit 1); exit 1; }; }
1098 fi
1099
1100 ac_ext=c
1101 ac_cpp='$CPP $CPPFLAGS'
1102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1105 ac_main_return=return
1106
1107 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1108   *c*,-n*) ECHO_N= ECHO_C='
1109 ' ECHO_T='      ' ;;
1110   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1111   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1112 esac
1113 echo "#! $SHELL" >conftest.sh
1114 echo  "exit 0"   >>conftest.sh
1115 chmod +x conftest.sh
1116 if { (echo "$as_me:1116: PATH=\".;.\"; conftest.sh") >&5
1117   (PATH=".;."; conftest.sh) 2>&5
1118   ac_status=$?
1119   echo "$as_me:1119: \$? = $ac_status" >&5
1120   (exit $ac_status); }; then
1121   ac_path_separator=';'
1122 else
1123   ac_path_separator=:
1124 fi
1125 PATH_SEPARATOR="$ac_path_separator"
1126 rm -f conftest.sh
1127
1128 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1129
1130 top_builddir=`pwd`
1131
1132 echo "$as_me:1132: checking for egrep" >&5
1133 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1134 if test "${ac_cv_prog_egrep+set}" = set; then
1135   echo $ECHO_N "(cached) $ECHO_C" >&6
1136 else
1137   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1138     then ac_cv_prog_egrep='grep -E'
1139     else ac_cv_prog_egrep='egrep'
1140     fi
1141 fi
1142 echo "$as_me:1142: result: $ac_cv_prog_egrep" >&5
1143 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1144  EGREP=$ac_cv_prog_egrep
1145
1146 test -z "$EGREP" && { { echo "$as_me:1146: error: No egrep program found" >&5
1147 echo "$as_me: error: No egrep program found" >&2;}
1148    { (exit 1); exit 1; }; }
1149
1150 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1151 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1152 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1153 cf_cv_abi_version=${NCURSES_MAJOR}
1154 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1155 cf_cv_timestamp=`date`
1156 echo "$as_me:1156: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1157 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1158
1159 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1160
1161 # Check whether --with-rel-version or --without-rel-version was given.
1162 if test "${with_rel_version+set}" = set; then
1163   withval="$with_rel_version"
1164   { echo "$as_me:1164: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1165 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1166  cf_cv_rel_version=$withval
1167 fi;
1168
1169  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1170  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1171
1172 if test -n "$NCURSES_MAJOR" ; then
1173   case $NCURSES_MAJOR in #(vi
1174   [0-9]*) #(vi
1175         ;;
1176   *)
1177         { { echo "$as_me:1177: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1178 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1179    { (exit 1); exit 1; }; }
1180         ;;
1181   esac
1182 else
1183   { { echo "$as_me:1183: error: Release major-version value is empty" >&5
1184 echo "$as_me: error: Release major-version value is empty" >&2;}
1185    { (exit 1); exit 1; }; }
1186 fi
1187
1188 if test -n "$NCURSES_MINOR" ; then
1189   case $NCURSES_MINOR in #(vi
1190   [0-9]*) #(vi
1191         ;;
1192   *)
1193         { { echo "$as_me:1193: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1194 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1195    { (exit 1); exit 1; }; }
1196         ;;
1197   esac
1198 else
1199   { { echo "$as_me:1199: error: Release minor-version value is empty" >&5
1200 echo "$as_me: error: Release minor-version value is empty" >&2;}
1201    { (exit 1); exit 1; }; }
1202 fi
1203
1204 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1205
1206 # Check whether --with-abi-version or --without-abi-version was given.
1207 if test "${with_abi_version+set}" = set; then
1208   withval="$with_abi_version"
1209   { echo "$as_me:1209: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1210 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1211  cf_cv_abi_version=$withval
1212 fi;
1213
1214 if test -n "$cf_cv_abi_version" ; then
1215   case $cf_cv_abi_version in #(vi
1216   [0-9]*) #(vi
1217         ;;
1218   *)
1219         { { echo "$as_me:1219: error: ABI version is not a number: $cf_cv_abi_version" >&5
1220 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1221    { (exit 1); exit 1; }; }
1222         ;;
1223   esac
1224 else
1225   { { echo "$as_me:1225: error: ABI version value is empty" >&5
1226 echo "$as_me: error: ABI version value is empty" >&2;}
1227    { (exit 1); exit 1; }; }
1228 fi
1229
1230 ac_aux_dir=
1231 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1232   if test -f $ac_dir/install-sh; then
1233     ac_aux_dir=$ac_dir
1234     ac_install_sh="$ac_aux_dir/install-sh -c"
1235     break
1236   elif test -f $ac_dir/install.sh; then
1237     ac_aux_dir=$ac_dir
1238     ac_install_sh="$ac_aux_dir/install.sh -c"
1239     break
1240   elif test -f $ac_dir/shtool; then
1241     ac_aux_dir=$ac_dir
1242     ac_install_sh="$ac_aux_dir/shtool install -c"
1243     break
1244   fi
1245 done
1246 if test -z "$ac_aux_dir"; then
1247   { { echo "$as_me:1247: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1248 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1249    { (exit 1); exit 1; }; }
1250 fi
1251 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1252 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1253 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1254
1255 # Make sure we can run config.sub.
1256 $ac_config_sub sun4 >/dev/null 2>&1 ||
1257   { { echo "$as_me:1257: error: cannot run $ac_config_sub" >&5
1258 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1259    { (exit 1); exit 1; }; }
1260
1261 echo "$as_me:1261: checking build system type" >&5
1262 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1263 if test "${ac_cv_build+set}" = set; then
1264   echo $ECHO_N "(cached) $ECHO_C" >&6
1265 else
1266   ac_cv_build_alias=$build_alias
1267 test -z "$ac_cv_build_alias" &&
1268   ac_cv_build_alias=`$ac_config_guess`
1269 test -z "$ac_cv_build_alias" &&
1270   { { echo "$as_me:1270: error: cannot guess build type; you must specify one" >&5
1271 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1272    { (exit 1); exit 1; }; }
1273 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1274   { { echo "$as_me:1274: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1275 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1276    { (exit 1); exit 1; }; }
1277
1278 fi
1279 echo "$as_me:1279: result: $ac_cv_build" >&5
1280 echo "${ECHO_T}$ac_cv_build" >&6
1281 build=$ac_cv_build
1282 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1283 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1284 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1285
1286 echo "$as_me:1286: checking host system type" >&5
1287 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1288 if test "${ac_cv_host+set}" = set; then
1289   echo $ECHO_N "(cached) $ECHO_C" >&6
1290 else
1291   ac_cv_host_alias=$host_alias
1292 test -z "$ac_cv_host_alias" &&
1293   ac_cv_host_alias=$ac_cv_build_alias
1294 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1295   { { echo "$as_me:1295: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1296 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1297    { (exit 1); exit 1; }; }
1298
1299 fi
1300 echo "$as_me:1300: result: $ac_cv_host" >&5
1301 echo "${ECHO_T}$ac_cv_host" >&6
1302 host=$ac_cv_host
1303 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1304 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1305 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1306
1307 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1308         echo "$as_me:1308: checking target system type" >&5
1309 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1310 if test "${ac_cv_target+set}" = set; then
1311   echo $ECHO_N "(cached) $ECHO_C" >&6
1312 else
1313   ac_cv_target_alias=$target_alias
1314 test "x$ac_cv_target_alias" = "x" &&
1315   ac_cv_target_alias=$ac_cv_host_alias
1316 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1317   { { echo "$as_me:1317: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1318 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1319    { (exit 1); exit 1; }; }
1320
1321 fi
1322 echo "$as_me:1322: result: $ac_cv_target" >&5
1323 echo "${ECHO_T}$ac_cv_target" >&6
1324 target=$ac_cv_target
1325 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1326 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1327 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1328
1329 # The aliases save the names the user supplied, while $host etc.
1330 # will get canonicalized.
1331 test -n "$target_alias" &&
1332   test "$program_prefix$program_suffix$program_transform_name" = \
1333     NONENONEs,x,x, &&
1334   program_prefix=${target_alias}-
1335         system_name="$host_os"
1336 else
1337         system_name="`(uname -s -r) 2>/dev/null`"
1338         if test -z "$system_name" ; then
1339                 system_name="`(hostname) 2>/dev/null`"
1340         fi
1341 fi
1342 test -n "$system_name" &&
1343 cat >>confdefs.h <<EOF
1344 #define SYSTEM_NAME "$system_name"
1345 EOF
1346
1347 if test "${cf_cv_system_name+set}" = set; then
1348   echo $ECHO_N "(cached) $ECHO_C" >&6
1349 else
1350   cf_cv_system_name="$system_name"
1351 fi
1352
1353 test -z "$system_name" && system_name="$cf_cv_system_name"
1354 test -n "$cf_cv_system_name" && echo "$as_me:1354: result: Configuring for $cf_cv_system_name" >&5
1355 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1356
1357 if test ".$system_name" != ".$cf_cv_system_name" ; then
1358         echo "$as_me:1358: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1359 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1360         { { echo "$as_me:1360: error: \"Please remove config.cache and try again.\"" >&5
1361 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1362    { (exit 1); exit 1; }; }
1363 fi
1364
1365 # Check whether --with-system-type or --without-system-type was given.
1366 if test "${with_system_type+set}" = set; then
1367   withval="$with_system_type"
1368   { echo "$as_me:1368: WARNING: overriding system type to $withval" >&5
1369 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1370         cf_cv_system_name=$withval
1371         host_os=$withval
1372
1373 fi;
1374
1375 ###     Save the given $CFLAGS to allow user-override.
1376 cf_user_CFLAGS="$CFLAGS"
1377
1378 ###     Default install-location
1379
1380 echo "$as_me:1380: checking for prefix" >&5
1381 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1382 if test "x$prefix" = "xNONE" ; then
1383         case "$cf_cv_system_name" in
1384                 # non-vendor systems don't have a conflict
1385         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu|mingw*)
1386                 prefix=/usr
1387                 ;;
1388         *)      prefix=$ac_default_prefix
1389                 ;;
1390         esac
1391 fi
1392 echo "$as_me:1392: result: $prefix" >&5
1393 echo "${ECHO_T}$prefix" >&6
1394
1395 if test "x$prefix" = "xNONE" ; then
1396 echo "$as_me:1396: checking for default include-directory" >&5
1397 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1398 test -n "$verbose" && echo 1>&6
1399 for cf_symbol in \
1400         $includedir \
1401         $includedir/ncurses \
1402         $prefix/include \
1403         $prefix/include/ncurses \
1404         /usr/local/include \
1405         /usr/local/include/ncurses \
1406         /usr/include \
1407         /usr/include/ncurses
1408 do
1409         cf_dir=`eval echo $cf_symbol`
1410         if test -f $cf_dir/curses.h ; then
1411         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1412                 includedir="$cf_symbol"
1413                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1414                 break
1415         fi
1416         fi
1417         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1418 done
1419 echo "$as_me:1419: result: $includedir" >&5
1420 echo "${ECHO_T}$includedir" >&6
1421 fi
1422
1423 ###     Checks for programs.
1424
1425 # Check whether --with-ada or --without-ada was given.
1426 if test "${with_ada+set}" = set; then
1427   withval="$with_ada"
1428   cf_with_ada=$withval
1429 else
1430   cf_with_ada=yes
1431 fi;
1432 if test "x$cf_with_ada" = xyes
1433 then
1434         cf_PROG_CC="gnatgcc gcc cc"
1435 else
1436         cf_PROG_CC="gcc cc"
1437 fi
1438
1439 ac_ext=c
1440 ac_cpp='$CPP $CPPFLAGS'
1441 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1442 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1443 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1444 ac_main_return=return
1445 if test -n "$ac_tool_prefix"; then
1446   for ac_prog in $cf_PROG_CC
1447   do
1448     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1449 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1450 echo "$as_me:1450: checking for $ac_word" >&5
1451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1452 if test "${ac_cv_prog_CC+set}" = set; then
1453   echo $ECHO_N "(cached) $ECHO_C" >&6
1454 else
1455   if test -n "$CC"; then
1456   ac_cv_prog_CC="$CC" # Let the user override the test.
1457 else
1458   ac_save_IFS=$IFS; IFS=$ac_path_separator
1459 ac_dummy="$PATH"
1460 for ac_dir in $ac_dummy; do
1461   IFS=$ac_save_IFS
1462   test -z "$ac_dir" && ac_dir=.
1463   $as_executable_p "$ac_dir/$ac_word" || continue
1464 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1465 echo "$as_me:1465: found $ac_dir/$ac_word" >&5
1466 break
1467 done
1468
1469 fi
1470 fi
1471 CC=$ac_cv_prog_CC
1472 if test -n "$CC"; then
1473   echo "$as_me:1473: result: $CC" >&5
1474 echo "${ECHO_T}$CC" >&6
1475 else
1476   echo "$as_me:1476: result: no" >&5
1477 echo "${ECHO_T}no" >&6
1478 fi
1479
1480     test -n "$CC" && break
1481   done
1482 fi
1483 if test -z "$CC"; then
1484   ac_ct_CC=$CC
1485   for ac_prog in $cf_PROG_CC
1486 do
1487   # Extract the first word of "$ac_prog", so it can be a program name with args.
1488 set dummy $ac_prog; ac_word=$2
1489 echo "$as_me:1489: checking for $ac_word" >&5
1490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1491 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1492   echo $ECHO_N "(cached) $ECHO_C" >&6
1493 else
1494   if test -n "$ac_ct_CC"; then
1495   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1496 else
1497   ac_save_IFS=$IFS; IFS=$ac_path_separator
1498 ac_dummy="$PATH"
1499 for ac_dir in $ac_dummy; do
1500   IFS=$ac_save_IFS
1501   test -z "$ac_dir" && ac_dir=.
1502   $as_executable_p "$ac_dir/$ac_word" || continue
1503 ac_cv_prog_ac_ct_CC="$ac_prog"
1504 echo "$as_me:1504: found $ac_dir/$ac_word" >&5
1505 break
1506 done
1507
1508 fi
1509 fi
1510 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1511 if test -n "$ac_ct_CC"; then
1512   echo "$as_me:1512: result: $ac_ct_CC" >&5
1513 echo "${ECHO_T}$ac_ct_CC" >&6
1514 else
1515   echo "$as_me:1515: result: no" >&5
1516 echo "${ECHO_T}no" >&6
1517 fi
1518
1519   test -n "$ac_ct_CC" && break
1520 done
1521
1522   CC=$ac_ct_CC
1523 fi
1524
1525 test -z "$CC" && { { echo "$as_me:1525: error: no acceptable cc found in \$PATH" >&5
1526 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1527    { (exit 1); exit 1; }; }
1528
1529 # Provide some information about the compiler.
1530 echo "$as_me:1530:" \
1531      "checking for C compiler version" >&5
1532 ac_compiler=`set X $ac_compile; echo $2`
1533 { (eval echo "$as_me:1533: \"$ac_compiler --version </dev/null >&5\"") >&5
1534   (eval $ac_compiler --version </dev/null >&5) 2>&5
1535   ac_status=$?
1536   echo "$as_me:1536: \$? = $ac_status" >&5
1537   (exit $ac_status); }
1538 { (eval echo "$as_me:1538: \"$ac_compiler -v </dev/null >&5\"") >&5
1539   (eval $ac_compiler -v </dev/null >&5) 2>&5
1540   ac_status=$?
1541   echo "$as_me:1541: \$? = $ac_status" >&5
1542   (exit $ac_status); }
1543 { (eval echo "$as_me:1543: \"$ac_compiler -V </dev/null >&5\"") >&5
1544   (eval $ac_compiler -V </dev/null >&5) 2>&5
1545   ac_status=$?
1546   echo "$as_me:1546: \$? = $ac_status" >&5
1547   (exit $ac_status); }
1548
1549 cat >conftest.$ac_ext <<_ACEOF
1550 #line 1550 "configure"
1551 #include "confdefs.h"
1552
1553 int
1554 main ()
1555 {
1556
1557   ;
1558   return 0;
1559 }
1560 _ACEOF
1561 ac_clean_files_save=$ac_clean_files
1562 ac_clean_files="$ac_clean_files a.out a.exe"
1563 # Try to create an executable without -o first, disregard a.out.
1564 # It will help us diagnose broken compilers, and finding out an intuition
1565 # of exeext.
1566 echo "$as_me:1566: checking for C compiler default output" >&5
1567 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1568 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1569 if { (eval echo "$as_me:1569: \"$ac_link_default\"") >&5
1570   (eval $ac_link_default) 2>&5
1571   ac_status=$?
1572   echo "$as_me:1572: \$? = $ac_status" >&5
1573   (exit $ac_status); }; then
1574   # Find the output, starting from the most likely.  This scheme is
1575 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1576 # resort.
1577 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1578                 ls a.out conftest 2>/dev/null;
1579                 ls a.* conftest.* 2>/dev/null`; do
1580   case $ac_file in
1581     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1582     a.out ) # We found the default executable, but exeext='' is most
1583             # certainly right.
1584             break;;
1585     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1586           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1587           export ac_cv_exeext
1588           break;;
1589     * ) break;;
1590   esac
1591 done
1592 else
1593   echo "$as_me: failed program was:" >&5
1594 cat conftest.$ac_ext >&5
1595 { { echo "$as_me:1595: error: C compiler cannot create executables" >&5
1596 echo "$as_me: error: C compiler cannot create executables" >&2;}
1597    { (exit 77); exit 77; }; }
1598 fi
1599
1600 ac_exeext=$ac_cv_exeext
1601 echo "$as_me:1601: result: $ac_file" >&5
1602 echo "${ECHO_T}$ac_file" >&6
1603
1604 # Check the compiler produces executables we can run.  If not, either
1605 # the compiler is broken, or we cross compile.
1606 echo "$as_me:1606: checking whether the C compiler works" >&5
1607 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1608 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1609 # If not cross compiling, check that we can run a simple program.
1610 if test "$cross_compiling" != yes; then
1611   if { ac_try='./$ac_file'
1612   { (eval echo "$as_me:1612: \"$ac_try\"") >&5
1613   (eval $ac_try) 2>&5
1614   ac_status=$?
1615   echo "$as_me:1615: \$? = $ac_status" >&5
1616   (exit $ac_status); }; }; then
1617     cross_compiling=no
1618   else
1619     if test "$cross_compiling" = maybe; then
1620         cross_compiling=yes
1621     else
1622         { { echo "$as_me:1622: error: cannot run C compiled programs.
1623 If you meant to cross compile, use \`--host'." >&5
1624 echo "$as_me: error: cannot run C compiled programs.
1625 If you meant to cross compile, use \`--host'." >&2;}
1626    { (exit 1); exit 1; }; }
1627     fi
1628   fi
1629 fi
1630 echo "$as_me:1630: result: yes" >&5
1631 echo "${ECHO_T}yes" >&6
1632
1633 rm -f a.out a.exe conftest$ac_cv_exeext
1634 ac_clean_files=$ac_clean_files_save
1635 # Check the compiler produces executables we can run.  If not, either
1636 # the compiler is broken, or we cross compile.
1637 echo "$as_me:1637: checking whether we are cross compiling" >&5
1638 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1639 echo "$as_me:1639: result: $cross_compiling" >&5
1640 echo "${ECHO_T}$cross_compiling" >&6
1641
1642 echo "$as_me:1642: checking for executable suffix" >&5
1643 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1644 if { (eval echo "$as_me:1644: \"$ac_link\"") >&5
1645   (eval $ac_link) 2>&5
1646   ac_status=$?
1647   echo "$as_me:1647: \$? = $ac_status" >&5
1648   (exit $ac_status); }; then
1649   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1650 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1651 # work properly (i.e., refer to `conftest.exe'), while it won't with
1652 # `rm'.
1653 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1654   case $ac_file in
1655     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1656     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1657           export ac_cv_exeext
1658           break;;
1659     * ) break;;
1660   esac
1661 done
1662 else
1663   { { echo "$as_me:1663: error: cannot compute EXEEXT: cannot compile and link" >&5
1664 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1665    { (exit 1); exit 1; }; }
1666 fi
1667
1668 rm -f conftest$ac_cv_exeext
1669 echo "$as_me:1669: result: $ac_cv_exeext" >&5
1670 echo "${ECHO_T}$ac_cv_exeext" >&6
1671
1672 rm -f conftest.$ac_ext
1673 EXEEXT=$ac_cv_exeext
1674 ac_exeext=$EXEEXT
1675 echo "$as_me:1675: checking for object suffix" >&5
1676 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1677 if test "${ac_cv_objext+set}" = set; then
1678   echo $ECHO_N "(cached) $ECHO_C" >&6
1679 else
1680   cat >conftest.$ac_ext <<_ACEOF
1681 #line 1681 "configure"
1682 #include "confdefs.h"
1683
1684 int
1685 main ()
1686 {
1687
1688   ;
1689   return 0;
1690 }
1691 _ACEOF
1692 rm -f conftest.o conftest.obj
1693 if { (eval echo "$as_me:1693: \"$ac_compile\"") >&5
1694   (eval $ac_compile) 2>&5
1695   ac_status=$?
1696   echo "$as_me:1696: \$? = $ac_status" >&5
1697   (exit $ac_status); }; then
1698   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1699   case $ac_file in
1700     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1701     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1702        break;;
1703   esac
1704 done
1705 else
1706   echo "$as_me: failed program was:" >&5
1707 cat conftest.$ac_ext >&5
1708 { { echo "$as_me:1708: error: cannot compute OBJEXT: cannot compile" >&5
1709 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1710    { (exit 1); exit 1; }; }
1711 fi
1712
1713 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1714 fi
1715 echo "$as_me:1715: result: $ac_cv_objext" >&5
1716 echo "${ECHO_T}$ac_cv_objext" >&6
1717 OBJEXT=$ac_cv_objext
1718 ac_objext=$OBJEXT
1719 echo "$as_me:1719: checking whether we are using the GNU C compiler" >&5
1720 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1721 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1722   echo $ECHO_N "(cached) $ECHO_C" >&6
1723 else
1724   cat >conftest.$ac_ext <<_ACEOF
1725 #line 1725 "configure"
1726 #include "confdefs.h"
1727
1728 int
1729 main ()
1730 {
1731 #ifndef __GNUC__
1732        choke me
1733 #endif
1734
1735   ;
1736   return 0;
1737 }
1738 _ACEOF
1739 rm -f conftest.$ac_objext
1740 if { (eval echo "$as_me:1740: \"$ac_compile\"") >&5
1741   (eval $ac_compile) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); } &&
1745          { ac_try='test -s conftest.$ac_objext'
1746   { (eval echo "$as_me:1746: \"$ac_try\"") >&5
1747   (eval $ac_try) 2>&5
1748   ac_status=$?
1749   echo "$as_me:1749: \$? = $ac_status" >&5
1750   (exit $ac_status); }; }; then
1751   ac_compiler_gnu=yes
1752 else
1753   echo "$as_me: failed program was:" >&5
1754 cat conftest.$ac_ext >&5
1755 ac_compiler_gnu=no
1756 fi
1757 rm -f conftest.$ac_objext conftest.$ac_ext
1758 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1759
1760 fi
1761 echo "$as_me:1761: result: $ac_cv_c_compiler_gnu" >&5
1762 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1763 GCC=`test $ac_compiler_gnu = yes && echo yes`
1764 ac_test_CFLAGS=${CFLAGS+set}
1765 ac_save_CFLAGS=$CFLAGS
1766 CFLAGS="-g"
1767 echo "$as_me:1767: checking whether $CC accepts -g" >&5
1768 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1769 if test "${ac_cv_prog_cc_g+set}" = set; then
1770   echo $ECHO_N "(cached) $ECHO_C" >&6
1771 else
1772   cat >conftest.$ac_ext <<_ACEOF
1773 #line 1773 "configure"
1774 #include "confdefs.h"
1775
1776 int
1777 main ()
1778 {
1779
1780   ;
1781   return 0;
1782 }
1783 _ACEOF
1784 rm -f conftest.$ac_objext
1785 if { (eval echo "$as_me:1785: \"$ac_compile\"") >&5
1786   (eval $ac_compile) 2>&5
1787   ac_status=$?
1788   echo "$as_me:1788: \$? = $ac_status" >&5
1789   (exit $ac_status); } &&
1790          { ac_try='test -s conftest.$ac_objext'
1791   { (eval echo "$as_me:1791: \"$ac_try\"") >&5
1792   (eval $ac_try) 2>&5
1793   ac_status=$?
1794   echo "$as_me:1794: \$? = $ac_status" >&5
1795   (exit $ac_status); }; }; then
1796   ac_cv_prog_cc_g=yes
1797 else
1798   echo "$as_me: failed program was:" >&5
1799 cat conftest.$ac_ext >&5
1800 ac_cv_prog_cc_g=no
1801 fi
1802 rm -f conftest.$ac_objext conftest.$ac_ext
1803 fi
1804 echo "$as_me:1804: result: $ac_cv_prog_cc_g" >&5
1805 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1806 if test "$ac_test_CFLAGS" = set; then
1807   CFLAGS=$ac_save_CFLAGS
1808 elif test $ac_cv_prog_cc_g = yes; then
1809   if test "$GCC" = yes; then
1810     CFLAGS="-g -O2"
1811   else
1812     CFLAGS="-g"
1813   fi
1814 else
1815   if test "$GCC" = yes; then
1816     CFLAGS="-O2"
1817   else
1818     CFLAGS=
1819   fi
1820 fi
1821 # Some people use a C++ compiler to compile C.  Since we use `exit',
1822 # in C++ we need to declare it.  In case someone uses the same compiler
1823 # for both compiling C and C++ we need to have the C++ compiler decide
1824 # the declaration of exit, since it's the most demanding environment.
1825 cat >conftest.$ac_ext <<_ACEOF
1826 #ifndef __cplusplus
1827   choke me
1828 #endif
1829 _ACEOF
1830 rm -f conftest.$ac_objext
1831 if { (eval echo "$as_me:1831: \"$ac_compile\"") >&5
1832   (eval $ac_compile) 2>&5
1833   ac_status=$?
1834   echo "$as_me:1834: \$? = $ac_status" >&5
1835   (exit $ac_status); } &&
1836          { ac_try='test -s conftest.$ac_objext'
1837   { (eval echo "$as_me:1837: \"$ac_try\"") >&5
1838   (eval $ac_try) 2>&5
1839   ac_status=$?
1840   echo "$as_me:1840: \$? = $ac_status" >&5
1841   (exit $ac_status); }; }; then
1842   for ac_declaration in \
1843    ''\
1844    '#include <stdlib.h>' \
1845    'extern "C" void std::exit (int) throw (); using std::exit;' \
1846    'extern "C" void std::exit (int); using std::exit;' \
1847    'extern "C" void exit (int) throw ();' \
1848    'extern "C" void exit (int);' \
1849    'void exit (int);'
1850 do
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854 #include <stdlib.h>
1855 $ac_declaration
1856 int
1857 main ()
1858 {
1859 exit (42);
1860   ;
1861   return 0;
1862 }
1863 _ACEOF
1864 rm -f conftest.$ac_objext
1865 if { (eval echo "$as_me:1865: \"$ac_compile\"") >&5
1866   (eval $ac_compile) 2>&5
1867   ac_status=$?
1868   echo "$as_me:1868: \$? = $ac_status" >&5
1869   (exit $ac_status); } &&
1870          { ac_try='test -s conftest.$ac_objext'
1871   { (eval echo "$as_me:1871: \"$ac_try\"") >&5
1872   (eval $ac_try) 2>&5
1873   ac_status=$?
1874   echo "$as_me:1874: \$? = $ac_status" >&5
1875   (exit $ac_status); }; }; then
1876   :
1877 else
1878   echo "$as_me: failed program was:" >&5
1879 cat conftest.$ac_ext >&5
1880 continue
1881 fi
1882 rm -f conftest.$ac_objext conftest.$ac_ext
1883   cat >conftest.$ac_ext <<_ACEOF
1884 #line 1884 "configure"
1885 #include "confdefs.h"
1886 $ac_declaration
1887 int
1888 main ()
1889 {
1890 exit (42);
1891   ;
1892   return 0;
1893 }
1894 _ACEOF
1895 rm -f conftest.$ac_objext
1896 if { (eval echo "$as_me:1896: \"$ac_compile\"") >&5
1897   (eval $ac_compile) 2>&5
1898   ac_status=$?
1899   echo "$as_me:1899: \$? = $ac_status" >&5
1900   (exit $ac_status); } &&
1901          { ac_try='test -s conftest.$ac_objext'
1902   { (eval echo "$as_me:1902: \"$ac_try\"") >&5
1903   (eval $ac_try) 2>&5
1904   ac_status=$?
1905   echo "$as_me:1905: \$? = $ac_status" >&5
1906   (exit $ac_status); }; }; then
1907   break
1908 else
1909   echo "$as_me: failed program was:" >&5
1910 cat conftest.$ac_ext >&5
1911 fi
1912 rm -f conftest.$ac_objext conftest.$ac_ext
1913 done
1914 rm -rf conftest*
1915 if test -n "$ac_declaration"; then
1916   echo '#ifdef __cplusplus' >>confdefs.h
1917   echo $ac_declaration      >>confdefs.h
1918   echo '#endif'             >>confdefs.h
1919 fi
1920
1921 else
1922   echo "$as_me: failed program was:" >&5
1923 cat conftest.$ac_ext >&5
1924 fi
1925 rm -f conftest.$ac_objext conftest.$ac_ext
1926 ac_ext=c
1927 ac_cpp='$CPP $CPPFLAGS'
1928 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1929 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1930 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1931 ac_main_return=return
1932
1933 GCC_VERSION=none
1934 if test "$GCC" = yes ; then
1935         echo "$as_me:1935: checking version of $CC" >&5
1936 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1937         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.].*//'`"
1938         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1939         echo "$as_me:1939: result: $GCC_VERSION" >&5
1940 echo "${ECHO_T}$GCC_VERSION" >&6
1941 fi
1942
1943 echo "$as_me:1943: checking for $CC option to accept ANSI C" >&5
1944 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1945 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1946   echo $ECHO_N "(cached) $ECHO_C" >&6
1947 else
1948   ac_cv_prog_cc_stdc=no
1949 ac_save_CC=$CC
1950 cat >conftest.$ac_ext <<_ACEOF
1951 #line 1951 "configure"
1952 #include "confdefs.h"
1953 #include <stdarg.h>
1954 #include <stdio.h>
1955 #include <sys/types.h>
1956 #include <sys/stat.h>
1957 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1958 struct buf { int x; };
1959 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1960 static char *e (p, i)
1961      char **p;
1962      int i;
1963 {
1964   return p[i];
1965 }
1966 static char *f (char * (*g) (char **, int), char **p, ...)
1967 {
1968   char *s;
1969   va_list v;
1970   va_start (v,p);
1971   s = g (p, va_arg (v,int));
1972   va_end (v);
1973   return s;
1974 }
1975 int test (int i, double x);
1976 struct s1 {int (*f) (int a);};
1977 struct s2 {int (*f) (double a);};
1978 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1979 int argc;
1980 char **argv;
1981 int
1982 main ()
1983 {
1984 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1985   ;
1986   return 0;
1987 }
1988 _ACEOF
1989 # Don't try gcc -ansi; that turns off useful extensions and
1990 # breaks some systems' header files.
1991 # AIX                   -qlanglvl=ansi
1992 # Ultrix and OSF/1      -std1
1993 # HP-UX 10.20 and later -Ae
1994 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1995 # SVR4                  -Xc -D__EXTENSIONS__
1996 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1997 do
1998   CC="$ac_save_CC $ac_arg"
1999   rm -f conftest.$ac_objext
2000 if { (eval echo "$as_me:2000: \"$ac_compile\"") >&5
2001   (eval $ac_compile) 2>&5
2002   ac_status=$?
2003   echo "$as_me:2003: \$? = $ac_status" >&5
2004   (exit $ac_status); } &&
2005          { ac_try='test -s conftest.$ac_objext'
2006   { (eval echo "$as_me:2006: \"$ac_try\"") >&5
2007   (eval $ac_try) 2>&5
2008   ac_status=$?
2009   echo "$as_me:2009: \$? = $ac_status" >&5
2010   (exit $ac_status); }; }; then
2011   ac_cv_prog_cc_stdc=$ac_arg
2012 break
2013 else
2014   echo "$as_me: failed program was:" >&5
2015 cat conftest.$ac_ext >&5
2016 fi
2017 rm -f conftest.$ac_objext
2018 done
2019 rm -f conftest.$ac_ext conftest.$ac_objext
2020 CC=$ac_save_CC
2021
2022 fi
2023
2024 case "x$ac_cv_prog_cc_stdc" in
2025   x|xno)
2026     echo "$as_me:2026: result: none needed" >&5
2027 echo "${ECHO_T}none needed" >&6 ;;
2028   *)
2029     echo "$as_me:2029: result: $ac_cv_prog_cc_stdc" >&5
2030 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2031     CC="$CC $ac_cv_prog_cc_stdc" ;;
2032 esac
2033
2034 # This should have been defined by AC_PROG_CC
2035 : ${CC:=cc}
2036
2037 echo "$as_me:2037: checking \$CC variable" >&5
2038 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2039 case "$CC" in #(vi
2040 *[\ \   ]-[IUD]*)
2041         echo "$as_me:2041: result: broken" >&5
2042 echo "${ECHO_T}broken" >&6
2043         { echo "$as_me:2043: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2044 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2045         # humor him...
2046         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2047         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2048
2049 cf_fix_cppflags=no
2050 cf_new_cflags=
2051 cf_new_cppflags=
2052 cf_new_extra_cppflags=
2053
2054 for cf_add_cflags in $cf_flags
2055 do
2056 case $cf_fix_cppflags in
2057 no)
2058         case $cf_add_cflags in #(vi
2059         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2060                 case $cf_add_cflags in
2061                 -D*)
2062                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2063
2064                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2065                                 && test -z "${cf_tst_cflags}" \
2066                                 && cf_fix_cppflags=yes
2067
2068                         if test $cf_fix_cppflags = yes ; then
2069                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2070                                 continue
2071                         elif test "${cf_tst_cflags}" = "\"'" ; then
2072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2073                                 continue
2074                         fi
2075                         ;;
2076                 esac
2077                 case "$CPPFLAGS" in
2078                 *$cf_add_cflags) #(vi
2079                         ;;
2080                 *) #(vi
2081                         case $cf_add_cflags in #(vi
2082                         -D*)
2083                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2084
2085 CPPFLAGS=`echo "$CPPFLAGS" | \
2086         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2087                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2088
2089                                 ;;
2090                         esac
2091                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2092                         ;;
2093                 esac
2094                 ;;
2095         *)
2096                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2097                 ;;
2098         esac
2099         ;;
2100 yes)
2101         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2102
2103         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2104
2105         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2106                 && test -z "${cf_tst_cflags}" \
2107                 && cf_fix_cppflags=no
2108         ;;
2109 esac
2110 done
2111
2112 if test -n "$cf_new_cflags" ; then
2113
2114         CFLAGS="$CFLAGS $cf_new_cflags"
2115 fi
2116
2117 if test -n "$cf_new_cppflags" ; then
2118
2119         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2120 fi
2121
2122 if test -n "$cf_new_extra_cppflags" ; then
2123
2124         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2125 fi
2126
2127         ;;
2128 *)
2129         echo "$as_me:2129: result: ok" >&5
2130 echo "${ECHO_T}ok" >&6
2131         ;;
2132 esac
2133
2134 ac_ext=c
2135 ac_cpp='$CPP $CPPFLAGS'
2136 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2137 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2138 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2139 ac_main_return=return
2140 echo "$as_me:2140: checking how to run the C preprocessor" >&5
2141 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2142 # On Suns, sometimes $CPP names a directory.
2143 if test -n "$CPP" && test -d "$CPP"; then
2144   CPP=
2145 fi
2146 if test -z "$CPP"; then
2147   if test "${ac_cv_prog_CPP+set}" = set; then
2148   echo $ECHO_N "(cached) $ECHO_C" >&6
2149 else
2150       # Double quotes because CPP needs to be expanded
2151     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2152     do
2153       ac_preproc_ok=false
2154 for ac_c_preproc_warn_flag in '' yes
2155 do
2156   # Use a header file that comes with gcc, so configuring glibc
2157   # with a fresh cross-compiler works.
2158   # On the NeXT, cc -E runs the code through the compiler's parser,
2159   # not just through cpp. "Syntax error" is here to catch this case.
2160   cat >conftest.$ac_ext <<_ACEOF
2161 #line 2161 "configure"
2162 #include "confdefs.h"
2163 #include <assert.h>
2164                      Syntax error
2165 _ACEOF
2166 if { (eval echo "$as_me:2166: \"$ac_cpp conftest.$ac_ext\"") >&5
2167   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2168   ac_status=$?
2169   egrep -v '^ *\+' conftest.er1 >conftest.err
2170   rm -f conftest.er1
2171   cat conftest.err >&5
2172   echo "$as_me:2172: \$? = $ac_status" >&5
2173   (exit $ac_status); } >/dev/null; then
2174   if test -s conftest.err; then
2175     ac_cpp_err=$ac_c_preproc_warn_flag
2176   else
2177     ac_cpp_err=
2178   fi
2179 else
2180   ac_cpp_err=yes
2181 fi
2182 if test -z "$ac_cpp_err"; then
2183   :
2184 else
2185   echo "$as_me: failed program was:" >&5
2186   cat conftest.$ac_ext >&5
2187   # Broken: fails on valid input.
2188 continue
2189 fi
2190 rm -f conftest.err conftest.$ac_ext
2191
2192   # OK, works on sane cases.  Now check whether non-existent headers
2193   # can be detected and how.
2194   cat >conftest.$ac_ext <<_ACEOF
2195 #line 2195 "configure"
2196 #include "confdefs.h"
2197 #include <ac_nonexistent.h>
2198 _ACEOF
2199 if { (eval echo "$as_me:2199: \"$ac_cpp conftest.$ac_ext\"") >&5
2200   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2201   ac_status=$?
2202   egrep -v '^ *\+' conftest.er1 >conftest.err
2203   rm -f conftest.er1
2204   cat conftest.err >&5
2205   echo "$as_me:2205: \$? = $ac_status" >&5
2206   (exit $ac_status); } >/dev/null; then
2207   if test -s conftest.err; then
2208     ac_cpp_err=$ac_c_preproc_warn_flag
2209   else
2210     ac_cpp_err=
2211   fi
2212 else
2213   ac_cpp_err=yes
2214 fi
2215 if test -z "$ac_cpp_err"; then
2216   # Broken: success on invalid input.
2217 continue
2218 else
2219   echo "$as_me: failed program was:" >&5
2220   cat conftest.$ac_ext >&5
2221   # Passes both tests.
2222 ac_preproc_ok=:
2223 break
2224 fi
2225 rm -f conftest.err conftest.$ac_ext
2226
2227 done
2228 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2229 rm -f conftest.err conftest.$ac_ext
2230 if $ac_preproc_ok; then
2231   break
2232 fi
2233
2234     done
2235     ac_cv_prog_CPP=$CPP
2236
2237 fi
2238   CPP=$ac_cv_prog_CPP
2239 else
2240   ac_cv_prog_CPP=$CPP
2241 fi
2242 echo "$as_me:2242: result: $CPP" >&5
2243 echo "${ECHO_T}$CPP" >&6
2244 ac_preproc_ok=false
2245 for ac_c_preproc_warn_flag in '' yes
2246 do
2247   # Use a header file that comes with gcc, so configuring glibc
2248   # with a fresh cross-compiler works.
2249   # On the NeXT, cc -E runs the code through the compiler's parser,
2250   # not just through cpp. "Syntax error" is here to catch this case.
2251   cat >conftest.$ac_ext <<_ACEOF
2252 #line 2252 "configure"
2253 #include "confdefs.h"
2254 #include <assert.h>
2255                      Syntax error
2256 _ACEOF
2257 if { (eval echo "$as_me:2257: \"$ac_cpp conftest.$ac_ext\"") >&5
2258   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2259   ac_status=$?
2260   egrep -v '^ *\+' conftest.er1 >conftest.err
2261   rm -f conftest.er1
2262   cat conftest.err >&5
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit $ac_status); } >/dev/null; then
2265   if test -s conftest.err; then
2266     ac_cpp_err=$ac_c_preproc_warn_flag
2267   else
2268     ac_cpp_err=
2269   fi
2270 else
2271   ac_cpp_err=yes
2272 fi
2273 if test -z "$ac_cpp_err"; then
2274   :
2275 else
2276   echo "$as_me: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   # Broken: fails on valid input.
2279 continue
2280 fi
2281 rm -f conftest.err conftest.$ac_ext
2282
2283   # OK, works on sane cases.  Now check whether non-existent headers
2284   # can be detected and how.
2285   cat >conftest.$ac_ext <<_ACEOF
2286 #line 2286 "configure"
2287 #include "confdefs.h"
2288 #include <ac_nonexistent.h>
2289 _ACEOF
2290 if { (eval echo "$as_me:2290: \"$ac_cpp conftest.$ac_ext\"") >&5
2291   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2292   ac_status=$?
2293   egrep -v '^ *\+' conftest.er1 >conftest.err
2294   rm -f conftest.er1
2295   cat conftest.err >&5
2296   echo "$as_me:2296: \$? = $ac_status" >&5
2297   (exit $ac_status); } >/dev/null; then
2298   if test -s conftest.err; then
2299     ac_cpp_err=$ac_c_preproc_warn_flag
2300   else
2301     ac_cpp_err=
2302   fi
2303 else
2304   ac_cpp_err=yes
2305 fi
2306 if test -z "$ac_cpp_err"; then
2307   # Broken: success on invalid input.
2308 continue
2309 else
2310   echo "$as_me: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   # Passes both tests.
2313 ac_preproc_ok=:
2314 break
2315 fi
2316 rm -f conftest.err conftest.$ac_ext
2317
2318 done
2319 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2320 rm -f conftest.err conftest.$ac_ext
2321 if $ac_preproc_ok; then
2322   :
2323 else
2324   { { echo "$as_me:2324: error: C preprocessor \"$CPP\" fails sanity check" >&5
2325 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2326    { (exit 1); exit 1; }; }
2327 fi
2328
2329 ac_ext=c
2330 ac_cpp='$CPP $CPPFLAGS'
2331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2334 ac_main_return=return
2335
2336 if test $ac_cv_c_compiler_gnu = yes; then
2337     echo "$as_me:2337: checking whether $CC needs -traditional" >&5
2338 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2339 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2340   echo $ECHO_N "(cached) $ECHO_C" >&6
2341 else
2342     ac_pattern="Autoconf.*'x'"
2343   cat >conftest.$ac_ext <<_ACEOF
2344 #line 2344 "configure"
2345 #include "confdefs.h"
2346 #include <sgtty.h>
2347 int Autoconf = TIOCGETP;
2348 _ACEOF
2349 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2350   egrep "$ac_pattern" >/dev/null 2>&1; then
2351   ac_cv_prog_gcc_traditional=yes
2352 else
2353   ac_cv_prog_gcc_traditional=no
2354 fi
2355 rm -rf conftest*
2356
2357   if test $ac_cv_prog_gcc_traditional = no; then
2358     cat >conftest.$ac_ext <<_ACEOF
2359 #line 2359 "configure"
2360 #include "confdefs.h"
2361 #include <termio.h>
2362 int Autoconf = TCGETA;
2363 _ACEOF
2364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2365   egrep "$ac_pattern" >/dev/null 2>&1; then
2366   ac_cv_prog_gcc_traditional=yes
2367 fi
2368 rm -rf conftest*
2369
2370   fi
2371 fi
2372 echo "$as_me:2372: result: $ac_cv_prog_gcc_traditional" >&5
2373 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2374   if test $ac_cv_prog_gcc_traditional = yes; then
2375     CC="$CC -traditional"
2376   fi
2377 fi
2378
2379 echo "$as_me:2379: checking whether $CC understands -c and -o together" >&5
2380 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2381 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2382   echo $ECHO_N "(cached) $ECHO_C" >&6
2383 else
2384
2385 cat > conftest.$ac_ext <<CF_EOF
2386 #include <stdio.h>
2387 int main()
2388 {
2389         ${cf_cv_main_return:-return}(0);
2390 }
2391 CF_EOF
2392 # We do the test twice because some compilers refuse to overwrite an
2393 # existing .o file with -o, though they will create one.
2394 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2395 if { (eval echo "$as_me:2395: \"$ac_try\"") >&5
2396   (eval $ac_try) 2>&5
2397   ac_status=$?
2398   echo "$as_me:2398: \$? = $ac_status" >&5
2399   (exit $ac_status); } &&
2400   test -f conftest2.$ac_objext && { (eval echo "$as_me:2400: \"$ac_try\"") >&5
2401   (eval $ac_try) 2>&5
2402   ac_status=$?
2403   echo "$as_me:2403: \$? = $ac_status" >&5
2404   (exit $ac_status); };
2405 then
2406   eval cf_cv_prog_CC_c_o=yes
2407 else
2408   eval cf_cv_prog_CC_c_o=no
2409 fi
2410 rm -rf conftest*
2411
2412 fi
2413 if test $cf_cv_prog_CC_c_o = yes; then
2414   echo "$as_me:2414: result: yes" >&5
2415 echo "${ECHO_T}yes" >&6
2416 else
2417   echo "$as_me:2417: result: no" >&5
2418 echo "${ECHO_T}no" >&6
2419 fi
2420
2421 if test "$cross_compiling" = yes ; then
2422   LDCONFIG=:
2423 else
2424 case "$cf_cv_system_name" in #(vi
2425 dragonfly*|mirbsd*|freebsd*) #(vi
2426   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2427   ;;
2428 *) LDPATH=$PATH:/sbin:/usr/sbin
2429   # Extract the first word of "ldconfig", so it can be a program name with args.
2430 set dummy ldconfig; ac_word=$2
2431 echo "$as_me:2431: checking for $ac_word" >&5
2432 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2433 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2434   echo $ECHO_N "(cached) $ECHO_C" >&6
2435 else
2436   case $LDCONFIG in
2437   [\\/]* | ?:[\\/]*)
2438   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2439   ;;
2440   *)
2441   ac_save_IFS=$IFS; IFS=$ac_path_separator
2442 ac_dummy="$LDPATH"
2443 for ac_dir in $ac_dummy; do
2444   IFS=$ac_save_IFS
2445   test -z "$ac_dir" && ac_dir=.
2446   if $as_executable_p "$ac_dir/$ac_word"; then
2447    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2448    echo "$as_me:2448: found $ac_dir/$ac_word" >&5
2449    break
2450 fi
2451 done
2452
2453   ;;
2454 esac
2455 fi
2456 LDCONFIG=$ac_cv_path_LDCONFIG
2457
2458 if test -n "$LDCONFIG"; then
2459   echo "$as_me:2459: result: $LDCONFIG" >&5
2460 echo "${ECHO_T}$LDCONFIG" >&6
2461 else
2462   echo "$as_me:2462: result: no" >&5
2463 echo "${ECHO_T}no" >&6
2464 fi
2465
2466   ;;
2467 esac
2468 fi
2469
2470 echo "$as_me:2470: checking if you want to ensure bool is consistent with C++" >&5
2471 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2472
2473 # Check whether --with-cxx or --without-cxx was given.
2474 if test "${with_cxx+set}" = set; then
2475   withval="$with_cxx"
2476   cf_with_cxx=$withval
2477 else
2478   cf_with_cxx=yes
2479 fi;
2480 echo "$as_me:2480: result: $cf_with_cxx" >&5
2481 echo "${ECHO_T}$cf_with_cxx" >&6
2482 if test "X$cf_with_cxx" = Xno ; then
2483         CXX=""
2484         GXX=""
2485 else
2486         # with autoconf 2.13, we can change the error to a warning:
2487                 ac_ext=cc
2488 ac_cpp='$CXXCPP $CPPFLAGS'
2489 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2490 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2491 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2492 ac_main_return=return
2493 if test -n "$ac_tool_prefix"; then
2494   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2495   do
2496     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2497 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2498 echo "$as_me:2498: checking for $ac_word" >&5
2499 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2500 if test "${ac_cv_prog_CXX+set}" = set; then
2501   echo $ECHO_N "(cached) $ECHO_C" >&6
2502 else
2503   if test -n "$CXX"; then
2504   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2505 else
2506   ac_save_IFS=$IFS; IFS=$ac_path_separator
2507 ac_dummy="$PATH"
2508 for ac_dir in $ac_dummy; do
2509   IFS=$ac_save_IFS
2510   test -z "$ac_dir" && ac_dir=.
2511   $as_executable_p "$ac_dir/$ac_word" || continue
2512 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2513 echo "$as_me:2513: found $ac_dir/$ac_word" >&5
2514 break
2515 done
2516
2517 fi
2518 fi
2519 CXX=$ac_cv_prog_CXX
2520 if test -n "$CXX"; then
2521   echo "$as_me:2521: result: $CXX" >&5
2522 echo "${ECHO_T}$CXX" >&6
2523 else
2524   echo "$as_me:2524: result: no" >&5
2525 echo "${ECHO_T}no" >&6
2526 fi
2527
2528     test -n "$CXX" && break
2529   done
2530 fi
2531 if test -z "$CXX"; then
2532   ac_ct_CXX=$CXX
2533   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2534 do
2535   # Extract the first word of "$ac_prog", so it can be a program name with args.
2536 set dummy $ac_prog; ac_word=$2
2537 echo "$as_me:2537: checking for $ac_word" >&5
2538 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2539 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2540   echo $ECHO_N "(cached) $ECHO_C" >&6
2541 else
2542   if test -n "$ac_ct_CXX"; then
2543   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2544 else
2545   ac_save_IFS=$IFS; IFS=$ac_path_separator
2546 ac_dummy="$PATH"
2547 for ac_dir in $ac_dummy; do
2548   IFS=$ac_save_IFS
2549   test -z "$ac_dir" && ac_dir=.
2550   $as_executable_p "$ac_dir/$ac_word" || continue
2551 ac_cv_prog_ac_ct_CXX="$ac_prog"
2552 echo "$as_me:2552: found $ac_dir/$ac_word" >&5
2553 break
2554 done
2555
2556 fi
2557 fi
2558 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2559 if test -n "$ac_ct_CXX"; then
2560   echo "$as_me:2560: result: $ac_ct_CXX" >&5
2561 echo "${ECHO_T}$ac_ct_CXX" >&6
2562 else
2563   echo "$as_me:2563: result: no" >&5
2564 echo "${ECHO_T}no" >&6
2565 fi
2566
2567   test -n "$ac_ct_CXX" && break
2568 done
2569 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2570
2571   CXX=$ac_ct_CXX
2572 fi
2573
2574 # Provide some information about the compiler.
2575 echo "$as_me:2575:" \
2576      "checking for C++ compiler version" >&5
2577 ac_compiler=`set X $ac_compile; echo $2`
2578 { (eval echo "$as_me:2578: \"$ac_compiler --version </dev/null >&5\"") >&5
2579   (eval $ac_compiler --version </dev/null >&5) 2>&5
2580   ac_status=$?
2581   echo "$as_me:2581: \$? = $ac_status" >&5
2582   (exit $ac_status); }
2583 { (eval echo "$as_me:2583: \"$ac_compiler -v </dev/null >&5\"") >&5
2584   (eval $ac_compiler -v </dev/null >&5) 2>&5
2585   ac_status=$?
2586   echo "$as_me:2586: \$? = $ac_status" >&5
2587   (exit $ac_status); }
2588 { (eval echo "$as_me:2588: \"$ac_compiler -V </dev/null >&5\"") >&5
2589   (eval $ac_compiler -V </dev/null >&5) 2>&5
2590   ac_status=$?
2591   echo "$as_me:2591: \$? = $ac_status" >&5
2592   (exit $ac_status); }
2593
2594 echo "$as_me:2594: checking whether we are using the GNU C++ compiler" >&5
2595 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2596 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2597   echo $ECHO_N "(cached) $ECHO_C" >&6
2598 else
2599   cat >conftest.$ac_ext <<_ACEOF
2600 #line 2600 "configure"
2601 #include "confdefs.h"
2602
2603 int
2604 main ()
2605 {
2606 #ifndef __GNUC__
2607        choke me
2608 #endif
2609
2610   ;
2611   return 0;
2612 }
2613 _ACEOF
2614 rm -f conftest.$ac_objext
2615 if { (eval echo "$as_me:2615: \"$ac_compile\"") >&5
2616   (eval $ac_compile) 2>&5
2617   ac_status=$?
2618   echo "$as_me:2618: \$? = $ac_status" >&5
2619   (exit $ac_status); } &&
2620          { ac_try='test -s conftest.$ac_objext'
2621   { (eval echo "$as_me:2621: \"$ac_try\"") >&5
2622   (eval $ac_try) 2>&5
2623   ac_status=$?
2624   echo "$as_me:2624: \$? = $ac_status" >&5
2625   (exit $ac_status); }; }; then
2626   ac_compiler_gnu=yes
2627 else
2628   echo "$as_me: failed program was:" >&5
2629 cat conftest.$ac_ext >&5
2630 ac_compiler_gnu=no
2631 fi
2632 rm -f conftest.$ac_objext conftest.$ac_ext
2633 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2634
2635 fi
2636 echo "$as_me:2636: result: $ac_cv_cxx_compiler_gnu" >&5
2637 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2638 GXX=`test $ac_compiler_gnu = yes && echo yes`
2639 ac_test_CXXFLAGS=${CXXFLAGS+set}
2640 ac_save_CXXFLAGS=$CXXFLAGS
2641 CXXFLAGS="-g"
2642 echo "$as_me:2642: checking whether $CXX accepts -g" >&5
2643 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2644 if test "${ac_cv_prog_cxx_g+set}" = set; then
2645   echo $ECHO_N "(cached) $ECHO_C" >&6
2646 else
2647   cat >conftest.$ac_ext <<_ACEOF
2648 #line 2648 "configure"
2649 #include "confdefs.h"
2650
2651 int
2652 main ()
2653 {
2654
2655   ;
2656   return 0;
2657 }
2658 _ACEOF
2659 rm -f conftest.$ac_objext
2660 if { (eval echo "$as_me:2660: \"$ac_compile\"") >&5
2661   (eval $ac_compile) 2>&5
2662   ac_status=$?
2663   echo "$as_me:2663: \$? = $ac_status" >&5
2664   (exit $ac_status); } &&
2665          { ac_try='test -s conftest.$ac_objext'
2666   { (eval echo "$as_me:2666: \"$ac_try\"") >&5
2667   (eval $ac_try) 2>&5
2668   ac_status=$?
2669   echo "$as_me:2669: \$? = $ac_status" >&5
2670   (exit $ac_status); }; }; then
2671   ac_cv_prog_cxx_g=yes
2672 else
2673   echo "$as_me: failed program was:" >&5
2674 cat conftest.$ac_ext >&5
2675 ac_cv_prog_cxx_g=no
2676 fi
2677 rm -f conftest.$ac_objext conftest.$ac_ext
2678 fi
2679 echo "$as_me:2679: result: $ac_cv_prog_cxx_g" >&5
2680 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2681 if test "$ac_test_CXXFLAGS" = set; then
2682   CXXFLAGS=$ac_save_CXXFLAGS
2683 elif test $ac_cv_prog_cxx_g = yes; then
2684   if test "$GXX" = yes; then
2685     CXXFLAGS="-g -O2"
2686   else
2687     CXXFLAGS="-g"
2688   fi
2689 else
2690   if test "$GXX" = yes; then
2691     CXXFLAGS="-O2"
2692   else
2693     CXXFLAGS=
2694   fi
2695 fi
2696 for ac_declaration in \
2697    ''\
2698    '#include <stdlib.h>' \
2699    'extern "C" void std::exit (int) throw (); using std::exit;' \
2700    'extern "C" void std::exit (int); using std::exit;' \
2701    'extern "C" void exit (int) throw ();' \
2702    'extern "C" void exit (int);' \
2703    'void exit (int);'
2704 do
2705   cat >conftest.$ac_ext <<_ACEOF
2706 #line 2706 "configure"
2707 #include "confdefs.h"
2708 #include <stdlib.h>
2709 $ac_declaration
2710 int
2711 main ()
2712 {
2713 exit (42);
2714   ;
2715   return 0;
2716 }
2717 _ACEOF
2718 rm -f conftest.$ac_objext
2719 if { (eval echo "$as_me:2719: \"$ac_compile\"") >&5
2720   (eval $ac_compile) 2>&5
2721   ac_status=$?
2722   echo "$as_me:2722: \$? = $ac_status" >&5
2723   (exit $ac_status); } &&
2724          { ac_try='test -s conftest.$ac_objext'
2725   { (eval echo "$as_me:2725: \"$ac_try\"") >&5
2726   (eval $ac_try) 2>&5
2727   ac_status=$?
2728   echo "$as_me:2728: \$? = $ac_status" >&5
2729   (exit $ac_status); }; }; then
2730   :
2731 else
2732   echo "$as_me: failed program was:" >&5
2733 cat conftest.$ac_ext >&5
2734 continue
2735 fi
2736 rm -f conftest.$ac_objext conftest.$ac_ext
2737   cat >conftest.$ac_ext <<_ACEOF
2738 #line 2738 "configure"
2739 #include "confdefs.h"
2740 $ac_declaration
2741 int
2742 main ()
2743 {
2744 exit (42);
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   break
2762 else
2763   echo "$as_me: failed program was:" >&5
2764 cat conftest.$ac_ext >&5
2765 fi
2766 rm -f conftest.$ac_objext conftest.$ac_ext
2767 done
2768 rm -rf conftest*
2769 if test -n "$ac_declaration"; then
2770   echo '#ifdef __cplusplus' >>confdefs.h
2771   echo $ac_declaration      >>confdefs.h
2772   echo '#endif'             >>confdefs.h
2773 fi
2774
2775 ac_ext=c
2776 ac_cpp='$CPP $CPPFLAGS'
2777 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2778 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2779 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2780 ac_main_return=return
2781
2782                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2783         if test "$CXX" = "g++" ; then
2784                 # Extract the first word of "g++", so it can be a program name with args.
2785 set dummy g++; ac_word=$2
2786 echo "$as_me:2786: checking for $ac_word" >&5
2787 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2788 if test "${ac_cv_path_CXX+set}" = set; then
2789   echo $ECHO_N "(cached) $ECHO_C" >&6
2790 else
2791   case $CXX in
2792   [\\/]* | ?:[\\/]*)
2793   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2794   ;;
2795   *)
2796   ac_save_IFS=$IFS; IFS=$ac_path_separator
2797 ac_dummy="$PATH"
2798 for ac_dir in $ac_dummy; do
2799   IFS=$ac_save_IFS
2800   test -z "$ac_dir" && ac_dir=.
2801   if $as_executable_p "$ac_dir/$ac_word"; then
2802    ac_cv_path_CXX="$ac_dir/$ac_word"
2803    echo "$as_me:2803: found $ac_dir/$ac_word" >&5
2804    break
2805 fi
2806 done
2807
2808   ;;
2809 esac
2810 fi
2811 CXX=$ac_cv_path_CXX
2812
2813 if test -n "$CXX"; then
2814   echo "$as_me:2814: result: $CXX" >&5
2815 echo "${ECHO_T}$CXX" >&6
2816 else
2817   echo "$as_me:2817: result: no" >&5
2818 echo "${ECHO_T}no" >&6
2819 fi
2820
2821         fi
2822         case "x$CXX" in #(vi
2823         x|xg++)
2824                 { echo "$as_me:2824: WARNING: You don't have any C++ compiler, too bad" >&5
2825 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2826                 cf_with_cxx=no; CXX=""; GXX="";
2827                 ;;
2828         esac
2829 fi
2830
2831 GXX_VERSION=none
2832 if test "$GXX" = yes; then
2833         echo "$as_me:2833: checking version of ${CXX:-g++}" >&5
2834 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2835         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2836         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2837         echo "$as_me:2837: result: $GXX_VERSION" >&5
2838 echo "${ECHO_T}$GXX_VERSION" >&6
2839 fi
2840
2841 case $GXX_VERSION in
2842 1*|2.[0-6]*)
2843         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2844         # cf_cxx_library=no
2845         { echo "$as_me:2845: WARNING: templates do not work" >&5
2846 echo "$as_me: WARNING: templates do not work" >&2;}
2847         ;;
2848 esac
2849
2850 echo "$as_me:2850: checking if you want to build C++ binding and demo" >&5
2851 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2852
2853 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2854 if test "${with_cxx_binding+set}" = set; then
2855   withval="$with_cxx_binding"
2856   cf_with_cxx_binding=$withval
2857 else
2858   cf_with_cxx_binding=$cf_with_cxx
2859 fi;
2860 echo "$as_me:2860: result: $cf_with_cxx_binding" >&5
2861 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2862
2863 echo "$as_me:2863: checking if you want to build with Ada95" >&5
2864 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2865 echo "$as_me:2865: result: $cf_with_ada" >&5
2866 echo "${ECHO_T}$cf_with_ada" >&6
2867
2868 echo "$as_me:2868: checking if you want to install manpages" >&5
2869 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2870
2871 # Check whether --with-manpages or --without-manpages was given.
2872 if test "${with_manpages+set}" = set; then
2873   withval="$with_manpages"
2874   cf_with_manpages=$withval
2875 else
2876   cf_with_manpages=yes
2877 fi;
2878 echo "$as_me:2878: result: $cf_with_manpages" >&5
2879 echo "${ECHO_T}$cf_with_manpages" >&6
2880
2881 echo "$as_me:2881: checking if you want to build programs such as tic" >&5
2882 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2883
2884 # Check whether --with-progs or --without-progs was given.
2885 if test "${with_progs+set}" = set; then
2886   withval="$with_progs"
2887   cf_with_progs=$withval
2888 else
2889   cf_with_progs=yes
2890 fi;
2891 echo "$as_me:2891: result: $cf_with_progs" >&5
2892 echo "${ECHO_T}$cf_with_progs" >&6
2893
2894 echo "$as_me:2894: checking if you want to build test-programs" >&5
2895 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2896
2897 # Check whether --with-tests or --without-tests was given.
2898 if test "${with_tests+set}" = set; then
2899   withval="$with_tests"
2900   cf_with_tests=$withval
2901 else
2902   cf_with_tests=yes
2903 fi;
2904 echo "$as_me:2904: result: $cf_with_tests" >&5
2905 echo "${ECHO_T}$cf_with_tests" >&6
2906
2907 echo "$as_me:2907: checking if you wish to install curses.h" >&5
2908 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2909
2910 # Check whether --with-curses-h or --without-curses-h was given.
2911 if test "${with_curses_h+set}" = set; then
2912   withval="$with_curses_h"
2913   with_curses_h=$withval
2914 else
2915   with_curses_h=yes
2916 fi;
2917 echo "$as_me:2917: result: $with_curses_h" >&5
2918 echo "${ECHO_T}$with_curses_h" >&6
2919
2920 modules_to_build="ncurses"
2921 if test "X$cf_with_progs" != Xno ; then
2922 modules_to_build="$modules_to_build progs tack"
2923 fi
2924 modules_to_build="$modules_to_build panel menu form"
2925
2926 test "$program_prefix" != NONE &&
2927   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2928 # Use a double $ so make ignores it.
2929 test "$program_suffix" != NONE &&
2930   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2931 # Double any \ or $.  echo might interpret backslashes.
2932 # By default was `s,x,x', remove it if useless.
2933 cat <<\_ACEOF >conftest.sed
2934 s/[\\$]/&&/g;s/;s,x,x,$//
2935 _ACEOF
2936 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2937 rm conftest.sed
2938
2939 for ac_prog in mawk gawk nawk awk
2940 do
2941   # Extract the first word of "$ac_prog", so it can be a program name with args.
2942 set dummy $ac_prog; ac_word=$2
2943 echo "$as_me:2943: checking for $ac_word" >&5
2944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2945 if test "${ac_cv_prog_AWK+set}" = set; then
2946   echo $ECHO_N "(cached) $ECHO_C" >&6
2947 else
2948   if test -n "$AWK"; then
2949   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2950 else
2951   ac_save_IFS=$IFS; IFS=$ac_path_separator
2952 ac_dummy="$PATH"
2953 for ac_dir in $ac_dummy; do
2954   IFS=$ac_save_IFS
2955   test -z "$ac_dir" && ac_dir=.
2956   $as_executable_p "$ac_dir/$ac_word" || continue
2957 ac_cv_prog_AWK="$ac_prog"
2958 echo "$as_me:2958: found $ac_dir/$ac_word" >&5
2959 break
2960 done
2961
2962 fi
2963 fi
2964 AWK=$ac_cv_prog_AWK
2965 if test -n "$AWK"; then
2966   echo "$as_me:2966: result: $AWK" >&5
2967 echo "${ECHO_T}$AWK" >&6
2968 else
2969   echo "$as_me:2969: result: no" >&5
2970 echo "${ECHO_T}no" >&6
2971 fi
2972
2973   test -n "$AWK" && break
2974 done
2975
2976 test -z "$AWK" && { { echo "$as_me:2976: error: No awk program found" >&5
2977 echo "$as_me: error: No awk program found" >&2;}
2978    { (exit 1); exit 1; }; }
2979
2980 echo "$as_me:2980: checking for egrep" >&5
2981 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2982 if test "${ac_cv_prog_egrep+set}" = set; then
2983   echo $ECHO_N "(cached) $ECHO_C" >&6
2984 else
2985   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2986     then ac_cv_prog_egrep='grep -E'
2987     else ac_cv_prog_egrep='egrep'
2988     fi
2989 fi
2990 echo "$as_me:2990: result: $ac_cv_prog_egrep" >&5
2991 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2992  EGREP=$ac_cv_prog_egrep
2993
2994 test -z "$EGREP" && { { echo "$as_me:2994: error: No egrep program found" >&5
2995 echo "$as_me: error: No egrep program found" >&2;}
2996    { (exit 1); exit 1; }; }
2997
2998 # Find a good install program.  We prefer a C program (faster),
2999 # so one script is as good as another.  But avoid the broken or
3000 # incompatible versions:
3001 # SysV /etc/install, /usr/sbin/install
3002 # SunOS /usr/etc/install
3003 # IRIX /sbin/install
3004 # AIX /bin/install
3005 # AmigaOS /C/install, which installs bootblocks on floppy discs
3006 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3007 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3008 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3009 # ./install, which can be erroneously created by make from ./install.sh.
3010 echo "$as_me:3010: checking for a BSD compatible install" >&5
3011 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3012 if test -z "$INSTALL"; then
3013 if test "${ac_cv_path_install+set}" = set; then
3014   echo $ECHO_N "(cached) $ECHO_C" >&6
3015 else
3016     ac_save_IFS=$IFS; IFS=$ac_path_separator
3017   for ac_dir in $PATH; do
3018     IFS=$ac_save_IFS
3019     # Account for people who put trailing slashes in PATH elements.
3020     case $ac_dir/ in
3021     / | ./ | .// | /cC/* \
3022     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3023     | /usr/ucb/* ) ;;
3024     *)
3025       # OSF1 and SCO ODT 3.0 have their own names for install.
3026       # Don't use installbsd from OSF since it installs stuff as root
3027       # by default.
3028       for ac_prog in ginstall scoinst install; do
3029         if $as_executable_p "$ac_dir/$ac_prog"; then
3030           if test $ac_prog = install &&
3031             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3032             # AIX install.  It has an incompatible calling convention.
3033             :
3034           elif test $ac_prog = install &&
3035             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3036             # program-specific install script used by HP pwplus--don't use.
3037             :
3038           else
3039             ac_cv_path_install="$ac_dir/$ac_prog -c"
3040             break 2
3041           fi
3042         fi
3043       done
3044       ;;
3045     esac
3046   done
3047
3048 fi
3049   if test "${ac_cv_path_install+set}" = set; then
3050     INSTALL=$ac_cv_path_install
3051   else
3052     # As a last resort, use the slow shell script.  We don't cache a
3053     # path for INSTALL within a source directory, because that will
3054     # break other packages using the cache if that directory is
3055     # removed, or if the path is relative.
3056     INSTALL=$ac_install_sh
3057   fi
3058 fi
3059 echo "$as_me:3059: result: $INSTALL" >&5
3060 echo "${ECHO_T}$INSTALL" >&6
3061
3062 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3063 # It thinks the first close brace ends the variable substitution.
3064 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3065
3066 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3067
3068 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3069
3070 case $INSTALL in
3071 /*)
3072   ;;
3073 *)
3074   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3075   test -z "$cf_dir" && cf_dir=.
3076   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3077   ;;
3078 esac
3079
3080 for ac_prog in tdlint lint alint splint lclint
3081 do
3082   # Extract the first word of "$ac_prog", so it can be a program name with args.
3083 set dummy $ac_prog; ac_word=$2
3084 echo "$as_me:3084: checking for $ac_word" >&5
3085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3086 if test "${ac_cv_prog_LINT+set}" = set; then
3087   echo $ECHO_N "(cached) $ECHO_C" >&6
3088 else
3089   if test -n "$LINT"; then
3090   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3091 else
3092   ac_save_IFS=$IFS; IFS=$ac_path_separator
3093 ac_dummy="$PATH"
3094 for ac_dir in $ac_dummy; do
3095   IFS=$ac_save_IFS
3096   test -z "$ac_dir" && ac_dir=.
3097   $as_executable_p "$ac_dir/$ac_word" || continue
3098 ac_cv_prog_LINT="$ac_prog"
3099 echo "$as_me:3099: found $ac_dir/$ac_word" >&5
3100 break
3101 done
3102
3103 fi
3104 fi
3105 LINT=$ac_cv_prog_LINT
3106 if test -n "$LINT"; then
3107   echo "$as_me:3107: result: $LINT" >&5
3108 echo "${ECHO_T}$LINT" >&6
3109 else
3110   echo "$as_me:3110: result: no" >&5
3111 echo "${ECHO_T}no" >&6
3112 fi
3113
3114   test -n "$LINT" && break
3115 done
3116
3117 echo "$as_me:3117: checking whether ln -s works" >&5
3118 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3119 LN_S=$as_ln_s
3120 if test "$LN_S" = "ln -s"; then
3121   echo "$as_me:3121: result: yes" >&5
3122 echo "${ECHO_T}yes" >&6
3123 else
3124   echo "$as_me:3124: result: no, using $LN_S" >&5
3125 echo "${ECHO_T}no, using $LN_S" >&6
3126 fi
3127
3128 echo "$as_me:3128: checking if $LN_S -f options work" >&5
3129 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3130
3131 rm -f conf$$.src conf$$dst
3132 echo >conf$$.dst
3133 echo first >conf$$.src
3134 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3135         cf_prog_ln_sf=yes
3136 else
3137         cf_prog_ln_sf=no
3138 fi
3139 rm -f conf$$.dst conf$$src
3140 echo "$as_me:3140: result: $cf_prog_ln_sf" >&5
3141 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3142
3143 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3144
3145 echo "$as_me:3145: checking for long file names" >&5
3146 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3147 if test "${ac_cv_sys_long_file_names+set}" = set; then
3148   echo $ECHO_N "(cached) $ECHO_C" >&6
3149 else
3150   ac_cv_sys_long_file_names=yes
3151 # Test for long file names in all the places we know might matter:
3152 #      .                the current directory, where building will happen
3153 #      $prefix/lib      where we will be installing things
3154 #      $exec_prefix/lib likewise
3155 # eval it to expand exec_prefix.
3156 #      $TMPDIR          if set, where it might want to write temporary files
3157 # if $TMPDIR is not set:
3158 #      /tmp             where it might want to write temporary files
3159 #      /var/tmp         likewise
3160 #      /usr/tmp         likewise
3161 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3162   ac_tmpdirs=$TMPDIR
3163 else
3164   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3165 fi
3166 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3167   test -d $ac_dir || continue
3168   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3169   ac_xdir=$ac_dir/cf$$
3170   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3171   ac_tf1=$ac_xdir/conftest9012345
3172   ac_tf2=$ac_xdir/conftest9012346
3173   (echo 1 >$ac_tf1) 2>/dev/null
3174   (echo 2 >$ac_tf2) 2>/dev/null
3175   ac_val=`cat $ac_tf1 2>/dev/null`
3176   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3177     ac_cv_sys_long_file_names=no
3178     rm -rf $ac_xdir 2>/dev/null
3179     break
3180   fi
3181   rm -rf $ac_xdir 2>/dev/null
3182 done
3183 fi
3184 echo "$as_me:3184: result: $ac_cv_sys_long_file_names" >&5
3185 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3186 if test $ac_cv_sys_long_file_names = yes; then
3187
3188 cat >>confdefs.h <<\EOF
3189 #define HAVE_LONG_FILE_NAMES 1
3190 EOF
3191
3192 fi
3193
3194 # if we find pkg-config, check if we should install the ".pc" files.
3195
3196 echo "$as_me:3196: checking if you want to use pkg-config" >&5
3197 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3198
3199 # Check whether --with-pkg-config or --without-pkg-config was given.
3200 if test "${with_pkg_config+set}" = set; then
3201   withval="$with_pkg_config"
3202   cf_pkg_config=$withval
3203 else
3204   cf_pkg_config=yes
3205 fi;
3206 echo "$as_me:3206: result: $cf_pkg_config" >&5
3207 echo "${ECHO_T}$cf_pkg_config" >&6
3208
3209 case $cf_pkg_config in #(vi
3210 no) #(vi
3211         PKG_CONFIG=none
3212         ;;
3213 yes) #(vi
3214
3215 if test -n "$ac_tool_prefix"; then
3216   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3217 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3218 echo "$as_me:3218: checking for $ac_word" >&5
3219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3220 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3221   echo $ECHO_N "(cached) $ECHO_C" >&6
3222 else
3223   case $PKG_CONFIG in
3224   [\\/]* | ?:[\\/]*)
3225   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3226   ;;
3227   *)
3228   ac_save_IFS=$IFS; IFS=$ac_path_separator
3229 ac_dummy="$PATH"
3230 for ac_dir in $ac_dummy; do
3231   IFS=$ac_save_IFS
3232   test -z "$ac_dir" && ac_dir=.
3233   if $as_executable_p "$ac_dir/$ac_word"; then
3234    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3235    echo "$as_me:3235: found $ac_dir/$ac_word" >&5
3236    break
3237 fi
3238 done
3239
3240   ;;
3241 esac
3242 fi
3243 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3244
3245 if test -n "$PKG_CONFIG"; then
3246   echo "$as_me:3246: result: $PKG_CONFIG" >&5
3247 echo "${ECHO_T}$PKG_CONFIG" >&6
3248 else
3249   echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3251 fi
3252
3253 fi
3254 if test -z "$ac_cv_path_PKG_CONFIG"; then
3255   ac_pt_PKG_CONFIG=$PKG_CONFIG
3256   # Extract the first word of "pkg-config", so it can be a program name with args.
3257 set dummy pkg-config; ac_word=$2
3258 echo "$as_me:3258: checking for $ac_word" >&5
3259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3260 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3261   echo $ECHO_N "(cached) $ECHO_C" >&6
3262 else
3263   case $ac_pt_PKG_CONFIG in
3264   [\\/]* | ?:[\\/]*)
3265   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3266   ;;
3267   *)
3268   ac_save_IFS=$IFS; IFS=$ac_path_separator
3269 ac_dummy="$PATH"
3270 for ac_dir in $ac_dummy; do
3271   IFS=$ac_save_IFS
3272   test -z "$ac_dir" && ac_dir=.
3273   if $as_executable_p "$ac_dir/$ac_word"; then
3274    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3275    echo "$as_me:3275: found $ac_dir/$ac_word" >&5
3276    break
3277 fi
3278 done
3279
3280   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3281   ;;
3282 esac
3283 fi
3284 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3285
3286 if test -n "$ac_pt_PKG_CONFIG"; then
3287   echo "$as_me:3287: result: $ac_pt_PKG_CONFIG" >&5
3288 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3289 else
3290   echo "$as_me:3290: result: no" >&5
3291 echo "${ECHO_T}no" >&6
3292 fi
3293
3294   PKG_CONFIG=$ac_pt_PKG_CONFIG
3295 else
3296   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3297 fi
3298
3299         ;;
3300 *)
3301         PKG_CONFIG=$withval
3302         ;;
3303 esac
3304
3305 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3306 if test "$PKG_CONFIG" != none ; then
3307
3308 if test "x$prefix" != xNONE; then
3309   cf_path_syntax="$prefix"
3310 else
3311   cf_path_syntax="$ac_default_prefix"
3312 fi
3313
3314 case ".$PKG_CONFIG" in #(vi
3315 .\$\(*\)*|.\'*\'*) #(vi
3316   ;;
3317 ..|./*|.\\*) #(vi
3318   ;;
3319 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3320   ;;
3321 .\${*prefix}*|.\${*dir}*) #(vi
3322   eval PKG_CONFIG="$PKG_CONFIG"
3323   case ".$PKG_CONFIG" in #(vi
3324   .NONE/*)
3325     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3326     ;;
3327   esac
3328   ;; #(vi
3329 .no|.NONE/*)
3330   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3331   ;;
3332 *)
3333   { { echo "$as_me:3333: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3334 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3335    { (exit 1); exit 1; }; }
3336   ;;
3337 esac
3338
3339 fi
3340
3341 if test "$PKG_CONFIG" != none ; then
3342         echo "$as_me:3342: checking for $PKG_CONFIG library directory" >&5
3343 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3344
3345 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3346 if test "${with_pkg_config_libdir+set}" = set; then
3347   withval="$with_pkg_config_libdir"
3348   PKG_CONFIG_LIBDIR=$withval
3349 else
3350   PKG_CONFIG_LIBDIR=yes
3351 fi;
3352
3353         case x$PKG_CONFIG_LIBDIR in #(vi
3354         x/*) #(vi
3355                 ;;
3356         xyes) #(vi
3357                 # look for the library directory using the same prefix as the executable
3358                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3359                 case x`(arch) 2>/dev/null` in #(vi
3360                 *64) #(vi
3361                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3362                         do
3363                                 if test -d $cf_config/pkgconfig
3364                                 then
3365                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3366                                         break
3367                                 fi
3368                         done
3369                         ;;
3370                 *)
3371                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3372                         ;;
3373                 esac
3374                 ;;
3375         *)
3376                 ;;
3377         esac
3378
3379         echo "$as_me:3379: result: $PKG_CONFIG_LIBDIR" >&5
3380 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3381 fi
3382
3383 if test "$PKG_CONFIG" != none ; then
3384         echo "$as_me:3384: checking if we should install .pc files for $PKG_CONFIG" >&5
3385 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3386
3387 # Check whether --enable-pc-files or --disable-pc-files was given.
3388 if test "${enable_pc_files+set}" = set; then
3389   enableval="$enable_pc_files"
3390   enable_pc_files=$enableval
3391 else
3392   enable_pc_files=no
3393 fi;
3394         echo "$as_me:3394: result: $enable_pc_files" >&5
3395 echo "${ECHO_T}$enable_pc_files" >&6
3396         if test "$enable_pc_files" != no
3397         then
3398
3399 if test "x$prefix" != xNONE; then
3400   cf_path_syntax="$prefix"
3401 else
3402   cf_path_syntax="$ac_default_prefix"
3403 fi
3404
3405 case ".$PKG_CONFIG_LIBDIR" in #(vi
3406 .\$\(*\)*|.\'*\'*) #(vi
3407   ;;
3408 ..|./*|.\\*) #(vi
3409   ;;
3410 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3411   ;;
3412 .\${*prefix}*|.\${*dir}*) #(vi
3413   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3414   case ".$PKG_CONFIG_LIBDIR" in #(vi
3415   .NONE/*)
3416     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3417     ;;
3418   esac
3419   ;; #(vi
3420 .no|.NONE/*)
3421   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3422   ;;
3423 *)
3424   { { echo "$as_me:3424: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3425 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3426    { (exit 1); exit 1; }; }
3427   ;;
3428 esac
3429
3430         fi
3431 else
3432         enable_pc_files=no
3433 fi
3434
3435 echo "$as_me:3435: checking if we should assume mixed-case filenames" >&5
3436 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3437
3438 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3439 if test "${enable_mixed_case+set}" = set; then
3440   enableval="$enable_mixed_case"
3441   enable_mixedcase=$enableval
3442 else
3443   enable_mixedcase=auto
3444 fi;
3445 echo "$as_me:3445: result: $enable_mixedcase" >&5
3446 echo "${ECHO_T}$enable_mixedcase" >&6
3447 if test "$enable_mixedcase" = "auto" ; then
3448
3449 echo "$as_me:3449: checking if filesystem supports mixed-case filenames" >&5
3450 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3451 if test "${cf_cv_mixedcase+set}" = set; then
3452   echo $ECHO_N "(cached) $ECHO_C" >&6
3453 else
3454
3455 if test "$cross_compiling" = yes ; then
3456         case $target_alias in #(vi
3457         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3458                 cf_cv_mixedcase=no
3459                 ;;
3460         *)
3461                 cf_cv_mixedcase=yes
3462                 ;;
3463         esac
3464 else
3465         rm -f conftest CONFTEST
3466         echo test >conftest
3467         if test -f CONFTEST ; then
3468                 cf_cv_mixedcase=no
3469         else
3470                 cf_cv_mixedcase=yes
3471         fi
3472         rm -f conftest CONFTEST
3473 fi
3474
3475 fi
3476 echo "$as_me:3476: result: $cf_cv_mixedcase" >&5
3477 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3478 test "$cf_cv_mixedcase" = yes &&
3479 cat >>confdefs.h <<\EOF
3480 #define MIXEDCASE_FILENAMES 1
3481 EOF
3482
3483 else
3484     cf_cv_mixedcase=$enable_mixedcase
3485     if test "x$enable_mixedcase" = "xyes" ; then
3486
3487 cat >>confdefs.h <<\EOF
3488 #define MIXEDCASE_FILENAMES 1
3489 EOF
3490
3491     fi
3492 fi
3493
3494 # do this after mixed-case option (tags/TAGS is not as important as tic).
3495 echo "$as_me:3495: checking whether ${MAKE-make} sets \${MAKE}" >&5
3496 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3497 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3498 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3499   echo $ECHO_N "(cached) $ECHO_C" >&6
3500 else
3501   cat >conftest.make <<\EOF
3502 all:
3503         @echo 'ac_maketemp="${MAKE}"'
3504 EOF
3505 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3506 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3507 if test -n "$ac_maketemp"; then
3508   eval ac_cv_prog_make_${ac_make}_set=yes
3509 else
3510   eval ac_cv_prog_make_${ac_make}_set=no
3511 fi
3512 rm -f conftest.make
3513 fi
3514 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3515   echo "$as_me:3515: result: yes" >&5
3516 echo "${ECHO_T}yes" >&6
3517   SET_MAKE=
3518 else
3519   echo "$as_me:3519: result: no" >&5
3520 echo "${ECHO_T}no" >&6
3521   SET_MAKE="MAKE=${MAKE-make}"
3522 fi
3523
3524 for ac_prog in exctags ctags
3525 do
3526   # Extract the first word of "$ac_prog", so it can be a program name with args.
3527 set dummy $ac_prog; ac_word=$2
3528 echo "$as_me:3528: checking for $ac_word" >&5
3529 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3530 if test "${ac_cv_prog_CTAGS+set}" = set; then
3531   echo $ECHO_N "(cached) $ECHO_C" >&6
3532 else
3533   if test -n "$CTAGS"; then
3534   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3535 else
3536   ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539   IFS=$ac_save_IFS
3540   test -z "$ac_dir" && ac_dir=.
3541   $as_executable_p "$ac_dir/$ac_word" || continue
3542 ac_cv_prog_CTAGS="$ac_prog"
3543 echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3544 break
3545 done
3546
3547 fi
3548 fi
3549 CTAGS=$ac_cv_prog_CTAGS
3550 if test -n "$CTAGS"; then
3551   echo "$as_me:3551: result: $CTAGS" >&5
3552 echo "${ECHO_T}$CTAGS" >&6
3553 else
3554   echo "$as_me:3554: result: no" >&5
3555 echo "${ECHO_T}no" >&6
3556 fi
3557
3558   test -n "$CTAGS" && break
3559 done
3560
3561 for ac_prog in exetags etags
3562 do
3563   # Extract the first word of "$ac_prog", so it can be a program name with args.
3564 set dummy $ac_prog; ac_word=$2
3565 echo "$as_me:3565: checking for $ac_word" >&5
3566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3567 if test "${ac_cv_prog_ETAGS+set}" = set; then
3568   echo $ECHO_N "(cached) $ECHO_C" >&6
3569 else
3570   if test -n "$ETAGS"; then
3571   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3572 else
3573   ac_save_IFS=$IFS; IFS=$ac_path_separator
3574 ac_dummy="$PATH"
3575 for ac_dir in $ac_dummy; do
3576   IFS=$ac_save_IFS
3577   test -z "$ac_dir" && ac_dir=.
3578   $as_executable_p "$ac_dir/$ac_word" || continue
3579 ac_cv_prog_ETAGS="$ac_prog"
3580 echo "$as_me:3580: found $ac_dir/$ac_word" >&5
3581 break
3582 done
3583
3584 fi
3585 fi
3586 ETAGS=$ac_cv_prog_ETAGS
3587 if test -n "$ETAGS"; then
3588   echo "$as_me:3588: result: $ETAGS" >&5
3589 echo "${ECHO_T}$ETAGS" >&6
3590 else
3591   echo "$as_me:3591: result: no" >&5
3592 echo "${ECHO_T}no" >&6
3593 fi
3594
3595   test -n "$ETAGS" && break
3596 done
3597
3598 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3599 set dummy ${CTAGS:-ctags}; ac_word=$2
3600 echo "$as_me:3600: checking for $ac_word" >&5
3601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3602 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3603   echo $ECHO_N "(cached) $ECHO_C" >&6
3604 else
3605   if test -n "$MAKE_LOWER_TAGS"; then
3606   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3607 else
3608   ac_save_IFS=$IFS; IFS=$ac_path_separator
3609 ac_dummy="$PATH"
3610 for ac_dir in $ac_dummy; do
3611   IFS=$ac_save_IFS
3612   test -z "$ac_dir" && ac_dir=.
3613   $as_executable_p "$ac_dir/$ac_word" || continue
3614 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3615 echo "$as_me:3615: found $ac_dir/$ac_word" >&5
3616 break
3617 done
3618
3619   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3620 fi
3621 fi
3622 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3623 if test -n "$MAKE_LOWER_TAGS"; then
3624   echo "$as_me:3624: result: $MAKE_LOWER_TAGS" >&5
3625 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3626 else
3627   echo "$as_me:3627: result: no" >&5
3628 echo "${ECHO_T}no" >&6
3629 fi
3630
3631 if test "$cf_cv_mixedcase" = yes ; then
3632         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3633 set dummy ${ETAGS:-etags}; ac_word=$2
3634 echo "$as_me:3634: checking for $ac_word" >&5
3635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3636 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3637   echo $ECHO_N "(cached) $ECHO_C" >&6
3638 else
3639   if test -n "$MAKE_UPPER_TAGS"; then
3640   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3641 else
3642   ac_save_IFS=$IFS; IFS=$ac_path_separator
3643 ac_dummy="$PATH"
3644 for ac_dir in $ac_dummy; do
3645   IFS=$ac_save_IFS
3646   test -z "$ac_dir" && ac_dir=.
3647   $as_executable_p "$ac_dir/$ac_word" || continue
3648 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3649 echo "$as_me:3649: found $ac_dir/$ac_word" >&5
3650 break
3651 done
3652
3653   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3654 fi
3655 fi
3656 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3657 if test -n "$MAKE_UPPER_TAGS"; then
3658   echo "$as_me:3658: result: $MAKE_UPPER_TAGS" >&5
3659 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3660 else
3661   echo "$as_me:3661: result: no" >&5
3662 echo "${ECHO_T}no" >&6
3663 fi
3664
3665 else
3666         MAKE_UPPER_TAGS=no
3667 fi
3668
3669 if test "$MAKE_UPPER_TAGS" = yes ; then
3670         MAKE_UPPER_TAGS=
3671 else
3672         MAKE_UPPER_TAGS="#"
3673 fi
3674
3675 if test "$MAKE_LOWER_TAGS" = yes ; then
3676         MAKE_LOWER_TAGS=
3677 else
3678         MAKE_LOWER_TAGS="#"
3679 fi
3680
3681 echo "$as_me:3681: checking for makeflags variable" >&5
3682 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3683 if test "${cf_cv_makeflags+set}" = set; then
3684   echo $ECHO_N "(cached) $ECHO_C" >&6
3685 else
3686
3687         cf_cv_makeflags=''
3688         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3689         do
3690                 cat >cf_makeflags.tmp <<CF_EOF
3691 SHELL = /bin/sh
3692 all :
3693         @ echo '.$cf_option'
3694 CF_EOF
3695                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3696                 case "$cf_result" in
3697                 .*k)
3698                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3699                         case "$cf_result" in
3700                         .*CC=*) cf_cv_makeflags=
3701                                 ;;
3702                         *)      cf_cv_makeflags=$cf_option
3703                                 ;;
3704                         esac
3705                         break
3706                         ;;
3707                 .-)     ;;
3708                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3709                         ;;
3710                 esac
3711         done
3712         rm -f cf_makeflags.tmp
3713
3714 fi
3715 echo "$as_me:3715: result: $cf_cv_makeflags" >&5
3716 echo "${ECHO_T}$cf_cv_makeflags" >&6
3717
3718 if test -n "$ac_tool_prefix"; then
3719   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3720 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3721 echo "$as_me:3721: checking for $ac_word" >&5
3722 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3723 if test "${ac_cv_prog_RANLIB+set}" = set; then
3724   echo $ECHO_N "(cached) $ECHO_C" >&6
3725 else
3726   if test -n "$RANLIB"; then
3727   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3728 else
3729   ac_save_IFS=$IFS; IFS=$ac_path_separator
3730 ac_dummy="$PATH"
3731 for ac_dir in $ac_dummy; do
3732   IFS=$ac_save_IFS
3733   test -z "$ac_dir" && ac_dir=.
3734   $as_executable_p "$ac_dir/$ac_word" || continue
3735 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3736 echo "$as_me:3736: found $ac_dir/$ac_word" >&5
3737 break
3738 done
3739
3740 fi
3741 fi
3742 RANLIB=$ac_cv_prog_RANLIB
3743 if test -n "$RANLIB"; then
3744   echo "$as_me:3744: result: $RANLIB" >&5
3745 echo "${ECHO_T}$RANLIB" >&6
3746 else
3747   echo "$as_me:3747: result: no" >&5
3748 echo "${ECHO_T}no" >&6
3749 fi
3750
3751 fi
3752 if test -z "$ac_cv_prog_RANLIB"; then
3753   ac_ct_RANLIB=$RANLIB
3754   # Extract the first word of "ranlib", so it can be a program name with args.
3755 set dummy ranlib; ac_word=$2
3756 echo "$as_me:3756: checking for $ac_word" >&5
3757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3758 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3759   echo $ECHO_N "(cached) $ECHO_C" >&6
3760 else
3761   if test -n "$ac_ct_RANLIB"; then
3762   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3763 else
3764   ac_save_IFS=$IFS; IFS=$ac_path_separator
3765 ac_dummy="$PATH"
3766 for ac_dir in $ac_dummy; do
3767   IFS=$ac_save_IFS
3768   test -z "$ac_dir" && ac_dir=.
3769   $as_executable_p "$ac_dir/$ac_word" || continue
3770 ac_cv_prog_ac_ct_RANLIB="ranlib"
3771 echo "$as_me:3771: found $ac_dir/$ac_word" >&5
3772 break
3773 done
3774
3775   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3776 fi
3777 fi
3778 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3779 if test -n "$ac_ct_RANLIB"; then
3780   echo "$as_me:3780: result: $ac_ct_RANLIB" >&5
3781 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3782 else
3783   echo "$as_me:3783: result: no" >&5
3784 echo "${ECHO_T}no" >&6
3785 fi
3786
3787   RANLIB=$ac_ct_RANLIB
3788 else
3789   RANLIB="$ac_cv_prog_RANLIB"
3790 fi
3791
3792 if test -n "$ac_tool_prefix"; then
3793   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3794 set dummy ${ac_tool_prefix}ld; ac_word=$2
3795 echo "$as_me:3795: checking for $ac_word" >&5
3796 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3797 if test "${ac_cv_prog_LD+set}" = set; then
3798   echo $ECHO_N "(cached) $ECHO_C" >&6
3799 else
3800   if test -n "$LD"; then
3801   ac_cv_prog_LD="$LD" # Let the user override the test.
3802 else
3803   ac_save_IFS=$IFS; IFS=$ac_path_separator
3804 ac_dummy="$PATH"
3805 for ac_dir in $ac_dummy; do
3806   IFS=$ac_save_IFS
3807   test -z "$ac_dir" && ac_dir=.
3808   $as_executable_p "$ac_dir/$ac_word" || continue
3809 ac_cv_prog_LD="${ac_tool_prefix}ld"
3810 echo "$as_me:3810: found $ac_dir/$ac_word" >&5
3811 break
3812 done
3813
3814 fi
3815 fi
3816 LD=$ac_cv_prog_LD
3817 if test -n "$LD"; then
3818   echo "$as_me:3818: result: $LD" >&5
3819 echo "${ECHO_T}$LD" >&6
3820 else
3821   echo "$as_me:3821: result: no" >&5
3822 echo "${ECHO_T}no" >&6
3823 fi
3824
3825 fi
3826 if test -z "$ac_cv_prog_LD"; then
3827   ac_ct_LD=$LD
3828   # Extract the first word of "ld", so it can be a program name with args.
3829 set dummy ld; ac_word=$2
3830 echo "$as_me:3830: checking for $ac_word" >&5
3831 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3832 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3833   echo $ECHO_N "(cached) $ECHO_C" >&6
3834 else
3835   if test -n "$ac_ct_LD"; then
3836   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3837 else
3838   ac_save_IFS=$IFS; IFS=$ac_path_separator
3839 ac_dummy="$PATH"
3840 for ac_dir in $ac_dummy; do
3841   IFS=$ac_save_IFS
3842   test -z "$ac_dir" && ac_dir=.
3843   $as_executable_p "$ac_dir/$ac_word" || continue
3844 ac_cv_prog_ac_ct_LD="ld"
3845 echo "$as_me:3845: found $ac_dir/$ac_word" >&5
3846 break
3847 done
3848
3849   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3850 fi
3851 fi
3852 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3853 if test -n "$ac_ct_LD"; then
3854   echo "$as_me:3854: result: $ac_ct_LD" >&5
3855 echo "${ECHO_T}$ac_ct_LD" >&6
3856 else
3857   echo "$as_me:3857: result: no" >&5
3858 echo "${ECHO_T}no" >&6
3859 fi
3860
3861   LD=$ac_ct_LD
3862 else
3863   LD="$ac_cv_prog_LD"
3864 fi
3865
3866 if test -n "$ac_tool_prefix"; then
3867   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3868 set dummy ${ac_tool_prefix}ar; ac_word=$2
3869 echo "$as_me:3869: checking for $ac_word" >&5
3870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3871 if test "${ac_cv_prog_AR+set}" = set; then
3872   echo $ECHO_N "(cached) $ECHO_C" >&6
3873 else
3874   if test -n "$AR"; then
3875   ac_cv_prog_AR="$AR" # Let the user override the test.
3876 else
3877   ac_save_IFS=$IFS; IFS=$ac_path_separator
3878 ac_dummy="$PATH"
3879 for ac_dir in $ac_dummy; do
3880   IFS=$ac_save_IFS
3881   test -z "$ac_dir" && ac_dir=.
3882   $as_executable_p "$ac_dir/$ac_word" || continue
3883 ac_cv_prog_AR="${ac_tool_prefix}ar"
3884 echo "$as_me:3884: found $ac_dir/$ac_word" >&5
3885 break
3886 done
3887
3888 fi
3889 fi
3890 AR=$ac_cv_prog_AR
3891 if test -n "$AR"; then
3892   echo "$as_me:3892: result: $AR" >&5
3893 echo "${ECHO_T}$AR" >&6
3894 else
3895   echo "$as_me:3895: result: no" >&5
3896 echo "${ECHO_T}no" >&6
3897 fi
3898
3899 fi
3900 if test -z "$ac_cv_prog_AR"; then
3901   ac_ct_AR=$AR
3902   # Extract the first word of "ar", so it can be a program name with args.
3903 set dummy ar; ac_word=$2
3904 echo "$as_me:3904: checking for $ac_word" >&5
3905 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3906 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3907   echo $ECHO_N "(cached) $ECHO_C" >&6
3908 else
3909   if test -n "$ac_ct_AR"; then
3910   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3911 else
3912   ac_save_IFS=$IFS; IFS=$ac_path_separator
3913 ac_dummy="$PATH"
3914 for ac_dir in $ac_dummy; do
3915   IFS=$ac_save_IFS
3916   test -z "$ac_dir" && ac_dir=.
3917   $as_executable_p "$ac_dir/$ac_word" || continue
3918 ac_cv_prog_ac_ct_AR="ar"
3919 echo "$as_me:3919: found $ac_dir/$ac_word" >&5
3920 break
3921 done
3922
3923   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3924 fi
3925 fi
3926 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3927 if test -n "$ac_ct_AR"; then
3928   echo "$as_me:3928: result: $ac_ct_AR" >&5
3929 echo "${ECHO_T}$ac_ct_AR" >&6
3930 else
3931   echo "$as_me:3931: result: no" >&5
3932 echo "${ECHO_T}no" >&6
3933 fi
3934
3935   AR=$ac_ct_AR
3936 else
3937   AR="$ac_cv_prog_AR"
3938 fi
3939
3940 if test -n "$ac_tool_prefix"; then
3941   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
3942 set dummy ${ac_tool_prefix}nm; ac_word=$2
3943 echo "$as_me:3943: checking for $ac_word" >&5
3944 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3945 if test "${ac_cv_prog_NM+set}" = set; then
3946   echo $ECHO_N "(cached) $ECHO_C" >&6
3947 else
3948   if test -n "$NM"; then
3949   ac_cv_prog_NM="$NM" # Let the user override the test.
3950 else
3951   ac_save_IFS=$IFS; IFS=$ac_path_separator
3952 ac_dummy="$PATH"
3953 for ac_dir in $ac_dummy; do
3954   IFS=$ac_save_IFS
3955   test -z "$ac_dir" && ac_dir=.
3956   $as_executable_p "$ac_dir/$ac_word" || continue
3957 ac_cv_prog_NM="${ac_tool_prefix}nm"
3958 echo "$as_me:3958: found $ac_dir/$ac_word" >&5
3959 break
3960 done
3961
3962 fi
3963 fi
3964 NM=$ac_cv_prog_NM
3965 if test -n "$NM"; then
3966   echo "$as_me:3966: result: $NM" >&5
3967 echo "${ECHO_T}$NM" >&6
3968 else
3969   echo "$as_me:3969: result: no" >&5
3970 echo "${ECHO_T}no" >&6
3971 fi
3972
3973 fi
3974 if test -z "$ac_cv_prog_NM"; then
3975   ac_ct_NM=$NM
3976   # Extract the first word of "nm", so it can be a program name with args.
3977 set dummy nm; ac_word=$2
3978 echo "$as_me:3978: checking for $ac_word" >&5
3979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3980 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
3981   echo $ECHO_N "(cached) $ECHO_C" >&6
3982 else
3983   if test -n "$ac_ct_NM"; then
3984   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
3985 else
3986   ac_save_IFS=$IFS; IFS=$ac_path_separator
3987 ac_dummy="$PATH"
3988 for ac_dir in $ac_dummy; do
3989   IFS=$ac_save_IFS
3990   test -z "$ac_dir" && ac_dir=.
3991   $as_executable_p "$ac_dir/$ac_word" || continue
3992 ac_cv_prog_ac_ct_NM="nm"
3993 echo "$as_me:3993: found $ac_dir/$ac_word" >&5
3994 break
3995 done
3996
3997   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
3998 fi
3999 fi
4000 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4001 if test -n "$ac_ct_NM"; then
4002   echo "$as_me:4002: result: $ac_ct_NM" >&5
4003 echo "${ECHO_T}$ac_ct_NM" >&6
4004 else
4005   echo "$as_me:4005: result: no" >&5
4006 echo "${ECHO_T}no" >&6
4007 fi
4008
4009   NM=$ac_ct_NM
4010 else
4011   NM="$ac_cv_prog_NM"
4012 fi
4013
4014 if test -n "$ac_tool_prefix"; then
4015   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4016 set dummy ${ac_tool_prefix}ar; ac_word=$2
4017 echo "$as_me:4017: checking for $ac_word" >&5
4018 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4019 if test "${ac_cv_prog_AR+set}" = set; then
4020   echo $ECHO_N "(cached) $ECHO_C" >&6
4021 else
4022   if test -n "$AR"; then
4023   ac_cv_prog_AR="$AR" # Let the user override the test.
4024 else
4025   ac_save_IFS=$IFS; IFS=$ac_path_separator
4026 ac_dummy="$PATH"
4027 for ac_dir in $ac_dummy; do
4028   IFS=$ac_save_IFS
4029   test -z "$ac_dir" && ac_dir=.
4030   $as_executable_p "$ac_dir/$ac_word" || continue
4031 ac_cv_prog_AR="${ac_tool_prefix}ar"
4032 echo "$as_me:4032: found $ac_dir/$ac_word" >&5
4033 break
4034 done
4035
4036 fi
4037 fi
4038 AR=$ac_cv_prog_AR
4039 if test -n "$AR"; then
4040   echo "$as_me:4040: result: $AR" >&5
4041 echo "${ECHO_T}$AR" >&6
4042 else
4043   echo "$as_me:4043: result: no" >&5
4044 echo "${ECHO_T}no" >&6
4045 fi
4046
4047 fi
4048 if test -z "$ac_cv_prog_AR"; then
4049   ac_ct_AR=$AR
4050   # Extract the first word of "ar", so it can be a program name with args.
4051 set dummy ar; ac_word=$2
4052 echo "$as_me:4052: checking for $ac_word" >&5
4053 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4054 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4055   echo $ECHO_N "(cached) $ECHO_C" >&6
4056 else
4057   if test -n "$ac_ct_AR"; then
4058   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4059 else
4060   ac_save_IFS=$IFS; IFS=$ac_path_separator
4061 ac_dummy="$PATH"
4062 for ac_dir in $ac_dummy; do
4063   IFS=$ac_save_IFS
4064   test -z "$ac_dir" && ac_dir=.
4065   $as_executable_p "$ac_dir/$ac_word" || continue
4066 ac_cv_prog_ac_ct_AR="ar"
4067 echo "$as_me:4067: found $ac_dir/$ac_word" >&5
4068 break
4069 done
4070
4071   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4072 fi
4073 fi
4074 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4075 if test -n "$ac_ct_AR"; then
4076   echo "$as_me:4076: result: $ac_ct_AR" >&5
4077 echo "${ECHO_T}$ac_ct_AR" >&6
4078 else
4079   echo "$as_me:4079: result: no" >&5
4080 echo "${ECHO_T}no" >&6
4081 fi
4082
4083   AR=$ac_ct_AR
4084 else
4085   AR="$ac_cv_prog_AR"
4086 fi
4087
4088 echo "$as_me:4088: checking for options to update archives" >&5
4089 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4090 if test "${cf_cv_ar_flags+set}" = set; then
4091   echo $ECHO_N "(cached) $ECHO_C" >&6
4092 else
4093
4094         cf_cv_ar_flags=unknown
4095         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4096         do
4097
4098                 # check if $ARFLAGS already contains this choice
4099                 if test "x$ARFLAGS" != "x" ; then
4100                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4101                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4102                                 cf_cv_ar_flags=
4103                                 break
4104                         fi
4105                 fi
4106
4107                 rm -f conftest.$ac_cv_objext
4108                 rm -f conftest.a
4109
4110                 cat >conftest.$ac_ext <<EOF
4111 #line 4111 "configure"
4112 int     testdata[3] = { 123, 456, 789 };
4113 EOF
4114                 if { (eval echo "$as_me:4114: \"$ac_compile\"") >&5
4115   (eval $ac_compile) 2>&5
4116   ac_status=$?
4117   echo "$as_me:4117: \$? = $ac_status" >&5
4118   (exit $ac_status); } ; then
4119                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4120                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4121                         if test -f conftest.a ; then
4122                                 cf_cv_ar_flags=$cf_ar_flags
4123                                 break
4124                         fi
4125                 else
4126                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4127
4128 echo "${as_me:-configure}:4128: testing cannot compile test-program ..." 1>&5
4129
4130                         break
4131                 fi
4132         done
4133         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4134
4135 fi
4136 echo "$as_me:4136: result: $cf_cv_ar_flags" >&5
4137 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4138
4139 if test -n "$ARFLAGS" ; then
4140         if test -n "$cf_cv_ar_flags" ; then
4141                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4142         fi
4143 else
4144         ARFLAGS=$cf_cv_ar_flags
4145 fi
4146
4147 echo "$as_me:4147: checking if you have specified an install-prefix" >&5
4148 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4149
4150 # Check whether --with-install-prefix or --without-install-prefix was given.
4151 if test "${with_install_prefix+set}" = set; then
4152   withval="$with_install_prefix"
4153   case "x$withval" in #(vi
4154         xyes|xno) #(vi
4155                 ;;
4156         *)      DESTDIR="$withval"
4157                 ;;
4158         esac
4159 fi;
4160 echo "$as_me:4160: result: $DESTDIR" >&5
4161 echo "${ECHO_T}$DESTDIR" >&6
4162
4163 ###############################################################################
4164
4165 # If we're cross-compiling, allow the user to override the tools and their
4166 # options.  The configure script is oriented toward identifying the host
4167 # compiler, etc., but we need a build compiler to generate parts of the source.
4168
4169 if test "$cross_compiling" = yes ; then
4170
4171         # defaults that we might want to override
4172         : ${BUILD_CFLAGS:=''}
4173         : ${BUILD_CPPFLAGS:=''}
4174         : ${BUILD_LDFLAGS:=''}
4175         : ${BUILD_LIBS:=''}
4176         : ${BUILD_EXEEXT:='$x'}
4177         : ${BUILD_OBJEXT:='o'}
4178
4179 # Check whether --with-build-cc or --without-build-cc was given.
4180 if test "${with_build_cc+set}" = set; then
4181   withval="$with_build_cc"
4182   BUILD_CC="$withval"
4183 else
4184   for ac_prog in gcc cc cl
4185 do
4186   # Extract the first word of "$ac_prog", so it can be a program name with args.
4187 set dummy $ac_prog; ac_word=$2
4188 echo "$as_me:4188: checking for $ac_word" >&5
4189 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4190 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4191   echo $ECHO_N "(cached) $ECHO_C" >&6
4192 else
4193   if test -n "$BUILD_CC"; then
4194   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4195 else
4196   ac_save_IFS=$IFS; IFS=$ac_path_separator
4197 ac_dummy="$PATH"
4198 for ac_dir in $ac_dummy; do
4199   IFS=$ac_save_IFS
4200   test -z "$ac_dir" && ac_dir=.
4201   $as_executable_p "$ac_dir/$ac_word" || continue
4202 ac_cv_prog_BUILD_CC="$ac_prog"
4203 echo "$as_me:4203: found $ac_dir/$ac_word" >&5
4204 break
4205 done
4206
4207 fi
4208 fi
4209 BUILD_CC=$ac_cv_prog_BUILD_CC
4210 if test -n "$BUILD_CC"; then
4211   echo "$as_me:4211: result: $BUILD_CC" >&5
4212 echo "${ECHO_T}$BUILD_CC" >&6
4213 else
4214   echo "$as_me:4214: result: no" >&5
4215 echo "${ECHO_T}no" >&6
4216 fi
4217
4218   test -n "$BUILD_CC" && break
4219 done
4220
4221 fi;
4222         echo "$as_me:4222: checking for native build C compiler" >&5
4223 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4224         echo "$as_me:4224: result: $BUILD_CC" >&5
4225 echo "${ECHO_T}$BUILD_CC" >&6
4226
4227         echo "$as_me:4227: checking for native build C preprocessor" >&5
4228 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4229
4230 # Check whether --with-build-cpp or --without-build-cpp was given.
4231 if test "${with_build_cpp+set}" = set; then
4232   withval="$with_build_cpp"
4233   BUILD_CPP="$withval"
4234 else
4235   BUILD_CPP='${BUILD_CC} -E'
4236 fi;
4237         echo "$as_me:4237: result: $BUILD_CPP" >&5
4238 echo "${ECHO_T}$BUILD_CPP" >&6
4239
4240         echo "$as_me:4240: checking for native build C flags" >&5
4241 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4242
4243 # Check whether --with-build-cflags or --without-build-cflags was given.
4244 if test "${with_build_cflags+set}" = set; then
4245   withval="$with_build_cflags"
4246   BUILD_CFLAGS="$withval"
4247 fi;
4248         echo "$as_me:4248: result: $BUILD_CFLAGS" >&5
4249 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4250
4251         echo "$as_me:4251: checking for native build C preprocessor-flags" >&5
4252 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4253
4254 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4255 if test "${with_build_cppflags+set}" = set; then
4256   withval="$with_build_cppflags"
4257   BUILD_CPPFLAGS="$withval"
4258 fi;
4259         echo "$as_me:4259: result: $BUILD_CPPFLAGS" >&5
4260 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4261
4262         echo "$as_me:4262: checking for native build linker-flags" >&5
4263 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4264
4265 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4266 if test "${with_build_ldflags+set}" = set; then
4267   withval="$with_build_ldflags"
4268   BUILD_LDFLAGS="$withval"
4269 fi;
4270         echo "$as_me:4270: result: $BUILD_LDFLAGS" >&5
4271 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4272
4273         echo "$as_me:4273: checking for native build linker-libraries" >&5
4274 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4275
4276 # Check whether --with-build-libs or --without-build-libs was given.
4277 if test "${with_build_libs+set}" = set; then
4278   withval="$with_build_libs"
4279   BUILD_LIBS="$withval"
4280 fi;
4281         echo "$as_me:4281: result: $BUILD_LIBS" >&5
4282 echo "${ECHO_T}$BUILD_LIBS" >&6
4283
4284         # this assumes we're on Unix.
4285         BUILD_EXEEXT=
4286         BUILD_OBJEXT=o
4287
4288         : ${BUILD_CC:='${CC}'}
4289
4290         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4291                 { { echo "$as_me:4291: error: Cross-build requires two compilers.
4292 Use --with-build-cc to specify the native compiler." >&5
4293 echo "$as_me: error: Cross-build requires two compilers.
4294 Use --with-build-cc to specify the native compiler." >&2;}
4295    { (exit 1); exit 1; }; }
4296         fi
4297
4298 else
4299         : ${BUILD_CC:='${CC}'}
4300         : ${BUILD_CPP:='${CPP}'}
4301         : ${BUILD_CFLAGS:='${CFLAGS}'}
4302         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4303         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4304         : ${BUILD_LIBS:='${LIBS}'}
4305         : ${BUILD_EXEEXT:='$x'}
4306         : ${BUILD_OBJEXT:='o'}
4307 fi
4308
4309 ###############################################################################
4310
4311 ### Options to allow the user to specify the set of libraries which are used.
4312 ### Use "--without-normal --with-shared" to allow the default model to be
4313 ### shared, for example.
4314 cf_list_models=""
4315
4316 echo "$as_me:4316: checking if libtool -version-number should be used" >&5
4317 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4318
4319 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4320 if test "${enable_libtool_version+set}" = set; then
4321   enableval="$enable_libtool_version"
4322   test "$enableval" != no && enableval=yes
4323   if test "$enableval" != "yes" ; then
4324     cf_libtool_version=no
4325   else
4326     cf_libtool_version=yes
4327   fi
4328 else
4329   enableval=yes
4330   cf_libtool_version=yes
4331
4332 fi;
4333 echo "$as_me:4333: result: $cf_libtool_version" >&5
4334 echo "${ECHO_T}$cf_libtool_version" >&6
4335
4336 if test "$cf_libtool_version" = yes ; then
4337         LIBTOOL_VERSION="-version-number"
4338 else
4339         LIBTOOL_VERSION="-version-info"
4340 fi
4341
4342 LIBTOOL=
4343
4344 # common library maintenance symbols that are convenient for libtool scripts:
4345 LIB_CREATE='${AR} -cr'
4346 LIB_OBJECT='${OBJECTS}'
4347 LIB_SUFFIX=.a
4348 LIB_PREP="$RANLIB"
4349
4350 # symbols used to prop libtool up to enable it to determine what it should be
4351 # doing:
4352 LIB_CLEAN=
4353 LIB_COMPILE=
4354 LIB_LINK='${CC}'
4355 LIB_INSTALL=
4356 LIB_UNINSTALL=
4357
4358 echo "$as_me:4358: checking if you want to build libraries with libtool" >&5
4359 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4360
4361 # Check whether --with-libtool or --without-libtool was given.
4362 if test "${with_libtool+set}" = set; then
4363   withval="$with_libtool"
4364   with_libtool=$withval
4365 else
4366   with_libtool=no
4367 fi;
4368 echo "$as_me:4368: result: $with_libtool" >&5
4369 echo "${ECHO_T}$with_libtool" >&6
4370 if test "$with_libtool" != "no"; then
4371
4372         if test "$with_libtool" != "yes" ; then
4373
4374 if test "x$prefix" != xNONE; then
4375   cf_path_syntax="$prefix"
4376 else
4377   cf_path_syntax="$ac_default_prefix"
4378 fi
4379
4380 case ".$with_libtool" in #(vi
4381 .\$\(*\)*|.\'*\'*) #(vi
4382   ;;
4383 ..|./*|.\\*) #(vi
4384   ;;
4385 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4386   ;;
4387 .\${*prefix}*|.\${*dir}*) #(vi
4388   eval with_libtool="$with_libtool"
4389   case ".$with_libtool" in #(vi
4390   .NONE/*)
4391     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4392     ;;
4393   esac
4394   ;; #(vi
4395 .no|.NONE/*)
4396   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4397   ;;
4398 *)
4399   { { echo "$as_me:4399: error: expected a pathname, not \"$with_libtool\"" >&5
4400 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4401    { (exit 1); exit 1; }; }
4402   ;;
4403 esac
4404
4405                 LIBTOOL=$with_libtool
4406         else
4407                 if test -n "$ac_tool_prefix"; then
4408   for ac_prog in libtool glibtool
4409   do
4410     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4411 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4412 echo "$as_me:4412: checking for $ac_word" >&5
4413 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4414 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4415   echo $ECHO_N "(cached) $ECHO_C" >&6
4416 else
4417   if test -n "$LIBTOOL"; then
4418   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4419 else
4420   ac_save_IFS=$IFS; IFS=$ac_path_separator
4421 ac_dummy="$PATH"
4422 for ac_dir in $ac_dummy; do
4423   IFS=$ac_save_IFS
4424   test -z "$ac_dir" && ac_dir=.
4425   $as_executable_p "$ac_dir/$ac_word" || continue
4426 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4427 echo "$as_me:4427: found $ac_dir/$ac_word" >&5
4428 break
4429 done
4430
4431 fi
4432 fi
4433 LIBTOOL=$ac_cv_prog_LIBTOOL
4434 if test -n "$LIBTOOL"; then
4435   echo "$as_me:4435: result: $LIBTOOL" >&5
4436 echo "${ECHO_T}$LIBTOOL" >&6
4437 else
4438   echo "$as_me:4438: result: no" >&5
4439 echo "${ECHO_T}no" >&6
4440 fi
4441
4442     test -n "$LIBTOOL" && break
4443   done
4444 fi
4445 if test -z "$LIBTOOL"; then
4446   ac_ct_LIBTOOL=$LIBTOOL
4447   for ac_prog in libtool glibtool
4448 do
4449   # Extract the first word of "$ac_prog", so it can be a program name with args.
4450 set dummy $ac_prog; ac_word=$2
4451 echo "$as_me:4451: checking for $ac_word" >&5
4452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4453 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4454   echo $ECHO_N "(cached) $ECHO_C" >&6
4455 else
4456   if test -n "$ac_ct_LIBTOOL"; then
4457   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4458 else
4459   ac_save_IFS=$IFS; IFS=$ac_path_separator
4460 ac_dummy="$PATH"
4461 for ac_dir in $ac_dummy; do
4462   IFS=$ac_save_IFS
4463   test -z "$ac_dir" && ac_dir=.
4464   $as_executable_p "$ac_dir/$ac_word" || continue
4465 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4466 echo "$as_me:4466: found $ac_dir/$ac_word" >&5
4467 break
4468 done
4469
4470 fi
4471 fi
4472 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4473 if test -n "$ac_ct_LIBTOOL"; then
4474   echo "$as_me:4474: result: $ac_ct_LIBTOOL" >&5
4475 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4476 else
4477   echo "$as_me:4477: result: no" >&5
4478 echo "${ECHO_T}no" >&6
4479 fi
4480
4481   test -n "$ac_ct_LIBTOOL" && break
4482 done
4483 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4484
4485   LIBTOOL=$ac_ct_LIBTOOL
4486 fi
4487
4488 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4489 then
4490         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.].*//'`
4491 else
4492         cf_cv_libtool_version=
4493 fi
4494 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4495
4496                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4497                 then
4498
4499 unset ac_cv_prog_ac_ct_LIBTOOL
4500 unset ac_ct_LIBTOOL
4501 unset LIBTOOL
4502
4503                         if test -n "$ac_tool_prefix"; then
4504   for ac_prog in glibtool
4505   do
4506     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4507 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4508 echo "$as_me:4508: checking for $ac_word" >&5
4509 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4510 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4511   echo $ECHO_N "(cached) $ECHO_C" >&6
4512 else
4513   if test -n "$LIBTOOL"; then
4514   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4515 else
4516   ac_save_IFS=$IFS; IFS=$ac_path_separator
4517 ac_dummy="$PATH"
4518 for ac_dir in $ac_dummy; do
4519   IFS=$ac_save_IFS
4520   test -z "$ac_dir" && ac_dir=.
4521   $as_executable_p "$ac_dir/$ac_word" || continue
4522 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4523 echo "$as_me:4523: found $ac_dir/$ac_word" >&5
4524 break
4525 done
4526
4527 fi
4528 fi
4529 LIBTOOL=$ac_cv_prog_LIBTOOL
4530 if test -n "$LIBTOOL"; then
4531   echo "$as_me:4531: result: $LIBTOOL" >&5
4532 echo "${ECHO_T}$LIBTOOL" >&6
4533 else
4534   echo "$as_me:4534: result: no" >&5
4535 echo "${ECHO_T}no" >&6
4536 fi
4537
4538     test -n "$LIBTOOL" && break
4539   done
4540 fi
4541 if test -z "$LIBTOOL"; then
4542   ac_ct_LIBTOOL=$LIBTOOL
4543   for ac_prog in glibtool
4544 do
4545   # Extract the first word of "$ac_prog", so it can be a program name with args.
4546 set dummy $ac_prog; ac_word=$2
4547 echo "$as_me:4547: checking for $ac_word" >&5
4548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4549 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4550   echo $ECHO_N "(cached) $ECHO_C" >&6
4551 else
4552   if test -n "$ac_ct_LIBTOOL"; then
4553   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4554 else
4555   ac_save_IFS=$IFS; IFS=$ac_path_separator
4556 ac_dummy="$PATH"
4557 for ac_dir in $ac_dummy; do
4558   IFS=$ac_save_IFS
4559   test -z "$ac_dir" && ac_dir=.
4560   $as_executable_p "$ac_dir/$ac_word" || continue
4561 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4562 echo "$as_me:4562: found $ac_dir/$ac_word" >&5
4563 break
4564 done
4565
4566 fi
4567 fi
4568 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4569 if test -n "$ac_ct_LIBTOOL"; then
4570   echo "$as_me:4570: result: $ac_ct_LIBTOOL" >&5
4571 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4572 else
4573   echo "$as_me:4573: result: no" >&5
4574 echo "${ECHO_T}no" >&6
4575 fi
4576
4577   test -n "$ac_ct_LIBTOOL" && break
4578 done
4579 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4580
4581   LIBTOOL=$ac_ct_LIBTOOL
4582 fi
4583
4584 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4585 then
4586         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.].*//'`
4587 else
4588         cf_cv_libtool_version=
4589 fi
4590 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4591
4592                 fi
4593         fi
4594         if test -z "$LIBTOOL" ; then
4595                 { { echo "$as_me:4595: error: Cannot find libtool" >&5
4596 echo "$as_me: error: Cannot find libtool" >&2;}
4597    { (exit 1); exit 1; }; }
4598         fi
4599         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4600         LIB_OBJECT='${OBJECTS:.o=.lo}'
4601         LIB_SUFFIX=.la
4602         LIB_CLEAN='${LIBTOOL} --mode=clean'
4603         LIB_COMPILE='${LIBTOOL} --mode=compile'
4604         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4605         LIB_INSTALL='${LIBTOOL} --mode=install'
4606         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4607         LIB_PREP=:
4608
4609 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4610 then
4611         echo "$as_me:4611: checking version of $LIBTOOL" >&5
4612 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4613
4614 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4615 then
4616         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.].*//'`
4617 else
4618         cf_cv_libtool_version=
4619 fi
4620 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4621
4622         echo "$as_me:4622: result: $cf_cv_libtool_version" >&5
4623 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4624         if test -z "$cf_cv_libtool_version" ; then
4625                 { { echo "$as_me:4625: error: This is not GNU libtool" >&5
4626 echo "$as_me: error: This is not GNU libtool" >&2;}
4627    { (exit 1); exit 1; }; }
4628         fi
4629 else
4630         { { echo "$as_me:4630: error: GNU libtool has not been found" >&5
4631 echo "$as_me: error: GNU libtool has not been found" >&2;}
4632    { (exit 1); exit 1; }; }
4633 fi
4634
4635         # special hack to add -no-undefined (which libtool should do for itself)
4636         LT_UNDEF=
4637         case "$cf_cv_system_name" in #(vi
4638         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4639                 LT_UNDEF=-no-undefined
4640                 ;;
4641         esac
4642
4643         # special hack to add --tag option for C++ compiler
4644         case $cf_cv_libtool_version in #(vi
4645         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4646                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4647                 LIBTOOL="$LIBTOOL --tag=CC"
4648                 ;;
4649         *)
4650                 LIBTOOL_CXX="$LIBTOOL"
4651                 ;;
4652         esac
4653 else
4654         LIBTOOL=""
4655         LIBTOOL_CXX=""
4656 fi
4657
4658 test -z "$LIBTOOL" && ECHO_LT=
4659
4660 if test "$with_libtool" != "no" ; then
4661
4662 cf_list_models="$cf_list_models libtool"
4663
4664 else
4665
4666 echo "$as_me:4666: checking if you want to build shared libraries" >&5
4667 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4668
4669 # Check whether --with-shared or --without-shared was given.
4670 if test "${with_shared+set}" = set; then
4671   withval="$with_shared"
4672   with_shared=$withval
4673 else
4674   with_shared=no
4675 fi;
4676 echo "$as_me:4676: result: $with_shared" >&5
4677 echo "${ECHO_T}$with_shared" >&6
4678 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4679
4680 echo "$as_me:4680: checking if you want to build static libraries" >&5
4681 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4682
4683 # Check whether --with-normal or --without-normal was given.
4684 if test "${with_normal+set}" = set; then
4685   withval="$with_normal"
4686   with_normal=$withval
4687 else
4688   with_normal=yes
4689 fi;
4690 echo "$as_me:4690: result: $with_normal" >&5
4691 echo "${ECHO_T}$with_normal" >&6
4692 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4693
4694 echo "$as_me:4694: checking if you want to build debug libraries" >&5
4695 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4696
4697 # Check whether --with-debug or --without-debug was given.
4698 if test "${with_debug+set}" = set; then
4699   withval="$with_debug"
4700   with_debug=$withval
4701 else
4702   with_debug=yes
4703 fi;
4704 echo "$as_me:4704: result: $with_debug" >&5
4705 echo "${ECHO_T}$with_debug" >&6
4706 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4707
4708 echo "$as_me:4708: checking if you want to build profiling libraries" >&5
4709 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4710
4711 # Check whether --with-profile or --without-profile was given.
4712 if test "${with_profile+set}" = set; then
4713   withval="$with_profile"
4714   with_profile=$withval
4715 else
4716   with_profile=no
4717 fi;
4718 echo "$as_me:4718: result: $with_profile" >&5
4719 echo "${ECHO_T}$with_profile" >&6
4720 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4721
4722 fi
4723
4724 if test "X$cf_with_cxx_binding" != Xno; then
4725 if test "x$with_shared" = "xyes"; then
4726 echo "$as_me:4726: checking if you want to build C++ shared libraries" >&5
4727 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4728
4729 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4730 if test "${with_cxx_shared+set}" = set; then
4731   withval="$with_cxx_shared"
4732   with_shared_cxx=$withval
4733 else
4734   with_shared_cxx=no
4735 fi;
4736 echo "$as_me:4736: result: $with_shared_cxx" >&5
4737 echo "${ECHO_T}$with_shared_cxx" >&6
4738 fi
4739 fi
4740
4741 ###############################################################################
4742
4743 echo "$as_me:4743: checking for specified models" >&5
4744 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4745 test -z "$cf_list_models" && cf_list_models=normal
4746 test "$with_libtool" != "no" && cf_list_models=libtool
4747 echo "$as_me:4747: result: $cf_list_models" >&5
4748 echo "${ECHO_T}$cf_list_models" >&6
4749
4750 ### Use the first model as the default, and save its suffix for use in building
4751 ### up test-applications.
4752 echo "$as_me:4752: checking for default model" >&5
4753 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4754 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4755 echo "$as_me:4755: result: $DFT_LWR_MODEL" >&5
4756 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4757
4758 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4759
4760 TICS_NAME=tic
4761
4762 TINFO_NAME=tinfo
4763
4764 LIB_NAME=ncurses
4765
4766 LIB_DIR=../lib
4767 LIB_2ND=../../lib
4768
4769 echo "$as_me:4769: checking if you want to have a library-prefix" >&5
4770 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4771
4772 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4773 if test "${with_lib_prefix+set}" = set; then
4774   withval="$with_lib_prefix"
4775   with_lib_prefix=$withval
4776 else
4777   with_lib_prefix=auto
4778 fi;
4779 echo "$as_me:4779: result: $with_lib_prefix" >&5
4780 echo "${ECHO_T}$with_lib_prefix" >&6
4781
4782 if test $with_lib_prefix = auto
4783 then
4784
4785         case $cf_cv_system_name in #(vi
4786         OS/2*|os2*) #(vi
4787         LIB_PREFIX=''
4788         ;;
4789         *)      LIB_PREFIX='lib'
4790         ;;
4791         esac
4792 cf_prefix=$LIB_PREFIX
4793
4794 elif test $with_lib_prefix = no
4795 then
4796         LIB_PREFIX=
4797 else
4798         LIB_PREFIX=$with_lib_prefix
4799 fi
4800
4801 LIB_SUFFIX=
4802
4803         echo "$as_me:4803: checking for PATH separator" >&5
4804 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4805         case $cf_cv_system_name in
4806         os2*)   PATH_SEPARATOR=';'  ;;
4807         *)      ${PATH_SEPARATOR:=':'}  ;;
4808         esac
4809
4810         echo "$as_me:4810: result: $PATH_SEPARATOR" >&5
4811 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4812
4813 ###############################################################################
4814
4815 echo "$as_me:4815: checking if you want to build a separate terminfo library" >&5
4816 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4817
4818 # Check whether --with-termlib or --without-termlib was given.
4819 if test "${with_termlib+set}" = set; then
4820   withval="$with_termlib"
4821   with_termlib=$withval
4822 else
4823   with_termlib=no
4824 fi;
4825 echo "$as_me:4825: result: $with_termlib" >&5
4826 echo "${ECHO_T}$with_termlib" >&6
4827
4828 echo "$as_me:4828: checking if you want to build a separate tic library" >&5
4829 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4830
4831 # Check whether --with-ticlib or --without-ticlib was given.
4832 if test "${with_ticlib+set}" = set; then
4833   withval="$with_ticlib"
4834   with_ticlib=$withval
4835 else
4836   with_ticlib=no
4837 fi;
4838 echo "$as_me:4838: result: $with_ticlib" >&5
4839 echo "${ECHO_T}$with_ticlib" >&6
4840
4841 ### Checks for special libraries, must be done up-front.
4842 SHLIB_LIST=""
4843
4844 echo "$as_me:4844: checking if you want to link with the GPM mouse library" >&5
4845 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4846
4847 # Check whether --with-gpm or --without-gpm was given.
4848 if test "${with_gpm+set}" = set; then
4849   withval="$with_gpm"
4850   with_gpm=$withval
4851 else
4852   with_gpm=maybe
4853 fi;
4854 echo "$as_me:4854: result: $with_gpm" >&5
4855 echo "${ECHO_T}$with_gpm" >&6
4856
4857 if test "$with_gpm" != no ; then
4858         echo "$as_me:4858: checking for gpm.h" >&5
4859 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4860 if test "${ac_cv_header_gpm_h+set}" = set; then
4861   echo $ECHO_N "(cached) $ECHO_C" >&6
4862 else
4863   cat >conftest.$ac_ext <<_ACEOF
4864 #line 4864 "configure"
4865 #include "confdefs.h"
4866 #include <gpm.h>
4867 _ACEOF
4868 if { (eval echo "$as_me:4868: \"$ac_cpp conftest.$ac_ext\"") >&5
4869   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4870   ac_status=$?
4871   egrep -v '^ *\+' conftest.er1 >conftest.err
4872   rm -f conftest.er1
4873   cat conftest.err >&5
4874   echo "$as_me:4874: \$? = $ac_status" >&5
4875   (exit $ac_status); } >/dev/null; then
4876   if test -s conftest.err; then
4877     ac_cpp_err=$ac_c_preproc_warn_flag
4878   else
4879     ac_cpp_err=
4880   fi
4881 else
4882   ac_cpp_err=yes
4883 fi
4884 if test -z "$ac_cpp_err"; then
4885   ac_cv_header_gpm_h=yes
4886 else
4887   echo "$as_me: failed program was:" >&5
4888   cat conftest.$ac_ext >&5
4889   ac_cv_header_gpm_h=no
4890 fi
4891 rm -f conftest.err conftest.$ac_ext
4892 fi
4893 echo "$as_me:4893: result: $ac_cv_header_gpm_h" >&5
4894 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4895 if test $ac_cv_header_gpm_h = yes; then
4896
4897 cat >>confdefs.h <<\EOF
4898 #define HAVE_GPM_H 1
4899 EOF
4900
4901                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4902                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4903
4904 echo "${as_me:-configure}:4904: testing assuming we really have GPM library ..." 1>&5
4905
4906 cat >>confdefs.h <<\EOF
4907 #define HAVE_LIBGPM 1
4908 EOF
4909
4910                 else
4911                         echo "$as_me:4911: checking for Gpm_Open in -lgpm" >&5
4912 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4913 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4914   echo $ECHO_N "(cached) $ECHO_C" >&6
4915 else
4916   ac_check_lib_save_LIBS=$LIBS
4917 LIBS="-lgpm  $LIBS"
4918 cat >conftest.$ac_ext <<_ACEOF
4919 #line 4919 "configure"
4920 #include "confdefs.h"
4921
4922 /* Override any gcc2 internal prototype to avoid an error.  */
4923 #ifdef __cplusplus
4924 extern "C"
4925 #endif
4926 /* We use char because int might match the return type of a gcc2
4927    builtin and then its argument prototype would still apply.  */
4928 char Gpm_Open ();
4929 int
4930 main ()
4931 {
4932 Gpm_Open ();
4933   ;
4934   return 0;
4935 }
4936 _ACEOF
4937 rm -f conftest.$ac_objext conftest$ac_exeext
4938 if { (eval echo "$as_me:4938: \"$ac_link\"") >&5
4939   (eval $ac_link) 2>&5
4940   ac_status=$?
4941   echo "$as_me:4941: \$? = $ac_status" >&5
4942   (exit $ac_status); } &&
4943          { ac_try='test -s conftest$ac_exeext'
4944   { (eval echo "$as_me:4944: \"$ac_try\"") >&5
4945   (eval $ac_try) 2>&5
4946   ac_status=$?
4947   echo "$as_me:4947: \$? = $ac_status" >&5
4948   (exit $ac_status); }; }; then
4949   ac_cv_lib_gpm_Gpm_Open=yes
4950 else
4951   echo "$as_me: failed program was:" >&5
4952 cat conftest.$ac_ext >&5
4953 ac_cv_lib_gpm_Gpm_Open=no
4954 fi
4955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4956 LIBS=$ac_check_lib_save_LIBS
4957 fi
4958 echo "$as_me:4958: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4959 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4960 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4961   :
4962 else
4963
4964                                 { { echo "$as_me:4964: error: Cannot link with GPM library" >&5
4965 echo "$as_me: error: Cannot link with GPM library" >&2;}
4966    { (exit 1); exit 1; }; }
4967                 fi
4968                 with_gpm=yes
4969
4970 fi
4971
4972 else
4973
4974                 test "$with_gpm" != maybe && { echo "$as_me:4974: WARNING: Cannot find GPM header" >&5
4975 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4976                 with_gpm=no
4977
4978 fi
4979
4980 fi
4981
4982 if test "$with_gpm" != no ; then
4983         echo "$as_me:4983: checking if you want to load GPM dynamically" >&5
4984 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4985
4986 # Check whether --with-dlsym or --without-dlsym was given.
4987 if test "${with_dlsym+set}" = set; then
4988   withval="$with_dlsym"
4989   with_dlsym=$withval
4990 else
4991   with_dlsym=yes
4992 fi;
4993         echo "$as_me:4993: result: $with_dlsym" >&5
4994 echo "${ECHO_T}$with_dlsym" >&6
4995         if test "x$with_dlsym" = xyes ; then
4996
4997 cf_have_dlsym=no
4998 echo "$as_me:4998: checking for dlsym" >&5
4999 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5000 if test "${ac_cv_func_dlsym+set}" = set; then
5001   echo $ECHO_N "(cached) $ECHO_C" >&6
5002 else
5003   cat >conftest.$ac_ext <<_ACEOF
5004 #line 5004 "configure"
5005 #include "confdefs.h"
5006 /* System header to define __stub macros and hopefully few prototypes,
5007     which can conflict with char dlsym (); below.  */
5008 #include <assert.h>
5009 /* Override any gcc2 internal prototype to avoid an error.  */
5010 #ifdef __cplusplus
5011 extern "C"
5012 #endif
5013 /* We use char because int might match the return type of a gcc2
5014    builtin and then its argument prototype would still apply.  */
5015 char dlsym ();
5016 char (*f) ();
5017
5018 int
5019 main ()
5020 {
5021 /* The GNU C library defines this for functions which it implements
5022     to always fail with ENOSYS.  Some functions are actually named
5023     something starting with __ and the normal name is an alias.  */
5024 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5025 choke me
5026 #else
5027 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5028 #endif
5029
5030   ;
5031   return 0;
5032 }
5033 _ACEOF
5034 rm -f conftest.$ac_objext conftest$ac_exeext
5035 if { (eval echo "$as_me:5035: \"$ac_link\"") >&5
5036   (eval $ac_link) 2>&5
5037   ac_status=$?
5038   echo "$as_me:5038: \$? = $ac_status" >&5
5039   (exit $ac_status); } &&
5040          { ac_try='test -s conftest$ac_exeext'
5041   { (eval echo "$as_me:5041: \"$ac_try\"") >&5
5042   (eval $ac_try) 2>&5
5043   ac_status=$?
5044   echo "$as_me:5044: \$? = $ac_status" >&5
5045   (exit $ac_status); }; }; then
5046   ac_cv_func_dlsym=yes
5047 else
5048   echo "$as_me: failed program was:" >&5
5049 cat conftest.$ac_ext >&5
5050 ac_cv_func_dlsym=no
5051 fi
5052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5053 fi
5054 echo "$as_me:5054: result: $ac_cv_func_dlsym" >&5
5055 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5056 if test $ac_cv_func_dlsym = yes; then
5057   cf_have_dlsym=yes
5058 else
5059
5060 cf_have_libdl=no
5061 echo "$as_me:5061: checking for dlsym in -ldl" >&5
5062 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5063 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5064   echo $ECHO_N "(cached) $ECHO_C" >&6
5065 else
5066   ac_check_lib_save_LIBS=$LIBS
5067 LIBS="-ldl  $LIBS"
5068 cat >conftest.$ac_ext <<_ACEOF
5069 #line 5069 "configure"
5070 #include "confdefs.h"
5071
5072 /* Override any gcc2 internal prototype to avoid an error.  */
5073 #ifdef __cplusplus
5074 extern "C"
5075 #endif
5076 /* We use char because int might match the return type of a gcc2
5077    builtin and then its argument prototype would still apply.  */
5078 char dlsym ();
5079 int
5080 main ()
5081 {
5082 dlsym ();
5083   ;
5084   return 0;
5085 }
5086 _ACEOF
5087 rm -f conftest.$ac_objext conftest$ac_exeext
5088 if { (eval echo "$as_me:5088: \"$ac_link\"") >&5
5089   (eval $ac_link) 2>&5
5090   ac_status=$?
5091   echo "$as_me:5091: \$? = $ac_status" >&5
5092   (exit $ac_status); } &&
5093          { ac_try='test -s conftest$ac_exeext'
5094   { (eval echo "$as_me:5094: \"$ac_try\"") >&5
5095   (eval $ac_try) 2>&5
5096   ac_status=$?
5097   echo "$as_me:5097: \$? = $ac_status" >&5
5098   (exit $ac_status); }; }; then
5099   ac_cv_lib_dl_dlsym=yes
5100 else
5101   echo "$as_me: failed program was:" >&5
5102 cat conftest.$ac_ext >&5
5103 ac_cv_lib_dl_dlsym=no
5104 fi
5105 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5106 LIBS=$ac_check_lib_save_LIBS
5107 fi
5108 echo "$as_me:5108: result: $ac_cv_lib_dl_dlsym" >&5
5109 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5110 if test $ac_cv_lib_dl_dlsym = yes; then
5111
5112         cf_have_dlsym=yes
5113         cf_have_libdl=yes
5114 fi
5115
5116 fi
5117
5118 if test "$cf_have_dlsym" = yes ; then
5119         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5120
5121         echo "$as_me:5121: checking whether able to link to dl*() functions" >&5
5122 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5123         cat >conftest.$ac_ext <<_ACEOF
5124 #line 5124 "configure"
5125 #include "confdefs.h"
5126 #include <dlfcn.h>
5127 int
5128 main ()
5129 {
5130
5131                 void *obj;
5132                 if ((obj = dlopen("filename", 0)) != 0) {
5133                         if (dlsym(obj, "symbolname") == 0) {
5134                         dlclose(obj);
5135                         }
5136                 }
5137   ;
5138   return 0;
5139 }
5140 _ACEOF
5141 rm -f conftest.$ac_objext conftest$ac_exeext
5142 if { (eval echo "$as_me:5142: \"$ac_link\"") >&5
5143   (eval $ac_link) 2>&5
5144   ac_status=$?
5145   echo "$as_me:5145: \$? = $ac_status" >&5
5146   (exit $ac_status); } &&
5147          { ac_try='test -s conftest$ac_exeext'
5148   { (eval echo "$as_me:5148: \"$ac_try\"") >&5
5149   (eval $ac_try) 2>&5
5150   ac_status=$?
5151   echo "$as_me:5151: \$? = $ac_status" >&5
5152   (exit $ac_status); }; }; then
5153
5154 cat >>confdefs.h <<\EOF
5155 #define HAVE_LIBDL 1
5156 EOF
5157
5158 else
5159   echo "$as_me: failed program was:" >&5
5160 cat conftest.$ac_ext >&5
5161
5162                 { { echo "$as_me:5162: error: Cannot link test program for libdl" >&5
5163 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5164    { (exit 1); exit 1; }; }
5165 fi
5166 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5167         echo "$as_me:5167: result: ok" >&5
5168 echo "${ECHO_T}ok" >&6
5169 else
5170         { { echo "$as_me:5170: error: Cannot find dlsym function" >&5
5171 echo "$as_me: error: Cannot find dlsym function" >&2;}
5172    { (exit 1); exit 1; }; }
5173 fi
5174
5175                 if test "x$with_gpm" != xyes ; then
5176                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5177
5178 echo "${as_me:-configure}:5178: testing assuming soname for gpm is $with_gpm ..." 1>&5
5179
5180                         cf_cv_gpm_soname="$with_gpm"
5181                 else
5182
5183 echo "$as_me:5183: checking for soname of gpm library" >&5
5184 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5185 if test "${cf_cv_gpm_soname+set}" = set; then
5186   echo $ECHO_N "(cached) $ECHO_C" >&6
5187 else
5188
5189 cf_cv_gpm_soname=unknown
5190 if test "$cross_compiling" != yes ; then
5191 cat >conftest.$ac_ext <<CF_EOF
5192 #include <gpm.h>
5193 int main()
5194 {
5195 if (Gpm_Open(0,0)) Gpm_Close();
5196         ${cf_cv_main_return:-return}(0);
5197 }
5198 CF_EOF
5199 cf_save_LIBS="$LIBS"
5200         LIBS="-lgpm $LIBS"
5201         if { (eval echo "$as_me:5201: \"$ac_compile\"") >&5
5202   (eval $ac_compile) 2>&5
5203   ac_status=$?
5204   echo "$as_me:5204: \$? = $ac_status" >&5
5205   (exit $ac_status); } ; then
5206                 if { (eval echo "$as_me:5206: \"$ac_link\"") >&5
5207   (eval $ac_link) 2>&5
5208   ac_status=$?
5209   echo "$as_me:5209: \$? = $ac_status" >&5
5210   (exit $ac_status); } ; then
5211                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5212                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5213                 fi
5214         fi
5215 rm -rf conftest*
5216 LIBS="$cf_save_LIBS"
5217 fi
5218
5219 fi
5220 echo "$as_me:5220: result: $cf_cv_gpm_soname" >&5
5221 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5222
5223                 fi
5224                 test "$cf_cv_gpm_soname" != "unknown" &&
5225 cat >>confdefs.h <<EOF
5226 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5227 EOF
5228
5229                 SHLIB_LIST="-ldl $SHLIB_LIST"
5230         else
5231                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5232                 TEST_LIBS="-lgpm $TEST_LIBS"
5233         fi
5234
5235 cat >>confdefs.h <<\EOF
5236 #define HAVE_LIBGPM 1
5237 EOF
5238
5239 echo "$as_me:5239: checking for Gpm_Wgetch in -lgpm" >&5
5240 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5241 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5242   echo $ECHO_N "(cached) $ECHO_C" >&6
5243 else
5244   ac_check_lib_save_LIBS=$LIBS
5245 LIBS="-lgpm  $LIBS"
5246 cat >conftest.$ac_ext <<_ACEOF
5247 #line 5247 "configure"
5248 #include "confdefs.h"
5249
5250 /* Override any gcc2 internal prototype to avoid an error.  */
5251 #ifdef __cplusplus
5252 extern "C"
5253 #endif
5254 /* We use char because int might match the return type of a gcc2
5255    builtin and then its argument prototype would still apply.  */
5256 char Gpm_Wgetch ();
5257 int
5258 main ()
5259 {
5260 Gpm_Wgetch ();
5261   ;
5262   return 0;
5263 }
5264 _ACEOF
5265 rm -f conftest.$ac_objext conftest$ac_exeext
5266 if { (eval echo "$as_me:5266: \"$ac_link\"") >&5
5267   (eval $ac_link) 2>&5
5268   ac_status=$?
5269   echo "$as_me:5269: \$? = $ac_status" >&5
5270   (exit $ac_status); } &&
5271          { ac_try='test -s conftest$ac_exeext'
5272   { (eval echo "$as_me:5272: \"$ac_try\"") >&5
5273   (eval $ac_try) 2>&5
5274   ac_status=$?
5275   echo "$as_me:5275: \$? = $ac_status" >&5
5276   (exit $ac_status); }; }; then
5277   ac_cv_lib_gpm_Gpm_Wgetch=yes
5278 else
5279   echo "$as_me: failed program was:" >&5
5280 cat conftest.$ac_ext >&5
5281 ac_cv_lib_gpm_Gpm_Wgetch=no
5282 fi
5283 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5284 LIBS=$ac_check_lib_save_LIBS
5285 fi
5286 echo "$as_me:5286: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5287 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5288 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5289
5290 echo "$as_me:5290: checking if GPM is weakly bound to curses library" >&5
5291 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5292 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5293   echo $ECHO_N "(cached) $ECHO_C" >&6
5294 else
5295
5296 cf_cv_check_gpm_wgetch=unknown
5297 if test "$cross_compiling" != yes ; then
5298
5299 cat >conftest.$ac_ext <<CF_EOF
5300 #include <gpm.h>
5301 int main()
5302 {
5303         Gpm_Wgetch();
5304         ${cf_cv_main_return:-return}(0);
5305 }
5306 CF_EOF
5307
5308         cf_save_LIBS="$LIBS"
5309         # This only works if we can look at the symbol table.  If a shared
5310         # library is stripped for install, we cannot use that.  So we're forced
5311         # to rely on the static library, noting that some packagers may not
5312         # include it.
5313         LIBS="-static -lgpm -dynamic $LIBS"
5314         if { (eval echo "$as_me:5314: \"$ac_compile\"") >&5
5315   (eval $ac_compile) 2>&5
5316   ac_status=$?
5317   echo "$as_me:5317: \$? = $ac_status" >&5
5318   (exit $ac_status); } ; then
5319                 if { (eval echo "$as_me:5319: \"$ac_link\"") >&5
5320   (eval $ac_link) 2>&5
5321   ac_status=$?
5322   echo "$as_me:5322: \$? = $ac_status" >&5
5323   (exit $ac_status); } ; then
5324                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5325                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5326                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5327                 fi
5328         fi
5329         rm -rf conftest*
5330         LIBS="$cf_save_LIBS"
5331 fi
5332
5333 fi
5334 echo "$as_me:5334: result: $cf_cv_check_gpm_wgetch" >&5
5335 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5336
5337 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5338         { echo "$as_me:5338: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5339 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5340 fi
5341
5342 fi
5343
5344 fi
5345
5346 # not everyone has "test -c"
5347 if test -c /dev/sysmouse 2>/dev/null ; then
5348 echo "$as_me:5348: checking if you want to use sysmouse" >&5
5349 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5350
5351 # Check whether --with-sysmouse or --without-sysmouse was given.
5352 if test "${with_sysmouse+set}" = set; then
5353   withval="$with_sysmouse"
5354   cf_with_sysmouse=$withval
5355 else
5356   cf_with_sysmouse=maybe
5357 fi;
5358         if test "$cf_with_sysmouse" != no ; then
5359         cat >conftest.$ac_ext <<_ACEOF
5360 #line 5360 "configure"
5361 #include "confdefs.h"
5362
5363 #include <osreldate.h>
5364 #if (__FreeBSD_version >= 400017)
5365 #include <sys/consio.h>
5366 #include <sys/fbio.h>
5367 #else
5368 #include <machine/console.h>
5369 #endif
5370
5371 int
5372 main ()
5373 {
5374
5375         struct mouse_info the_mouse;
5376         ioctl(0, CONS_MOUSECTL, &the_mouse);
5377
5378   ;
5379   return 0;
5380 }
5381 _ACEOF
5382 rm -f conftest.$ac_objext
5383 if { (eval echo "$as_me:5383: \"$ac_compile\"") >&5
5384   (eval $ac_compile) 2>&5
5385   ac_status=$?
5386   echo "$as_me:5386: \$? = $ac_status" >&5
5387   (exit $ac_status); } &&
5388          { ac_try='test -s conftest.$ac_objext'
5389   { (eval echo "$as_me:5389: \"$ac_try\"") >&5
5390   (eval $ac_try) 2>&5
5391   ac_status=$?
5392   echo "$as_me:5392: \$? = $ac_status" >&5
5393   (exit $ac_status); }; }; then
5394   cf_with_sysmouse=yes
5395 else
5396   echo "$as_me: failed program was:" >&5
5397 cat conftest.$ac_ext >&5
5398 cf_with_sysmouse=no
5399 fi
5400 rm -f conftest.$ac_objext conftest.$ac_ext
5401         fi
5402 echo "$as_me:5402: result: $cf_with_sysmouse" >&5
5403 echo "${ECHO_T}$cf_with_sysmouse" >&6
5404 test "$cf_with_sysmouse" = yes &&
5405 cat >>confdefs.h <<\EOF
5406 #define USE_SYSMOUSE 1
5407 EOF
5408
5409 fi
5410
5411 if test X"$CC_G_OPT" = X"" ; then
5412         CC_G_OPT='-g'
5413         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5414 fi
5415
5416 if test X"$CXX_G_OPT" = X"" ; then
5417         CXX_G_OPT='-g'
5418         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5419 fi
5420
5421 echo "$as_me:5421: checking for default loader flags" >&5
5422 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5423 case $DFT_LWR_MODEL in
5424 libtool) LD_MODEL=''   ;;
5425 normal)  LD_MODEL=''   ;;
5426 debug)   LD_MODEL=$CC_G_OPT ;;
5427 profile) LD_MODEL='-pg';;
5428 shared)  LD_MODEL=''   ;;
5429 esac
5430 echo "$as_me:5430: result: $LD_MODEL" >&5
5431 echo "${ECHO_T}$LD_MODEL" >&6
5432
5433 case $DFT_LWR_MODEL in
5434 shared)
5435
5436 echo "$as_me:5436: checking if rpath option should be used" >&5
5437 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5438
5439 # Check whether --enable-rpath or --disable-rpath was given.
5440 if test "${enable_rpath+set}" = set; then
5441   enableval="$enable_rpath"
5442   cf_cv_enable_rpath=$enableval
5443 else
5444   cf_cv_enable_rpath=no
5445 fi;
5446 echo "$as_me:5446: result: $cf_cv_enable_rpath" >&5
5447 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5448
5449 echo "$as_me:5449: checking if shared libraries should be relinked during install" >&5
5450 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5451
5452 # Check whether --enable-relink or --disable-relink was given.
5453 if test "${enable_relink+set}" = set; then
5454   enableval="$enable_relink"
5455   cf_cv_do_relink=$enableval
5456 else
5457   cf_cv_do_relink=yes
5458 fi;
5459 echo "$as_me:5459: result: $cf_cv_do_relink" >&5
5460 echo "${ECHO_T}$cf_cv_do_relink" >&6
5461         ;;
5462 esac
5463
5464 LD_RPATH_OPT=
5465 echo "$as_me:5465: checking for an rpath option" >&5
5466 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5467 case $cf_cv_system_name in #(vi
5468 irix*) #(vi
5469         if test "$GCC" = yes; then
5470                 LD_RPATH_OPT="-Wl,-rpath,"
5471         else
5472                 LD_RPATH_OPT="-rpath "
5473         fi
5474         ;;
5475 linux*|gnu*|k*bsd*-gnu) #(vi
5476         LD_RPATH_OPT="-Wl,-rpath,"
5477         ;;
5478 openbsd[2-9].*|mirbsd*) #(vi
5479         LD_RPATH_OPT="-Wl,-rpath,"
5480         ;;
5481 dragonfly*|freebsd*) #(vi
5482         LD_RPATH_OPT="-rpath "
5483         ;;
5484 netbsd*) #(vi
5485         LD_RPATH_OPT="-Wl,-rpath,"
5486         ;;
5487 osf*|mls+*) #(vi
5488         LD_RPATH_OPT="-rpath "
5489         ;;
5490 solaris2*) #(vi
5491         LD_RPATH_OPT="-R"
5492         ;;
5493 *)
5494         ;;
5495 esac
5496 echo "$as_me:5496: result: $LD_RPATH_OPT" >&5
5497 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5498
5499 case "x$LD_RPATH_OPT" in #(vi
5500 x-R*)
5501         echo "$as_me:5501: checking if we need a space after rpath option" >&5
5502 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5503         cf_save_LIBS="$LIBS"
5504         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5505         cat >conftest.$ac_ext <<_ACEOF
5506 #line 5506 "configure"
5507 #include "confdefs.h"
5508
5509 int
5510 main ()
5511 {
5512
5513   ;
5514   return 0;
5515 }
5516 _ACEOF
5517 rm -f conftest.$ac_objext conftest$ac_exeext
5518 if { (eval echo "$as_me:5518: \"$ac_link\"") >&5
5519   (eval $ac_link) 2>&5
5520   ac_status=$?
5521   echo "$as_me:5521: \$? = $ac_status" >&5
5522   (exit $ac_status); } &&
5523          { ac_try='test -s conftest$ac_exeext'
5524   { (eval echo "$as_me:5524: \"$ac_try\"") >&5
5525   (eval $ac_try) 2>&5
5526   ac_status=$?
5527   echo "$as_me:5527: \$? = $ac_status" >&5
5528   (exit $ac_status); }; }; then
5529   cf_rpath_space=no
5530 else
5531   echo "$as_me: failed program was:" >&5
5532 cat conftest.$ac_ext >&5
5533 cf_rpath_space=yes
5534 fi
5535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5536         LIBS="$cf_save_LIBS"
5537         echo "$as_me:5537: result: $cf_rpath_space" >&5
5538 echo "${ECHO_T}$cf_rpath_space" >&6
5539         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5540         ;;
5541 esac
5542
5543         LOCAL_LDFLAGS=
5544         LOCAL_LDFLAGS2=
5545         LD_SHARED_OPTS=
5546         INSTALL_LIB="-m 644"
5547
5548         cf_cv_do_symlinks=no
5549         cf_ld_rpath_opt=
5550         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5551
5552         echo "$as_me:5552: checking if release/abi version should be used for shared libs" >&5
5553 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5554
5555 # Check whether --with-shlib-version or --without-shlib-version was given.
5556 if test "${with_shlib_version+set}" = set; then
5557   withval="$with_shlib_version"
5558   test -z "$withval" && withval=auto
5559         case $withval in #(vi
5560         yes) #(vi
5561                 cf_cv_shlib_version=auto
5562                 ;;
5563         rel|abi|auto|no) #(vi
5564                 cf_cv_shlib_version=$withval
5565                 ;;
5566         *)
5567                 { { echo "$as_me:5567: error: option value must be one of: rel, abi, auto or no" >&5
5568 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5569    { (exit 1); exit 1; }; }
5570                 ;;
5571         esac
5572
5573 else
5574   cf_cv_shlib_version=auto
5575 fi;
5576         echo "$as_me:5576: result: $cf_cv_shlib_version" >&5
5577 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5578
5579         cf_cv_rm_so_locs=no
5580         cf_try_cflags=
5581
5582         # Some less-capable ports of gcc support only -fpic
5583         CC_SHARED_OPTS=
5584         if test "$GCC" = yes
5585         then
5586                 echo "$as_me:5586: checking which $CC option to use" >&5
5587 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5588                 cf_save_CFLAGS="$CFLAGS"
5589                 for CC_SHARED_OPTS in -fPIC -fpic ''
5590                 do
5591                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5592                         cat >conftest.$ac_ext <<_ACEOF
5593 #line 5593 "configure"
5594 #include "confdefs.h"
5595 #include <stdio.h>
5596 int
5597 main ()
5598 {
5599 int x = 1
5600   ;
5601   return 0;
5602 }
5603 _ACEOF
5604 rm -f conftest.$ac_objext
5605 if { (eval echo "$as_me:5605: \"$ac_compile\"") >&5
5606   (eval $ac_compile) 2>&5
5607   ac_status=$?
5608   echo "$as_me:5608: \$? = $ac_status" >&5
5609   (exit $ac_status); } &&
5610          { ac_try='test -s conftest.$ac_objext'
5611   { (eval echo "$as_me:5611: \"$ac_try\"") >&5
5612   (eval $ac_try) 2>&5
5613   ac_status=$?
5614   echo "$as_me:5614: \$? = $ac_status" >&5
5615   (exit $ac_status); }; }; then
5616   break
5617 else
5618   echo "$as_me: failed program was:" >&5
5619 cat conftest.$ac_ext >&5
5620 fi
5621 rm -f conftest.$ac_objext conftest.$ac_ext
5622                 done
5623                 echo "$as_me:5623: result: $CC_SHARED_OPTS" >&5
5624 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5625                 CFLAGS="$cf_save_CFLAGS"
5626         fi
5627
5628         cf_cv_shlib_version_infix=no
5629
5630         case $cf_cv_system_name in #(vi
5631         aix4.3-9*|aix[5-7]*) #(vi
5632                 if test "$GCC" = yes; then
5633                         CC_SHARED_OPTS=
5634                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5635                 else
5636                         # CC_SHARED_OPTS='-qpic=large -G'
5637                         # perhaps "-bM:SRE -bnoentry -bexpall"
5638                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5639                 fi
5640                 ;;
5641         beos*) #(vi
5642                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5643                 ;;
5644         cygwin*) #(vi
5645                 CC_SHARED_OPTS=
5646                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5647                 cf_cv_shlib_version=cygdll
5648                 cf_cv_shlib_version_infix=cygdll
5649                 cat >mk_shared_lib.sh <<-CF_EOF
5650                 #!/bin/sh
5651                 SHARED_LIB=\$1
5652                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5653                 shift
5654                 cat <<-EOF
5655                 Linking shared library
5656                 ** SHARED_LIB \$SHARED_LIB
5657                 ** IMPORT_LIB \$IMPORT_LIB
5658 EOF
5659                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5660 CF_EOF
5661                 chmod +x mk_shared_lib.sh
5662                 ;;
5663         darwin*) #(vi
5664                 cf_try_cflags="no-cpp-precomp"
5665                 CC_SHARED_OPTS="-dynamic"
5666                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5667                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5668                 cf_cv_shlib_version_infix=yes
5669                 echo "$as_me:5669: checking if ld -search_paths_first works" >&5
5670 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5671 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5672   echo $ECHO_N "(cached) $ECHO_C" >&6
5673 else
5674
5675                         cf_save_LDFLAGS=$LDFLAGS
5676                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5677                         cat >conftest.$ac_ext <<_ACEOF
5678 #line 5678 "configure"
5679 #include "confdefs.h"
5680
5681 int
5682 main ()
5683 {
5684 int i;
5685   ;
5686   return 0;
5687 }
5688 _ACEOF
5689 rm -f conftest.$ac_objext conftest$ac_exeext
5690 if { (eval echo "$as_me:5690: \"$ac_link\"") >&5
5691   (eval $ac_link) 2>&5
5692   ac_status=$?
5693   echo "$as_me:5693: \$? = $ac_status" >&5
5694   (exit $ac_status); } &&
5695          { ac_try='test -s conftest$ac_exeext'
5696   { (eval echo "$as_me:5696: \"$ac_try\"") >&5
5697   (eval $ac_try) 2>&5
5698   ac_status=$?
5699   echo "$as_me:5699: \$? = $ac_status" >&5
5700   (exit $ac_status); }; }; then
5701   cf_cv_ldflags_search_paths_first=yes
5702 else
5703   echo "$as_me: failed program was:" >&5
5704 cat conftest.$ac_ext >&5
5705 cf_cv_ldflags_search_paths_first=no
5706 fi
5707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5708                                 LDFLAGS=$cf_save_LDFLAGS
5709 fi
5710 echo "$as_me:5710: result: $cf_cv_ldflags_search_paths_first" >&5
5711 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5712                 if test $cf_cv_ldflags_search_paths_first = yes; then
5713                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5714                 fi
5715                 ;;
5716         hpux[7-8]*) #(vi
5717                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5718                 if test "$GCC" != yes; then
5719                         CC_SHARED_OPTS='+Z'
5720                 fi
5721                 MK_SHARED_LIB='${LD} -b -o $@'
5722                 INSTALL_LIB="-m 555"
5723                 ;;
5724         hpux*) #(vi
5725                 # (tested with gcc 2.7.2 -- I don't have c89)
5726                 if test "$GCC" = yes; then
5727                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5728                 else
5729                         CC_SHARED_OPTS='+Z'
5730                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5731                 fi
5732                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5733                 # HP-UX shared libraries must be executable, and should be
5734                 # readonly to exploit a quirk in the memory manager.
5735                 INSTALL_LIB="-m 555"
5736                 ;;
5737         interix*)
5738                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5739                 if test "$cf_cv_shlib_version" = rel; then
5740                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5741                 else
5742                         cf_shared_soname='`basename `'
5743                 fi
5744                 CC_SHARED_OPTS=
5745                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5746                 ;;
5747         irix*) #(vi
5748                 if test "$cf_cv_enable_rpath" = yes ; then
5749                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5750                 fi
5751                 # tested with IRIX 5.2 and 'cc'.
5752                 if test "$GCC" != yes; then
5753                         CC_SHARED_OPTS='-KPIC'
5754                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5755                 else
5756                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5757                 fi
5758                 cf_cv_rm_so_locs=yes
5759                 ;;
5760         linux*|gnu*|k*bsd*-gnu) #(vi
5761                 if test "$DFT_LWR_MODEL" = "shared" ; then
5762                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5763                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5764                 fi
5765                 if test "$cf_cv_enable_rpath" = yes ; then
5766                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5767                 fi
5768
5769         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5770         if test "$cf_cv_shlib_version" = rel; then
5771                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5772         else
5773                 cf_cv_shared_soname='`basename $@`'
5774         fi
5775
5776                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5777                 ;;
5778         mingw*) #(vi
5779                 cf_cv_shlib_version=mingw
5780                 cf_cv_shlib_version_infix=mingw
5781                 if test "$DFT_LWR_MODEL" = "shared" ; then
5782                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5783                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5784                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5785                 fi
5786                 CC_SHARED_OPTS=
5787                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5788                 cat >mk_shared_lib.sh <<-CF_EOF
5789                 #!/bin/sh
5790                 SHARED_LIB=\$1
5791                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5792                 shift
5793                 cat <<-EOF
5794                 Linking shared library
5795                 ** SHARED_LIB \$SHARED_LIB
5796                 ** IMPORT_LIB \$IMPORT_LIB
5797 EOF
5798                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5799 CF_EOF
5800                 chmod +x mk_shared_lib.sh
5801                 ;;
5802         openbsd[2-9].*|mirbsd*) #(vi
5803                 if test "$DFT_LWR_MODEL" = "shared" ; then
5804                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5805                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5806                 fi
5807                 if test "$cf_cv_enable_rpath" = yes ; then
5808                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5809                 fi
5810                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5811
5812         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5813         if test "$cf_cv_shlib_version" = rel; then
5814                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5815         else
5816                 cf_cv_shared_soname='`basename $@`'
5817         fi
5818
5819                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5820                 ;;
5821         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5822                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5823                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5824                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5825                 ;;
5826         dragonfly*|freebsd*) #(vi
5827                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5828                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5829                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5830                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5831                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5832                 fi
5833
5834         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5835         if test "$cf_cv_shlib_version" = rel; then
5836                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5837         else
5838                 cf_cv_shared_soname='`basename $@`'
5839         fi
5840
5841                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5842                 ;;
5843         netbsd*) #(vi
5844                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5845                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5846                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5847                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5848                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5849                         if test "$cf_cv_shlib_version" = auto; then
5850                         if test -f /usr/libexec/ld.elf_so; then
5851                                 cf_cv_shlib_version=abi
5852                         else
5853                                 cf_cv_shlib_version=rel
5854                         fi
5855                         fi
5856
5857         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5858         if test "$cf_cv_shlib_version" = rel; then
5859                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5860         else
5861                 cf_cv_shared_soname='`basename $@`'
5862         fi
5863
5864                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5865                 else
5866                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5867                 fi
5868                 ;;
5869         osf*|mls+*) #(vi
5870                 # tested with OSF/1 V3.2 and 'cc'
5871                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5872                 # link with shared libs).
5873                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5874                 case $host_os in #(vi
5875                 osf4*)
5876                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5877                         ;;
5878                 esac
5879                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5880                 if test "$DFT_LWR_MODEL" = "shared" ; then
5881                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5882                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5883                 fi
5884                 cf_cv_rm_so_locs=yes
5885                 ;;
5886         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5887                 # tested with osr5.0.5
5888                 if test "$GCC" != yes; then
5889                         CC_SHARED_OPTS='-belf -KPIC'
5890                 fi
5891                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5892                 if test "$cf_cv_enable_rpath" = yes ; then
5893                         # only way is to set LD_RUN_PATH but no switch for it
5894                         RUN_PATH=$libdir
5895                 fi
5896                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5897                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5898                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5899                 ;;
5900         sunos4*) #(vi
5901                 # tested with SunOS 4.1.1 and gcc 2.7.0
5902                 if test "$GCC" != yes; then
5903                         CC_SHARED_OPTS='-KPIC'
5904                 fi
5905                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5906                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5907                 ;;
5908         solaris2*) #(vi
5909                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5910                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5911                 if test "$DFT_LWR_MODEL" = "shared" ; then
5912                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5913                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5914                 fi
5915                 if test "$cf_cv_enable_rpath" = yes ; then
5916                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5917                 fi
5918
5919         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5920         if test "$cf_cv_shlib_version" = rel; then
5921                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5922         else
5923                 cf_cv_shared_soname='`basename $@`'
5924         fi
5925
5926                 if test "$GCC" != yes; then
5927                         cf_save_CFLAGS="$CFLAGS"
5928                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5929                         do
5930                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5931                                 cat >conftest.$ac_ext <<_ACEOF
5932 #line 5932 "configure"
5933 #include "confdefs.h"
5934 #include <stdio.h>
5935 int
5936 main ()
5937 {
5938 printf("Hello\n");
5939   ;
5940   return 0;
5941 }
5942 _ACEOF
5943 rm -f conftest.$ac_objext
5944 if { (eval echo "$as_me:5944: \"$ac_compile\"") >&5
5945   (eval $ac_compile) 2>&5
5946   ac_status=$?
5947   echo "$as_me:5947: \$? = $ac_status" >&5
5948   (exit $ac_status); } &&
5949          { ac_try='test -s conftest.$ac_objext'
5950   { (eval echo "$as_me:5950: \"$ac_try\"") >&5
5951   (eval $ac_try) 2>&5
5952   ac_status=$?
5953   echo "$as_me:5953: \$? = $ac_status" >&5
5954   (exit $ac_status); }; }; then
5955   break
5956 else
5957   echo "$as_me: failed program was:" >&5
5958 cat conftest.$ac_ext >&5
5959 fi
5960 rm -f conftest.$ac_objext conftest.$ac_ext
5961                         done
5962                         CFLAGS="$cf_save_CFLAGS"
5963                         CC_SHARED_OPTS=$cf_shared_opts
5964                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5965                 else
5966                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5967                 fi
5968                 ;;
5969         sysv5uw7*|unix_sv*) #(vi
5970                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5971                 if test "$GCC" != yes; then
5972                         CC_SHARED_OPTS='-KPIC'
5973                 fi
5974                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5975                 ;;
5976         *)
5977                 CC_SHARED_OPTS='unknown'
5978                 MK_SHARED_LIB='echo unknown'
5979                 ;;
5980         esac
5981
5982         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5983         case "$cf_cv_shlib_version" in #(vi
5984         rel|abi)
5985                 case "$MK_SHARED_LIB" in #(vi
5986                 *'-o $@') #(vi
5987                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5988                         ;;
5989                 *)
5990                         { echo "$as_me:5990: WARNING: ignored --with-shlib-version" >&5
5991 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5992                         ;;
5993                 esac
5994                 ;;
5995         esac
5996
5997         if test -n "$cf_try_cflags"
5998         then
5999 cat > conftest.$ac_ext <<EOF
6000 #line 6000 "${as_me:-configure}"
6001 #include <stdio.h>
6002 int main(int argc, char *argv[])
6003 {
6004         printf("hello\n");
6005         return (argv[argc-1] == 0) ;
6006 }
6007 EOF
6008                 cf_save_CFLAGS="$CFLAGS"
6009                 for cf_opt in $cf_try_cflags
6010                 do
6011                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6012                         echo "$as_me:6012: checking if CFLAGS option -$cf_opt works" >&5
6013 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6014                         if { (eval echo "$as_me:6014: \"$ac_compile\"") >&5
6015   (eval $ac_compile) 2>&5
6016   ac_status=$?
6017   echo "$as_me:6017: \$? = $ac_status" >&5
6018   (exit $ac_status); }; then
6019                                 echo "$as_me:6019: result: yes" >&5
6020 echo "${ECHO_T}yes" >&6
6021                                 cf_save_CFLAGS="$CFLAGS"
6022                         else
6023                                 echo "$as_me:6023: result: no" >&5
6024 echo "${ECHO_T}no" >&6
6025                         fi
6026                 done
6027                 CFLAGS="$cf_save_CFLAGS"
6028         fi
6029
6030         # RPATH_LIST is a colon-separated list of directories
6031         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6032         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6033
6034         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6035
6036 echo "${as_me:-configure}:6036: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6037
6038         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6039
6040 echo "${as_me:-configure}:6040: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6041
6042 if test "$CC_SHARED_OPTS" = "unknown"; then
6043         for model in $cf_list_models; do
6044                 if test "$model" = "shared"; then
6045                         { { echo "$as_me:6045: error: Shared libraries are not supported in this version" >&5
6046 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6047    { (exit 1); exit 1; }; }
6048                 fi
6049         done
6050 fi
6051
6052 ### If we're building with rpath, try to link non-standard libs that way too.
6053 if test "$DFT_LWR_MODEL" = "shared"; then
6054
6055 echo "$as_me:6055: checking if rpath-hack should be disabled" >&5
6056 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6057
6058 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6059 if test "${enable_rpath_hack+set}" = set; then
6060   enableval="$enable_rpath_hack"
6061   test "$enableval" != no && enableval=yes
6062   if test "$enableval" != "yes" ; then
6063     cf_disable_rpath_hack=yes
6064   else
6065     cf_disable_rpath_hack=no
6066   fi
6067 else
6068   enableval=yes
6069   cf_disable_rpath_hack=no
6070
6071 fi;
6072 echo "$as_me:6072: result: $cf_disable_rpath_hack" >&5
6073 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6074 if test "$cf_disable_rpath_hack" = no ; then
6075
6076 echo "$as_me:6076: checking for updated LDFLAGS" >&5
6077 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6078 if test -n "$LD_RPATH_OPT" ; then
6079         echo "$as_me:6079: result: maybe" >&5
6080 echo "${ECHO_T}maybe" >&6
6081
6082         for ac_prog in ldd
6083 do
6084   # Extract the first word of "$ac_prog", so it can be a program name with args.
6085 set dummy $ac_prog; ac_word=$2
6086 echo "$as_me:6086: checking for $ac_word" >&5
6087 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6088 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6089   echo $ECHO_N "(cached) $ECHO_C" >&6
6090 else
6091   if test -n "$cf_ldd_prog"; then
6092   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6093 else
6094   ac_save_IFS=$IFS; IFS=$ac_path_separator
6095 ac_dummy="$PATH"
6096 for ac_dir in $ac_dummy; do
6097   IFS=$ac_save_IFS
6098   test -z "$ac_dir" && ac_dir=.
6099   $as_executable_p "$ac_dir/$ac_word" || continue
6100 ac_cv_prog_cf_ldd_prog="$ac_prog"
6101 echo "$as_me:6101: found $ac_dir/$ac_word" >&5
6102 break
6103 done
6104
6105 fi
6106 fi
6107 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6108 if test -n "$cf_ldd_prog"; then
6109   echo "$as_me:6109: result: $cf_ldd_prog" >&5
6110 echo "${ECHO_T}$cf_ldd_prog" >&6
6111 else
6112   echo "$as_me:6112: result: no" >&5
6113 echo "${ECHO_T}no" >&6
6114 fi
6115
6116   test -n "$cf_ldd_prog" && break
6117 done
6118 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6119
6120         cf_rpath_list="/usr/lib /lib"
6121         if test "$cf_ldd_prog" != no
6122         then
6123                 cf_rpath_oops=
6124
6125 cat >conftest.$ac_ext <<_ACEOF
6126 #line 6126 "configure"
6127 #include "confdefs.h"
6128 #include <stdio.h>
6129 int
6130 main ()
6131 {
6132 printf("Hello");
6133   ;
6134   return 0;
6135 }
6136 _ACEOF
6137 rm -f conftest.$ac_objext conftest$ac_exeext
6138 if { (eval echo "$as_me:6138: \"$ac_link\"") >&5
6139   (eval $ac_link) 2>&5
6140   ac_status=$?
6141   echo "$as_me:6141: \$? = $ac_status" >&5
6142   (exit $ac_status); } &&
6143          { ac_try='test -s conftest$ac_exeext'
6144   { (eval echo "$as_me:6144: \"$ac_try\"") >&5
6145   (eval $ac_try) 2>&5
6146   ac_status=$?
6147   echo "$as_me:6147: \$? = $ac_status" >&5
6148   (exit $ac_status); }; }; then
6149   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6150                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6151 else
6152   echo "$as_me: failed program was:" >&5
6153 cat conftest.$ac_ext >&5
6154 fi
6155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6156
6157                 # If we passed the link-test, but get a "not found" on a given library,
6158                 # this could be due to inept reconfiguration of gcc to make it only
6159                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6160                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6161                 # /usr/local libraries.
6162                 if test -n "$cf_rpath_oops"
6163                 then
6164                         for cf_rpath_src in $cf_rpath_oops
6165                         do
6166                                 for cf_rpath_dir in \
6167                                         /usr/local \
6168                                         /usr/pkg \
6169                                         /opt/sfw
6170                                 do
6171                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6172                                         then
6173                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6174
6175 echo "${as_me:-configure}:6175: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6176
6177                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6178                                                 break
6179                                         fi
6180                                 done
6181                         done
6182                 fi
6183         fi
6184
6185         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6186
6187 echo "${as_me:-configure}:6187: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6188
6189 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6190
6191 echo "${as_me:-configure}:6191: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6192
6193 cf_rpath_dst=
6194 for cf_rpath_src in $LDFLAGS
6195 do
6196         case $cf_rpath_src in #(vi
6197         -L*) #(vi
6198
6199                 # check if this refers to a directory which we will ignore
6200                 cf_rpath_skip=no
6201                 if test -n "$cf_rpath_list"
6202                 then
6203                         for cf_rpath_item in $cf_rpath_list
6204                         do
6205                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6206                                 then
6207                                         cf_rpath_skip=yes
6208                                         break
6209                                 fi
6210                         done
6211                 fi
6212
6213                 if test "$cf_rpath_skip" = no
6214                 then
6215                         # transform the option
6216                         if test "$LD_RPATH_OPT" = "-R " ; then
6217                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6218                         else
6219                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6220                         fi
6221
6222                         # if we have not already added this, add it now
6223                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6224                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6225                         then
6226                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6227
6228 echo "${as_me:-configure}:6228: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6229
6230                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6231                         fi
6232                 fi
6233                 ;;
6234         esac
6235         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6236 done
6237 LDFLAGS=$cf_rpath_dst
6238
6239 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6240
6241 echo "${as_me:-configure}:6241: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6242
6243 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6244
6245 echo "${as_me:-configure}:6245: testing ...checking LIBS $LIBS ..." 1>&5
6246
6247 cf_rpath_dst=
6248 for cf_rpath_src in $LIBS
6249 do
6250         case $cf_rpath_src in #(vi
6251         -L*) #(vi
6252
6253                 # check if this refers to a directory which we will ignore
6254                 cf_rpath_skip=no
6255                 if test -n "$cf_rpath_list"
6256                 then
6257                         for cf_rpath_item in $cf_rpath_list
6258                         do
6259                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6260                                 then
6261                                         cf_rpath_skip=yes
6262                                         break
6263                                 fi
6264                         done
6265                 fi
6266
6267                 if test "$cf_rpath_skip" = no
6268                 then
6269                         # transform the option
6270                         if test "$LD_RPATH_OPT" = "-R " ; then
6271                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6272                         else
6273                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6274                         fi
6275
6276                         # if we have not already added this, add it now
6277                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6278                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6279                         then
6280                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6281
6282 echo "${as_me:-configure}:6282: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6283
6284                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6285                         fi
6286                 fi
6287                 ;;
6288         esac
6289         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6290 done
6291 LIBS=$cf_rpath_dst
6292
6293 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6294
6295 echo "${as_me:-configure}:6295: testing ...checked LIBS $LIBS ..." 1>&5
6296
6297         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6298
6299 echo "${as_me:-configure}:6299: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6300
6301 fi
6302
6303 fi
6304
6305 fi
6306
6307 ###############################################################################
6308
6309 ###     use option --disable-overwrite to leave out the link to -lcurses
6310 echo "$as_me:6310: checking if you wish to install ncurses overwriting curses" >&5
6311 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6312
6313 # Check whether --enable-overwrite or --disable-overwrite was given.
6314 if test "${enable_overwrite+set}" = set; then
6315   enableval="$enable_overwrite"
6316   with_overwrite=$enableval
6317 else
6318   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6319 fi;
6320 echo "$as_me:6320: result: $with_overwrite" >&5
6321 echo "${ECHO_T}$with_overwrite" >&6
6322
6323 echo "$as_me:6323: checking if external terminfo-database is used" >&5
6324 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6325
6326 # Check whether --enable-database or --disable-database was given.
6327 if test "${enable_database+set}" = set; then
6328   enableval="$enable_database"
6329   use_database=$enableval
6330 else
6331   use_database=yes
6332 fi;
6333 echo "$as_me:6333: result: $use_database" >&5
6334 echo "${ECHO_T}$use_database" >&6
6335
6336 case $host_os in #(vi
6337 os2*) #(vi
6338         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6339         ;;
6340 *) #(vi
6341         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6342         ;;
6343 esac
6344
6345 NCURSES_USE_DATABASE=0
6346 if test "$use_database" != no ; then
6347         NCURSES_USE_DATABASE=1
6348
6349         echo "$as_me:6349: checking which terminfo source-file will be installed" >&5
6350 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6351
6352 # Check whether --with-database or --without-database was given.
6353 if test "${with_database+set}" = set; then
6354   withval="$with_database"
6355   TERMINFO_SRC=$withval
6356 fi;
6357         echo "$as_me:6357: result: $TERMINFO_SRC" >&5
6358 echo "${ECHO_T}$TERMINFO_SRC" >&6
6359
6360         echo "$as_me:6360: checking whether to use hashed database instead of directory/tree" >&5
6361 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6362
6363 # Check whether --with-hashed-db or --without-hashed-db was given.
6364 if test "${with_hashed_db+set}" = set; then
6365   withval="$with_hashed_db"
6366
6367 else
6368   with_hashed_db=no
6369 fi;
6370         echo "$as_me:6370: result: $with_hashed_db" >&5
6371 echo "${ECHO_T}$with_hashed_db" >&6
6372 else
6373         with_hashed_db=no
6374 fi
6375
6376 echo "$as_me:6376: checking for list of fallback descriptions" >&5
6377 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6378
6379 # Check whether --with-fallbacks or --without-fallbacks was given.
6380 if test "${with_fallbacks+set}" = set; then
6381   withval="$with_fallbacks"
6382   with_fallback=$withval
6383 else
6384   with_fallback=
6385 fi;
6386 echo "$as_me:6386: result: $with_fallback" >&5
6387 echo "${ECHO_T}$with_fallback" >&6
6388 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6389
6390 echo "$as_me:6390: checking if you want modern xterm or antique" >&5
6391 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6392
6393 # Check whether --with-xterm-new or --without-xterm-new was given.
6394 if test "${with_xterm_new+set}" = set; then
6395   withval="$with_xterm_new"
6396   with_xterm_new=$withval
6397 else
6398   with_xterm_new=yes
6399 fi;
6400 case $with_xterm_new in
6401 no)     with_xterm_new=xterm-old;;
6402 *)      with_xterm_new=xterm-new;;
6403 esac
6404 echo "$as_me:6404: result: $with_xterm_new" >&5
6405 echo "${ECHO_T}$with_xterm_new" >&6
6406 WHICH_XTERM=$with_xterm_new
6407
6408 echo "$as_me:6408: checking if xterm backspace sends BS or DEL" >&5
6409 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6410
6411 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6412 if test "${with_xterm_kbs+set}" = set; then
6413   withval="$with_xterm_kbs"
6414   with_xterm_kbs=$withval
6415 else
6416   with_xterm_kbs=BS
6417 fi;
6418 case x$with_xterm_kbs in
6419 xyes|xno|xBS|xbs|x8)
6420         with_xterm_kbs=BS
6421         ;;
6422 xDEL|xdel|x127)
6423         with_xterm_kbs=DEL
6424         ;;
6425 *)
6426         with_xterm_kbs=$withval
6427         ;;
6428 esac
6429 echo "$as_me:6429: result: $with_xterm_kbs" >&5
6430 echo "${ECHO_T}$with_xterm_kbs" >&6
6431 XTERM_KBS=$with_xterm_kbs
6432
6433 MAKE_TERMINFO=
6434 if test "$use_database" = no ; then
6435         TERMINFO="${datadir}/terminfo"
6436         MAKE_TERMINFO="#"
6437 else
6438
6439 echo "$as_me:6439: checking for list of terminfo directories" >&5
6440 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6441
6442 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6443 if test "${with_terminfo_dirs+set}" = set; then
6444   withval="$with_terminfo_dirs"
6445
6446 else
6447   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6448 fi;
6449 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6450 cf_dst_path=
6451 for cf_src_path in $withval
6452 do
6453
6454 if test "x$prefix" != xNONE; then
6455   cf_path_syntax="$prefix"
6456 else
6457   cf_path_syntax="$ac_default_prefix"
6458 fi
6459
6460 case ".$cf_src_path" in #(vi
6461 .\$\(*\)*|.\'*\'*) #(vi
6462   ;;
6463 ..|./*|.\\*) #(vi
6464   ;;
6465 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6466   ;;
6467 .\${*prefix}*|.\${*dir}*) #(vi
6468   eval cf_src_path="$cf_src_path"
6469   case ".$cf_src_path" in #(vi
6470   .NONE/*)
6471     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6472     ;;
6473   esac
6474   ;; #(vi
6475 .no|.NONE/*)
6476   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6477   ;;
6478 *)
6479   { { echo "$as_me:6479: error: expected a pathname, not \"$cf_src_path\"" >&5
6480 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6481    { (exit 1); exit 1; }; }
6482   ;;
6483 esac
6484
6485   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6486   cf_dst_path="${cf_dst_path}${cf_src_path}"
6487 done
6488 IFS="$ac_save_ifs"
6489
6490 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6491 # so we have to check/work around.  We do prefer the result of "eval"...
6492 eval cf_dst_eval="$cf_dst_path"
6493 case "x$cf_dst_eval" in #(vi
6494 xNONE*) #(vi
6495         TERMINFO_DIRS=$cf_dst_path
6496         ;;
6497 *)
6498         TERMINFO_DIRS="$cf_dst_eval"
6499         ;;
6500 esac
6501
6502 echo "$as_me:6502: result: $TERMINFO_DIRS" >&5
6503 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6504 test -n "$TERMINFO_DIRS" &&
6505 cat >>confdefs.h <<EOF
6506 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6507 EOF
6508
6509 echo "$as_me:6509: checking for default terminfo directory" >&5
6510 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6511
6512 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6513 if test "${with_default_terminfo_dir+set}" = set; then
6514   withval="$with_default_terminfo_dir"
6515
6516 else
6517   withval="${TERMINFO:-${datadir}/terminfo}"
6518 fi; if test -n "${datadir}/terminfo" ; then
6519
6520 if test "x$prefix" != xNONE; then
6521   cf_path_syntax="$prefix"
6522 else
6523   cf_path_syntax="$ac_default_prefix"
6524 fi
6525
6526 case ".$withval" in #(vi
6527 .\$\(*\)*|.\'*\'*) #(vi
6528   ;;
6529 ..|./*|.\\*) #(vi
6530   ;;
6531 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6532   ;;
6533 .\${*prefix}*|.\${*dir}*) #(vi
6534   eval withval="$withval"
6535   case ".$withval" in #(vi
6536   .NONE/*)
6537     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6538     ;;
6539   esac
6540   ;; #(vi
6541 .no|.NONE/*)
6542   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6543   ;;
6544 *)
6545   { { echo "$as_me:6545: error: expected a pathname, not \"$withval\"" >&5
6546 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6547    { (exit 1); exit 1; }; }
6548   ;;
6549 esac
6550
6551 fi
6552 eval TERMINFO="$withval"
6553
6554 echo "$as_me:6554: result: $TERMINFO" >&5
6555 echo "${ECHO_T}$TERMINFO" >&6
6556
6557 cat >>confdefs.h <<EOF
6558 #define TERMINFO "$TERMINFO"
6559 EOF
6560
6561 fi
6562
6563 ###     use option --disable-big-core to make tic run on small machines
6564 ###     We need 4Mb, check if we can allocate 50% more than that.
6565 echo "$as_me:6565: checking if big-core option selected" >&5
6566 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6567
6568 # Check whether --enable-big-core or --disable-big-core was given.
6569 if test "${enable_big_core+set}" = set; then
6570   enableval="$enable_big_core"
6571   with_big_core=$enableval
6572 else
6573   if test "$cross_compiling" = yes; then
6574   with_big_core=no
6575 else
6576   cat >conftest.$ac_ext <<_ACEOF
6577 #line 6577 "configure"
6578 #include "confdefs.h"
6579
6580 #include <stdlib.h>
6581 #include <string.h>
6582 int main() {
6583         unsigned long n = 6000000L;
6584         char *s = malloc(n);
6585         if (s != 0)
6586                 s[0] = s[n-1] = 0;
6587         ${cf_cv_main_return:-return}(s == 0);
6588 }
6589 _ACEOF
6590 rm -f conftest$ac_exeext
6591 if { (eval echo "$as_me:6591: \"$ac_link\"") >&5
6592   (eval $ac_link) 2>&5
6593   ac_status=$?
6594   echo "$as_me:6594: \$? = $ac_status" >&5
6595   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6596   { (eval echo "$as_me:6596: \"$ac_try\"") >&5
6597   (eval $ac_try) 2>&5
6598   ac_status=$?
6599   echo "$as_me:6599: \$? = $ac_status" >&5
6600   (exit $ac_status); }; }; then
6601   with_big_core=yes
6602 else
6603   echo "$as_me: program exited with status $ac_status" >&5
6604 echo "$as_me: failed program was:" >&5
6605 cat conftest.$ac_ext >&5
6606 with_big_core=no
6607 fi
6608 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6609 fi
6610 fi;
6611 echo "$as_me:6611: result: $with_big_core" >&5
6612 echo "${ECHO_T}$with_big_core" >&6
6613 test "x$with_big_core" = "xyes" &&
6614 cat >>confdefs.h <<\EOF
6615 #define HAVE_BIG_CORE 1
6616 EOF
6617
6618 ### ISO C only guarantees 512-char strings, we have tables which load faster
6619 ### when constructed using "big" strings.  More than the C compiler, the awk
6620 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6621 echo "$as_me:6621: checking if big-strings option selected" >&5
6622 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6623
6624 # Check whether --enable-big-strings or --disable-big-strings was given.
6625 if test "${enable_big_strings+set}" = set; then
6626   enableval="$enable_big_strings"
6627   with_big_strings=$enableval
6628 else
6629
6630         case x$AWK in #(vi
6631         x)
6632                 eval with_big_strings=no
6633                 ;;
6634         *) #(vi
6635                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6636                         | $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
6637                         eval with_big_strings=yes
6638                 else
6639                         eval with_big_strings=no
6640                 fi
6641                 ;;
6642         esac
6643
6644 fi;
6645 echo "$as_me:6645: result: $with_big_strings" >&5
6646 echo "${ECHO_T}$with_big_strings" >&6
6647
6648 USE_BIG_STRINGS=0
6649 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6650
6651 ###     use option --enable-termcap to compile in the termcap fallback support
6652 echo "$as_me:6652: checking if you want termcap-fallback support" >&5
6653 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6654
6655 # Check whether --enable-termcap or --disable-termcap was given.
6656 if test "${enable_termcap+set}" = set; then
6657   enableval="$enable_termcap"
6658   with_termcap=$enableval
6659 else
6660   with_termcap=no
6661 fi;
6662 echo "$as_me:6662: result: $with_termcap" >&5
6663 echo "${ECHO_T}$with_termcap" >&6
6664
6665 NCURSES_USE_TERMCAP=0
6666 if test "x$with_termcap" != "xyes" ; then
6667         if test "$use_database" = no ; then
6668                 if test -z "$with_fallback" ; then
6669                         { { echo "$as_me:6669: error: You have disabled the database w/o specifying fallbacks" >&5
6670 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6671    { (exit 1); exit 1; }; }
6672                 fi
6673         fi
6674
6675 cat >>confdefs.h <<\EOF
6676 #define PURE_TERMINFO 1
6677 EOF
6678
6679 else
6680
6681         if test "$with_ticlib" != no ; then
6682                 { { echo "$as_me:6682: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6683 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6684    { (exit 1); exit 1; }; }
6685         fi
6686
6687         NCURSES_USE_TERMCAP=1
6688         echo "$as_me:6688: checking for list of termcap files" >&5
6689 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6690
6691 # Check whether --with-termpath or --without-termpath was given.
6692 if test "${with_termpath+set}" = set; then
6693   withval="$with_termpath"
6694
6695 else
6696   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6697 fi;
6698 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6699 cf_dst_path=
6700 for cf_src_path in $withval
6701 do
6702
6703 if test "x$prefix" != xNONE; then
6704   cf_path_syntax="$prefix"
6705 else
6706   cf_path_syntax="$ac_default_prefix"
6707 fi
6708
6709 case ".$cf_src_path" in #(vi
6710 .\$\(*\)*|.\'*\'*) #(vi
6711   ;;
6712 ..|./*|.\\*) #(vi
6713   ;;
6714 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6715   ;;
6716 .\${*prefix}*|.\${*dir}*) #(vi
6717   eval cf_src_path="$cf_src_path"
6718   case ".$cf_src_path" in #(vi
6719   .NONE/*)
6720     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6721     ;;
6722   esac
6723   ;; #(vi
6724 .no|.NONE/*)
6725   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6726   ;;
6727 *)
6728   { { echo "$as_me:6728: error: expected a pathname, not \"$cf_src_path\"" >&5
6729 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6730    { (exit 1); exit 1; }; }
6731   ;;
6732 esac
6733
6734   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6735   cf_dst_path="${cf_dst_path}${cf_src_path}"
6736 done
6737 IFS="$ac_save_ifs"
6738
6739 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6740 # so we have to check/work around.  We do prefer the result of "eval"...
6741 eval cf_dst_eval="$cf_dst_path"
6742 case "x$cf_dst_eval" in #(vi
6743 xNONE*) #(vi
6744         TERMPATH=$cf_dst_path
6745         ;;
6746 *)
6747         TERMPATH="$cf_dst_eval"
6748         ;;
6749 esac
6750
6751         echo "$as_me:6751: result: $TERMPATH" >&5
6752 echo "${ECHO_T}$TERMPATH" >&6
6753         test -n "$TERMPATH" &&
6754 cat >>confdefs.h <<EOF
6755 #define TERMPATH "$TERMPATH"
6756 EOF
6757
6758         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6759         echo "$as_me:6759: checking if fast termcap-loader is needed" >&5
6760 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6761
6762 # Check whether --enable-getcap or --disable-getcap was given.
6763 if test "${enable_getcap+set}" = set; then
6764   enableval="$enable_getcap"
6765   with_getcap=$enableval
6766 else
6767   with_getcap=no
6768 fi;
6769         echo "$as_me:6769: result: $with_getcap" >&5
6770 echo "${ECHO_T}$with_getcap" >&6
6771         test "x$with_getcap" = "xyes" &&
6772 cat >>confdefs.h <<\EOF
6773 #define USE_GETCAP 1
6774 EOF
6775
6776         echo "$as_me:6776: checking if translated termcaps will be cached in ~/.terminfo" >&5
6777 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6778
6779 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6780 if test "${enable_getcap_cache+set}" = set; then
6781   enableval="$enable_getcap_cache"
6782   with_getcap_cache=$enableval
6783 else
6784   with_getcap_cache=no
6785 fi;
6786         echo "$as_me:6786: result: $with_getcap_cache" >&5
6787 echo "${ECHO_T}$with_getcap_cache" >&6
6788         test "x$with_getcap_cache" = "xyes" &&
6789 cat >>confdefs.h <<\EOF
6790 #define USE_GETCAP_CACHE 1
6791 EOF
6792
6793 fi
6794
6795 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6796 echo "$as_me:6796: checking if ~/.terminfo is wanted" >&5
6797 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6798
6799 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6800 if test "${enable_home_terminfo+set}" = set; then
6801   enableval="$enable_home_terminfo"
6802   with_home_terminfo=$enableval
6803 else
6804   with_home_terminfo=yes
6805 fi;
6806 echo "$as_me:6806: result: $with_home_terminfo" >&5
6807 echo "${ECHO_T}$with_home_terminfo" >&6
6808 test "x$with_home_terminfo" = "xyes" &&
6809 cat >>confdefs.h <<\EOF
6810 #define USE_HOME_TERMINFO 1
6811 EOF
6812
6813 echo "$as_me:6813: checking if you want to use restricted environment when running as root" >&5
6814 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6815
6816 # Check whether --enable-root-environ or --disable-root-environ was given.
6817 if test "${enable_root_environ+set}" = set; then
6818   enableval="$enable_root_environ"
6819   with_root_environ=$enableval
6820 else
6821   with_root_environ=yes
6822 fi;
6823 echo "$as_me:6823: result: $with_root_environ" >&5
6824 echo "${ECHO_T}$with_root_environ" >&6
6825 test "x$with_root_environ" = xyes &&
6826 cat >>confdefs.h <<\EOF
6827 #define USE_ROOT_ENVIRON 1
6828 EOF
6829
6830 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6831 ###   to reduce storage requirements for the terminfo database.
6832
6833 for ac_func in \
6834         remove \
6835         unlink
6836 do
6837 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6838 echo "$as_me:6838: checking for $ac_func" >&5
6839 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6840 if eval "test \"\${$as_ac_var+set}\" = set"; then
6841   echo $ECHO_N "(cached) $ECHO_C" >&6
6842 else
6843   cat >conftest.$ac_ext <<_ACEOF
6844 #line 6844 "configure"
6845 #include "confdefs.h"
6846 /* System header to define __stub macros and hopefully few prototypes,
6847     which can conflict with char $ac_func (); below.  */
6848 #include <assert.h>
6849 /* Override any gcc2 internal prototype to avoid an error.  */
6850 #ifdef __cplusplus
6851 extern "C"
6852 #endif
6853 /* We use char because int might match the return type of a gcc2
6854    builtin and then its argument prototype would still apply.  */
6855 char $ac_func ();
6856 char (*f) ();
6857
6858 int
6859 main ()
6860 {
6861 /* The GNU C library defines this for functions which it implements
6862     to always fail with ENOSYS.  Some functions are actually named
6863     something starting with __ and the normal name is an alias.  */
6864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6865 choke me
6866 #else
6867 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6868 #endif
6869
6870   ;
6871   return 0;
6872 }
6873 _ACEOF
6874 rm -f conftest.$ac_objext conftest$ac_exeext
6875 if { (eval echo "$as_me:6875: \"$ac_link\"") >&5
6876   (eval $ac_link) 2>&5
6877   ac_status=$?
6878   echo "$as_me:6878: \$? = $ac_status" >&5
6879   (exit $ac_status); } &&
6880          { ac_try='test -s conftest$ac_exeext'
6881   { (eval echo "$as_me:6881: \"$ac_try\"") >&5
6882   (eval $ac_try) 2>&5
6883   ac_status=$?
6884   echo "$as_me:6884: \$? = $ac_status" >&5
6885   (exit $ac_status); }; }; then
6886   eval "$as_ac_var=yes"
6887 else
6888   echo "$as_me: failed program was:" >&5
6889 cat conftest.$ac_ext >&5
6890 eval "$as_ac_var=no"
6891 fi
6892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6893 fi
6894 echo "$as_me:6894: result: `eval echo '${'$as_ac_var'}'`" >&5
6895 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6896 if test `eval echo '${'$as_ac_var'}'` = yes; then
6897   cat >>confdefs.h <<EOF
6898 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6899 EOF
6900
6901 fi
6902 done
6903
6904 if test "$cross_compiling" = yes ; then
6905
6906 for ac_func in \
6907                 link \
6908                 symlink
6909 do
6910 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6911 echo "$as_me:6911: checking for $ac_func" >&5
6912 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6913 if eval "test \"\${$as_ac_var+set}\" = set"; then
6914   echo $ECHO_N "(cached) $ECHO_C" >&6
6915 else
6916   cat >conftest.$ac_ext <<_ACEOF
6917 #line 6917 "configure"
6918 #include "confdefs.h"
6919 /* System header to define __stub macros and hopefully few prototypes,
6920     which can conflict with char $ac_func (); below.  */
6921 #include <assert.h>
6922 /* Override any gcc2 internal prototype to avoid an error.  */
6923 #ifdef __cplusplus
6924 extern "C"
6925 #endif
6926 /* We use char because int might match the return type of a gcc2
6927    builtin and then its argument prototype would still apply.  */
6928 char $ac_func ();
6929 char (*f) ();
6930
6931 int
6932 main ()
6933 {
6934 /* The GNU C library defines this for functions which it implements
6935     to always fail with ENOSYS.  Some functions are actually named
6936     something starting with __ and the normal name is an alias.  */
6937 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6938 choke me
6939 #else
6940 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6941 #endif
6942
6943   ;
6944   return 0;
6945 }
6946 _ACEOF
6947 rm -f conftest.$ac_objext conftest$ac_exeext
6948 if { (eval echo "$as_me:6948: \"$ac_link\"") >&5
6949   (eval $ac_link) 2>&5
6950   ac_status=$?
6951   echo "$as_me:6951: \$? = $ac_status" >&5
6952   (exit $ac_status); } &&
6953          { ac_try='test -s conftest$ac_exeext'
6954   { (eval echo "$as_me:6954: \"$ac_try\"") >&5
6955   (eval $ac_try) 2>&5
6956   ac_status=$?
6957   echo "$as_me:6957: \$? = $ac_status" >&5
6958   (exit $ac_status); }; }; then
6959   eval "$as_ac_var=yes"
6960 else
6961   echo "$as_me: failed program was:" >&5
6962 cat conftest.$ac_ext >&5
6963 eval "$as_ac_var=no"
6964 fi
6965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6966 fi
6967 echo "$as_me:6967: result: `eval echo '${'$as_ac_var'}'`" >&5
6968 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6969 if test `eval echo '${'$as_ac_var'}'` = yes; then
6970   cat >>confdefs.h <<EOF
6971 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6972 EOF
6973
6974 fi
6975 done
6976
6977 else
6978         echo "$as_me:6978: checking if link/symlink functions work" >&5
6979 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6980 if test "${cf_cv_link_funcs+set}" = set; then
6981   echo $ECHO_N "(cached) $ECHO_C" >&6
6982 else
6983
6984                 cf_cv_link_funcs=
6985                 for cf_func in link symlink ; do
6986                         if test "$cross_compiling" = yes; then
6987
6988                         eval 'ac_cv_func_'$cf_func'=error'
6989 else
6990   cat >conftest.$ac_ext <<_ACEOF
6991 #line 6991 "configure"
6992 #include "confdefs.h"
6993
6994 #include <sys/types.h>
6995 #include <sys/stat.h>
6996 #ifdef HAVE_UNISTD_H
6997 #include <unistd.h>
6998 #endif
6999 int main()
7000 {
7001         int fail = 0;
7002         char *src = "config.log";
7003         char *dst = "conftest.chk";
7004         struct stat src_sb;
7005         struct stat dst_sb;
7006
7007         stat(src, &src_sb);
7008         fail = ($cf_func("config.log", "conftest.chk") < 0)
7009             || (stat(dst, &dst_sb) < 0)
7010             || (dst_sb.st_mtime != src_sb.st_mtime);
7011 #ifdef HAVE_UNLINK
7012         unlink(dst);
7013 #else
7014         remove(dst);
7015 #endif
7016         ${cf_cv_main_return:-return} (fail);
7017 }
7018
7019 _ACEOF
7020 rm -f conftest$ac_exeext
7021 if { (eval echo "$as_me:7021: \"$ac_link\"") >&5
7022   (eval $ac_link) 2>&5
7023   ac_status=$?
7024   echo "$as_me:7024: \$? = $ac_status" >&5
7025   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7026   { (eval echo "$as_me:7026: \"$ac_try\"") >&5
7027   (eval $ac_try) 2>&5
7028   ac_status=$?
7029   echo "$as_me:7029: \$? = $ac_status" >&5
7030   (exit $ac_status); }; }; then
7031
7032                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7033                         eval 'ac_cv_func_'$cf_func'=yes'
7034 else
7035   echo "$as_me: program exited with status $ac_status" >&5
7036 echo "$as_me: failed program was:" >&5
7037 cat conftest.$ac_ext >&5
7038
7039                         eval 'ac_cv_func_'$cf_func'=no'
7040 fi
7041 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7042 fi
7043                 done
7044                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7045
7046 fi
7047 echo "$as_me:7047: result: $cf_cv_link_funcs" >&5
7048 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7049         test "$ac_cv_func_link"    = yes &&
7050 cat >>confdefs.h <<\EOF
7051 #define HAVE_LINK 1
7052 EOF
7053
7054         test "$ac_cv_func_symlink" = yes &&
7055 cat >>confdefs.h <<\EOF
7056 #define HAVE_SYMLINK 1
7057 EOF
7058
7059 fi
7060
7061 with_links=no
7062 with_symlinks=no
7063
7064 # soft links (symbolic links) are useful for some systems where hard links do
7065 # not work, or to make it simpler to copy terminfo trees around.
7066 if test "x$ac_cv_func_symlink" = xyes ; then
7067     echo "$as_me:7067: checking if tic should use symbolic links" >&5
7068 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7069
7070 # Check whether --enable-symlinks or --disable-symlinks was given.
7071 if test "${enable_symlinks+set}" = set; then
7072   enableval="$enable_symlinks"
7073   with_symlinks=$enableval
7074 else
7075   with_symlinks=no
7076 fi;
7077     echo "$as_me:7077: result: $with_symlinks" >&5
7078 echo "${ECHO_T}$with_symlinks" >&6
7079 fi
7080
7081 # If we have hard links and did not choose to use soft links instead, there is
7082 # no reason to make this choice optional - use the hard links.
7083 if test "$with_symlinks" = no ; then
7084     echo "$as_me:7084: checking if tic should use hard links" >&5
7085 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7086     if test "x$ac_cv_func_link" = xyes ; then
7087         with_links=yes
7088     else
7089         with_links=no
7090     fi
7091     echo "$as_me:7091: result: $with_links" >&5
7092 echo "${ECHO_T}$with_links" >&6
7093 fi
7094
7095 test "x$with_links" = xyes &&
7096 cat >>confdefs.h <<\EOF
7097 #define USE_LINKS 1
7098 EOF
7099
7100 test "x$with_symlinks" = xyes &&
7101 cat >>confdefs.h <<\EOF
7102 #define USE_SYMLINKS 1
7103 EOF
7104
7105 ###   use option --enable-broken-linker to force on use of broken-linker support
7106 echo "$as_me:7106: checking if you want broken-linker support code" >&5
7107 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7108
7109 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7110 if test "${enable_broken_linker+set}" = set; then
7111   enableval="$enable_broken_linker"
7112   with_broken_linker=$enableval
7113 else
7114   with_broken_linker=${BROKEN_LINKER:-no}
7115 fi;
7116 echo "$as_me:7116: result: $with_broken_linker" >&5
7117 echo "${ECHO_T}$with_broken_linker" >&6
7118
7119 BROKEN_LINKER=0
7120 if test "x$with_broken_linker" = xyes ; then
7121
7122 cat >>confdefs.h <<\EOF
7123 #define BROKEN_LINKER 1
7124 EOF
7125
7126         BROKEN_LINKER=1
7127 elif test "$DFT_LWR_MODEL" = shared ; then
7128         case $cf_cv_system_name in #(vi
7129         cygwin*)
7130
7131 cat >>confdefs.h <<\EOF
7132 #define BROKEN_LINKER 1
7133 EOF
7134
7135                 BROKEN_LINKER=1
7136                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7137
7138 echo "${as_me:-configure}:7138: testing cygwin linker is broken anyway ..." 1>&5
7139
7140                 ;;
7141         esac
7142 fi
7143
7144 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7145 echo "$as_me:7145: checking if tputs should process BSD-style prefix padding" >&5
7146 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7147
7148 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7149 if test "${enable_bsdpad+set}" = set; then
7150   enableval="$enable_bsdpad"
7151   with_bsdpad=$enableval
7152 else
7153   with_bsdpad=no
7154 fi;
7155 echo "$as_me:7155: result: $with_bsdpad" >&5
7156 echo "${ECHO_T}$with_bsdpad" >&6
7157 test "x$with_bsdpad" = xyes &&
7158 cat >>confdefs.h <<\EOF
7159 #define BSD_TPUTS 1
7160 EOF
7161
7162 ###   use option --enable-widec to turn on use of wide-character support
7163 NCURSES_CH_T=chtype
7164 NCURSES_LIBUTF8=0
7165
7166 NEED_WCHAR_H=0
7167 NCURSES_MBSTATE_T=0
7168 NCURSES_WCHAR_T=0
7169 NCURSES_WINT_T=0
7170
7171 # Check to define _XOPEN_SOURCE "automatically"
7172
7173 cf_XOPEN_SOURCE=500
7174 cf_POSIX_C_SOURCE=199506L
7175 cf_xopen_source=
7176
7177 case $host_os in #(vi
7178 aix[4-7]*) #(vi
7179         cf_xopen_source="-D_ALL_SOURCE"
7180         ;;
7181 cygwin) #(vi
7182         cf_XOPEN_SOURCE=600
7183         ;;
7184 darwin[0-8].*) #(vi
7185         cf_xopen_source="-D_APPLE_C_SOURCE"
7186         ;;
7187 darwin*) #(vi
7188         cf_xopen_source="-D_DARWIN_C_SOURCE"
7189         cf_XOPEN_SOURCE=
7190         ;;
7191 freebsd*|dragonfly*) #(vi
7192         # 5.x headers associate
7193         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7194         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7195         cf_POSIX_C_SOURCE=200112L
7196         cf_XOPEN_SOURCE=600
7197         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7198         ;;
7199 hpux11*) #(vi
7200         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7201         ;;
7202 hpux*) #(vi
7203         cf_xopen_source="-D_HPUX_SOURCE"
7204         ;;
7205 irix[56].*) #(vi
7206         cf_xopen_source="-D_SGI_SOURCE"
7207         cf_XOPEN_SOURCE=
7208         ;;
7209 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7210
7211 echo "$as_me:7211: checking if we must define _GNU_SOURCE" >&5
7212 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7213 if test "${cf_cv_gnu_source+set}" = set; then
7214   echo $ECHO_N "(cached) $ECHO_C" >&6
7215 else
7216
7217 cat >conftest.$ac_ext <<_ACEOF
7218 #line 7218 "configure"
7219 #include "confdefs.h"
7220 #include <sys/types.h>
7221 int
7222 main ()
7223 {
7224
7225 #ifndef _XOPEN_SOURCE
7226 make an error
7227 #endif
7228   ;
7229   return 0;
7230 }
7231 _ACEOF
7232 rm -f conftest.$ac_objext
7233 if { (eval echo "$as_me:7233: \"$ac_compile\"") >&5
7234   (eval $ac_compile) 2>&5
7235   ac_status=$?
7236   echo "$as_me:7236: \$? = $ac_status" >&5
7237   (exit $ac_status); } &&
7238          { ac_try='test -s conftest.$ac_objext'
7239   { (eval echo "$as_me:7239: \"$ac_try\"") >&5
7240   (eval $ac_try) 2>&5
7241   ac_status=$?
7242   echo "$as_me:7242: \$? = $ac_status" >&5
7243   (exit $ac_status); }; }; then
7244   cf_cv_gnu_source=no
7245 else
7246   echo "$as_me: failed program was:" >&5
7247 cat conftest.$ac_ext >&5
7248 cf_save="$CPPFLAGS"
7249          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7250          cat >conftest.$ac_ext <<_ACEOF
7251 #line 7251 "configure"
7252 #include "confdefs.h"
7253 #include <sys/types.h>
7254 int
7255 main ()
7256 {
7257
7258 #ifdef _XOPEN_SOURCE
7259 make an error
7260 #endif
7261   ;
7262   return 0;
7263 }
7264 _ACEOF
7265 rm -f conftest.$ac_objext
7266 if { (eval echo "$as_me:7266: \"$ac_compile\"") >&5
7267   (eval $ac_compile) 2>&5
7268   ac_status=$?
7269   echo "$as_me:7269: \$? = $ac_status" >&5
7270   (exit $ac_status); } &&
7271          { ac_try='test -s conftest.$ac_objext'
7272   { (eval echo "$as_me:7272: \"$ac_try\"") >&5
7273   (eval $ac_try) 2>&5
7274   ac_status=$?
7275   echo "$as_me:7275: \$? = $ac_status" >&5
7276   (exit $ac_status); }; }; then
7277   cf_cv_gnu_source=no
7278 else
7279   echo "$as_me: failed program was:" >&5
7280 cat conftest.$ac_ext >&5
7281 cf_cv_gnu_source=yes
7282 fi
7283 rm -f conftest.$ac_objext conftest.$ac_ext
7284         CPPFLAGS="$cf_save"
7285
7286 fi
7287 rm -f conftest.$ac_objext conftest.$ac_ext
7288
7289 fi
7290 echo "$as_me:7290: result: $cf_cv_gnu_source" >&5
7291 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7292 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7293
7294         ;;
7295 mirbsd*) #(vi
7296         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7297         cf_XOPEN_SOURCE=
7298
7299 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7300
7301 cf_save_CFLAGS="$CFLAGS"
7302 cf_save_CPPFLAGS="$CPPFLAGS"
7303
7304 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7305         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7306                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7307
7308 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7309         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7310                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7311
7312 echo "$as_me:7312: checking if we should define _POSIX_C_SOURCE" >&5
7313 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7314 if test "${cf_cv_posix_c_source+set}" = set; then
7315   echo $ECHO_N "(cached) $ECHO_C" >&6
7316 else
7317
7318 echo "${as_me:-configure}:7318: testing if the symbol is already defined go no further ..." 1>&5
7319
7320         cat >conftest.$ac_ext <<_ACEOF
7321 #line 7321 "configure"
7322 #include "confdefs.h"
7323 #include <sys/types.h>
7324 int
7325 main ()
7326 {
7327
7328 #ifndef _POSIX_C_SOURCE
7329 make an error
7330 #endif
7331   ;
7332   return 0;
7333 }
7334 _ACEOF
7335 rm -f conftest.$ac_objext
7336 if { (eval echo "$as_me:7336: \"$ac_compile\"") >&5
7337   (eval $ac_compile) 2>&5
7338   ac_status=$?
7339   echo "$as_me:7339: \$? = $ac_status" >&5
7340   (exit $ac_status); } &&
7341          { ac_try='test -s conftest.$ac_objext'
7342   { (eval echo "$as_me:7342: \"$ac_try\"") >&5
7343   (eval $ac_try) 2>&5
7344   ac_status=$?
7345   echo "$as_me:7345: \$? = $ac_status" >&5
7346   (exit $ac_status); }; }; then
7347   cf_cv_posix_c_source=no
7348 else
7349   echo "$as_me: failed program was:" >&5
7350 cat conftest.$ac_ext >&5
7351 cf_want_posix_source=no
7352          case .$cf_POSIX_C_SOURCE in #(vi
7353          .[12]??*) #(vi
7354                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7355                 ;;
7356          .2) #(vi
7357                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7358                 cf_want_posix_source=yes
7359                 ;;
7360          .*)
7361                 cf_want_posix_source=yes
7362                 ;;
7363          esac
7364          if test "$cf_want_posix_source" = yes ; then
7365                 cat >conftest.$ac_ext <<_ACEOF
7366 #line 7366 "configure"
7367 #include "confdefs.h"
7368 #include <sys/types.h>
7369 int
7370 main ()
7371 {
7372
7373 #ifdef _POSIX_SOURCE
7374 make an error
7375 #endif
7376   ;
7377   return 0;
7378 }
7379 _ACEOF
7380 rm -f conftest.$ac_objext
7381 if { (eval echo "$as_me:7381: \"$ac_compile\"") >&5
7382   (eval $ac_compile) 2>&5
7383   ac_status=$?
7384   echo "$as_me:7384: \$? = $ac_status" >&5
7385   (exit $ac_status); } &&
7386          { ac_try='test -s conftest.$ac_objext'
7387   { (eval echo "$as_me:7387: \"$ac_try\"") >&5
7388   (eval $ac_try) 2>&5
7389   ac_status=$?
7390   echo "$as_me:7390: \$? = $ac_status" >&5
7391   (exit $ac_status); }; }; then
7392   :
7393 else
7394   echo "$as_me: failed program was:" >&5
7395 cat conftest.$ac_ext >&5
7396 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7397 fi
7398 rm -f conftest.$ac_objext conftest.$ac_ext
7399          fi
7400
7401 echo "${as_me:-configure}:7401: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7402
7403          CFLAGS="$cf_trim_CFLAGS"
7404          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7405
7406 echo "${as_me:-configure}:7406: testing if the second compile does not leave our definition intact error ..." 1>&5
7407
7408          cat >conftest.$ac_ext <<_ACEOF
7409 #line 7409 "configure"
7410 #include "confdefs.h"
7411 #include <sys/types.h>
7412 int
7413 main ()
7414 {
7415
7416 #ifndef _POSIX_C_SOURCE
7417 make an error
7418 #endif
7419   ;
7420   return 0;
7421 }
7422 _ACEOF
7423 rm -f conftest.$ac_objext
7424 if { (eval echo "$as_me:7424: \"$ac_compile\"") >&5
7425   (eval $ac_compile) 2>&5
7426   ac_status=$?
7427   echo "$as_me:7427: \$? = $ac_status" >&5
7428   (exit $ac_status); } &&
7429          { ac_try='test -s conftest.$ac_objext'
7430   { (eval echo "$as_me:7430: \"$ac_try\"") >&5
7431   (eval $ac_try) 2>&5
7432   ac_status=$?
7433   echo "$as_me:7433: \$? = $ac_status" >&5
7434   (exit $ac_status); }; }; then
7435   :
7436 else
7437   echo "$as_me: failed program was:" >&5
7438 cat conftest.$ac_ext >&5
7439 cf_cv_posix_c_source=no
7440 fi
7441 rm -f conftest.$ac_objext conftest.$ac_ext
7442          CFLAGS="$cf_save_CFLAGS"
7443          CPPFLAGS="$cf_save_CPPFLAGS"
7444
7445 fi
7446 rm -f conftest.$ac_objext conftest.$ac_ext
7447
7448 fi
7449 echo "$as_me:7449: result: $cf_cv_posix_c_source" >&5
7450 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7451
7452 if test "$cf_cv_posix_c_source" != no ; then
7453         CFLAGS="$cf_trim_CFLAGS"
7454         CPPFLAGS="$cf_trim_CPPFLAGS"
7455
7456 cf_fix_cppflags=no
7457 cf_new_cflags=
7458 cf_new_cppflags=
7459 cf_new_extra_cppflags=
7460
7461 for cf_add_cflags in $cf_cv_posix_c_source
7462 do
7463 case $cf_fix_cppflags in
7464 no)
7465         case $cf_add_cflags in #(vi
7466         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7467                 case $cf_add_cflags in
7468                 -D*)
7469                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7470
7471                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7472                                 && test -z "${cf_tst_cflags}" \
7473                                 && cf_fix_cppflags=yes
7474
7475                         if test $cf_fix_cppflags = yes ; then
7476                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7477                                 continue
7478                         elif test "${cf_tst_cflags}" = "\"'" ; then
7479                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7480                                 continue
7481                         fi
7482                         ;;
7483                 esac
7484                 case "$CPPFLAGS" in
7485                 *$cf_add_cflags) #(vi
7486                         ;;
7487                 *) #(vi
7488                         case $cf_add_cflags in #(vi
7489                         -D*)
7490                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7491
7492 CPPFLAGS=`echo "$CPPFLAGS" | \
7493         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7494                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7495
7496                                 ;;
7497                         esac
7498                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7499                         ;;
7500                 esac
7501                 ;;
7502         *)
7503                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7504                 ;;
7505         esac
7506         ;;
7507 yes)
7508         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7509
7510         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7511
7512         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7513                 && test -z "${cf_tst_cflags}" \
7514                 && cf_fix_cppflags=no
7515         ;;
7516 esac
7517 done
7518
7519 if test -n "$cf_new_cflags" ; then
7520
7521         CFLAGS="$CFLAGS $cf_new_cflags"
7522 fi
7523
7524 if test -n "$cf_new_cppflags" ; then
7525
7526         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7527 fi
7528
7529 if test -n "$cf_new_extra_cppflags" ; then
7530
7531         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7532 fi
7533
7534 fi
7535
7536         ;;
7537 netbsd*) #(vi
7538         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7539         ;;
7540 openbsd[4-9]*) #(vi
7541         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7542         cf_xopen_source="-D_BSD_SOURCE"
7543         cf_XOPEN_SOURCE=600
7544         ;;
7545 openbsd*) #(vi
7546         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7547         ;;
7548 osf[45]*) #(vi
7549         cf_xopen_source="-D_OSF_SOURCE"
7550         ;;
7551 nto-qnx*) #(vi
7552         cf_xopen_source="-D_QNX_SOURCE"
7553         ;;
7554 sco*) #(vi
7555         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7556         ;;
7557 solaris2.*) #(vi
7558         cf_xopen_source="-D__EXTENSIONS__"
7559         ;;
7560 *)
7561
7562 echo "$as_me:7562: checking if we should define _XOPEN_SOURCE" >&5
7563 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7564 if test "${cf_cv_xopen_source+set}" = set; then
7565   echo $ECHO_N "(cached) $ECHO_C" >&6
7566 else
7567
7568         cat >conftest.$ac_ext <<_ACEOF
7569 #line 7569 "configure"
7570 #include "confdefs.h"
7571
7572 #include <stdlib.h>
7573 #include <string.h>
7574 #include <sys/types.h>
7575
7576 int
7577 main ()
7578 {
7579
7580 #ifndef _XOPEN_SOURCE
7581 make an error
7582 #endif
7583   ;
7584   return 0;
7585 }
7586 _ACEOF
7587 rm -f conftest.$ac_objext
7588 if { (eval echo "$as_me:7588: \"$ac_compile\"") >&5
7589   (eval $ac_compile) 2>&5
7590   ac_status=$?
7591   echo "$as_me:7591: \$? = $ac_status" >&5
7592   (exit $ac_status); } &&
7593          { ac_try='test -s conftest.$ac_objext'
7594   { (eval echo "$as_me:7594: \"$ac_try\"") >&5
7595   (eval $ac_try) 2>&5
7596   ac_status=$?
7597   echo "$as_me:7597: \$? = $ac_status" >&5
7598   (exit $ac_status); }; }; then
7599   cf_cv_xopen_source=no
7600 else
7601   echo "$as_me: failed program was:" >&5
7602 cat conftest.$ac_ext >&5
7603 cf_save="$CPPFLAGS"
7604          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7605          cat >conftest.$ac_ext <<_ACEOF
7606 #line 7606 "configure"
7607 #include "confdefs.h"
7608
7609 #include <stdlib.h>
7610 #include <string.h>
7611 #include <sys/types.h>
7612
7613 int
7614 main ()
7615 {
7616
7617 #ifdef _XOPEN_SOURCE
7618 make an error
7619 #endif
7620   ;
7621   return 0;
7622 }
7623 _ACEOF
7624 rm -f conftest.$ac_objext
7625 if { (eval echo "$as_me:7625: \"$ac_compile\"") >&5
7626   (eval $ac_compile) 2>&5
7627   ac_status=$?
7628   echo "$as_me:7628: \$? = $ac_status" >&5
7629   (exit $ac_status); } &&
7630          { ac_try='test -s conftest.$ac_objext'
7631   { (eval echo "$as_me:7631: \"$ac_try\"") >&5
7632   (eval $ac_try) 2>&5
7633   ac_status=$?
7634   echo "$as_me:7634: \$? = $ac_status" >&5
7635   (exit $ac_status); }; }; then
7636   cf_cv_xopen_source=no
7637 else
7638   echo "$as_me: failed program was:" >&5
7639 cat conftest.$ac_ext >&5
7640 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7641 fi
7642 rm -f conftest.$ac_objext conftest.$ac_ext
7643         CPPFLAGS="$cf_save"
7644
7645 fi
7646 rm -f conftest.$ac_objext conftest.$ac_ext
7647
7648 fi
7649 echo "$as_me:7649: result: $cf_cv_xopen_source" >&5
7650 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7651
7652 if test "$cf_cv_xopen_source" != no ; then
7653
7654 CFLAGS=`echo "$CFLAGS" | \
7655         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7656                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7657
7658 CPPFLAGS=`echo "$CPPFLAGS" | \
7659         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7660                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7661
7662         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7663
7664 cf_fix_cppflags=no
7665 cf_new_cflags=
7666 cf_new_cppflags=
7667 cf_new_extra_cppflags=
7668
7669 for cf_add_cflags in $cf_temp_xopen_source
7670 do
7671 case $cf_fix_cppflags in
7672 no)
7673         case $cf_add_cflags in #(vi
7674         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7675                 case $cf_add_cflags in
7676                 -D*)
7677                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7678
7679                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7680                                 && test -z "${cf_tst_cflags}" \
7681                                 && cf_fix_cppflags=yes
7682
7683                         if test $cf_fix_cppflags = yes ; then
7684                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7685                                 continue
7686                         elif test "${cf_tst_cflags}" = "\"'" ; then
7687                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7688                                 continue
7689                         fi
7690                         ;;
7691                 esac
7692                 case "$CPPFLAGS" in
7693                 *$cf_add_cflags) #(vi
7694                         ;;
7695                 *) #(vi
7696                         case $cf_add_cflags in #(vi
7697                         -D*)
7698                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7699
7700 CPPFLAGS=`echo "$CPPFLAGS" | \
7701         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7702                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7703
7704                                 ;;
7705                         esac
7706                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7707                         ;;
7708                 esac
7709                 ;;
7710         *)
7711                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7712                 ;;
7713         esac
7714         ;;
7715 yes)
7716         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7717
7718         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7719
7720         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7721                 && test -z "${cf_tst_cflags}" \
7722                 && cf_fix_cppflags=no
7723         ;;
7724 esac
7725 done
7726
7727 if test -n "$cf_new_cflags" ; then
7728
7729         CFLAGS="$CFLAGS $cf_new_cflags"
7730 fi
7731
7732 if test -n "$cf_new_cppflags" ; then
7733
7734         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7735 fi
7736
7737 if test -n "$cf_new_extra_cppflags" ; then
7738
7739         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7740 fi
7741
7742 fi
7743
7744 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7745
7746 cf_save_CFLAGS="$CFLAGS"
7747 cf_save_CPPFLAGS="$CPPFLAGS"
7748
7749 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7750         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7751                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7752
7753 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7754         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7755                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7756
7757 echo "$as_me:7757: checking if we should define _POSIX_C_SOURCE" >&5
7758 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7759 if test "${cf_cv_posix_c_source+set}" = set; then
7760   echo $ECHO_N "(cached) $ECHO_C" >&6
7761 else
7762
7763 echo "${as_me:-configure}:7763: testing if the symbol is already defined go no further ..." 1>&5
7764
7765         cat >conftest.$ac_ext <<_ACEOF
7766 #line 7766 "configure"
7767 #include "confdefs.h"
7768 #include <sys/types.h>
7769 int
7770 main ()
7771 {
7772
7773 #ifndef _POSIX_C_SOURCE
7774 make an error
7775 #endif
7776   ;
7777   return 0;
7778 }
7779 _ACEOF
7780 rm -f conftest.$ac_objext
7781 if { (eval echo "$as_me:7781: \"$ac_compile\"") >&5
7782   (eval $ac_compile) 2>&5
7783   ac_status=$?
7784   echo "$as_me:7784: \$? = $ac_status" >&5
7785   (exit $ac_status); } &&
7786          { ac_try='test -s conftest.$ac_objext'
7787   { (eval echo "$as_me:7787: \"$ac_try\"") >&5
7788   (eval $ac_try) 2>&5
7789   ac_status=$?
7790   echo "$as_me:7790: \$? = $ac_status" >&5
7791   (exit $ac_status); }; }; then
7792   cf_cv_posix_c_source=no
7793 else
7794   echo "$as_me: failed program was:" >&5
7795 cat conftest.$ac_ext >&5
7796 cf_want_posix_source=no
7797          case .$cf_POSIX_C_SOURCE in #(vi
7798          .[12]??*) #(vi
7799                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7800                 ;;
7801          .2) #(vi
7802                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7803                 cf_want_posix_source=yes
7804                 ;;
7805          .*)
7806                 cf_want_posix_source=yes
7807                 ;;
7808          esac
7809          if test "$cf_want_posix_source" = yes ; then
7810                 cat >conftest.$ac_ext <<_ACEOF
7811 #line 7811 "configure"
7812 #include "confdefs.h"
7813 #include <sys/types.h>
7814 int
7815 main ()
7816 {
7817
7818 #ifdef _POSIX_SOURCE
7819 make an error
7820 #endif
7821   ;
7822   return 0;
7823 }
7824 _ACEOF
7825 rm -f conftest.$ac_objext
7826 if { (eval echo "$as_me:7826: \"$ac_compile\"") >&5
7827   (eval $ac_compile) 2>&5
7828   ac_status=$?
7829   echo "$as_me:7829: \$? = $ac_status" >&5
7830   (exit $ac_status); } &&
7831          { ac_try='test -s conftest.$ac_objext'
7832   { (eval echo "$as_me:7832: \"$ac_try\"") >&5
7833   (eval $ac_try) 2>&5
7834   ac_status=$?
7835   echo "$as_me:7835: \$? = $ac_status" >&5
7836   (exit $ac_status); }; }; then
7837   :
7838 else
7839   echo "$as_me: failed program was:" >&5
7840 cat conftest.$ac_ext >&5
7841 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7842 fi
7843 rm -f conftest.$ac_objext conftest.$ac_ext
7844          fi
7845
7846 echo "${as_me:-configure}:7846: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7847
7848          CFLAGS="$cf_trim_CFLAGS"
7849          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7850
7851 echo "${as_me:-configure}:7851: testing if the second compile does not leave our definition intact error ..." 1>&5
7852
7853          cat >conftest.$ac_ext <<_ACEOF
7854 #line 7854 "configure"
7855 #include "confdefs.h"
7856 #include <sys/types.h>
7857 int
7858 main ()
7859 {
7860
7861 #ifndef _POSIX_C_SOURCE
7862 make an error
7863 #endif
7864   ;
7865   return 0;
7866 }
7867 _ACEOF
7868 rm -f conftest.$ac_objext
7869 if { (eval echo "$as_me:7869: \"$ac_compile\"") >&5
7870   (eval $ac_compile) 2>&5
7871   ac_status=$?
7872   echo "$as_me:7872: \$? = $ac_status" >&5
7873   (exit $ac_status); } &&
7874          { ac_try='test -s conftest.$ac_objext'
7875   { (eval echo "$as_me:7875: \"$ac_try\"") >&5
7876   (eval $ac_try) 2>&5
7877   ac_status=$?
7878   echo "$as_me:7878: \$? = $ac_status" >&5
7879   (exit $ac_status); }; }; then
7880   :
7881 else
7882   echo "$as_me: failed program was:" >&5
7883 cat conftest.$ac_ext >&5
7884 cf_cv_posix_c_source=no
7885 fi
7886 rm -f conftest.$ac_objext conftest.$ac_ext
7887          CFLAGS="$cf_save_CFLAGS"
7888          CPPFLAGS="$cf_save_CPPFLAGS"
7889
7890 fi
7891 rm -f conftest.$ac_objext conftest.$ac_ext
7892
7893 fi
7894 echo "$as_me:7894: result: $cf_cv_posix_c_source" >&5
7895 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7896
7897 if test "$cf_cv_posix_c_source" != no ; then
7898         CFLAGS="$cf_trim_CFLAGS"
7899         CPPFLAGS="$cf_trim_CPPFLAGS"
7900
7901 cf_fix_cppflags=no
7902 cf_new_cflags=
7903 cf_new_cppflags=
7904 cf_new_extra_cppflags=
7905
7906 for cf_add_cflags in $cf_cv_posix_c_source
7907 do
7908 case $cf_fix_cppflags in
7909 no)
7910         case $cf_add_cflags in #(vi
7911         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7912                 case $cf_add_cflags in
7913                 -D*)
7914                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7915
7916                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7917                                 && test -z "${cf_tst_cflags}" \
7918                                 && cf_fix_cppflags=yes
7919
7920                         if test $cf_fix_cppflags = yes ; then
7921                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7922                                 continue
7923                         elif test "${cf_tst_cflags}" = "\"'" ; then
7924                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7925                                 continue
7926                         fi
7927                         ;;
7928                 esac
7929                 case "$CPPFLAGS" in
7930                 *$cf_add_cflags) #(vi
7931                         ;;
7932                 *) #(vi
7933                         case $cf_add_cflags in #(vi
7934                         -D*)
7935                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7936
7937 CPPFLAGS=`echo "$CPPFLAGS" | \
7938         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7939                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7940
7941                                 ;;
7942                         esac
7943                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7944                         ;;
7945                 esac
7946                 ;;
7947         *)
7948                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7949                 ;;
7950         esac
7951         ;;
7952 yes)
7953         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7954
7955         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7956
7957         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7958                 && test -z "${cf_tst_cflags}" \
7959                 && cf_fix_cppflags=no
7960         ;;
7961 esac
7962 done
7963
7964 if test -n "$cf_new_cflags" ; then
7965
7966         CFLAGS="$CFLAGS $cf_new_cflags"
7967 fi
7968
7969 if test -n "$cf_new_cppflags" ; then
7970
7971         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7972 fi
7973
7974 if test -n "$cf_new_extra_cppflags" ; then
7975
7976         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7977 fi
7978
7979 fi
7980
7981         ;;
7982 esac
7983
7984 if test -n "$cf_xopen_source" ; then
7985
7986 cf_fix_cppflags=no
7987 cf_new_cflags=
7988 cf_new_cppflags=
7989 cf_new_extra_cppflags=
7990
7991 for cf_add_cflags in $cf_xopen_source
7992 do
7993 case $cf_fix_cppflags in
7994 no)
7995         case $cf_add_cflags in #(vi
7996         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7997                 case $cf_add_cflags in
7998                 -D*)
7999                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8000
8001                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8002                                 && test -z "${cf_tst_cflags}" \
8003                                 && cf_fix_cppflags=yes
8004
8005                         if test $cf_fix_cppflags = yes ; then
8006                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8007                                 continue
8008                         elif test "${cf_tst_cflags}" = "\"'" ; then
8009                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8010                                 continue
8011                         fi
8012                         ;;
8013                 esac
8014                 case "$CPPFLAGS" in
8015                 *$cf_add_cflags) #(vi
8016                         ;;
8017                 *) #(vi
8018                         case $cf_add_cflags in #(vi
8019                         -D*)
8020                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8021
8022 CPPFLAGS=`echo "$CPPFLAGS" | \
8023         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8024                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8025
8026                                 ;;
8027                         esac
8028                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8029                         ;;
8030                 esac
8031                 ;;
8032         *)
8033                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8034                 ;;
8035         esac
8036         ;;
8037 yes)
8038         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8039
8040         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8041
8042         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8043                 && test -z "${cf_tst_cflags}" \
8044                 && cf_fix_cppflags=no
8045         ;;
8046 esac
8047 done
8048
8049 if test -n "$cf_new_cflags" ; then
8050
8051         CFLAGS="$CFLAGS $cf_new_cflags"
8052 fi
8053
8054 if test -n "$cf_new_cppflags" ; then
8055
8056         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8057 fi
8058
8059 if test -n "$cf_new_extra_cppflags" ; then
8060
8061         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8062 fi
8063
8064 fi
8065
8066 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8067         echo "$as_me:8067: checking if _XOPEN_SOURCE really is set" >&5
8068 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8069         cat >conftest.$ac_ext <<_ACEOF
8070 #line 8070 "configure"
8071 #include "confdefs.h"
8072 #include <stdlib.h>
8073 int
8074 main ()
8075 {
8076
8077 #ifndef _XOPEN_SOURCE
8078 make an error
8079 #endif
8080   ;
8081   return 0;
8082 }
8083 _ACEOF
8084 rm -f conftest.$ac_objext
8085 if { (eval echo "$as_me:8085: \"$ac_compile\"") >&5
8086   (eval $ac_compile) 2>&5
8087   ac_status=$?
8088   echo "$as_me:8088: \$? = $ac_status" >&5
8089   (exit $ac_status); } &&
8090          { ac_try='test -s conftest.$ac_objext'
8091   { (eval echo "$as_me:8091: \"$ac_try\"") >&5
8092   (eval $ac_try) 2>&5
8093   ac_status=$?
8094   echo "$as_me:8094: \$? = $ac_status" >&5
8095   (exit $ac_status); }; }; then
8096   cf_XOPEN_SOURCE_set=yes
8097 else
8098   echo "$as_me: failed program was:" >&5
8099 cat conftest.$ac_ext >&5
8100 cf_XOPEN_SOURCE_set=no
8101 fi
8102 rm -f conftest.$ac_objext conftest.$ac_ext
8103         echo "$as_me:8103: result: $cf_XOPEN_SOURCE_set" >&5
8104 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8105         if test $cf_XOPEN_SOURCE_set = yes
8106         then
8107                 cat >conftest.$ac_ext <<_ACEOF
8108 #line 8108 "configure"
8109 #include "confdefs.h"
8110 #include <stdlib.h>
8111 int
8112 main ()
8113 {
8114
8115 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8116 make an error
8117 #endif
8118   ;
8119   return 0;
8120 }
8121 _ACEOF
8122 rm -f conftest.$ac_objext
8123 if { (eval echo "$as_me:8123: \"$ac_compile\"") >&5
8124   (eval $ac_compile) 2>&5
8125   ac_status=$?
8126   echo "$as_me:8126: \$? = $ac_status" >&5
8127   (exit $ac_status); } &&
8128          { ac_try='test -s conftest.$ac_objext'
8129   { (eval echo "$as_me:8129: \"$ac_try\"") >&5
8130   (eval $ac_try) 2>&5
8131   ac_status=$?
8132   echo "$as_me:8132: \$? = $ac_status" >&5
8133   (exit $ac_status); }; }; then
8134   cf_XOPEN_SOURCE_set_ok=yes
8135 else
8136   echo "$as_me: failed program was:" >&5
8137 cat conftest.$ac_ext >&5
8138 cf_XOPEN_SOURCE_set_ok=no
8139 fi
8140 rm -f conftest.$ac_objext conftest.$ac_ext
8141                 if test $cf_XOPEN_SOURCE_set_ok = no
8142                 then
8143                         { echo "$as_me:8143: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8144 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8145                 fi
8146         else
8147
8148 echo "$as_me:8148: checking if we should define _XOPEN_SOURCE" >&5
8149 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8150 if test "${cf_cv_xopen_source+set}" = set; then
8151   echo $ECHO_N "(cached) $ECHO_C" >&6
8152 else
8153
8154         cat >conftest.$ac_ext <<_ACEOF
8155 #line 8155 "configure"
8156 #include "confdefs.h"
8157
8158 #include <stdlib.h>
8159 #include <string.h>
8160 #include <sys/types.h>
8161
8162 int
8163 main ()
8164 {
8165
8166 #ifndef _XOPEN_SOURCE
8167 make an error
8168 #endif
8169   ;
8170   return 0;
8171 }
8172 _ACEOF
8173 rm -f conftest.$ac_objext
8174 if { (eval echo "$as_me:8174: \"$ac_compile\"") >&5
8175   (eval $ac_compile) 2>&5
8176   ac_status=$?
8177   echo "$as_me:8177: \$? = $ac_status" >&5
8178   (exit $ac_status); } &&
8179          { ac_try='test -s conftest.$ac_objext'
8180   { (eval echo "$as_me:8180: \"$ac_try\"") >&5
8181   (eval $ac_try) 2>&5
8182   ac_status=$?
8183   echo "$as_me:8183: \$? = $ac_status" >&5
8184   (exit $ac_status); }; }; then
8185   cf_cv_xopen_source=no
8186 else
8187   echo "$as_me: failed program was:" >&5
8188 cat conftest.$ac_ext >&5
8189 cf_save="$CPPFLAGS"
8190          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8191          cat >conftest.$ac_ext <<_ACEOF
8192 #line 8192 "configure"
8193 #include "confdefs.h"
8194
8195 #include <stdlib.h>
8196 #include <string.h>
8197 #include <sys/types.h>
8198
8199 int
8200 main ()
8201 {
8202
8203 #ifdef _XOPEN_SOURCE
8204 make an error
8205 #endif
8206   ;
8207   return 0;
8208 }
8209 _ACEOF
8210 rm -f conftest.$ac_objext
8211 if { (eval echo "$as_me:8211: \"$ac_compile\"") >&5
8212   (eval $ac_compile) 2>&5
8213   ac_status=$?
8214   echo "$as_me:8214: \$? = $ac_status" >&5
8215   (exit $ac_status); } &&
8216          { ac_try='test -s conftest.$ac_objext'
8217   { (eval echo "$as_me:8217: \"$ac_try\"") >&5
8218   (eval $ac_try) 2>&5
8219   ac_status=$?
8220   echo "$as_me:8220: \$? = $ac_status" >&5
8221   (exit $ac_status); }; }; then
8222   cf_cv_xopen_source=no
8223 else
8224   echo "$as_me: failed program was:" >&5
8225 cat conftest.$ac_ext >&5
8226 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8227 fi
8228 rm -f conftest.$ac_objext conftest.$ac_ext
8229         CPPFLAGS="$cf_save"
8230
8231 fi
8232 rm -f conftest.$ac_objext conftest.$ac_ext
8233
8234 fi
8235 echo "$as_me:8235: result: $cf_cv_xopen_source" >&5
8236 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8237
8238 if test "$cf_cv_xopen_source" != no ; then
8239
8240 CFLAGS=`echo "$CFLAGS" | \
8241         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8242                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8243
8244 CPPFLAGS=`echo "$CPPFLAGS" | \
8245         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8246                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8247
8248         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8249
8250 cf_fix_cppflags=no
8251 cf_new_cflags=
8252 cf_new_cppflags=
8253 cf_new_extra_cppflags=
8254
8255 for cf_add_cflags in $cf_temp_xopen_source
8256 do
8257 case $cf_fix_cppflags in
8258 no)
8259         case $cf_add_cflags in #(vi
8260         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8261                 case $cf_add_cflags in
8262                 -D*)
8263                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8264
8265                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8266                                 && test -z "${cf_tst_cflags}" \
8267                                 && cf_fix_cppflags=yes
8268
8269                         if test $cf_fix_cppflags = yes ; then
8270                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8271                                 continue
8272                         elif test "${cf_tst_cflags}" = "\"'" ; then
8273                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8274                                 continue
8275                         fi
8276                         ;;
8277                 esac
8278                 case "$CPPFLAGS" in
8279                 *$cf_add_cflags) #(vi
8280                         ;;
8281                 *) #(vi
8282                         case $cf_add_cflags in #(vi
8283                         -D*)
8284                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8285
8286 CPPFLAGS=`echo "$CPPFLAGS" | \
8287         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8288                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8289
8290                                 ;;
8291                         esac
8292                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8293                         ;;
8294                 esac
8295                 ;;
8296         *)
8297                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8298                 ;;
8299         esac
8300         ;;
8301 yes)
8302         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8303
8304         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8305
8306         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8307                 && test -z "${cf_tst_cflags}" \
8308                 && cf_fix_cppflags=no
8309         ;;
8310 esac
8311 done
8312
8313 if test -n "$cf_new_cflags" ; then
8314
8315         CFLAGS="$CFLAGS $cf_new_cflags"
8316 fi
8317
8318 if test -n "$cf_new_cppflags" ; then
8319
8320         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8321 fi
8322
8323 if test -n "$cf_new_extra_cppflags" ; then
8324
8325         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8326 fi
8327
8328 fi
8329
8330         fi
8331 fi
8332
8333 # Work around breakage on OS X
8334
8335 echo "$as_me:8335: checking if SIGWINCH is defined" >&5
8336 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8337 if test "${cf_cv_define_sigwinch+set}" = set; then
8338   echo $ECHO_N "(cached) $ECHO_C" >&6
8339 else
8340
8341         cat >conftest.$ac_ext <<_ACEOF
8342 #line 8342 "configure"
8343 #include "confdefs.h"
8344
8345 #include <sys/types.h>
8346 #include <sys/signal.h>
8347
8348 int
8349 main ()
8350 {
8351 int x = SIGWINCH
8352   ;
8353   return 0;
8354 }
8355 _ACEOF
8356 rm -f conftest.$ac_objext
8357 if { (eval echo "$as_me:8357: \"$ac_compile\"") >&5
8358   (eval $ac_compile) 2>&5
8359   ac_status=$?
8360   echo "$as_me:8360: \$? = $ac_status" >&5
8361   (exit $ac_status); } &&
8362          { ac_try='test -s conftest.$ac_objext'
8363   { (eval echo "$as_me:8363: \"$ac_try\"") >&5
8364   (eval $ac_try) 2>&5
8365   ac_status=$?
8366   echo "$as_me:8366: \$? = $ac_status" >&5
8367   (exit $ac_status); }; }; then
8368   cf_cv_define_sigwinch=yes
8369 else
8370   echo "$as_me: failed program was:" >&5
8371 cat conftest.$ac_ext >&5
8372 cat >conftest.$ac_ext <<_ACEOF
8373 #line 8373 "configure"
8374 #include "confdefs.h"
8375
8376 #undef _XOPEN_SOURCE
8377 #undef _POSIX_SOURCE
8378 #undef _POSIX_C_SOURCE
8379 #include <sys/types.h>
8380 #include <sys/signal.h>
8381
8382 int
8383 main ()
8384 {
8385 int x = SIGWINCH
8386   ;
8387   return 0;
8388 }
8389 _ACEOF
8390 rm -f conftest.$ac_objext
8391 if { (eval echo "$as_me:8391: \"$ac_compile\"") >&5
8392   (eval $ac_compile) 2>&5
8393   ac_status=$?
8394   echo "$as_me:8394: \$? = $ac_status" >&5
8395   (exit $ac_status); } &&
8396          { ac_try='test -s conftest.$ac_objext'
8397   { (eval echo "$as_me:8397: \"$ac_try\"") >&5
8398   (eval $ac_try) 2>&5
8399   ac_status=$?
8400   echo "$as_me:8400: \$? = $ac_status" >&5
8401   (exit $ac_status); }; }; then
8402   cf_cv_define_sigwinch=maybe
8403 else
8404   echo "$as_me: failed program was:" >&5
8405 cat conftest.$ac_ext >&5
8406 cf_cv_define_sigwinch=no
8407 fi
8408 rm -f conftest.$ac_objext conftest.$ac_ext
8409
8410 fi
8411 rm -f conftest.$ac_objext conftest.$ac_ext
8412
8413 fi
8414 echo "$as_me:8414: result: $cf_cv_define_sigwinch" >&5
8415 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8416
8417 if test "$cf_cv_define_sigwinch" = maybe ; then
8418 echo "$as_me:8418: checking for actual SIGWINCH definition" >&5
8419 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8420 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8421   echo $ECHO_N "(cached) $ECHO_C" >&6
8422 else
8423
8424 cf_cv_fixup_sigwinch=unknown
8425 cf_sigwinch=32
8426 while test $cf_sigwinch != 1
8427 do
8428         cat >conftest.$ac_ext <<_ACEOF
8429 #line 8429 "configure"
8430 #include "confdefs.h"
8431
8432 #undef _XOPEN_SOURCE
8433 #undef _POSIX_SOURCE
8434 #undef _POSIX_C_SOURCE
8435 #include <sys/types.h>
8436 #include <sys/signal.h>
8437
8438 int
8439 main ()
8440 {
8441
8442 #if SIGWINCH != $cf_sigwinch
8443 make an error
8444 #endif
8445 int x = SIGWINCH
8446   ;
8447   return 0;
8448 }
8449 _ACEOF
8450 rm -f conftest.$ac_objext
8451 if { (eval echo "$as_me:8451: \"$ac_compile\"") >&5
8452   (eval $ac_compile) 2>&5
8453   ac_status=$?
8454   echo "$as_me:8454: \$? = $ac_status" >&5
8455   (exit $ac_status); } &&
8456          { ac_try='test -s conftest.$ac_objext'
8457   { (eval echo "$as_me:8457: \"$ac_try\"") >&5
8458   (eval $ac_try) 2>&5
8459   ac_status=$?
8460   echo "$as_me:8460: \$? = $ac_status" >&5
8461   (exit $ac_status); }; }; then
8462   cf_cv_fixup_sigwinch=$cf_sigwinch
8463          break
8464 else
8465   echo "$as_me: failed program was:" >&5
8466 cat conftest.$ac_ext >&5
8467 fi
8468 rm -f conftest.$ac_objext conftest.$ac_ext
8469
8470 cf_sigwinch=`expr $cf_sigwinch - 1`
8471 done
8472
8473 fi
8474 echo "$as_me:8474: result: $cf_cv_fixup_sigwinch" >&5
8475 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8476
8477         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8478                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8479         fi
8480 fi
8481
8482 # Checks for CODESET support.
8483
8484   echo "$as_me:8484: checking for nl_langinfo and CODESET" >&5
8485 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8486 if test "${am_cv_langinfo_codeset+set}" = set; then
8487   echo $ECHO_N "(cached) $ECHO_C" >&6
8488 else
8489   cat >conftest.$ac_ext <<_ACEOF
8490 #line 8490 "configure"
8491 #include "confdefs.h"
8492 #include <langinfo.h>
8493 int
8494 main ()
8495 {
8496 char* cs = nl_langinfo(CODESET);
8497   ;
8498   return 0;
8499 }
8500 _ACEOF
8501 rm -f conftest.$ac_objext conftest$ac_exeext
8502 if { (eval echo "$as_me:8502: \"$ac_link\"") >&5
8503   (eval $ac_link) 2>&5
8504   ac_status=$?
8505   echo "$as_me:8505: \$? = $ac_status" >&5
8506   (exit $ac_status); } &&
8507          { ac_try='test -s conftest$ac_exeext'
8508   { (eval echo "$as_me:8508: \"$ac_try\"") >&5
8509   (eval $ac_try) 2>&5
8510   ac_status=$?
8511   echo "$as_me:8511: \$? = $ac_status" >&5
8512   (exit $ac_status); }; }; then
8513   am_cv_langinfo_codeset=yes
8514 else
8515   echo "$as_me: failed program was:" >&5
8516 cat conftest.$ac_ext >&5
8517 am_cv_langinfo_codeset=no
8518 fi
8519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8520
8521 fi
8522 echo "$as_me:8522: result: $am_cv_langinfo_codeset" >&5
8523 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8524   if test $am_cv_langinfo_codeset = yes; then
8525
8526 cat >>confdefs.h <<\EOF
8527 #define HAVE_LANGINFO_CODESET 1
8528 EOF
8529
8530   fi
8531
8532 # use these variables to work around a defect in gcc's fixincludes.
8533 NCURSES_OK_WCHAR_T=
8534 NCURSES_OK_WINT_T=
8535
8536 echo "$as_me:8536: checking if you want wide-character code" >&5
8537 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8538
8539 # Check whether --enable-widec or --disable-widec was given.
8540 if test "${enable_widec+set}" = set; then
8541   enableval="$enable_widec"
8542   with_widec=$enableval
8543 else
8544   with_widec=no
8545 fi;
8546 echo "$as_me:8546: result: $with_widec" >&5
8547 echo "${ECHO_T}$with_widec" >&6
8548 if test "x$with_widec" = xyes ; then
8549         LIB_SUFFIX="w${LIB_SUFFIX}"
8550
8551 cat >>confdefs.h <<\EOF
8552 #define USE_WIDEC_SUPPORT 1
8553 EOF
8554
8555 cat >>confdefs.h <<\EOF
8556 #define NCURSES_WIDECHAR 1
8557 EOF
8558
8559 echo "$as_me:8559: checking if wchar.h can be used as is" >&5
8560 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8561 if test "${cf_cv_wchar_h_okay+set}" = set; then
8562   echo $ECHO_N "(cached) $ECHO_C" >&6
8563 else
8564
8565 cat >conftest.$ac_ext <<_ACEOF
8566 #line 8566 "configure"
8567 #include "confdefs.h"
8568
8569 #include <stdlib.h>
8570 #include <wchar.h>
8571
8572 int
8573 main ()
8574 {
8575
8576         wint_t foo = 0;
8577         int bar = iswpunct(foo)
8578   ;
8579   return 0;
8580 }
8581 _ACEOF
8582 rm -f conftest.$ac_objext
8583 if { (eval echo "$as_me:8583: \"$ac_compile\"") >&5
8584   (eval $ac_compile) 2>&5
8585   ac_status=$?
8586   echo "$as_me:8586: \$? = $ac_status" >&5
8587   (exit $ac_status); } &&
8588          { ac_try='test -s conftest.$ac_objext'
8589   { (eval echo "$as_me:8589: \"$ac_try\"") >&5
8590   (eval $ac_try) 2>&5
8591   ac_status=$?
8592   echo "$as_me:8592: \$? = $ac_status" >&5
8593   (exit $ac_status); }; }; then
8594   cf_cv_wchar_h_okay=yes
8595 else
8596   echo "$as_me: failed program was:" >&5
8597 cat conftest.$ac_ext >&5
8598 cf_cv_wchar_h_okay=no
8599 fi
8600 rm -f conftest.$ac_objext conftest.$ac_ext
8601 fi
8602 echo "$as_me:8602: result: $cf_cv_wchar_h_okay" >&5
8603 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8604
8605 if test $cf_cv_wchar_h_okay = no
8606 then
8607
8608 echo "$as_me:8608: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8609 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8610 cat >conftest.$ac_ext <<_ACEOF
8611 #line 8611 "configure"
8612 #include "confdefs.h"
8613 #include <sys/types.h>
8614
8615 int
8616 main ()
8617 {
8618
8619 #ifndef _XOPEN_SOURCE_EXTENDED
8620 make an error
8621 #endif
8622   ;
8623   return 0;
8624 }
8625 _ACEOF
8626 rm -f conftest.$ac_objext
8627 if { (eval echo "$as_me:8627: \"$ac_compile\"") >&5
8628   (eval $ac_compile) 2>&5
8629   ac_status=$?
8630   echo "$as_me:8630: \$? = $ac_status" >&5
8631   (exit $ac_status); } &&
8632          { ac_try='test -s conftest.$ac_objext'
8633   { (eval echo "$as_me:8633: \"$ac_try\"") >&5
8634   (eval $ac_try) 2>&5
8635   ac_status=$?
8636   echo "$as_me:8636: \$? = $ac_status" >&5
8637   (exit $ac_status); }; }; then
8638   cf_result=no
8639 else
8640   echo "$as_me: failed program was:" >&5
8641 cat conftest.$ac_ext >&5
8642 cf_result=yes
8643 fi
8644 rm -f conftest.$ac_objext conftest.$ac_ext
8645 echo "$as_me:8645: result: $cf_result" >&5
8646 echo "${ECHO_T}$cf_result" >&6
8647
8648 if test "$cf_result" = yes ; then
8649         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8650 elif test "x" != "x" ; then
8651         echo "$as_me:8651: checking checking for compatible value versus " >&5
8652 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8653         cat >conftest.$ac_ext <<_ACEOF
8654 #line 8654 "configure"
8655 #include "confdefs.h"
8656 #include <sys/types.h>
8657
8658 int
8659 main ()
8660 {
8661
8662 #if _XOPEN_SOURCE_EXTENDED- < 0
8663 make an error
8664 #endif
8665   ;
8666   return 0;
8667 }
8668 _ACEOF
8669 rm -f conftest.$ac_objext
8670 if { (eval echo "$as_me:8670: \"$ac_compile\"") >&5
8671   (eval $ac_compile) 2>&5
8672   ac_status=$?
8673   echo "$as_me:8673: \$? = $ac_status" >&5
8674   (exit $ac_status); } &&
8675          { ac_try='test -s conftest.$ac_objext'
8676   { (eval echo "$as_me:8676: \"$ac_try\"") >&5
8677   (eval $ac_try) 2>&5
8678   ac_status=$?
8679   echo "$as_me:8679: \$? = $ac_status" >&5
8680   (exit $ac_status); }; }; then
8681   cf_result=yes
8682 else
8683   echo "$as_me: failed program was:" >&5
8684 cat conftest.$ac_ext >&5
8685 cf_result=no
8686 fi
8687 rm -f conftest.$ac_objext conftest.$ac_ext
8688         echo "$as_me:8688: result: $cf_result" >&5
8689 echo "${ECHO_T}$cf_result" >&6
8690         if test "$cf_result" = no ; then
8691                 # perhaps we can override it - try...
8692                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8693         fi
8694 fi
8695
8696 fi
8697
8698         # with_overwrite=no
8699         NCURSES_CH_T=cchar_t
8700
8701 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8702 do
8703 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8704 echo "$as_me:8704: checking for $ac_func" >&5
8705 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8706 if eval "test \"\${$as_ac_var+set}\" = set"; then
8707   echo $ECHO_N "(cached) $ECHO_C" >&6
8708 else
8709   cat >conftest.$ac_ext <<_ACEOF
8710 #line 8710 "configure"
8711 #include "confdefs.h"
8712 /* System header to define __stub macros and hopefully few prototypes,
8713     which can conflict with char $ac_func (); below.  */
8714 #include <assert.h>
8715 /* Override any gcc2 internal prototype to avoid an error.  */
8716 #ifdef __cplusplus
8717 extern "C"
8718 #endif
8719 /* We use char because int might match the return type of a gcc2
8720    builtin and then its argument prototype would still apply.  */
8721 char $ac_func ();
8722 char (*f) ();
8723
8724 int
8725 main ()
8726 {
8727 /* The GNU C library defines this for functions which it implements
8728     to always fail with ENOSYS.  Some functions are actually named
8729     something starting with __ and the normal name is an alias.  */
8730 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8731 choke me
8732 #else
8733 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8734 #endif
8735
8736   ;
8737   return 0;
8738 }
8739 _ACEOF
8740 rm -f conftest.$ac_objext conftest$ac_exeext
8741 if { (eval echo "$as_me:8741: \"$ac_link\"") >&5
8742   (eval $ac_link) 2>&5
8743   ac_status=$?
8744   echo "$as_me:8744: \$? = $ac_status" >&5
8745   (exit $ac_status); } &&
8746          { ac_try='test -s conftest$ac_exeext'
8747   { (eval echo "$as_me:8747: \"$ac_try\"") >&5
8748   (eval $ac_try) 2>&5
8749   ac_status=$?
8750   echo "$as_me:8750: \$? = $ac_status" >&5
8751   (exit $ac_status); }; }; then
8752   eval "$as_ac_var=yes"
8753 else
8754   echo "$as_me: failed program was:" >&5
8755 cat conftest.$ac_ext >&5
8756 eval "$as_ac_var=no"
8757 fi
8758 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8759 fi
8760 echo "$as_me:8760: result: `eval echo '${'$as_ac_var'}'`" >&5
8761 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8762 if test `eval echo '${'$as_ac_var'}'` = yes; then
8763   cat >>confdefs.h <<EOF
8764 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8765 EOF
8766
8767 fi
8768 done
8769
8770         if test "x$ac_cv_func_putwc" != xyes ; then
8771
8772 echo "$as_me:8772: checking for multibyte character support" >&5
8773 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8774 if test "${cf_cv_utf8_lib+set}" = set; then
8775   echo $ECHO_N "(cached) $ECHO_C" >&6
8776 else
8777
8778         cf_save_LIBS="$LIBS"
8779         cat >conftest.$ac_ext <<_ACEOF
8780 #line 8780 "configure"
8781 #include "confdefs.h"
8782
8783 #include <stdlib.h>
8784 int
8785 main ()
8786 {
8787 putwc(0,0);
8788   ;
8789   return 0;
8790 }
8791 _ACEOF
8792 rm -f conftest.$ac_objext conftest$ac_exeext
8793 if { (eval echo "$as_me:8793: \"$ac_link\"") >&5
8794   (eval $ac_link) 2>&5
8795   ac_status=$?
8796   echo "$as_me:8796: \$? = $ac_status" >&5
8797   (exit $ac_status); } &&
8798          { ac_try='test -s conftest$ac_exeext'
8799   { (eval echo "$as_me:8799: \"$ac_try\"") >&5
8800   (eval $ac_try) 2>&5
8801   ac_status=$?
8802   echo "$as_me:8802: \$? = $ac_status" >&5
8803   (exit $ac_status); }; }; then
8804   cf_cv_utf8_lib=yes
8805 else
8806   echo "$as_me: failed program was:" >&5
8807 cat conftest.$ac_ext >&5
8808
8809 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8810 # will be set on completion of the AC_TRY_LINK below.
8811 cf_cv_header_path_utf8=
8812 cf_cv_library_path_utf8=
8813
8814 echo "${as_me:-configure}:8814: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8815
8816 cf_save_LIBS="$LIBS"
8817
8818 cat >conftest.$ac_ext <<_ACEOF
8819 #line 8819 "configure"
8820 #include "confdefs.h"
8821
8822 #include <libutf8.h>
8823 int
8824 main ()
8825 {
8826 putwc(0,0);
8827   ;
8828   return 0;
8829 }
8830 _ACEOF
8831 rm -f conftest.$ac_objext conftest$ac_exeext
8832 if { (eval echo "$as_me:8832: \"$ac_link\"") >&5
8833   (eval $ac_link) 2>&5
8834   ac_status=$?
8835   echo "$as_me:8835: \$? = $ac_status" >&5
8836   (exit $ac_status); } &&
8837          { ac_try='test -s conftest$ac_exeext'
8838   { (eval echo "$as_me:8838: \"$ac_try\"") >&5
8839   (eval $ac_try) 2>&5
8840   ac_status=$?
8841   echo "$as_me:8841: \$? = $ac_status" >&5
8842   (exit $ac_status); }; }; then
8843
8844         cf_cv_find_linkage_utf8=yes
8845         cf_cv_header_path_utf8=/usr/include
8846         cf_cv_library_path_utf8=/usr/lib
8847
8848 else
8849   echo "$as_me: failed program was:" >&5
8850 cat conftest.$ac_ext >&5
8851
8852 LIBS="-lutf8  $cf_save_LIBS"
8853
8854 cat >conftest.$ac_ext <<_ACEOF
8855 #line 8855 "configure"
8856 #include "confdefs.h"
8857
8858 #include <libutf8.h>
8859 int
8860 main ()
8861 {
8862 putwc(0,0);
8863   ;
8864   return 0;
8865 }
8866 _ACEOF
8867 rm -f conftest.$ac_objext conftest$ac_exeext
8868 if { (eval echo "$as_me:8868: \"$ac_link\"") >&5
8869   (eval $ac_link) 2>&5
8870   ac_status=$?
8871   echo "$as_me:8871: \$? = $ac_status" >&5
8872   (exit $ac_status); } &&
8873          { ac_try='test -s conftest$ac_exeext'
8874   { (eval echo "$as_me:8874: \"$ac_try\"") >&5
8875   (eval $ac_try) 2>&5
8876   ac_status=$?
8877   echo "$as_me:8877: \$? = $ac_status" >&5
8878   (exit $ac_status); }; }; then
8879
8880         cf_cv_find_linkage_utf8=yes
8881         cf_cv_header_path_utf8=/usr/include
8882         cf_cv_library_path_utf8=/usr/lib
8883         cf_cv_library_file_utf8="-lutf8"
8884
8885 else
8886   echo "$as_me: failed program was:" >&5
8887 cat conftest.$ac_ext >&5
8888
8889         cf_cv_find_linkage_utf8=no
8890         LIBS="$cf_save_LIBS"
8891
8892     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8893
8894 echo "${as_me:-configure}:8894: testing find linkage for utf8 library ..." 1>&5
8895
8896 echo "${as_me:-configure}:8896: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8897
8898     cf_save_CPPFLAGS="$CPPFLAGS"
8899     cf_test_CPPFLAGS="$CPPFLAGS"
8900
8901 cf_search=
8902
8903 # collect the current set of include-directories from compiler flags
8904 cf_header_path_list=""
8905 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8906         for cf_header_path in $CPPFLAGS $CFLAGS
8907         do
8908                 case $cf_header_path in #(vi
8909                 -I*)
8910                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8911
8912 test "$cf_header_path" != "NONE" && \
8913 test -d "$cf_header_path" && \
8914  {
8915         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8916         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8917         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8918         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8919         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8920         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8921 }
8922
8923                         cf_header_path_list="$cf_header_path_list $cf_search"
8924                         ;;
8925                 esac
8926         done
8927 fi
8928
8929 # add the variations for the package we are looking for
8930
8931 cf_search=
8932
8933 test "/usr" != "$prefix" && \
8934 test -d "/usr" && \
8935 (test $prefix = NONE || test "/usr" != "$prefix") && {
8936         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8937         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8938         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8939         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8940         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8941         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8942 }
8943
8944 test "$prefix" != "NONE" && \
8945 test -d "$prefix" && \
8946  {
8947         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8948         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8949         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8950         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8951         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8952         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8953 }
8954
8955 test "/usr/local" != "$prefix" && \
8956 test -d "/usr/local" && \
8957 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8958         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8959         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8960         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8961         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8962         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8963         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8964 }
8965
8966 test "/opt" != "$prefix" && \
8967 test -d "/opt" && \
8968 (test $prefix = NONE || test "/opt" != "$prefix") && {
8969         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8970         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8971         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8972         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8973         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8974         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8975 }
8976
8977 test "$HOME" != "$prefix" && \
8978 test -d "$HOME" && \
8979 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8980         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8981         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8982         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8983         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8984         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8985         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8986 }
8987
8988 test "$includedir" != NONE && \
8989 test "$includedir" != "/usr/include" && \
8990 test -d "$includedir" && {
8991         test -d $includedir &&    cf_search="$cf_search $includedir"
8992         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8993 }
8994
8995 test "$oldincludedir" != NONE && \
8996 test "$oldincludedir" != "/usr/include" && \
8997 test -d "$oldincludedir" && {
8998         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8999         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9000 }
9001
9002 cf_search="$cf_search $cf_header_path_list"
9003
9004     for cf_cv_header_path_utf8 in $cf_search
9005     do
9006       if test -d $cf_cv_header_path_utf8 ; then
9007         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9008
9009 echo "${as_me:-configure}:9009: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9010
9011         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9012         cat >conftest.$ac_ext <<_ACEOF
9013 #line 9013 "configure"
9014 #include "confdefs.h"
9015
9016 #include <libutf8.h>
9017 int
9018 main ()
9019 {
9020 putwc(0,0);
9021   ;
9022   return 0;
9023 }
9024 _ACEOF
9025 rm -f conftest.$ac_objext
9026 if { (eval echo "$as_me:9026: \"$ac_compile\"") >&5
9027   (eval $ac_compile) 2>&5
9028   ac_status=$?
9029   echo "$as_me:9029: \$? = $ac_status" >&5
9030   (exit $ac_status); } &&
9031          { ac_try='test -s conftest.$ac_objext'
9032   { (eval echo "$as_me:9032: \"$ac_try\"") >&5
9033   (eval $ac_try) 2>&5
9034   ac_status=$?
9035   echo "$as_me:9035: \$? = $ac_status" >&5
9036   (exit $ac_status); }; }; then
9037
9038             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9039
9040 echo "${as_me:-configure}:9040: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9041
9042             cf_cv_find_linkage_utf8=maybe
9043             cf_test_CPPFLAGS="$CPPFLAGS"
9044             break
9045 else
9046   echo "$as_me: failed program was:" >&5
9047 cat conftest.$ac_ext >&5
9048
9049             CPPFLAGS="$cf_save_CPPFLAGS"
9050
9051 fi
9052 rm -f conftest.$ac_objext conftest.$ac_ext
9053       fi
9054     done
9055
9056     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9057
9058 echo "${as_me:-configure}:9058: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9059
9060       cf_save_LIBS="$LIBS"
9061       cf_save_LDFLAGS="$LDFLAGS"
9062
9063       if test "$cf_cv_find_linkage_utf8" != yes ; then
9064
9065 cf_search=
9066 cf_library_path_list=""
9067 if test -n "${LDFLAGS}${LIBS}" ; then
9068         for cf_library_path in $LDFLAGS $LIBS
9069         do
9070                 case $cf_library_path in #(vi
9071                 -L*)
9072                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9073
9074 test "$cf_library_path" != "NONE" && \
9075 test -d "$cf_library_path" && \
9076  {
9077         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9078         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9079         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9080         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9081         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9082         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9083 }
9084
9085                         cf_library_path_list="$cf_library_path_list $cf_search"
9086                         ;;
9087                 esac
9088         done
9089 fi
9090
9091 cf_search=
9092
9093 test "/usr" != "$prefix" && \
9094 test -d "/usr" && \
9095 (test $prefix = NONE || test "/usr" != "$prefix") && {
9096         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9097         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9098         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9099         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9100         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9101         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9102 }
9103
9104 test "$prefix" != "NONE" && \
9105 test -d "$prefix" && \
9106  {
9107         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9108         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9109         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9110         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9111         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9112         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9113 }
9114
9115 test "/usr/local" != "$prefix" && \
9116 test -d "/usr/local" && \
9117 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9118         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9119         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9120         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9121         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9122         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9123         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9124 }
9125
9126 test "/opt" != "$prefix" && \
9127 test -d "/opt" && \
9128 (test $prefix = NONE || test "/opt" != "$prefix") && {
9129         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9130         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9131         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9132         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9133         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9134         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9135 }
9136
9137 test "$HOME" != "$prefix" && \
9138 test -d "$HOME" && \
9139 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9140         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9141         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9142         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9143         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9144         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9145         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9146 }
9147
9148 cf_search="$cf_library_path_list $cf_search"
9149
9150         for cf_cv_library_path_utf8 in $cf_search
9151         do
9152           if test -d $cf_cv_library_path_utf8 ; then
9153             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9154
9155 echo "${as_me:-configure}:9155: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9156
9157             CPPFLAGS="$cf_test_CPPFLAGS"
9158             LIBS="-lutf8  $cf_save_LIBS"
9159             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9160             cat >conftest.$ac_ext <<_ACEOF
9161 #line 9161 "configure"
9162 #include "confdefs.h"
9163
9164 #include <libutf8.h>
9165 int
9166 main ()
9167 {
9168 putwc(0,0);
9169   ;
9170   return 0;
9171 }
9172 _ACEOF
9173 rm -f conftest.$ac_objext conftest$ac_exeext
9174 if { (eval echo "$as_me:9174: \"$ac_link\"") >&5
9175   (eval $ac_link) 2>&5
9176   ac_status=$?
9177   echo "$as_me:9177: \$? = $ac_status" >&5
9178   (exit $ac_status); } &&
9179          { ac_try='test -s conftest$ac_exeext'
9180   { (eval echo "$as_me:9180: \"$ac_try\"") >&5
9181   (eval $ac_try) 2>&5
9182   ac_status=$?
9183   echo "$as_me:9183: \$? = $ac_status" >&5
9184   (exit $ac_status); }; }; then
9185
9186                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9187
9188 echo "${as_me:-configure}:9188: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9189
9190                 cf_cv_find_linkage_utf8=yes
9191                 cf_cv_library_file_utf8="-lutf8"
9192                 break
9193 else
9194   echo "$as_me: failed program was:" >&5
9195 cat conftest.$ac_ext >&5
9196
9197                 CPPFLAGS="$cf_save_CPPFLAGS"
9198                 LIBS="$cf_save_LIBS"
9199                 LDFLAGS="$cf_save_LDFLAGS"
9200
9201 fi
9202 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9203           fi
9204         done
9205         CPPFLAGS="$cf_save_CPPFLAGS"
9206         LDFLAGS="$cf_save_LDFLAGS"
9207       fi
9208
9209     else
9210       cf_cv_find_linkage_utf8=no
9211     fi
9212
9213 fi
9214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9215
9216 fi
9217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9218
9219 LIBS="$cf_save_LIBS"
9220
9221 if test "$cf_cv_find_linkage_utf8" = yes ; then
9222 cf_cv_utf8_lib=add-on
9223 else
9224 cf_cv_utf8_lib=no
9225 fi
9226
9227 fi
9228 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9229 fi
9230 echo "$as_me:9230: result: $cf_cv_utf8_lib" >&5
9231 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9232
9233 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9234 # ncurses/ncursesw:
9235 if test "$cf_cv_utf8_lib" = "add-on" ; then
9236
9237 cat >>confdefs.h <<\EOF
9238 #define HAVE_LIBUTF8_H 1
9239 EOF
9240
9241 if test -n "$cf_cv_header_path_utf8" ; then
9242   for cf_add_incdir in $cf_cv_header_path_utf8
9243   do
9244         while test $cf_add_incdir != /usr/include
9245         do
9246           if test -d $cf_add_incdir
9247           then
9248                 cf_have_incdir=no
9249                 if test -n "$CFLAGS$CPPFLAGS" ; then
9250                   # a loop is needed to ensure we can add subdirs of existing dirs
9251                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9252                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9253                           cf_have_incdir=yes; break
9254                         fi
9255                   done
9256                 fi
9257
9258                 if test "$cf_have_incdir" = no ; then
9259                   if test "$cf_add_incdir" = /usr/local/include ; then
9260                         if test "$GCC" = yes
9261                         then
9262                           cf_save_CPPFLAGS=$CPPFLAGS
9263                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9264                           cat >conftest.$ac_ext <<_ACEOF
9265 #line 9265 "configure"
9266 #include "confdefs.h"
9267 #include <stdio.h>
9268 int
9269 main ()
9270 {
9271 printf("Hello")
9272   ;
9273   return 0;
9274 }
9275 _ACEOF
9276 rm -f conftest.$ac_objext
9277 if { (eval echo "$as_me:9277: \"$ac_compile\"") >&5
9278   (eval $ac_compile) 2>&5
9279   ac_status=$?
9280   echo "$as_me:9280: \$? = $ac_status" >&5
9281   (exit $ac_status); } &&
9282          { ac_try='test -s conftest.$ac_objext'
9283   { (eval echo "$as_me:9283: \"$ac_try\"") >&5
9284   (eval $ac_try) 2>&5
9285   ac_status=$?
9286   echo "$as_me:9286: \$? = $ac_status" >&5
9287   (exit $ac_status); }; }; then
9288   :
9289 else
9290   echo "$as_me: failed program was:" >&5
9291 cat conftest.$ac_ext >&5
9292 cf_have_incdir=yes
9293 fi
9294 rm -f conftest.$ac_objext conftest.$ac_ext
9295                           CPPFLAGS=$cf_save_CPPFLAGS
9296                         fi
9297                   fi
9298                 fi
9299
9300                 if test "$cf_have_incdir" = no ; then
9301                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9302
9303 echo "${as_me:-configure}:9303: testing adding $cf_add_incdir to include-path ..." 1>&5
9304
9305                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9306
9307                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9308                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9309                   cf_add_incdir="$cf_top_incdir"
9310                 else
9311                   break
9312                 fi
9313           fi
9314         done
9315   done
9316 fi
9317
9318 if test -n "$cf_cv_library_path_utf8" ; then
9319   for cf_add_libdir in $cf_cv_library_path_utf8
9320   do
9321     if test $cf_add_libdir = /usr/lib ; then
9322       :
9323     elif test -d $cf_add_libdir
9324     then
9325       cf_have_libdir=no
9326       if test -n "$LDFLAGS$LIBS" ; then
9327         # a loop is needed to ensure we can add subdirs of existing dirs
9328         for cf_test_libdir in $LDFLAGS $LIBS ; do
9329           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9330             cf_have_libdir=yes; break
9331           fi
9332         done
9333       fi
9334       if test "$cf_have_libdir" = no ; then
9335         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9336
9337 echo "${as_me:-configure}:9337: testing adding $cf_add_libdir to library-path ..." 1>&5
9338
9339         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9340       fi
9341     fi
9342   done
9343 fi
9344
9345         LIBS="$cf_cv_library_file_utf8 $LIBS"
9346 fi
9347
9348                 if test "$cf_cv_utf8_lib" != no ; then
9349                         NCURSES_LIBUTF8=1
9350                 fi
9351         fi
9352
9353 # This is needed on Tru64 5.0 to declare mbstate_t
9354 echo "$as_me:9354: checking if we must include wchar.h to declare mbstate_t" >&5
9355 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9356 if test "${cf_cv_mbstate_t+set}" = set; then
9357   echo $ECHO_N "(cached) $ECHO_C" >&6
9358 else
9359
9360 cat >conftest.$ac_ext <<_ACEOF
9361 #line 9361 "configure"
9362 #include "confdefs.h"
9363
9364 #include <stdlib.h>
9365 #include <stdarg.h>
9366 #include <stdio.h>
9367 #ifdef HAVE_LIBUTF8_H
9368 #include <libutf8.h>
9369 #endif
9370 int
9371 main ()
9372 {
9373 mbstate_t state
9374   ;
9375   return 0;
9376 }
9377 _ACEOF
9378 rm -f conftest.$ac_objext
9379 if { (eval echo "$as_me:9379: \"$ac_compile\"") >&5
9380   (eval $ac_compile) 2>&5
9381   ac_status=$?
9382   echo "$as_me:9382: \$? = $ac_status" >&5
9383   (exit $ac_status); } &&
9384          { ac_try='test -s conftest.$ac_objext'
9385   { (eval echo "$as_me:9385: \"$ac_try\"") >&5
9386   (eval $ac_try) 2>&5
9387   ac_status=$?
9388   echo "$as_me:9388: \$? = $ac_status" >&5
9389   (exit $ac_status); }; }; then
9390   cf_cv_mbstate_t=no
9391 else
9392   echo "$as_me: failed program was:" >&5
9393 cat conftest.$ac_ext >&5
9394 cat >conftest.$ac_ext <<_ACEOF
9395 #line 9395 "configure"
9396 #include "confdefs.h"
9397
9398 #include <stdlib.h>
9399 #include <stdarg.h>
9400 #include <stdio.h>
9401 #include <wchar.h>
9402 #ifdef HAVE_LIBUTF8_H
9403 #include <libutf8.h>
9404 #endif
9405 int
9406 main ()
9407 {
9408 mbstate_t value
9409   ;
9410   return 0;
9411 }
9412 _ACEOF
9413 rm -f conftest.$ac_objext
9414 if { (eval echo "$as_me:9414: \"$ac_compile\"") >&5
9415   (eval $ac_compile) 2>&5
9416   ac_status=$?
9417   echo "$as_me:9417: \$? = $ac_status" >&5
9418   (exit $ac_status); } &&
9419          { ac_try='test -s conftest.$ac_objext'
9420   { (eval echo "$as_me:9420: \"$ac_try\"") >&5
9421   (eval $ac_try) 2>&5
9422   ac_status=$?
9423   echo "$as_me:9423: \$? = $ac_status" >&5
9424   (exit $ac_status); }; }; then
9425   cf_cv_mbstate_t=yes
9426 else
9427   echo "$as_me: failed program was:" >&5
9428 cat conftest.$ac_ext >&5
9429 cf_cv_mbstate_t=unknown
9430 fi
9431 rm -f conftest.$ac_objext conftest.$ac_ext
9432 fi
9433 rm -f conftest.$ac_objext conftest.$ac_ext
9434 fi
9435 echo "$as_me:9435: result: $cf_cv_mbstate_t" >&5
9436 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9437
9438 if test "$cf_cv_mbstate_t" = yes ; then
9439
9440 cat >>confdefs.h <<\EOF
9441 #define NEED_WCHAR_H 1
9442 EOF
9443
9444         NEED_WCHAR_H=1
9445 fi
9446
9447 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9448 if test "$cf_cv_mbstate_t" = unknown ; then
9449         NCURSES_MBSTATE_T=1
9450 fi
9451
9452 # This is needed on Tru64 5.0 to declare wchar_t
9453 echo "$as_me:9453: checking if we must include wchar.h to declare wchar_t" >&5
9454 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9455 if test "${cf_cv_wchar_t+set}" = set; then
9456   echo $ECHO_N "(cached) $ECHO_C" >&6
9457 else
9458
9459 cat >conftest.$ac_ext <<_ACEOF
9460 #line 9460 "configure"
9461 #include "confdefs.h"
9462
9463 #include <stdlib.h>
9464 #include <stdarg.h>
9465 #include <stdio.h>
9466 #ifdef HAVE_LIBUTF8_H
9467 #include <libutf8.h>
9468 #endif
9469 int
9470 main ()
9471 {
9472 wchar_t state
9473   ;
9474   return 0;
9475 }
9476 _ACEOF
9477 rm -f conftest.$ac_objext
9478 if { (eval echo "$as_me:9478: \"$ac_compile\"") >&5
9479   (eval $ac_compile) 2>&5
9480   ac_status=$?
9481   echo "$as_me:9481: \$? = $ac_status" >&5
9482   (exit $ac_status); } &&
9483          { ac_try='test -s conftest.$ac_objext'
9484   { (eval echo "$as_me:9484: \"$ac_try\"") >&5
9485   (eval $ac_try) 2>&5
9486   ac_status=$?
9487   echo "$as_me:9487: \$? = $ac_status" >&5
9488   (exit $ac_status); }; }; then
9489   cf_cv_wchar_t=no
9490 else
9491   echo "$as_me: failed program was:" >&5
9492 cat conftest.$ac_ext >&5
9493 cat >conftest.$ac_ext <<_ACEOF
9494 #line 9494 "configure"
9495 #include "confdefs.h"
9496
9497 #include <stdlib.h>
9498 #include <stdarg.h>
9499 #include <stdio.h>
9500 #include <wchar.h>
9501 #ifdef HAVE_LIBUTF8_H
9502 #include <libutf8.h>
9503 #endif
9504 int
9505 main ()
9506 {
9507 wchar_t value
9508   ;
9509   return 0;
9510 }
9511 _ACEOF
9512 rm -f conftest.$ac_objext
9513 if { (eval echo "$as_me:9513: \"$ac_compile\"") >&5
9514   (eval $ac_compile) 2>&5
9515   ac_status=$?
9516   echo "$as_me:9516: \$? = $ac_status" >&5
9517   (exit $ac_status); } &&
9518          { ac_try='test -s conftest.$ac_objext'
9519   { (eval echo "$as_me:9519: \"$ac_try\"") >&5
9520   (eval $ac_try) 2>&5
9521   ac_status=$?
9522   echo "$as_me:9522: \$? = $ac_status" >&5
9523   (exit $ac_status); }; }; then
9524   cf_cv_wchar_t=yes
9525 else
9526   echo "$as_me: failed program was:" >&5
9527 cat conftest.$ac_ext >&5
9528 cf_cv_wchar_t=unknown
9529 fi
9530 rm -f conftest.$ac_objext conftest.$ac_ext
9531 fi
9532 rm -f conftest.$ac_objext conftest.$ac_ext
9533 fi
9534 echo "$as_me:9534: result: $cf_cv_wchar_t" >&5
9535 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9536
9537 if test "$cf_cv_wchar_t" = yes ; then
9538
9539 cat >>confdefs.h <<\EOF
9540 #define NEED_WCHAR_H 1
9541 EOF
9542
9543         NEED_WCHAR_H=1
9544 fi
9545
9546 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9547 if test "$cf_cv_wchar_t" = unknown ; then
9548         NCURSES_WCHAR_T=1
9549 fi
9550
9551 # if we find wchar_t in either place, use substitution to provide a fallback.
9552 if test "$cf_cv_wchar_t" != unknown ; then
9553         NCURSES_OK_WCHAR_T=1
9554 fi
9555
9556 # This is needed on Tru64 5.0 to declare wint_t
9557 echo "$as_me:9557: checking if we must include wchar.h to declare wint_t" >&5
9558 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9559 if test "${cf_cv_wint_t+set}" = set; then
9560   echo $ECHO_N "(cached) $ECHO_C" >&6
9561 else
9562
9563 cat >conftest.$ac_ext <<_ACEOF
9564 #line 9564 "configure"
9565 #include "confdefs.h"
9566
9567 #include <stdlib.h>
9568 #include <stdarg.h>
9569 #include <stdio.h>
9570 #ifdef HAVE_LIBUTF8_H
9571 #include <libutf8.h>
9572 #endif
9573 int
9574 main ()
9575 {
9576 wint_t state
9577   ;
9578   return 0;
9579 }
9580 _ACEOF
9581 rm -f conftest.$ac_objext
9582 if { (eval echo "$as_me:9582: \"$ac_compile\"") >&5
9583   (eval $ac_compile) 2>&5
9584   ac_status=$?
9585   echo "$as_me:9585: \$? = $ac_status" >&5
9586   (exit $ac_status); } &&
9587          { ac_try='test -s conftest.$ac_objext'
9588   { (eval echo "$as_me:9588: \"$ac_try\"") >&5
9589   (eval $ac_try) 2>&5
9590   ac_status=$?
9591   echo "$as_me:9591: \$? = $ac_status" >&5
9592   (exit $ac_status); }; }; then
9593   cf_cv_wint_t=no
9594 else
9595   echo "$as_me: failed program was:" >&5
9596 cat conftest.$ac_ext >&5
9597 cat >conftest.$ac_ext <<_ACEOF
9598 #line 9598 "configure"
9599 #include "confdefs.h"
9600
9601 #include <stdlib.h>
9602 #include <stdarg.h>
9603 #include <stdio.h>
9604 #include <wchar.h>
9605 #ifdef HAVE_LIBUTF8_H
9606 #include <libutf8.h>
9607 #endif
9608 int
9609 main ()
9610 {
9611 wint_t value
9612   ;
9613   return 0;
9614 }
9615 _ACEOF
9616 rm -f conftest.$ac_objext
9617 if { (eval echo "$as_me:9617: \"$ac_compile\"") >&5
9618   (eval $ac_compile) 2>&5
9619   ac_status=$?
9620   echo "$as_me:9620: \$? = $ac_status" >&5
9621   (exit $ac_status); } &&
9622          { ac_try='test -s conftest.$ac_objext'
9623   { (eval echo "$as_me:9623: \"$ac_try\"") >&5
9624   (eval $ac_try) 2>&5
9625   ac_status=$?
9626   echo "$as_me:9626: \$? = $ac_status" >&5
9627   (exit $ac_status); }; }; then
9628   cf_cv_wint_t=yes
9629 else
9630   echo "$as_me: failed program was:" >&5
9631 cat conftest.$ac_ext >&5
9632 cf_cv_wint_t=unknown
9633 fi
9634 rm -f conftest.$ac_objext conftest.$ac_ext
9635 fi
9636 rm -f conftest.$ac_objext conftest.$ac_ext
9637 fi
9638 echo "$as_me:9638: result: $cf_cv_wint_t" >&5
9639 echo "${ECHO_T}$cf_cv_wint_t" >&6
9640
9641 if test "$cf_cv_wint_t" = yes ; then
9642
9643 cat >>confdefs.h <<\EOF
9644 #define NEED_WCHAR_H 1
9645 EOF
9646
9647         NEED_WCHAR_H=1
9648 fi
9649
9650 # if we do not find wint_t in either place, use substitution to provide a fallback.
9651 if test "$cf_cv_wint_t" = unknown ; then
9652         NCURSES_WINT_T=1
9653 fi
9654
9655 # if we find wint_t in either place, use substitution to provide a fallback.
9656 if test "$cf_cv_wint_t" != unknown ; then
9657         NCURSES_OK_WINT_T=1
9658 fi
9659
9660         if test "$NCURSES_MBSTATE_T" != 0; then
9661
9662 cat >>confdefs.h <<\EOF
9663 #define NEED_MBSTATE_T_DEF 1
9664 EOF
9665
9666         fi
9667 fi
9668
9669 ###   use option --disable-lp64 to allow long chtype
9670 case $cf_cv_abi_version in
9671 [345]*)
9672         default_with_lp64=no
9673         ;;
9674 *)
9675         default_with_lp64=yes
9676         ;;
9677 esac
9678
9679 echo "$as_me:9679: checking whether to enable _LP64 definition in curses.h" >&5
9680 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9681
9682 # Check whether --enable-lp64 or --disable-lp64 was given.
9683 if test "${enable_lp64+set}" = set; then
9684   enableval="$enable_lp64"
9685   with_lp64=$enableval
9686 else
9687   with_lp64=$default_with_lp64
9688 fi;
9689 echo "$as_me:9689: result: $with_lp64" >&5
9690 echo "${ECHO_T}$with_lp64" >&6
9691
9692 if test "x$with_lp64" = xyes ; then
9693         cf_cv_enable_lp64=1
9694 else
9695         cf_cv_enable_lp64=0
9696 fi
9697
9698 # Check whether --enable-largefile or --disable-largefile was given.
9699 if test "${enable_largefile+set}" = set; then
9700   enableval="$enable_largefile"
9701
9702 fi;
9703 if test "$enable_largefile" != no; then
9704
9705   echo "$as_me:9705: checking for special C compiler options needed for large files" >&5
9706 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9707 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9708   echo $ECHO_N "(cached) $ECHO_C" >&6
9709 else
9710   ac_cv_sys_largefile_CC=no
9711      if test "$GCC" != yes; then
9712        ac_save_CC=$CC
9713        while :; do
9714          # IRIX 6.2 and later do not support large files by default,
9715          # so use the C compiler's -n32 option if that helps.
9716          cat >conftest.$ac_ext <<_ACEOF
9717 #line 9717 "configure"
9718 #include "confdefs.h"
9719 #include <sys/types.h>
9720  /* Check that off_t can represent 2**63 - 1 correctly.
9721     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9722     since some C++ compilers masquerading as C compilers
9723     incorrectly reject 9223372036854775807.  */
9724 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9725   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9726                        && LARGE_OFF_T % 2147483647 == 1)
9727                       ? 1 : -1];
9728 int
9729 main ()
9730 {
9731
9732   ;
9733   return 0;
9734 }
9735 _ACEOF
9736          rm -f conftest.$ac_objext
9737 if { (eval echo "$as_me:9737: \"$ac_compile\"") >&5
9738   (eval $ac_compile) 2>&5
9739   ac_status=$?
9740   echo "$as_me:9740: \$? = $ac_status" >&5
9741   (exit $ac_status); } &&
9742          { ac_try='test -s conftest.$ac_objext'
9743   { (eval echo "$as_me:9743: \"$ac_try\"") >&5
9744   (eval $ac_try) 2>&5
9745   ac_status=$?
9746   echo "$as_me:9746: \$? = $ac_status" >&5
9747   (exit $ac_status); }; }; then
9748   break
9749 else
9750   echo "$as_me: failed program was:" >&5
9751 cat conftest.$ac_ext >&5
9752 fi
9753 rm -f conftest.$ac_objext
9754          CC="$CC -n32"
9755          rm -f conftest.$ac_objext
9756 if { (eval echo "$as_me:9756: \"$ac_compile\"") >&5
9757   (eval $ac_compile) 2>&5
9758   ac_status=$?
9759   echo "$as_me:9759: \$? = $ac_status" >&5
9760   (exit $ac_status); } &&
9761          { ac_try='test -s conftest.$ac_objext'
9762   { (eval echo "$as_me:9762: \"$ac_try\"") >&5
9763   (eval $ac_try) 2>&5
9764   ac_status=$?
9765   echo "$as_me:9765: \$? = $ac_status" >&5
9766   (exit $ac_status); }; }; then
9767   ac_cv_sys_largefile_CC=' -n32'; break
9768 else
9769   echo "$as_me: failed program was:" >&5
9770 cat conftest.$ac_ext >&5
9771 fi
9772 rm -f conftest.$ac_objext
9773          break
9774        done
9775        CC=$ac_save_CC
9776        rm -f conftest.$ac_ext
9777     fi
9778 fi
9779 echo "$as_me:9779: result: $ac_cv_sys_largefile_CC" >&5
9780 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9781   if test "$ac_cv_sys_largefile_CC" != no; then
9782     CC=$CC$ac_cv_sys_largefile_CC
9783   fi
9784
9785   echo "$as_me:9785: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9786 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9787 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9788   echo $ECHO_N "(cached) $ECHO_C" >&6
9789 else
9790   while :; do
9791   ac_cv_sys_file_offset_bits=no
9792   cat >conftest.$ac_ext <<_ACEOF
9793 #line 9793 "configure"
9794 #include "confdefs.h"
9795 #include <sys/types.h>
9796  /* Check that off_t can represent 2**63 - 1 correctly.
9797     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9798     since some C++ compilers masquerading as C compilers
9799     incorrectly reject 9223372036854775807.  */
9800 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9801   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9802                        && LARGE_OFF_T % 2147483647 == 1)
9803                       ? 1 : -1];
9804 int
9805 main ()
9806 {
9807
9808   ;
9809   return 0;
9810 }
9811 _ACEOF
9812 rm -f conftest.$ac_objext
9813 if { (eval echo "$as_me:9813: \"$ac_compile\"") >&5
9814   (eval $ac_compile) 2>&5
9815   ac_status=$?
9816   echo "$as_me:9816: \$? = $ac_status" >&5
9817   (exit $ac_status); } &&
9818          { ac_try='test -s conftest.$ac_objext'
9819   { (eval echo "$as_me:9819: \"$ac_try\"") >&5
9820   (eval $ac_try) 2>&5
9821   ac_status=$?
9822   echo "$as_me:9822: \$? = $ac_status" >&5
9823   (exit $ac_status); }; }; then
9824   break
9825 else
9826   echo "$as_me: failed program was:" >&5
9827 cat conftest.$ac_ext >&5
9828 fi
9829 rm -f conftest.$ac_objext conftest.$ac_ext
9830   cat >conftest.$ac_ext <<_ACEOF
9831 #line 9831 "configure"
9832 #include "confdefs.h"
9833 #define _FILE_OFFSET_BITS 64
9834 #include <sys/types.h>
9835  /* Check that off_t can represent 2**63 - 1 correctly.
9836     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9837     since some C++ compilers masquerading as C compilers
9838     incorrectly reject 9223372036854775807.  */
9839 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9840   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9841                        && LARGE_OFF_T % 2147483647 == 1)
9842                       ? 1 : -1];
9843 int
9844 main ()
9845 {
9846
9847   ;
9848   return 0;
9849 }
9850 _ACEOF
9851 rm -f conftest.$ac_objext
9852 if { (eval echo "$as_me:9852: \"$ac_compile\"") >&5
9853   (eval $ac_compile) 2>&5
9854   ac_status=$?
9855   echo "$as_me:9855: \$? = $ac_status" >&5
9856   (exit $ac_status); } &&
9857          { ac_try='test -s conftest.$ac_objext'
9858   { (eval echo "$as_me:9858: \"$ac_try\"") >&5
9859   (eval $ac_try) 2>&5
9860   ac_status=$?
9861   echo "$as_me:9861: \$? = $ac_status" >&5
9862   (exit $ac_status); }; }; then
9863   ac_cv_sys_file_offset_bits=64; break
9864 else
9865   echo "$as_me: failed program was:" >&5
9866 cat conftest.$ac_ext >&5
9867 fi
9868 rm -f conftest.$ac_objext conftest.$ac_ext
9869   break
9870 done
9871 fi
9872 echo "$as_me:9872: result: $ac_cv_sys_file_offset_bits" >&5
9873 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9874 if test "$ac_cv_sys_file_offset_bits" != no; then
9875
9876 cat >>confdefs.h <<EOF
9877 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9878 EOF
9879
9880 fi
9881 rm -rf conftest*
9882   echo "$as_me:9882: checking for _LARGE_FILES value needed for large files" >&5
9883 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9884 if test "${ac_cv_sys_large_files+set}" = set; then
9885   echo $ECHO_N "(cached) $ECHO_C" >&6
9886 else
9887   while :; do
9888   ac_cv_sys_large_files=no
9889   cat >conftest.$ac_ext <<_ACEOF
9890 #line 9890 "configure"
9891 #include "confdefs.h"
9892 #include <sys/types.h>
9893  /* Check that off_t can represent 2**63 - 1 correctly.
9894     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9895     since some C++ compilers masquerading as C compilers
9896     incorrectly reject 9223372036854775807.  */
9897 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9898   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9899                        && LARGE_OFF_T % 2147483647 == 1)
9900                       ? 1 : -1];
9901 int
9902 main ()
9903 {
9904
9905   ;
9906   return 0;
9907 }
9908 _ACEOF
9909 rm -f conftest.$ac_objext
9910 if { (eval echo "$as_me:9910: \"$ac_compile\"") >&5
9911   (eval $ac_compile) 2>&5
9912   ac_status=$?
9913   echo "$as_me:9913: \$? = $ac_status" >&5
9914   (exit $ac_status); } &&
9915          { ac_try='test -s conftest.$ac_objext'
9916   { (eval echo "$as_me:9916: \"$ac_try\"") >&5
9917   (eval $ac_try) 2>&5
9918   ac_status=$?
9919   echo "$as_me:9919: \$? = $ac_status" >&5
9920   (exit $ac_status); }; }; then
9921   break
9922 else
9923   echo "$as_me: failed program was:" >&5
9924 cat conftest.$ac_ext >&5
9925 fi
9926 rm -f conftest.$ac_objext conftest.$ac_ext
9927   cat >conftest.$ac_ext <<_ACEOF
9928 #line 9928 "configure"
9929 #include "confdefs.h"
9930 #define _LARGE_FILES 1
9931 #include <sys/types.h>
9932  /* Check that off_t can represent 2**63 - 1 correctly.
9933     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9934     since some C++ compilers masquerading as C compilers
9935     incorrectly reject 9223372036854775807.  */
9936 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9937   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9938                        && LARGE_OFF_T % 2147483647 == 1)
9939                       ? 1 : -1];
9940 int
9941 main ()
9942 {
9943
9944   ;
9945   return 0;
9946 }
9947 _ACEOF
9948 rm -f conftest.$ac_objext
9949 if { (eval echo "$as_me:9949: \"$ac_compile\"") >&5
9950   (eval $ac_compile) 2>&5
9951   ac_status=$?
9952   echo "$as_me:9952: \$? = $ac_status" >&5
9953   (exit $ac_status); } &&
9954          { ac_try='test -s conftest.$ac_objext'
9955   { (eval echo "$as_me:9955: \"$ac_try\"") >&5
9956   (eval $ac_try) 2>&5
9957   ac_status=$?
9958   echo "$as_me:9958: \$? = $ac_status" >&5
9959   (exit $ac_status); }; }; then
9960   ac_cv_sys_large_files=1; break
9961 else
9962   echo "$as_me: failed program was:" >&5
9963 cat conftest.$ac_ext >&5
9964 fi
9965 rm -f conftest.$ac_objext conftest.$ac_ext
9966   break
9967 done
9968 fi
9969 echo "$as_me:9969: result: $ac_cv_sys_large_files" >&5
9970 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9971 if test "$ac_cv_sys_large_files" != no; then
9972
9973 cat >>confdefs.h <<EOF
9974 #define _LARGE_FILES $ac_cv_sys_large_files
9975 EOF
9976
9977 fi
9978 rm -rf conftest*
9979 fi
9980
9981     if test "$enable_largefile" != no ; then
9982         echo "$as_me:9982: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9983 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9984 if test "${ac_cv_sys_largefile_source+set}" = set; then
9985   echo $ECHO_N "(cached) $ECHO_C" >&6
9986 else
9987   while :; do
9988   ac_cv_sys_largefile_source=no
9989   cat >conftest.$ac_ext <<_ACEOF
9990 #line 9990 "configure"
9991 #include "confdefs.h"
9992 #include <stdio.h>
9993 int
9994 main ()
9995 {
9996 return !fseeko;
9997   ;
9998   return 0;
9999 }
10000 _ACEOF
10001 rm -f conftest.$ac_objext
10002 if { (eval echo "$as_me:10002: \"$ac_compile\"") >&5
10003   (eval $ac_compile) 2>&5
10004   ac_status=$?
10005   echo "$as_me:10005: \$? = $ac_status" >&5
10006   (exit $ac_status); } &&
10007          { ac_try='test -s conftest.$ac_objext'
10008   { (eval echo "$as_me:10008: \"$ac_try\"") >&5
10009   (eval $ac_try) 2>&5
10010   ac_status=$?
10011   echo "$as_me:10011: \$? = $ac_status" >&5
10012   (exit $ac_status); }; }; then
10013   break
10014 else
10015   echo "$as_me: failed program was:" >&5
10016 cat conftest.$ac_ext >&5
10017 fi
10018 rm -f conftest.$ac_objext conftest.$ac_ext
10019   cat >conftest.$ac_ext <<_ACEOF
10020 #line 10020 "configure"
10021 #include "confdefs.h"
10022 #define _LARGEFILE_SOURCE 1
10023 #include <stdio.h>
10024 int
10025 main ()
10026 {
10027 return !fseeko;
10028   ;
10029   return 0;
10030 }
10031 _ACEOF
10032 rm -f conftest.$ac_objext
10033 if { (eval echo "$as_me:10033: \"$ac_compile\"") >&5
10034   (eval $ac_compile) 2>&5
10035   ac_status=$?
10036   echo "$as_me:10036: \$? = $ac_status" >&5
10037   (exit $ac_status); } &&
10038          { ac_try='test -s conftest.$ac_objext'
10039   { (eval echo "$as_me:10039: \"$ac_try\"") >&5
10040   (eval $ac_try) 2>&5
10041   ac_status=$?
10042   echo "$as_me:10042: \$? = $ac_status" >&5
10043   (exit $ac_status); }; }; then
10044   ac_cv_sys_largefile_source=1; break
10045 else
10046   echo "$as_me: failed program was:" >&5
10047 cat conftest.$ac_ext >&5
10048 fi
10049 rm -f conftest.$ac_objext conftest.$ac_ext
10050   break
10051 done
10052 fi
10053 echo "$as_me:10053: result: $ac_cv_sys_largefile_source" >&5
10054 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10055 if test "$ac_cv_sys_largefile_source" != no; then
10056
10057 cat >>confdefs.h <<EOF
10058 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10059 EOF
10060
10061 fi
10062 rm -rf conftest*
10063
10064 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10065 # in glibc 2.1.3, but that breaks too many other things.
10066 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10067 echo "$as_me:10067: checking for fseeko" >&5
10068 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10069 if test "${ac_cv_func_fseeko+set}" = set; then
10070   echo $ECHO_N "(cached) $ECHO_C" >&6
10071 else
10072   cat >conftest.$ac_ext <<_ACEOF
10073 #line 10073 "configure"
10074 #include "confdefs.h"
10075 #include <stdio.h>
10076 int
10077 main ()
10078 {
10079 return fseeko && fseeko (stdin, 0, 0);
10080   ;
10081   return 0;
10082 }
10083 _ACEOF
10084 rm -f conftest.$ac_objext conftest$ac_exeext
10085 if { (eval echo "$as_me:10085: \"$ac_link\"") >&5
10086   (eval $ac_link) 2>&5
10087   ac_status=$?
10088   echo "$as_me:10088: \$? = $ac_status" >&5
10089   (exit $ac_status); } &&
10090          { ac_try='test -s conftest$ac_exeext'
10091   { (eval echo "$as_me:10091: \"$ac_try\"") >&5
10092   (eval $ac_try) 2>&5
10093   ac_status=$?
10094   echo "$as_me:10094: \$? = $ac_status" >&5
10095   (exit $ac_status); }; }; then
10096   ac_cv_func_fseeko=yes
10097 else
10098   echo "$as_me: failed program was:" >&5
10099 cat conftest.$ac_ext >&5
10100 ac_cv_func_fseeko=no
10101 fi
10102 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10103 fi
10104 echo "$as_me:10104: result: $ac_cv_func_fseeko" >&5
10105 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10106 if test $ac_cv_func_fseeko = yes; then
10107
10108 cat >>confdefs.h <<\EOF
10109 #define HAVE_FSEEKO 1
10110 EOF
10111
10112 fi
10113
10114         # Normally we would collect these definitions in the config.h,
10115         # but (like _XOPEN_SOURCE), some environments rely on having these
10116         # defined before any of the system headers are included.  Another
10117         # case comes up with C++, e.g., on AIX the compiler compiles the
10118         # header files by themselves before looking at the body files it is
10119         # told to compile.  For ncurses, those header files do not include
10120         # the config.h
10121         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10122         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10123         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10124
10125         echo "$as_me:10125: checking whether to use struct dirent64" >&5
10126 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10127 if test "${cf_cv_struct_dirent64+set}" = set; then
10128   echo $ECHO_N "(cached) $ECHO_C" >&6
10129 else
10130
10131                 cat >conftest.$ac_ext <<_ACEOF
10132 #line 10132 "configure"
10133 #include "confdefs.h"
10134
10135 #include <sys/types.h>
10136 #include <dirent.h>
10137
10138 int
10139 main ()
10140 {
10141
10142                 /* if transitional largefile support is setup, this is true */
10143                 extern struct dirent64 * readdir(DIR *);
10144                 struct dirent64 *x = readdir((DIR *)0);
10145                 struct dirent *y = readdir((DIR *)0);
10146                 int z = x - y;
10147
10148   ;
10149   return 0;
10150 }
10151 _ACEOF
10152 rm -f conftest.$ac_objext
10153 if { (eval echo "$as_me:10153: \"$ac_compile\"") >&5
10154   (eval $ac_compile) 2>&5
10155   ac_status=$?
10156   echo "$as_me:10156: \$? = $ac_status" >&5
10157   (exit $ac_status); } &&
10158          { ac_try='test -s conftest.$ac_objext'
10159   { (eval echo "$as_me:10159: \"$ac_try\"") >&5
10160   (eval $ac_try) 2>&5
10161   ac_status=$?
10162   echo "$as_me:10162: \$? = $ac_status" >&5
10163   (exit $ac_status); }; }; then
10164   cf_cv_struct_dirent64=yes
10165 else
10166   echo "$as_me: failed program was:" >&5
10167 cat conftest.$ac_ext >&5
10168 cf_cv_struct_dirent64=no
10169 fi
10170 rm -f conftest.$ac_objext conftest.$ac_ext
10171
10172 fi
10173 echo "$as_me:10173: result: $cf_cv_struct_dirent64" >&5
10174 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10175         test "$cf_cv_struct_dirent64" = yes &&
10176 cat >>confdefs.h <<\EOF
10177 #define HAVE_STRUCT_DIRENT64 1
10178 EOF
10179
10180     fi
10181
10182 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10183 echo "$as_me:10183: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10184 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10185
10186 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10187 if test "${enable_tparm_varargs+set}" = set; then
10188   enableval="$enable_tparm_varargs"
10189   with_tparm_varargs=$enableval
10190 else
10191   with_tparm_varargs=yes
10192 fi;
10193 echo "$as_me:10193: result: $with_tparm_varargs" >&5
10194 echo "${ECHO_T}$with_tparm_varargs" >&6
10195 NCURSES_TPARM_VARARGS=0
10196 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10197
10198 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10199 if test "$with_ticlib" != no ; then
10200 echo "$as_me:10200: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10201 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10202
10203 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10204 if test "${enable_tic_depends+set}" = set; then
10205   enableval="$enable_tic_depends"
10206   with_tic_depends=$enableval
10207 else
10208   with_tic_depends=yes
10209 fi;
10210 echo "$as_me:10210: result: $with_tic_depends" >&5
10211 echo "${ECHO_T}$with_tic_depends" >&6
10212 else
10213         with_tic_depends=no
10214 fi
10215
10216 ###   use option --with-bool to override bool's type
10217 echo "$as_me:10217: checking for type of bool" >&5
10218 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10219
10220 # Check whether --with-bool or --without-bool was given.
10221 if test "${with_bool+set}" = set; then
10222   withval="$with_bool"
10223   NCURSES_BOOL="$withval"
10224 else
10225   NCURSES_BOOL=auto
10226 fi;
10227 echo "$as_me:10227: result: $NCURSES_BOOL" >&5
10228 echo "${ECHO_T}$NCURSES_BOOL" >&6
10229
10230 echo "$as_me:10230: checking for alternate terminal capabilities file" >&5
10231 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10232
10233 # Check whether --with-caps or --without-caps was given.
10234 if test "${with_caps+set}" = set; then
10235   withval="$with_caps"
10236   TERMINFO_CAPS=Caps.$withval
10237 else
10238   TERMINFO_CAPS=Caps
10239 fi;
10240 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10241 echo "$as_me:10241: result: $TERMINFO_CAPS" >&5
10242 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10243
10244 ###   use option --with-chtype to override chtype's type
10245 echo "$as_me:10245: checking for type of chtype" >&5
10246 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10247
10248 # Check whether --with-chtype or --without-chtype was given.
10249 if test "${with_chtype+set}" = set; then
10250   withval="$with_chtype"
10251   NCURSES_CHTYPE="$withval"
10252 else
10253   NCURSES_CHTYPE=auto
10254 fi;
10255 echo "$as_me:10255: result: $NCURSES_CHTYPE" >&5
10256 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10257
10258 ###   use option --with-ospeed to override ospeed's type
10259 echo "$as_me:10259: checking for type of ospeed" >&5
10260 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10261
10262 # Check whether --with-ospeed or --without-ospeed was given.
10263 if test "${with_ospeed+set}" = set; then
10264   withval="$with_ospeed"
10265   NCURSES_OSPEED="$withval"
10266 else
10267   NCURSES_OSPEED=short
10268 fi;
10269 echo "$as_me:10269: result: $NCURSES_OSPEED" >&5
10270 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10271
10272 ###   use option --with-mmask-t to override mmask_t's type
10273 echo "$as_me:10273: checking for type of mmask_t" >&5
10274 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10275
10276 # Check whether --with-mmask-t or --without-mmask-t was given.
10277 if test "${with_mmask_t+set}" = set; then
10278   withval="$with_mmask_t"
10279   NCURSES_MMASK_T="$withval"
10280 else
10281   NCURSES_MMASK_T=auto
10282 fi;
10283 echo "$as_me:10283: result: $NCURSES_MMASK_T" >&5
10284 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10285
10286 ###   use option --with-ccharw-max to override CCHARW_MAX size
10287 echo "$as_me:10287: checking for size CCHARW_MAX" >&5
10288 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10289
10290 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10291 if test "${with_ccharw_max+set}" = set; then
10292   withval="$with_ccharw_max"
10293   NCURSES_CCHARW_MAX="$withval"
10294 else
10295   NCURSES_CCHARW_MAX=5
10296 fi;
10297 echo "$as_me:10297: result: $NCURSES_CCHARW_MAX" >&5
10298 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10299
10300 ###   use option --with-tparm-arg to override tparm's argument type
10301 echo "$as_me:10301: checking for type of tparm args" >&5
10302 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10303
10304 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10305 if test "${with_tparm_arg+set}" = set; then
10306   withval="$with_tparm_arg"
10307   NCURSES_TPARM_ARG="$withval"
10308 else
10309   NCURSES_TPARM_ARG=long
10310 fi;
10311 echo "$as_me:10311: result: $NCURSES_TPARM_ARG" >&5
10312 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10313
10314 ### Enable compiling-in rcs id's
10315 echo "$as_me:10315: checking if RCS identifiers should be compiled-in" >&5
10316 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10317
10318 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10319 if test "${with_rcs_ids+set}" = set; then
10320   withval="$with_rcs_ids"
10321   with_rcs_ids=$withval
10322 else
10323   with_rcs_ids=no
10324 fi;
10325 echo "$as_me:10325: result: $with_rcs_ids" >&5
10326 echo "${ECHO_T}$with_rcs_ids" >&6
10327 test "x$with_rcs_ids" = xyes &&
10328 cat >>confdefs.h <<\EOF
10329 #define USE_RCS_IDS 1
10330 EOF
10331
10332 ###############################################################################
10333
10334 echo "$as_me:10334: checking format of man-pages" >&5
10335 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10336
10337 # Check whether --with-manpage-format or --without-manpage-format was given.
10338 if test "${with_manpage_format+set}" = set; then
10339   withval="$with_manpage_format"
10340   MANPAGE_FORMAT=$withval
10341 else
10342   MANPAGE_FORMAT=unknown
10343 fi;
10344
10345 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10346 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10347
10348 cf_unknown=
10349
10350 case $MANPAGE_FORMAT in
10351 unknown)
10352   if test -z "$MANPATH" ; then
10353     MANPATH="/usr/man:/usr/share/man"
10354   fi
10355
10356   # look for the 'date' man-page (it's most likely to be installed!)
10357   MANPAGE_FORMAT=
10358   cf_preform=no
10359   cf_catonly=yes
10360   cf_example=date
10361
10362   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10363   for cf_dir in $MANPATH; do
10364     test -z "$cf_dir" && cf_dir=/usr/man
10365     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
10366     do
10367       cf_test=`echo $cf_name | sed -e 's/*//'`
10368       if test "x$cf_test" = "x$cf_name" ; then
10369
10370         case "$cf_name" in
10371         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10372         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10373         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10374         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10375         esac
10376
10377         case "$cf_name" in
10378         $cf_dir/man*)
10379           cf_catonly=no
10380           ;;
10381         $cf_dir/cat*)
10382           cf_preform=yes
10383           ;;
10384         esac
10385         break
10386       fi
10387
10388       # if we found a match in either man* or cat*, stop looking
10389       if test -n "$MANPAGE_FORMAT" ; then
10390         cf_found=no
10391         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10392         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10393         case "$cf_name" in
10394         $cf_dir/cat*)
10395           cf_found=yes
10396           ;;
10397         esac
10398         test $cf_found=yes && break
10399       fi
10400     done
10401     # only check the first directory in $MANPATH where we find manpages
10402     if test -n "$MANPAGE_FORMAT" ; then
10403        break
10404     fi
10405   done
10406   # if we did not find the example, just assume it is normal
10407   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10408   IFS="$ac_save_ifs"
10409   ;;
10410 *)
10411   for cf_option in $MANPAGE_FORMAT; do
10412      case $cf_option in #(vi
10413      gzip|compress|BSDI|normal|formatted|catonly)
10414        ;;
10415      *)
10416        cf_unknown="$cf_unknown $cf_option"
10417        ;;
10418      esac
10419   done
10420   ;;
10421 esac
10422
10423 echo "$as_me:10423: result: $MANPAGE_FORMAT" >&5
10424 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10425 if test -n "$cf_unknown" ; then
10426   { echo "$as_me:10426: WARNING: Unexpected manpage-format $cf_unknown" >&5
10427 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10428 fi
10429
10430 echo "$as_me:10430: checking for manpage renaming" >&5
10431 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10432
10433 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10434 if test "${with_manpage_renames+set}" = set; then
10435   withval="$with_manpage_renames"
10436   MANPAGE_RENAMES=$withval
10437 else
10438   MANPAGE_RENAMES=yes
10439 fi;
10440
10441 case ".$MANPAGE_RENAMES" in #(vi
10442 .no) #(vi
10443   ;;
10444 .|.yes)
10445   # Debian 'man' program?
10446   if test -f /etc/debian_version ; then
10447     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10448   else
10449     MANPAGE_RENAMES=no
10450   fi
10451   ;;
10452 esac
10453
10454 if test "$MANPAGE_RENAMES" != no ; then
10455   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10456     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10457   elif test ! -f $MANPAGE_RENAMES ; then
10458     { { echo "$as_me:10458: error: not a filename: $MANPAGE_RENAMES" >&5
10459 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10460    { (exit 1); exit 1; }; }
10461   fi
10462
10463   test ! -d man && mkdir man
10464
10465   # Construct a sed-script to perform renaming within man-pages
10466   if test -n "$MANPAGE_RENAMES" ; then
10467     test ! -d man && mkdir man
10468     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10469   fi
10470 fi
10471
10472 echo "$as_me:10472: result: $MANPAGE_RENAMES" >&5
10473 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10474
10475 echo "$as_me:10475: checking if manpage aliases will be installed" >&5
10476 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10477
10478 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10479 if test "${with_manpage_aliases+set}" = set; then
10480   withval="$with_manpage_aliases"
10481   MANPAGE_ALIASES=$withval
10482 else
10483   MANPAGE_ALIASES=yes
10484 fi;
10485
10486 echo "$as_me:10486: result: $MANPAGE_ALIASES" >&5
10487 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10488
10489 case "x$LN_S" in #(vi
10490 xln*) #(vi
10491         cf_use_symlinks=yes
10492         ;;
10493 *)
10494         cf_use_symlinks=no
10495         ;;
10496 esac
10497
10498 MANPAGE_SYMLINKS=no
10499 if test "$MANPAGE_ALIASES" = yes ; then
10500 echo "$as_me:10500: checking if manpage symlinks should be used" >&5
10501 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10502
10503 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10504 if test "${with_manpage_symlinks+set}" = set; then
10505   withval="$with_manpage_symlinks"
10506   MANPAGE_SYMLINKS=$withval
10507 else
10508   MANPAGE_SYMLINKS=$cf_use_symlinks
10509 fi;
10510
10511 if test "$$cf_use_symlinks" = no; then
10512 if test "$MANPAGE_SYMLINKS" = yes ; then
10513         { echo "$as_me:10513: WARNING: cannot make symlinks" >&5
10514 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10515         MANPAGE_SYMLINKS=no
10516 fi
10517 fi
10518
10519 echo "$as_me:10519: result: $MANPAGE_SYMLINKS" >&5
10520 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10521 fi
10522
10523 echo "$as_me:10523: checking for manpage tbl" >&5
10524 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10525
10526 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10527 if test "${with_manpage_tbl+set}" = set; then
10528   withval="$with_manpage_tbl"
10529   MANPAGE_TBL=$withval
10530 else
10531   MANPAGE_TBL=no
10532 fi;
10533
10534 echo "$as_me:10534: result: $MANPAGE_TBL" >&5
10535 echo "${ECHO_T}$MANPAGE_TBL" >&6
10536
10537   if test "$prefix" = "NONE" ; then
10538      cf_prefix="$ac_default_prefix"
10539   else
10540      cf_prefix="$prefix"
10541   fi
10542
10543   case "$MANPAGE_FORMAT" in # (vi
10544   *catonly*) # (vi
10545     cf_format=yes
10546     cf_inboth=no
10547     ;;
10548   *formatted*) # (vi
10549     cf_format=yes
10550     cf_inboth=yes
10551     ;;
10552   *)
10553     cf_format=no
10554     cf_inboth=no
10555     ;;
10556   esac
10557
10558 test ! -d man && mkdir man
10559
10560 cf_so_strip=
10561 cf_compress=
10562 case "$MANPAGE_FORMAT" in #(vi
10563 *compress*) #(vi
10564         cf_so_strip="Z"
10565         cf_compress=compress
10566   ;;
10567 *gzip*)
10568         cf_so_strip="gz"
10569         cf_compress=gzip
10570   ;;
10571 esac
10572
10573 cf_edit_man=./edit_man.sh
10574 cf_man_alias=`pwd`/man_alias.sed
10575
10576 cat >$cf_edit_man <<CF_EOF
10577 #! /bin/sh
10578 # this script is generated by the configure-script CF_MAN_PAGES macro.
10579
10580 prefix="$cf_prefix"
10581 datarootdir="$datarootdir"
10582 datadir="$datadir"
10583
10584 NCURSES_MAJOR="$NCURSES_MAJOR"
10585 NCURSES_MINOR="$NCURSES_MINOR"
10586 NCURSES_PATCH="$NCURSES_PATCH"
10587
10588 NCURSES_OSPEED="$NCURSES_OSPEED"
10589 TERMINFO="$TERMINFO"
10590
10591 INSTALL="$INSTALL"
10592 INSTALL_DATA="$INSTALL_DATA"
10593
10594 transform="$program_transform_name"
10595
10596 TMP=\${TMPDIR:=/tmp}/man\$\$
10597 trap "rm -f \$TMP" 0 1 2 5 15
10598
10599 form=\$1
10600 shift || exit 1
10601
10602 verb=\$1
10603 shift || exit 1
10604
10605 mandir=\$1
10606 shift || exit 1
10607
10608 srcdir=\$1
10609 top_srcdir=\$srcdir/..
10610 shift || exit 1
10611
10612 if test "\$form" = normal ; then
10613         if test "$cf_format" = yes ; then
10614         if test "$cf_inboth" = no ; then
10615                 sh \$0 format \$verb \$mandir \$srcdir \$*
10616                 exit $?
10617         fi
10618         fi
10619         cf_subdir=\$mandir/man
10620         cf_tables=$MANPAGE_TBL
10621 else
10622         cf_subdir=\$mandir/cat
10623         cf_tables=yes
10624 fi
10625
10626 # process the list of source-files
10627 for i in \$* ; do
10628 case \$i in #(vi
10629 *.orig|*.rej) ;; #(vi
10630 *.[0-9]*)
10631         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10632         if test \$verb = installing ; then
10633         if test ! -d \$cf_subdir\${section} ; then
10634                 mkdir -p \$cf_subdir\$section
10635         fi
10636         fi
10637
10638         # replace variables in man page
10639         if test ! -f $cf_man_alias ; then
10640 cat >>$cf_man_alias <<-CF_EOF2
10641                 s,@DATADIR@,\$datadir,g
10642                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10643                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10644                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10645                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10646                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10647                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10648 CF_EOF
10649
10650         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10651         do
10652                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10653                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10654 cat >>$cf_edit_man <<-CF_EOF
10655                 s,@$cf_NAME@,$cf_name,g
10656 CF_EOF
10657         done
10658
10659 cat >>$cf_edit_man <<CF_EOF
10660 CF_EOF2
10661                 echo "...made $cf_man_alias"
10662         fi
10663
10664         aliases=
10665         cf_source=\`basename \$i\`
10666         inalias=\$cf_source
10667         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10668         if test ! -f \$inalias ; then
10669                 echo .. skipped \$cf_source
10670                 continue
10671         fi
10672 CF_EOF
10673
10674 if test "$MANPAGE_ALIASES" != no ; then
10675 cat >>$cf_edit_man <<CF_EOF
10676         nCurses=ignore.3x
10677         test $with_curses_h = yes && nCurses=ncurses.3x
10678         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10679 CF_EOF
10680 fi
10681
10682 if test "$MANPAGE_RENAMES" = no ; then
10683 cat >>$cf_edit_man <<CF_EOF
10684         # perform program transformations for section 1 man pages
10685         if test \$section = 1 ; then
10686                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10687         else
10688                 cf_target=\$cf_subdir\${section}/\$cf_source
10689         fi
10690 CF_EOF
10691 else
10692 cat >>$cf_edit_man <<CF_EOF
10693         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10694         if test -z "\$cf_target" ; then
10695                 echo '? missing rename for '\$cf_source
10696                 cf_target="\$cf_source"
10697         fi
10698         cf_target="\$cf_subdir\${section}/\${cf_target}"
10699
10700 CF_EOF
10701 fi
10702
10703 cat >>$cf_edit_man <<CF_EOF
10704         sed     -f $cf_man_alias \\
10705 CF_EOF
10706
10707 if test -f $MANPAGE_RENAMES ; then
10708 cat >>$cf_edit_man <<CF_EOF
10709                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10710 CF_EOF
10711 else
10712 cat >>$cf_edit_man <<CF_EOF
10713                 < \$i >\$TMP
10714 CF_EOF
10715 fi
10716
10717 cat >>$cf_edit_man <<CF_EOF
10718 if test \$cf_tables = yes ; then
10719         tbl \$TMP >\$TMP.out
10720         mv \$TMP.out \$TMP
10721 fi
10722 CF_EOF
10723
10724 if test $with_overwrite != yes ; then
10725 cat >>$cf_edit_man <<CF_EOF
10726         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10727         mv \$TMP.out \$TMP
10728 CF_EOF
10729 fi
10730
10731 if test $with_curses_h != yes ; then
10732 cat >>$cf_edit_man <<CF_EOF
10733         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10734         mv \$TMP.out \$TMP
10735 CF_EOF
10736 fi
10737
10738 cat >>$cf_edit_man <<CF_EOF
10739         if test \$form = format ; then
10740                 nroff -man \$TMP >\$TMP.out
10741                 mv \$TMP.out \$TMP
10742         fi
10743 CF_EOF
10744
10745 if test -n "$cf_compress" ; then
10746 cat >>$cf_edit_man <<CF_EOF
10747         if test \$verb = installing ; then
10748         if ( $cf_compress -f \$TMP )
10749         then
10750                 mv \$TMP.$cf_so_strip \$TMP
10751         fi
10752         fi
10753         cf_target="\$cf_target.$cf_so_strip"
10754 CF_EOF
10755 fi
10756
10757 case "$MANPAGE_FORMAT" in #(vi
10758 *BSDI*)
10759 cat >>$cf_edit_man <<CF_EOF
10760         if test \$form = format ; then
10761                 # BSDI installs only .0 suffixes in the cat directories
10762                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10763         fi
10764 CF_EOF
10765   ;;
10766 esac
10767
10768 cat >>$cf_edit_man <<CF_EOF
10769         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10770         if test \$verb = installing ; then
10771                 echo \$verb \$cf_target
10772                 \$INSTALL_DATA \$TMP \$cf_target
10773                 test -d \$cf_subdir\${section} &&
10774                 test -n "\$aliases" && (
10775                         cd \$cf_subdir\${section} && (
10776                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10777                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10778                                 cf_target=\`basename \$cf_target\`
10779                                 for cf_alias in \$aliases
10780                                 do
10781                                         if test \$section = 1 ; then
10782                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10783                                         fi
10784
10785                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10786                                                 if test -f \$cf_alias\${suffix} ; then
10787                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10788                                                         then
10789                                                                 continue
10790                                                         fi
10791                                                 fi
10792                                                 echo .. \$verb alias \$cf_alias\${suffix}
10793 CF_EOF
10794 case "x$LN_S" in #(vi
10795 *-f) #(vi
10796 cat >>$cf_edit_man <<CF_EOF
10797                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10798 CF_EOF
10799         ;;
10800 *)
10801 cat >>$cf_edit_man <<CF_EOF
10802                                                 rm -f \$cf_alias\${suffix}
10803                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10804 CF_EOF
10805         ;;
10806 esac
10807 cat >>$cf_edit_man <<CF_EOF
10808                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10809                                                 echo ".so \$cf_source" >\$TMP
10810 CF_EOF
10811 if test -n "$cf_compress" ; then
10812 cat >>$cf_edit_man <<CF_EOF
10813                                                 if test -n "$cf_so_strip" ; then
10814                                                         $cf_compress -f \$TMP
10815                                                         mv \$TMP.$cf_so_strip \$TMP
10816                                                 fi
10817 CF_EOF
10818 fi
10819 cat >>$cf_edit_man <<CF_EOF
10820                                                 echo .. \$verb alias \$cf_alias\${suffix}
10821                                                 rm -f \$cf_alias\${suffix}
10822                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10823                                         fi
10824                                 done
10825                         )
10826                 )
10827         elif test \$verb = removing ; then
10828                 test -f \$cf_target && (
10829                         echo \$verb \$cf_target
10830                         rm -f \$cf_target
10831                 )
10832                 test -d \$cf_subdir\${section} &&
10833                 test -n "\$aliases" && (
10834                         cd \$cf_subdir\${section} && (
10835                                 for cf_alias in \$aliases
10836                                 do
10837                                         if test \$section = 1 ; then
10838                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10839                                         fi
10840
10841                                         echo .. \$verb alias \$cf_alias\${suffix}
10842                                         rm -f \$cf_alias\${suffix}
10843                                 done
10844                         )
10845                 )
10846         else
10847 #               echo ".hy 0"
10848                 cat \$TMP
10849         fi
10850         ;;
10851 esac
10852 done
10853
10854 if test $cf_inboth = yes ; then
10855 if test \$form != format ; then
10856         sh \$0 format \$verb \$mandir \$srcdir \$*
10857 fi
10858 fi
10859
10860 exit 0
10861 CF_EOF
10862 chmod 755 $cf_edit_man
10863
10864 ###############################################################################
10865
10866 ### Note that some functions (such as const) are normally disabled anyway.
10867 echo "$as_me:10867: checking if you want to build with function extensions" >&5
10868 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10869
10870 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10871 if test "${enable_ext_funcs+set}" = set; then
10872   enableval="$enable_ext_funcs"
10873   with_ext_funcs=$enableval
10874 else
10875   with_ext_funcs=yes
10876 fi;
10877 echo "$as_me:10877: result: $with_ext_funcs" >&5
10878 echo "${ECHO_T}$with_ext_funcs" >&6
10879 if test "x$with_ext_funcs" = xyes ; then
10880         NCURSES_EXT_FUNCS=1
10881
10882 cat >>confdefs.h <<\EOF
10883 #define HAVE_ASSUME_DEFAULT_COLORS 1
10884 EOF
10885
10886 cat >>confdefs.h <<\EOF
10887 #define HAVE_CURSES_VERSION 1
10888 EOF
10889
10890 cat >>confdefs.h <<\EOF
10891 #define HAVE_HAS_KEY 1
10892 EOF
10893
10894 cat >>confdefs.h <<\EOF
10895 #define HAVE_RESIZETERM 1
10896 EOF
10897
10898 cat >>confdefs.h <<\EOF
10899 #define HAVE_RESIZE_TERM 1
10900 EOF
10901
10902 cat >>confdefs.h <<\EOF
10903 #define HAVE_TERM_ENTRY_H 1
10904 EOF
10905
10906 cat >>confdefs.h <<\EOF
10907 #define HAVE_USE_DEFAULT_COLORS 1
10908 EOF
10909
10910 cat >>confdefs.h <<\EOF
10911 #define HAVE_USE_SCREEN 1
10912 EOF
10913
10914 cat >>confdefs.h <<\EOF
10915 #define HAVE_USE_WINDOW 1
10916 EOF
10917
10918 cat >>confdefs.h <<\EOF
10919 #define HAVE_WRESIZE 1
10920 EOF
10921
10922 cat >>confdefs.h <<\EOF
10923 #define NCURSES_EXT_FUNCS 1
10924 EOF
10925
10926         GENERATED_EXT_FUNCS=generated
10927 else
10928         NCURSES_EXT_FUNCS=0
10929         GENERATED_EXT_FUNCS=
10930 fi
10931
10932 echo "$as_me:10932: checking if you want to build with experimental SCREEN extensions" >&5
10933 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10934
10935 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10936 if test "${enable_sp_funcs+set}" = set; then
10937   enableval="$enable_sp_funcs"
10938   with_sp_funcs=$enableval
10939 else
10940   with_sp_funcs=no
10941 fi;
10942 echo "$as_me:10942: result: $with_sp_funcs" >&5
10943 echo "${ECHO_T}$with_sp_funcs" >&6
10944 if test "x$with_sp_funcs" = xyes ; then
10945         NCURSES_SP_FUNCS=1
10946
10947 cat >>confdefs.h <<\EOF
10948 #define NCURSES_SP_FUNCS 1
10949 EOF
10950
10951         GENERATED_SP_FUNCS=generated
10952 else
10953         NCURSES_SP_FUNCS=0
10954         GENERATED_SP_FUNCS=
10955 fi
10956
10957 echo "$as_me:10957: checking if you want to build with experimental terminal-driver" >&5
10958 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10959
10960 # Check whether --enable-term-driver or --disable-term-driver was given.
10961 if test "${enable_term_driver+set}" = set; then
10962   enableval="$enable_term_driver"
10963   with_term_driver=$enableval
10964 else
10965   with_term_driver=no
10966 fi;
10967 echo "$as_me:10967: result: $with_term_driver" >&5
10968 echo "${ECHO_T}$with_term_driver" >&6
10969 if test "x$with_term_driver" = xyes ; then
10970
10971 cat >>confdefs.h <<\EOF
10972 #define USE_TERM_DRIVER 1
10973 EOF
10974
10975         if test "x$with_sp_funcs" != xyes ; then
10976                 { { echo "$as_me:10976: error: The term-driver option relies upon sp-funcs" >&5
10977 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10978    { (exit 1); exit 1; }; }
10979         fi
10980 fi
10981
10982 ###   use option --enable-const to turn on use of const beyond that in XSI.
10983 echo "$as_me:10983: checking for extended use of const keyword" >&5
10984 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10985
10986 # Check whether --enable-const or --disable-const was given.
10987 if test "${enable_const+set}" = set; then
10988   enableval="$enable_const"
10989   with_ext_const=$enableval
10990 else
10991   with_ext_const=no
10992 fi;
10993 echo "$as_me:10993: result: $with_ext_const" >&5
10994 echo "${ECHO_T}$with_ext_const" >&6
10995 NCURSES_CONST='/*nothing*/'
10996 if test "x$with_ext_const" = xyes ; then
10997         NCURSES_CONST=const
10998 fi
10999
11000 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11001 echo "$as_me:11001: checking if you want to use extended colors" >&5
11002 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11003
11004 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11005 if test "${enable_ext_colors+set}" = set; then
11006   enableval="$enable_ext_colors"
11007   with_ext_colors=$enableval
11008 else
11009   with_ext_colors=no
11010 fi;
11011 echo "$as_me:11011: result: $with_ext_colors" >&5
11012 echo "${ECHO_T}$with_ext_colors" >&6
11013 NCURSES_EXT_COLORS=0
11014 if test "x$with_ext_colors" = xyes ; then
11015         if test "x$with_widec" != xyes ; then
11016                 { { echo "$as_me:11016: error: This option applies only to wide-character library" >&5
11017 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11018    { (exit 1); exit 1; }; }
11019         else
11020                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11021
11022 if test "${with_abi_version+set}" != set; then
11023         case $cf_cv_rel_version in
11024         5.*)
11025                 cf_cv_rel_version=6.0
11026                 cf_cv_abi_version=6
11027                 { echo "$as_me:11027: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11028 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11029                 ;;
11030         esac
11031 fi
11032
11033         fi
11034         NCURSES_EXT_COLORS=1
11035
11036 cat >>confdefs.h <<\EOF
11037 #define NCURSES_EXT_COLORS 1
11038 EOF
11039
11040 fi
11041
11042 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11043 echo "$as_me:11043: checking if you want to use extended mouse encoding" >&5
11044 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11045
11046 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11047 if test "${enable_ext_mouse+set}" = set; then
11048   enableval="$enable_ext_mouse"
11049   with_ext_mouse=$enableval
11050 else
11051   with_ext_mouse=no
11052 fi;
11053 echo "$as_me:11053: result: $with_ext_mouse" >&5
11054 echo "${ECHO_T}$with_ext_mouse" >&6
11055 NCURSES_MOUSE_VERSION=1
11056 if test "x$with_ext_mouse" = xyes ; then
11057         NCURSES_MOUSE_VERSION=2
11058
11059 if test "${with_abi_version+set}" != set; then
11060         case $cf_cv_rel_version in
11061         5.*)
11062                 cf_cv_rel_version=6.0
11063                 cf_cv_abi_version=6
11064                 { echo "$as_me:11064: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11065 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11066                 ;;
11067         esac
11068 fi
11069
11070 fi
11071
11072 echo "$as_me:11072: checking if you want \$NCURSES_NO_PADDING code" >&5
11073 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11074
11075 # Check whether --enable-no-padding or --disable-no-padding was given.
11076 if test "${enable_no_padding+set}" = set; then
11077   enableval="$enable_no_padding"
11078   with_no_padding=$enableval
11079 else
11080   with_no_padding=$with_ext_funcs
11081 fi;
11082 echo "$as_me:11082: result: $with_no_padding" >&5
11083 echo "${ECHO_T}$with_no_padding" >&6
11084 test "x$with_no_padding" = xyes &&
11085 cat >>confdefs.h <<\EOF
11086 #define NCURSES_NO_PADDING 1
11087 EOF
11088
11089 echo "$as_me:11089: checking for ANSI C header files" >&5
11090 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11091 if test "${ac_cv_header_stdc+set}" = set; then
11092   echo $ECHO_N "(cached) $ECHO_C" >&6
11093 else
11094   cat >conftest.$ac_ext <<_ACEOF
11095 #line 11095 "configure"
11096 #include "confdefs.h"
11097 #include <stdlib.h>
11098 #include <stdarg.h>
11099 #include <string.h>
11100 #include <float.h>
11101
11102 _ACEOF
11103 if { (eval echo "$as_me:11103: \"$ac_cpp conftest.$ac_ext\"") >&5
11104   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11105   ac_status=$?
11106   egrep -v '^ *\+' conftest.er1 >conftest.err
11107   rm -f conftest.er1
11108   cat conftest.err >&5
11109   echo "$as_me:11109: \$? = $ac_status" >&5
11110   (exit $ac_status); } >/dev/null; then
11111   if test -s conftest.err; then
11112     ac_cpp_err=$ac_c_preproc_warn_flag
11113   else
11114     ac_cpp_err=
11115   fi
11116 else
11117   ac_cpp_err=yes
11118 fi
11119 if test -z "$ac_cpp_err"; then
11120   ac_cv_header_stdc=yes
11121 else
11122   echo "$as_me: failed program was:" >&5
11123   cat conftest.$ac_ext >&5
11124   ac_cv_header_stdc=no
11125 fi
11126 rm -f conftest.err conftest.$ac_ext
11127
11128 if test $ac_cv_header_stdc = yes; then
11129   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11130   cat >conftest.$ac_ext <<_ACEOF
11131 #line 11131 "configure"
11132 #include "confdefs.h"
11133 #include <string.h>
11134
11135 _ACEOF
11136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11137   egrep "memchr" >/dev/null 2>&1; then
11138   :
11139 else
11140   ac_cv_header_stdc=no
11141 fi
11142 rm -rf conftest*
11143
11144 fi
11145
11146 if test $ac_cv_header_stdc = yes; then
11147   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11148   cat >conftest.$ac_ext <<_ACEOF
11149 #line 11149 "configure"
11150 #include "confdefs.h"
11151 #include <stdlib.h>
11152
11153 _ACEOF
11154 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11155   egrep "free" >/dev/null 2>&1; then
11156   :
11157 else
11158   ac_cv_header_stdc=no
11159 fi
11160 rm -rf conftest*
11161
11162 fi
11163
11164 if test $ac_cv_header_stdc = yes; then
11165   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11166   if test "$cross_compiling" = yes; then
11167   :
11168 else
11169   cat >conftest.$ac_ext <<_ACEOF
11170 #line 11170 "configure"
11171 #include "confdefs.h"
11172 #include <ctype.h>
11173 #if ((' ' & 0x0FF) == 0x020)
11174 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11175 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11176 #else
11177 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11178                      || ('j' <= (c) && (c) <= 'r') \
11179                      || ('s' <= (c) && (c) <= 'z'))
11180 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11181 #endif
11182
11183 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11184 int
11185 main ()
11186 {
11187   int i;
11188   for (i = 0; i < 256; i++)
11189     if (XOR (islower (i), ISLOWER (i))
11190         || toupper (i) != TOUPPER (i))
11191       $ac_main_return(2);
11192   $ac_main_return (0);
11193 }
11194 _ACEOF
11195 rm -f conftest$ac_exeext
11196 if { (eval echo "$as_me:11196: \"$ac_link\"") >&5
11197   (eval $ac_link) 2>&5
11198   ac_status=$?
11199   echo "$as_me:11199: \$? = $ac_status" >&5
11200   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11201   { (eval echo "$as_me:11201: \"$ac_try\"") >&5
11202   (eval $ac_try) 2>&5
11203   ac_status=$?
11204   echo "$as_me:11204: \$? = $ac_status" >&5
11205   (exit $ac_status); }; }; then
11206   :
11207 else
11208   echo "$as_me: program exited with status $ac_status" >&5
11209 echo "$as_me: failed program was:" >&5
11210 cat conftest.$ac_ext >&5
11211 ac_cv_header_stdc=no
11212 fi
11213 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11214 fi
11215 fi
11216 fi
11217 echo "$as_me:11217: result: $ac_cv_header_stdc" >&5
11218 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11219 if test $ac_cv_header_stdc = yes; then
11220
11221 cat >>confdefs.h <<\EOF
11222 #define STDC_HEADERS 1
11223 EOF
11224
11225 fi
11226
11227 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11228
11229 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11230                   inttypes.h stdint.h unistd.h
11231 do
11232 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11233 echo "$as_me:11233: checking for $ac_header" >&5
11234 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11235 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11236   echo $ECHO_N "(cached) $ECHO_C" >&6
11237 else
11238   cat >conftest.$ac_ext <<_ACEOF
11239 #line 11239 "configure"
11240 #include "confdefs.h"
11241 $ac_includes_default
11242 #include <$ac_header>
11243 _ACEOF
11244 rm -f conftest.$ac_objext
11245 if { (eval echo "$as_me:11245: \"$ac_compile\"") >&5
11246   (eval $ac_compile) 2>&5
11247   ac_status=$?
11248   echo "$as_me:11248: \$? = $ac_status" >&5
11249   (exit $ac_status); } &&
11250          { ac_try='test -s conftest.$ac_objext'
11251   { (eval echo "$as_me:11251: \"$ac_try\"") >&5
11252   (eval $ac_try) 2>&5
11253   ac_status=$?
11254   echo "$as_me:11254: \$? = $ac_status" >&5
11255   (exit $ac_status); }; }; then
11256   eval "$as_ac_Header=yes"
11257 else
11258   echo "$as_me: failed program was:" >&5
11259 cat conftest.$ac_ext >&5
11260 eval "$as_ac_Header=no"
11261 fi
11262 rm -f conftest.$ac_objext conftest.$ac_ext
11263 fi
11264 echo "$as_me:11264: result: `eval echo '${'$as_ac_Header'}'`" >&5
11265 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11266 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11267   cat >>confdefs.h <<EOF
11268 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11269 EOF
11270
11271 fi
11272 done
11273
11274 echo "$as_me:11274: checking for signed char" >&5
11275 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11276 if test "${ac_cv_type_signed_char+set}" = set; then
11277   echo $ECHO_N "(cached) $ECHO_C" >&6
11278 else
11279   cat >conftest.$ac_ext <<_ACEOF
11280 #line 11280 "configure"
11281 #include "confdefs.h"
11282 $ac_includes_default
11283 int
11284 main ()
11285 {
11286 if ((signed char *) 0)
11287   return 0;
11288 if (sizeof (signed char))
11289   return 0;
11290   ;
11291   return 0;
11292 }
11293 _ACEOF
11294 rm -f conftest.$ac_objext
11295 if { (eval echo "$as_me:11295: \"$ac_compile\"") >&5
11296   (eval $ac_compile) 2>&5
11297   ac_status=$?
11298   echo "$as_me:11298: \$? = $ac_status" >&5
11299   (exit $ac_status); } &&
11300          { ac_try='test -s conftest.$ac_objext'
11301   { (eval echo "$as_me:11301: \"$ac_try\"") >&5
11302   (eval $ac_try) 2>&5
11303   ac_status=$?
11304   echo "$as_me:11304: \$? = $ac_status" >&5
11305   (exit $ac_status); }; }; then
11306   ac_cv_type_signed_char=yes
11307 else
11308   echo "$as_me: failed program was:" >&5
11309 cat conftest.$ac_ext >&5
11310 ac_cv_type_signed_char=no
11311 fi
11312 rm -f conftest.$ac_objext conftest.$ac_ext
11313 fi
11314 echo "$as_me:11314: result: $ac_cv_type_signed_char" >&5
11315 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11316
11317 echo "$as_me:11317: checking size of signed char" >&5
11318 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11319 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11320   echo $ECHO_N "(cached) $ECHO_C" >&6
11321 else
11322   if test "$ac_cv_type_signed_char" = yes; then
11323   if test "$cross_compiling" = yes; then
11324   # Depending upon the size, compute the lo and hi bounds.
11325 cat >conftest.$ac_ext <<_ACEOF
11326 #line 11326 "configure"
11327 #include "confdefs.h"
11328 $ac_includes_default
11329 int
11330 main ()
11331 {
11332 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11333   ;
11334   return 0;
11335 }
11336 _ACEOF
11337 rm -f conftest.$ac_objext
11338 if { (eval echo "$as_me:11338: \"$ac_compile\"") >&5
11339   (eval $ac_compile) 2>&5
11340   ac_status=$?
11341   echo "$as_me:11341: \$? = $ac_status" >&5
11342   (exit $ac_status); } &&
11343          { ac_try='test -s conftest.$ac_objext'
11344   { (eval echo "$as_me:11344: \"$ac_try\"") >&5
11345   (eval $ac_try) 2>&5
11346   ac_status=$?
11347   echo "$as_me:11347: \$? = $ac_status" >&5
11348   (exit $ac_status); }; }; then
11349   ac_lo=0 ac_mid=0
11350   while :; do
11351     cat >conftest.$ac_ext <<_ACEOF
11352 #line 11352 "configure"
11353 #include "confdefs.h"
11354 $ac_includes_default
11355 int
11356 main ()
11357 {
11358 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11359   ;
11360   return 0;
11361 }
11362 _ACEOF
11363 rm -f conftest.$ac_objext
11364 if { (eval echo "$as_me:11364: \"$ac_compile\"") >&5
11365   (eval $ac_compile) 2>&5
11366   ac_status=$?
11367   echo "$as_me:11367: \$? = $ac_status" >&5
11368   (exit $ac_status); } &&
11369          { ac_try='test -s conftest.$ac_objext'
11370   { (eval echo "$as_me:11370: \"$ac_try\"") >&5
11371   (eval $ac_try) 2>&5
11372   ac_status=$?
11373   echo "$as_me:11373: \$? = $ac_status" >&5
11374   (exit $ac_status); }; }; then
11375   ac_hi=$ac_mid; break
11376 else
11377   echo "$as_me: failed program was:" >&5
11378 cat conftest.$ac_ext >&5
11379 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11380 fi
11381 rm -f conftest.$ac_objext conftest.$ac_ext
11382   done
11383 else
11384   echo "$as_me: failed program was:" >&5
11385 cat conftest.$ac_ext >&5
11386 ac_hi=-1 ac_mid=-1
11387   while :; do
11388     cat >conftest.$ac_ext <<_ACEOF
11389 #line 11389 "configure"
11390 #include "confdefs.h"
11391 $ac_includes_default
11392 int
11393 main ()
11394 {
11395 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11396   ;
11397   return 0;
11398 }
11399 _ACEOF
11400 rm -f conftest.$ac_objext
11401 if { (eval echo "$as_me:11401: \"$ac_compile\"") >&5
11402   (eval $ac_compile) 2>&5
11403   ac_status=$?
11404   echo "$as_me:11404: \$? = $ac_status" >&5
11405   (exit $ac_status); } &&
11406          { ac_try='test -s conftest.$ac_objext'
11407   { (eval echo "$as_me:11407: \"$ac_try\"") >&5
11408   (eval $ac_try) 2>&5
11409   ac_status=$?
11410   echo "$as_me:11410: \$? = $ac_status" >&5
11411   (exit $ac_status); }; }; then
11412   ac_lo=$ac_mid; break
11413 else
11414   echo "$as_me: failed program was:" >&5
11415 cat conftest.$ac_ext >&5
11416 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11417 fi
11418 rm -f conftest.$ac_objext conftest.$ac_ext
11419   done
11420 fi
11421 rm -f conftest.$ac_objext conftest.$ac_ext
11422 # Binary search between lo and hi bounds.
11423 while test "x$ac_lo" != "x$ac_hi"; do
11424   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11425   cat >conftest.$ac_ext <<_ACEOF
11426 #line 11426 "configure"
11427 #include "confdefs.h"
11428 $ac_includes_default
11429 int
11430 main ()
11431 {
11432 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11433   ;
11434   return 0;
11435 }
11436 _ACEOF
11437 rm -f conftest.$ac_objext
11438 if { (eval echo "$as_me:11438: \"$ac_compile\"") >&5
11439   (eval $ac_compile) 2>&5
11440   ac_status=$?
11441   echo "$as_me:11441: \$? = $ac_status" >&5
11442   (exit $ac_status); } &&
11443          { ac_try='test -s conftest.$ac_objext'
11444   { (eval echo "$as_me:11444: \"$ac_try\"") >&5
11445   (eval $ac_try) 2>&5
11446   ac_status=$?
11447   echo "$as_me:11447: \$? = $ac_status" >&5
11448   (exit $ac_status); }; }; then
11449   ac_hi=$ac_mid
11450 else
11451   echo "$as_me: failed program was:" >&5
11452 cat conftest.$ac_ext >&5
11453 ac_lo=`expr $ac_mid + 1`
11454 fi
11455 rm -f conftest.$ac_objext conftest.$ac_ext
11456 done
11457 ac_cv_sizeof_signed_char=$ac_lo
11458 else
11459   if test "$cross_compiling" = yes; then
11460   { { echo "$as_me:11460: error: cannot run test program while cross compiling" >&5
11461 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11462    { (exit 1); exit 1; }; }
11463 else
11464   cat >conftest.$ac_ext <<_ACEOF
11465 #line 11465 "configure"
11466 #include "confdefs.h"
11467 $ac_includes_default
11468 int
11469 main ()
11470 {
11471 FILE *f = fopen ("conftest.val", "w");
11472 if (!f)
11473   $ac_main_return (1);
11474 fprintf (f, "%d", (sizeof (signed char)));
11475 fclose (f);
11476   ;
11477   return 0;
11478 }
11479 _ACEOF
11480 rm -f conftest$ac_exeext
11481 if { (eval echo "$as_me:11481: \"$ac_link\"") >&5
11482   (eval $ac_link) 2>&5
11483   ac_status=$?
11484   echo "$as_me:11484: \$? = $ac_status" >&5
11485   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11486   { (eval echo "$as_me:11486: \"$ac_try\"") >&5
11487   (eval $ac_try) 2>&5
11488   ac_status=$?
11489   echo "$as_me:11489: \$? = $ac_status" >&5
11490   (exit $ac_status); }; }; then
11491   ac_cv_sizeof_signed_char=`cat conftest.val`
11492 else
11493   echo "$as_me: program exited with status $ac_status" >&5
11494 echo "$as_me: failed program was:" >&5
11495 cat conftest.$ac_ext >&5
11496 fi
11497 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11498 fi
11499 fi
11500 rm -f conftest.val
11501 else
11502   ac_cv_sizeof_signed_char=0
11503 fi
11504 fi
11505 echo "$as_me:11505: result: $ac_cv_sizeof_signed_char" >&5
11506 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11507 cat >>confdefs.h <<EOF
11508 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11509 EOF
11510
11511 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11512         NCURSES_SBOOL="signed char"
11513 else
11514         NCURSES_SBOOL="char"
11515 fi
11516 echo "$as_me:11516: checking if you want to use signed Boolean array in term.h" >&5
11517 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11518
11519 # Check whether --enable-signed-char or --disable-signed-char was given.
11520 if test "${enable_signed_char+set}" = set; then
11521   enableval="$enable_signed_char"
11522   with_signed_char=$enableval
11523 else
11524   with_signed_char=no
11525 fi;
11526 echo "$as_me:11526: result: $with_signed_char" >&5
11527 echo "${ECHO_T}$with_signed_char" >&6
11528 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11529
11530 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11531 echo "$as_me:11531: checking if you want SIGWINCH handler" >&5
11532 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11533
11534 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11535 if test "${enable_sigwinch+set}" = set; then
11536   enableval="$enable_sigwinch"
11537   with_sigwinch=$enableval
11538 else
11539   with_sigwinch=$with_ext_funcs
11540 fi;
11541 echo "$as_me:11541: result: $with_sigwinch" >&5
11542 echo "${ECHO_T}$with_sigwinch" >&6
11543 test "x$with_sigwinch" = xyes &&
11544 cat >>confdefs.h <<\EOF
11545 #define USE_SIGWINCH 1
11546 EOF
11547
11548 ###   use option --enable-tcap-names to allow user to define new capabilities
11549 echo "$as_me:11549: checking if you want user-definable terminal capabilities like termcap" >&5
11550 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11551
11552 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11553 if test "${enable_tcap_names+set}" = set; then
11554   enableval="$enable_tcap_names"
11555   with_tcap_names=$enableval
11556 else
11557   with_tcap_names=$with_ext_funcs
11558 fi;
11559 echo "$as_me:11559: result: $with_tcap_names" >&5
11560 echo "${ECHO_T}$with_tcap_names" >&6
11561 NCURSES_XNAMES=0
11562 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11563
11564 ###############################################################################
11565 # These options are relatively safe to experiment with.
11566
11567 echo "$as_me:11567: checking if you want all development code" >&5
11568 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11569
11570 # Check whether --with-develop or --without-develop was given.
11571 if test "${with_develop+set}" = set; then
11572   withval="$with_develop"
11573   with_develop=$withval
11574 else
11575   with_develop=no
11576 fi;
11577 echo "$as_me:11577: result: $with_develop" >&5
11578 echo "${ECHO_T}$with_develop" >&6
11579
11580 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11581 echo "$as_me:11581: checking if you want hard-tabs code" >&5
11582 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11583
11584 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11585 if test "${enable_hard_tabs+set}" = set; then
11586   enableval="$enable_hard_tabs"
11587
11588 else
11589   enable_hard_tabs=$with_develop
11590 fi;
11591 echo "$as_me:11591: result: $enable_hard_tabs" >&5
11592 echo "${ECHO_T}$enable_hard_tabs" >&6
11593 test "x$enable_hard_tabs" = xyes &&
11594 cat >>confdefs.h <<\EOF
11595 #define USE_HARD_TABS 1
11596 EOF
11597
11598 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11599 echo "$as_me:11599: checking if you want limited support for xmc" >&5
11600 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11601
11602 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11603 if test "${enable_xmc_glitch+set}" = set; then
11604   enableval="$enable_xmc_glitch"
11605
11606 else
11607   enable_xmc_glitch=$with_develop
11608 fi;
11609 echo "$as_me:11609: result: $enable_xmc_glitch" >&5
11610 echo "${ECHO_T}$enable_xmc_glitch" >&6
11611 test "x$enable_xmc_glitch" = xyes &&
11612 cat >>confdefs.h <<\EOF
11613 #define USE_XMC_SUPPORT 1
11614 EOF
11615
11616 ###############################################################################
11617 # These are just experimental, probably should not be in a package:
11618
11619 echo "$as_me:11619: checking if you do not want to assume colors are white-on-black" >&5
11620 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11621
11622 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11623 if test "${enable_assumed_color+set}" = set; then
11624   enableval="$enable_assumed_color"
11625   with_assumed_color=$enableval
11626 else
11627   with_assumed_color=yes
11628 fi;
11629 echo "$as_me:11629: result: $with_assumed_color" >&5
11630 echo "${ECHO_T}$with_assumed_color" >&6
11631 test "x$with_assumed_color" = xyes &&
11632 cat >>confdefs.h <<\EOF
11633 #define USE_ASSUMED_COLOR 1
11634 EOF
11635
11636 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11637 echo "$as_me:11637: checking if you want hashmap scrolling-optimization code" >&5
11638 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11639
11640 # Check whether --enable-hashmap or --disable-hashmap was given.
11641 if test "${enable_hashmap+set}" = set; then
11642   enableval="$enable_hashmap"
11643   with_hashmap=$enableval
11644 else
11645   with_hashmap=yes
11646 fi;
11647 echo "$as_me:11647: result: $with_hashmap" >&5
11648 echo "${ECHO_T}$with_hashmap" >&6
11649 test "x$with_hashmap" = xyes &&
11650 cat >>confdefs.h <<\EOF
11651 #define USE_HASHMAP 1
11652 EOF
11653
11654 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11655 echo "$as_me:11655: checking if you want colorfgbg code" >&5
11656 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11657
11658 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11659 if test "${enable_colorfgbg+set}" = set; then
11660   enableval="$enable_colorfgbg"
11661   with_colorfgbg=$enableval
11662 else
11663   with_colorfgbg=no
11664 fi;
11665 echo "$as_me:11665: result: $with_colorfgbg" >&5
11666 echo "${ECHO_T}$with_colorfgbg" >&6
11667 test "x$with_colorfgbg" = xyes &&
11668 cat >>confdefs.h <<\EOF
11669 #define USE_COLORFGBG 1
11670 EOF
11671
11672 ###   use option --enable-interop to turn on use of bindings used for interop
11673 echo "$as_me:11673: checking if you want interop bindings" >&5
11674 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11675
11676 # Check whether --enable-interop or --disable-interop was given.
11677 if test "${enable_interop+set}" = set; then
11678   enableval="$enable_interop"
11679   with_exp_interop=$enableval
11680 else
11681   with_exp_interop=no
11682 fi;
11683 echo "$as_me:11683: result: $with_exp_interop" >&5
11684 echo "${ECHO_T}$with_exp_interop" >&6
11685
11686 NCURSES_INTEROP_FUNCS=0
11687 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11688
11689 # This is still experimental (20080329), but should ultimately be moved to
11690 # the script-block --with-normal, etc.
11691
11692 echo "$as_me:11692: checking if you want to link with the pthread library" >&5
11693 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11694
11695 # Check whether --with-pthread or --without-pthread was given.
11696 if test "${with_pthread+set}" = set; then
11697   withval="$with_pthread"
11698   with_pthread=$withval
11699 else
11700   with_pthread=no
11701 fi;
11702 echo "$as_me:11702: result: $with_pthread" >&5
11703 echo "${ECHO_T}$with_pthread" >&6
11704
11705 if test "$with_pthread" != no ; then
11706     echo "$as_me:11706: checking for pthread.h" >&5
11707 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11708 if test "${ac_cv_header_pthread_h+set}" = set; then
11709   echo $ECHO_N "(cached) $ECHO_C" >&6
11710 else
11711   cat >conftest.$ac_ext <<_ACEOF
11712 #line 11712 "configure"
11713 #include "confdefs.h"
11714 #include <pthread.h>
11715 _ACEOF
11716 if { (eval echo "$as_me:11716: \"$ac_cpp conftest.$ac_ext\"") >&5
11717   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11718   ac_status=$?
11719   egrep -v '^ *\+' conftest.er1 >conftest.err
11720   rm -f conftest.er1
11721   cat conftest.err >&5
11722   echo "$as_me:11722: \$? = $ac_status" >&5
11723   (exit $ac_status); } >/dev/null; then
11724   if test -s conftest.err; then
11725     ac_cpp_err=$ac_c_preproc_warn_flag
11726   else
11727     ac_cpp_err=
11728   fi
11729 else
11730   ac_cpp_err=yes
11731 fi
11732 if test -z "$ac_cpp_err"; then
11733   ac_cv_header_pthread_h=yes
11734 else
11735   echo "$as_me: failed program was:" >&5
11736   cat conftest.$ac_ext >&5
11737   ac_cv_header_pthread_h=no
11738 fi
11739 rm -f conftest.err conftest.$ac_ext
11740 fi
11741 echo "$as_me:11741: result: $ac_cv_header_pthread_h" >&5
11742 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11743 if test $ac_cv_header_pthread_h = yes; then
11744
11745 cat >>confdefs.h <<\EOF
11746 #define HAVE_PTHREADS_H 1
11747 EOF
11748
11749         for cf_lib_pthread in pthread c_r
11750         do
11751             echo "$as_me:11751: checking if we can link with the $cf_lib_pthread library" >&5
11752 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11753             cf_save_LIBS="$LIBS"
11754             LIBS="-l$cf_lib_pthread $LIBS"
11755             cat >conftest.$ac_ext <<_ACEOF
11756 #line 11756 "configure"
11757 #include "confdefs.h"
11758
11759 #include <pthread.h>
11760
11761 int
11762 main ()
11763 {
11764
11765                 int rc = pthread_create(0,0,0,0);
11766                 int r2 = pthread_mutexattr_settype(0, 0);
11767
11768   ;
11769   return 0;
11770 }
11771 _ACEOF
11772 rm -f conftest.$ac_objext conftest$ac_exeext
11773 if { (eval echo "$as_me:11773: \"$ac_link\"") >&5
11774   (eval $ac_link) 2>&5
11775   ac_status=$?
11776   echo "$as_me:11776: \$? = $ac_status" >&5
11777   (exit $ac_status); } &&
11778          { ac_try='test -s conftest$ac_exeext'
11779   { (eval echo "$as_me:11779: \"$ac_try\"") >&5
11780   (eval $ac_try) 2>&5
11781   ac_status=$?
11782   echo "$as_me:11782: \$? = $ac_status" >&5
11783   (exit $ac_status); }; }; then
11784   with_pthread=yes
11785 else
11786   echo "$as_me: failed program was:" >&5
11787 cat conftest.$ac_ext >&5
11788 with_pthread=no
11789 fi
11790 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11791             LIBS="$cf_save_LIBS"
11792             echo "$as_me:11792: result: $with_pthread" >&5
11793 echo "${ECHO_T}$with_pthread" >&6
11794             test "$with_pthread" = yes && break
11795         done
11796
11797         if test "$with_pthread" = yes ; then
11798             LIBS="-l$cf_lib_pthread $LIBS"
11799
11800 cat >>confdefs.h <<\EOF
11801 #define HAVE_LIBPTHREADS 1
11802 EOF
11803
11804         else
11805             { { echo "$as_me:11805: error: Cannot link with pthread library" >&5
11806 echo "$as_me: error: Cannot link with pthread library" >&2;}
11807    { (exit 1); exit 1; }; }
11808         fi
11809
11810 fi
11811
11812 fi
11813
11814 if test "x$with_pthread" != xno; then
11815         echo "$as_me:11815: checking for pthread_kill" >&5
11816 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11817 if test "${ac_cv_func_pthread_kill+set}" = set; then
11818   echo $ECHO_N "(cached) $ECHO_C" >&6
11819 else
11820   cat >conftest.$ac_ext <<_ACEOF
11821 #line 11821 "configure"
11822 #include "confdefs.h"
11823 /* System header to define __stub macros and hopefully few prototypes,
11824     which can conflict with char pthread_kill (); below.  */
11825 #include <assert.h>
11826 /* Override any gcc2 internal prototype to avoid an error.  */
11827 #ifdef __cplusplus
11828 extern "C"
11829 #endif
11830 /* We use char because int might match the return type of a gcc2
11831    builtin and then its argument prototype would still apply.  */
11832 char pthread_kill ();
11833 char (*f) ();
11834
11835 int
11836 main ()
11837 {
11838 /* The GNU C library defines this for functions which it implements
11839     to always fail with ENOSYS.  Some functions are actually named
11840     something starting with __ and the normal name is an alias.  */
11841 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11842 choke me
11843 #else
11844 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11845 #endif
11846
11847   ;
11848   return 0;
11849 }
11850 _ACEOF
11851 rm -f conftest.$ac_objext conftest$ac_exeext
11852 if { (eval echo "$as_me:11852: \"$ac_link\"") >&5
11853   (eval $ac_link) 2>&5
11854   ac_status=$?
11855   echo "$as_me:11855: \$? = $ac_status" >&5
11856   (exit $ac_status); } &&
11857          { ac_try='test -s conftest$ac_exeext'
11858   { (eval echo "$as_me:11858: \"$ac_try\"") >&5
11859   (eval $ac_try) 2>&5
11860   ac_status=$?
11861   echo "$as_me:11861: \$? = $ac_status" >&5
11862   (exit $ac_status); }; }; then
11863   ac_cv_func_pthread_kill=yes
11864 else
11865   echo "$as_me: failed program was:" >&5
11866 cat conftest.$ac_ext >&5
11867 ac_cv_func_pthread_kill=no
11868 fi
11869 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11870 fi
11871 echo "$as_me:11871: result: $ac_cv_func_pthread_kill" >&5
11872 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11873 if test $ac_cv_func_pthread_kill = yes; then
11874
11875                 echo "$as_me:11875: checking if you want to allow EINTR in wgetch with pthreads" >&5
11876 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11877
11878 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11879 if test "${enable_pthreads_eintr+set}" = set; then
11880   enableval="$enable_pthreads_eintr"
11881   use_pthreads_eintr=$enableval
11882 else
11883   use_pthreads_eintr=no
11884 fi;
11885                 echo "$as_me:11885: result: $use_pthreads_eintr" >&5
11886 echo "${ECHO_T}$use_pthreads_eintr" >&6
11887                 if test "x$use_pthreads_eintr" = xyes ; then
11888
11889 cat >>confdefs.h <<\EOF
11890 #define USE_PTHREADS_EINTR 1
11891 EOF
11892
11893                 fi
11894 fi
11895
11896         echo "$as_me:11896: checking if you want to use weak-symbols for pthreads" >&5
11897 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11898
11899 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11900 if test "${enable_weak_symbols+set}" = set; then
11901   enableval="$enable_weak_symbols"
11902   use_weak_symbols=$enableval
11903 else
11904   use_weak_symbols=no
11905 fi;
11906         echo "$as_me:11906: result: $use_weak_symbols" >&5
11907 echo "${ECHO_T}$use_weak_symbols" >&6
11908         if test "x$use_weak_symbols" = xyes ; then
11909
11910 echo "$as_me:11910: checking if $CC supports weak symbols" >&5
11911 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11912 if test "${cf_cv_weak_symbols+set}" = set; then
11913   echo $ECHO_N "(cached) $ECHO_C" >&6
11914 else
11915
11916 cat >conftest.$ac_ext <<_ACEOF
11917 #line 11917 "configure"
11918 #include "confdefs.h"
11919
11920 #include <stdio.h>
11921 int
11922 main ()
11923 {
11924
11925 #if defined(__GNUC__)
11926 #  if defined __USE_ISOC99
11927 #    define _cat_pragma(exp)    _Pragma(#exp)
11928 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11929 #  else
11930 #    define _weak_pragma(exp)
11931 #  endif
11932 #  define _declare(name)        __extension__ extern __typeof__(name) name
11933 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11934 #endif
11935
11936 weak_symbol(fopen);
11937
11938   ;
11939   return 0;
11940 }
11941 _ACEOF
11942 rm -f conftest.$ac_objext
11943 if { (eval echo "$as_me:11943: \"$ac_compile\"") >&5
11944   (eval $ac_compile) 2>&5
11945   ac_status=$?
11946   echo "$as_me:11946: \$? = $ac_status" >&5
11947   (exit $ac_status); } &&
11948          { ac_try='test -s conftest.$ac_objext'
11949   { (eval echo "$as_me:11949: \"$ac_try\"") >&5
11950   (eval $ac_try) 2>&5
11951   ac_status=$?
11952   echo "$as_me:11952: \$? = $ac_status" >&5
11953   (exit $ac_status); }; }; then
11954   cf_cv_weak_symbols=yes
11955 else
11956   echo "$as_me: failed program was:" >&5
11957 cat conftest.$ac_ext >&5
11958 cf_cv_weak_symbols=no
11959 fi
11960 rm -f conftest.$ac_objext conftest.$ac_ext
11961
11962 fi
11963 echo "$as_me:11963: result: $cf_cv_weak_symbols" >&5
11964 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11965
11966         else
11967                 cf_cv_weak_symbols=no
11968         fi
11969
11970         if test "x$cf_cv_weak_symbols" = xyes ; then
11971
11972 cat >>confdefs.h <<\EOF
11973 #define USE_WEAK_SYMBOLS 1
11974 EOF
11975
11976         fi
11977 fi
11978
11979 PTHREAD=
11980 if test "x$with_pthread" = "xyes" ; then
11981
11982 cat >>confdefs.h <<\EOF
11983 #define USE_PTHREADS 1
11984 EOF
11985
11986     enable_reentrant=yes
11987     if test "x$cf_cv_weak_symbols" = xyes ; then
11988         PTHREAD=-lpthread
11989     fi
11990 fi
11991
11992 # Reentrant code has to be opaque; there's little advantage to making ncurses
11993 # opaque outside of that, so there is no --enable-opaque option.  We can use
11994 # this option without --with-pthreads, but this will be always set for
11995 # pthreads.
11996 echo "$as_me:11996: checking if you want experimental reentrant code" >&5
11997 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11998
11999 # Check whether --enable-reentrant or --disable-reentrant was given.
12000 if test "${enable_reentrant+set}" = set; then
12001   enableval="$enable_reentrant"
12002   with_reentrant=$enableval
12003 else
12004   with_reentrant=no
12005 fi;
12006 echo "$as_me:12006: result: $with_reentrant" >&5
12007 echo "${ECHO_T}$with_reentrant" >&6
12008 if test "x$with_reentrant" = xyes ; then
12009         cf_cv_enable_reentrant=1
12010         cf_cv_enable_opaque="NCURSES_INTERNALS"
12011         NCURSES_OPAQUE=1
12012         NCURSES_SIZE_T=int
12013         if test "x$cf_cv_weak_symbols" = xyes ; then
12014
12015 # remove pthread library from $LIBS
12016 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12017
12018                 TEST_LIBS="-lpthread $TEST_LIBS"
12019                 TEST_LIBS2="-lpthread $TEST_LIBS2"
12020         else
12021                 LIB_SUFFIX="t${LIB_SUFFIX}"
12022         fi
12023
12024 cat >>confdefs.h <<\EOF
12025 #define USE_REENTRANT 1
12026 EOF
12027
12028 if test "${with_abi_version+set}" != set; then
12029         case $cf_cv_rel_version in
12030         5.*)
12031                 cf_cv_rel_version=6.0
12032                 cf_cv_abi_version=6
12033                 { echo "$as_me:12033: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12034 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12035                 ;;
12036         esac
12037 fi
12038
12039 else
12040         cf_cv_enable_reentrant=0
12041         cf_cv_enable_opaque="NCURSES_OPAQUE"
12042         NCURSES_OPAQUE=0
12043         NCURSES_SIZE_T=short
12044 fi
12045
12046 ### Allow using a different wrap-prefix
12047 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12048         echo "$as_me:12048: checking for prefix used to wrap public variables" >&5
12049 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12050
12051 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12052 if test "${with_wrap_prefix+set}" = set; then
12053   withval="$with_wrap_prefix"
12054   NCURSES_WRAP_PREFIX=$withval
12055 else
12056   NCURSES_WRAP_PREFIX=_nc_
12057 fi;
12058         echo "$as_me:12058: result: $NCURSES_WRAP_PREFIX" >&5
12059 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12060 else
12061         NCURSES_WRAP_PREFIX=_nc_
12062 fi
12063
12064 cat >>confdefs.h <<EOF
12065 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12066 EOF
12067
12068 echo "$as_me:12068: checking if you want experimental safe-sprintf code" >&5
12069 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12070
12071 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12072 if test "${enable_safe_sprintf+set}" = set; then
12073   enableval="$enable_safe_sprintf"
12074   with_safe_sprintf=$enableval
12075 else
12076   with_safe_sprintf=no
12077 fi;
12078 echo "$as_me:12078: result: $with_safe_sprintf" >&5
12079 echo "${ECHO_T}$with_safe_sprintf" >&6
12080 test "x$with_safe_sprintf" = xyes &&
12081 cat >>confdefs.h <<\EOF
12082 #define USE_SAFE_SPRINTF 1
12083 EOF
12084
12085 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12086 # when hashmap is used scroll hints are useless
12087 if test "$with_hashmap" = no ; then
12088 echo "$as_me:12088: checking if you want to experiment without scrolling-hints code" >&5
12089 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12090
12091 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12092 if test "${enable_scroll_hints+set}" = set; then
12093   enableval="$enable_scroll_hints"
12094   with_scroll_hints=$enableval
12095 else
12096   with_scroll_hints=yes
12097 fi;
12098 echo "$as_me:12098: result: $with_scroll_hints" >&5
12099 echo "${ECHO_T}$with_scroll_hints" >&6
12100 test "x$with_scroll_hints" = xyes &&
12101 cat >>confdefs.h <<\EOF
12102 #define USE_SCROLL_HINTS 1
12103 EOF
12104
12105 fi
12106
12107 echo "$as_me:12107: checking if you want experimental wgetch-events code" >&5
12108 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12109
12110 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12111 if test "${enable_wgetch_events+set}" = set; then
12112   enableval="$enable_wgetch_events"
12113   with_wgetch_events=$enableval
12114 else
12115   with_wgetch_events=no
12116 fi;
12117 echo "$as_me:12117: result: $with_wgetch_events" >&5
12118 echo "${ECHO_T}$with_wgetch_events" >&6
12119 test "x$with_wgetch_events" = xyes &&
12120 cat >>confdefs.h <<\EOF
12121 #define NCURSES_WGETCH_EVENTS 1
12122 EOF
12123
12124 ###############################################################################
12125
12126 ###     use option --disable-echo to suppress full display compiling commands
12127
12128 echo "$as_me:12128: checking if you want to see long compiling messages" >&5
12129 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12130
12131 # Check whether --enable-echo or --disable-echo was given.
12132 if test "${enable_echo+set}" = set; then
12133   enableval="$enable_echo"
12134   test "$enableval" != no && enableval=yes
12135   if test "$enableval" != "yes" ; then
12136
12137     ECHO_LT='--silent'
12138     ECHO_LD='@echo linking $@;'
12139     RULE_CC='@echo compiling $<'
12140     SHOW_CC='@echo compiling $@'
12141     ECHO_CC='@'
12142
12143   else
12144
12145     ECHO_LT=''
12146     ECHO_LD=''
12147     RULE_CC=''
12148     SHOW_CC=''
12149     ECHO_CC=''
12150
12151   fi
12152 else
12153   enableval=yes
12154
12155     ECHO_LT=''
12156     ECHO_LD=''
12157     RULE_CC=''
12158     SHOW_CC=''
12159     ECHO_CC=''
12160
12161 fi;
12162 echo "$as_me:12162: result: $enableval" >&5
12163 echo "${ECHO_T}$enableval" >&6
12164
12165 if test "x$enable_echo" = xyes; then
12166         ECHO_LINK=
12167 else
12168         ECHO_LINK='@ echo linking $@ ... ;'
12169         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12170         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12171 fi
12172
12173 ###     use option --enable-warnings to turn on all gcc warnings
12174 echo "$as_me:12174: checking if you want to see compiler warnings" >&5
12175 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12176
12177 # Check whether --enable-warnings or --disable-warnings was given.
12178 if test "${enable_warnings+set}" = set; then
12179   enableval="$enable_warnings"
12180   with_warnings=$enableval
12181 fi;
12182 echo "$as_me:12182: result: $with_warnings" >&5
12183 echo "${ECHO_T}$with_warnings" >&6
12184
12185 if test "x$with_warnings" = "xyes"; then
12186
12187         ADAFLAGS="$ADAFLAGS -gnatg"
12188
12189 INTEL_COMPILER=no
12190
12191 if test "$GCC" = yes ; then
12192         case $host_os in
12193         linux*|gnu*)
12194                 echo "$as_me:12194: checking if this is really Intel C compiler" >&5
12195 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12196                 cf_save_CFLAGS="$CFLAGS"
12197                 CFLAGS="$CFLAGS -no-gcc"
12198                 cat >conftest.$ac_ext <<_ACEOF
12199 #line 12199 "configure"
12200 #include "confdefs.h"
12201
12202 int
12203 main ()
12204 {
12205
12206 #ifdef __INTEL_COMPILER
12207 #else
12208 make an error
12209 #endif
12210
12211   ;
12212   return 0;
12213 }
12214 _ACEOF
12215 rm -f conftest.$ac_objext
12216 if { (eval echo "$as_me:12216: \"$ac_compile\"") >&5
12217   (eval $ac_compile) 2>&5
12218   ac_status=$?
12219   echo "$as_me:12219: \$? = $ac_status" >&5
12220   (exit $ac_status); } &&
12221          { ac_try='test -s conftest.$ac_objext'
12222   { (eval echo "$as_me:12222: \"$ac_try\"") >&5
12223   (eval $ac_try) 2>&5
12224   ac_status=$?
12225   echo "$as_me:12225: \$? = $ac_status" >&5
12226   (exit $ac_status); }; }; then
12227   INTEL_COMPILER=yes
12228 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12229
12230 else
12231   echo "$as_me: failed program was:" >&5
12232 cat conftest.$ac_ext >&5
12233 fi
12234 rm -f conftest.$ac_objext conftest.$ac_ext
12235                 CFLAGS="$cf_save_CFLAGS"
12236                 echo "$as_me:12236: result: $INTEL_COMPILER" >&5
12237 echo "${ECHO_T}$INTEL_COMPILER" >&6
12238                 ;;
12239         esac
12240 fi
12241
12242 CLANG_COMPILER=no
12243
12244 if test "$GCC" = yes ; then
12245         echo "$as_me:12245: checking if this is really Clang C compiler" >&5
12246 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12247         cf_save_CFLAGS="$CFLAGS"
12248         CFLAGS="$CFLAGS -Qunused-arguments"
12249         cat >conftest.$ac_ext <<_ACEOF
12250 #line 12250 "configure"
12251 #include "confdefs.h"
12252
12253 int
12254 main ()
12255 {
12256
12257 #ifdef __clang__
12258 #else
12259 make an error
12260 #endif
12261
12262   ;
12263   return 0;
12264 }
12265 _ACEOF
12266 rm -f conftest.$ac_objext
12267 if { (eval echo "$as_me:12267: \"$ac_compile\"") >&5
12268   (eval $ac_compile) 2>&5
12269   ac_status=$?
12270   echo "$as_me:12270: \$? = $ac_status" >&5
12271   (exit $ac_status); } &&
12272          { ac_try='test -s conftest.$ac_objext'
12273   { (eval echo "$as_me:12273: \"$ac_try\"") >&5
12274   (eval $ac_try) 2>&5
12275   ac_status=$?
12276   echo "$as_me:12276: \$? = $ac_status" >&5
12277   (exit $ac_status); }; }; then
12278   CLANG_COMPILER=yes
12279 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12280
12281 else
12282   echo "$as_me: failed program was:" >&5
12283 cat conftest.$ac_ext >&5
12284 fi
12285 rm -f conftest.$ac_objext conftest.$ac_ext
12286         CFLAGS="$cf_save_CFLAGS"
12287         echo "$as_me:12287: result: $CLANG_COMPILER" >&5
12288 echo "${ECHO_T}$CLANG_COMPILER" >&6
12289 fi
12290
12291 cat > conftest.$ac_ext <<EOF
12292 #line 12292 "${as_me:-configure}"
12293 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12294 EOF
12295
12296 if test "$INTEL_COMPILER" = yes
12297 then
12298 # The "-wdXXX" options suppress warnings:
12299 # remark #1419: external declaration in primary source file
12300 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12301 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12302 # remark #193: zero used for undefined preprocessing identifier
12303 # remark #593: variable "curs_sb_left_arrow" was set but never used
12304 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12305 # remark #869: parameter "tw" was never referenced
12306 # remark #981: operands are evaluated in unspecified order
12307 # warning #279: controlling expression is constant
12308
12309         { echo "$as_me:12309: checking for $CC warning options..." >&5
12310 echo "$as_me: checking for $CC warning options..." >&6;}
12311         cf_save_CFLAGS="$CFLAGS"
12312         EXTRA_CFLAGS="-Wall"
12313         for cf_opt in \
12314                 wd1419 \
12315                 wd1683 \
12316                 wd1684 \
12317                 wd193 \
12318                 wd593 \
12319                 wd279 \
12320                 wd810 \
12321                 wd869 \
12322                 wd981
12323         do
12324                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12325                 if { (eval echo "$as_me:12325: \"$ac_compile\"") >&5
12326   (eval $ac_compile) 2>&5
12327   ac_status=$?
12328   echo "$as_me:12328: \$? = $ac_status" >&5
12329   (exit $ac_status); }; then
12330                         test -n "$verbose" && echo "$as_me:12330: result: ... -$cf_opt" >&5
12331 echo "${ECHO_T}... -$cf_opt" >&6
12332                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12333                 fi
12334         done
12335         CFLAGS="$cf_save_CFLAGS"
12336
12337 elif test "$GCC" = yes
12338 then
12339         { echo "$as_me:12339: checking for $CC warning options..." >&5
12340 echo "$as_me: checking for $CC warning options..." >&6;}
12341         cf_save_CFLAGS="$CFLAGS"
12342         EXTRA_CFLAGS=
12343         cf_warn_CONST=""
12344         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12345         for cf_opt in W Wall \
12346                 Wbad-function-cast \
12347                 Wcast-align \
12348                 Wcast-qual \
12349                 Winline \
12350                 Wmissing-declarations \
12351                 Wmissing-prototypes \
12352                 Wnested-externs \
12353                 Wpointer-arith \
12354                 Wshadow \
12355                 Wstrict-prototypes \
12356                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12357         do
12358                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12359                 if { (eval echo "$as_me:12359: \"$ac_compile\"") >&5
12360   (eval $ac_compile) 2>&5
12361   ac_status=$?
12362   echo "$as_me:12362: \$? = $ac_status" >&5
12363   (exit $ac_status); }; then
12364                         test -n "$verbose" && echo "$as_me:12364: result: ... -$cf_opt" >&5
12365 echo "${ECHO_T}... -$cf_opt" >&6
12366                         case $cf_opt in #(vi
12367                         Wcast-qual) #(vi
12368                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12369                                 ;;
12370                         Winline) #(vi
12371                                 case $GCC_VERSION in
12372                                 [34].*)
12373                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12374
12375 echo "${as_me:-configure}:12375: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12376
12377                                         continue;;
12378                                 esac
12379                                 ;;
12380                         Wpointer-arith) #(vi
12381                                 case $GCC_VERSION in
12382                                 [12].*)
12383                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12384
12385 echo "${as_me:-configure}:12385: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12386
12387                                         continue;;
12388                                 esac
12389                                 ;;
12390                         esac
12391                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12392                 fi
12393         done
12394         CFLAGS="$cf_save_CFLAGS"
12395 fi
12396 rm -rf conftest*
12397
12398         if test "x$cf_with_cxx" = xyes ; then
12399
12400 INTEL_CPLUSPLUS=no
12401
12402 if test "$GCC" = yes ; then
12403         case $host_os in
12404         linux*|gnu*)
12405                 echo "$as_me:12405: checking if this is really Intel C++ compiler" >&5
12406 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12407                 cf_save_CFLAGS="$CXXFLAGS"
12408                 CXXFLAGS="$CXXFLAGS -no-gcc"
12409                 cat >conftest.$ac_ext <<_ACEOF
12410 #line 12410 "configure"
12411 #include "confdefs.h"
12412
12413 int
12414 main ()
12415 {
12416
12417 #ifdef __INTEL_COMPILER
12418 #else
12419 make an error
12420 #endif
12421
12422   ;
12423   return 0;
12424 }
12425 _ACEOF
12426 rm -f conftest.$ac_objext
12427 if { (eval echo "$as_me:12427: \"$ac_compile\"") >&5
12428   (eval $ac_compile) 2>&5
12429   ac_status=$?
12430   echo "$as_me:12430: \$? = $ac_status" >&5
12431   (exit $ac_status); } &&
12432          { ac_try='test -s conftest.$ac_objext'
12433   { (eval echo "$as_me:12433: \"$ac_try\"") >&5
12434   (eval $ac_try) 2>&5
12435   ac_status=$?
12436   echo "$as_me:12436: \$? = $ac_status" >&5
12437   (exit $ac_status); }; }; then
12438   INTEL_CPLUSPLUS=yes
12439 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12440
12441 else
12442   echo "$as_me: failed program was:" >&5
12443 cat conftest.$ac_ext >&5
12444 fi
12445 rm -f conftest.$ac_objext conftest.$ac_ext
12446                 CXXFLAGS="$cf_save_CFLAGS"
12447                 echo "$as_me:12447: result: $INTEL_CPLUSPLUS" >&5
12448 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12449                 ;;
12450         esac
12451 fi
12452
12453 CLANG_CPLUSPLUS=no
12454
12455 if test "$GCC" = yes ; then
12456         echo "$as_me:12456: checking if this is really Clang C++ compiler" >&5
12457 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12458         cf_save_CFLAGS="$CXXFLAGS"
12459         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12460         cat >conftest.$ac_ext <<_ACEOF
12461 #line 12461 "configure"
12462 #include "confdefs.h"
12463
12464 int
12465 main ()
12466 {
12467
12468 #ifdef __clang__
12469 #else
12470 make an error
12471 #endif
12472
12473   ;
12474   return 0;
12475 }
12476 _ACEOF
12477 rm -f conftest.$ac_objext
12478 if { (eval echo "$as_me:12478: \"$ac_compile\"") >&5
12479   (eval $ac_compile) 2>&5
12480   ac_status=$?
12481   echo "$as_me:12481: \$? = $ac_status" >&5
12482   (exit $ac_status); } &&
12483          { ac_try='test -s conftest.$ac_objext'
12484   { (eval echo "$as_me:12484: \"$ac_try\"") >&5
12485   (eval $ac_try) 2>&5
12486   ac_status=$?
12487   echo "$as_me:12487: \$? = $ac_status" >&5
12488   (exit $ac_status); }; }; then
12489   CLANG_CPLUSPLUS=yes
12490 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12491
12492 else
12493   echo "$as_me: failed program was:" >&5
12494 cat conftest.$ac_ext >&5
12495 fi
12496 rm -f conftest.$ac_objext conftest.$ac_ext
12497         CXXFLAGS="$cf_save_CFLAGS"
12498         echo "$as_me:12498: result: $CLANG_CPLUSPLUS" >&5
12499 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12500 fi
12501
12502 ac_ext=cc
12503 ac_cpp='$CXXCPP $CPPFLAGS'
12504 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12505 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12506 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12507 ac_main_return=return
12508
12509 cat > conftest.$ac_ext <<EOF
12510 #line 12510 "configure"
12511 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12512 EOF
12513
12514 if test "$INTEL_CPLUSPLUS" = yes
12515 then
12516 # The "-wdXXX" options suppress warnings:
12517 # remark #1419: external declaration in primary source file
12518 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12519 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12520 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12521 # remark #193: zero used for undefined preprocessing identifier
12522 # remark #593: variable "curs_sb_left_arrow" was set but never used
12523 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12524 # remark #869: parameter "tw" was never referenced
12525 # remark #981: operands are evaluated in unspecified order
12526 # warning #269: invalid format string conversion
12527
12528         { echo "$as_me:12528: checking for $CC warning options..." >&5
12529 echo "$as_me: checking for $CC warning options..." >&6;}
12530         cf_save_CXXFLAGS="$CXXFLAGS"
12531         EXTRA_CXXFLAGS="-Wall"
12532         for cf_opt in \
12533                 wd1419 \
12534                 wd1682 \
12535                 wd1683 \
12536                 wd1684 \
12537                 wd193 \
12538                 wd279 \
12539                 wd593 \
12540                 wd810 \
12541                 wd869 \
12542                 wd981
12543         do
12544                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12545                 if { (eval echo "$as_me:12545: \"$ac_compile\"") >&5
12546   (eval $ac_compile) 2>&5
12547   ac_status=$?
12548   echo "$as_me:12548: \$? = $ac_status" >&5
12549   (exit $ac_status); }; then
12550                         test -n "$verbose" && echo "$as_me:12550: result: ... -$cf_opt" >&5
12551 echo "${ECHO_T}... -$cf_opt" >&6
12552                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12553                 fi
12554         done
12555         CXXFLAGS="$cf_save_CXXFLAGS"
12556
12557 elif test "$GXX" = yes
12558 then
12559         { echo "$as_me:12559: checking for $CXX warning options..." >&5
12560 echo "$as_me: checking for $CXX warning options..." >&6;}
12561         cf_save_CXXFLAGS="$CXXFLAGS"
12562         EXTRA_CXXFLAGS="-W -Wall"
12563         cf_gxx_extra_warnings=""
12564         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12565         case "$GCC_VERSION" in
12566         [1-2].*)
12567                 ;;
12568         *)
12569                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12570                 ;;
12571         esac
12572         for cf_opt in \
12573                 Wabi \
12574                 fabi-version=0 \
12575                 Woverloaded-virtual \
12576                 Wsign-promo \
12577                 Wsynth \
12578                 Wold-style-cast \
12579                 Wcast-align \
12580                 Wcast-qual \
12581                 Wmissing-prototypes \
12582                 Wpointer-arith \
12583                 Wshadow \
12584                 Wstrict-prototypes \
12585                 Wundef $cf_gxx_extra_warnings Wno-unused
12586         do
12587                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12588                 if { (eval echo "$as_me:12588: \"$ac_compile\"") >&5
12589   (eval $ac_compile) 2>&5
12590   ac_status=$?
12591   echo "$as_me:12591: \$? = $ac_status" >&5
12592   (exit $ac_status); }; then
12593                         test -n "$verbose" && echo "$as_me:12593: result: ... -$cf_opt" >&5
12594 echo "${ECHO_T}... -$cf_opt" >&6
12595                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12596                 else
12597                         test -n "$verbose" && echo "$as_me:12597: result: ... no -$cf_opt" >&5
12598 echo "${ECHO_T}... no -$cf_opt" >&6
12599                 fi
12600         done
12601         CXXFLAGS="$cf_save_CXXFLAGS"
12602 fi
12603
12604 rm -rf conftest*
12605 ac_ext=c
12606 ac_cpp='$CPP $CPPFLAGS'
12607 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12608 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12609 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12610 ac_main_return=return
12611
12612         fi
12613 fi
12614
12615 if test "$GCC" = yes
12616 then
12617 cat > conftest.i <<EOF
12618 #ifndef GCC_PRINTF
12619 #define GCC_PRINTF 0
12620 #endif
12621 #ifndef GCC_SCANF
12622 #define GCC_SCANF 0
12623 #endif
12624 #ifndef GCC_NORETURN
12625 #define GCC_NORETURN /* nothing */
12626 #endif
12627 #ifndef GCC_UNUSED
12628 #define GCC_UNUSED /* nothing */
12629 #endif
12630 EOF
12631 if test "$GCC" = yes
12632 then
12633         { echo "$as_me:12633: checking for $CC __attribute__ directives..." >&5
12634 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12635 cat > conftest.$ac_ext <<EOF
12636 #line 12636 "${as_me:-configure}"
12637 #include "confdefs.h"
12638 #include "conftest.h"
12639 #include "conftest.i"
12640 #if     GCC_PRINTF
12641 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12642 #else
12643 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12644 #endif
12645 #if     GCC_SCANF
12646 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12647 #else
12648 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12649 #endif
12650 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12651 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12652 extern void foo(void) GCC_NORETURN;
12653 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12654 EOF
12655         cf_printf_attribute=no
12656         cf_scanf_attribute=no
12657         for cf_attribute in scanf printf unused noreturn
12658         do
12659
12660 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12661
12662                 cf_directive="__attribute__(($cf_attribute))"
12663                 echo "checking for $CC $cf_directive" 1>&5
12664
12665                 case $cf_attribute in #(vi
12666                 printf) #(vi
12667                         cf_printf_attribute=yes
12668                         cat >conftest.h <<EOF
12669 #define GCC_$cf_ATTRIBUTE 1
12670 EOF
12671                         ;;
12672                 scanf) #(vi
12673                         cf_scanf_attribute=yes
12674                         cat >conftest.h <<EOF
12675 #define GCC_$cf_ATTRIBUTE 1
12676 EOF
12677                         ;;
12678                 *) #(vi
12679                         cat >conftest.h <<EOF
12680 #define GCC_$cf_ATTRIBUTE $cf_directive
12681 EOF
12682                         ;;
12683                 esac
12684
12685                 if { (eval echo "$as_me:12685: \"$ac_compile\"") >&5
12686   (eval $ac_compile) 2>&5
12687   ac_status=$?
12688   echo "$as_me:12688: \$? = $ac_status" >&5
12689   (exit $ac_status); }; then
12690                         test -n "$verbose" && echo "$as_me:12690: result: ... $cf_attribute" >&5
12691 echo "${ECHO_T}... $cf_attribute" >&6
12692                         cat conftest.h >>confdefs.h
12693                         case $cf_attribute in #(vi
12694                         noreturn) #(vi
12695
12696 cat >>confdefs.h <<EOF
12697 #define GCC_NORETURN $cf_directive
12698 EOF
12699
12700                                 ;;
12701                         printf) #(vi
12702                                 cf_value='/* nothing */'
12703                                 if test "$cf_printf_attribute" != no ; then
12704                                         cf_value='__attribute__((format(printf,fmt,var)))'
12705
12706 cat >>confdefs.h <<\EOF
12707 #define GCC_PRINTF 1
12708 EOF
12709
12710                                 fi
12711
12712 cat >>confdefs.h <<EOF
12713 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12714 EOF
12715
12716                                 ;;
12717                         scanf) #(vi
12718                                 cf_value='/* nothing */'
12719                                 if test "$cf_scanf_attribute" != no ; then
12720                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12721
12722 cat >>confdefs.h <<\EOF
12723 #define GCC_SCANF 1
12724 EOF
12725
12726                                 fi
12727
12728 cat >>confdefs.h <<EOF
12729 #define GCC_SCANFLIKE(fmt,var) $cf_value
12730 EOF
12731
12732                                 ;;
12733                         unused) #(vi
12734
12735 cat >>confdefs.h <<EOF
12736 #define GCC_UNUSED $cf_directive
12737 EOF
12738
12739                                 ;;
12740                         esac
12741                 fi
12742         done
12743 else
12744         fgrep define conftest.i >>confdefs.h
12745 fi
12746 rm -rf conftest*
12747 fi
12748
12749 echo "$as_me:12749: checking if you want to work around bogus compiler/loader warnings" >&5
12750 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12751
12752 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12753 if test "${enable_string_hacks+set}" = set; then
12754   enableval="$enable_string_hacks"
12755   with_string_hacks=$enableval
12756 else
12757   with_string_hacks=no
12758 fi;
12759 echo "$as_me:12759: result: $with_string_hacks" >&5
12760 echo "${ECHO_T}$with_string_hacks" >&6
12761
12762 if test "x$with_string_hacks" = "xyes"; then
12763
12764 cat >>confdefs.h <<\EOF
12765 #define USE_STRING_HACKS 1
12766 EOF
12767
12768         { echo "$as_me:12768: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12769 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12770
12771 for ac_func in strlcat strlcpy snprintf
12772 do
12773 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12774 echo "$as_me:12774: checking for $ac_func" >&5
12775 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12776 if eval "test \"\${$as_ac_var+set}\" = set"; then
12777   echo $ECHO_N "(cached) $ECHO_C" >&6
12778 else
12779   cat >conftest.$ac_ext <<_ACEOF
12780 #line 12780 "configure"
12781 #include "confdefs.h"
12782 /* System header to define __stub macros and hopefully few prototypes,
12783     which can conflict with char $ac_func (); below.  */
12784 #include <assert.h>
12785 /* Override any gcc2 internal prototype to avoid an error.  */
12786 #ifdef __cplusplus
12787 extern "C"
12788 #endif
12789 /* We use char because int might match the return type of a gcc2
12790    builtin and then its argument prototype would still apply.  */
12791 char $ac_func ();
12792 char (*f) ();
12793
12794 int
12795 main ()
12796 {
12797 /* The GNU C library defines this for functions which it implements
12798     to always fail with ENOSYS.  Some functions are actually named
12799     something starting with __ and the normal name is an alias.  */
12800 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12801 choke me
12802 #else
12803 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12804 #endif
12805
12806   ;
12807   return 0;
12808 }
12809 _ACEOF
12810 rm -f conftest.$ac_objext conftest$ac_exeext
12811 if { (eval echo "$as_me:12811: \"$ac_link\"") >&5
12812   (eval $ac_link) 2>&5
12813   ac_status=$?
12814   echo "$as_me:12814: \$? = $ac_status" >&5
12815   (exit $ac_status); } &&
12816          { ac_try='test -s conftest$ac_exeext'
12817   { (eval echo "$as_me:12817: \"$ac_try\"") >&5
12818   (eval $ac_try) 2>&5
12819   ac_status=$?
12820   echo "$as_me:12820: \$? = $ac_status" >&5
12821   (exit $ac_status); }; }; then
12822   eval "$as_ac_var=yes"
12823 else
12824   echo "$as_me: failed program was:" >&5
12825 cat conftest.$ac_ext >&5
12826 eval "$as_ac_var=no"
12827 fi
12828 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12829 fi
12830 echo "$as_me:12830: result: `eval echo '${'$as_ac_var'}'`" >&5
12831 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12832 if test `eval echo '${'$as_ac_var'}'` = yes; then
12833   cat >>confdefs.h <<EOF
12834 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12835 EOF
12836
12837 fi
12838 done
12839
12840 fi
12841
12842 ###     use option --enable-assertions to turn on generation of assertion code
12843 echo "$as_me:12843: checking if you want to enable runtime assertions" >&5
12844 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12845
12846 # Check whether --enable-assertions or --disable-assertions was given.
12847 if test "${enable_assertions+set}" = set; then
12848   enableval="$enable_assertions"
12849   with_assertions=$enableval
12850 else
12851   with_assertions=no
12852 fi;
12853 echo "$as_me:12853: result: $with_assertions" >&5
12854 echo "${ECHO_T}$with_assertions" >&6
12855 if test -n "$GCC"
12856 then
12857         if test "$with_assertions" = no
12858         then
12859                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12860         else
12861
12862         ADAFLAGS="$ADAFLAGS -gnata"
12863
12864         fi
12865 fi
12866
12867 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12868
12869 echo "$as_me:12869: checking if you want to use dmalloc for testing" >&5
12870 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12871
12872 # Check whether --with-dmalloc or --without-dmalloc was given.
12873 if test "${with_dmalloc+set}" = set; then
12874   withval="$with_dmalloc"
12875
12876 cat >>confdefs.h <<EOF
12877 #define USE_DMALLOC 1
12878 EOF
12879
12880         : ${with_cflags:=-g}
12881         : ${with_no_leaks:=yes}
12882          with_dmalloc=yes
12883 else
12884   with_dmalloc=
12885 fi;
12886 echo "$as_me:12886: result: ${with_dmalloc:-no}" >&5
12887 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12888
12889 case .$with_cflags in #(vi
12890 .*-g*)
12891         case .$CFLAGS in #(vi
12892         .*-g*) #(vi
12893                 ;;
12894         *)
12895
12896 cf_fix_cppflags=no
12897 cf_new_cflags=
12898 cf_new_cppflags=
12899 cf_new_extra_cppflags=
12900
12901 for cf_add_cflags in -g
12902 do
12903 case $cf_fix_cppflags in
12904 no)
12905         case $cf_add_cflags in #(vi
12906         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12907                 case $cf_add_cflags in
12908                 -D*)
12909                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12910
12911                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12912                                 && test -z "${cf_tst_cflags}" \
12913                                 && cf_fix_cppflags=yes
12914
12915                         if test $cf_fix_cppflags = yes ; then
12916                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12917                                 continue
12918                         elif test "${cf_tst_cflags}" = "\"'" ; then
12919                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12920                                 continue
12921                         fi
12922                         ;;
12923                 esac
12924                 case "$CPPFLAGS" in
12925                 *$cf_add_cflags) #(vi
12926                         ;;
12927                 *) #(vi
12928                         case $cf_add_cflags in #(vi
12929                         -D*)
12930                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12931
12932 CPPFLAGS=`echo "$CPPFLAGS" | \
12933         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12934                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12935
12936                                 ;;
12937                         esac
12938                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12939                         ;;
12940                 esac
12941                 ;;
12942         *)
12943                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12944                 ;;
12945         esac
12946         ;;
12947 yes)
12948         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12949
12950         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12951
12952         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12953                 && test -z "${cf_tst_cflags}" \
12954                 && cf_fix_cppflags=no
12955         ;;
12956 esac
12957 done
12958
12959 if test -n "$cf_new_cflags" ; then
12960
12961         CFLAGS="$CFLAGS $cf_new_cflags"
12962 fi
12963
12964 if test -n "$cf_new_cppflags" ; then
12965
12966         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12967 fi
12968
12969 if test -n "$cf_new_extra_cppflags" ; then
12970
12971         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12972 fi
12973
12974                 ;;
12975         esac
12976         ;;
12977 esac
12978
12979 if test "$with_dmalloc" = yes ; then
12980         echo "$as_me:12980: checking for dmalloc.h" >&5
12981 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12982 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12983   echo $ECHO_N "(cached) $ECHO_C" >&6
12984 else
12985   cat >conftest.$ac_ext <<_ACEOF
12986 #line 12986 "configure"
12987 #include "confdefs.h"
12988 #include <dmalloc.h>
12989 _ACEOF
12990 if { (eval echo "$as_me:12990: \"$ac_cpp conftest.$ac_ext\"") >&5
12991   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12992   ac_status=$?
12993   egrep -v '^ *\+' conftest.er1 >conftest.err
12994   rm -f conftest.er1
12995   cat conftest.err >&5
12996   echo "$as_me:12996: \$? = $ac_status" >&5
12997   (exit $ac_status); } >/dev/null; then
12998   if test -s conftest.err; then
12999     ac_cpp_err=$ac_c_preproc_warn_flag
13000   else
13001     ac_cpp_err=
13002   fi
13003 else
13004   ac_cpp_err=yes
13005 fi
13006 if test -z "$ac_cpp_err"; then
13007   ac_cv_header_dmalloc_h=yes
13008 else
13009   echo "$as_me: failed program was:" >&5
13010   cat conftest.$ac_ext >&5
13011   ac_cv_header_dmalloc_h=no
13012 fi
13013 rm -f conftest.err conftest.$ac_ext
13014 fi
13015 echo "$as_me:13015: result: $ac_cv_header_dmalloc_h" >&5
13016 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13017 if test $ac_cv_header_dmalloc_h = yes; then
13018
13019 echo "$as_me:13019: checking for dmalloc_debug in -ldmalloc" >&5
13020 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13021 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13022   echo $ECHO_N "(cached) $ECHO_C" >&6
13023 else
13024   ac_check_lib_save_LIBS=$LIBS
13025 LIBS="-ldmalloc  $LIBS"
13026 cat >conftest.$ac_ext <<_ACEOF
13027 #line 13027 "configure"
13028 #include "confdefs.h"
13029
13030 /* Override any gcc2 internal prototype to avoid an error.  */
13031 #ifdef __cplusplus
13032 extern "C"
13033 #endif
13034 /* We use char because int might match the return type of a gcc2
13035    builtin and then its argument prototype would still apply.  */
13036 char dmalloc_debug ();
13037 int
13038 main ()
13039 {
13040 dmalloc_debug ();
13041   ;
13042   return 0;
13043 }
13044 _ACEOF
13045 rm -f conftest.$ac_objext conftest$ac_exeext
13046 if { (eval echo "$as_me:13046: \"$ac_link\"") >&5
13047   (eval $ac_link) 2>&5
13048   ac_status=$?
13049   echo "$as_me:13049: \$? = $ac_status" >&5
13050   (exit $ac_status); } &&
13051          { ac_try='test -s conftest$ac_exeext'
13052   { (eval echo "$as_me:13052: \"$ac_try\"") >&5
13053   (eval $ac_try) 2>&5
13054   ac_status=$?
13055   echo "$as_me:13055: \$? = $ac_status" >&5
13056   (exit $ac_status); }; }; then
13057   ac_cv_lib_dmalloc_dmalloc_debug=yes
13058 else
13059   echo "$as_me: failed program was:" >&5
13060 cat conftest.$ac_ext >&5
13061 ac_cv_lib_dmalloc_dmalloc_debug=no
13062 fi
13063 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13064 LIBS=$ac_check_lib_save_LIBS
13065 fi
13066 echo "$as_me:13066: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13067 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13068 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13069   cat >>confdefs.h <<EOF
13070 #define HAVE_LIBDMALLOC 1
13071 EOF
13072
13073   LIBS="-ldmalloc $LIBS"
13074
13075 fi
13076
13077 fi
13078
13079 fi
13080
13081 echo "$as_me:13081: checking if you want to use dbmalloc for testing" >&5
13082 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13083
13084 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13085 if test "${with_dbmalloc+set}" = set; then
13086   withval="$with_dbmalloc"
13087
13088 cat >>confdefs.h <<EOF
13089 #define USE_DBMALLOC 1
13090 EOF
13091
13092         : ${with_cflags:=-g}
13093         : ${with_no_leaks:=yes}
13094          with_dbmalloc=yes
13095 else
13096   with_dbmalloc=
13097 fi;
13098 echo "$as_me:13098: result: ${with_dbmalloc:-no}" >&5
13099 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13100
13101 case .$with_cflags in #(vi
13102 .*-g*)
13103         case .$CFLAGS in #(vi
13104         .*-g*) #(vi
13105                 ;;
13106         *)
13107
13108 cf_fix_cppflags=no
13109 cf_new_cflags=
13110 cf_new_cppflags=
13111 cf_new_extra_cppflags=
13112
13113 for cf_add_cflags in -g
13114 do
13115 case $cf_fix_cppflags in
13116 no)
13117         case $cf_add_cflags in #(vi
13118         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13119                 case $cf_add_cflags in
13120                 -D*)
13121                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13122
13123                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13124                                 && test -z "${cf_tst_cflags}" \
13125                                 && cf_fix_cppflags=yes
13126
13127                         if test $cf_fix_cppflags = yes ; then
13128                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13129                                 continue
13130                         elif test "${cf_tst_cflags}" = "\"'" ; then
13131                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13132                                 continue
13133                         fi
13134                         ;;
13135                 esac
13136                 case "$CPPFLAGS" in
13137                 *$cf_add_cflags) #(vi
13138                         ;;
13139                 *) #(vi
13140                         case $cf_add_cflags in #(vi
13141                         -D*)
13142                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13143
13144 CPPFLAGS=`echo "$CPPFLAGS" | \
13145         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13146                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13147
13148                                 ;;
13149                         esac
13150                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13151                         ;;
13152                 esac
13153                 ;;
13154         *)
13155                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13156                 ;;
13157         esac
13158         ;;
13159 yes)
13160         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13161
13162         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13163
13164         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13165                 && test -z "${cf_tst_cflags}" \
13166                 && cf_fix_cppflags=no
13167         ;;
13168 esac
13169 done
13170
13171 if test -n "$cf_new_cflags" ; then
13172
13173         CFLAGS="$CFLAGS $cf_new_cflags"
13174 fi
13175
13176 if test -n "$cf_new_cppflags" ; then
13177
13178         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13179 fi
13180
13181 if test -n "$cf_new_extra_cppflags" ; then
13182
13183         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13184 fi
13185
13186                 ;;
13187         esac
13188         ;;
13189 esac
13190
13191 if test "$with_dbmalloc" = yes ; then
13192         echo "$as_me:13192: checking for dbmalloc.h" >&5
13193 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13194 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13195   echo $ECHO_N "(cached) $ECHO_C" >&6
13196 else
13197   cat >conftest.$ac_ext <<_ACEOF
13198 #line 13198 "configure"
13199 #include "confdefs.h"
13200 #include <dbmalloc.h>
13201 _ACEOF
13202 if { (eval echo "$as_me:13202: \"$ac_cpp conftest.$ac_ext\"") >&5
13203   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13204   ac_status=$?
13205   egrep -v '^ *\+' conftest.er1 >conftest.err
13206   rm -f conftest.er1
13207   cat conftest.err >&5
13208   echo "$as_me:13208: \$? = $ac_status" >&5
13209   (exit $ac_status); } >/dev/null; then
13210   if test -s conftest.err; then
13211     ac_cpp_err=$ac_c_preproc_warn_flag
13212   else
13213     ac_cpp_err=
13214   fi
13215 else
13216   ac_cpp_err=yes
13217 fi
13218 if test -z "$ac_cpp_err"; then
13219   ac_cv_header_dbmalloc_h=yes
13220 else
13221   echo "$as_me: failed program was:" >&5
13222   cat conftest.$ac_ext >&5
13223   ac_cv_header_dbmalloc_h=no
13224 fi
13225 rm -f conftest.err conftest.$ac_ext
13226 fi
13227 echo "$as_me:13227: result: $ac_cv_header_dbmalloc_h" >&5
13228 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13229 if test $ac_cv_header_dbmalloc_h = yes; then
13230
13231 echo "$as_me:13231: checking for debug_malloc in -ldbmalloc" >&5
13232 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13233 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13234   echo $ECHO_N "(cached) $ECHO_C" >&6
13235 else
13236   ac_check_lib_save_LIBS=$LIBS
13237 LIBS="-ldbmalloc  $LIBS"
13238 cat >conftest.$ac_ext <<_ACEOF
13239 #line 13239 "configure"
13240 #include "confdefs.h"
13241
13242 /* Override any gcc2 internal prototype to avoid an error.  */
13243 #ifdef __cplusplus
13244 extern "C"
13245 #endif
13246 /* We use char because int might match the return type of a gcc2
13247    builtin and then its argument prototype would still apply.  */
13248 char debug_malloc ();
13249 int
13250 main ()
13251 {
13252 debug_malloc ();
13253   ;
13254   return 0;
13255 }
13256 _ACEOF
13257 rm -f conftest.$ac_objext conftest$ac_exeext
13258 if { (eval echo "$as_me:13258: \"$ac_link\"") >&5
13259   (eval $ac_link) 2>&5
13260   ac_status=$?
13261   echo "$as_me:13261: \$? = $ac_status" >&5
13262   (exit $ac_status); } &&
13263          { ac_try='test -s conftest$ac_exeext'
13264   { (eval echo "$as_me:13264: \"$ac_try\"") >&5
13265   (eval $ac_try) 2>&5
13266   ac_status=$?
13267   echo "$as_me:13267: \$? = $ac_status" >&5
13268   (exit $ac_status); }; }; then
13269   ac_cv_lib_dbmalloc_debug_malloc=yes
13270 else
13271   echo "$as_me: failed program was:" >&5
13272 cat conftest.$ac_ext >&5
13273 ac_cv_lib_dbmalloc_debug_malloc=no
13274 fi
13275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13276 LIBS=$ac_check_lib_save_LIBS
13277 fi
13278 echo "$as_me:13278: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13279 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13280 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13281   cat >>confdefs.h <<EOF
13282 #define HAVE_LIBDBMALLOC 1
13283 EOF
13284
13285   LIBS="-ldbmalloc $LIBS"
13286
13287 fi
13288
13289 fi
13290
13291 fi
13292
13293 echo "$as_me:13293: checking if you want to use valgrind for testing" >&5
13294 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13295
13296 # Check whether --with-valgrind or --without-valgrind was given.
13297 if test "${with_valgrind+set}" = set; then
13298   withval="$with_valgrind"
13299
13300 cat >>confdefs.h <<EOF
13301 #define USE_VALGRIND 1
13302 EOF
13303
13304         : ${with_cflags:=-g}
13305         : ${with_no_leaks:=yes}
13306          with_valgrind=yes
13307 else
13308   with_valgrind=
13309 fi;
13310 echo "$as_me:13310: result: ${with_valgrind:-no}" >&5
13311 echo "${ECHO_T}${with_valgrind:-no}" >&6
13312
13313 case .$with_cflags in #(vi
13314 .*-g*)
13315         case .$CFLAGS in #(vi
13316         .*-g*) #(vi
13317                 ;;
13318         *)
13319
13320 cf_fix_cppflags=no
13321 cf_new_cflags=
13322 cf_new_cppflags=
13323 cf_new_extra_cppflags=
13324
13325 for cf_add_cflags in -g
13326 do
13327 case $cf_fix_cppflags in
13328 no)
13329         case $cf_add_cflags in #(vi
13330         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13331                 case $cf_add_cflags in
13332                 -D*)
13333                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13334
13335                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13336                                 && test -z "${cf_tst_cflags}" \
13337                                 && cf_fix_cppflags=yes
13338
13339                         if test $cf_fix_cppflags = yes ; then
13340                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13341                                 continue
13342                         elif test "${cf_tst_cflags}" = "\"'" ; then
13343                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13344                                 continue
13345                         fi
13346                         ;;
13347                 esac
13348                 case "$CPPFLAGS" in
13349                 *$cf_add_cflags) #(vi
13350                         ;;
13351                 *) #(vi
13352                         case $cf_add_cflags in #(vi
13353                         -D*)
13354                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13355
13356 CPPFLAGS=`echo "$CPPFLAGS" | \
13357         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13358                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13359
13360                                 ;;
13361                         esac
13362                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13363                         ;;
13364                 esac
13365                 ;;
13366         *)
13367                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13368                 ;;
13369         esac
13370         ;;
13371 yes)
13372         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13373
13374         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13375
13376         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13377                 && test -z "${cf_tst_cflags}" \
13378                 && cf_fix_cppflags=no
13379         ;;
13380 esac
13381 done
13382
13383 if test -n "$cf_new_cflags" ; then
13384
13385         CFLAGS="$CFLAGS $cf_new_cflags"
13386 fi
13387
13388 if test -n "$cf_new_cppflags" ; then
13389
13390         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13391 fi
13392
13393 if test -n "$cf_new_extra_cppflags" ; then
13394
13395         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13396 fi
13397
13398                 ;;
13399         esac
13400         ;;
13401 esac
13402
13403 echo "$as_me:13403: checking if you want to perform memory-leak testing" >&5
13404 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13405
13406 # Check whether --enable-leaks or --disable-leaks was given.
13407 if test "${enable_leaks+set}" = set; then
13408   enableval="$enable_leaks"
13409   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13410 else
13411   : ${with_no_leaks:=no}
13412 fi;
13413 echo "$as_me:13413: result: $with_no_leaks" >&5
13414 echo "${ECHO_T}$with_no_leaks" >&6
13415
13416 if test "$with_no_leaks" = yes ; then
13417
13418 cat >>confdefs.h <<\EOF
13419 #define NO_LEAKS 1
13420 EOF
13421
13422 cat >>confdefs.h <<\EOF
13423 #define YY_NO_LEAKS 1
13424 EOF
13425
13426 fi
13427
13428 cat >>confdefs.h <<\EOF
13429 #define HAVE_NC_ALLOC_H 1
13430 EOF
13431
13432 ###     use option --enable-expanded to generate certain macros as functions
13433
13434 # Check whether --enable-expanded or --disable-expanded was given.
13435 if test "${enable_expanded+set}" = set; then
13436   enableval="$enable_expanded"
13437   test "x$enableval" = xyes &&
13438 cat >>confdefs.h <<\EOF
13439 #define NCURSES_EXPANDED 1
13440 EOF
13441
13442 fi;
13443
13444 ###     use option --disable-macros to suppress macros in favor of functions
13445
13446 # Check whether --enable-macros or --disable-macros was given.
13447 if test "${enable_macros+set}" = set; then
13448   enableval="$enable_macros"
13449   test "$enableval" = no &&
13450 cat >>confdefs.h <<\EOF
13451 #define NCURSES_NOMACROS 1
13452 EOF
13453
13454 fi;
13455
13456 # Normally we only add trace() to the debug-library.  Allow this to be
13457 # extended to all models of the ncurses library:
13458 cf_all_traces=no
13459 case "$CFLAGS $CPPFLAGS" in
13460 *-DTRACE*)
13461         cf_all_traces=yes
13462         ;;
13463 esac
13464
13465 echo "$as_me:13465: checking whether to add trace feature to all models" >&5
13466 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13467
13468 # Check whether --with-trace or --without-trace was given.
13469 if test "${with_trace+set}" = set; then
13470   withval="$with_trace"
13471   cf_with_trace=$withval
13472 else
13473   cf_with_trace=$cf_all_traces
13474 fi;
13475 echo "$as_me:13475: result: $cf_with_trace" >&5
13476 echo "${ECHO_T}$cf_with_trace" >&6
13477
13478 if test "x$cf_with_trace" = xyes ; then
13479         LIB_TRACING=all
13480         ADA_TRACE=TRUE
13481
13482 cf_fix_cppflags=no
13483 cf_new_cflags=
13484 cf_new_cppflags=
13485 cf_new_extra_cppflags=
13486
13487 for cf_add_cflags in -DTRACE
13488 do
13489 case $cf_fix_cppflags in
13490 no)
13491         case $cf_add_cflags in #(vi
13492         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13493                 case $cf_add_cflags in
13494                 -D*)
13495                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13496
13497                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13498                                 && test -z "${cf_tst_cflags}" \
13499                                 && cf_fix_cppflags=yes
13500
13501                         if test $cf_fix_cppflags = yes ; then
13502                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13503                                 continue
13504                         elif test "${cf_tst_cflags}" = "\"'" ; then
13505                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13506                                 continue
13507                         fi
13508                         ;;
13509                 esac
13510                 case "$CPPFLAGS" in
13511                 *$cf_add_cflags) #(vi
13512                         ;;
13513                 *) #(vi
13514                         case $cf_add_cflags in #(vi
13515                         -D*)
13516                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13517
13518 CPPFLAGS=`echo "$CPPFLAGS" | \
13519         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13520                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13521
13522                                 ;;
13523                         esac
13524                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13525                         ;;
13526                 esac
13527                 ;;
13528         *)
13529                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13530                 ;;
13531         esac
13532         ;;
13533 yes)
13534         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13535
13536         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13537
13538         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13539                 && test -z "${cf_tst_cflags}" \
13540                 && cf_fix_cppflags=no
13541         ;;
13542 esac
13543 done
13544
13545 if test -n "$cf_new_cflags" ; then
13546
13547         CFLAGS="$CFLAGS $cf_new_cflags"
13548 fi
13549
13550 if test -n "$cf_new_cppflags" ; then
13551
13552         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13553 fi
13554
13555 if test -n "$cf_new_extra_cppflags" ; then
13556
13557         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13558 fi
13559
13560 else
13561         LIB_TRACING=DEBUG
13562         ADA_TRACE=FALSE
13563 fi
13564
13565 ###     Checks for libraries.
13566 case $cf_cv_system_name in #(vi
13567 *mingw32*) #(vi
13568         ;;
13569 *)
13570 echo "$as_me:13570: checking for gettimeofday" >&5
13571 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13572 if test "${ac_cv_func_gettimeofday+set}" = set; then
13573   echo $ECHO_N "(cached) $ECHO_C" >&6
13574 else
13575   cat >conftest.$ac_ext <<_ACEOF
13576 #line 13576 "configure"
13577 #include "confdefs.h"
13578 /* System header to define __stub macros and hopefully few prototypes,
13579     which can conflict with char gettimeofday (); below.  */
13580 #include <assert.h>
13581 /* Override any gcc2 internal prototype to avoid an error.  */
13582 #ifdef __cplusplus
13583 extern "C"
13584 #endif
13585 /* We use char because int might match the return type of a gcc2
13586    builtin and then its argument prototype would still apply.  */
13587 char gettimeofday ();
13588 char (*f) ();
13589
13590 int
13591 main ()
13592 {
13593 /* The GNU C library defines this for functions which it implements
13594     to always fail with ENOSYS.  Some functions are actually named
13595     something starting with __ and the normal name is an alias.  */
13596 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13597 choke me
13598 #else
13599 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13600 #endif
13601
13602   ;
13603   return 0;
13604 }
13605 _ACEOF
13606 rm -f conftest.$ac_objext conftest$ac_exeext
13607 if { (eval echo "$as_me:13607: \"$ac_link\"") >&5
13608   (eval $ac_link) 2>&5
13609   ac_status=$?
13610   echo "$as_me:13610: \$? = $ac_status" >&5
13611   (exit $ac_status); } &&
13612          { ac_try='test -s conftest$ac_exeext'
13613   { (eval echo "$as_me:13613: \"$ac_try\"") >&5
13614   (eval $ac_try) 2>&5
13615   ac_status=$?
13616   echo "$as_me:13616: \$? = $ac_status" >&5
13617   (exit $ac_status); }; }; then
13618   ac_cv_func_gettimeofday=yes
13619 else
13620   echo "$as_me: failed program was:" >&5
13621 cat conftest.$ac_ext >&5
13622 ac_cv_func_gettimeofday=no
13623 fi
13624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13625 fi
13626 echo "$as_me:13626: result: $ac_cv_func_gettimeofday" >&5
13627 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13628 if test $ac_cv_func_gettimeofday = yes; then
13629
13630 cat >>confdefs.h <<\EOF
13631 #define HAVE_GETTIMEOFDAY 1
13632 EOF
13633
13634 else
13635
13636 echo "$as_me:13636: checking for gettimeofday in -lbsd" >&5
13637 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13638 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13639   echo $ECHO_N "(cached) $ECHO_C" >&6
13640 else
13641   ac_check_lib_save_LIBS=$LIBS
13642 LIBS="-lbsd  $LIBS"
13643 cat >conftest.$ac_ext <<_ACEOF
13644 #line 13644 "configure"
13645 #include "confdefs.h"
13646
13647 /* Override any gcc2 internal prototype to avoid an error.  */
13648 #ifdef __cplusplus
13649 extern "C"
13650 #endif
13651 /* We use char because int might match the return type of a gcc2
13652    builtin and then its argument prototype would still apply.  */
13653 char gettimeofday ();
13654 int
13655 main ()
13656 {
13657 gettimeofday ();
13658   ;
13659   return 0;
13660 }
13661 _ACEOF
13662 rm -f conftest.$ac_objext conftest$ac_exeext
13663 if { (eval echo "$as_me:13663: \"$ac_link\"") >&5
13664   (eval $ac_link) 2>&5
13665   ac_status=$?
13666   echo "$as_me:13666: \$? = $ac_status" >&5
13667   (exit $ac_status); } &&
13668          { ac_try='test -s conftest$ac_exeext'
13669   { (eval echo "$as_me:13669: \"$ac_try\"") >&5
13670   (eval $ac_try) 2>&5
13671   ac_status=$?
13672   echo "$as_me:13672: \$? = $ac_status" >&5
13673   (exit $ac_status); }; }; then
13674   ac_cv_lib_bsd_gettimeofday=yes
13675 else
13676   echo "$as_me: failed program was:" >&5
13677 cat conftest.$ac_ext >&5
13678 ac_cv_lib_bsd_gettimeofday=no
13679 fi
13680 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13681 LIBS=$ac_check_lib_save_LIBS
13682 fi
13683 echo "$as_me:13683: result: $ac_cv_lib_bsd_gettimeofday" >&5
13684 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13685 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13686
13687 cat >>confdefs.h <<\EOF
13688 #define HAVE_GETTIMEOFDAY 1
13689 EOF
13690
13691         LIBS="-lbsd $LIBS"
13692 fi
13693
13694 fi
13695         ;;
13696 esac
13697
13698 echo "$as_me:13698: checking if -lm needed for math functions" >&5
13699 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13700 if test "${cf_cv_need_libm+set}" = set; then
13701   echo $ECHO_N "(cached) $ECHO_C" >&6
13702 else
13703
13704         cat >conftest.$ac_ext <<_ACEOF
13705 #line 13705 "configure"
13706 #include "confdefs.h"
13707
13708         #include <stdio.h>
13709         #include <math.h>
13710
13711 int
13712 main ()
13713 {
13714 double x = rand(); printf("result = %g\n", pow(sin(x),x))
13715   ;
13716   return 0;
13717 }
13718 _ACEOF
13719 rm -f conftest.$ac_objext conftest$ac_exeext
13720 if { (eval echo "$as_me:13720: \"$ac_link\"") >&5
13721   (eval $ac_link) 2>&5
13722   ac_status=$?
13723   echo "$as_me:13723: \$? = $ac_status" >&5
13724   (exit $ac_status); } &&
13725          { ac_try='test -s conftest$ac_exeext'
13726   { (eval echo "$as_me:13726: \"$ac_try\"") >&5
13727   (eval $ac_try) 2>&5
13728   ac_status=$?
13729   echo "$as_me:13729: \$? = $ac_status" >&5
13730   (exit $ac_status); }; }; then
13731   cf_cv_need_libm=no
13732 else
13733   echo "$as_me: failed program was:" >&5
13734 cat conftest.$ac_ext >&5
13735 cf_cv_need_libm=yes
13736 fi
13737 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13738 fi
13739 echo "$as_me:13739: result: $cf_cv_need_libm" >&5
13740 echo "${ECHO_T}$cf_cv_need_libm" >&6
13741 if test "$cf_cv_need_libm" = yes
13742 then
13743 MATH_LIB=-lm
13744 fi
13745
13746 ###     Checks for header files.
13747 echo "$as_me:13747: checking for ANSI C header files" >&5
13748 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13749 if test "${ac_cv_header_stdc+set}" = set; then
13750   echo $ECHO_N "(cached) $ECHO_C" >&6
13751 else
13752   cat >conftest.$ac_ext <<_ACEOF
13753 #line 13753 "configure"
13754 #include "confdefs.h"
13755 #include <stdlib.h>
13756 #include <stdarg.h>
13757 #include <string.h>
13758 #include <float.h>
13759
13760 _ACEOF
13761 if { (eval echo "$as_me:13761: \"$ac_cpp conftest.$ac_ext\"") >&5
13762   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13763   ac_status=$?
13764   egrep -v '^ *\+' conftest.er1 >conftest.err
13765   rm -f conftest.er1
13766   cat conftest.err >&5
13767   echo "$as_me:13767: \$? = $ac_status" >&5
13768   (exit $ac_status); } >/dev/null; then
13769   if test -s conftest.err; then
13770     ac_cpp_err=$ac_c_preproc_warn_flag
13771   else
13772     ac_cpp_err=
13773   fi
13774 else
13775   ac_cpp_err=yes
13776 fi
13777 if test -z "$ac_cpp_err"; then
13778   ac_cv_header_stdc=yes
13779 else
13780   echo "$as_me: failed program was:" >&5
13781   cat conftest.$ac_ext >&5
13782   ac_cv_header_stdc=no
13783 fi
13784 rm -f conftest.err conftest.$ac_ext
13785
13786 if test $ac_cv_header_stdc = yes; then
13787   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13788   cat >conftest.$ac_ext <<_ACEOF
13789 #line 13789 "configure"
13790 #include "confdefs.h"
13791 #include <string.h>
13792
13793 _ACEOF
13794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13795   egrep "memchr" >/dev/null 2>&1; then
13796   :
13797 else
13798   ac_cv_header_stdc=no
13799 fi
13800 rm -rf conftest*
13801
13802 fi
13803
13804 if test $ac_cv_header_stdc = yes; then
13805   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13806   cat >conftest.$ac_ext <<_ACEOF
13807 #line 13807 "configure"
13808 #include "confdefs.h"
13809 #include <stdlib.h>
13810
13811 _ACEOF
13812 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13813   egrep "free" >/dev/null 2>&1; then
13814   :
13815 else
13816   ac_cv_header_stdc=no
13817 fi
13818 rm -rf conftest*
13819
13820 fi
13821
13822 if test $ac_cv_header_stdc = yes; then
13823   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13824   if test "$cross_compiling" = yes; then
13825   :
13826 else
13827   cat >conftest.$ac_ext <<_ACEOF
13828 #line 13828 "configure"
13829 #include "confdefs.h"
13830 #include <ctype.h>
13831 #if ((' ' & 0x0FF) == 0x020)
13832 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13833 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13834 #else
13835 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13836                      || ('j' <= (c) && (c) <= 'r') \
13837                      || ('s' <= (c) && (c) <= 'z'))
13838 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13839 #endif
13840
13841 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13842 int
13843 main ()
13844 {
13845   int i;
13846   for (i = 0; i < 256; i++)
13847     if (XOR (islower (i), ISLOWER (i))
13848         || toupper (i) != TOUPPER (i))
13849       $ac_main_return(2);
13850   $ac_main_return (0);
13851 }
13852 _ACEOF
13853 rm -f conftest$ac_exeext
13854 if { (eval echo "$as_me:13854: \"$ac_link\"") >&5
13855   (eval $ac_link) 2>&5
13856   ac_status=$?
13857   echo "$as_me:13857: \$? = $ac_status" >&5
13858   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13859   { (eval echo "$as_me:13859: \"$ac_try\"") >&5
13860   (eval $ac_try) 2>&5
13861   ac_status=$?
13862   echo "$as_me:13862: \$? = $ac_status" >&5
13863   (exit $ac_status); }; }; then
13864   :
13865 else
13866   echo "$as_me: program exited with status $ac_status" >&5
13867 echo "$as_me: failed program was:" >&5
13868 cat conftest.$ac_ext >&5
13869 ac_cv_header_stdc=no
13870 fi
13871 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13872 fi
13873 fi
13874 fi
13875 echo "$as_me:13875: result: $ac_cv_header_stdc" >&5
13876 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13877 if test $ac_cv_header_stdc = yes; then
13878
13879 cat >>confdefs.h <<\EOF
13880 #define STDC_HEADERS 1
13881 EOF
13882
13883 fi
13884
13885 ac_header_dirent=no
13886 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13887   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13888 echo "$as_me:13888: checking for $ac_hdr that defines DIR" >&5
13889 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13890 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13891   echo $ECHO_N "(cached) $ECHO_C" >&6
13892 else
13893   cat >conftest.$ac_ext <<_ACEOF
13894 #line 13894 "configure"
13895 #include "confdefs.h"
13896 #include <sys/types.h>
13897 #include <$ac_hdr>
13898
13899 int
13900 main ()
13901 {
13902 if ((DIR *) 0)
13903 return 0;
13904   ;
13905   return 0;
13906 }
13907 _ACEOF
13908 rm -f conftest.$ac_objext
13909 if { (eval echo "$as_me:13909: \"$ac_compile\"") >&5
13910   (eval $ac_compile) 2>&5
13911   ac_status=$?
13912   echo "$as_me:13912: \$? = $ac_status" >&5
13913   (exit $ac_status); } &&
13914          { ac_try='test -s conftest.$ac_objext'
13915   { (eval echo "$as_me:13915: \"$ac_try\"") >&5
13916   (eval $ac_try) 2>&5
13917   ac_status=$?
13918   echo "$as_me:13918: \$? = $ac_status" >&5
13919   (exit $ac_status); }; }; then
13920   eval "$as_ac_Header=yes"
13921 else
13922   echo "$as_me: failed program was:" >&5
13923 cat conftest.$ac_ext >&5
13924 eval "$as_ac_Header=no"
13925 fi
13926 rm -f conftest.$ac_objext conftest.$ac_ext
13927 fi
13928 echo "$as_me:13928: result: `eval echo '${'$as_ac_Header'}'`" >&5
13929 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13930 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13931   cat >>confdefs.h <<EOF
13932 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13933 EOF
13934
13935 ac_header_dirent=$ac_hdr; break
13936 fi
13937
13938 done
13939 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13940 if test $ac_header_dirent = dirent.h; then
13941   echo "$as_me:13941: checking for opendir in -ldir" >&5
13942 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13943 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13944   echo $ECHO_N "(cached) $ECHO_C" >&6
13945 else
13946   ac_check_lib_save_LIBS=$LIBS
13947 LIBS="-ldir  $LIBS"
13948 cat >conftest.$ac_ext <<_ACEOF
13949 #line 13949 "configure"
13950 #include "confdefs.h"
13951
13952 /* Override any gcc2 internal prototype to avoid an error.  */
13953 #ifdef __cplusplus
13954 extern "C"
13955 #endif
13956 /* We use char because int might match the return type of a gcc2
13957    builtin and then its argument prototype would still apply.  */
13958 char opendir ();
13959 int
13960 main ()
13961 {
13962 opendir ();
13963   ;
13964   return 0;
13965 }
13966 _ACEOF
13967 rm -f conftest.$ac_objext conftest$ac_exeext
13968 if { (eval echo "$as_me:13968: \"$ac_link\"") >&5
13969   (eval $ac_link) 2>&5
13970   ac_status=$?
13971   echo "$as_me:13971: \$? = $ac_status" >&5
13972   (exit $ac_status); } &&
13973          { ac_try='test -s conftest$ac_exeext'
13974   { (eval echo "$as_me:13974: \"$ac_try\"") >&5
13975   (eval $ac_try) 2>&5
13976   ac_status=$?
13977   echo "$as_me:13977: \$? = $ac_status" >&5
13978   (exit $ac_status); }; }; then
13979   ac_cv_lib_dir_opendir=yes
13980 else
13981   echo "$as_me: failed program was:" >&5
13982 cat conftest.$ac_ext >&5
13983 ac_cv_lib_dir_opendir=no
13984 fi
13985 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13986 LIBS=$ac_check_lib_save_LIBS
13987 fi
13988 echo "$as_me:13988: result: $ac_cv_lib_dir_opendir" >&5
13989 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13990 if test $ac_cv_lib_dir_opendir = yes; then
13991   LIBS="$LIBS -ldir"
13992 fi
13993
13994 else
13995   echo "$as_me:13995: checking for opendir in -lx" >&5
13996 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13997 if test "${ac_cv_lib_x_opendir+set}" = set; then
13998   echo $ECHO_N "(cached) $ECHO_C" >&6
13999 else
14000   ac_check_lib_save_LIBS=$LIBS
14001 LIBS="-lx  $LIBS"
14002 cat >conftest.$ac_ext <<_ACEOF
14003 #line 14003 "configure"
14004 #include "confdefs.h"
14005
14006 /* Override any gcc2 internal prototype to avoid an error.  */
14007 #ifdef __cplusplus
14008 extern "C"
14009 #endif
14010 /* We use char because int might match the return type of a gcc2
14011    builtin and then its argument prototype would still apply.  */
14012 char opendir ();
14013 int
14014 main ()
14015 {
14016 opendir ();
14017   ;
14018   return 0;
14019 }
14020 _ACEOF
14021 rm -f conftest.$ac_objext conftest$ac_exeext
14022 if { (eval echo "$as_me:14022: \"$ac_link\"") >&5
14023   (eval $ac_link) 2>&5
14024   ac_status=$?
14025   echo "$as_me:14025: \$? = $ac_status" >&5
14026   (exit $ac_status); } &&
14027          { ac_try='test -s conftest$ac_exeext'
14028   { (eval echo "$as_me:14028: \"$ac_try\"") >&5
14029   (eval $ac_try) 2>&5
14030   ac_status=$?
14031   echo "$as_me:14031: \$? = $ac_status" >&5
14032   (exit $ac_status); }; }; then
14033   ac_cv_lib_x_opendir=yes
14034 else
14035   echo "$as_me: failed program was:" >&5
14036 cat conftest.$ac_ext >&5
14037 ac_cv_lib_x_opendir=no
14038 fi
14039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14040 LIBS=$ac_check_lib_save_LIBS
14041 fi
14042 echo "$as_me:14042: result: $ac_cv_lib_x_opendir" >&5
14043 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14044 if test $ac_cv_lib_x_opendir = yes; then
14045   LIBS="$LIBS -lx"
14046 fi
14047
14048 fi
14049
14050 echo "$as_me:14050: checking whether time.h and sys/time.h may both be included" >&5
14051 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14052 if test "${ac_cv_header_time+set}" = set; then
14053   echo $ECHO_N "(cached) $ECHO_C" >&6
14054 else
14055   cat >conftest.$ac_ext <<_ACEOF
14056 #line 14056 "configure"
14057 #include "confdefs.h"
14058 #include <sys/types.h>
14059 #include <sys/time.h>
14060 #include <time.h>
14061
14062 int
14063 main ()
14064 {
14065 if ((struct tm *) 0)
14066 return 0;
14067   ;
14068   return 0;
14069 }
14070 _ACEOF
14071 rm -f conftest.$ac_objext
14072 if { (eval echo "$as_me:14072: \"$ac_compile\"") >&5
14073   (eval $ac_compile) 2>&5
14074   ac_status=$?
14075   echo "$as_me:14075: \$? = $ac_status" >&5
14076   (exit $ac_status); } &&
14077          { ac_try='test -s conftest.$ac_objext'
14078   { (eval echo "$as_me:14078: \"$ac_try\"") >&5
14079   (eval $ac_try) 2>&5
14080   ac_status=$?
14081   echo "$as_me:14081: \$? = $ac_status" >&5
14082   (exit $ac_status); }; }; then
14083   ac_cv_header_time=yes
14084 else
14085   echo "$as_me: failed program was:" >&5
14086 cat conftest.$ac_ext >&5
14087 ac_cv_header_time=no
14088 fi
14089 rm -f conftest.$ac_objext conftest.$ac_ext
14090 fi
14091 echo "$as_me:14091: result: $ac_cv_header_time" >&5
14092 echo "${ECHO_T}$ac_cv_header_time" >&6
14093 if test $ac_cv_header_time = yes; then
14094
14095 cat >>confdefs.h <<\EOF
14096 #define TIME_WITH_SYS_TIME 1
14097 EOF
14098
14099 fi
14100
14101 cf_regex_func=no
14102
14103 cf_regex_libs="regex re"
14104 case $host_os in #(vi
14105 mingw*)
14106         cf_regex_libs="gnurx $cf_regex_libs"
14107         ;;
14108 esac
14109
14110 echo "$as_me:14110: checking for regcomp" >&5
14111 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14112 if test "${ac_cv_func_regcomp+set}" = set; then
14113   echo $ECHO_N "(cached) $ECHO_C" >&6
14114 else
14115   cat >conftest.$ac_ext <<_ACEOF
14116 #line 14116 "configure"
14117 #include "confdefs.h"
14118 /* System header to define __stub macros and hopefully few prototypes,
14119     which can conflict with char regcomp (); below.  */
14120 #include <assert.h>
14121 /* Override any gcc2 internal prototype to avoid an error.  */
14122 #ifdef __cplusplus
14123 extern "C"
14124 #endif
14125 /* We use char because int might match the return type of a gcc2
14126    builtin and then its argument prototype would still apply.  */
14127 char regcomp ();
14128 char (*f) ();
14129
14130 int
14131 main ()
14132 {
14133 /* The GNU C library defines this for functions which it implements
14134     to always fail with ENOSYS.  Some functions are actually named
14135     something starting with __ and the normal name is an alias.  */
14136 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14137 choke me
14138 #else
14139 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14140 #endif
14141
14142   ;
14143   return 0;
14144 }
14145 _ACEOF
14146 rm -f conftest.$ac_objext conftest$ac_exeext
14147 if { (eval echo "$as_me:14147: \"$ac_link\"") >&5
14148   (eval $ac_link) 2>&5
14149   ac_status=$?
14150   echo "$as_me:14150: \$? = $ac_status" >&5
14151   (exit $ac_status); } &&
14152          { ac_try='test -s conftest$ac_exeext'
14153   { (eval echo "$as_me:14153: \"$ac_try\"") >&5
14154   (eval $ac_try) 2>&5
14155   ac_status=$?
14156   echo "$as_me:14156: \$? = $ac_status" >&5
14157   (exit $ac_status); }; }; then
14158   ac_cv_func_regcomp=yes
14159 else
14160   echo "$as_me: failed program was:" >&5
14161 cat conftest.$ac_ext >&5
14162 ac_cv_func_regcomp=no
14163 fi
14164 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14165 fi
14166 echo "$as_me:14166: result: $ac_cv_func_regcomp" >&5
14167 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14168 if test $ac_cv_func_regcomp = yes; then
14169   cf_regex_func=regcomp
14170 else
14171
14172         for cf_regex_lib in $cf_regex_libs
14173         do
14174                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14175 echo "$as_me:14175: checking for regcomp in -l$cf_regex_lib" >&5
14176 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14177 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14178   echo $ECHO_N "(cached) $ECHO_C" >&6
14179 else
14180   ac_check_lib_save_LIBS=$LIBS
14181 LIBS="-l$cf_regex_lib  $LIBS"
14182 cat >conftest.$ac_ext <<_ACEOF
14183 #line 14183 "configure"
14184 #include "confdefs.h"
14185
14186 /* Override any gcc2 internal prototype to avoid an error.  */
14187 #ifdef __cplusplus
14188 extern "C"
14189 #endif
14190 /* We use char because int might match the return type of a gcc2
14191    builtin and then its argument prototype would still apply.  */
14192 char regcomp ();
14193 int
14194 main ()
14195 {
14196 regcomp ();
14197   ;
14198   return 0;
14199 }
14200 _ACEOF
14201 rm -f conftest.$ac_objext conftest$ac_exeext
14202 if { (eval echo "$as_me:14202: \"$ac_link\"") >&5
14203   (eval $ac_link) 2>&5
14204   ac_status=$?
14205   echo "$as_me:14205: \$? = $ac_status" >&5
14206   (exit $ac_status); } &&
14207          { ac_try='test -s conftest$ac_exeext'
14208   { (eval echo "$as_me:14208: \"$ac_try\"") >&5
14209   (eval $ac_try) 2>&5
14210   ac_status=$?
14211   echo "$as_me:14211: \$? = $ac_status" >&5
14212   (exit $ac_status); }; }; then
14213   eval "$as_ac_Lib=yes"
14214 else
14215   echo "$as_me: failed program was:" >&5
14216 cat conftest.$ac_ext >&5
14217 eval "$as_ac_Lib=no"
14218 fi
14219 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14220 LIBS=$ac_check_lib_save_LIBS
14221 fi
14222 echo "$as_me:14222: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14223 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14224 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14225
14226                                 LIBS="-l$cf_regex_lib $LIBS"
14227                                 cf_regex_func=regcomp
14228                                 break
14229 fi
14230
14231         done
14232
14233 fi
14234
14235 if test "$cf_regex_func" = no ; then
14236         echo "$as_me:14236: checking for compile" >&5
14237 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14238 if test "${ac_cv_func_compile+set}" = set; then
14239   echo $ECHO_N "(cached) $ECHO_C" >&6
14240 else
14241   cat >conftest.$ac_ext <<_ACEOF
14242 #line 14242 "configure"
14243 #include "confdefs.h"
14244 /* System header to define __stub macros and hopefully few prototypes,
14245     which can conflict with char compile (); below.  */
14246 #include <assert.h>
14247 /* Override any gcc2 internal prototype to avoid an error.  */
14248 #ifdef __cplusplus
14249 extern "C"
14250 #endif
14251 /* We use char because int might match the return type of a gcc2
14252    builtin and then its argument prototype would still apply.  */
14253 char compile ();
14254 char (*f) ();
14255
14256 int
14257 main ()
14258 {
14259 /* The GNU C library defines this for functions which it implements
14260     to always fail with ENOSYS.  Some functions are actually named
14261     something starting with __ and the normal name is an alias.  */
14262 #if defined (__stub_compile) || defined (__stub___compile)
14263 choke me
14264 #else
14265 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14266 #endif
14267
14268   ;
14269   return 0;
14270 }
14271 _ACEOF
14272 rm -f conftest.$ac_objext conftest$ac_exeext
14273 if { (eval echo "$as_me:14273: \"$ac_link\"") >&5
14274   (eval $ac_link) 2>&5
14275   ac_status=$?
14276   echo "$as_me:14276: \$? = $ac_status" >&5
14277   (exit $ac_status); } &&
14278          { ac_try='test -s conftest$ac_exeext'
14279   { (eval echo "$as_me:14279: \"$ac_try\"") >&5
14280   (eval $ac_try) 2>&5
14281   ac_status=$?
14282   echo "$as_me:14282: \$? = $ac_status" >&5
14283   (exit $ac_status); }; }; then
14284   ac_cv_func_compile=yes
14285 else
14286   echo "$as_me: failed program was:" >&5
14287 cat conftest.$ac_ext >&5
14288 ac_cv_func_compile=no
14289 fi
14290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14291 fi
14292 echo "$as_me:14292: result: $ac_cv_func_compile" >&5
14293 echo "${ECHO_T}$ac_cv_func_compile" >&6
14294 if test $ac_cv_func_compile = yes; then
14295   cf_regex_func=compile
14296 else
14297
14298                 echo "$as_me:14298: checking for compile in -lgen" >&5
14299 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14300 if test "${ac_cv_lib_gen_compile+set}" = set; then
14301   echo $ECHO_N "(cached) $ECHO_C" >&6
14302 else
14303   ac_check_lib_save_LIBS=$LIBS
14304 LIBS="-lgen  $LIBS"
14305 cat >conftest.$ac_ext <<_ACEOF
14306 #line 14306 "configure"
14307 #include "confdefs.h"
14308
14309 /* Override any gcc2 internal prototype to avoid an error.  */
14310 #ifdef __cplusplus
14311 extern "C"
14312 #endif
14313 /* We use char because int might match the return type of a gcc2
14314    builtin and then its argument prototype would still apply.  */
14315 char compile ();
14316 int
14317 main ()
14318 {
14319 compile ();
14320   ;
14321   return 0;
14322 }
14323 _ACEOF
14324 rm -f conftest.$ac_objext conftest$ac_exeext
14325 if { (eval echo "$as_me:14325: \"$ac_link\"") >&5
14326   (eval $ac_link) 2>&5
14327   ac_status=$?
14328   echo "$as_me:14328: \$? = $ac_status" >&5
14329   (exit $ac_status); } &&
14330          { ac_try='test -s conftest$ac_exeext'
14331   { (eval echo "$as_me:14331: \"$ac_try\"") >&5
14332   (eval $ac_try) 2>&5
14333   ac_status=$?
14334   echo "$as_me:14334: \$? = $ac_status" >&5
14335   (exit $ac_status); }; }; then
14336   ac_cv_lib_gen_compile=yes
14337 else
14338   echo "$as_me: failed program was:" >&5
14339 cat conftest.$ac_ext >&5
14340 ac_cv_lib_gen_compile=no
14341 fi
14342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14343 LIBS=$ac_check_lib_save_LIBS
14344 fi
14345 echo "$as_me:14345: result: $ac_cv_lib_gen_compile" >&5
14346 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14347 if test $ac_cv_lib_gen_compile = yes; then
14348
14349                                 LIBS="-lgen $LIBS"
14350                                 cf_regex_func=compile
14351 fi
14352
14353 fi
14354
14355 fi
14356
14357 if test "$cf_regex_func" = no ; then
14358         { echo "$as_me:14358: WARNING: cannot find regular expression library" >&5
14359 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14360 fi
14361
14362 echo "$as_me:14362: checking for regular-expression headers" >&5
14363 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14364 if test "${cf_cv_regex_hdrs+set}" = set; then
14365   echo $ECHO_N "(cached) $ECHO_C" >&6
14366 else
14367
14368 cf_cv_regex_hdrs=no
14369 case $cf_regex_func in #(vi
14370 compile) #(vi
14371         for cf_regex_hdr in regexp.h regexpr.h
14372         do
14373                 cat >conftest.$ac_ext <<_ACEOF
14374 #line 14374 "configure"
14375 #include "confdefs.h"
14376 #include <$cf_regex_hdr>
14377 int
14378 main ()
14379 {
14380
14381                         char *p = compile("", "", "", 0);
14382                         int x = step("", "");
14383
14384   ;
14385   return 0;
14386 }
14387 _ACEOF
14388 rm -f conftest.$ac_objext conftest$ac_exeext
14389 if { (eval echo "$as_me:14389: \"$ac_link\"") >&5
14390   (eval $ac_link) 2>&5
14391   ac_status=$?
14392   echo "$as_me:14392: \$? = $ac_status" >&5
14393   (exit $ac_status); } &&
14394          { ac_try='test -s conftest$ac_exeext'
14395   { (eval echo "$as_me:14395: \"$ac_try\"") >&5
14396   (eval $ac_try) 2>&5
14397   ac_status=$?
14398   echo "$as_me:14398: \$? = $ac_status" >&5
14399   (exit $ac_status); }; }; then
14400
14401                         cf_cv_regex_hdrs=$cf_regex_hdr
14402                         break
14403
14404 else
14405   echo "$as_me: failed program was:" >&5
14406 cat conftest.$ac_ext >&5
14407 fi
14408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14409         done
14410         ;;
14411 *)
14412         for cf_regex_hdr in regex.h
14413         do
14414                 cat >conftest.$ac_ext <<_ACEOF
14415 #line 14415 "configure"
14416 #include "confdefs.h"
14417 #include <sys/types.h>
14418 #include <$cf_regex_hdr>
14419 int
14420 main ()
14421 {
14422
14423                         regex_t *p;
14424                         int x = regcomp(p, "", 0);
14425                         int y = regexec(p, "", 0, 0, 0);
14426                         regfree(p);
14427
14428   ;
14429   return 0;
14430 }
14431 _ACEOF
14432 rm -f conftest.$ac_objext conftest$ac_exeext
14433 if { (eval echo "$as_me:14433: \"$ac_link\"") >&5
14434   (eval $ac_link) 2>&5
14435   ac_status=$?
14436   echo "$as_me:14436: \$? = $ac_status" >&5
14437   (exit $ac_status); } &&
14438          { ac_try='test -s conftest$ac_exeext'
14439   { (eval echo "$as_me:14439: \"$ac_try\"") >&5
14440   (eval $ac_try) 2>&5
14441   ac_status=$?
14442   echo "$as_me:14442: \$? = $ac_status" >&5
14443   (exit $ac_status); }; }; then
14444
14445                         cf_cv_regex_hdrs=$cf_regex_hdr
14446                         break
14447
14448 else
14449   echo "$as_me: failed program was:" >&5
14450 cat conftest.$ac_ext >&5
14451 fi
14452 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14453         done
14454         ;;
14455 esac
14456
14457 fi
14458 echo "$as_me:14458: result: $cf_cv_regex_hdrs" >&5
14459 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14460
14461 case $cf_cv_regex_hdrs in #(vi
14462     no)        { echo "$as_me:14462: WARNING: no regular expression header found" >&5
14463 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14464     regex.h)
14465 cat >>confdefs.h <<\EOF
14466 #define HAVE_REGEX_H_FUNCS 1
14467 EOF
14468  ;; #(vi
14469     regexp.h)
14470 cat >>confdefs.h <<\EOF
14471 #define HAVE_REGEXP_H_FUNCS 1
14472 EOF
14473  ;; #(vi
14474     regexpr.h)
14475 cat >>confdefs.h <<\EOF
14476 #define HAVE_REGEXPR_H_FUNCS 1
14477 EOF
14478  ;;
14479 esac
14480
14481 for ac_header in \
14482 fcntl.h \
14483 getopt.h \
14484 limits.h \
14485 locale.h \
14486 math.h \
14487 poll.h \
14488 sys/bsdtypes.h \
14489 sys/ioctl.h \
14490 sys/param.h \
14491 sys/poll.h \
14492 sys/select.h \
14493 sys/time.h \
14494 sys/times.h \
14495 ttyent.h \
14496 unistd.h \
14497 wctype.h \
14498
14499 do
14500 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14501 echo "$as_me:14501: checking for $ac_header" >&5
14502 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14503 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14504   echo $ECHO_N "(cached) $ECHO_C" >&6
14505 else
14506   cat >conftest.$ac_ext <<_ACEOF
14507 #line 14507 "configure"
14508 #include "confdefs.h"
14509 #include <$ac_header>
14510 _ACEOF
14511 if { (eval echo "$as_me:14511: \"$ac_cpp conftest.$ac_ext\"") >&5
14512   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14513   ac_status=$?
14514   egrep -v '^ *\+' conftest.er1 >conftest.err
14515   rm -f conftest.er1
14516   cat conftest.err >&5
14517   echo "$as_me:14517: \$? = $ac_status" >&5
14518   (exit $ac_status); } >/dev/null; then
14519   if test -s conftest.err; then
14520     ac_cpp_err=$ac_c_preproc_warn_flag
14521   else
14522     ac_cpp_err=
14523   fi
14524 else
14525   ac_cpp_err=yes
14526 fi
14527 if test -z "$ac_cpp_err"; then
14528   eval "$as_ac_Header=yes"
14529 else
14530   echo "$as_me: failed program was:" >&5
14531   cat conftest.$ac_ext >&5
14532   eval "$as_ac_Header=no"
14533 fi
14534 rm -f conftest.err conftest.$ac_ext
14535 fi
14536 echo "$as_me:14536: result: `eval echo '${'$as_ac_Header'}'`" >&5
14537 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14538 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14539   cat >>confdefs.h <<EOF
14540 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14541 EOF
14542
14543 fi
14544 done
14545
14546 for ac_header in unistd.h getopt.h
14547 do
14548 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14549 echo "$as_me:14549: checking for $ac_header" >&5
14550 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14551 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14552   echo $ECHO_N "(cached) $ECHO_C" >&6
14553 else
14554   cat >conftest.$ac_ext <<_ACEOF
14555 #line 14555 "configure"
14556 #include "confdefs.h"
14557 #include <$ac_header>
14558 _ACEOF
14559 if { (eval echo "$as_me:14559: \"$ac_cpp conftest.$ac_ext\"") >&5
14560   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14561   ac_status=$?
14562   egrep -v '^ *\+' conftest.er1 >conftest.err
14563   rm -f conftest.er1
14564   cat conftest.err >&5
14565   echo "$as_me:14565: \$? = $ac_status" >&5
14566   (exit $ac_status); } >/dev/null; then
14567   if test -s conftest.err; then
14568     ac_cpp_err=$ac_c_preproc_warn_flag
14569   else
14570     ac_cpp_err=
14571   fi
14572 else
14573   ac_cpp_err=yes
14574 fi
14575 if test -z "$ac_cpp_err"; then
14576   eval "$as_ac_Header=yes"
14577 else
14578   echo "$as_me: failed program was:" >&5
14579   cat conftest.$ac_ext >&5
14580   eval "$as_ac_Header=no"
14581 fi
14582 rm -f conftest.err conftest.$ac_ext
14583 fi
14584 echo "$as_me:14584: result: `eval echo '${'$as_ac_Header'}'`" >&5
14585 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14586 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14587   cat >>confdefs.h <<EOF
14588 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14589 EOF
14590
14591 fi
14592 done
14593
14594 echo "$as_me:14594: checking for header declaring getopt variables" >&5
14595 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14596 if test "${cf_cv_getopt_header+set}" = set; then
14597   echo $ECHO_N "(cached) $ECHO_C" >&6
14598 else
14599
14600 cf_cv_getopt_header=none
14601 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14602 do
14603 cat >conftest.$ac_ext <<_ACEOF
14604 #line 14604 "configure"
14605 #include "confdefs.h"
14606
14607 #include <$cf_header>
14608 int
14609 main ()
14610 {
14611 int x = optind; char *y = optarg
14612   ;
14613   return 0;
14614 }
14615 _ACEOF
14616 rm -f conftest.$ac_objext
14617 if { (eval echo "$as_me:14617: \"$ac_compile\"") >&5
14618   (eval $ac_compile) 2>&5
14619   ac_status=$?
14620   echo "$as_me:14620: \$? = $ac_status" >&5
14621   (exit $ac_status); } &&
14622          { ac_try='test -s conftest.$ac_objext'
14623   { (eval echo "$as_me:14623: \"$ac_try\"") >&5
14624   (eval $ac_try) 2>&5
14625   ac_status=$?
14626   echo "$as_me:14626: \$? = $ac_status" >&5
14627   (exit $ac_status); }; }; then
14628   cf_cv_getopt_header=$cf_header
14629  break
14630 else
14631   echo "$as_me: failed program was:" >&5
14632 cat conftest.$ac_ext >&5
14633 fi
14634 rm -f conftest.$ac_objext conftest.$ac_ext
14635 done
14636
14637 fi
14638 echo "$as_me:14638: result: $cf_cv_getopt_header" >&5
14639 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14640 if test $cf_cv_getopt_header != none ; then
14641
14642 cat >>confdefs.h <<\EOF
14643 #define HAVE_GETOPT_HEADER 1
14644 EOF
14645
14646 fi
14647
14648 # check for ISC (this may also define _POSIX_SOURCE)
14649 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14650 if test "x$ISC" = xyes ; then
14651
14652 echo "$as_me:14652: checking for main in -lcposix" >&5
14653 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14654 if test "${ac_cv_lib_cposix_main+set}" = set; then
14655   echo $ECHO_N "(cached) $ECHO_C" >&6
14656 else
14657   ac_check_lib_save_LIBS=$LIBS
14658 LIBS="-lcposix  $LIBS"
14659 cat >conftest.$ac_ext <<_ACEOF
14660 #line 14660 "configure"
14661 #include "confdefs.h"
14662
14663 int
14664 main ()
14665 {
14666 main ();
14667   ;
14668   return 0;
14669 }
14670 _ACEOF
14671 rm -f conftest.$ac_objext conftest$ac_exeext
14672 if { (eval echo "$as_me:14672: \"$ac_link\"") >&5
14673   (eval $ac_link) 2>&5
14674   ac_status=$?
14675   echo "$as_me:14675: \$? = $ac_status" >&5
14676   (exit $ac_status); } &&
14677          { ac_try='test -s conftest$ac_exeext'
14678   { (eval echo "$as_me:14678: \"$ac_try\"") >&5
14679   (eval $ac_try) 2>&5
14680   ac_status=$?
14681   echo "$as_me:14681: \$? = $ac_status" >&5
14682   (exit $ac_status); }; }; then
14683   ac_cv_lib_cposix_main=yes
14684 else
14685   echo "$as_me: failed program was:" >&5
14686 cat conftest.$ac_ext >&5
14687 ac_cv_lib_cposix_main=no
14688 fi
14689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14690 LIBS=$ac_check_lib_save_LIBS
14691 fi
14692 echo "$as_me:14692: result: $ac_cv_lib_cposix_main" >&5
14693 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14694 if test $ac_cv_lib_cposix_main = yes; then
14695   cat >>confdefs.h <<EOF
14696 #define HAVE_LIBCPOSIX 1
14697 EOF
14698
14699   LIBS="-lcposix $LIBS"
14700
14701 fi
14702
14703         echo "$as_me:14703: checking for bzero in -linet" >&5
14704 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14705 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14706   echo $ECHO_N "(cached) $ECHO_C" >&6
14707 else
14708   ac_check_lib_save_LIBS=$LIBS
14709 LIBS="-linet  $LIBS"
14710 cat >conftest.$ac_ext <<_ACEOF
14711 #line 14711 "configure"
14712 #include "confdefs.h"
14713
14714 /* Override any gcc2 internal prototype to avoid an error.  */
14715 #ifdef __cplusplus
14716 extern "C"
14717 #endif
14718 /* We use char because int might match the return type of a gcc2
14719    builtin and then its argument prototype would still apply.  */
14720 char bzero ();
14721 int
14722 main ()
14723 {
14724 bzero ();
14725   ;
14726   return 0;
14727 }
14728 _ACEOF
14729 rm -f conftest.$ac_objext conftest$ac_exeext
14730 if { (eval echo "$as_me:14730: \"$ac_link\"") >&5
14731   (eval $ac_link) 2>&5
14732   ac_status=$?
14733   echo "$as_me:14733: \$? = $ac_status" >&5
14734   (exit $ac_status); } &&
14735          { ac_try='test -s conftest$ac_exeext'
14736   { (eval echo "$as_me:14736: \"$ac_try\"") >&5
14737   (eval $ac_try) 2>&5
14738   ac_status=$?
14739   echo "$as_me:14739: \$? = $ac_status" >&5
14740   (exit $ac_status); }; }; then
14741   ac_cv_lib_inet_bzero=yes
14742 else
14743   echo "$as_me: failed program was:" >&5
14744 cat conftest.$ac_ext >&5
14745 ac_cv_lib_inet_bzero=no
14746 fi
14747 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14748 LIBS=$ac_check_lib_save_LIBS
14749 fi
14750 echo "$as_me:14750: result: $ac_cv_lib_inet_bzero" >&5
14751 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14752 if test $ac_cv_lib_inet_bzero = yes; then
14753   LIBS="-linet $LIBS"
14754 fi
14755 fi
14756
14757 echo "$as_me:14757: checking if sys/time.h works with sys/select.h" >&5
14758 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14759 if test "${cf_cv_sys_time_select+set}" = set; then
14760   echo $ECHO_N "(cached) $ECHO_C" >&6
14761 else
14762
14763 cat >conftest.$ac_ext <<_ACEOF
14764 #line 14764 "configure"
14765 #include "confdefs.h"
14766
14767 #include <sys/types.h>
14768 #ifdef HAVE_SYS_TIME_H
14769 #include <sys/time.h>
14770 #endif
14771 #ifdef HAVE_SYS_SELECT_H
14772 #include <sys/select.h>
14773 #endif
14774
14775 int
14776 main ()
14777 {
14778
14779   ;
14780   return 0;
14781 }
14782 _ACEOF
14783 rm -f conftest.$ac_objext
14784 if { (eval echo "$as_me:14784: \"$ac_compile\"") >&5
14785   (eval $ac_compile) 2>&5
14786   ac_status=$?
14787   echo "$as_me:14787: \$? = $ac_status" >&5
14788   (exit $ac_status); } &&
14789          { ac_try='test -s conftest.$ac_objext'
14790   { (eval echo "$as_me:14790: \"$ac_try\"") >&5
14791   (eval $ac_try) 2>&5
14792   ac_status=$?
14793   echo "$as_me:14793: \$? = $ac_status" >&5
14794   (exit $ac_status); }; }; then
14795   cf_cv_sys_time_select=yes
14796 else
14797   echo "$as_me: failed program was:" >&5
14798 cat conftest.$ac_ext >&5
14799 cf_cv_sys_time_select=no
14800 fi
14801 rm -f conftest.$ac_objext conftest.$ac_ext
14802
14803 fi
14804
14805 echo "$as_me:14805: result: $cf_cv_sys_time_select" >&5
14806 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14807 test "$cf_cv_sys_time_select" = yes &&
14808 cat >>confdefs.h <<\EOF
14809 #define HAVE_SYS_TIME_SELECT 1
14810 EOF
14811
14812 ###     checks for compiler characteristics
14813 ac_ext=c
14814 ac_cpp='$CPP $CPPFLAGS'
14815 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14816 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14817 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14818 ac_main_return=return
14819
14820 echo "$as_me:14820: checking for an ANSI C-conforming const" >&5
14821 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14822 if test "${ac_cv_c_const+set}" = set; then
14823   echo $ECHO_N "(cached) $ECHO_C" >&6
14824 else
14825   cat >conftest.$ac_ext <<_ACEOF
14826 #line 14826 "configure"
14827 #include "confdefs.h"
14828
14829 int
14830 main ()
14831 {
14832 /* FIXME: Include the comments suggested by Paul. */
14833 #ifndef __cplusplus
14834   /* Ultrix mips cc rejects this.  */
14835   typedef int charset[2];
14836   const charset x;
14837   /* SunOS 4.1.1 cc rejects this.  */
14838   char const *const *ccp;
14839   char **p;
14840   /* NEC SVR4.0.2 mips cc rejects this.  */
14841   struct point {int x, y;};
14842   static struct point const zero = {0,0};
14843   /* AIX XL C 1.02.0.0 rejects this.
14844      It does not let you subtract one const X* pointer from another in
14845      an arm of an if-expression whose if-part is not a constant
14846      expression */
14847   const char *g = "string";
14848   ccp = &g + (g ? g-g : 0);
14849   /* HPUX 7.0 cc rejects these. */
14850   ++ccp;
14851   p = (char**) ccp;
14852   ccp = (char const *const *) p;
14853   { /* SCO 3.2v4 cc rejects this.  */
14854     char *t;
14855     char const *s = 0 ? (char *) 0 : (char const *) 0;
14856
14857     *t++ = 0;
14858   }
14859   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14860     int x[] = {25, 17};
14861     const int *foo = &x[0];
14862     ++foo;
14863   }
14864   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14865     typedef const int *iptr;
14866     iptr p = 0;
14867     ++p;
14868   }
14869   { /* AIX XL C 1.02.0.0 rejects this saying
14870        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14871     struct s { int j; const int *ap[3]; };
14872     struct s *b; b->j = 5;
14873   }
14874   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14875     const int foo = 10;
14876   }
14877 #endif
14878
14879   ;
14880   return 0;
14881 }
14882 _ACEOF
14883 rm -f conftest.$ac_objext
14884 if { (eval echo "$as_me:14884: \"$ac_compile\"") >&5
14885   (eval $ac_compile) 2>&5
14886   ac_status=$?
14887   echo "$as_me:14887: \$? = $ac_status" >&5
14888   (exit $ac_status); } &&
14889          { ac_try='test -s conftest.$ac_objext'
14890   { (eval echo "$as_me:14890: \"$ac_try\"") >&5
14891   (eval $ac_try) 2>&5
14892   ac_status=$?
14893   echo "$as_me:14893: \$? = $ac_status" >&5
14894   (exit $ac_status); }; }; then
14895   ac_cv_c_const=yes
14896 else
14897   echo "$as_me: failed program was:" >&5
14898 cat conftest.$ac_ext >&5
14899 ac_cv_c_const=no
14900 fi
14901 rm -f conftest.$ac_objext conftest.$ac_ext
14902 fi
14903 echo "$as_me:14903: result: $ac_cv_c_const" >&5
14904 echo "${ECHO_T}$ac_cv_c_const" >&6
14905 if test $ac_cv_c_const = no; then
14906
14907 cat >>confdefs.h <<\EOF
14908 #define const
14909 EOF
14910
14911 fi
14912
14913 echo "$as_me:14913: checking for inline" >&5
14914 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14915 if test "${ac_cv_c_inline+set}" = set; then
14916   echo $ECHO_N "(cached) $ECHO_C" >&6
14917 else
14918   ac_cv_c_inline=no
14919 for ac_kw in inline __inline__ __inline; do
14920   cat >conftest.$ac_ext <<_ACEOF
14921 #line 14921 "configure"
14922 #include "confdefs.h"
14923 #ifndef __cplusplus
14924 static $ac_kw int static_foo () {return 0; }
14925 $ac_kw int foo () {return 0; }
14926 #endif
14927
14928 _ACEOF
14929 rm -f conftest.$ac_objext
14930 if { (eval echo "$as_me:14930: \"$ac_compile\"") >&5
14931   (eval $ac_compile) 2>&5
14932   ac_status=$?
14933   echo "$as_me:14933: \$? = $ac_status" >&5
14934   (exit $ac_status); } &&
14935          { ac_try='test -s conftest.$ac_objext'
14936   { (eval echo "$as_me:14936: \"$ac_try\"") >&5
14937   (eval $ac_try) 2>&5
14938   ac_status=$?
14939   echo "$as_me:14939: \$? = $ac_status" >&5
14940   (exit $ac_status); }; }; then
14941   ac_cv_c_inline=$ac_kw; break
14942 else
14943   echo "$as_me: failed program was:" >&5
14944 cat conftest.$ac_ext >&5
14945 fi
14946 rm -f conftest.$ac_objext conftest.$ac_ext
14947 done
14948
14949 fi
14950 echo "$as_me:14950: result: $ac_cv_c_inline" >&5
14951 echo "${ECHO_T}$ac_cv_c_inline" >&6
14952 case $ac_cv_c_inline in
14953   inline | yes) ;;
14954   no)
14955 cat >>confdefs.h <<\EOF
14956 #define inline
14957 EOF
14958  ;;
14959   *)  cat >>confdefs.h <<EOF
14960 #define inline $ac_cv_c_inline
14961 EOF
14962  ;;
14963 esac
14964
14965 NCURSES_INLINE=
14966 if test "$ac_cv_c_inline" != no ; then
14967   NCURSES_INLINE=inline
14968   if test "$INTEL_COMPILER" = yes
14969   then
14970     :
14971   elif test "$CLANG_COMPILER" = yes
14972   then
14973     :
14974   elif test "$GCC" = yes
14975   then
14976     echo "$as_me:14976: checking if $CC supports options to tune inlining" >&5
14977 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14978 if test "${cf_cv_gcc_inline+set}" = set; then
14979   echo $ECHO_N "(cached) $ECHO_C" >&6
14980 else
14981
14982       cf_save_CFLAGS=$CFLAGS
14983       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14984       cat >conftest.$ac_ext <<_ACEOF
14985 #line 14985 "configure"
14986 #include "confdefs.h"
14987 inline int foo(void) { return 1; }
14988 int
14989 main ()
14990 {
14991 ${cf_cv_main_return:-return} foo()
14992   ;
14993   return 0;
14994 }
14995 _ACEOF
14996 rm -f conftest.$ac_objext
14997 if { (eval echo "$as_me:14997: \"$ac_compile\"") >&5
14998   (eval $ac_compile) 2>&5
14999   ac_status=$?
15000   echo "$as_me:15000: \$? = $ac_status" >&5
15001   (exit $ac_status); } &&
15002          { ac_try='test -s conftest.$ac_objext'
15003   { (eval echo "$as_me:15003: \"$ac_try\"") >&5
15004   (eval $ac_try) 2>&5
15005   ac_status=$?
15006   echo "$as_me:15006: \$? = $ac_status" >&5
15007   (exit $ac_status); }; }; then
15008   cf_cv_gcc_inline=yes
15009 else
15010   echo "$as_me: failed program was:" >&5
15011 cat conftest.$ac_ext >&5
15012 cf_cv_gcc_inline=no
15013 fi
15014 rm -f conftest.$ac_objext conftest.$ac_ext
15015       CFLAGS=$cf_save_CFLAGS
15016
15017 fi
15018 echo "$as_me:15018: result: $cf_cv_gcc_inline" >&5
15019 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15020     if test "$cf_cv_gcc_inline" = yes ; then
15021
15022 cf_fix_cppflags=no
15023 cf_new_cflags=
15024 cf_new_cppflags=
15025 cf_new_extra_cppflags=
15026
15027 for cf_add_cflags in --param max-inline-insns-single=1200
15028 do
15029 case $cf_fix_cppflags in
15030 no)
15031         case $cf_add_cflags in #(vi
15032         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15033                 case $cf_add_cflags in
15034                 -D*)
15035                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15036
15037                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15038                                 && test -z "${cf_tst_cflags}" \
15039                                 && cf_fix_cppflags=yes
15040
15041                         if test $cf_fix_cppflags = yes ; then
15042                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15043                                 continue
15044                         elif test "${cf_tst_cflags}" = "\"'" ; then
15045                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15046                                 continue
15047                         fi
15048                         ;;
15049                 esac
15050                 case "$CPPFLAGS" in
15051                 *$cf_add_cflags) #(vi
15052                         ;;
15053                 *) #(vi
15054                         case $cf_add_cflags in #(vi
15055                         -D*)
15056                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15057
15058 CPPFLAGS=`echo "$CPPFLAGS" | \
15059         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15060                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15061
15062                                 ;;
15063                         esac
15064                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15065                         ;;
15066                 esac
15067                 ;;
15068         *)
15069                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15070                 ;;
15071         esac
15072         ;;
15073 yes)
15074         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15075
15076         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15077
15078         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15079                 && test -z "${cf_tst_cflags}" \
15080                 && cf_fix_cppflags=no
15081         ;;
15082 esac
15083 done
15084
15085 if test -n "$cf_new_cflags" ; then
15086
15087         CFLAGS="$CFLAGS $cf_new_cflags"
15088 fi
15089
15090 if test -n "$cf_new_cppflags" ; then
15091
15092         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15093 fi
15094
15095 if test -n "$cf_new_extra_cppflags" ; then
15096
15097         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15098 fi
15099
15100     fi
15101   fi
15102 fi
15103
15104 echo "$as_me:15104: checking for signal global datatype" >&5
15105 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15106 if test "${cf_cv_sig_atomic_t+set}" = set; then
15107   echo $ECHO_N "(cached) $ECHO_C" >&6
15108 else
15109
15110         for cf_type in \
15111                 "volatile sig_atomic_t" \
15112                 "sig_atomic_t" \
15113                 "int"
15114         do
15115         cat >conftest.$ac_ext <<_ACEOF
15116 #line 15116 "configure"
15117 #include "confdefs.h"
15118
15119 #include <sys/types.h>
15120 #include <signal.h>
15121 #include <stdio.h>
15122
15123 extern $cf_type x;
15124 $cf_type x;
15125 static void handler(int sig)
15126 {
15127         x = 5;
15128 }
15129 int
15130 main ()
15131 {
15132 signal(SIGINT, handler);
15133                  x = 1
15134   ;
15135   return 0;
15136 }
15137 _ACEOF
15138 rm -f conftest.$ac_objext
15139 if { (eval echo "$as_me:15139: \"$ac_compile\"") >&5
15140   (eval $ac_compile) 2>&5
15141   ac_status=$?
15142   echo "$as_me:15142: \$? = $ac_status" >&5
15143   (exit $ac_status); } &&
15144          { ac_try='test -s conftest.$ac_objext'
15145   { (eval echo "$as_me:15145: \"$ac_try\"") >&5
15146   (eval $ac_try) 2>&5
15147   ac_status=$?
15148   echo "$as_me:15148: \$? = $ac_status" >&5
15149   (exit $ac_status); }; }; then
15150   cf_cv_sig_atomic_t=$cf_type
15151 else
15152   echo "$as_me: failed program was:" >&5
15153 cat conftest.$ac_ext >&5
15154 cf_cv_sig_atomic_t=no
15155 fi
15156 rm -f conftest.$ac_objext conftest.$ac_ext
15157                 test "$cf_cv_sig_atomic_t" != no && break
15158         done
15159
15160 fi
15161
15162 echo "$as_me:15162: result: $cf_cv_sig_atomic_t" >&5
15163 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15164 test "$cf_cv_sig_atomic_t" != no &&
15165 cat >>confdefs.h <<EOF
15166 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15167 EOF
15168
15169 if test $NCURSES_CHTYPE = auto ; then
15170
15171 echo "$as_me:15171: checking for type of chtype" >&5
15172 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15173 if test "${cf_cv_typeof_chtype+set}" = set; then
15174   echo $ECHO_N "(cached) $ECHO_C" >&6
15175 else
15176
15177                 if test "$cross_compiling" = yes; then
15178   cf_cv_typeof_chtype=long
15179 else
15180   cat >conftest.$ac_ext <<_ACEOF
15181 #line 15181 "configure"
15182 #include "confdefs.h"
15183
15184 #define WANT_BITS 31
15185 #include <stdio.h>
15186 int main()
15187 {
15188         FILE *fp = fopen("cf_test.out", "w");
15189         if (fp != 0) {
15190                 char *result = "long";
15191                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15192                         int n;
15193                         unsigned int x, y;
15194                         for (n = 0; n < WANT_BITS; n++) {
15195                                 x = (1 << n);
15196                                 y = (x >> n);
15197                                 if (y != 1 || x == 0) {
15198                                         x = 0;
15199                                         break;
15200                                 }
15201                         }
15202                         /*
15203                          * If x is nonzero, an int is big enough for the bits
15204                          * that we want.
15205                          */
15206                         result = (x != 0) ? "int" : "long";
15207                 }
15208                 fputs(result, fp);
15209                 fclose(fp);
15210         }
15211         ${cf_cv_main_return:-return}(0);
15212 }
15213
15214 _ACEOF
15215 rm -f conftest$ac_exeext
15216 if { (eval echo "$as_me:15216: \"$ac_link\"") >&5
15217   (eval $ac_link) 2>&5
15218   ac_status=$?
15219   echo "$as_me:15219: \$? = $ac_status" >&5
15220   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15221   { (eval echo "$as_me:15221: \"$ac_try\"") >&5
15222   (eval $ac_try) 2>&5
15223   ac_status=$?
15224   echo "$as_me:15224: \$? = $ac_status" >&5
15225   (exit $ac_status); }; }; then
15226   cf_cv_typeof_chtype=`cat cf_test.out`
15227 else
15228   echo "$as_me: program exited with status $ac_status" >&5
15229 echo "$as_me: failed program was:" >&5
15230 cat conftest.$ac_ext >&5
15231 cf_cv_typeof_chtype=long
15232 fi
15233 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15234 fi
15235                 rm -f cf_test.out
15236
15237 fi
15238
15239 echo "$as_me:15239: result: $cf_cv_typeof_chtype" >&5
15240 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15241
15242 cat >>confdefs.h <<EOF
15243 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15244 EOF
15245
15246 else
15247         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15248 fi
15249 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15250
15251 echo "$as_me:15251: checking if unsigned literals are legal" >&5
15252 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15253 if test "${cf_cv_unsigned_literals+set}" = set; then
15254   echo $ECHO_N "(cached) $ECHO_C" >&6
15255 else
15256
15257         cat >conftest.$ac_ext <<_ACEOF
15258 #line 15258 "configure"
15259 #include "confdefs.h"
15260
15261 int
15262 main ()
15263 {
15264 long x = 1L + 1UL + 1U + 1
15265   ;
15266   return 0;
15267 }
15268 _ACEOF
15269 rm -f conftest.$ac_objext
15270 if { (eval echo "$as_me:15270: \"$ac_compile\"") >&5
15271   (eval $ac_compile) 2>&5
15272   ac_status=$?
15273   echo "$as_me:15273: \$? = $ac_status" >&5
15274   (exit $ac_status); } &&
15275          { ac_try='test -s conftest.$ac_objext'
15276   { (eval echo "$as_me:15276: \"$ac_try\"") >&5
15277   (eval $ac_try) 2>&5
15278   ac_status=$?
15279   echo "$as_me:15279: \$? = $ac_status" >&5
15280   (exit $ac_status); }; }; then
15281   cf_cv_unsigned_literals=yes
15282 else
15283   echo "$as_me: failed program was:" >&5
15284 cat conftest.$ac_ext >&5
15285 cf_cv_unsigned_literals=no
15286 fi
15287 rm -f conftest.$ac_objext conftest.$ac_ext
15288
15289 fi
15290
15291 echo "$as_me:15291: result: $cf_cv_unsigned_literals" >&5
15292 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15293
15294 cf_cv_1UL="1"
15295 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15296 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15297
15298 if test $NCURSES_MMASK_T = auto ; then
15299         cf_cv_typeof_mmask_t=long
15300 else
15301         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15302 fi
15303 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15304
15305 ###     Checks for external-data
15306
15307 echo "$as_me:15307: checking if external errno is declared" >&5
15308 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15309 if test "${cf_cv_dcl_errno+set}" = set; then
15310   echo $ECHO_N "(cached) $ECHO_C" >&6
15311 else
15312
15313     cat >conftest.$ac_ext <<_ACEOF
15314 #line 15314 "configure"
15315 #include "confdefs.h"
15316
15317 #ifdef HAVE_STDLIB_H
15318 #include <stdlib.h>
15319 #endif
15320 #include <stdio.h>
15321 #include <sys/types.h>
15322 #include <errno.h>
15323 int
15324 main ()
15325 {
15326 int x = (int) errno
15327   ;
15328   return 0;
15329 }
15330 _ACEOF
15331 rm -f conftest.$ac_objext
15332 if { (eval echo "$as_me:15332: \"$ac_compile\"") >&5
15333   (eval $ac_compile) 2>&5
15334   ac_status=$?
15335   echo "$as_me:15335: \$? = $ac_status" >&5
15336   (exit $ac_status); } &&
15337          { ac_try='test -s conftest.$ac_objext'
15338   { (eval echo "$as_me:15338: \"$ac_try\"") >&5
15339   (eval $ac_try) 2>&5
15340   ac_status=$?
15341   echo "$as_me:15341: \$? = $ac_status" >&5
15342   (exit $ac_status); }; }; then
15343   cf_cv_dcl_errno=yes
15344 else
15345   echo "$as_me: failed program was:" >&5
15346 cat conftest.$ac_ext >&5
15347 cf_cv_dcl_errno=no
15348 fi
15349 rm -f conftest.$ac_objext conftest.$ac_ext
15350
15351 fi
15352 echo "$as_me:15352: result: $cf_cv_dcl_errno" >&5
15353 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15354
15355 if test "$cf_cv_dcl_errno" = no ; then
15356
15357 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15358
15359     cat >>confdefs.h <<EOF
15360 #define $cf_result 1
15361 EOF
15362
15363 fi
15364
15365 # It's possible (for near-UNIX clones) that the data doesn't exist
15366
15367 echo "$as_me:15367: checking if external errno exists" >&5
15368 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15369 if test "${cf_cv_have_errno+set}" = set; then
15370   echo $ECHO_N "(cached) $ECHO_C" >&6
15371 else
15372
15373     cat >conftest.$ac_ext <<_ACEOF
15374 #line 15374 "configure"
15375 #include "confdefs.h"
15376
15377 #undef errno
15378 extern int errno;
15379
15380 int
15381 main ()
15382 {
15383 errno = 2
15384   ;
15385   return 0;
15386 }
15387 _ACEOF
15388 rm -f conftest.$ac_objext conftest$ac_exeext
15389 if { (eval echo "$as_me:15389: \"$ac_link\"") >&5
15390   (eval $ac_link) 2>&5
15391   ac_status=$?
15392   echo "$as_me:15392: \$? = $ac_status" >&5
15393   (exit $ac_status); } &&
15394          { ac_try='test -s conftest$ac_exeext'
15395   { (eval echo "$as_me:15395: \"$ac_try\"") >&5
15396   (eval $ac_try) 2>&5
15397   ac_status=$?
15398   echo "$as_me:15398: \$? = $ac_status" >&5
15399   (exit $ac_status); }; }; then
15400   cf_cv_have_errno=yes
15401 else
15402   echo "$as_me: failed program was:" >&5
15403 cat conftest.$ac_ext >&5
15404 cf_cv_have_errno=no
15405 fi
15406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15407
15408 fi
15409 echo "$as_me:15409: result: $cf_cv_have_errno" >&5
15410 echo "${ECHO_T}$cf_cv_have_errno" >&6
15411
15412 if test "$cf_cv_have_errno" = yes ; then
15413
15414 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15415
15416     cat >>confdefs.h <<EOF
15417 #define $cf_result 1
15418 EOF
15419
15420 fi
15421
15422 echo "$as_me:15422: checking if data-only library module links" >&5
15423 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15424 if test "${cf_cv_link_dataonly+set}" = set; then
15425   echo $ECHO_N "(cached) $ECHO_C" >&6
15426 else
15427
15428         rm -f conftest.a
15429         cat >conftest.$ac_ext <<EOF
15430 #line 15430 "configure"
15431 int     testdata[3] = { 123, 456, 789 };
15432 EOF
15433         if { (eval echo "$as_me:15433: \"$ac_compile\"") >&5
15434   (eval $ac_compile) 2>&5
15435   ac_status=$?
15436   echo "$as_me:15436: \$? = $ac_status" >&5
15437   (exit $ac_status); } ; then
15438                 mv conftest.o data.o && \
15439                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15440         fi
15441         rm -f conftest.$ac_ext data.o
15442         cat >conftest.$ac_ext <<EOF
15443 #line 15443 "configure"
15444 int     testfunc()
15445 {
15446 #if defined(NeXT)
15447         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15448 #else
15449         extern int testdata[3];
15450         return testdata[0] == 123
15451            &&  testdata[1] == 456
15452            &&  testdata[2] == 789;
15453 #endif
15454 }
15455 EOF
15456         if { (eval echo "$as_me:15456: \"$ac_compile\"") >&5
15457   (eval $ac_compile) 2>&5
15458   ac_status=$?
15459   echo "$as_me:15459: \$? = $ac_status" >&5
15460   (exit $ac_status); }; then
15461                 mv conftest.o func.o && \
15462                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15463         fi
15464         rm -f conftest.$ac_ext func.o
15465         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15466         cf_saveLIBS="$LIBS"
15467         LIBS="conftest.a $LIBS"
15468         if test "$cross_compiling" = yes; then
15469   cf_cv_link_dataonly=unknown
15470 else
15471   cat >conftest.$ac_ext <<_ACEOF
15472 #line 15472 "configure"
15473 #include "confdefs.h"
15474
15475         int main()
15476         {
15477                 extern int testfunc();
15478                 ${cf_cv_main_return:-return} (!testfunc());
15479         }
15480
15481 _ACEOF
15482 rm -f conftest$ac_exeext
15483 if { (eval echo "$as_me:15483: \"$ac_link\"") >&5
15484   (eval $ac_link) 2>&5
15485   ac_status=$?
15486   echo "$as_me:15486: \$? = $ac_status" >&5
15487   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15488   { (eval echo "$as_me:15488: \"$ac_try\"") >&5
15489   (eval $ac_try) 2>&5
15490   ac_status=$?
15491   echo "$as_me:15491: \$? = $ac_status" >&5
15492   (exit $ac_status); }; }; then
15493   cf_cv_link_dataonly=yes
15494 else
15495   echo "$as_me: program exited with status $ac_status" >&5
15496 echo "$as_me: failed program was:" >&5
15497 cat conftest.$ac_ext >&5
15498 cf_cv_link_dataonly=no
15499 fi
15500 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15501 fi
15502         LIBS="$cf_saveLIBS"
15503
15504 fi
15505
15506 echo "$as_me:15506: result: $cf_cv_link_dataonly" >&5
15507 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15508
15509 if test "$cf_cv_link_dataonly" = no ; then
15510
15511 cat >>confdefs.h <<\EOF
15512 #define BROKEN_LINKER 1
15513 EOF
15514
15515         BROKEN_LINKER=1
15516 fi
15517
15518 ###     Checks for library functions.
15519
15520 for ac_func in \
15521 getcwd \
15522 getegid \
15523 geteuid \
15524 getttynam \
15525 issetugid \
15526 poll \
15527 putenv \
15528 remove \
15529 select \
15530 setbuf \
15531 setbuffer \
15532 setenv \
15533 setvbuf \
15534 sigaction \
15535 sigvec \
15536 strdup \
15537 strstr \
15538 tcgetpgrp \
15539 times \
15540 vsnprintf \
15541
15542 do
15543 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15544 echo "$as_me:15544: checking for $ac_func" >&5
15545 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15546 if eval "test \"\${$as_ac_var+set}\" = set"; then
15547   echo $ECHO_N "(cached) $ECHO_C" >&6
15548 else
15549   cat >conftest.$ac_ext <<_ACEOF
15550 #line 15550 "configure"
15551 #include "confdefs.h"
15552 /* System header to define __stub macros and hopefully few prototypes,
15553     which can conflict with char $ac_func (); below.  */
15554 #include <assert.h>
15555 /* Override any gcc2 internal prototype to avoid an error.  */
15556 #ifdef __cplusplus
15557 extern "C"
15558 #endif
15559 /* We use char because int might match the return type of a gcc2
15560    builtin and then its argument prototype would still apply.  */
15561 char $ac_func ();
15562 char (*f) ();
15563
15564 int
15565 main ()
15566 {
15567 /* The GNU C library defines this for functions which it implements
15568     to always fail with ENOSYS.  Some functions are actually named
15569     something starting with __ and the normal name is an alias.  */
15570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15571 choke me
15572 #else
15573 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15574 #endif
15575
15576   ;
15577   return 0;
15578 }
15579 _ACEOF
15580 rm -f conftest.$ac_objext conftest$ac_exeext
15581 if { (eval echo "$as_me:15581: \"$ac_link\"") >&5
15582   (eval $ac_link) 2>&5
15583   ac_status=$?
15584   echo "$as_me:15584: \$? = $ac_status" >&5
15585   (exit $ac_status); } &&
15586          { ac_try='test -s conftest$ac_exeext'
15587   { (eval echo "$as_me:15587: \"$ac_try\"") >&5
15588   (eval $ac_try) 2>&5
15589   ac_status=$?
15590   echo "$as_me:15590: \$? = $ac_status" >&5
15591   (exit $ac_status); }; }; then
15592   eval "$as_ac_var=yes"
15593 else
15594   echo "$as_me: failed program was:" >&5
15595 cat conftest.$ac_ext >&5
15596 eval "$as_ac_var=no"
15597 fi
15598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15599 fi
15600 echo "$as_me:15600: result: `eval echo '${'$as_ac_var'}'`" >&5
15601 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15602 if test `eval echo '${'$as_ac_var'}'` = yes; then
15603   cat >>confdefs.h <<EOF
15604 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15605 EOF
15606
15607 fi
15608 done
15609
15610 if test "x$with_getcap" = "xyes" ; then
15611
15612 echo "$as_me:15612: checking for terminal-capability database functions" >&5
15613 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15614 if test "${cf_cv_cgetent+set}" = set; then
15615   echo $ECHO_N "(cached) $ECHO_C" >&6
15616 else
15617
15618 cat >conftest.$ac_ext <<_ACEOF
15619 #line 15619 "configure"
15620 #include "confdefs.h"
15621
15622 #include <stdlib.h>
15623 int
15624 main ()
15625 {
15626
15627         char temp[128];
15628         char *buf = temp;
15629         char *db_array = temp;
15630         cgetent(&buf, &db_array, "vt100");
15631         cgetcap(buf, "tc", '=');
15632         cgetmatch(buf, "tc");
15633
15634   ;
15635   return 0;
15636 }
15637 _ACEOF
15638 rm -f conftest.$ac_objext conftest$ac_exeext
15639 if { (eval echo "$as_me:15639: \"$ac_link\"") >&5
15640   (eval $ac_link) 2>&5
15641   ac_status=$?
15642   echo "$as_me:15642: \$? = $ac_status" >&5
15643   (exit $ac_status); } &&
15644          { ac_try='test -s conftest$ac_exeext'
15645   { (eval echo "$as_me:15645: \"$ac_try\"") >&5
15646   (eval $ac_try) 2>&5
15647   ac_status=$?
15648   echo "$as_me:15648: \$? = $ac_status" >&5
15649   (exit $ac_status); }; }; then
15650   cf_cv_cgetent=yes
15651 else
15652   echo "$as_me: failed program was:" >&5
15653 cat conftest.$ac_ext >&5
15654 cf_cv_cgetent=no
15655 fi
15656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15657
15658 fi
15659 echo "$as_me:15659: result: $cf_cv_cgetent" >&5
15660 echo "${ECHO_T}$cf_cv_cgetent" >&6
15661
15662 if test "$cf_cv_cgetent" = yes
15663 then
15664
15665 cat >>confdefs.h <<\EOF
15666 #define HAVE_BSD_CGETENT 1
15667 EOF
15668
15669 echo "$as_me:15669: checking if cgetent uses const parameter" >&5
15670 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15671 if test "${cf_cv_cgetent_const+set}" = set; then
15672   echo $ECHO_N "(cached) $ECHO_C" >&6
15673 else
15674
15675 cat >conftest.$ac_ext <<_ACEOF
15676 #line 15676 "configure"
15677 #include "confdefs.h"
15678
15679 #include <stdlib.h>
15680 int
15681 main ()
15682 {
15683
15684         char temp[128];
15685         char *buf = temp;
15686 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15687         const char *db_array = temp;
15688         cgetent(&buf, &db_array, "vt100");
15689 #endif
15690         cgetcap(buf, "tc", '=');
15691         cgetmatch(buf, "tc");
15692
15693   ;
15694   return 0;
15695 }
15696 _ACEOF
15697 rm -f conftest.$ac_objext conftest$ac_exeext
15698 if { (eval echo "$as_me:15698: \"$ac_link\"") >&5
15699   (eval $ac_link) 2>&5
15700   ac_status=$?
15701   echo "$as_me:15701: \$? = $ac_status" >&5
15702   (exit $ac_status); } &&
15703          { ac_try='test -s conftest$ac_exeext'
15704   { (eval echo "$as_me:15704: \"$ac_try\"") >&5
15705   (eval $ac_try) 2>&5
15706   ac_status=$?
15707   echo "$as_me:15707: \$? = $ac_status" >&5
15708   (exit $ac_status); }; }; then
15709   cf_cv_cgetent_const=yes
15710 else
15711   echo "$as_me: failed program was:" >&5
15712 cat conftest.$ac_ext >&5
15713 cf_cv_cgetent_const=no
15714 fi
15715 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15716
15717 fi
15718 echo "$as_me:15718: result: $cf_cv_cgetent_const" >&5
15719 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15720         if test "$cf_cv_cgetent_const" = yes
15721         then
15722
15723 cat >>confdefs.h <<EOF
15724 #define CGETENT_CONST const
15725 EOF
15726
15727         fi
15728 fi
15729
15730 fi
15731
15732 echo "$as_me:15732: checking for isascii" >&5
15733 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15734 if test "${cf_cv_have_isascii+set}" = set; then
15735   echo $ECHO_N "(cached) $ECHO_C" >&6
15736 else
15737
15738         cat >conftest.$ac_ext <<_ACEOF
15739 #line 15739 "configure"
15740 #include "confdefs.h"
15741 #include <ctype.h>
15742 int
15743 main ()
15744 {
15745 int x = isascii(' ')
15746   ;
15747   return 0;
15748 }
15749 _ACEOF
15750 rm -f conftest.$ac_objext conftest$ac_exeext
15751 if { (eval echo "$as_me:15751: \"$ac_link\"") >&5
15752   (eval $ac_link) 2>&5
15753   ac_status=$?
15754   echo "$as_me:15754: \$? = $ac_status" >&5
15755   (exit $ac_status); } &&
15756          { ac_try='test -s conftest$ac_exeext'
15757   { (eval echo "$as_me:15757: \"$ac_try\"") >&5
15758   (eval $ac_try) 2>&5
15759   ac_status=$?
15760   echo "$as_me:15760: \$? = $ac_status" >&5
15761   (exit $ac_status); }; }; then
15762   cf_cv_have_isascii=yes
15763 else
15764   echo "$as_me: failed program was:" >&5
15765 cat conftest.$ac_ext >&5
15766 cf_cv_have_isascii=no
15767 fi
15768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15769
15770 fi
15771 echo "$as_me:15771: result: $cf_cv_have_isascii" >&5
15772 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15773 test "$cf_cv_have_isascii" = yes &&
15774 cat >>confdefs.h <<\EOF
15775 #define HAVE_ISASCII 1
15776 EOF
15777
15778 if test "$ac_cv_func_sigaction" = yes; then
15779 echo "$as_me:15779: checking whether sigaction needs _POSIX_SOURCE" >&5
15780 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15781 cat >conftest.$ac_ext <<_ACEOF
15782 #line 15782 "configure"
15783 #include "confdefs.h"
15784
15785 #include <sys/types.h>
15786 #include <signal.h>
15787 int
15788 main ()
15789 {
15790 struct sigaction act
15791   ;
15792   return 0;
15793 }
15794 _ACEOF
15795 rm -f conftest.$ac_objext
15796 if { (eval echo "$as_me:15796: \"$ac_compile\"") >&5
15797   (eval $ac_compile) 2>&5
15798   ac_status=$?
15799   echo "$as_me:15799: \$? = $ac_status" >&5
15800   (exit $ac_status); } &&
15801          { ac_try='test -s conftest.$ac_objext'
15802   { (eval echo "$as_me:15802: \"$ac_try\"") >&5
15803   (eval $ac_try) 2>&5
15804   ac_status=$?
15805   echo "$as_me:15805: \$? = $ac_status" >&5
15806   (exit $ac_status); }; }; then
15807   sigact_bad=no
15808 else
15809   echo "$as_me: failed program was:" >&5
15810 cat conftest.$ac_ext >&5
15811
15812 cat >conftest.$ac_ext <<_ACEOF
15813 #line 15813 "configure"
15814 #include "confdefs.h"
15815
15816 #define _POSIX_SOURCE
15817 #include <sys/types.h>
15818 #include <signal.h>
15819 int
15820 main ()
15821 {
15822 struct sigaction act
15823   ;
15824   return 0;
15825 }
15826 _ACEOF
15827 rm -f conftest.$ac_objext
15828 if { (eval echo "$as_me:15828: \"$ac_compile\"") >&5
15829   (eval $ac_compile) 2>&5
15830   ac_status=$?
15831   echo "$as_me:15831: \$? = $ac_status" >&5
15832   (exit $ac_status); } &&
15833          { ac_try='test -s conftest.$ac_objext'
15834   { (eval echo "$as_me:15834: \"$ac_try\"") >&5
15835   (eval $ac_try) 2>&5
15836   ac_status=$?
15837   echo "$as_me:15837: \$? = $ac_status" >&5
15838   (exit $ac_status); }; }; then
15839   sigact_bad=yes
15840
15841 cat >>confdefs.h <<\EOF
15842 #define _POSIX_SOURCE 1
15843 EOF
15844
15845 else
15846   echo "$as_me: failed program was:" >&5
15847 cat conftest.$ac_ext >&5
15848 sigact_bad=unknown
15849 fi
15850 rm -f conftest.$ac_objext conftest.$ac_ext
15851 fi
15852 rm -f conftest.$ac_objext conftest.$ac_ext
15853 echo "$as_me:15853: result: $sigact_bad" >&5
15854 echo "${ECHO_T}$sigact_bad" >&6
15855 fi
15856
15857 echo "$as_me:15857: checking if nanosleep really works" >&5
15858 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15859 if test "${cf_cv_func_nanosleep+set}" = set; then
15860   echo $ECHO_N "(cached) $ECHO_C" >&6
15861 else
15862
15863 if test "$cross_compiling" = yes; then
15864   cf_cv_func_nanosleep=unknown
15865 else
15866   cat >conftest.$ac_ext <<_ACEOF
15867 #line 15867 "configure"
15868 #include "confdefs.h"
15869
15870 #include <stdio.h>
15871 #include <errno.h>
15872 #include <time.h>
15873
15874 #ifdef HAVE_SYS_TIME_H
15875 #include <sys/time.h>
15876 #endif
15877
15878 int main() {
15879         struct timespec ts1, ts2;
15880         int code;
15881         ts1.tv_sec  = 0;
15882         ts1.tv_nsec = 750000000;
15883         ts2.tv_sec  = 0;
15884         ts2.tv_nsec = 0;
15885         errno = 0;
15886         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15887         ${cf_cv_main_return:-return}(code != 0);
15888 }
15889
15890 _ACEOF
15891 rm -f conftest$ac_exeext
15892 if { (eval echo "$as_me:15892: \"$ac_link\"") >&5
15893   (eval $ac_link) 2>&5
15894   ac_status=$?
15895   echo "$as_me:15895: \$? = $ac_status" >&5
15896   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15897   { (eval echo "$as_me:15897: \"$ac_try\"") >&5
15898   (eval $ac_try) 2>&5
15899   ac_status=$?
15900   echo "$as_me:15900: \$? = $ac_status" >&5
15901   (exit $ac_status); }; }; then
15902   cf_cv_func_nanosleep=yes
15903 else
15904   echo "$as_me: program exited with status $ac_status" >&5
15905 echo "$as_me: failed program was:" >&5
15906 cat conftest.$ac_ext >&5
15907 cf_cv_func_nanosleep=no
15908 fi
15909 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15910 fi
15911 fi
15912 echo "$as_me:15912: result: $cf_cv_func_nanosleep" >&5
15913 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15914
15915 test "$cf_cv_func_nanosleep" = "yes" &&
15916 cat >>confdefs.h <<\EOF
15917 #define HAVE_NANOSLEEP 1
15918 EOF
15919
15920 for ac_header in \
15921 termio.h \
15922 termios.h \
15923 unistd.h \
15924
15925 do
15926 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15927 echo "$as_me:15927: checking for $ac_header" >&5
15928 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15929 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15930   echo $ECHO_N "(cached) $ECHO_C" >&6
15931 else
15932   cat >conftest.$ac_ext <<_ACEOF
15933 #line 15933 "configure"
15934 #include "confdefs.h"
15935 #include <$ac_header>
15936 _ACEOF
15937 if { (eval echo "$as_me:15937: \"$ac_cpp conftest.$ac_ext\"") >&5
15938   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15939   ac_status=$?
15940   egrep -v '^ *\+' conftest.er1 >conftest.err
15941   rm -f conftest.er1
15942   cat conftest.err >&5
15943   echo "$as_me:15943: \$? = $ac_status" >&5
15944   (exit $ac_status); } >/dev/null; then
15945   if test -s conftest.err; then
15946     ac_cpp_err=$ac_c_preproc_warn_flag
15947   else
15948     ac_cpp_err=
15949   fi
15950 else
15951   ac_cpp_err=yes
15952 fi
15953 if test -z "$ac_cpp_err"; then
15954   eval "$as_ac_Header=yes"
15955 else
15956   echo "$as_me: failed program was:" >&5
15957   cat conftest.$ac_ext >&5
15958   eval "$as_ac_Header=no"
15959 fi
15960 rm -f conftest.err conftest.$ac_ext
15961 fi
15962 echo "$as_me:15962: result: `eval echo '${'$as_ac_Header'}'`" >&5
15963 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15964 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15965   cat >>confdefs.h <<EOF
15966 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15967 EOF
15968
15969 fi
15970 done
15971
15972 if test "$ISC" = yes ; then
15973
15974 for ac_header in sys/termio.h
15975 do
15976 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15977 echo "$as_me:15977: checking for $ac_header" >&5
15978 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15979 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15980   echo $ECHO_N "(cached) $ECHO_C" >&6
15981 else
15982   cat >conftest.$ac_ext <<_ACEOF
15983 #line 15983 "configure"
15984 #include "confdefs.h"
15985 #include <$ac_header>
15986 _ACEOF
15987 if { (eval echo "$as_me:15987: \"$ac_cpp conftest.$ac_ext\"") >&5
15988   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15989   ac_status=$?
15990   egrep -v '^ *\+' conftest.er1 >conftest.err
15991   rm -f conftest.er1
15992   cat conftest.err >&5
15993   echo "$as_me:15993: \$? = $ac_status" >&5
15994   (exit $ac_status); } >/dev/null; then
15995   if test -s conftest.err; then
15996     ac_cpp_err=$ac_c_preproc_warn_flag
15997   else
15998     ac_cpp_err=
15999   fi
16000 else
16001   ac_cpp_err=yes
16002 fi
16003 if test -z "$ac_cpp_err"; then
16004   eval "$as_ac_Header=yes"
16005 else
16006   echo "$as_me: failed program was:" >&5
16007   cat conftest.$ac_ext >&5
16008   eval "$as_ac_Header=no"
16009 fi
16010 rm -f conftest.err conftest.$ac_ext
16011 fi
16012 echo "$as_me:16012: result: `eval echo '${'$as_ac_Header'}'`" >&5
16013 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16014 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16015   cat >>confdefs.h <<EOF
16016 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16017 EOF
16018
16019 fi
16020 done
16021
16022 fi
16023 if test "$ac_cv_header_termios_h" = yes ; then
16024         case "$CFLAGS $CPPFLAGS" in
16025         *-D_POSIX_SOURCE*)
16026                 termios_bad=dunno ;;
16027         *)      termios_bad=maybe ;;
16028         esac
16029         if test "$termios_bad" = maybe ; then
16030         echo "$as_me:16030: checking whether termios.h needs _POSIX_SOURCE" >&5
16031 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16032         cat >conftest.$ac_ext <<_ACEOF
16033 #line 16033 "configure"
16034 #include "confdefs.h"
16035 #include <termios.h>
16036 int
16037 main ()
16038 {
16039 struct termios foo; int x = foo.c_iflag
16040   ;
16041   return 0;
16042 }
16043 _ACEOF
16044 rm -f conftest.$ac_objext
16045 if { (eval echo "$as_me:16045: \"$ac_compile\"") >&5
16046   (eval $ac_compile) 2>&5
16047   ac_status=$?
16048   echo "$as_me:16048: \$? = $ac_status" >&5
16049   (exit $ac_status); } &&
16050          { ac_try='test -s conftest.$ac_objext'
16051   { (eval echo "$as_me:16051: \"$ac_try\"") >&5
16052   (eval $ac_try) 2>&5
16053   ac_status=$?
16054   echo "$as_me:16054: \$? = $ac_status" >&5
16055   (exit $ac_status); }; }; then
16056   termios_bad=no
16057 else
16058   echo "$as_me: failed program was:" >&5
16059 cat conftest.$ac_ext >&5
16060
16061                 cat >conftest.$ac_ext <<_ACEOF
16062 #line 16062 "configure"
16063 #include "confdefs.h"
16064
16065 #define _POSIX_SOURCE
16066 #include <termios.h>
16067 int
16068 main ()
16069 {
16070 struct termios foo; int x = foo.c_iflag
16071   ;
16072   return 0;
16073 }
16074 _ACEOF
16075 rm -f conftest.$ac_objext
16076 if { (eval echo "$as_me:16076: \"$ac_compile\"") >&5
16077   (eval $ac_compile) 2>&5
16078   ac_status=$?
16079   echo "$as_me:16079: \$? = $ac_status" >&5
16080   (exit $ac_status); } &&
16081          { ac_try='test -s conftest.$ac_objext'
16082   { (eval echo "$as_me:16082: \"$ac_try\"") >&5
16083   (eval $ac_try) 2>&5
16084   ac_status=$?
16085   echo "$as_me:16085: \$? = $ac_status" >&5
16086   (exit $ac_status); }; }; then
16087   termios_bad=unknown
16088 else
16089   echo "$as_me: failed program was:" >&5
16090 cat conftest.$ac_ext >&5
16091 termios_bad=yes
16092 cat >>confdefs.h <<\EOF
16093 #define _POSIX_SOURCE 1
16094 EOF
16095
16096 fi
16097 rm -f conftest.$ac_objext conftest.$ac_ext
16098
16099 fi
16100 rm -f conftest.$ac_objext conftest.$ac_ext
16101         echo "$as_me:16101: result: $termios_bad" >&5
16102 echo "${ECHO_T}$termios_bad" >&6
16103         fi
16104 fi
16105
16106 echo "$as_me:16106: checking for tcgetattr" >&5
16107 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16108 if test "${cf_cv_have_tcgetattr+set}" = set; then
16109   echo $ECHO_N "(cached) $ECHO_C" >&6
16110 else
16111
16112 cat >conftest.$ac_ext <<_ACEOF
16113 #line 16113 "configure"
16114 #include "confdefs.h"
16115
16116 #include <sys/types.h>
16117 #ifdef HAVE_UNISTD_H
16118 #include <unistd.h>
16119 #endif
16120 #ifdef HAVE_TERMIOS_H
16121 #include <termios.h>
16122 #define TTY struct termios
16123 #else
16124 #ifdef HAVE_TERMIO_H
16125 #include <termio.h>
16126 #define TTY struct termio
16127 #endif
16128 #endif
16129
16130 int
16131 main ()
16132 {
16133
16134 TTY foo;
16135 tcgetattr(1, &foo);
16136   ;
16137   return 0;
16138 }
16139 _ACEOF
16140 rm -f conftest.$ac_objext conftest$ac_exeext
16141 if { (eval echo "$as_me:16141: \"$ac_link\"") >&5
16142   (eval $ac_link) 2>&5
16143   ac_status=$?
16144   echo "$as_me:16144: \$? = $ac_status" >&5
16145   (exit $ac_status); } &&
16146          { ac_try='test -s conftest$ac_exeext'
16147   { (eval echo "$as_me:16147: \"$ac_try\"") >&5
16148   (eval $ac_try) 2>&5
16149   ac_status=$?
16150   echo "$as_me:16150: \$? = $ac_status" >&5
16151   (exit $ac_status); }; }; then
16152   cf_cv_have_tcgetattr=yes
16153 else
16154   echo "$as_me: failed program was:" >&5
16155 cat conftest.$ac_ext >&5
16156 cf_cv_have_tcgetattr=no
16157 fi
16158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16159 fi
16160 echo "$as_me:16160: result: $cf_cv_have_tcgetattr" >&5
16161 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16162 test "$cf_cv_have_tcgetattr" = yes &&
16163 cat >>confdefs.h <<\EOF
16164 #define HAVE_TCGETATTR 1
16165 EOF
16166
16167 echo "$as_me:16167: checking for vsscanf function or workaround" >&5
16168 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16169 if test "${cf_cv_func_vsscanf+set}" = set; then
16170   echo $ECHO_N "(cached) $ECHO_C" >&6
16171 else
16172
16173 cat >conftest.$ac_ext <<_ACEOF
16174 #line 16174 "configure"
16175 #include "confdefs.h"
16176
16177 #include <stdarg.h>
16178 #include <stdio.h>
16179 int
16180 main ()
16181 {
16182
16183         va_list ap;
16184         vsscanf("from", "%d", ap)
16185   ;
16186   return 0;
16187 }
16188 _ACEOF
16189 rm -f conftest.$ac_objext conftest$ac_exeext
16190 if { (eval echo "$as_me:16190: \"$ac_link\"") >&5
16191   (eval $ac_link) 2>&5
16192   ac_status=$?
16193   echo "$as_me:16193: \$? = $ac_status" >&5
16194   (exit $ac_status); } &&
16195          { ac_try='test -s conftest$ac_exeext'
16196   { (eval echo "$as_me:16196: \"$ac_try\"") >&5
16197   (eval $ac_try) 2>&5
16198   ac_status=$?
16199   echo "$as_me:16199: \$? = $ac_status" >&5
16200   (exit $ac_status); }; }; then
16201   cf_cv_func_vsscanf=vsscanf
16202 else
16203   echo "$as_me: failed program was:" >&5
16204 cat conftest.$ac_ext >&5
16205
16206 cat >conftest.$ac_ext <<_ACEOF
16207 #line 16207 "configure"
16208 #include "confdefs.h"
16209
16210 #include <stdarg.h>
16211 #include <stdio.h>
16212 int
16213 main ()
16214 {
16215
16216     FILE strbuf;
16217     char *str = "from";
16218
16219     strbuf._flag = _IOREAD;
16220     strbuf._ptr = strbuf._base = (unsigned char *) str;
16221     strbuf._cnt = strlen(str);
16222     strbuf._file = _NFILE;
16223     return (vfscanf(&strbuf, "%d", ap))
16224   ;
16225   return 0;
16226 }
16227 _ACEOF
16228 rm -f conftest.$ac_objext conftest$ac_exeext
16229 if { (eval echo "$as_me:16229: \"$ac_link\"") >&5
16230   (eval $ac_link) 2>&5
16231   ac_status=$?
16232   echo "$as_me:16232: \$? = $ac_status" >&5
16233   (exit $ac_status); } &&
16234          { ac_try='test -s conftest$ac_exeext'
16235   { (eval echo "$as_me:16235: \"$ac_try\"") >&5
16236   (eval $ac_try) 2>&5
16237   ac_status=$?
16238   echo "$as_me:16238: \$? = $ac_status" >&5
16239   (exit $ac_status); }; }; then
16240   cf_cv_func_vsscanf=vfscanf
16241 else
16242   echo "$as_me: failed program was:" >&5
16243 cat conftest.$ac_ext >&5
16244
16245 cat >conftest.$ac_ext <<_ACEOF
16246 #line 16246 "configure"
16247 #include "confdefs.h"
16248
16249 #include <stdarg.h>
16250 #include <stdio.h>
16251 int
16252 main ()
16253 {
16254
16255     FILE strbuf;
16256     char *str = "from";
16257
16258     strbuf._flag = _IOREAD;
16259     strbuf._ptr = strbuf._base = (unsigned char *) str;
16260     strbuf._cnt = strlen(str);
16261     strbuf._file = _NFILE;
16262     return (_doscan(&strbuf, "%d", ap))
16263   ;
16264   return 0;
16265 }
16266 _ACEOF
16267 rm -f conftest.$ac_objext conftest$ac_exeext
16268 if { (eval echo "$as_me:16268: \"$ac_link\"") >&5
16269   (eval $ac_link) 2>&5
16270   ac_status=$?
16271   echo "$as_me:16271: \$? = $ac_status" >&5
16272   (exit $ac_status); } &&
16273          { ac_try='test -s conftest$ac_exeext'
16274   { (eval echo "$as_me:16274: \"$ac_try\"") >&5
16275   (eval $ac_try) 2>&5
16276   ac_status=$?
16277   echo "$as_me:16277: \$? = $ac_status" >&5
16278   (exit $ac_status); }; }; then
16279   cf_cv_func_vsscanf=_doscan
16280 else
16281   echo "$as_me: failed program was:" >&5
16282 cat conftest.$ac_ext >&5
16283
16284 cf_cv_func_vsscanf=no
16285 fi
16286 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16287 fi
16288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16289 fi
16290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16291 fi
16292 echo "$as_me:16292: result: $cf_cv_func_vsscanf" >&5
16293 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16294
16295 case $cf_cv_func_vsscanf in #(vi
16296 vsscanf)
16297 cat >>confdefs.h <<\EOF
16298 #define HAVE_VSSCANF 1
16299 EOF
16300 ;; #(vi
16301 vfscanf)
16302 cat >>confdefs.h <<\EOF
16303 #define HAVE_VFSCANF 1
16304 EOF
16305 ;; #(vi
16306 _doscan)
16307 cat >>confdefs.h <<\EOF
16308 #define HAVE__DOSCAN 1
16309 EOF
16310 ;;
16311 esac
16312
16313 echo "$as_me:16313: checking for working mkstemp" >&5
16314 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16315 if test "${cf_cv_func_mkstemp+set}" = set; then
16316   echo $ECHO_N "(cached) $ECHO_C" >&6
16317 else
16318
16319 rm -rf conftest*
16320 if test "$cross_compiling" = yes; then
16321   cf_cv_func_mkstemp=maybe
16322 else
16323   cat >conftest.$ac_ext <<_ACEOF
16324 #line 16324 "configure"
16325 #include "confdefs.h"
16326
16327 #include <sys/types.h>
16328 #include <stdlib.h>
16329 #include <stdio.h>
16330 #include <string.h>
16331 #include <sys/stat.h>
16332 int main()
16333 {
16334         char *tmpl = "conftestXXXXXX";
16335         char name[2][80];
16336         int n;
16337         int result = 0;
16338         int fd;
16339         struct stat sb;
16340
16341         umask(077);
16342         for (n = 0; n < 2; ++n) {
16343                 strcpy(name[n], tmpl);
16344                 if ((fd = mkstemp(name[n])) >= 0) {
16345                         if (!strcmp(name[n], tmpl)
16346                          || stat(name[n], &sb) != 0
16347                          || (sb.st_mode & S_IFMT) != S_IFREG
16348                          || (sb.st_mode & 077) != 0) {
16349                                 result = 1;
16350                         }
16351                         close(fd);
16352                 }
16353         }
16354         if (result == 0
16355          && !strcmp(name[0], name[1]))
16356                 result = 1;
16357         ${cf_cv_main_return:-return}(result);
16358 }
16359
16360 _ACEOF
16361 rm -f conftest$ac_exeext
16362 if { (eval echo "$as_me:16362: \"$ac_link\"") >&5
16363   (eval $ac_link) 2>&5
16364   ac_status=$?
16365   echo "$as_me:16365: \$? = $ac_status" >&5
16366   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16367   { (eval echo "$as_me:16367: \"$ac_try\"") >&5
16368   (eval $ac_try) 2>&5
16369   ac_status=$?
16370   echo "$as_me:16370: \$? = $ac_status" >&5
16371   (exit $ac_status); }; }; then
16372   cf_cv_func_mkstemp=yes
16373
16374 else
16375   echo "$as_me: program exited with status $ac_status" >&5
16376 echo "$as_me: failed program was:" >&5
16377 cat conftest.$ac_ext >&5
16378 cf_cv_func_mkstemp=no
16379
16380 fi
16381 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16382 fi
16383
16384 fi
16385 echo "$as_me:16385: result: $cf_cv_func_mkstemp" >&5
16386 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16387 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16388         echo "$as_me:16388: checking for mkstemp" >&5
16389 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16390 if test "${ac_cv_func_mkstemp+set}" = set; then
16391   echo $ECHO_N "(cached) $ECHO_C" >&6
16392 else
16393   cat >conftest.$ac_ext <<_ACEOF
16394 #line 16394 "configure"
16395 #include "confdefs.h"
16396 /* System header to define __stub macros and hopefully few prototypes,
16397     which can conflict with char mkstemp (); below.  */
16398 #include <assert.h>
16399 /* Override any gcc2 internal prototype to avoid an error.  */
16400 #ifdef __cplusplus
16401 extern "C"
16402 #endif
16403 /* We use char because int might match the return type of a gcc2
16404    builtin and then its argument prototype would still apply.  */
16405 char mkstemp ();
16406 char (*f) ();
16407
16408 int
16409 main ()
16410 {
16411 /* The GNU C library defines this for functions which it implements
16412     to always fail with ENOSYS.  Some functions are actually named
16413     something starting with __ and the normal name is an alias.  */
16414 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16415 choke me
16416 #else
16417 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16418 #endif
16419
16420   ;
16421   return 0;
16422 }
16423 _ACEOF
16424 rm -f conftest.$ac_objext conftest$ac_exeext
16425 if { (eval echo "$as_me:16425: \"$ac_link\"") >&5
16426   (eval $ac_link) 2>&5
16427   ac_status=$?
16428   echo "$as_me:16428: \$? = $ac_status" >&5
16429   (exit $ac_status); } &&
16430          { ac_try='test -s conftest$ac_exeext'
16431   { (eval echo "$as_me:16431: \"$ac_try\"") >&5
16432   (eval $ac_try) 2>&5
16433   ac_status=$?
16434   echo "$as_me:16434: \$? = $ac_status" >&5
16435   (exit $ac_status); }; }; then
16436   ac_cv_func_mkstemp=yes
16437 else
16438   echo "$as_me: failed program was:" >&5
16439 cat conftest.$ac_ext >&5
16440 ac_cv_func_mkstemp=no
16441 fi
16442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16443 fi
16444 echo "$as_me:16444: result: $ac_cv_func_mkstemp" >&5
16445 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16446
16447 fi
16448 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16449
16450 cat >>confdefs.h <<\EOF
16451 #define HAVE_MKSTEMP 1
16452 EOF
16453
16454 fi
16455
16456 # setup for prototype of fallback for vsscanf()
16457
16458 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16459         HAVE_VSSCANF=1
16460 else
16461         HAVE_VSSCANF=0
16462 fi
16463
16464 if test "x$cross_compiling" = xyes ; then
16465         { echo "$as_me:16465: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16466 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16467 else
16468         echo "$as_me:16468: checking whether setvbuf arguments are reversed" >&5
16469 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16470 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16471   echo $ECHO_N "(cached) $ECHO_C" >&6
16472 else
16473   if test "$cross_compiling" = yes; then
16474   { { echo "$as_me:16474: error: cannot run test program while cross compiling" >&5
16475 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16476    { (exit 1); exit 1; }; }
16477 else
16478   cat >conftest.$ac_ext <<_ACEOF
16479 #line 16479 "configure"
16480 #include "confdefs.h"
16481 #include <stdio.h>
16482 /* If setvbuf has the reversed format, exit 0. */
16483 int
16484 main ()
16485 {
16486   /* This call has the arguments reversed.
16487      A reversed system may check and see that the address of main
16488      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16489   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16490     $ac_main_return(1);
16491   putc('\r', stdout);
16492   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16493 }
16494 _ACEOF
16495 rm -f conftest$ac_exeext
16496 if { (eval echo "$as_me:16496: \"$ac_link\"") >&5
16497   (eval $ac_link) 2>&5
16498   ac_status=$?
16499   echo "$as_me:16499: \$? = $ac_status" >&5
16500   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16501   { (eval echo "$as_me:16501: \"$ac_try\"") >&5
16502   (eval $ac_try) 2>&5
16503   ac_status=$?
16504   echo "$as_me:16504: \$? = $ac_status" >&5
16505   (exit $ac_status); }; }; then
16506   ac_cv_func_setvbuf_reversed=yes
16507 else
16508   echo "$as_me: program exited with status $ac_status" >&5
16509 echo "$as_me: failed program was:" >&5
16510 cat conftest.$ac_ext >&5
16511 ac_cv_func_setvbuf_reversed=no
16512 fi
16513 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16514 fi
16515 rm -f core core.* *.core
16516 fi
16517 echo "$as_me:16517: result: $ac_cv_func_setvbuf_reversed" >&5
16518 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16519 if test $ac_cv_func_setvbuf_reversed = yes; then
16520
16521 cat >>confdefs.h <<\EOF
16522 #define SETVBUF_REVERSED 1
16523 EOF
16524
16525 fi
16526
16527 fi
16528 echo "$as_me:16528: checking for intptr_t" >&5
16529 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16530 if test "${ac_cv_type_intptr_t+set}" = set; then
16531   echo $ECHO_N "(cached) $ECHO_C" >&6
16532 else
16533   cat >conftest.$ac_ext <<_ACEOF
16534 #line 16534 "configure"
16535 #include "confdefs.h"
16536 $ac_includes_default
16537 int
16538 main ()
16539 {
16540 if ((intptr_t *) 0)
16541   return 0;
16542 if (sizeof (intptr_t))
16543   return 0;
16544   ;
16545   return 0;
16546 }
16547 _ACEOF
16548 rm -f conftest.$ac_objext
16549 if { (eval echo "$as_me:16549: \"$ac_compile\"") >&5
16550   (eval $ac_compile) 2>&5
16551   ac_status=$?
16552   echo "$as_me:16552: \$? = $ac_status" >&5
16553   (exit $ac_status); } &&
16554          { ac_try='test -s conftest.$ac_objext'
16555   { (eval echo "$as_me:16555: \"$ac_try\"") >&5
16556   (eval $ac_try) 2>&5
16557   ac_status=$?
16558   echo "$as_me:16558: \$? = $ac_status" >&5
16559   (exit $ac_status); }; }; then
16560   ac_cv_type_intptr_t=yes
16561 else
16562   echo "$as_me: failed program was:" >&5
16563 cat conftest.$ac_ext >&5
16564 ac_cv_type_intptr_t=no
16565 fi
16566 rm -f conftest.$ac_objext conftest.$ac_ext
16567 fi
16568 echo "$as_me:16568: result: $ac_cv_type_intptr_t" >&5
16569 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16570 if test $ac_cv_type_intptr_t = yes; then
16571   :
16572 else
16573
16574 cat >>confdefs.h <<EOF
16575 #define intptr_t long
16576 EOF
16577
16578 fi
16579
16580 echo "$as_me:16580: checking for type sigaction_t" >&5
16581 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16582 if test "${cf_cv_type_sigaction+set}" = set; then
16583   echo $ECHO_N "(cached) $ECHO_C" >&6
16584 else
16585
16586         cat >conftest.$ac_ext <<_ACEOF
16587 #line 16587 "configure"
16588 #include "confdefs.h"
16589
16590 #include <signal.h>
16591 int
16592 main ()
16593 {
16594 sigaction_t x
16595   ;
16596   return 0;
16597 }
16598 _ACEOF
16599 rm -f conftest.$ac_objext
16600 if { (eval echo "$as_me:16600: \"$ac_compile\"") >&5
16601   (eval $ac_compile) 2>&5
16602   ac_status=$?
16603   echo "$as_me:16603: \$? = $ac_status" >&5
16604   (exit $ac_status); } &&
16605          { ac_try='test -s conftest.$ac_objext'
16606   { (eval echo "$as_me:16606: \"$ac_try\"") >&5
16607   (eval $ac_try) 2>&5
16608   ac_status=$?
16609   echo "$as_me:16609: \$? = $ac_status" >&5
16610   (exit $ac_status); }; }; then
16611   cf_cv_type_sigaction=yes
16612 else
16613   echo "$as_me: failed program was:" >&5
16614 cat conftest.$ac_ext >&5
16615 cf_cv_type_sigaction=no
16616 fi
16617 rm -f conftest.$ac_objext conftest.$ac_ext
16618 fi
16619
16620 echo "$as_me:16620: result: $cf_cv_type_sigaction" >&5
16621 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16622 test "$cf_cv_type_sigaction" = yes &&
16623 cat >>confdefs.h <<\EOF
16624 #define HAVE_TYPE_SIGACTION 1
16625 EOF
16626
16627 echo "$as_me:16627: checking declaration of size-change" >&5
16628 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16629 if test "${cf_cv_sizechange+set}" = set; then
16630   echo $ECHO_N "(cached) $ECHO_C" >&6
16631 else
16632
16633     cf_cv_sizechange=unknown
16634     cf_save_CPPFLAGS="$CPPFLAGS"
16635
16636 for cf_opts in "" "NEED_PTEM_H"
16637 do
16638
16639     CPPFLAGS="$cf_save_CPPFLAGS"
16640     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16641     cat >conftest.$ac_ext <<_ACEOF
16642 #line 16642 "configure"
16643 #include "confdefs.h"
16644 #include <sys/types.h>
16645 #ifdef HAVE_TERMIOS_H
16646 #include <termios.h>
16647 #else
16648 #ifdef HAVE_TERMIO_H
16649 #include <termio.h>
16650 #endif
16651 #endif
16652 #ifdef NEED_PTEM_H
16653 /* This is a workaround for SCO:  they neglected to define struct winsize in
16654  * termios.h -- it's only in termio.h and ptem.h
16655  */
16656 #include        <sys/stream.h>
16657 #include        <sys/ptem.h>
16658 #endif
16659 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16660 #include <sys/ioctl.h>
16661 #endif
16662
16663 int
16664 main ()
16665 {
16666
16667 #ifdef TIOCGSIZE
16668         struct ttysize win;     /* FIXME: what system is this? */
16669         int y = win.ts_lines;
16670         int x = win.ts_cols;
16671 #else
16672 #ifdef TIOCGWINSZ
16673         struct winsize win;
16674         int y = win.ws_row;
16675         int x = win.ws_col;
16676 #else
16677         no TIOCGSIZE or TIOCGWINSZ
16678 #endif /* TIOCGWINSZ */
16679 #endif /* TIOCGSIZE */
16680
16681   ;
16682   return 0;
16683 }
16684 _ACEOF
16685 rm -f conftest.$ac_objext
16686 if { (eval echo "$as_me:16686: \"$ac_compile\"") >&5
16687   (eval $ac_compile) 2>&5
16688   ac_status=$?
16689   echo "$as_me:16689: \$? = $ac_status" >&5
16690   (exit $ac_status); } &&
16691          { ac_try='test -s conftest.$ac_objext'
16692   { (eval echo "$as_me:16692: \"$ac_try\"") >&5
16693   (eval $ac_try) 2>&5
16694   ac_status=$?
16695   echo "$as_me:16695: \$? = $ac_status" >&5
16696   (exit $ac_status); }; }; then
16697   cf_cv_sizechange=yes
16698 else
16699   echo "$as_me: failed program was:" >&5
16700 cat conftest.$ac_ext >&5
16701 cf_cv_sizechange=no
16702 fi
16703 rm -f conftest.$ac_objext conftest.$ac_ext
16704
16705         CPPFLAGS="$cf_save_CPPFLAGS"
16706         if test "$cf_cv_sizechange" = yes ; then
16707                 echo "size-change succeeded ($cf_opts)" >&5
16708                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16709                 break
16710         fi
16711 done
16712
16713 fi
16714 echo "$as_me:16714: result: $cf_cv_sizechange" >&5
16715 echo "${ECHO_T}$cf_cv_sizechange" >&6
16716 if test "$cf_cv_sizechange" != no ; then
16717
16718 cat >>confdefs.h <<\EOF
16719 #define HAVE_SIZECHANGE 1
16720 EOF
16721
16722         case $cf_cv_sizechange in #(vi
16723         NEED*)
16724                 cat >>confdefs.h <<EOF
16725 #define $cf_cv_sizechange  1
16726 EOF
16727
16728                 ;;
16729         esac
16730 fi
16731
16732 echo "$as_me:16732: checking for memmove" >&5
16733 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16734 if test "${ac_cv_func_memmove+set}" = set; then
16735   echo $ECHO_N "(cached) $ECHO_C" >&6
16736 else
16737   cat >conftest.$ac_ext <<_ACEOF
16738 #line 16738 "configure"
16739 #include "confdefs.h"
16740 /* System header to define __stub macros and hopefully few prototypes,
16741     which can conflict with char memmove (); below.  */
16742 #include <assert.h>
16743 /* Override any gcc2 internal prototype to avoid an error.  */
16744 #ifdef __cplusplus
16745 extern "C"
16746 #endif
16747 /* We use char because int might match the return type of a gcc2
16748    builtin and then its argument prototype would still apply.  */
16749 char memmove ();
16750 char (*f) ();
16751
16752 int
16753 main ()
16754 {
16755 /* The GNU C library defines this for functions which it implements
16756     to always fail with ENOSYS.  Some functions are actually named
16757     something starting with __ and the normal name is an alias.  */
16758 #if defined (__stub_memmove) || defined (__stub___memmove)
16759 choke me
16760 #else
16761 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16762 #endif
16763
16764   ;
16765   return 0;
16766 }
16767 _ACEOF
16768 rm -f conftest.$ac_objext conftest$ac_exeext
16769 if { (eval echo "$as_me:16769: \"$ac_link\"") >&5
16770   (eval $ac_link) 2>&5
16771   ac_status=$?
16772   echo "$as_me:16772: \$? = $ac_status" >&5
16773   (exit $ac_status); } &&
16774          { ac_try='test -s conftest$ac_exeext'
16775   { (eval echo "$as_me:16775: \"$ac_try\"") >&5
16776   (eval $ac_try) 2>&5
16777   ac_status=$?
16778   echo "$as_me:16778: \$? = $ac_status" >&5
16779   (exit $ac_status); }; }; then
16780   ac_cv_func_memmove=yes
16781 else
16782   echo "$as_me: failed program was:" >&5
16783 cat conftest.$ac_ext >&5
16784 ac_cv_func_memmove=no
16785 fi
16786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16787 fi
16788 echo "$as_me:16788: result: $ac_cv_func_memmove" >&5
16789 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16790 if test $ac_cv_func_memmove = yes; then
16791   :
16792 else
16793
16794 echo "$as_me:16794: checking for bcopy" >&5
16795 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16796 if test "${ac_cv_func_bcopy+set}" = set; then
16797   echo $ECHO_N "(cached) $ECHO_C" >&6
16798 else
16799   cat >conftest.$ac_ext <<_ACEOF
16800 #line 16800 "configure"
16801 #include "confdefs.h"
16802 /* System header to define __stub macros and hopefully few prototypes,
16803     which can conflict with char bcopy (); below.  */
16804 #include <assert.h>
16805 /* Override any gcc2 internal prototype to avoid an error.  */
16806 #ifdef __cplusplus
16807 extern "C"
16808 #endif
16809 /* We use char because int might match the return type of a gcc2
16810    builtin and then its argument prototype would still apply.  */
16811 char bcopy ();
16812 char (*f) ();
16813
16814 int
16815 main ()
16816 {
16817 /* The GNU C library defines this for functions which it implements
16818     to always fail with ENOSYS.  Some functions are actually named
16819     something starting with __ and the normal name is an alias.  */
16820 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16821 choke me
16822 #else
16823 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16824 #endif
16825
16826   ;
16827   return 0;
16828 }
16829 _ACEOF
16830 rm -f conftest.$ac_objext conftest$ac_exeext
16831 if { (eval echo "$as_me:16831: \"$ac_link\"") >&5
16832   (eval $ac_link) 2>&5
16833   ac_status=$?
16834   echo "$as_me:16834: \$? = $ac_status" >&5
16835   (exit $ac_status); } &&
16836          { ac_try='test -s conftest$ac_exeext'
16837   { (eval echo "$as_me:16837: \"$ac_try\"") >&5
16838   (eval $ac_try) 2>&5
16839   ac_status=$?
16840   echo "$as_me:16840: \$? = $ac_status" >&5
16841   (exit $ac_status); }; }; then
16842   ac_cv_func_bcopy=yes
16843 else
16844   echo "$as_me: failed program was:" >&5
16845 cat conftest.$ac_ext >&5
16846 ac_cv_func_bcopy=no
16847 fi
16848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16849 fi
16850 echo "$as_me:16850: result: $ac_cv_func_bcopy" >&5
16851 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16852 if test $ac_cv_func_bcopy = yes; then
16853
16854         echo "$as_me:16854: checking if bcopy does overlapping moves" >&5
16855 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16856 if test "${cf_cv_good_bcopy+set}" = set; then
16857   echo $ECHO_N "(cached) $ECHO_C" >&6
16858 else
16859
16860                 if test "$cross_compiling" = yes; then
16861   cf_cv_good_bcopy=unknown
16862 else
16863   cat >conftest.$ac_ext <<_ACEOF
16864 #line 16864 "configure"
16865 #include "confdefs.h"
16866
16867 int main() {
16868         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16869         char temp[40];
16870         bcopy(data, temp, sizeof(data));
16871         bcopy(temp+10, temp, 15);
16872         bcopy(temp+5, temp+15, 10);
16873         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16874 }
16875
16876 _ACEOF
16877 rm -f conftest$ac_exeext
16878 if { (eval echo "$as_me:16878: \"$ac_link\"") >&5
16879   (eval $ac_link) 2>&5
16880   ac_status=$?
16881   echo "$as_me:16881: \$? = $ac_status" >&5
16882   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16883   { (eval echo "$as_me:16883: \"$ac_try\"") >&5
16884   (eval $ac_try) 2>&5
16885   ac_status=$?
16886   echo "$as_me:16886: \$? = $ac_status" >&5
16887   (exit $ac_status); }; }; then
16888   cf_cv_good_bcopy=yes
16889 else
16890   echo "$as_me: program exited with status $ac_status" >&5
16891 echo "$as_me: failed program was:" >&5
16892 cat conftest.$ac_ext >&5
16893 cf_cv_good_bcopy=no
16894 fi
16895 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16896 fi
16897
16898 fi
16899 echo "$as_me:16899: result: $cf_cv_good_bcopy" >&5
16900 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16901
16902 else
16903   cf_cv_good_bcopy=no
16904 fi
16905
16906         if test "$cf_cv_good_bcopy" = yes ; then
16907
16908 cat >>confdefs.h <<\EOF
16909 #define USE_OK_BCOPY 1
16910 EOF
16911
16912         else
16913
16914 cat >>confdefs.h <<\EOF
16915 #define USE_MY_MEMMOVE 1
16916 EOF
16917
16918         fi
16919
16920 fi
16921
16922 echo "$as_me:16922: checking if poll really works" >&5
16923 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16924 if test "${cf_cv_working_poll+set}" = set; then
16925   echo $ECHO_N "(cached) $ECHO_C" >&6
16926 else
16927
16928 if test "$cross_compiling" = yes; then
16929   cf_cv_working_poll=unknown
16930 else
16931   cat >conftest.$ac_ext <<_ACEOF
16932 #line 16932 "configure"
16933 #include "confdefs.h"
16934
16935 #include <stdlib.h>
16936 #include <stdio.h>
16937 #include <unistd.h>
16938 #include <fcntl.h>
16939 #ifdef HAVE_POLL_H
16940 #include <poll.h>
16941 #else
16942 #include <sys/poll.h>
16943 #endif
16944 int main() {
16945         struct pollfd myfds;
16946         int ret;
16947
16948         /* check for Darwin bug with respect to "devices" */
16949         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16950         if (myfds.fd < 0)
16951                 myfds.fd = 0;
16952         myfds.events = POLLIN;
16953         myfds.revents = 0;
16954
16955         ret = poll(&myfds, 1, 100);
16956
16957         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16958                 ret = -1;
16959         } else {
16960                 int fd = 0;
16961                 if (!isatty(fd)) {
16962                         fd = open("/dev/tty", 2);       /* O_RDWR */
16963                 }
16964
16965                 if (fd >= 0) {
16966                         /* also check with standard input */
16967                         myfds.fd = fd;
16968                         myfds.events = POLLIN;
16969                         myfds.revents = 0;
16970                         ret = poll(&myfds, 1, 100);
16971                 } else {
16972                         ret = -1;
16973                 }
16974         }
16975         ${cf_cv_main_return:-return}(ret < 0);
16976 }
16977 _ACEOF
16978 rm -f conftest$ac_exeext
16979 if { (eval echo "$as_me:16979: \"$ac_link\"") >&5
16980   (eval $ac_link) 2>&5
16981   ac_status=$?
16982   echo "$as_me:16982: \$? = $ac_status" >&5
16983   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16984   { (eval echo "$as_me:16984: \"$ac_try\"") >&5
16985   (eval $ac_try) 2>&5
16986   ac_status=$?
16987   echo "$as_me:16987: \$? = $ac_status" >&5
16988   (exit $ac_status); }; }; then
16989   cf_cv_working_poll=yes
16990 else
16991   echo "$as_me: program exited with status $ac_status" >&5
16992 echo "$as_me: failed program was:" >&5
16993 cat conftest.$ac_ext >&5
16994 cf_cv_working_poll=no
16995 fi
16996 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16997 fi
16998 fi
16999 echo "$as_me:16999: result: $cf_cv_working_poll" >&5
17000 echo "${ECHO_T}$cf_cv_working_poll" >&6
17001 test "$cf_cv_working_poll" = "yes" &&
17002 cat >>confdefs.h <<\EOF
17003 #define HAVE_WORKING_POLL 1
17004 EOF
17005
17006 echo "$as_me:17006: checking for va_copy" >&5
17007 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17008 if test "${cf_cv_have_va_copy+set}" = set; then
17009   echo $ECHO_N "(cached) $ECHO_C" >&6
17010 else
17011
17012 cat >conftest.$ac_ext <<_ACEOF
17013 #line 17013 "configure"
17014 #include "confdefs.h"
17015
17016 #include <stdarg.h>
17017
17018 int
17019 main ()
17020 {
17021
17022         static va_list dst;
17023         static va_list src;
17024         va_copy(dst, src)
17025   ;
17026   return 0;
17027 }
17028 _ACEOF
17029 rm -f conftest.$ac_objext conftest$ac_exeext
17030 if { (eval echo "$as_me:17030: \"$ac_link\"") >&5
17031   (eval $ac_link) 2>&5
17032   ac_status=$?
17033   echo "$as_me:17033: \$? = $ac_status" >&5
17034   (exit $ac_status); } &&
17035          { ac_try='test -s conftest$ac_exeext'
17036   { (eval echo "$as_me:17036: \"$ac_try\"") >&5
17037   (eval $ac_try) 2>&5
17038   ac_status=$?
17039   echo "$as_me:17039: \$? = $ac_status" >&5
17040   (exit $ac_status); }; }; then
17041   cf_cv_have_va_copy=yes
17042 else
17043   echo "$as_me: failed program was:" >&5
17044 cat conftest.$ac_ext >&5
17045 cf_cv_have_va_copy=no
17046 fi
17047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17048 fi
17049 echo "$as_me:17049: result: $cf_cv_have_va_copy" >&5
17050 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17051
17052 test "$cf_cv_have_va_copy" = yes &&
17053 cat >>confdefs.h <<\EOF
17054 #define HAVE_VA_COPY 1
17055 EOF
17056
17057 echo "$as_me:17057: checking for __va_copy" >&5
17058 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17059 if test "${cf_cv_have___va_copy+set}" = set; then
17060   echo $ECHO_N "(cached) $ECHO_C" >&6
17061 else
17062
17063 cat >conftest.$ac_ext <<_ACEOF
17064 #line 17064 "configure"
17065 #include "confdefs.h"
17066
17067 #include <stdarg.h>
17068
17069 int
17070 main ()
17071 {
17072
17073         static va_list dst;
17074         static va_list src;
17075         __va_copy(dst, src)
17076   ;
17077   return 0;
17078 }
17079 _ACEOF
17080 rm -f conftest.$ac_objext conftest$ac_exeext
17081 if { (eval echo "$as_me:17081: \"$ac_link\"") >&5
17082   (eval $ac_link) 2>&5
17083   ac_status=$?
17084   echo "$as_me:17084: \$? = $ac_status" >&5
17085   (exit $ac_status); } &&
17086          { ac_try='test -s conftest$ac_exeext'
17087   { (eval echo "$as_me:17087: \"$ac_try\"") >&5
17088   (eval $ac_try) 2>&5
17089   ac_status=$?
17090   echo "$as_me:17090: \$? = $ac_status" >&5
17091   (exit $ac_status); }; }; then
17092   cf_cv_have___va_copy=yes
17093 else
17094   echo "$as_me: failed program was:" >&5
17095 cat conftest.$ac_ext >&5
17096 cf_cv_have___va_copy=no
17097 fi
17098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17099 fi
17100 echo "$as_me:17100: result: $cf_cv_have___va_copy" >&5
17101 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17102
17103 test "$cf_cv_have___va_copy" = yes &&
17104 cat >>confdefs.h <<\EOF
17105 #define HAVE___VA_COPY 1
17106 EOF
17107
17108 echo "$as_me:17108: checking for pid_t" >&5
17109 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17110 if test "${ac_cv_type_pid_t+set}" = set; then
17111   echo $ECHO_N "(cached) $ECHO_C" >&6
17112 else
17113   cat >conftest.$ac_ext <<_ACEOF
17114 #line 17114 "configure"
17115 #include "confdefs.h"
17116 $ac_includes_default
17117 int
17118 main ()
17119 {
17120 if ((pid_t *) 0)
17121   return 0;
17122 if (sizeof (pid_t))
17123   return 0;
17124   ;
17125   return 0;
17126 }
17127 _ACEOF
17128 rm -f conftest.$ac_objext
17129 if { (eval echo "$as_me:17129: \"$ac_compile\"") >&5
17130   (eval $ac_compile) 2>&5
17131   ac_status=$?
17132   echo "$as_me:17132: \$? = $ac_status" >&5
17133   (exit $ac_status); } &&
17134          { ac_try='test -s conftest.$ac_objext'
17135   { (eval echo "$as_me:17135: \"$ac_try\"") >&5
17136   (eval $ac_try) 2>&5
17137   ac_status=$?
17138   echo "$as_me:17138: \$? = $ac_status" >&5
17139   (exit $ac_status); }; }; then
17140   ac_cv_type_pid_t=yes
17141 else
17142   echo "$as_me: failed program was:" >&5
17143 cat conftest.$ac_ext >&5
17144 ac_cv_type_pid_t=no
17145 fi
17146 rm -f conftest.$ac_objext conftest.$ac_ext
17147 fi
17148 echo "$as_me:17148: result: $ac_cv_type_pid_t" >&5
17149 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17150 if test $ac_cv_type_pid_t = yes; then
17151   :
17152 else
17153
17154 cat >>confdefs.h <<EOF
17155 #define pid_t int
17156 EOF
17157
17158 fi
17159
17160 for ac_header in unistd.h vfork.h
17161 do
17162 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17163 echo "$as_me:17163: checking for $ac_header" >&5
17164 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17165 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17166   echo $ECHO_N "(cached) $ECHO_C" >&6
17167 else
17168   cat >conftest.$ac_ext <<_ACEOF
17169 #line 17169 "configure"
17170 #include "confdefs.h"
17171 #include <$ac_header>
17172 _ACEOF
17173 if { (eval echo "$as_me:17173: \"$ac_cpp conftest.$ac_ext\"") >&5
17174   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17175   ac_status=$?
17176   egrep -v '^ *\+' conftest.er1 >conftest.err
17177   rm -f conftest.er1
17178   cat conftest.err >&5
17179   echo "$as_me:17179: \$? = $ac_status" >&5
17180   (exit $ac_status); } >/dev/null; then
17181   if test -s conftest.err; then
17182     ac_cpp_err=$ac_c_preproc_warn_flag
17183   else
17184     ac_cpp_err=
17185   fi
17186 else
17187   ac_cpp_err=yes
17188 fi
17189 if test -z "$ac_cpp_err"; then
17190   eval "$as_ac_Header=yes"
17191 else
17192   echo "$as_me: failed program was:" >&5
17193   cat conftest.$ac_ext >&5
17194   eval "$as_ac_Header=no"
17195 fi
17196 rm -f conftest.err conftest.$ac_ext
17197 fi
17198 echo "$as_me:17198: result: `eval echo '${'$as_ac_Header'}'`" >&5
17199 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17200 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17201   cat >>confdefs.h <<EOF
17202 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17203 EOF
17204
17205 fi
17206 done
17207
17208 for ac_func in fork vfork
17209 do
17210 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17211 echo "$as_me:17211: checking for $ac_func" >&5
17212 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17213 if eval "test \"\${$as_ac_var+set}\" = set"; then
17214   echo $ECHO_N "(cached) $ECHO_C" >&6
17215 else
17216   cat >conftest.$ac_ext <<_ACEOF
17217 #line 17217 "configure"
17218 #include "confdefs.h"
17219 /* System header to define __stub macros and hopefully few prototypes,
17220     which can conflict with char $ac_func (); below.  */
17221 #include <assert.h>
17222 /* Override any gcc2 internal prototype to avoid an error.  */
17223 #ifdef __cplusplus
17224 extern "C"
17225 #endif
17226 /* We use char because int might match the return type of a gcc2
17227    builtin and then its argument prototype would still apply.  */
17228 char $ac_func ();
17229 char (*f) ();
17230
17231 int
17232 main ()
17233 {
17234 /* The GNU C library defines this for functions which it implements
17235     to always fail with ENOSYS.  Some functions are actually named
17236     something starting with __ and the normal name is an alias.  */
17237 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17238 choke me
17239 #else
17240 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17241 #endif
17242
17243   ;
17244   return 0;
17245 }
17246 _ACEOF
17247 rm -f conftest.$ac_objext conftest$ac_exeext
17248 if { (eval echo "$as_me:17248: \"$ac_link\"") >&5
17249   (eval $ac_link) 2>&5
17250   ac_status=$?
17251   echo "$as_me:17251: \$? = $ac_status" >&5
17252   (exit $ac_status); } &&
17253          { ac_try='test -s conftest$ac_exeext'
17254   { (eval echo "$as_me:17254: \"$ac_try\"") >&5
17255   (eval $ac_try) 2>&5
17256   ac_status=$?
17257   echo "$as_me:17257: \$? = $ac_status" >&5
17258   (exit $ac_status); }; }; then
17259   eval "$as_ac_var=yes"
17260 else
17261   echo "$as_me: failed program was:" >&5
17262 cat conftest.$ac_ext >&5
17263 eval "$as_ac_var=no"
17264 fi
17265 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17266 fi
17267 echo "$as_me:17267: result: `eval echo '${'$as_ac_var'}'`" >&5
17268 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17269 if test `eval echo '${'$as_ac_var'}'` = yes; then
17270   cat >>confdefs.h <<EOF
17271 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17272 EOF
17273
17274 fi
17275 done
17276
17277 ac_cv_func_fork_works=$ac_cv_func_fork
17278 if test "x$ac_cv_func_fork" = xyes; then
17279   echo "$as_me:17279: checking for working fork" >&5
17280 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17281 if test "${ac_cv_func_fork_works+set}" = set; then
17282   echo $ECHO_N "(cached) $ECHO_C" >&6
17283 else
17284   if test "$cross_compiling" = yes; then
17285   ac_cv_func_fork_works=cross
17286 else
17287   cat >conftest.$ac_ext <<_ACEOF
17288 /* By Rüdiger Kuhlmann. */
17289       #include <sys/types.h>
17290       #if HAVE_UNISTD_H
17291       # include <unistd.h>
17292       #endif
17293       /* Some systems only have a dummy stub for fork() */
17294       int main ()
17295       {
17296         if (fork() < 0)
17297           $ac_main_return (1);
17298         $ac_main_return (0);
17299       }
17300 _ACEOF
17301 rm -f conftest$ac_exeext
17302 if { (eval echo "$as_me:17302: \"$ac_link\"") >&5
17303   (eval $ac_link) 2>&5
17304   ac_status=$?
17305   echo "$as_me:17305: \$? = $ac_status" >&5
17306   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17307   { (eval echo "$as_me:17307: \"$ac_try\"") >&5
17308   (eval $ac_try) 2>&5
17309   ac_status=$?
17310   echo "$as_me:17310: \$? = $ac_status" >&5
17311   (exit $ac_status); }; }; then
17312   ac_cv_func_fork_works=yes
17313 else
17314   echo "$as_me: program exited with status $ac_status" >&5
17315 echo "$as_me: failed program was:" >&5
17316 cat conftest.$ac_ext >&5
17317 ac_cv_func_fork_works=no
17318 fi
17319 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17320 fi
17321 fi
17322 echo "$as_me:17322: result: $ac_cv_func_fork_works" >&5
17323 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17324
17325 fi
17326 if test "x$ac_cv_func_fork_works" = xcross; then
17327   case $host in
17328     *-*-amigaos* | *-*-msdosdjgpp*)
17329       # Override, as these systems have only a dummy fork() stub
17330       ac_cv_func_fork_works=no
17331       ;;
17332     *)
17333       ac_cv_func_fork_works=yes
17334       ;;
17335   esac
17336   { echo "$as_me:17336: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17337 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17338 fi
17339 ac_cv_func_vfork_works=$ac_cv_func_vfork
17340 if test "x$ac_cv_func_vfork" = xyes; then
17341   echo "$as_me:17341: checking for working vfork" >&5
17342 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17343 if test "${ac_cv_func_vfork_works+set}" = set; then
17344   echo $ECHO_N "(cached) $ECHO_C" >&6
17345 else
17346   if test "$cross_compiling" = yes; then
17347   ac_cv_func_vfork_works=cross
17348 else
17349   cat >conftest.$ac_ext <<_ACEOF
17350 #line 17350 "configure"
17351 #include "confdefs.h"
17352 /* Thanks to Paul Eggert for this test.  */
17353 #include <stdio.h>
17354 #include <sys/types.h>
17355 #include <sys/stat.h>
17356 #if HAVE_UNISTD_H
17357 # include <unistd.h>
17358 #endif
17359 #if HAVE_VFORK_H
17360 # include <vfork.h>
17361 #endif
17362 /* On some sparc systems, changes by the child to local and incoming
17363    argument registers are propagated back to the parent.  The compiler
17364    is told about this with #include <vfork.h>, but some compilers
17365    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17366    static variable whose address is put into a register that is
17367    clobbered by the vfork.  */
17368 static
17369 #ifdef __cplusplus
17370 sparc_address_test (int arg)
17371 # else
17372 sparc_address_test (arg) int arg;
17373 #endif
17374 {
17375   static pid_t child;
17376   if (!child) {
17377     child = vfork ();
17378     if (child < 0) {
17379       perror ("vfork");
17380       _exit(2);
17381     }
17382     if (!child) {
17383       arg = getpid();
17384       write(-1, "", 0);
17385       _exit (arg);
17386     }
17387   }
17388 }
17389
17390 int
17391 main ()
17392 {
17393   pid_t parent = getpid ();
17394   pid_t child;
17395
17396   sparc_address_test ();
17397
17398   child = vfork ();
17399
17400   if (child == 0) {
17401     /* Here is another test for sparc vfork register problems.  This
17402        test uses lots of local variables, at least as many local
17403        variables as main has allocated so far including compiler
17404        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17405        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17406        reuse the register of parent for one of the local variables,
17407        since it will think that parent can't possibly be used any more
17408        in this routine.  Assigning to the local variable will thus
17409        munge parent in the parent process.  */
17410     pid_t
17411       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17412       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17413     /* Convince the compiler that p..p7 are live; otherwise, it might
17414        use the same hardware register for all 8 local variables.  */
17415     if (p != p1 || p != p2 || p != p3 || p != p4
17416         || p != p5 || p != p6 || p != p7)
17417       _exit(1);
17418
17419     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17420        from child file descriptors.  If the child closes a descriptor
17421        before it execs or exits, this munges the parent's descriptor
17422        as well.  Test for this by closing stdout in the child.  */
17423     _exit(close(fileno(stdout)) != 0);
17424   } else {
17425     int status;
17426     struct stat st;
17427
17428     while (wait(&status) != child)
17429       ;
17430     $ac_main_return(
17431          /* Was there some problem with vforking?  */
17432          child < 0
17433
17434          /* Did the child fail?  (This shouldn't happen.)  */
17435          || status
17436
17437          /* Did the vfork/compiler bug occur?  */
17438          || parent != getpid()
17439
17440          /* Did the file descriptor bug occur?  */
17441          || fstat(fileno(stdout), &st) != 0
17442          );
17443   }
17444 }
17445 _ACEOF
17446 rm -f conftest$ac_exeext
17447 if { (eval echo "$as_me:17447: \"$ac_link\"") >&5
17448   (eval $ac_link) 2>&5
17449   ac_status=$?
17450   echo "$as_me:17450: \$? = $ac_status" >&5
17451   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17452   { (eval echo "$as_me:17452: \"$ac_try\"") >&5
17453   (eval $ac_try) 2>&5
17454   ac_status=$?
17455   echo "$as_me:17455: \$? = $ac_status" >&5
17456   (exit $ac_status); }; }; then
17457   ac_cv_func_vfork_works=yes
17458 else
17459   echo "$as_me: program exited with status $ac_status" >&5
17460 echo "$as_me: failed program was:" >&5
17461 cat conftest.$ac_ext >&5
17462 ac_cv_func_vfork_works=no
17463 fi
17464 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17465 fi
17466 fi
17467 echo "$as_me:17467: result: $ac_cv_func_vfork_works" >&5
17468 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17469
17470 fi;
17471 if test "x$ac_cv_func_fork_works" = xcross; then
17472   ac_cv_func_vfork_works=ac_cv_func_vfork
17473   { echo "$as_me:17473: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17474 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17475 fi
17476
17477 if test "x$ac_cv_func_vfork_works" = xyes; then
17478
17479 cat >>confdefs.h <<\EOF
17480 #define HAVE_WORKING_VFORK 1
17481 EOF
17482
17483 else
17484
17485 cat >>confdefs.h <<\EOF
17486 #define vfork fork
17487 EOF
17488
17489 fi
17490 if test "x$ac_cv_func_fork_works" = xyes; then
17491
17492 cat >>confdefs.h <<\EOF
17493 #define HAVE_WORKING_FORK 1
17494 EOF
17495
17496 fi
17497
17498 # special check for test/ditto.c
17499
17500 echo "$as_me:17500: checking for openpty in -lutil" >&5
17501 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17502 if test "${ac_cv_lib_util_openpty+set}" = set; then
17503   echo $ECHO_N "(cached) $ECHO_C" >&6
17504 else
17505   ac_check_lib_save_LIBS=$LIBS
17506 LIBS="-lutil  $LIBS"
17507 cat >conftest.$ac_ext <<_ACEOF
17508 #line 17508 "configure"
17509 #include "confdefs.h"
17510
17511 /* Override any gcc2 internal prototype to avoid an error.  */
17512 #ifdef __cplusplus
17513 extern "C"
17514 #endif
17515 /* We use char because int might match the return type of a gcc2
17516    builtin and then its argument prototype would still apply.  */
17517 char openpty ();
17518 int
17519 main ()
17520 {
17521 openpty ();
17522   ;
17523   return 0;
17524 }
17525 _ACEOF
17526 rm -f conftest.$ac_objext conftest$ac_exeext
17527 if { (eval echo "$as_me:17527: \"$ac_link\"") >&5
17528   (eval $ac_link) 2>&5
17529   ac_status=$?
17530   echo "$as_me:17530: \$? = $ac_status" >&5
17531   (exit $ac_status); } &&
17532          { ac_try='test -s conftest$ac_exeext'
17533   { (eval echo "$as_me:17533: \"$ac_try\"") >&5
17534   (eval $ac_try) 2>&5
17535   ac_status=$?
17536   echo "$as_me:17536: \$? = $ac_status" >&5
17537   (exit $ac_status); }; }; then
17538   ac_cv_lib_util_openpty=yes
17539 else
17540   echo "$as_me: failed program was:" >&5
17541 cat conftest.$ac_ext >&5
17542 ac_cv_lib_util_openpty=no
17543 fi
17544 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17545 LIBS=$ac_check_lib_save_LIBS
17546 fi
17547 echo "$as_me:17547: result: $ac_cv_lib_util_openpty" >&5
17548 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17549 if test $ac_cv_lib_util_openpty = yes; then
17550   cf_cv_lib_util=yes
17551 else
17552   cf_cv_lib_util=no
17553 fi
17554
17555 echo "$as_me:17555: checking for openpty header" >&5
17556 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17557 if test "${cf_cv_func_openpty+set}" = set; then
17558   echo $ECHO_N "(cached) $ECHO_C" >&6
17559 else
17560
17561     cf_save_LIBS="$LIBS"
17562     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17563     for cf_header in pty.h libutil.h util.h
17564     do
17565     cat >conftest.$ac_ext <<_ACEOF
17566 #line 17566 "configure"
17567 #include "confdefs.h"
17568
17569 #include <$cf_header>
17570
17571 int
17572 main ()
17573 {
17574
17575     int x = openpty((int *)0, (int *)0, (char *)0,
17576                    (struct termios *)0, (struct winsize *)0);
17577
17578   ;
17579   return 0;
17580 }
17581 _ACEOF
17582 rm -f conftest.$ac_objext conftest$ac_exeext
17583 if { (eval echo "$as_me:17583: \"$ac_link\"") >&5
17584   (eval $ac_link) 2>&5
17585   ac_status=$?
17586   echo "$as_me:17586: \$? = $ac_status" >&5
17587   (exit $ac_status); } &&
17588          { ac_try='test -s conftest$ac_exeext'
17589   { (eval echo "$as_me:17589: \"$ac_try\"") >&5
17590   (eval $ac_try) 2>&5
17591   ac_status=$?
17592   echo "$as_me:17592: \$? = $ac_status" >&5
17593   (exit $ac_status); }; }; then
17594
17595         cf_cv_func_openpty=$cf_header
17596         break
17597
17598 else
17599   echo "$as_me: failed program was:" >&5
17600 cat conftest.$ac_ext >&5
17601
17602         cf_cv_func_openpty=no
17603
17604 fi
17605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17606     done
17607     LIBS="$cf_save_LIBS"
17608
17609 fi
17610 echo "$as_me:17610: result: $cf_cv_func_openpty" >&5
17611 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17612
17613 if test "$cf_cv_func_openpty" != no ; then
17614
17615 cat >>confdefs.h <<EOF
17616 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17617 EOF
17618
17619 cat >>confdefs.h <<\EOF
17620 #define USE_XTERM_PTY 1
17621 EOF
17622
17623     if test "x$cf_cv_lib_util" = xyes ; then
17624         TEST_LIBS="-lutil $TEST_LIBS"
17625     fi
17626 fi
17627
17628 if test "$with_hashed_db" != no ; then
17629
17630 cat >>confdefs.h <<\EOF
17631 #define USE_HASHED_DB 1
17632 EOF
17633
17634 case $with_hashed_db in #(vi
17635 yes|*able*) #(vi
17636     ;;
17637 *)
17638     if test -d "$with_hashed_db" ; then
17639
17640 if test -n "$with_hashed_db/include" ; then
17641   for cf_add_incdir in $with_hashed_db/include
17642   do
17643         while test $cf_add_incdir != /usr/include
17644         do
17645           if test -d $cf_add_incdir
17646           then
17647                 cf_have_incdir=no
17648                 if test -n "$CFLAGS$CPPFLAGS" ; then
17649                   # a loop is needed to ensure we can add subdirs of existing dirs
17650                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17651                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17652                           cf_have_incdir=yes; break
17653                         fi
17654                   done
17655                 fi
17656
17657                 if test "$cf_have_incdir" = no ; then
17658                   if test "$cf_add_incdir" = /usr/local/include ; then
17659                         if test "$GCC" = yes
17660                         then
17661                           cf_save_CPPFLAGS=$CPPFLAGS
17662                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17663                           cat >conftest.$ac_ext <<_ACEOF
17664 #line 17664 "configure"
17665 #include "confdefs.h"
17666 #include <stdio.h>
17667 int
17668 main ()
17669 {
17670 printf("Hello")
17671   ;
17672   return 0;
17673 }
17674 _ACEOF
17675 rm -f conftest.$ac_objext
17676 if { (eval echo "$as_me:17676: \"$ac_compile\"") >&5
17677   (eval $ac_compile) 2>&5
17678   ac_status=$?
17679   echo "$as_me:17679: \$? = $ac_status" >&5
17680   (exit $ac_status); } &&
17681          { ac_try='test -s conftest.$ac_objext'
17682   { (eval echo "$as_me:17682: \"$ac_try\"") >&5
17683   (eval $ac_try) 2>&5
17684   ac_status=$?
17685   echo "$as_me:17685: \$? = $ac_status" >&5
17686   (exit $ac_status); }; }; then
17687   :
17688 else
17689   echo "$as_me: failed program was:" >&5
17690 cat conftest.$ac_ext >&5
17691 cf_have_incdir=yes
17692 fi
17693 rm -f conftest.$ac_objext conftest.$ac_ext
17694                           CPPFLAGS=$cf_save_CPPFLAGS
17695                         fi
17696                   fi
17697                 fi
17698
17699                 if test "$cf_have_incdir" = no ; then
17700                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17701
17702 echo "${as_me:-configure}:17702: testing adding $cf_add_incdir to include-path ..." 1>&5
17703
17704                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17705
17706                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17707                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17708                   cf_add_incdir="$cf_top_incdir"
17709                 else
17710                   break
17711                 fi
17712           fi
17713         done
17714   done
17715 fi
17716
17717 if test -n "$with_hashed_db/lib" ; then
17718   for cf_add_libdir in $with_hashed_db/lib
17719   do
17720     if test $cf_add_libdir = /usr/lib ; then
17721       :
17722     elif test -d $cf_add_libdir
17723     then
17724       cf_have_libdir=no
17725       if test -n "$LDFLAGS$LIBS" ; then
17726         # a loop is needed to ensure we can add subdirs of existing dirs
17727         for cf_test_libdir in $LDFLAGS $LIBS ; do
17728           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17729             cf_have_libdir=yes; break
17730           fi
17731         done
17732       fi
17733       if test "$cf_have_libdir" = no ; then
17734         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17735
17736 echo "${as_me:-configure}:17736: testing adding $cf_add_libdir to library-path ..." 1>&5
17737
17738         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17739       fi
17740     fi
17741   done
17742 fi
17743
17744     fi
17745 esac
17746
17747 echo "$as_me:17747: checking for db.h" >&5
17748 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17749 if test "${ac_cv_header_db_h+set}" = set; then
17750   echo $ECHO_N "(cached) $ECHO_C" >&6
17751 else
17752   cat >conftest.$ac_ext <<_ACEOF
17753 #line 17753 "configure"
17754 #include "confdefs.h"
17755 #include <db.h>
17756 _ACEOF
17757 if { (eval echo "$as_me:17757: \"$ac_cpp conftest.$ac_ext\"") >&5
17758   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17759   ac_status=$?
17760   egrep -v '^ *\+' conftest.er1 >conftest.err
17761   rm -f conftest.er1
17762   cat conftest.err >&5
17763   echo "$as_me:17763: \$? = $ac_status" >&5
17764   (exit $ac_status); } >/dev/null; then
17765   if test -s conftest.err; then
17766     ac_cpp_err=$ac_c_preproc_warn_flag
17767   else
17768     ac_cpp_err=
17769   fi
17770 else
17771   ac_cpp_err=yes
17772 fi
17773 if test -z "$ac_cpp_err"; then
17774   ac_cv_header_db_h=yes
17775 else
17776   echo "$as_me: failed program was:" >&5
17777   cat conftest.$ac_ext >&5
17778   ac_cv_header_db_h=no
17779 fi
17780 rm -f conftest.err conftest.$ac_ext
17781 fi
17782 echo "$as_me:17782: result: $ac_cv_header_db_h" >&5
17783 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17784 if test $ac_cv_header_db_h = yes; then
17785
17786 echo "$as_me:17786: checking for version of db" >&5
17787 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17788 if test "${cf_cv_hashed_db_version+set}" = set; then
17789   echo $ECHO_N "(cached) $ECHO_C" >&6
17790 else
17791
17792 cf_cv_hashed_db_version=unknown
17793
17794 for cf_db_version in 1 2 3 4 5
17795 do
17796
17797 echo "${as_me:-configure}:17797: testing checking for db version $cf_db_version ..." 1>&5
17798
17799         cat >conftest.$ac_ext <<_ACEOF
17800 #line 17800 "configure"
17801 #include "confdefs.h"
17802
17803 $ac_includes_default
17804 #include <db.h>
17805
17806 #ifdef DB_VERSION_MAJOR
17807         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17808 #if $cf_db_version == DB_VERSION_MAJOR
17809         /* ok */
17810 #else
17811         make an error
17812 #endif
17813 #else
17814 #if $cf_db_version == 1
17815         /* ok: assuming this is DB 1.8.5 */
17816 #else
17817         make an error
17818 #endif
17819 #endif
17820
17821 int
17822 main ()
17823 {
17824 DBT *foo = 0
17825   ;
17826   return 0;
17827 }
17828 _ACEOF
17829 rm -f conftest.$ac_objext
17830 if { (eval echo "$as_me:17830: \"$ac_compile\"") >&5
17831   (eval $ac_compile) 2>&5
17832   ac_status=$?
17833   echo "$as_me:17833: \$? = $ac_status" >&5
17834   (exit $ac_status); } &&
17835          { ac_try='test -s conftest.$ac_objext'
17836   { (eval echo "$as_me:17836: \"$ac_try\"") >&5
17837   (eval $ac_try) 2>&5
17838   ac_status=$?
17839   echo "$as_me:17839: \$? = $ac_status" >&5
17840   (exit $ac_status); }; }; then
17841
17842         cf_cv_hashed_db_version=$cf_db_version
17843         break
17844
17845 else
17846   echo "$as_me: failed program was:" >&5
17847 cat conftest.$ac_ext >&5
17848 fi
17849 rm -f conftest.$ac_objext conftest.$ac_ext
17850 done
17851
17852 fi
17853 echo "$as_me:17853: result: $cf_cv_hashed_db_version" >&5
17854 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17855
17856 if test "$cf_cv_hashed_db_version" = unknown ; then
17857         { { echo "$as_me:17857: error: Cannot determine version of db" >&5
17858 echo "$as_me: error: Cannot determine version of db" >&2;}
17859    { (exit 1); exit 1; }; }
17860 else
17861
17862 echo "$as_me:17862: checking for db libraries" >&5
17863 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17864 if test "${cf_cv_hashed_db_libs+set}" = set; then
17865   echo $ECHO_N "(cached) $ECHO_C" >&6
17866 else
17867
17868 cf_cv_hashed_db_libs=unknown
17869 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17870 do
17871         cf_save_libs="$LIBS"
17872         if test -n "$cf_db_libs"; then
17873                 LIBS="-l$cf_db_libs $LIBS"
17874         fi
17875
17876 echo "${as_me:-configure}:17876: testing checking for library "$cf_db_libs" ..." 1>&5
17877
17878         cat >conftest.$ac_ext <<_ACEOF
17879 #line 17879 "configure"
17880 #include "confdefs.h"
17881
17882 $ac_includes_default
17883 #include <db.h>
17884
17885 int
17886 main ()
17887 {
17888
17889         char *path = "/tmp/foo";
17890 #ifdef DB_VERSION_MAJOR
17891 #if DB_VERSION_MAJOR >= 4
17892         DB *result = 0;
17893         db_create(&result, NULL, 0);
17894         result->open(result,
17895                 NULL,
17896                 path,
17897                 path,
17898                 DB_HASH,
17899                 DB_CREATE,
17900                 0644);
17901 #elif DB_VERSION_MAJOR >= 3
17902         DB *result = 0;
17903         db_create(&result, NULL, 0);
17904         result->open(result,
17905                 path,
17906                 path,
17907                 DB_HASH,
17908                 DB_CREATE,
17909                 0644);
17910 #elif DB_VERSION_MAJOR >= 2
17911         DB *result = 0;
17912         db_open(path,
17913                 DB_HASH,
17914                 DB_CREATE,
17915                 0644,
17916                 (DB_ENV *) 0,
17917                 (DB_INFO *) 0,
17918                 &result);
17919 #endif /* DB_VERSION_MAJOR */
17920 #else
17921         DB *result = dbopen(path,
17922                      2,
17923                      0644,
17924                      DB_HASH,
17925                      0);
17926 #endif
17927         ${cf_cv_main_return:-return}(result != 0)
17928
17929   ;
17930   return 0;
17931 }
17932 _ACEOF
17933 rm -f conftest.$ac_objext conftest$ac_exeext
17934 if { (eval echo "$as_me:17934: \"$ac_link\"") >&5
17935   (eval $ac_link) 2>&5
17936   ac_status=$?
17937   echo "$as_me:17937: \$? = $ac_status" >&5
17938   (exit $ac_status); } &&
17939          { ac_try='test -s conftest$ac_exeext'
17940   { (eval echo "$as_me:17940: \"$ac_try\"") >&5
17941   (eval $ac_try) 2>&5
17942   ac_status=$?
17943   echo "$as_me:17943: \$? = $ac_status" >&5
17944   (exit $ac_status); }; }; then
17945
17946         if test -n "$cf_db_libs" ; then
17947                 cf_cv_hashed_db_libs=$cf_db_libs
17948         else
17949                 cf_cv_hashed_db_libs=default
17950         fi
17951         LIBS="$cf_save_libs"
17952         break
17953
17954 else
17955   echo "$as_me: failed program was:" >&5
17956 cat conftest.$ac_ext >&5
17957 fi
17958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17959         LIBS="$cf_save_libs"
17960 done
17961
17962 fi
17963 echo "$as_me:17963: result: $cf_cv_hashed_db_libs" >&5
17964 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17965
17966         if test "$cf_cv_hashed_db_libs" = unknown ; then
17967                 { { echo "$as_me:17967: error: Cannot determine library for db" >&5
17968 echo "$as_me: error: Cannot determine library for db" >&2;}
17969    { (exit 1); exit 1; }; }
17970         elif test "$cf_cv_hashed_db_libs" != default ; then
17971                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17972         fi
17973 fi
17974
17975 else
17976
17977         { { echo "$as_me:17977: error: Cannot find db.h" >&5
17978 echo "$as_me: error: Cannot find db.h" >&2;}
17979    { (exit 1); exit 1; }; }
17980
17981 fi
17982
17983 fi
17984
17985 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17986         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17987         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17988 fi
17989
17990 # Just in case, check if the C compiler has a bool type.
17991
17992 echo "$as_me:17992: checking if we should include stdbool.h" >&5
17993 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17994
17995 if test "${cf_cv_header_stdbool_h+set}" = set; then
17996   echo $ECHO_N "(cached) $ECHO_C" >&6
17997 else
17998
17999         cat >conftest.$ac_ext <<_ACEOF
18000 #line 18000 "configure"
18001 #include "confdefs.h"
18002
18003 int
18004 main ()
18005 {
18006 bool foo = false
18007   ;
18008   return 0;
18009 }
18010 _ACEOF
18011 rm -f conftest.$ac_objext
18012 if { (eval echo "$as_me:18012: \"$ac_compile\"") >&5
18013   (eval $ac_compile) 2>&5
18014   ac_status=$?
18015   echo "$as_me:18015: \$? = $ac_status" >&5
18016   (exit $ac_status); } &&
18017          { ac_try='test -s conftest.$ac_objext'
18018   { (eval echo "$as_me:18018: \"$ac_try\"") >&5
18019   (eval $ac_try) 2>&5
18020   ac_status=$?
18021   echo "$as_me:18021: \$? = $ac_status" >&5
18022   (exit $ac_status); }; }; then
18023   cf_cv_header_stdbool_h=0
18024 else
18025   echo "$as_me: failed program was:" >&5
18026 cat conftest.$ac_ext >&5
18027 cat >conftest.$ac_ext <<_ACEOF
18028 #line 18028 "configure"
18029 #include "confdefs.h"
18030
18031 #ifndef __BEOS__
18032 #include <stdbool.h>
18033 #endif
18034
18035 int
18036 main ()
18037 {
18038 bool foo = false
18039   ;
18040   return 0;
18041 }
18042 _ACEOF
18043 rm -f conftest.$ac_objext
18044 if { (eval echo "$as_me:18044: \"$ac_compile\"") >&5
18045   (eval $ac_compile) 2>&5
18046   ac_status=$?
18047   echo "$as_me:18047: \$? = $ac_status" >&5
18048   (exit $ac_status); } &&
18049          { ac_try='test -s conftest.$ac_objext'
18050   { (eval echo "$as_me:18050: \"$ac_try\"") >&5
18051   (eval $ac_try) 2>&5
18052   ac_status=$?
18053   echo "$as_me:18053: \$? = $ac_status" >&5
18054   (exit $ac_status); }; }; then
18055   cf_cv_header_stdbool_h=1
18056 else
18057   echo "$as_me: failed program was:" >&5
18058 cat conftest.$ac_ext >&5
18059 cf_cv_header_stdbool_h=0
18060 fi
18061 rm -f conftest.$ac_objext conftest.$ac_ext
18062 fi
18063 rm -f conftest.$ac_objext conftest.$ac_ext
18064 fi
18065
18066 if test "$cf_cv_header_stdbool_h" = 1
18067 then    echo "$as_me:18067: result: yes" >&5
18068 echo "${ECHO_T}yes" >&6
18069 else    echo "$as_me:18069: result: no" >&5
18070 echo "${ECHO_T}no" >&6
18071 fi
18072
18073 echo "$as_me:18073: checking for builtin bool type" >&5
18074 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18075
18076 if test "${cf_cv_cc_bool_type+set}" = set; then
18077   echo $ECHO_N "(cached) $ECHO_C" >&6
18078 else
18079
18080         cat >conftest.$ac_ext <<_ACEOF
18081 #line 18081 "configure"
18082 #include "confdefs.h"
18083
18084 #include <stdio.h>
18085 #include <sys/types.h>
18086
18087 int
18088 main ()
18089 {
18090 bool x = false
18091   ;
18092   return 0;
18093 }
18094 _ACEOF
18095 rm -f conftest.$ac_objext
18096 if { (eval echo "$as_me:18096: \"$ac_compile\"") >&5
18097   (eval $ac_compile) 2>&5
18098   ac_status=$?
18099   echo "$as_me:18099: \$? = $ac_status" >&5
18100   (exit $ac_status); } &&
18101          { ac_try='test -s conftest.$ac_objext'
18102   { (eval echo "$as_me:18102: \"$ac_try\"") >&5
18103   (eval $ac_try) 2>&5
18104   ac_status=$?
18105   echo "$as_me:18105: \$? = $ac_status" >&5
18106   (exit $ac_status); }; }; then
18107   cf_cv_cc_bool_type=1
18108 else
18109   echo "$as_me: failed program was:" >&5
18110 cat conftest.$ac_ext >&5
18111 cf_cv_cc_bool_type=0
18112 fi
18113 rm -f conftest.$ac_objext conftest.$ac_ext
18114
18115 fi
18116
18117 if test "$cf_cv_cc_bool_type" = 1
18118 then    echo "$as_me:18118: result: yes" >&5
18119 echo "${ECHO_T}yes" >&6
18120 else    echo "$as_me:18120: result: no" >&5
18121 echo "${ECHO_T}no" >&6
18122 fi
18123
18124 # Check for C++ compiler characteristics (and ensure that it's there!)
18125 if test -n "$CXX" ; then
18126         ac_ext=cc
18127 ac_cpp='$CXXCPP $CPPFLAGS'
18128 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18129 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18130 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18131 ac_main_return=return
18132
18133 if test -n "$GXX" ; then
18134 case $cf_cv_system_name in #(vi
18135 os2*) #(vi
18136         cf_stdcpp_libname=stdcpp
18137         ;;
18138 *)
18139         cf_stdcpp_libname=stdc++
18140         ;;
18141 esac
18142 echo "$as_me:18142: checking for library $cf_stdcpp_libname" >&5
18143 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18144 if test "${cf_cv_libstdcpp+set}" = set; then
18145   echo $ECHO_N "(cached) $ECHO_C" >&6
18146 else
18147
18148         cf_save="$LIBS"
18149         LIBS="-l$cf_stdcpp_libname $LIBS"
18150 cat >conftest.$ac_ext <<_ACEOF
18151 #line 18151 "configure"
18152 #include "confdefs.h"
18153
18154 #include <strstream.h>
18155 int
18156 main ()
18157 {
18158
18159 char buf[80];
18160 strstreambuf foo(buf, sizeof(buf))
18161
18162   ;
18163   return 0;
18164 }
18165 _ACEOF
18166 rm -f conftest.$ac_objext conftest$ac_exeext
18167 if { (eval echo "$as_me:18167: \"$ac_link\"") >&5
18168   (eval $ac_link) 2>&5
18169   ac_status=$?
18170   echo "$as_me:18170: \$? = $ac_status" >&5
18171   (exit $ac_status); } &&
18172          { ac_try='test -s conftest$ac_exeext'
18173   { (eval echo "$as_me:18173: \"$ac_try\"") >&5
18174   (eval $ac_try) 2>&5
18175   ac_status=$?
18176   echo "$as_me:18176: \$? = $ac_status" >&5
18177   (exit $ac_status); }; }; then
18178   cf_cv_libstdcpp=yes
18179 else
18180   echo "$as_me: failed program was:" >&5
18181 cat conftest.$ac_ext >&5
18182 cf_cv_libstdcpp=no
18183 fi
18184 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18185         LIBS="$cf_save"
18186
18187 fi
18188 echo "$as_me:18188: result: $cf_cv_libstdcpp" >&5
18189 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18190 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18191 fi
18192
18193         echo "$as_me:18193: checking whether $CXX understands -c and -o together" >&5
18194 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18195 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18196   echo $ECHO_N "(cached) $ECHO_C" >&6
18197 else
18198
18199 cat > conftest.$ac_ext <<CF_EOF
18200 #include <stdio.h>
18201 int main()
18202 {
18203         ${cf_cv_main_return:-return}(0);
18204 }
18205 CF_EOF
18206 # We do the test twice because some compilers refuse to overwrite an
18207 # existing .o file with -o, though they will create one.
18208 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18209 if { (eval echo "$as_me:18209: \"$ac_try\"") >&5
18210   (eval $ac_try) 2>&5
18211   ac_status=$?
18212   echo "$as_me:18212: \$? = $ac_status" >&5
18213   (exit $ac_status); } &&
18214   test -f conftest2.$ac_objext && { (eval echo "$as_me:18214: \"$ac_try\"") >&5
18215   (eval $ac_try) 2>&5
18216   ac_status=$?
18217   echo "$as_me:18217: \$? = $ac_status" >&5
18218   (exit $ac_status); };
18219 then
18220   eval cf_cv_prog_CXX_c_o=yes
18221 else
18222   eval cf_cv_prog_CXX_c_o=no
18223 fi
18224 rm -rf conftest*
18225
18226 fi
18227 if test $cf_cv_prog_CXX_c_o = yes; then
18228   echo "$as_me:18228: result: yes" >&5
18229 echo "${ECHO_T}yes" >&6
18230 else
18231   echo "$as_me:18231: result: no" >&5
18232 echo "${ECHO_T}no" >&6
18233 fi
18234
18235         case $GXX_VERSION in
18236         1*|2.0-6*)
18237                 cf_cxx_library=yes
18238                 ;;
18239         *-2.7*|2.7*)
18240
18241 cf_cxx_library=unknown
18242 case $cf_cv_system_name in #(vi
18243 os2*) #(vi
18244         cf_gpp_libname=gpp
18245         ;;
18246 *)
18247         cf_gpp_libname=g++
18248         ;;
18249 esac
18250 if test "$GXX" = yes; then
18251         echo "$as_me:18251: checking for lib$cf_gpp_libname" >&5
18252 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18253         cf_save="$LIBS"
18254         LIBS="-l$cf_gpp_libname $LIBS"
18255         cat >conftest.$ac_ext <<_ACEOF
18256 #line 18256 "configure"
18257 #include "confdefs.h"
18258
18259 #include <$cf_gpp_libname/builtin.h>
18260
18261 int
18262 main ()
18263 {
18264 two_arg_error_handler_t foo2 = lib_error_handler
18265   ;
18266   return 0;
18267 }
18268 _ACEOF
18269 rm -f conftest.$ac_objext conftest$ac_exeext
18270 if { (eval echo "$as_me:18270: \"$ac_link\"") >&5
18271   (eval $ac_link) 2>&5
18272   ac_status=$?
18273   echo "$as_me:18273: \$? = $ac_status" >&5
18274   (exit $ac_status); } &&
18275          { ac_try='test -s conftest$ac_exeext'
18276   { (eval echo "$as_me:18276: \"$ac_try\"") >&5
18277   (eval $ac_try) 2>&5
18278   ac_status=$?
18279   echo "$as_me:18279: \$? = $ac_status" >&5
18280   (exit $ac_status); }; }; then
18281   cf_cxx_library=yes
18282          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18283          if test "$cf_gpp_libname" = cpp ; then
18284
18285 cat >>confdefs.h <<\EOF
18286 #define HAVE_GPP_BUILTIN_H 1
18287 EOF
18288
18289          else
18290
18291 cat >>confdefs.h <<\EOF
18292 #define HAVE_GXX_BUILTIN_H 1
18293 EOF
18294
18295          fi
18296 else
18297   echo "$as_me: failed program was:" >&5
18298 cat conftest.$ac_ext >&5
18299 cat >conftest.$ac_ext <<_ACEOF
18300 #line 18300 "configure"
18301 #include "confdefs.h"
18302
18303 #include <builtin.h>
18304
18305 int
18306 main ()
18307 {
18308 two_arg_error_handler_t foo2 = lib_error_handler
18309   ;
18310   return 0;
18311 }
18312 _ACEOF
18313 rm -f conftest.$ac_objext conftest$ac_exeext
18314 if { (eval echo "$as_me:18314: \"$ac_link\"") >&5
18315   (eval $ac_link) 2>&5
18316   ac_status=$?
18317   echo "$as_me:18317: \$? = $ac_status" >&5
18318   (exit $ac_status); } &&
18319          { ac_try='test -s conftest$ac_exeext'
18320   { (eval echo "$as_me:18320: \"$ac_try\"") >&5
18321   (eval $ac_try) 2>&5
18322   ac_status=$?
18323   echo "$as_me:18323: \$? = $ac_status" >&5
18324   (exit $ac_status); }; }; then
18325   cf_cxx_library=yes
18326          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18327
18328 cat >>confdefs.h <<\EOF
18329 #define HAVE_BUILTIN_H 1
18330 EOF
18331
18332 else
18333   echo "$as_me: failed program was:" >&5
18334 cat conftest.$ac_ext >&5
18335 cf_cxx_library=no
18336 fi
18337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18338 fi
18339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18340         LIBS="$cf_save"
18341         echo "$as_me:18341: result: $cf_cxx_library" >&5
18342 echo "${ECHO_T}$cf_cxx_library" >&6
18343 fi
18344
18345                 ;;
18346         *)
18347                 cf_cxx_library=no
18348                 ;;
18349         esac
18350
18351         ac_ext=cc
18352 ac_cpp='$CXXCPP $CPPFLAGS'
18353 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18354 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18355 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18356 ac_main_return=return
18357 echo "$as_me:18357: checking how to run the C++ preprocessor" >&5
18358 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18359 if test -z "$CXXCPP"; then
18360   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18361   echo $ECHO_N "(cached) $ECHO_C" >&6
18362 else
18363       # Double quotes because CXXCPP needs to be expanded
18364     for CXXCPP in "$CXX -E" "/lib/cpp"
18365     do
18366       ac_preproc_ok=false
18367 for ac_cxx_preproc_warn_flag in '' yes
18368 do
18369   # Use a header file that comes with gcc, so configuring glibc
18370   # with a fresh cross-compiler works.
18371   # On the NeXT, cc -E runs the code through the compiler's parser,
18372   # not just through cpp. "Syntax error" is here to catch this case.
18373   cat >conftest.$ac_ext <<_ACEOF
18374 #line 18374 "configure"
18375 #include "confdefs.h"
18376 #include <assert.h>
18377                      Syntax error
18378 _ACEOF
18379 if { (eval echo "$as_me:18379: \"$ac_cpp conftest.$ac_ext\"") >&5
18380   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18381   ac_status=$?
18382   egrep -v '^ *\+' conftest.er1 >conftest.err
18383   rm -f conftest.er1
18384   cat conftest.err >&5
18385   echo "$as_me:18385: \$? = $ac_status" >&5
18386   (exit $ac_status); } >/dev/null; then
18387   if test -s conftest.err; then
18388     ac_cpp_err=$ac_cxx_preproc_warn_flag
18389   else
18390     ac_cpp_err=
18391   fi
18392 else
18393   ac_cpp_err=yes
18394 fi
18395 if test -z "$ac_cpp_err"; then
18396   :
18397 else
18398   echo "$as_me: failed program was:" >&5
18399   cat conftest.$ac_ext >&5
18400   # Broken: fails on valid input.
18401 continue
18402 fi
18403 rm -f conftest.err conftest.$ac_ext
18404
18405   # OK, works on sane cases.  Now check whether non-existent headers
18406   # can be detected and how.
18407   cat >conftest.$ac_ext <<_ACEOF
18408 #line 18408 "configure"
18409 #include "confdefs.h"
18410 #include <ac_nonexistent.h>
18411 _ACEOF
18412 if { (eval echo "$as_me:18412: \"$ac_cpp conftest.$ac_ext\"") >&5
18413   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18414   ac_status=$?
18415   egrep -v '^ *\+' conftest.er1 >conftest.err
18416   rm -f conftest.er1
18417   cat conftest.err >&5
18418   echo "$as_me:18418: \$? = $ac_status" >&5
18419   (exit $ac_status); } >/dev/null; then
18420   if test -s conftest.err; then
18421     ac_cpp_err=$ac_cxx_preproc_warn_flag
18422   else
18423     ac_cpp_err=
18424   fi
18425 else
18426   ac_cpp_err=yes
18427 fi
18428 if test -z "$ac_cpp_err"; then
18429   # Broken: success on invalid input.
18430 continue
18431 else
18432   echo "$as_me: failed program was:" >&5
18433   cat conftest.$ac_ext >&5
18434   # Passes both tests.
18435 ac_preproc_ok=:
18436 break
18437 fi
18438 rm -f conftest.err conftest.$ac_ext
18439
18440 done
18441 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18442 rm -f conftest.err conftest.$ac_ext
18443 if $ac_preproc_ok; then
18444   break
18445 fi
18446
18447     done
18448     ac_cv_prog_CXXCPP=$CXXCPP
18449
18450 fi
18451   CXXCPP=$ac_cv_prog_CXXCPP
18452 else
18453   ac_cv_prog_CXXCPP=$CXXCPP
18454 fi
18455 echo "$as_me:18455: result: $CXXCPP" >&5
18456 echo "${ECHO_T}$CXXCPP" >&6
18457 ac_preproc_ok=false
18458 for ac_cxx_preproc_warn_flag in '' yes
18459 do
18460   # Use a header file that comes with gcc, so configuring glibc
18461   # with a fresh cross-compiler works.
18462   # On the NeXT, cc -E runs the code through the compiler's parser,
18463   # not just through cpp. "Syntax error" is here to catch this case.
18464   cat >conftest.$ac_ext <<_ACEOF
18465 #line 18465 "configure"
18466 #include "confdefs.h"
18467 #include <assert.h>
18468                      Syntax error
18469 _ACEOF
18470 if { (eval echo "$as_me:18470: \"$ac_cpp conftest.$ac_ext\"") >&5
18471   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18472   ac_status=$?
18473   egrep -v '^ *\+' conftest.er1 >conftest.err
18474   rm -f conftest.er1
18475   cat conftest.err >&5
18476   echo "$as_me:18476: \$? = $ac_status" >&5
18477   (exit $ac_status); } >/dev/null; then
18478   if test -s conftest.err; then
18479     ac_cpp_err=$ac_cxx_preproc_warn_flag
18480   else
18481     ac_cpp_err=
18482   fi
18483 else
18484   ac_cpp_err=yes
18485 fi
18486 if test -z "$ac_cpp_err"; then
18487   :
18488 else
18489   echo "$as_me: failed program was:" >&5
18490   cat conftest.$ac_ext >&5
18491   # Broken: fails on valid input.
18492 continue
18493 fi
18494 rm -f conftest.err conftest.$ac_ext
18495
18496   # OK, works on sane cases.  Now check whether non-existent headers
18497   # can be detected and how.
18498   cat >conftest.$ac_ext <<_ACEOF
18499 #line 18499 "configure"
18500 #include "confdefs.h"
18501 #include <ac_nonexistent.h>
18502 _ACEOF
18503 if { (eval echo "$as_me:18503: \"$ac_cpp conftest.$ac_ext\"") >&5
18504   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18505   ac_status=$?
18506   egrep -v '^ *\+' conftest.er1 >conftest.err
18507   rm -f conftest.er1
18508   cat conftest.err >&5
18509   echo "$as_me:18509: \$? = $ac_status" >&5
18510   (exit $ac_status); } >/dev/null; then
18511   if test -s conftest.err; then
18512     ac_cpp_err=$ac_cxx_preproc_warn_flag
18513   else
18514     ac_cpp_err=
18515   fi
18516 else
18517   ac_cpp_err=yes
18518 fi
18519 if test -z "$ac_cpp_err"; then
18520   # Broken: success on invalid input.
18521 continue
18522 else
18523   echo "$as_me: failed program was:" >&5
18524   cat conftest.$ac_ext >&5
18525   # Passes both tests.
18526 ac_preproc_ok=:
18527 break
18528 fi
18529 rm -f conftest.err conftest.$ac_ext
18530
18531 done
18532 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18533 rm -f conftest.err conftest.$ac_ext
18534 if $ac_preproc_ok; then
18535   :
18536 else
18537   { { echo "$as_me:18537: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18538 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18539    { (exit 1); exit 1; }; }
18540 fi
18541
18542 ac_ext=cc
18543 ac_cpp='$CXXCPP $CPPFLAGS'
18544 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18545 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18546 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18547 ac_main_return=return
18548
18549 for ac_header in typeinfo
18550 do
18551 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18552 echo "$as_me:18552: checking for $ac_header" >&5
18553 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18554 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18555   echo $ECHO_N "(cached) $ECHO_C" >&6
18556 else
18557   cat >conftest.$ac_ext <<_ACEOF
18558 #line 18558 "configure"
18559 #include "confdefs.h"
18560 #include <$ac_header>
18561 _ACEOF
18562 if { (eval echo "$as_me:18562: \"$ac_cpp conftest.$ac_ext\"") >&5
18563   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18564   ac_status=$?
18565   egrep -v '^ *\+' conftest.er1 >conftest.err
18566   rm -f conftest.er1
18567   cat conftest.err >&5
18568   echo "$as_me:18568: \$? = $ac_status" >&5
18569   (exit $ac_status); } >/dev/null; then
18570   if test -s conftest.err; then
18571     ac_cpp_err=$ac_cxx_preproc_warn_flag
18572   else
18573     ac_cpp_err=
18574   fi
18575 else
18576   ac_cpp_err=yes
18577 fi
18578 if test -z "$ac_cpp_err"; then
18579   eval "$as_ac_Header=yes"
18580 else
18581   echo "$as_me: failed program was:" >&5
18582   cat conftest.$ac_ext >&5
18583   eval "$as_ac_Header=no"
18584 fi
18585 rm -f conftest.err conftest.$ac_ext
18586 fi
18587 echo "$as_me:18587: result: `eval echo '${'$as_ac_Header'}'`" >&5
18588 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18589 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18590   cat >>confdefs.h <<EOF
18591 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18592 EOF
18593
18594 fi
18595 done
18596
18597 for ac_header in iostream
18598 do
18599 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18600 echo "$as_me:18600: checking for $ac_header" >&5
18601 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18602 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18603   echo $ECHO_N "(cached) $ECHO_C" >&6
18604 else
18605   cat >conftest.$ac_ext <<_ACEOF
18606 #line 18606 "configure"
18607 #include "confdefs.h"
18608 #include <$ac_header>
18609 _ACEOF
18610 if { (eval echo "$as_me:18610: \"$ac_cpp conftest.$ac_ext\"") >&5
18611   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18612   ac_status=$?
18613   egrep -v '^ *\+' conftest.er1 >conftest.err
18614   rm -f conftest.er1
18615   cat conftest.err >&5
18616   echo "$as_me:18616: \$? = $ac_status" >&5
18617   (exit $ac_status); } >/dev/null; then
18618   if test -s conftest.err; then
18619     ac_cpp_err=$ac_cxx_preproc_warn_flag
18620   else
18621     ac_cpp_err=
18622   fi
18623 else
18624   ac_cpp_err=yes
18625 fi
18626 if test -z "$ac_cpp_err"; then
18627   eval "$as_ac_Header=yes"
18628 else
18629   echo "$as_me: failed program was:" >&5
18630   cat conftest.$ac_ext >&5
18631   eval "$as_ac_Header=no"
18632 fi
18633 rm -f conftest.err conftest.$ac_ext
18634 fi
18635 echo "$as_me:18635: result: `eval echo '${'$as_ac_Header'}'`" >&5
18636 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18637 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18638   cat >>confdefs.h <<EOF
18639 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18640 EOF
18641
18642 fi
18643 done
18644
18645 if test x"$ac_cv_header_iostream" = xyes ; then
18646         echo "$as_me:18646: checking if iostream uses std-namespace" >&5
18647 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18648         cat >conftest.$ac_ext <<_ACEOF
18649 #line 18649 "configure"
18650 #include "confdefs.h"
18651
18652 #include <iostream>
18653 using std::endl;
18654 using std::cerr;
18655 int
18656 main ()
18657 {
18658
18659 cerr << "testing" << endl;
18660
18661   ;
18662   return 0;
18663 }
18664 _ACEOF
18665 rm -f conftest.$ac_objext
18666 if { (eval echo "$as_me:18666: \"$ac_compile\"") >&5
18667   (eval $ac_compile) 2>&5
18668   ac_status=$?
18669   echo "$as_me:18669: \$? = $ac_status" >&5
18670   (exit $ac_status); } &&
18671          { ac_try='test -s conftest.$ac_objext'
18672   { (eval echo "$as_me:18672: \"$ac_try\"") >&5
18673   (eval $ac_try) 2>&5
18674   ac_status=$?
18675   echo "$as_me:18675: \$? = $ac_status" >&5
18676   (exit $ac_status); }; }; then
18677   cf_iostream_namespace=yes
18678 else
18679   echo "$as_me: failed program was:" >&5
18680 cat conftest.$ac_ext >&5
18681 cf_iostream_namespace=no
18682 fi
18683 rm -f conftest.$ac_objext conftest.$ac_ext
18684         echo "$as_me:18684: result: $cf_iostream_namespace" >&5
18685 echo "${ECHO_T}$cf_iostream_namespace" >&6
18686         if test "$cf_iostream_namespace" = yes ; then
18687
18688 cat >>confdefs.h <<\EOF
18689 #define IOSTREAM_NAMESPACE 1
18690 EOF
18691
18692         fi
18693 fi
18694
18695 echo "$as_me:18695: checking if we should include stdbool.h" >&5
18696 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18697
18698 if test "${cf_cv_header_stdbool_h+set}" = set; then
18699   echo $ECHO_N "(cached) $ECHO_C" >&6
18700 else
18701
18702         cat >conftest.$ac_ext <<_ACEOF
18703 #line 18703 "configure"
18704 #include "confdefs.h"
18705
18706 int
18707 main ()
18708 {
18709 bool foo = false
18710   ;
18711   return 0;
18712 }
18713 _ACEOF
18714 rm -f conftest.$ac_objext
18715 if { (eval echo "$as_me:18715: \"$ac_compile\"") >&5
18716   (eval $ac_compile) 2>&5
18717   ac_status=$?
18718   echo "$as_me:18718: \$? = $ac_status" >&5
18719   (exit $ac_status); } &&
18720          { ac_try='test -s conftest.$ac_objext'
18721   { (eval echo "$as_me:18721: \"$ac_try\"") >&5
18722   (eval $ac_try) 2>&5
18723   ac_status=$?
18724   echo "$as_me:18724: \$? = $ac_status" >&5
18725   (exit $ac_status); }; }; then
18726   cf_cv_header_stdbool_h=0
18727 else
18728   echo "$as_me: failed program was:" >&5
18729 cat conftest.$ac_ext >&5
18730 cat >conftest.$ac_ext <<_ACEOF
18731 #line 18731 "configure"
18732 #include "confdefs.h"
18733
18734 #ifndef __BEOS__
18735 #include <stdbool.h>
18736 #endif
18737
18738 int
18739 main ()
18740 {
18741 bool foo = false
18742   ;
18743   return 0;
18744 }
18745 _ACEOF
18746 rm -f conftest.$ac_objext
18747 if { (eval echo "$as_me:18747: \"$ac_compile\"") >&5
18748   (eval $ac_compile) 2>&5
18749   ac_status=$?
18750   echo "$as_me:18750: \$? = $ac_status" >&5
18751   (exit $ac_status); } &&
18752          { ac_try='test -s conftest.$ac_objext'
18753   { (eval echo "$as_me:18753: \"$ac_try\"") >&5
18754   (eval $ac_try) 2>&5
18755   ac_status=$?
18756   echo "$as_me:18756: \$? = $ac_status" >&5
18757   (exit $ac_status); }; }; then
18758   cf_cv_header_stdbool_h=1
18759 else
18760   echo "$as_me: failed program was:" >&5
18761 cat conftest.$ac_ext >&5
18762 cf_cv_header_stdbool_h=0
18763 fi
18764 rm -f conftest.$ac_objext conftest.$ac_ext
18765 fi
18766 rm -f conftest.$ac_objext conftest.$ac_ext
18767 fi
18768
18769 if test "$cf_cv_header_stdbool_h" = 1
18770 then    echo "$as_me:18770: result: yes" >&5
18771 echo "${ECHO_T}yes" >&6
18772 else    echo "$as_me:18772: result: no" >&5
18773 echo "${ECHO_T}no" >&6
18774 fi
18775
18776 echo "$as_me:18776: checking for builtin bool type" >&5
18777 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18778
18779 if test "${cf_cv_builtin_bool+set}" = set; then
18780   echo $ECHO_N "(cached) $ECHO_C" >&6
18781 else
18782
18783         cat >conftest.$ac_ext <<_ACEOF
18784 #line 18784 "configure"
18785 #include "confdefs.h"
18786
18787 #include <stdio.h>
18788 #include <sys/types.h>
18789
18790 int
18791 main ()
18792 {
18793 bool x = false
18794   ;
18795   return 0;
18796 }
18797 _ACEOF
18798 rm -f conftest.$ac_objext
18799 if { (eval echo "$as_me:18799: \"$ac_compile\"") >&5
18800   (eval $ac_compile) 2>&5
18801   ac_status=$?
18802   echo "$as_me:18802: \$? = $ac_status" >&5
18803   (exit $ac_status); } &&
18804          { ac_try='test -s conftest.$ac_objext'
18805   { (eval echo "$as_me:18805: \"$ac_try\"") >&5
18806   (eval $ac_try) 2>&5
18807   ac_status=$?
18808   echo "$as_me:18808: \$? = $ac_status" >&5
18809   (exit $ac_status); }; }; then
18810   cf_cv_builtin_bool=1
18811 else
18812   echo "$as_me: failed program was:" >&5
18813 cat conftest.$ac_ext >&5
18814 cf_cv_builtin_bool=0
18815 fi
18816 rm -f conftest.$ac_objext conftest.$ac_ext
18817
18818 fi
18819
18820 if test "$cf_cv_builtin_bool" = 1
18821 then    echo "$as_me:18821: result: yes" >&5
18822 echo "${ECHO_T}yes" >&6
18823 else    echo "$as_me:18823: result: no" >&5
18824 echo "${ECHO_T}no" >&6
18825 fi
18826
18827 echo "$as_me:18827: checking for size of bool" >&5
18828 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18829 if test "${cf_cv_type_of_bool+set}" = set; then
18830   echo $ECHO_N "(cached) $ECHO_C" >&6
18831 else
18832
18833         rm -f cf_test.out
18834         if test "$cross_compiling" = yes; then
18835   cf_cv_type_of_bool=unknown
18836 else
18837   cat >conftest.$ac_ext <<_ACEOF
18838 #line 18838 "configure"
18839 #include "confdefs.h"
18840
18841 #include <stdlib.h>
18842 #include <stdio.h>
18843
18844 #if defined(__cplusplus)
18845
18846 #ifdef HAVE_GXX_BUILTIN_H
18847 #include <g++/builtin.h>
18848 #elif HAVE_GPP_BUILTIN_H
18849 #include <gpp/builtin.h>
18850 #elif HAVE_BUILTIN_H
18851 #include <builtin.h>
18852 #endif
18853
18854 #else
18855
18856 #if $cf_cv_header_stdbool_h
18857 #include <stdbool.h>
18858 #endif
18859
18860 #endif
18861
18862 int main()
18863 {
18864         FILE *fp = fopen("cf_test.out", "w");
18865         if (fp != 0) {
18866                 bool x = true;
18867                 if ((bool)(-x) >= 0)
18868                         fputs("unsigned ", fp);
18869                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18870                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18871                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18872                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18873                 fclose(fp);
18874         }
18875         ${cf_cv_main_return:-return}(0);
18876 }
18877
18878 _ACEOF
18879 rm -f conftest$ac_exeext
18880 if { (eval echo "$as_me:18880: \"$ac_link\"") >&5
18881   (eval $ac_link) 2>&5
18882   ac_status=$?
18883   echo "$as_me:18883: \$? = $ac_status" >&5
18884   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18885   { (eval echo "$as_me:18885: \"$ac_try\"") >&5
18886   (eval $ac_try) 2>&5
18887   ac_status=$?
18888   echo "$as_me:18888: \$? = $ac_status" >&5
18889   (exit $ac_status); }; }; then
18890   cf_cv_type_of_bool=`cat cf_test.out`
18891                  if test -z "$cf_cv_type_of_bool"; then
18892                    cf_cv_type_of_bool=unknown
18893                  fi
18894 else
18895   echo "$as_me: program exited with status $ac_status" >&5
18896 echo "$as_me: failed program was:" >&5
18897 cat conftest.$ac_ext >&5
18898 cf_cv_type_of_bool=unknown
18899 fi
18900 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18901 fi
18902
18903 fi
18904
18905         rm -f cf_test.out
18906 echo "$as_me:18906: result: $cf_cv_type_of_bool" >&5
18907 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18908 if test "$cf_cv_type_of_bool" = unknown ; then
18909         case .$NCURSES_BOOL in #(vi
18910         .auto|.) NCURSES_BOOL=unsigned;;
18911         esac
18912         { echo "$as_me:18912: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18913 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18914         cf_cv_type_of_bool=$NCURSES_BOOL
18915 fi
18916
18917 echo "$as_me:18917: checking for special defines needed for etip.h" >&5
18918 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18919 cf_save_CXXFLAGS="$CXXFLAGS"
18920 cf_result="none"
18921
18922 # etip.h includes ncurses.h which includes ncurses_dll.h
18923 # But ncurses_dll.h is generated - fix here.
18924 test -d include || mkdir include
18925 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
18926
18927 for cf_math in "" MATH_H
18928 do
18929 for cf_excp in "" MATH_EXCEPTION
18930 do
18931         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18932         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18933         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18934 cat >conftest.$ac_ext <<_ACEOF
18935 #line 18935 "configure"
18936 #include "confdefs.h"
18937
18938 #include <etip.h.in>
18939
18940 int
18941 main ()
18942 {
18943
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
18961         test -n "$cf_math" && cat >>confdefs.h <<EOF
18962 #define ETIP_NEEDS_${cf_math} 1
18963 EOF
18964
18965         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18966 #define ETIP_NEEDS_${cf_excp} 1
18967 EOF
18968
18969         cf_result="$cf_math $cf_excp"
18970         break 2
18971
18972 else
18973   echo "$as_me: failed program was:" >&5
18974 cat conftest.$ac_ext >&5
18975 fi
18976 rm -f conftest.$ac_objext conftest.$ac_ext
18977 done
18978 done
18979 echo "$as_me:18979: result: $cf_result" >&5
18980 echo "${ECHO_T}$cf_result" >&6
18981 CXXFLAGS="$cf_save_CXXFLAGS"
18982
18983 if test -n "$CXX"; then
18984 echo "$as_me:18984: checking if $CXX accepts parameter initialization" >&5
18985 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18986 if test "${cf_cv_cpp_param_init+set}" = set; then
18987   echo $ECHO_N "(cached) $ECHO_C" >&6
18988 else
18989
18990         ac_ext=cc
18991 ac_cpp='$CXXCPP $CPPFLAGS'
18992 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18993 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18994 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18995 ac_main_return=return
18996
18997         if test "$cross_compiling" = yes; then
18998   cf_cv_cpp_param_init=unknown
18999 else
19000   cat >conftest.$ac_ext <<_ACEOF
19001 #line 19001 "configure"
19002 #include "confdefs.h"
19003
19004 class TEST {
19005 private:
19006         int value;
19007 public:
19008         TEST(int x = 1);
19009         ~TEST();
19010 };
19011
19012 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19013 {
19014         value = x;
19015 }
19016 int main() { }
19017
19018 _ACEOF
19019 rm -f conftest$ac_exeext
19020 if { (eval echo "$as_me:19020: \"$ac_link\"") >&5
19021   (eval $ac_link) 2>&5
19022   ac_status=$?
19023   echo "$as_me:19023: \$? = $ac_status" >&5
19024   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19025   { (eval echo "$as_me:19025: \"$ac_try\"") >&5
19026   (eval $ac_try) 2>&5
19027   ac_status=$?
19028   echo "$as_me:19028: \$? = $ac_status" >&5
19029   (exit $ac_status); }; }; then
19030   cf_cv_cpp_param_init=yes
19031 else
19032   echo "$as_me: program exited with status $ac_status" >&5
19033 echo "$as_me: failed program was:" >&5
19034 cat conftest.$ac_ext >&5
19035 cf_cv_cpp_param_init=no
19036 fi
19037 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19038 fi
19039         ac_ext=cc
19040 ac_cpp='$CXXCPP $CPPFLAGS'
19041 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19042 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19043 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19044 ac_main_return=return
19045
19046 fi
19047 echo "$as_me:19047: result: $cf_cv_cpp_param_init" >&5
19048 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19049 fi
19050 test "$cf_cv_cpp_param_init" = yes &&
19051 cat >>confdefs.h <<\EOF
19052 #define CPP_HAS_PARAM_INIT 1
19053 EOF
19054
19055 if test -n "$CXX"; then
19056
19057 echo "$as_me:19057: checking if $CXX accepts static_cast" >&5
19058 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19059 if test "${cf_cv_cpp_static_cast+set}" = set; then
19060   echo $ECHO_N "(cached) $ECHO_C" >&6
19061 else
19062
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         cat >conftest.$ac_ext <<_ACEOF
19071 #line 19071 "configure"
19072 #include "confdefs.h"
19073
19074 class NCursesPanel
19075 {
19076 public:
19077   NCursesPanel(int nlines,
19078                int ncols,
19079                int begin_y = 0,
19080                int begin_x = 0)
19081   {
19082   }
19083   NCursesPanel();
19084   ~NCursesPanel();
19085 };
19086
19087 template<class T> class NCursesUserPanel : public NCursesPanel
19088 {
19089 public:
19090   NCursesUserPanel (int nlines,
19091                     int ncols,
19092                     int begin_y = 0,
19093                     int begin_x = 0,
19094                     const T* p_UserData = static_cast<T*>(0))
19095     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19096   {
19097   };
19098   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19099   {
19100   };
19101
19102   virtual ~NCursesUserPanel() {};
19103 };
19104
19105 int
19106 main ()
19107 {
19108
19109         const char* p_UserData = static_cast<char*>(0)
19110   ;
19111   return 0;
19112 }
19113 _ACEOF
19114 rm -f conftest.$ac_objext
19115 if { (eval echo "$as_me:19115: \"$ac_compile\"") >&5
19116   (eval $ac_compile) 2>&5
19117   ac_status=$?
19118   echo "$as_me:19118: \$? = $ac_status" >&5
19119   (exit $ac_status); } &&
19120          { ac_try='test -s conftest.$ac_objext'
19121   { (eval echo "$as_me:19121: \"$ac_try\"") >&5
19122   (eval $ac_try) 2>&5
19123   ac_status=$?
19124   echo "$as_me:19124: \$? = $ac_status" >&5
19125   (exit $ac_status); }; }; then
19126   cf_cv_cpp_static_cast=yes
19127 else
19128   echo "$as_me: failed program was:" >&5
19129 cat conftest.$ac_ext >&5
19130 cf_cv_cpp_static_cast=no
19131 fi
19132 rm -f conftest.$ac_objext conftest.$ac_ext
19133
19134         ac_ext=cc
19135 ac_cpp='$CXXCPP $CPPFLAGS'
19136 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19137 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19138 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19139 ac_main_return=return
19140
19141 fi
19142 echo "$as_me:19142: result: $cf_cv_cpp_static_cast" >&5
19143 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19144
19145 fi
19146
19147 test "$cf_cv_cpp_static_cast" = yes &&
19148 cat >>confdefs.h <<\EOF
19149 #define CPP_HAS_STATIC_CAST 1
19150 EOF
19151
19152         CXX_AR='$(AR)'
19153         CXX_ARFLAGS='$(ARFLAGS)'
19154         case $cf_cv_system_name in #(vi
19155         irix*) #(vi
19156             if test "$GXX" != yes ; then
19157                 CXX_AR='$(CXX)'
19158                 CXX_ARFLAGS='-ar -o'
19159             fi
19160             ;;
19161         sco3.2v5*) #(vi
19162             CXXLDFLAGS="-u main"
19163             ;;
19164         solaris2*)
19165             if test "$GXX" != yes ; then
19166                 CXX_AR='$(CXX)'
19167                 CXX_ARFLAGS='-xar -o'
19168             fi
19169             ;;
19170         esac
19171
19172 else
19173         cf_cxx_library=no
19174         cf_cv_builtin_bool=1
19175
19176         # Just because we are not configuring against C++ right now does not
19177         # mean that a user will not want to use C++.  Some distributors disable
19178         # the C++ portion of this configuration as a shortcut (or just to avoid
19179         # compiling the demo in the c++ directory).  So we need a reasonable
19180         # default for the 'bool' type.
19181         #
19182         # Caveat: since the storage of the bool type is not standardized, it
19183         # may change.
19184
19185         if test "$NCURSES_BOOL" != auto ; then
19186                 cf_cv_type_of_bool=$NCURSES_BOOL
19187                 cf_cv_header_stdbool_h=0
19188         else
19189                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19190
19191 echo "$as_me:19191: checking for size of bool" >&5
19192 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19193 if test "${cf_cv_type_of_bool+set}" = set; then
19194   echo $ECHO_N "(cached) $ECHO_C" >&6
19195 else
19196
19197         rm -f cf_test.out
19198         if test "$cross_compiling" = yes; then
19199   cf_cv_type_of_bool=unknown
19200 else
19201   cat >conftest.$ac_ext <<_ACEOF
19202 #line 19202 "configure"
19203 #include "confdefs.h"
19204
19205 #include <stdlib.h>
19206 #include <stdio.h>
19207
19208 #if defined(__cplusplus)
19209
19210 #ifdef HAVE_GXX_BUILTIN_H
19211 #include <g++/builtin.h>
19212 #elif HAVE_GPP_BUILTIN_H
19213 #include <gpp/builtin.h>
19214 #elif HAVE_BUILTIN_H
19215 #include <builtin.h>
19216 #endif
19217
19218 #else
19219
19220 #if $cf_cv_header_stdbool_h
19221 #include <stdbool.h>
19222 #endif
19223
19224 #endif
19225
19226 int main()
19227 {
19228         FILE *fp = fopen("cf_test.out", "w");
19229         if (fp != 0) {
19230                 bool x = true;
19231                 if ((bool)(-x) >= 0)
19232                         fputs("unsigned ", fp);
19233                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19234                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19235                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19236                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19237                 fclose(fp);
19238         }
19239         ${cf_cv_main_return:-return}(0);
19240 }
19241
19242 _ACEOF
19243 rm -f conftest$ac_exeext
19244 if { (eval echo "$as_me:19244: \"$ac_link\"") >&5
19245   (eval $ac_link) 2>&5
19246   ac_status=$?
19247   echo "$as_me:19247: \$? = $ac_status" >&5
19248   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19249   { (eval echo "$as_me:19249: \"$ac_try\"") >&5
19250   (eval $ac_try) 2>&5
19251   ac_status=$?
19252   echo "$as_me:19252: \$? = $ac_status" >&5
19253   (exit $ac_status); }; }; then
19254   cf_cv_type_of_bool=`cat cf_test.out`
19255                  if test -z "$cf_cv_type_of_bool"; then
19256                    cf_cv_type_of_bool=unknown
19257                  fi
19258 else
19259   echo "$as_me: program exited with status $ac_status" >&5
19260 echo "$as_me: failed program was:" >&5
19261 cat conftest.$ac_ext >&5
19262 cf_cv_type_of_bool=unknown
19263 fi
19264 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19265 fi
19266
19267 fi
19268
19269         rm -f cf_test.out
19270 echo "$as_me:19270: result: $cf_cv_type_of_bool" >&5
19271 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19272 if test "$cf_cv_type_of_bool" = unknown ; then
19273         case .$NCURSES_BOOL in #(vi
19274         .auto|.) NCURSES_BOOL=unsigned;;
19275         esac
19276         { echo "$as_me:19276: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19277 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19278         cf_cv_type_of_bool=$NCURSES_BOOL
19279 fi
19280
19281                 else
19282                         echo "$as_me:19282: checking for fallback type of bool" >&5
19283 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19284                         case "$host_cpu" in #(vi
19285                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19286                         *)      cf_cv_type_of_bool=int  ;;
19287                         esac
19288                         echo "$as_me:19288: result: $cf_cv_type_of_bool" >&5
19289 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19290                 fi
19291         fi
19292 fi
19293
19294 # If the C compiler did not declare bool, and we did not determine that the C++
19295 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19296 # ncurses library use the same type as C++ bool.  Note that this allows one to
19297 # specify the type of bool in a configure-script option and postpone
19298 # integration with the C++ compiler provided that the types are compatible.
19299 USE_CXX_BOOL=1
19300 if test $cf_cv_cc_bool_type = 1
19301 then
19302         # oops: C has a bool.  Unlikely, but C++ could differ.
19303         USE_CXX_BOOL=0
19304 elif test $cf_cv_builtin_bool = 0
19305 then
19306         # C++ has no bool
19307         USE_CXX_BOOL=0
19308 else
19309         # this is the normal case
19310         USE_CXX_BOOL='defined(__cplusplus)'
19311 fi
19312
19313 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19314
19315         if test "$cf_with_ada" != "no" ; then
19316                 if test "$with_libtool" != "no"; then
19317                         { echo "$as_me:19317: WARNING: libtool does not support Ada - disabling feature" >&5
19318 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19319                         cf_with_ada=no
19320                 fi
19321         fi
19322
19323         if test "$cf_with_ada" != "no" ; then
19324
19325 cf_ada_make=gnatmake
19326 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19327 set dummy $cf_ada_make; ac_word=$2
19328 echo "$as_me:19328: checking for $ac_word" >&5
19329 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19330 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19331   echo $ECHO_N "(cached) $ECHO_C" >&6
19332 else
19333   if test -n "$gnat_exists"; then
19334   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19335 else
19336   ac_save_IFS=$IFS; IFS=$ac_path_separator
19337 ac_dummy="$PATH"
19338 for ac_dir in $ac_dummy; do
19339   IFS=$ac_save_IFS
19340   test -z "$ac_dir" && ac_dir=.
19341   $as_executable_p "$ac_dir/$ac_word" || continue
19342 ac_cv_prog_gnat_exists="yes"
19343 echo "$as_me:19343: found $ac_dir/$ac_word" >&5
19344 break
19345 done
19346
19347   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19348 fi
19349 fi
19350 gnat_exists=$ac_cv_prog_gnat_exists
19351 if test -n "$gnat_exists"; then
19352   echo "$as_me:19352: result: $gnat_exists" >&5
19353 echo "${ECHO_T}$gnat_exists" >&6
19354 else
19355   echo "$as_me:19355: result: no" >&5
19356 echo "${ECHO_T}no" >&6
19357 fi
19358
19359 if test "$ac_cv_prog_gnat_exists" = no; then
19360    cf_ada_make=
19361    cf_cv_prog_gnat_correct=no
19362 else
19363
19364 echo "$as_me:19364: checking for gnat version" >&5
19365 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19366 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19367         grep '[0-9].[0-9][0-9]*' |\
19368     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19369 echo "$as_me:19369: result: $cf_gnat_version" >&5
19370 echo "${ECHO_T}$cf_gnat_version" >&6
19371
19372 case $cf_gnat_version in #(vi
19373 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19374         cf_cv_prog_gnat_correct=yes
19375         ;;
19376 *)
19377         { echo "$as_me:19377: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19378 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19379         cf_cv_prog_gnat_correct=no
19380         ;;
19381 esac
19382
19383    # Extract the first word of "m4", so it can be a program name with args.
19384 set dummy m4; ac_word=$2
19385 echo "$as_me:19385: checking for $ac_word" >&5
19386 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19387 if test "${ac_cv_prog_M4_exists+set}" = set; then
19388   echo $ECHO_N "(cached) $ECHO_C" >&6
19389 else
19390   if test -n "$M4_exists"; then
19391   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19392 else
19393   ac_save_IFS=$IFS; IFS=$ac_path_separator
19394 ac_dummy="$PATH"
19395 for ac_dir in $ac_dummy; do
19396   IFS=$ac_save_IFS
19397   test -z "$ac_dir" && ac_dir=.
19398   $as_executable_p "$ac_dir/$ac_word" || continue
19399 ac_cv_prog_M4_exists="yes"
19400 echo "$as_me:19400: found $ac_dir/$ac_word" >&5
19401 break
19402 done
19403
19404   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19405 fi
19406 fi
19407 M4_exists=$ac_cv_prog_M4_exists
19408 if test -n "$M4_exists"; then
19409   echo "$as_me:19409: result: $M4_exists" >&5
19410 echo "${ECHO_T}$M4_exists" >&6
19411 else
19412   echo "$as_me:19412: result: no" >&5
19413 echo "${ECHO_T}no" >&6
19414 fi
19415
19416    if test "$ac_cv_prog_M4_exists" = no; then
19417       cf_cv_prog_gnat_correct=no
19418       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19419    fi
19420    if test "$cf_cv_prog_gnat_correct" = yes; then
19421       echo "$as_me:19421: checking if GNAT works" >&5
19422 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19423
19424 rm -rf conftest* *~conftest*
19425 cat >>conftest.ads <<CF_EOF
19426 procedure conftest;
19427 CF_EOF
19428 cat >>conftest.adb <<CF_EOF
19429 with Text_IO;
19430 with GNAT.OS_Lib;
19431 procedure conftest is
19432 begin
19433    Text_IO.Put ("Hello World");
19434    Text_IO.New_Line;
19435    GNAT.OS_Lib.OS_Exit (0);
19436 end conftest;
19437 CF_EOF
19438 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19439    if ( ./conftest 1>&5 2>&1 ) ; then
19440       cf_cv_prog_gnat_correct=yes
19441    else
19442       cf_cv_prog_gnat_correct=no
19443    fi
19444 else
19445    cf_cv_prog_gnat_correct=no
19446 fi
19447 rm -rf conftest* *~conftest*
19448
19449       echo "$as_me:19449: result: $cf_cv_prog_gnat_correct" >&5
19450 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19451    fi
19452 fi
19453
19454                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19455
19456         ADAFLAGS="$ADAFLAGS -gnatpn"
19457
19458         echo "$as_me:19458: checking optimization options for ADAFLAGS" >&5
19459 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19460         case "$CFLAGS" in
19461         *-g*)
19462
19463         ADAFLAGS="$ADAFLAGS -g"
19464
19465                 ;;
19466         esac
19467         case "$CFLAGS" in
19468         *-O*)
19469                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19470
19471         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19472
19473                 ;;
19474         esac
19475         echo "$as_me:19475: result: $ADAFLAGS" >&5
19476 echo "${ECHO_T}$ADAFLAGS" >&6
19477
19478 echo "$as_me:19478: checking if GNAT supports generics" >&5
19479 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19480 case $cf_gnat_version in #(vi
19481 3.[1-9]*|[4-9].*) #(vi
19482         cf_gnat_generics=yes
19483         ;;
19484 *)
19485         cf_gnat_generics=no
19486         ;;
19487 esac
19488 echo "$as_me:19488: result: $cf_gnat_generics" >&5
19489 echo "${ECHO_T}$cf_gnat_generics" >&6
19490
19491 if test "$cf_gnat_generics" = yes
19492 then
19493         cf_compile_generics=generics
19494         cf_generic_objects="\${GENOBJS}"
19495 else
19496         cf_compile_generics=
19497         cf_generic_objects=
19498 fi
19499
19500 echo "$as_me:19500: checking if GNAT supports SIGINT" >&5
19501 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19502 if test "${cf_cv_gnat_sigint+set}" = set; then
19503   echo $ECHO_N "(cached) $ECHO_C" >&6
19504 else
19505
19506 rm -rf conftest* *~conftest*
19507 cat >>conftest.ads <<CF_EOF
19508 with Ada.Interrupts.Names;
19509
19510 package ConfTest is
19511
19512    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19513    pragma Unreserve_All_Interrupts;
19514    pragma Warnings (On);
19515
19516    protected Process is
19517       procedure Stop;
19518       function Continue return Boolean;
19519       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19520    private
19521       Done : Boolean := False;
19522    end Process;
19523
19524 end ConfTest;
19525 CF_EOF
19526 cat >>conftest.adb <<CF_EOF
19527 package body ConfTest is
19528    protected body Process is
19529       procedure Stop is
19530       begin
19531          Done := True;
19532       end Stop;
19533       function Continue return Boolean is
19534       begin
19535          return not Done;
19536       end Continue;
19537    end Process;
19538 end ConfTest;
19539 CF_EOF
19540 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19541       cf_cv_gnat_sigint=yes
19542 else
19543    cf_cv_gnat_sigint=no
19544 fi
19545 rm -rf conftest* *~conftest*
19546
19547 fi
19548 echo "$as_me:19548: result: $cf_cv_gnat_sigint" >&5
19549 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19550
19551 if test $cf_cv_gnat_sigint = yes ; then
19552         USE_GNAT_SIGINT=""
19553 else
19554         USE_GNAT_SIGINT="#"
19555 fi
19556
19557 echo "$as_me:19557: checking if GNAT pragma Unreferenced works" >&5
19558 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19559 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19560   echo $ECHO_N "(cached) $ECHO_C" >&6
19561 else
19562
19563 rm -rf conftest* *~conftest*
19564 cat >>conftest.ads <<CF_EOF
19565 procedure conftest;
19566 CF_EOF
19567 cat >>conftest.adb <<CF_EOF
19568 with Text_IO;
19569 with GNAT.OS_Lib;
19570 procedure conftest is
19571    test : Integer;
19572    pragma Unreferenced (test);
19573 begin
19574    test := 1;
19575    Text_IO.Put ("Hello World");
19576    Text_IO.New_Line;
19577    GNAT.OS_Lib.OS_Exit (0);
19578 end conftest;
19579 CF_EOF
19580 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19581       cf_cv_pragma_unreferenced=yes
19582 else
19583    cf_cv_pragma_unreferenced=no
19584 fi
19585 rm -rf conftest* *~conftest*
19586
19587 fi
19588 echo "$as_me:19588: result: $cf_cv_pragma_unreferenced" >&5
19589 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19590
19591 # if the pragma is supported, use it (needed in the Trace code).
19592 if test $cf_cv_pragma_unreferenced = yes ; then
19593         PRAGMA_UNREF=TRUE
19594 else
19595         PRAGMA_UNREF=FALSE
19596 fi
19597
19598 cf_gnat_libraries=no
19599 cf_gnat_projects=no
19600
19601 echo "$as_me:19601: checking if GNAT supports project files" >&5
19602 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19603 case $cf_gnat_version in #(vi
19604 3.[0-9]*) #(vi
19605         ;;
19606 *)
19607         case $cf_cv_system_name in #(vi
19608         cygwin*) #(vi
19609                 ;;
19610         *)
19611                 mkdir conftest.src conftest.bin conftest.lib
19612                 cd conftest.src
19613                 rm -rf conftest* *~conftest*
19614                 cat >>library.gpr <<CF_EOF
19615 project Library is
19616   Kind := External ("LIB_KIND");
19617   for Library_Name use "ConfTest";
19618   for Object_Dir use ".";
19619   for Library_ALI_Dir use External("LIBRARY_DIR");
19620   for Library_Version use External ("SONAME");
19621   for Library_Kind use Kind;
19622   for Library_Dir use External("BUILD_DIR");
19623   Source_Dir := External ("SOURCE_DIR");
19624   for Source_Dirs use (Source_Dir);
19625   package Compiler is
19626      for Default_Switches ("Ada") use
19627        ("-g",
19628         "-O2",
19629         "-gnatafno",
19630         "-gnatVa",   -- All validity checks
19631         "-gnatwa");  -- Activate all optional errors
19632   end Compiler;
19633 end Library;
19634 CF_EOF
19635                 cat >>confpackage.ads <<CF_EOF
19636 package ConfPackage is
19637    procedure conftest;
19638 end ConfPackage;
19639 CF_EOF
19640                 cat >>confpackage.adb <<CF_EOF
19641 with Text_IO;
19642 package body ConfPackage is
19643    procedure conftest is
19644    begin
19645       Text_IO.Put ("Hello World");
19646       Text_IO.New_Line;
19647    end conftest;
19648 end ConfPackage;
19649 CF_EOF
19650                 if ( $cf_ada_make $ADAFLAGS \
19651                                 -Plibrary.gpr \
19652                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19653                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19654                                 -XSOURCE_DIR=`pwd` \
19655                                 -XSONAME=libConfTest.so.1 \
19656                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19657                         cf_gnat_projects=yes
19658                 fi
19659                 cd ..
19660                 if test -f conftest.lib/confpackage.ali
19661                 then
19662                         cf_gnat_libraries=yes
19663                 fi
19664                 rm -rf conftest* *~conftest*
19665                 ;;
19666         esac
19667         ;;
19668 esac
19669 echo "$as_me:19669: result: $cf_gnat_projects" >&5
19670 echo "${ECHO_T}$cf_gnat_projects" >&6
19671
19672 if test $cf_gnat_projects = yes
19673 then
19674         echo "$as_me:19674: checking if GNAT supports libraries" >&5
19675 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19676         echo "$as_me:19676: result: $cf_gnat_libraries" >&5
19677 echo "${ECHO_T}$cf_gnat_libraries" >&6
19678 fi
19679
19680 if test "$cf_gnat_projects" = yes
19681 then
19682         USE_OLD_MAKERULES="#"
19683         USE_GNAT_PROJECTS=""
19684 else
19685         USE_OLD_MAKERULES=""
19686         USE_GNAT_PROJECTS="#"
19687 fi
19688
19689 if test "$cf_gnat_libraries" = yes
19690 then
19691         USE_GNAT_LIBRARIES=""
19692 else
19693         USE_GNAT_LIBRARIES="#"
19694 fi
19695
19696 echo "$as_me:19696: checking for ada-compiler" >&5
19697 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19698
19699 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19700 if test "${with_ada_compiler+set}" = set; then
19701   withval="$with_ada_compiler"
19702   cf_ada_compiler=$withval
19703 else
19704   cf_ada_compiler=gnatmake
19705 fi;
19706
19707 echo "$as_me:19707: result: $cf_ada_compiler" >&5
19708 echo "${ECHO_T}$cf_ada_compiler" >&6
19709
19710                         cf_ada_package=terminal_interface
19711
19712 echo "$as_me:19712: checking for ada-include" >&5
19713 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19714
19715 # Check whether --with-ada-include or --without-ada-include was given.
19716 if test "${with_ada_include+set}" = set; then
19717   withval="$with_ada_include"
19718
19719 else
19720   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19721 fi; if test -n "$prefix/share/ada/adainclude" ; then
19722
19723 if test "x$prefix" != xNONE; then
19724   cf_path_syntax="$prefix"
19725 else
19726   cf_path_syntax="$ac_default_prefix"
19727 fi
19728
19729 case ".$withval" in #(vi
19730 .\$\(*\)*|.\'*\'*) #(vi
19731   ;;
19732 ..|./*|.\\*) #(vi
19733   ;;
19734 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19735   ;;
19736 .\${*prefix}*|.\${*dir}*) #(vi
19737   eval withval="$withval"
19738   case ".$withval" in #(vi
19739   .NONE/*)
19740     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19741     ;;
19742   esac
19743   ;; #(vi
19744 .no|.NONE/*)
19745   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19746   ;;
19747 *)
19748   { { echo "$as_me:19748: error: expected a pathname, not \"$withval\"" >&5
19749 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19750    { (exit 1); exit 1; }; }
19751   ;;
19752 esac
19753
19754 fi
19755 eval ADA_INCLUDE="$withval"
19756
19757 echo "$as_me:19757: result: $ADA_INCLUDE" >&5
19758 echo "${ECHO_T}$ADA_INCLUDE" >&6
19759
19760 echo "$as_me:19760: checking for ada-objects" >&5
19761 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19762
19763 # Check whether --with-ada-objects or --without-ada-objects was given.
19764 if test "${with_ada_objects+set}" = set; then
19765   withval="$with_ada_objects"
19766
19767 else
19768   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19769 fi; if test -n "$prefix/lib/ada/adalib" ; then
19770
19771 if test "x$prefix" != xNONE; then
19772   cf_path_syntax="$prefix"
19773 else
19774   cf_path_syntax="$ac_default_prefix"
19775 fi
19776
19777 case ".$withval" in #(vi
19778 .\$\(*\)*|.\'*\'*) #(vi
19779   ;;
19780 ..|./*|.\\*) #(vi
19781   ;;
19782 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19783   ;;
19784 .\${*prefix}*|.\${*dir}*) #(vi
19785   eval withval="$withval"
19786   case ".$withval" in #(vi
19787   .NONE/*)
19788     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19789     ;;
19790   esac
19791   ;; #(vi
19792 .no|.NONE/*)
19793   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19794   ;;
19795 *)
19796   { { echo "$as_me:19796: error: expected a pathname, not \"$withval\"" >&5
19797 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19798    { (exit 1); exit 1; }; }
19799   ;;
19800 esac
19801
19802 fi
19803 eval ADA_OBJECTS="$withval"
19804
19805 echo "$as_me:19805: result: $ADA_OBJECTS" >&5
19806 echo "${ECHO_T}$ADA_OBJECTS" >&6
19807
19808 echo "$as_me:19808: checking if an Ada95 shared-library should be built" >&5
19809 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19810
19811 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19812 if test "${with_ada_sharedlib+set}" = set; then
19813   withval="$with_ada_sharedlib"
19814   with_ada_sharedlib=$withval
19815 else
19816   with_ada_sharedlib=no
19817 fi;
19818 echo "$as_me:19818: result: $with_ada_sharedlib" >&5
19819 echo "${ECHO_T}$with_ada_sharedlib" >&6
19820
19821 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19822 MAKE_ADA_SHAREDLIB="#"
19823
19824 if test "x$with_ada_sharedlib" != xno
19825 then
19826         MAKE_ADA_SHAREDLIB=
19827         if test "x$with_ada_sharedlib" != xyes
19828         then
19829                 ADA_SHAREDLIB="$with_ada_sharedlib"
19830         fi
19831 fi
19832
19833                 fi
19834         fi
19835 else
19836         cf_with_ada=no
19837 fi
19838
19839 # do this "late" to avoid conflict with header-checks
19840 if test "x$with_widec" = xyes ; then
19841         echo "$as_me:19841: checking for wchar_t" >&5
19842 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
19843 if test "${ac_cv_type_wchar_t+set}" = set; then
19844   echo $ECHO_N "(cached) $ECHO_C" >&6
19845 else
19846   cat >conftest.$ac_ext <<_ACEOF
19847 #line 19847 "configure"
19848 #include "confdefs.h"
19849 $ac_includes_default
19850 int
19851 main ()
19852 {
19853 if ((wchar_t *) 0)
19854   return 0;
19855 if (sizeof (wchar_t))
19856   return 0;
19857   ;
19858   return 0;
19859 }
19860 _ACEOF
19861 rm -f conftest.$ac_objext
19862 if { (eval echo "$as_me:19862: \"$ac_compile\"") >&5
19863   (eval $ac_compile) 2>&5
19864   ac_status=$?
19865   echo "$as_me:19865: \$? = $ac_status" >&5
19866   (exit $ac_status); } &&
19867          { ac_try='test -s conftest.$ac_objext'
19868   { (eval echo "$as_me:19868: \"$ac_try\"") >&5
19869   (eval $ac_try) 2>&5
19870   ac_status=$?
19871   echo "$as_me:19871: \$? = $ac_status" >&5
19872   (exit $ac_status); }; }; then
19873   ac_cv_type_wchar_t=yes
19874 else
19875   echo "$as_me: failed program was:" >&5
19876 cat conftest.$ac_ext >&5
19877 ac_cv_type_wchar_t=no
19878 fi
19879 rm -f conftest.$ac_objext conftest.$ac_ext
19880 fi
19881 echo "$as_me:19881: result: $ac_cv_type_wchar_t" >&5
19882 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
19883
19884 echo "$as_me:19884: checking size of wchar_t" >&5
19885 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
19886 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
19887   echo $ECHO_N "(cached) $ECHO_C" >&6
19888 else
19889   if test "$ac_cv_type_wchar_t" = yes; then
19890   if test "$cross_compiling" = yes; then
19891   # Depending upon the size, compute the lo and hi bounds.
19892 cat >conftest.$ac_ext <<_ACEOF
19893 #line 19893 "configure"
19894 #include "confdefs.h"
19895 $ac_includes_default
19896 int
19897 main ()
19898 {
19899 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
19900   ;
19901   return 0;
19902 }
19903 _ACEOF
19904 rm -f conftest.$ac_objext
19905 if { (eval echo "$as_me:19905: \"$ac_compile\"") >&5
19906   (eval $ac_compile) 2>&5
19907   ac_status=$?
19908   echo "$as_me:19908: \$? = $ac_status" >&5
19909   (exit $ac_status); } &&
19910          { ac_try='test -s conftest.$ac_objext'
19911   { (eval echo "$as_me:19911: \"$ac_try\"") >&5
19912   (eval $ac_try) 2>&5
19913   ac_status=$?
19914   echo "$as_me:19914: \$? = $ac_status" >&5
19915   (exit $ac_status); }; }; then
19916   ac_lo=0 ac_mid=0
19917   while :; do
19918     cat >conftest.$ac_ext <<_ACEOF
19919 #line 19919 "configure"
19920 #include "confdefs.h"
19921 $ac_includes_default
19922 int
19923 main ()
19924 {
19925 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
19926   ;
19927   return 0;
19928 }
19929 _ACEOF
19930 rm -f conftest.$ac_objext
19931 if { (eval echo "$as_me:19931: \"$ac_compile\"") >&5
19932   (eval $ac_compile) 2>&5
19933   ac_status=$?
19934   echo "$as_me:19934: \$? = $ac_status" >&5
19935   (exit $ac_status); } &&
19936          { ac_try='test -s conftest.$ac_objext'
19937   { (eval echo "$as_me:19937: \"$ac_try\"") >&5
19938   (eval $ac_try) 2>&5
19939   ac_status=$?
19940   echo "$as_me:19940: \$? = $ac_status" >&5
19941   (exit $ac_status); }; }; then
19942   ac_hi=$ac_mid; break
19943 else
19944   echo "$as_me: failed program was:" >&5
19945 cat conftest.$ac_ext >&5
19946 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
19947 fi
19948 rm -f conftest.$ac_objext conftest.$ac_ext
19949   done
19950 else
19951   echo "$as_me: failed program was:" >&5
19952 cat conftest.$ac_ext >&5
19953 ac_hi=-1 ac_mid=-1
19954   while :; do
19955     cat >conftest.$ac_ext <<_ACEOF
19956 #line 19956 "configure"
19957 #include "confdefs.h"
19958 $ac_includes_default
19959 int
19960 main ()
19961 {
19962 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
19963   ;
19964   return 0;
19965 }
19966 _ACEOF
19967 rm -f conftest.$ac_objext
19968 if { (eval echo "$as_me:19968: \"$ac_compile\"") >&5
19969   (eval $ac_compile) 2>&5
19970   ac_status=$?
19971   echo "$as_me:19971: \$? = $ac_status" >&5
19972   (exit $ac_status); } &&
19973          { ac_try='test -s conftest.$ac_objext'
19974   { (eval echo "$as_me:19974: \"$ac_try\"") >&5
19975   (eval $ac_try) 2>&5
19976   ac_status=$?
19977   echo "$as_me:19977: \$? = $ac_status" >&5
19978   (exit $ac_status); }; }; then
19979   ac_lo=$ac_mid; break
19980 else
19981   echo "$as_me: failed program was:" >&5
19982 cat conftest.$ac_ext >&5
19983 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
19984 fi
19985 rm -f conftest.$ac_objext conftest.$ac_ext
19986   done
19987 fi
19988 rm -f conftest.$ac_objext conftest.$ac_ext
19989 # Binary search between lo and hi bounds.
19990 while test "x$ac_lo" != "x$ac_hi"; do
19991   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
19992   cat >conftest.$ac_ext <<_ACEOF
19993 #line 19993 "configure"
19994 #include "confdefs.h"
19995 $ac_includes_default
19996 int
19997 main ()
19998 {
19999 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20000   ;
20001   return 0;
20002 }
20003 _ACEOF
20004 rm -f conftest.$ac_objext
20005 if { (eval echo "$as_me:20005: \"$ac_compile\"") >&5
20006   (eval $ac_compile) 2>&5
20007   ac_status=$?
20008   echo "$as_me:20008: \$? = $ac_status" >&5
20009   (exit $ac_status); } &&
20010          { ac_try='test -s conftest.$ac_objext'
20011   { (eval echo "$as_me:20011: \"$ac_try\"") >&5
20012   (eval $ac_try) 2>&5
20013   ac_status=$?
20014   echo "$as_me:20014: \$? = $ac_status" >&5
20015   (exit $ac_status); }; }; then
20016   ac_hi=$ac_mid
20017 else
20018   echo "$as_me: failed program was:" >&5
20019 cat conftest.$ac_ext >&5
20020 ac_lo=`expr $ac_mid + 1`
20021 fi
20022 rm -f conftest.$ac_objext conftest.$ac_ext
20023 done
20024 ac_cv_sizeof_wchar_t=$ac_lo
20025 else
20026   if test "$cross_compiling" = yes; then
20027   { { echo "$as_me:20027: error: cannot run test program while cross compiling" >&5
20028 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20029    { (exit 1); exit 1; }; }
20030 else
20031   cat >conftest.$ac_ext <<_ACEOF
20032 #line 20032 "configure"
20033 #include "confdefs.h"
20034 $ac_includes_default
20035 int
20036 main ()
20037 {
20038 FILE *f = fopen ("conftest.val", "w");
20039 if (!f)
20040   $ac_main_return (1);
20041 fprintf (f, "%d", (sizeof (wchar_t)));
20042 fclose (f);
20043   ;
20044   return 0;
20045 }
20046 _ACEOF
20047 rm -f conftest$ac_exeext
20048 if { (eval echo "$as_me:20048: \"$ac_link\"") >&5
20049   (eval $ac_link) 2>&5
20050   ac_status=$?
20051   echo "$as_me:20051: \$? = $ac_status" >&5
20052   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20053   { (eval echo "$as_me:20053: \"$ac_try\"") >&5
20054   (eval $ac_try) 2>&5
20055   ac_status=$?
20056   echo "$as_me:20056: \$? = $ac_status" >&5
20057   (exit $ac_status); }; }; then
20058   ac_cv_sizeof_wchar_t=`cat conftest.val`
20059 else
20060   echo "$as_me: program exited with status $ac_status" >&5
20061 echo "$as_me: failed program was:" >&5
20062 cat conftest.$ac_ext >&5
20063 fi
20064 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20065 fi
20066 fi
20067 rm -f conftest.val
20068 else
20069   ac_cv_sizeof_wchar_t=0
20070 fi
20071 fi
20072 echo "$as_me:20072: result: $ac_cv_sizeof_wchar_t" >&5
20073 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20074 cat >>confdefs.h <<EOF
20075 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20076 EOF
20077
20078 fi
20079
20080 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20081 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20082 ###
20083 ### ticlib modules may be a separate library, otherwise contained in termlib.
20084 ### termlib modules may be a separate library, otherwise contained in ncurses.
20085 ###
20086 ### The of "+" or " " between the tokens controls the way the script
20087 ### chooses to split module lists into libraries.
20088 ###
20089 ### (see CF_LIB_RULES).
20090 echo "$as_me:20090: checking for library subsets" >&5
20091 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20092 LIB_SUBSETS=
20093
20094 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20095         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20096         if test "$with_ticlib" != no ; then
20097                 LIB_SUBSETS="${LIB_SUBSETS} "
20098         else
20099                 LIB_SUBSETS="${LIB_SUBSETS}+"
20100         fi
20101 fi
20102
20103 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20104 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20105
20106 if test "$with_termlib" != no ; then
20107         LIB_SUBSETS="${LIB_SUBSETS} "
20108 else
20109         LIB_SUBSETS="${LIB_SUBSETS}+"
20110 fi
20111
20112 LIB_SUBSETS="${LIB_SUBSETS}base"
20113
20114 # Most term-driver calls are to tinfo, but some like init_pair are to the
20115 # base library (so it resides in base).
20116 if test "$with_term_driver" != no ; then
20117         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20118         case $cf_cv_system_name in #(vi
20119         *mingw32*) #(vi
20120                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20121                 ;;
20122         *) #(vi
20123                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20124                 ;;
20125         esac
20126 fi
20127
20128 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20129 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20130
20131 echo "$as_me:20131: result: $LIB_SUBSETS" >&5
20132 echo "${ECHO_T}$LIB_SUBSETS" >&6
20133
20134 ### Construct the list of include-directories to be generated
20135
20136 if test "$GCC" != yes; then
20137         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20138 elif test "$includedir" != "/usr/include"; then
20139         if test "$includedir" = '${prefix}/include' ; then
20140                 if test $prefix != /usr ; then
20141                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20142                 fi
20143         else
20144                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
20145         fi
20146 fi
20147 if test "$srcdir" != "."; then
20148         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20149 fi
20150 CPPFLAGS="-I. -I../include $CPPFLAGS"
20151
20152 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20153 if test "$srcdir" != "."; then
20154         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20155 fi
20156 if test "$GCC" != yes; then
20157         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20158 elif test "$includedir" != "/usr/include"; then
20159         if test "$includedir" = '${prefix}/include' ; then
20160                 if test $prefix != /usr ; then
20161                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20162                 fi
20163         else
20164                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20165         fi
20166 fi
20167
20168 ### Build up pieces for makefile rules
20169 echo "$as_me:20169: checking default library suffix" >&5
20170 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20171
20172         case $DFT_LWR_MODEL in
20173         libtool) DFT_ARG_SUFFIX=''   ;;
20174         normal)  DFT_ARG_SUFFIX=''   ;;
20175         debug)   DFT_ARG_SUFFIX='_g' ;;
20176         profile) DFT_ARG_SUFFIX='_p' ;;
20177         shared)  DFT_ARG_SUFFIX=''   ;;
20178         esac
20179         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20180 echo "$as_me:20180: result: $DFT_ARG_SUFFIX" >&5
20181 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20182
20183 echo "$as_me:20183: checking default library-dependency suffix" >&5
20184 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20185
20186         case X$DFT_LWR_MODEL in #(vi
20187         Xlibtool) #(vi
20188                 DFT_LIB_SUFFIX='.la'
20189                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20190                 ;;
20191         Xdebug) #(vi
20192                 DFT_LIB_SUFFIX='_g.a'
20193                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20194                 ;;
20195         Xprofile) #(vi
20196                 DFT_LIB_SUFFIX='_p.a'
20197                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20198                 ;;
20199         Xshared) #(vi
20200                 case $cf_cv_system_name in
20201                 aix[5-7]*) #(vi
20202                         DFT_LIB_SUFFIX='.a'
20203                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20204                         ;;
20205                 cygwin*|mingw*) #(vi
20206                         DFT_LIB_SUFFIX='.dll'
20207                         DFT_DEP_SUFFIX='.dll.a'
20208                         ;;
20209                 darwin*) #(vi
20210                         DFT_LIB_SUFFIX='.dylib'
20211                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20212                         ;;
20213                 hpux*) #(vi
20214                         case $target in
20215                         ia64*) #(vi
20216                                 DFT_LIB_SUFFIX='.so'
20217                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20218                                 ;;
20219                         *) #(vi
20220                                 DFT_LIB_SUFFIX='.sl'
20221                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20222                                 ;;
20223                         esac
20224                         ;;
20225                 *) #(vi
20226                         DFT_LIB_SUFFIX='.so'
20227                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20228                         ;;
20229                 esac
20230                 ;;
20231         *)
20232                 DFT_LIB_SUFFIX='.a'
20233                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20234                 ;;
20235         esac
20236         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
20237         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
20238 echo "$as_me:20238: result: $DFT_DEP_SUFFIX" >&5
20239 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
20240
20241 echo "$as_me:20241: checking default object directory" >&5
20242 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
20243
20244         case $DFT_LWR_MODEL in
20245         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
20246         normal)  DFT_OBJ_SUBDIR='objects' ;;
20247         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
20248         profile) DFT_OBJ_SUBDIR='obj_p' ;;
20249         shared)
20250                 case $cf_cv_system_name in #(vi
20251                 cygwin) #(vi
20252                         DFT_OBJ_SUBDIR='objects' ;;
20253                 *)
20254                         DFT_OBJ_SUBDIR='obj_s' ;;
20255                 esac
20256         esac
20257 echo "$as_me:20257: result: $DFT_OBJ_SUBDIR" >&5
20258 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
20259
20260 if test "x$cf_with_cxx" = xyes ; then
20261 echo "$as_me:20261: checking c++ library-dependency suffix" >&5
20262 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
20263 if test "$with_libtool" != "no"; then
20264         # libtool thinks it can make c++ shared libraries (perhaps only g++)
20265         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20266 elif test "$with_shared_cxx" != "no"; then
20267         # also for g++ users...
20268         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20269 else
20270         # we normally make a static library because C/C++ library rules differ
20271
20272         case Xnormal in #(vi
20273         Xlibtool) #(vi
20274                 CXX_LIB_SUFFIX='.la'
20275                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20276                 ;;
20277         Xdebug) #(vi
20278                 CXX_LIB_SUFFIX='_g.a'
20279                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20280                 ;;
20281         Xprofile) #(vi
20282                 CXX_LIB_SUFFIX='_p.a'
20283                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20284                 ;;
20285         Xshared) #(vi
20286                 case $cf_cv_system_name in
20287                 aix[5-7]*) #(vi
20288                         CXX_LIB_SUFFIX='.a'
20289                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20290                         ;;
20291                 cygwin*|mingw*) #(vi
20292                         CXX_LIB_SUFFIX='.dll'
20293                         CXX_DEP_SUFFIX='.dll.a'
20294                         ;;
20295                 darwin*) #(vi
20296                         CXX_LIB_SUFFIX='.dylib'
20297                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20298                         ;;
20299                 hpux*) #(vi
20300                         case $target in
20301                         ia64*) #(vi
20302                                 CXX_LIB_SUFFIX='.so'
20303                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20304                                 ;;
20305                         *) #(vi
20306                                 CXX_LIB_SUFFIX='.sl'
20307                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20308                                 ;;
20309                         esac
20310                         ;;
20311                 *) #(vi
20312                         CXX_LIB_SUFFIX='.so'
20313                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20314                         ;;
20315                 esac
20316                 ;;
20317         *)
20318                 CXX_LIB_SUFFIX='.a'
20319                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20320                 ;;
20321         esac
20322         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20323         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20324
20325 fi
20326 echo "$as_me:20326: result: $CXX_LIB_SUFFIX" >&5
20327 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20328
20329 fi
20330
20331 # do not want -ldl in build except as needed for -lncurses dependency
20332 if test "x$with_dlsym" = xyes ; then
20333 if test $DFT_LWR_MODEL = shared || \
20334    test $DFT_LWR_MODEL = libtool ; then
20335
20336 # remove dl library from $LIBS
20337 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20338
20339 fi
20340 fi
20341 ### Set up low-level terminfo dependencies for makefiles.
20342
20343 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20344 # do not need libdl
20345 TICS_LIST=
20346 if test "x$with_dlsym" = xyes ; then
20347
20348 # remove dl library from $SHLIB_LIST
20349 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20350
20351 fi
20352
20353 if test "$with_ticlib" != no ; then
20354
20355         if test "x$with_ticlib" != xyes ; then
20356                 TICS_NAME=$with_ticlib
20357                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20358                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20359                 TICS_LIB_SUFFIX="${with_ticlib}"
20360         else
20361                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20362                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20363                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20364         fi
20365         TICS_LDFLAGS="-L${LIB_DIR}"
20366         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20367 else
20368         TICS_LDFLAGS="-L${LIB_DIR}"
20369         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20370 fi
20371
20372 if test "$with_termlib" != no ; then
20373
20374         if test "x$with_termlib" != xyes ; then
20375                 TINFO_NAME=$with_termlib
20376                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20377                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20378                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20379                 TINFO_LIB_SUFFIX="${with_termlib}"
20380         else
20381                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20382                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20383                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20384                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20385         fi
20386
20387         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20388         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20389         if test "$DFT_LWR_MODEL" = "libtool"; then
20390                 TEST_ARGS="${TEST_DEPS}"
20391                 TEST_ARG2="${TEST_DEP2}"
20392                 TINFO_LDFLAGS="-L${LIB_DIR}"
20393                 TINFO_LIBS="$TEST_ARGS"
20394                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20395                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20396         else
20397                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20398                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20399                 if test "x$with_term_driver" != xno ; then
20400                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20401                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20402                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20403                 else
20404                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20405                         TINFO_LIBS="$TEST_ARGS"
20406                 fi
20407                 TINFO_LDFLAGS="-L${LIB_DIR}"
20408                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20409         fi
20410 else
20411         # the next lines are needed for linking libtic over libncurses
20412         TINFO_NAME=${LIB_NAME}
20413         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20414         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20415         if test "x$with_tic_depends" = xyes ; then
20416                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20417         else
20418                 TICS_LIST="$SHLIB_LIST"
20419         fi
20420
20421         TINFO_LDFLAGS="-L${LIB_DIR}"
20422         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20423 fi
20424
20425 if test "$DFT_LWR_MODEL" = shared ; then
20426         case $cf_cv_system_name in #(vi
20427         cygwin*)
20428                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
20429                 TINFO_SUFFIX=.dll
20430                 ;;
20431         esac
20432 fi
20433
20434 if test "x$with_dlsym" = xyes ; then
20435
20436 # remove dl library from $TICS_LIST
20437 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20438
20439 fi
20440
20441 if test "$DFT_LWR_MODEL" = "libtool"; then
20442     OBJEXT=lo
20443 fi
20444
20445 # needed for Ada95
20446 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20447
20448 case $DFT_LWR_MODEL in
20449 normal|debug|profile)
20450
20451 if test "$GCC" = yes ; then
20452         case $cf_cv_system_name in #(
20453         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20454                 LDFLAGS_STATIC=
20455                 LDFLAGS_SHARED=
20456                 ;;
20457     *)  #( normally, except when broken
20458         LDFLAGS_STATIC=-static
20459         LDFLAGS_SHARED=-dynamic
20460         ;;
20461     esac
20462 else
20463         case $cf_cv_system_name in #(
20464         aix[4-7]*)      #( from ld manpage
20465                 LDFLAGS_STATIC=-bstatic
20466                 LDFLAGS_SHARED=-bdynamic
20467                 ;;
20468         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20469                 # We could also use just "archive" and "shared".
20470                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20471                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20472                 ;;
20473         irix*)          #( from ld manpage IRIX64
20474                 LDFLAGS_STATIC=-Bstatic
20475                 LDFLAGS_SHARED=-Bdynamic
20476                 ;;
20477         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20478                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20479                 LDFLAGS_STATIC=-noso
20480                 LDFLAGS_SHARED=-so_archive
20481                 ;;
20482         solaris2*)
20483                 LDFLAGS_STATIC=-Bstatic
20484                 LDFLAGS_SHARED=-Bdynamic
20485                 ;;
20486         esac
20487 fi
20488
20489 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20490 then
20491         echo "$as_me:20491: checking if linker supports switching between static/dynamic" >&5
20492 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20493
20494         rm -f libconftest.a
20495         cat >conftest.$ac_ext <<EOF
20496 #line 20496 "configure"
20497 #include <stdio.h>
20498 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20499 EOF
20500         if { (eval echo "$as_me:20500: \"$ac_compile\"") >&5
20501   (eval $ac_compile) 2>&5
20502   ac_status=$?
20503   echo "$as_me:20503: \$? = $ac_status" >&5
20504   (exit $ac_status); } ; then
20505                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20506                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20507         fi
20508         rm -f conftest.*
20509
20510         cf_save_LIBS="$LIBS"
20511
20512         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20513         cat >conftest.$ac_ext <<_ACEOF
20514 #line 20514 "configure"
20515 #include "confdefs.h"
20516
20517 #line 20517 "configure"
20518 #include <stdio.h>
20519 int cf_ldflags_static(FILE *fp);
20520
20521 int
20522 main ()
20523 {
20524
20525         return cf_ldflags_static(stdin);
20526
20527   ;
20528   return 0;
20529 }
20530 _ACEOF
20531 rm -f conftest.$ac_objext conftest$ac_exeext
20532 if { (eval echo "$as_me:20532: \"$ac_link\"") >&5
20533   (eval $ac_link) 2>&5
20534   ac_status=$?
20535   echo "$as_me:20535: \$? = $ac_status" >&5
20536   (exit $ac_status); } &&
20537          { ac_try='test -s conftest$ac_exeext'
20538   { (eval echo "$as_me:20538: \"$ac_try\"") >&5
20539   (eval $ac_try) 2>&5
20540   ac_status=$?
20541   echo "$as_me:20541: \$? = $ac_status" >&5
20542   (exit $ac_status); }; }; then
20543
20544         # some linkers simply ignore the -dynamic
20545         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20546         *static*) # (vi
20547                 cf_ldflags_static=no
20548                 ;;
20549         *)
20550                 cf_ldflags_static=yes
20551                 ;;
20552         esac
20553
20554 else
20555   echo "$as_me: failed program was:" >&5
20556 cat conftest.$ac_ext >&5
20557 cf_ldflags_static=no
20558 fi
20559 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20560
20561         rm -f libconftest.*
20562         LIBS="$cf_save_LIBS"
20563
20564         echo "$as_me:20564: result: $cf_ldflags_static" >&5
20565 echo "${ECHO_T}$cf_ldflags_static" >&6
20566
20567         if test $cf_ldflags_static != yes
20568         then
20569                 LDFLAGS_STATIC=
20570                 LDFLAGS_SHARED=
20571         fi
20572 else
20573         LDFLAGS_STATIC=
20574         LDFLAGS_SHARED=
20575 fi
20576
20577         ;;
20578 esac
20579
20580 echo "$as_me:20580: checking where we will install curses.h" >&5
20581 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20582 test "$with_overwrite" = no && \
20583 test "x$includedir" = 'x${prefix}/include' && \
20584         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20585 echo "$as_me:20585: result: $includedir" >&5
20586 echo "${ECHO_T}$includedir" >&6
20587
20588 ### Resolve a conflict between normal and wide-curses by forcing applications
20589 ### that will need libutf8 to add it to their configure script.
20590 if test "$with_overwrite" != no ; then
20591 if test "$NCURSES_LIBUTF8" = 1 ; then
20592         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20593         { echo "$as_me:20593: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20594 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20595 fi
20596 fi
20597 WITH_OVERWRITE=$with_overwrite
20598
20599 # used to separate tack out of the tree
20600 NCURSES_TREE=
20601
20602 ### predefined stuff for the test programs
20603
20604 cat >>confdefs.h <<\EOF
20605 #define HAVE_SLK_COLOR 1
20606 EOF
20607
20608 ### Construct the list of subdirectories for which we'll customize makefiles
20609 ### with the appropriate compile-rules.
20610
20611 echo "$as_me:20611: checking for src modules" >&5
20612 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20613
20614 # dependencies and linker-arguments for test-programs
20615 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20616 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20617 if test "$DFT_LWR_MODEL" = "libtool"; then
20618         TEST_ARGS="${TEST_DEPS}"
20619         TEST_ARG2="${TEST_DEP2}"
20620 else
20621         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20622         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20623 fi
20624
20625 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20626 cf_cv_src_modules=
20627 for cf_dir in $modules_to_build
20628 do
20629         if test -f $srcdir/$cf_dir/modules; then
20630
20631                 # We may/may not have tack in the distribution, though the
20632                 # makefile is.
20633                 if test $cf_dir = tack ; then
20634                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20635                                 continue
20636                         fi
20637                 fi
20638
20639                 if test -z "$cf_cv_src_modules"; then
20640                         cf_cv_src_modules=$cf_dir
20641                 else
20642                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20643                 fi
20644
20645                 # Make the ncurses_cfg.h file record the library interface files as
20646                 # well.  These are header files that are the same name as their
20647                 # directory.  Ncurses is the only library that does not follow
20648                 # that pattern.
20649                 if test $cf_dir = tack ; then
20650                         continue
20651                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20652
20653 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20654
20655                         cat >>confdefs.h <<EOF
20656 #define HAVE_${cf_have_include}_H 1
20657 EOF
20658
20659                         cat >>confdefs.h <<EOF
20660 #define HAVE_LIB${cf_have_include} 1
20661 EOF
20662
20663                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20664                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20665                         if test "$DFT_LWR_MODEL" = "libtool"; then
20666                                 TEST_ARGS="${TEST_DEPS}"
20667                                 TEST_ARG2="${TEST_DEP2}"
20668                         else
20669                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20670                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20671                         fi
20672                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20673                 fi
20674         fi
20675 done
20676 echo "$as_me:20676: result: $cf_cv_src_modules" >&5
20677 echo "${ECHO_T}$cf_cv_src_modules" >&6
20678
20679 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20680 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20681
20682 SRC_SUBDIRS=
20683 if test "x$cf_with_manpages" != xno ; then
20684         SRC_SUBDIRS="$SRC_SUBDIRS man"
20685 fi
20686 SRC_SUBDIRS="$SRC_SUBDIRS include"
20687 for cf_dir in $cf_cv_src_modules
20688 do
20689         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20690 done
20691 if test "x$cf_with_tests" != "xno" ; then
20692         SRC_SUBDIRS="$SRC_SUBDIRS test"
20693 fi
20694 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20695 if test "$cf_with_cxx_binding" != no; then
20696         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20697         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20698 fi
20699
20700 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20701 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20702
20703 ADA_SUBDIRS=
20704 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20705         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20706         ADA_SUBDIRS="gen src"
20707         if test "x$cf_with_tests" != "xno" ; then
20708                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20709         fi
20710 fi
20711
20712 SUB_MAKEFILES=
20713 for cf_dir in $SRC_SUBDIRS
20714 do
20715         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20716 done
20717
20718 if test -n "$ADA_SUBDIRS"; then
20719         for cf_dir in $ADA_SUBDIRS
20720         do
20721                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20722         done
20723
20724 fi
20725
20726 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20727    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20728    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20729 fi
20730
20731 DIRS_TO_MAKE="lib"
20732 for cf_item in $cf_list_models
20733 do
20734
20735         case $cf_item in
20736         libtool) cf_subdir='obj_lo'  ;;
20737         normal)  cf_subdir='objects' ;;
20738         debug)   cf_subdir='obj_g' ;;
20739         profile) cf_subdir='obj_p' ;;
20740         shared)
20741                 case $cf_cv_system_name in #(vi
20742                 cygwin) #(vi
20743                         cf_subdir='objects' ;;
20744                 *)
20745                         cf_subdir='obj_s' ;;
20746                 esac
20747         esac
20748
20749         for cf_item2 in $DIRS_TO_MAKE
20750         do
20751                 test $cf_item2 = $cf_subdir && break
20752         done
20753         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20754 done
20755 for cf_dir in $DIRS_TO_MAKE
20756 do
20757         test ! -d $cf_dir && mkdir $cf_dir
20758 done
20759
20760 # symbols that differ when compiling Ada95 by itself.
20761 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20762
20763 # values to use as strings
20764
20765 cat >>confdefs.h <<EOF
20766 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20767 EOF
20768
20769 cat >>confdefs.h <<EOF
20770 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20771 EOF
20772
20773 ### Now that we're done running tests, add the compiler-warnings, if any
20774
20775 cf_fix_cppflags=no
20776 cf_new_cflags=
20777 cf_new_cppflags=
20778 cf_new_extra_cppflags=
20779
20780 for cf_add_cflags in $EXTRA_CFLAGS
20781 do
20782 case $cf_fix_cppflags in
20783 no)
20784         case $cf_add_cflags in #(vi
20785         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20786                 case $cf_add_cflags in
20787                 -D*)
20788                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20789
20790                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20791                                 && test -z "${cf_tst_cflags}" \
20792                                 && cf_fix_cppflags=yes
20793
20794                         if test $cf_fix_cppflags = yes ; then
20795                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20796                                 continue
20797                         elif test "${cf_tst_cflags}" = "\"'" ; then
20798                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20799                                 continue
20800                         fi
20801                         ;;
20802                 esac
20803                 case "$CPPFLAGS" in
20804                 *$cf_add_cflags) #(vi
20805                         ;;
20806                 *) #(vi
20807                         case $cf_add_cflags in #(vi
20808                         -D*)
20809                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20810
20811 CPPFLAGS=`echo "$CPPFLAGS" | \
20812         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20813                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20814
20815                                 ;;
20816                         esac
20817                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20818                         ;;
20819                 esac
20820                 ;;
20821         *)
20822                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20823                 ;;
20824         esac
20825         ;;
20826 yes)
20827         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20828
20829         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20830
20831         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20832                 && test -z "${cf_tst_cflags}" \
20833                 && cf_fix_cppflags=no
20834         ;;
20835 esac
20836 done
20837
20838 if test -n "$cf_new_cflags" ; then
20839
20840         CFLAGS="$CFLAGS $cf_new_cflags"
20841 fi
20842
20843 if test -n "$cf_new_cppflags" ; then
20844
20845         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20846 fi
20847
20848 if test -n "$cf_new_extra_cppflags" ; then
20849
20850         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20851 fi
20852
20853 ### Define substitutions for header files to avoid name-pollution
20854
20855 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20856         HAVE_TCGETATTR=1
20857 else
20858         HAVE_TCGETATTR=0
20859 fi
20860
20861 if test "x$ac_cv_header_termio_h" = xyes ; then
20862         HAVE_TERMIO_H=1
20863 else
20864         HAVE_TERMIO_H=0
20865 fi
20866
20867 if test "x$ac_cv_header_termios_h" = xyes ; then
20868         HAVE_TERMIOS_H=1
20869 else
20870         HAVE_TERMIOS_H=0
20871 fi
20872
20873 ################################################################################
20874 test "x$use_database" = xyes && \
20875 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20876
20877 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20878 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20879
20880 if test "x$enable_pc_files" = xyes ; then \
20881 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20882 MAKE_PC_FILES=
20883 else
20884 MAKE_PC_FILES="#"
20885 fi
20886
20887 # Extract the first word of "tic", so it can be a program name with args.
20888 set dummy tic; ac_word=$2
20889 echo "$as_me:20889: checking for $ac_word" >&5
20890 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20891 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20892   echo $ECHO_N "(cached) $ECHO_C" >&6
20893 else
20894   case $TIC_PATH in
20895   [\\/]* | ?:[\\/]*)
20896   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20897   ;;
20898   *)
20899   ac_save_IFS=$IFS; IFS=$ac_path_separator
20900 ac_dummy="$PATH:/usr/local/ncurses/bin"
20901 for ac_dir in $ac_dummy; do
20902   IFS=$ac_save_IFS
20903   test -z "$ac_dir" && ac_dir=.
20904   if $as_executable_p "$ac_dir/$ac_word"; then
20905    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20906    echo "$as_me:20906: found $ac_dir/$ac_word" >&5
20907    break
20908 fi
20909 done
20910
20911   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20912   ;;
20913 esac
20914 fi
20915 TIC_PATH=$ac_cv_path_TIC_PATH
20916
20917 if test -n "$TIC_PATH"; then
20918   echo "$as_me:20918: result: $TIC_PATH" >&5
20919 echo "${ECHO_T}$TIC_PATH" >&6
20920 else
20921   echo "$as_me:20921: result: no" >&5
20922 echo "${ECHO_T}no" >&6
20923 fi
20924
20925 if test -n "$FALLBACK_LIST"
20926 then
20927         if test "$TIC_PATH" = unknown
20928         then
20929                 { echo "$as_me:20929: WARNING: no tic program found for fallbacks" >&5
20930 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20931         fi
20932 fi
20933
20934 if test "x$cf_with_tests" != xno ; then
20935         MAKE_TESTS=
20936 else
20937         MAKE_TESTS="#"
20938 fi
20939
20940 ADAHTML_DIR=../../doc/html/ada
20941
20942 # these could be configurable, but are not currently
20943 PANEL_NAME=panel
20944 MENU_NAME=menu
20945 FORM_NAME=form
20946 CXX_NAME=ncurses++
20947
20948 SUB_SCRIPTS=
20949
20950 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"
20951 ac_config_commands="$ac_config_commands default"
20952 cat >confcache <<\_ACEOF
20953 # This file is a shell script that caches the results of configure
20954 # tests run on this system so they can be shared between configure
20955 # scripts and configure runs, see configure's option --config-cache.
20956 # It is not useful on other systems.  If it contains results you don't
20957 # want to keep, you may remove or edit it.
20958 #
20959 # config.status only pays attention to the cache file if you give it
20960 # the --recheck option to rerun configure.
20961 #
20962 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20963 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20964 # following values.
20965
20966 _ACEOF
20967
20968 # The following way of writing the cache mishandles newlines in values,
20969 # but we know of no workaround that is simple, portable, and efficient.
20970 # So, don't put newlines in cache variables' values.
20971 # Ultrix sh set writes to stderr and can't be redirected directly,
20972 # and sets the high bit in the cache file unless we assign to the vars.
20973 {
20974   (set) 2>&1 |
20975     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20976     *ac_space=\ *)
20977       # `set' does not quote correctly, so add quotes (double-quote
20978       # substitution turns \\\\ into \\, and sed turns \\ into \).
20979       sed -n \
20980         "s/'/'\\\\''/g;
20981           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20982       ;;
20983     *)
20984       # `set' quotes correctly as required by POSIX, so do not add quotes.
20985       sed -n \
20986         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20987       ;;
20988     esac;
20989 } |
20990   sed '
20991      t clear
20992      : clear
20993      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20994      t end
20995      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20996      : end' >>confcache
20997 if cmp -s $cache_file confcache; then :; else
20998   if test -w $cache_file; then
20999     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21000     cat confcache >$cache_file
21001   else
21002     echo "not updating unwritable cache $cache_file"
21003   fi
21004 fi
21005 rm -f confcache
21006
21007 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21008 # Let make expand exec_prefix.
21009 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21010
21011 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21012 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21013 # trailing colons and then remove the whole line if VPATH becomes empty
21014 # (actually we leave an empty line to preserve line numbers).
21015 if test "x$srcdir" = x.; then
21016   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21017 s/:*\$(srcdir):*/:/;
21018 s/:*\${srcdir}:*/:/;
21019 s/:*@srcdir@:*/:/;
21020 s/^\([^=]*=[    ]*\):*/\1/;
21021 s/:*$//;
21022 s/^[^=]*=[      ]*$//;
21023 }'
21024 fi
21025
21026 DEFS=-DHAVE_CONFIG_H
21027
21028 : ${CONFIG_STATUS=./config.status}
21029 ac_clean_files_save=$ac_clean_files
21030 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21031 { echo "$as_me:21031: creating $CONFIG_STATUS" >&5
21032 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21033 cat >$CONFIG_STATUS <<_ACEOF
21034 #! $SHELL
21035 # Generated automatically by configure.
21036 # Run this file to recreate the current configuration.
21037 # Compiler output produced by configure, useful for debugging
21038 # configure, is in config.log if it exists.
21039
21040 debug=false
21041 SHELL=\${CONFIG_SHELL-$SHELL}
21042 ac_cs_invocation="\$0 \$@"
21043
21044 _ACEOF
21045
21046 cat >>$CONFIG_STATUS <<\_ACEOF
21047 # Be Bourne compatible
21048 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21049   emulate sh
21050   NULLCMD=:
21051 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21052   set -o posix
21053 fi
21054
21055 # Name of the executable.
21056 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21057
21058 if expr a : '\(a\)' >/dev/null 2>&1; then
21059   as_expr=expr
21060 else
21061   as_expr=false
21062 fi
21063
21064 rm -f conf$$ conf$$.exe conf$$.file
21065 echo >conf$$.file
21066 if ln -s conf$$.file conf$$ 2>/dev/null; then
21067   # We could just check for DJGPP; but this test a) works b) is more generic
21068   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21069   if test -f conf$$.exe; then
21070     # Don't use ln at all; we don't have any links
21071     as_ln_s='cp -p'
21072   else
21073     as_ln_s='ln -s'
21074   fi
21075 elif ln conf$$.file conf$$ 2>/dev/null; then
21076   as_ln_s=ln
21077 else
21078   as_ln_s='cp -p'
21079 fi
21080 rm -f conf$$ conf$$.exe conf$$.file
21081
21082 as_executable_p="test -f"
21083
21084 # Support unset when possible.
21085 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21086   as_unset=unset
21087 else
21088   as_unset=false
21089 fi
21090
21091 # NLS nuisances.
21092 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21093 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21094 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21095 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21096 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21097 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21098 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21099 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21100
21101 # IFS
21102 # We need space, tab and new line, in precisely that order.
21103 as_nl='
21104 '
21105 IFS="   $as_nl"
21106
21107 # CDPATH.
21108 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21109
21110 exec 6>&1
21111
21112 _ACEOF
21113
21114 # Files that config.status was made for.
21115 if test -n "$ac_config_files"; then
21116   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21117 fi
21118
21119 if test -n "$ac_config_headers"; then
21120   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21121 fi
21122
21123 if test -n "$ac_config_links"; then
21124   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21125 fi
21126
21127 if test -n "$ac_config_commands"; then
21128   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21129 fi
21130
21131 cat >>$CONFIG_STATUS <<\EOF
21132
21133 ac_cs_usage="\
21134 \`$as_me' instantiates files from templates according to the
21135 current configuration.
21136
21137 Usage: $0 [OPTIONS] [FILE]...
21138
21139   -h, --help       print this help, then exit
21140   -V, --version    print version number, then exit
21141   -d, --debug      don't remove temporary files
21142       --recheck    update $as_me by reconfiguring in the same conditions
21143   --file=FILE[:TEMPLATE]
21144                    instantiate the configuration file FILE
21145   --header=FILE[:TEMPLATE]
21146                    instantiate the configuration header FILE
21147
21148 Configuration files:
21149 $config_files
21150
21151 Configuration headers:
21152 $config_headers
21153
21154 Configuration commands:
21155 $config_commands
21156
21157 Report bugs to <dickey@invisible-island.net>."
21158 EOF
21159
21160 cat >>$CONFIG_STATUS <<EOF
21161 ac_cs_version="\\
21162 config.status
21163 configured by $0, generated by GNU Autoconf 2.52.20121002,
21164   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21165
21166 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21167 Free Software Foundation, Inc.
21168 This config.status script is free software; the Free Software Foundation
21169 gives unlimited permission to copy, distribute and modify it."
21170 srcdir=$srcdir
21171 INSTALL="$INSTALL"
21172 EOF
21173
21174 cat >>$CONFIG_STATUS <<\EOF
21175 # If no file are specified by the user, then we need to provide default
21176 # value.  By we need to know if files were specified by the user.
21177 ac_need_defaults=:
21178 while test $# != 0
21179 do
21180   case $1 in
21181   --*=*)
21182     ac_option=`expr "x$1" : 'x\([^=]*\)='`
21183     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21184     shift
21185     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21186     shift
21187     ;;
21188   -*);;
21189   *) # This is not an option, so the user has probably given explicit
21190      # arguments.
21191      ac_need_defaults=false;;
21192   esac
21193
21194   case $1 in
21195   # Handling of the options.
21196 EOF
21197 cat >>$CONFIG_STATUS <<EOF
21198   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21199     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21200     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21201 EOF
21202 cat >>$CONFIG_STATUS <<\EOF
21203   --version | --vers* | -V )
21204     echo "$ac_cs_version"; exit 0 ;;
21205   --he | --h)
21206     # Conflict between --help and --header
21207     { { echo "$as_me:21207: error: ambiguous option: $1
21208 Try \`$0 --help' for more information." >&5
21209 echo "$as_me: error: ambiguous option: $1
21210 Try \`$0 --help' for more information." >&2;}
21211    { (exit 1); exit 1; }; };;
21212   --help | --hel | -h )
21213     echo "$ac_cs_usage"; exit 0 ;;
21214   --debug | --d* | -d )
21215     debug=: ;;
21216   --file | --fil | --fi | --f )
21217     shift
21218     CONFIG_FILES="$CONFIG_FILES $1"
21219     ac_need_defaults=false;;
21220   --header | --heade | --head | --hea )
21221     shift
21222     CONFIG_HEADERS="$CONFIG_HEADERS $1"
21223     ac_need_defaults=false;;
21224
21225   # This is an error.
21226   -*) { { echo "$as_me:21226: error: unrecognized option: $1
21227 Try \`$0 --help' for more information." >&5
21228 echo "$as_me: error: unrecognized option: $1
21229 Try \`$0 --help' for more information." >&2;}
21230    { (exit 1); exit 1; }; } ;;
21231
21232   *) ac_config_targets="$ac_config_targets $1" ;;
21233
21234   esac
21235   shift
21236 done
21237
21238 exec 5>>config.log
21239 cat >&5 << _ACEOF
21240
21241 ## ----------------------- ##
21242 ## Running config.status.  ##
21243 ## ----------------------- ##
21244
21245 This file was extended by $as_me 2.52.20121002, executed with
21246   CONFIG_FILES    = $CONFIG_FILES
21247   CONFIG_HEADERS  = $CONFIG_HEADERS
21248   CONFIG_LINKS    = $CONFIG_LINKS
21249   CONFIG_COMMANDS = $CONFIG_COMMANDS
21250   > $ac_cs_invocation
21251 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21252
21253 _ACEOF
21254 EOF
21255
21256 cat >>$CONFIG_STATUS <<EOF
21257 #
21258 # INIT-COMMANDS section.
21259 #
21260
21261 ### Special initialization commands, used to pass information from the
21262 ### configuration-run into config.status
21263
21264 AWK="$AWK"
21265 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
21266 DFT_LWR_MODEL="$DFT_LWR_MODEL"
21267 ECHO_LD="$ECHO_LD"
21268 LDCONFIG="$LDCONFIG"
21269 LIBTOOL_VERSION="$LIBTOOL_VERSION"
21270 LIB_NAME="$LIB_NAME"
21271 LIB_PREFIX="$LIB_PREFIX"
21272 LIB_SUBSETS="$LIB_SUBSETS"
21273 LIB_SUFFIX="$LIB_SUFFIX"
21274 LIB_TRACING="$LIB_TRACING"
21275 LN_S="$LN_S"
21276 MAKE_TERMINFO="$MAKE_TERMINFO"
21277 NCURSES_MAJOR="$NCURSES_MAJOR"
21278 NCURSES_MINOR="$NCURSES_MINOR"
21279 NCURSES_OSPEED="$NCURSES_OSPEED"
21280 NCURSES_PATCH="$NCURSES_PATCH"
21281 SRC_SUBDIRS="$SRC_SUBDIRS"
21282 TERMINFO="$TERMINFO"
21283 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
21284 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
21285 TICS_NAME="$TICS_NAME"
21286 TIC_PATH="$TIC_PATH"
21287 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
21288 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
21289 TINFO_NAME="$TINFO_NAME"
21290 TINFO_SUFFIX="$TINFO_SUFFIX"
21291 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
21292 WITH_CURSES_H="$with_curses_h"
21293 WITH_ECHO="${enable_echo:=yes}"
21294 WITH_OVERWRITE="$with_overwrite"
21295 cf_LIST_MODELS="$cf_list_models"
21296 cf_cv_abi_version="$cf_cv_abi_version"
21297 cf_cv_do_relink="$cf_cv_do_relink"
21298 cf_cv_do_symlinks="$cf_cv_do_symlinks"
21299 cf_cv_enable_lp64="$cf_cv_enable_lp64"
21300 cf_cv_enable_opaque="$cf_cv_enable_opaque"
21301 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
21302 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
21303 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
21304 cf_cv_rel_version="$cf_cv_rel_version"
21305 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
21306 cf_cv_shared_soname='$cf_cv_shared_soname'
21307 cf_cv_shlib_version="$cf_cv_shlib_version"
21308 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
21309 cf_cv_system_name="$cf_cv_system_name"
21310 cf_cv_term_driver="$with_term_driver"
21311 cf_with_ada="$cf_with_ada"
21312 cf_with_cxx_binding="$cf_with_cxx_binding"
21313 cf_with_manpages="$cf_with_manpages"
21314 cf_with_tests="$cf_with_tests"
21315 with_shared_cxx="$with_shared_cxx"
21316 host="$host"
21317 target="$target"
21318
21319 EOF
21320
21321 cat >>$CONFIG_STATUS <<\EOF
21322 for ac_config_target in $ac_config_targets
21323 do
21324   case "$ac_config_target" in
21325   # Handling of arguments.
21326   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
21327   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
21328   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
21329   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
21330   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
21331   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
21332   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
21333   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21334   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21335   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21336   *) { { echo "$as_me:21336: error: invalid argument: $ac_config_target" >&5
21337 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21338    { (exit 1); exit 1; }; };;
21339   esac
21340 done
21341
21342 # If the user did not use the arguments to specify the items to instantiate,
21343 # then the envvar interface is used.  Set only those that are not.
21344 # We use the long form for the default assignment because of an extremely
21345 # bizarre bug on SunOS 4.1.3.
21346 if $ac_need_defaults; then
21347   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21348   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21349   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21350 fi
21351
21352 # Create a temporary directory, and hook for its removal unless debugging.
21353 $debug ||
21354 {
21355   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21356   trap '{ (exit 1); exit 1; }' 1 2 13 15
21357 }
21358
21359 # Create a (secure) tmp directory for tmp files.
21360 : ${TMPDIR=/tmp}
21361 {
21362   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21363   test -n "$tmp" && test -d "$tmp"
21364 }  ||
21365 {
21366   tmp=$TMPDIR/cs$$-$RANDOM
21367   (umask 077 && mkdir $tmp)
21368 } ||
21369 {
21370    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21371    { (exit 1); exit 1; }
21372 }
21373
21374 EOF
21375
21376 cat >>$CONFIG_STATUS <<EOF
21377
21378 #
21379 # CONFIG_FILES section.
21380 #
21381
21382 # No need to generate the scripts if there are no CONFIG_FILES.
21383 # This happens for instance when ./config.status config.h
21384 if test -n "\$CONFIG_FILES"; then
21385   # Protect against being on the right side of a sed subst in config.status.
21386   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21387    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21388 s,@SHELL@,$SHELL,;t t
21389 s,@exec_prefix@,$exec_prefix,;t t
21390 s,@prefix@,$prefix,;t t
21391 s,@program_transform_name@,$program_transform_name,;t t
21392 s,@bindir@,$bindir,;t t
21393 s,@sbindir@,$sbindir,;t t
21394 s,@libexecdir@,$libexecdir,;t t
21395 s,@datarootdir@,$datarootdir,;t t
21396 s,@datadir@,$datadir,;t t
21397 s,@sysconfdir@,$sysconfdir,;t t
21398 s,@sharedstatedir@,$sharedstatedir,;t t
21399 s,@localstatedir@,$localstatedir,;t t
21400 s,@libdir@,$libdir,;t t
21401 s,@includedir@,$includedir,;t t
21402 s,@oldincludedir@,$oldincludedir,;t t
21403 s,@infodir@,$infodir,;t t
21404 s,@mandir@,$mandir,;t t
21405 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21406 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21407 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21408 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21409 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21410 s,@build_alias@,$build_alias,;t t
21411 s,@host_alias@,$host_alias,;t t
21412 s,@target_alias@,$target_alias,;t t
21413 s,@ECHO_C@,$ECHO_C,;t t
21414 s,@ECHO_N@,$ECHO_N,;t t
21415 s,@ECHO_T@,$ECHO_T,;t t
21416 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21417 s,@DEFS@,$DEFS,;t t
21418 s,@LIBS@,$LIBS,;t t
21419 s,@top_builddir@,$top_builddir,;t t
21420 s,@EGREP@,$EGREP,;t t
21421 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21422 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21423 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21424 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21425 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21426 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21427 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21428 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21429 s,@build@,$build,;t t
21430 s,@build_cpu@,$build_cpu,;t t
21431 s,@build_vendor@,$build_vendor,;t t
21432 s,@build_os@,$build_os,;t t
21433 s,@host@,$host,;t t
21434 s,@host_cpu@,$host_cpu,;t t
21435 s,@host_vendor@,$host_vendor,;t t
21436 s,@host_os@,$host_os,;t t
21437 s,@target@,$target,;t t
21438 s,@target_cpu@,$target_cpu,;t t
21439 s,@target_vendor@,$target_vendor,;t t
21440 s,@target_os@,$target_os,;t t
21441 s,@CC@,$CC,;t t
21442 s,@CFLAGS@,$CFLAGS,;t t
21443 s,@LDFLAGS@,$LDFLAGS,;t t
21444 s,@CPPFLAGS@,$CPPFLAGS,;t t
21445 s,@ac_ct_CC@,$ac_ct_CC,;t t
21446 s,@EXEEXT@,$EXEEXT,;t t
21447 s,@OBJEXT@,$OBJEXT,;t t
21448 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21449 s,@CPP@,$CPP,;t t
21450 s,@LDCONFIG@,$LDCONFIG,;t t
21451 s,@CXX@,$CXX,;t t
21452 s,@CXXFLAGS@,$CXXFLAGS,;t t
21453 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21454 s,@AWK@,$AWK,;t t
21455 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21456 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21457 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21458 s,@LINT@,$LINT,;t t
21459 s,@LINT_OPTS@,$LINT_OPTS,;t t
21460 s,@LN_S@,$LN_S,;t t
21461 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21462 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21463 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21464 s,@SET_MAKE@,$SET_MAKE,;t t
21465 s,@CTAGS@,$CTAGS,;t t
21466 s,@ETAGS@,$ETAGS,;t t
21467 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21468 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21469 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21470 s,@RANLIB@,$RANLIB,;t t
21471 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21472 s,@LD@,$LD,;t t
21473 s,@ac_ct_LD@,$ac_ct_LD,;t t
21474 s,@AR@,$AR,;t t
21475 s,@ac_ct_AR@,$ac_ct_AR,;t t
21476 s,@NM@,$NM,;t t
21477 s,@ac_ct_NM@,$ac_ct_NM,;t t
21478 s,@ARFLAGS@,$ARFLAGS,;t t
21479 s,@DESTDIR@,$DESTDIR,;t t
21480 s,@BUILD_CC@,$BUILD_CC,;t t
21481 s,@BUILD_CPP@,$BUILD_CPP,;t t
21482 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21483 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21484 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21485 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21486 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21487 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21488 s,@cf_list_models@,$cf_list_models,;t t
21489 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21490 s,@LIBTOOL@,$LIBTOOL,;t t
21491 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
21492 s,@LT_UNDEF@,$LT_UNDEF,;t t
21493 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21494 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21495 s,@LIB_CREATE@,$LIB_CREATE,;t t
21496 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21497 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21498 s,@LIB_PREP@,$LIB_PREP,;t t
21499 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21500 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21501 s,@LIB_LINK@,$LIB_LINK,;t t
21502 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21503 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21504 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21505 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21506 s,@TICS_NAME@,$TICS_NAME,;t t
21507 s,@TINFO_NAME@,$TINFO_NAME,;t t
21508 s,@LIB_NAME@,$LIB_NAME,;t t
21509 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21510 s,@CC_G_OPT@,$CC_G_OPT,;t t
21511 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21512 s,@LD_MODEL@,$LD_MODEL,;t t
21513 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21514 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21515 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21516 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21517 s,@LINK_PROGS@,$LINK_PROGS,;t t
21518 s,@LINK_TESTS@,$LINK_TESTS,;t t
21519 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21520 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21521 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21522 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21523 s,@RPATH_LIST@,$RPATH_LIST,;t t
21524 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21525 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21526 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
21527 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21528 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21529 s,@XTERM_KBS@,$XTERM_KBS,;t t
21530 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21531 s,@TERMINFO@,$TERMINFO,;t t
21532 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21533 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21534 s,@TERMPATH@,$TERMPATH,;t t
21535 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
21536 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21537 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21538 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21539 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21540 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21541 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21542 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21543 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21544 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21545 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21546 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21547 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21548 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21549 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21550 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21551 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21552 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21553 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21554 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21555 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21556 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21557 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21558 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21559 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21560 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21561 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21562 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21563 s,@PTHREAD@,$PTHREAD,;t t
21564 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21565 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21566 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21567 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21568 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21569 s,@ECHO_LT@,$ECHO_LT,;t t
21570 s,@ECHO_LD@,$ECHO_LD,;t t
21571 s,@RULE_CC@,$RULE_CC,;t t
21572 s,@SHOW_CC@,$SHOW_CC,;t t
21573 s,@ECHO_CC@,$ECHO_CC,;t t
21574 s,@ECHO_LINK@,$ECHO_LINK,;t t
21575 s,@ADAFLAGS@,$ADAFLAGS,;t t
21576 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21577 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21578 s,@ADA_TRACE@,$ADA_TRACE,;t t
21579 s,@MATH_LIB@,$MATH_LIB,;t t
21580 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21581 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21582 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21583 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21584 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21585 s,@TEST_LIBS@,$TEST_LIBS,;t t
21586 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21587 s,@CXXCPP@,$CXXCPP,;t t
21588 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21589 s,@CXX_AR@,$CXX_AR,;t t
21590 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21591 s,@CXXLIBS@,$CXXLIBS,;t t
21592 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21593 s,@gnat_exists@,$gnat_exists,;t t
21594 s,@M4_exists@,$M4_exists,;t t
21595 s,@cf_ada_make@,$cf_ada_make,;t t
21596 s,@cf_compile_generics@,$cf_compile_generics,;t t
21597 s,@cf_generic_objects@,$cf_generic_objects,;t t
21598 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21599 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21600 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21601 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21602 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21603 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21604 s,@cf_ada_package@,$cf_ada_package,;t t
21605 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21606 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21607 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21608 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21609 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21610 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21611 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21612 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21613 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21614 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21615 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21616 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21617 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21618 s,@TICS_LIBS@,$TICS_LIBS,;t t
21619 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21620 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21621 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21622 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21623 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21624 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21625 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21626 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21627 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21628 s,@TICS_LIST@,$TICS_LIST,;t t
21629 s,@TINFO_LIST@,$TINFO_LIST,;t t
21630 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21631 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21632 s,@TEST_ARGS@,$TEST_ARGS,;t t
21633 s,@TEST_DEPS@,$TEST_DEPS,;t t
21634 s,@TEST_ARG2@,$TEST_ARG2,;t t
21635 s,@TEST_DEP2@,$TEST_DEP2,;t t
21636 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21637 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21638 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21639 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21640 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21641 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21642 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21643 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21644 s,@cross_compiling@,$cross_compiling,;t t
21645 s,@TIC_PATH@,$TIC_PATH,;t t
21646 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21647 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21648 s,@PANEL_NAME@,$PANEL_NAME,;t t
21649 s,@MENU_NAME@,$MENU_NAME,;t t
21650 s,@FORM_NAME@,$FORM_NAME,;t t
21651 s,@CXX_NAME@,$CXX_NAME,;t t
21652 CEOF
21653
21654 EOF
21655
21656   cat >>$CONFIG_STATUS <<\EOF
21657   # Split the substitutions into bite-sized pieces for seds with
21658   # small command number limits, like on Digital OSF/1 and HP-UX.
21659   ac_max_sed_lines=48
21660   ac_sed_frag=1 # Number of current file.
21661   ac_beg=1 # First line for current file.
21662   ac_end=$ac_max_sed_lines # Line after last line for current file.
21663   ac_more_lines=:
21664   ac_sed_cmds=
21665   while $ac_more_lines; do
21666     if test $ac_beg -gt 1; then
21667       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21668     else
21669       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21670     fi
21671     if test ! -s $tmp/subs.frag; then
21672       ac_more_lines=false
21673     else
21674       # The purpose of the label and of the branching condition is to
21675       # speed up the sed processing (if there are no `@' at all, there
21676       # is no need to browse any of the substitutions).
21677       # These are the two extra sed commands mentioned above.
21678       (echo ':t
21679   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21680       if test -z "$ac_sed_cmds"; then
21681         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21682       else
21683         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21684       fi
21685       ac_sed_frag=`expr $ac_sed_frag + 1`
21686       ac_beg=$ac_end
21687       ac_end=`expr $ac_end + $ac_max_sed_lines`
21688     fi
21689   done
21690   if test -z "$ac_sed_cmds"; then
21691     ac_sed_cmds=cat
21692   fi
21693 fi # test -n "$CONFIG_FILES"
21694
21695 EOF
21696 cat >>$CONFIG_STATUS <<\EOF
21697 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21698   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21699   case $ac_file in
21700   - | *:- | *:-:* ) # input from stdin
21701         cat >$tmp/stdin
21702         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21703         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21704   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21705         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21706   * )   ac_file_in=$ac_file.in ;;
21707   esac
21708
21709   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21710   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21711          X"$ac_file" : 'X\(//\)[^/]' \| \
21712          X"$ac_file" : 'X\(//\)$' \| \
21713          X"$ac_file" : 'X\(/\)' \| \
21714          .     : '\(.\)' 2>/dev/null ||
21715 echo X"$ac_file" |
21716     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21717           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21718           /^X\(\/\/\)$/{ s//\1/; q; }
21719           /^X\(\/\).*/{ s//\1/; q; }
21720           s/.*/./; q'`
21721   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21722     { case "$ac_dir" in
21723   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21724   *)                      as_incr_dir=.;;
21725 esac
21726 as_dummy="$ac_dir"
21727 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21728   case $as_mkdir_dir in
21729     # Skip DOS drivespec
21730     ?:) as_incr_dir=$as_mkdir_dir ;;
21731     *)
21732       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21733       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21734     ;;
21735   esac
21736 done; }
21737
21738     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21739     # A "../" for each directory in $ac_dir_suffix.
21740     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21741   else
21742     ac_dir_suffix= ac_dots=
21743   fi
21744
21745   case $srcdir in
21746   .)  ac_srcdir=.
21747       if test -z "$ac_dots"; then
21748          ac_top_srcdir=.
21749       else
21750          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21751       fi ;;
21752   [\\/]* | ?:[\\/]* )
21753       ac_srcdir=$srcdir$ac_dir_suffix;
21754       ac_top_srcdir=$srcdir ;;
21755   *) # Relative path.
21756     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21757     ac_top_srcdir=$ac_dots$srcdir ;;
21758   esac
21759
21760   case $INSTALL in
21761   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21762   *) ac_INSTALL=$ac_dots$INSTALL ;;
21763   esac
21764
21765   if test x"$ac_file" != x-; then
21766     { echo "$as_me:21766: creating $ac_file" >&5
21767 echo "$as_me: creating $ac_file" >&6;}
21768     rm -f "$ac_file"
21769   fi
21770   # Let's still pretend it is `configure' which instantiates (i.e., don't
21771   # use $as_me), people would be surprised to read:
21772   #    /* config.h.  Generated automatically by config.status.  */
21773   configure_input="Generated automatically from `echo $ac_file_in |
21774                                                  sed 's,.*/,,'` by configure."
21775
21776   # First look for the input files in the build tree, otherwise in the
21777   # src tree.
21778   ac_file_inputs=`IFS=:
21779     for f in $ac_file_in; do
21780       case $f in
21781       -) echo $tmp/stdin ;;
21782       [\\/$]*)
21783          # Absolute (can't be DOS-style, as IFS=:)
21784          test -f "$f" || { { echo "$as_me:21784: error: cannot find input file: $f" >&5
21785 echo "$as_me: error: cannot find input file: $f" >&2;}
21786    { (exit 1); exit 1; }; }
21787          echo $f;;
21788       *) # Relative
21789          if test -f "$f"; then
21790            # Build tree
21791            echo $f
21792          elif test -f "$srcdir/$f"; then
21793            # Source tree
21794            echo $srcdir/$f
21795          else
21796            # /dev/null tree
21797            { { echo "$as_me:21797: error: cannot find input file: $f" >&5
21798 echo "$as_me: error: cannot find input file: $f" >&2;}
21799    { (exit 1); exit 1; }; }
21800          fi;;
21801       esac
21802     done` || { (exit 1); exit 1; }
21803 EOF
21804 cat >>$CONFIG_STATUS <<\EOF
21805   ac_warn_datarootdir=no
21806   if test x"$ac_file" != x-; then
21807     for ac_item in $ac_file_inputs
21808     do
21809       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21810       if test -n "$ac_seen"; then
21811         ac_used=`grep '@datarootdir@' $ac_item`
21812         if test -z "$ac_used"; then
21813           { echo "$as_me:21813: WARNING: datarootdir was used implicitly but not set:
21814 $ac_seen" >&5
21815 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21816 $ac_seen" >&2;}
21817           ac_warn_datarootdir=yes
21818         fi
21819       fi
21820       ac_seen=`grep '${datarootdir}' $ac_item`
21821       if test -n "$ac_seen"; then
21822         { echo "$as_me:21822: WARNING: datarootdir was used explicitly but not set:
21823 $ac_seen" >&5
21824 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21825 $ac_seen" >&2;}
21826         ac_warn_datarootdir=yes
21827       fi
21828     done
21829   fi
21830
21831 if test "x$ac_warn_datarootdir" = xyes; then
21832   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21833 fi
21834
21835 EOF
21836 cat >>$CONFIG_STATUS <<EOF
21837   sed "$ac_vpsub
21838 $extrasub
21839 EOF
21840 cat >>$CONFIG_STATUS <<\EOF
21841 :t
21842 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21843 s,@configure_input@,$configure_input,;t t
21844 s,@srcdir@,$ac_srcdir,;t t
21845 s,@top_srcdir@,$ac_top_srcdir,;t t
21846 s,@INSTALL@,$ac_INSTALL,;t t
21847 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21848   rm -f $tmp/stdin
21849   if test x"$ac_file" != x-; then
21850     cp $tmp/out $ac_file
21851
21852     for ac_name in prefix exec_prefix datarootdir
21853     do
21854         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21855         if test -n "$ac_seen"; then
21856             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21857             if test -z "$ac_init"; then
21858               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21859               { echo "$as_me:21859: WARNING: Variable $ac_name is used but was not set:
21860 $ac_seen" >&5
21861 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21862 $ac_seen" >&2;}
21863             fi
21864         fi
21865     done
21866     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21867     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21868     if test -s $tmp/out; then
21869       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21870       { echo "$as_me:21870: WARNING: Some variables may not be substituted:
21871 $ac_seen" >&5
21872 echo "$as_me: WARNING: Some variables may not be substituted:
21873 $ac_seen" >&2;}
21874     fi
21875   else
21876     cat $tmp/out
21877   fi
21878   rm -f $tmp/out
21879
21880 done
21881 EOF
21882 cat >>$CONFIG_STATUS <<\EOF
21883
21884 #
21885 # CONFIG_HEADER section.
21886 #
21887
21888 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21889 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21890 #
21891 # ac_d sets the value in "#define NAME VALUE" lines.
21892 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21893 ac_dB='[        ].*$,\1#\2'
21894 ac_dC=' '
21895 ac_dD=',;t'
21896 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21897 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21898 ac_iB='\([      ]\),\1#\2define\3'
21899 ac_iC=' '
21900 ac_iD='\4,;t'
21901 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21902 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21903 ac_uB='$,\1#\2define\3'
21904 ac_uC=' '
21905 ac_uD=',;t'
21906
21907 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21908   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21909   case $ac_file in
21910   - | *:- | *:-:* ) # input from stdin
21911         cat >$tmp/stdin
21912         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21913         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21914   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21915         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21916   * )   ac_file_in=$ac_file.in ;;
21917   esac
21918
21919   test x"$ac_file" != x- && { echo "$as_me:21919: creating $ac_file" >&5
21920 echo "$as_me: creating $ac_file" >&6;}
21921
21922   # First look for the input files in the build tree, otherwise in the
21923   # src tree.
21924   ac_file_inputs=`IFS=:
21925     for f in $ac_file_in; do
21926       case $f in
21927       -) echo $tmp/stdin ;;
21928       [\\/$]*)
21929          # Absolute (can't be DOS-style, as IFS=:)
21930          test -f "$f" || { { echo "$as_me:21930: error: cannot find input file: $f" >&5
21931 echo "$as_me: error: cannot find input file: $f" >&2;}
21932    { (exit 1); exit 1; }; }
21933          echo $f;;
21934       *) # Relative
21935          if test -f "$f"; then
21936            # Build tree
21937            echo $f
21938          elif test -f "$srcdir/$f"; then
21939            # Source tree
21940            echo $srcdir/$f
21941          else
21942            # /dev/null tree
21943            { { echo "$as_me:21943: error: cannot find input file: $f" >&5
21944 echo "$as_me: error: cannot find input file: $f" >&2;}
21945    { (exit 1); exit 1; }; }
21946          fi;;
21947       esac
21948     done` || { (exit 1); exit 1; }
21949   # Remove the trailing spaces.
21950   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21951
21952 EOF
21953
21954 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21955 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21956 # be either 'cat' or 'sort'.
21957 cat confdefs.h | uniq >conftest.vals
21958
21959 # Break up conftest.vals because some shells have a limit on
21960 # the size of here documents, and old seds have small limits too.
21961
21962 rm -f conftest.tail
21963 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21964 while grep . conftest.vals >/dev/null
21965 do
21966   # Write chunks of a limited-size here document to conftest.frag.
21967   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21968   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21969   echo 'CEOF' >> $CONFIG_STATUS
21970   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21971   rm -f conftest.vals
21972   mv conftest.tail conftest.vals
21973 done
21974 rm -f conftest.vals
21975
21976 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21977 # marker @DEFS@.
21978 echo '  cat >> conftest.edit <<CEOF
21979 /@DEFS@/r conftest.frag
21980 /@DEFS@/d
21981 CEOF
21982 sed -f conftest.edit $tmp/in > $tmp/out
21983 rm -f $tmp/in
21984 mv $tmp/out $tmp/in
21985 rm -f conftest.edit conftest.frag
21986 ' >> $CONFIG_STATUS
21987
21988 cat >>$CONFIG_STATUS <<\EOF
21989   # Let's still pretend it is `configure' which instantiates (i.e., don't
21990   # use $as_me), people would be surprised to read:
21991   #    /* config.h.  Generated automatically by config.status.  */
21992   if test x"$ac_file" = x-; then
21993     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21994   else
21995     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21996   fi
21997   cat $tmp/in >>$tmp/config.h
21998   rm -f $tmp/in
21999   if test x"$ac_file" != x-; then
22000     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22001       { echo "$as_me:22001: $ac_file is unchanged" >&5
22002 echo "$as_me: $ac_file is unchanged" >&6;}
22003     else
22004       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22005          X"$ac_file" : 'X\(//\)[^/]' \| \
22006          X"$ac_file" : 'X\(//\)$' \| \
22007          X"$ac_file" : 'X\(/\)' \| \
22008          .     : '\(.\)' 2>/dev/null ||
22009 echo X"$ac_file" |
22010     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22011           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22012           /^X\(\/\/\)$/{ s//\1/; q; }
22013           /^X\(\/\).*/{ s//\1/; q; }
22014           s/.*/./; q'`
22015       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22016         { case "$ac_dir" in
22017   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22018   *)                      as_incr_dir=.;;
22019 esac
22020 as_dummy="$ac_dir"
22021 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22022   case $as_mkdir_dir in
22023     # Skip DOS drivespec
22024     ?:) as_incr_dir=$as_mkdir_dir ;;
22025     *)
22026       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22027       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22028     ;;
22029   esac
22030 done; }
22031
22032       fi
22033       rm -f $ac_file
22034       mv $tmp/config.h $ac_file
22035     fi
22036   else
22037     cat $tmp/config.h
22038     rm -f $tmp/config.h
22039   fi
22040 done
22041 EOF
22042 cat >>$CONFIG_STATUS <<\EOF
22043 #
22044 # CONFIG_COMMANDS section.
22045 #
22046 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22047   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22048   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22049
22050   case $ac_dest in
22051     default )
22052 if test "x$cf_with_tests" != xno ; then
22053
22054 for cf_dir in test
22055 do
22056         if test ! -d $srcdir/$cf_dir; then
22057                 continue
22058         elif test -f $srcdir/$cf_dir/programs; then
22059                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22060         fi
22061 done
22062
22063 fi
22064
22065 cf_prefix=$LIB_PREFIX
22066
22067 case $cf_cv_shlib_version in #(vi
22068 cygdll|mingw)
22069         TINFO_NAME=$TINFO_ARG_SUFFIX
22070         TINFO_SUFFIX=.dll
22071         ;;
22072 esac
22073
22074 if test -n "$TINFO_SUFFIX" ; then
22075         case $TINFO_SUFFIX in
22076         tw*)
22077                 TINFO_NAME="${TINFO_NAME}tw"
22078                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22079                 ;;
22080         t*)
22081                 TINFO_NAME="${TINFO_NAME}t"
22082                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22083                 ;;
22084         w*)
22085                 TINFO_NAME="${TINFO_NAME}w"
22086                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22087                 ;;
22088         esac
22089 fi
22090
22091 for cf_dir in $SRC_SUBDIRS
22092 do
22093         if test ! -d $srcdir/$cf_dir ; then
22094                 continue
22095         elif test -f $srcdir/$cf_dir/modules; then
22096
22097                 SHARED_LIB=
22098                 Libs_To_Make=
22099                 for cf_item in $cf_LIST_MODELS
22100                 do
22101
22102         case X$cf_item in #(vi
22103         Xlibtool) #(vi
22104                 cf_suffix='.la'
22105                 cf_depsuf=$cf_suffix
22106                 ;;
22107         Xdebug) #(vi
22108                 cf_suffix='_g.a'
22109                 cf_depsuf=$cf_suffix
22110                 ;;
22111         Xprofile) #(vi
22112                 cf_suffix='_p.a'
22113                 cf_depsuf=$cf_suffix
22114                 ;;
22115         Xshared) #(vi
22116                 case $cf_cv_system_name in
22117                 aix[5-7]*) #(vi
22118                         cf_suffix='.a'
22119                         cf_depsuf=$cf_suffix
22120                         ;;
22121                 cygwin*|mingw*) #(vi
22122                         cf_suffix='.dll'
22123                         cf_depsuf='.dll.a'
22124                         ;;
22125                 darwin*) #(vi
22126                         cf_suffix='.dylib'
22127                         cf_depsuf=$cf_suffix
22128                         ;;
22129                 hpux*) #(vi
22130                         case $target in
22131                         ia64*) #(vi
22132                                 cf_suffix='.so'
22133                                 cf_depsuf=$cf_suffix
22134                                 ;;
22135                         *) #(vi
22136                                 cf_suffix='.sl'
22137                                 cf_depsuf=$cf_suffix
22138                                 ;;
22139                         esac
22140                         ;;
22141                 *) #(vi
22142                         cf_suffix='.so'
22143                         cf_depsuf=$cf_suffix
22144                         ;;
22145                 esac
22146                 ;;
22147         *)
22148                 cf_suffix='.a'
22149                 cf_depsuf=$cf_suffix
22150                 ;;
22151         esac
22152         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22153         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22154
22155                         cf_libname=$cf_dir
22156                         test "$cf_dir" = c++ && cf_libname=ncurses++
22157                         if test $cf_item = shared ; then
22158                                 if test -n "${LIB_SUFFIX}"
22159                                 then
22160                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22161                                 else
22162                                         cf_shared_suffix="$cf_suffix"
22163                                 fi
22164                                 if test "$cf_cv_do_symlinks" = yes ; then
22165                                         cf_version_name=
22166
22167                                         case "$cf_cv_shlib_version" in #(vi
22168                                         rel) #(vi
22169                                                 cf_version_name=REL_VERSION
22170                                                 ;;
22171                                         abi)
22172                                                 cf_version_name=ABI_VERSION
22173                                                 ;;
22174                                         esac
22175
22176                                         if test -n "$cf_version_name"
22177                                         then
22178                                                 case "$cf_cv_system_name" in #(vi
22179                                                 darwin*)
22180                                                         # "w", etc?
22181                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
22182                                                         ;; #(vi
22183                                                 *)
22184                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
22185                                                         ;;
22186                                                 esac
22187                                         fi
22188                                         if test -n "${LIB_SUFFIX}"
22189                                         then
22190                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22191                                         else
22192                                                 cf_shared_suffix="$cf_suffix"
22193                                         fi
22194                                 fi
22195                                 # cygwin needs import library, and has unique naming convention
22196                                 # use autodetected ${cf_prefix} for import lib and static lib, but
22197                                 # use 'cyg' prefix for shared lib.
22198                                 case $cf_cv_shlib_version in #(vi
22199                                 cygdll) #(vi
22200                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22201                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
22202                                         continue
22203                                         ;;
22204                                 mingw)
22205                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22206                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
22207                                         continue
22208                                         ;;
22209                                 esac
22210                         fi
22211                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
22212                 done
22213
22214                 if test $cf_dir = ncurses ; then
22215                         cf_subsets="$LIB_SUBSETS"
22216                         cf_r_parts="$cf_subsets"
22217                         cf_liblist="$Libs_To_Make"
22218
22219                         while test -n "$cf_r_parts"
22220                         do
22221                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
22222                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
22223                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
22224                                         cf_item=
22225                                         case $cf_l_parts in #(vi
22226                                         *termlib*) #(vi
22227                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
22228                                                 ;;
22229                                         *ticlib*)
22230                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
22231                                                 ;;
22232                                         *)
22233                                                 break
22234                                                 ;;
22235                                         esac
22236                                         if test -n "$cf_item"; then
22237                                                 Libs_To_Make="$cf_item $Libs_To_Make"
22238                                         fi
22239                                 else
22240                                         break
22241                                 fi
22242                         done
22243                 else
22244                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
22245                 fi
22246
22247                 if test $cf_dir = c++; then
22248                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
22249                                 cf_list=
22250                                 for cf_item in $Libs_To_Make
22251                                 do
22252                                         case $cf_item in
22253                                         *.a)
22254                                                 ;;
22255                                         *)
22256                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
22257                                                 ;;
22258                                         esac
22259                                         for cf_test in $cf_list
22260                                         do
22261                                                 if test "$cf_test" = "$cf_item"
22262                                                 then
22263                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
22264                                                         cf_item=
22265                                                         break
22266                                                 fi
22267                                         done
22268                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
22269                                 done
22270                                 Libs_To_Make="$cf_list"
22271                         fi
22272                 fi
22273
22274                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
22275                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
22276                         $cf_dir/Makefile >$cf_dir/Makefile.out
22277                 mv $cf_dir/Makefile.out $cf_dir/Makefile
22278
22279                 $AWK -f $srcdir/mk-0th.awk \
22280                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
22281                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22282
22283                 for cf_subset in $cf_subsets
22284                 do
22285                         cf_subdirs=
22286                         for cf_item in $cf_LIST_MODELS
22287                         do
22288
22289                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
22290
22291 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22292
22293                         CXX_MODEL=$cf_ITEM
22294                         if test "$CXX_MODEL" = SHARED; then
22295                                 case $cf_cv_shlib_version in #(vi
22296                                 cygdll|mingw) #(vi
22297                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
22298
22299 echo "${as_me:-configure}:22299: testing overriding CXX_MODEL to SHARED ..." 1>&5
22300
22301                                         with_shared_cxx=yes
22302                                         ;;
22303                                 *)
22304                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
22305                                         ;;
22306                                 esac
22307                         fi
22308
22309         case X$cf_item in #(vi
22310         Xlibtool) #(vi
22311                 cf_suffix='.la'
22312                 cf_depsuf=$cf_suffix
22313                 ;;
22314         Xdebug) #(vi
22315                 cf_suffix='_g.a'
22316                 cf_depsuf=$cf_suffix
22317                 ;;
22318         Xprofile) #(vi
22319                 cf_suffix='_p.a'
22320                 cf_depsuf=$cf_suffix
22321                 ;;
22322         Xshared) #(vi
22323                 case $cf_cv_system_name in
22324                 aix[5-7]*) #(vi
22325                         cf_suffix='.a'
22326                         cf_depsuf=$cf_suffix
22327                         ;;
22328                 cygwin*|mingw*) #(vi
22329                         cf_suffix='.dll'
22330                         cf_depsuf='.dll.a'
22331                         ;;
22332                 darwin*) #(vi
22333                         cf_suffix='.dylib'
22334                         cf_depsuf=$cf_suffix
22335                         ;;
22336                 hpux*) #(vi
22337                         case $target in
22338                         ia64*) #(vi
22339                                 cf_suffix='.so'
22340                                 cf_depsuf=$cf_suffix
22341                                 ;;
22342                         *) #(vi
22343                                 cf_suffix='.sl'
22344                                 cf_depsuf=$cf_suffix
22345                                 ;;
22346                         esac
22347                         ;;
22348                 *) #(vi
22349                         cf_suffix='.so'
22350                         cf_depsuf=$cf_suffix
22351                         ;;
22352                 esac
22353                 ;;
22354         *)
22355                 cf_suffix='.a'
22356                 cf_depsuf=$cf_suffix
22357                 ;;
22358         esac
22359         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22360         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22361
22362         case $cf_item in
22363         libtool) cf_subdir='obj_lo'  ;;
22364         normal)  cf_subdir='objects' ;;
22365         debug)   cf_subdir='obj_g' ;;
22366         profile) cf_subdir='obj_p' ;;
22367         shared)
22368                 case $cf_cv_system_name in #(vi
22369                 cygwin) #(vi
22370                         cf_subdir='objects' ;;
22371                 *)
22372                         cf_subdir='obj_s' ;;
22373                 esac
22374         esac
22375
22376                         # Test for case where we build libtinfo with a different name.
22377                         cf_libname=$cf_dir
22378                         if test $cf_dir = ncurses ; then
22379                                 case $cf_subset in
22380                                 *base*)
22381                                         cf_libname=${cf_libname}$LIB_SUFFIX
22382                                         ;;
22383                                 *termlib*)
22384                                         cf_libname=$TINFO_LIB_SUFFIX
22385                                         ;;
22386                                 ticlib*)
22387                                         cf_libname=$TICS_LIB_SUFFIX
22388                                         ;;
22389                                 esac
22390                         elif test $cf_dir = c++ ; then
22391                                 cf_libname=ncurses++$LIB_SUFFIX
22392                         else
22393                                 cf_libname=${cf_libname}$LIB_SUFFIX
22394                         fi
22395                         if test -n "${DFT_ARG_SUFFIX}" ; then
22396                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
22397                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
22398                         fi
22399
22400                         # These dependencies really are for development, not
22401                         # builds, but they are useful in porting, too.
22402                         cf_depend="../include/ncurses_cfg.h"
22403                         if test "$srcdir" = "."; then
22404                                 cf_reldir="."
22405                         else
22406                                 cf_reldir="\${srcdir}"
22407                         fi
22408
22409                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
22410                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
22411                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
22412                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
22413                         fi
22414
22415                         cf_dir_suffix=
22416                         old_cf_suffix="$cf_suffix"
22417                         if test "$cf_cv_shlib_version_infix" = yes ; then
22418                         if test -n "$LIB_SUFFIX" ; then
22419                                 case $LIB_SUFFIX in
22420                                 tw*)
22421                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
22422                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
22423                                         cf_dir_suffix=tw
22424                                         ;;
22425                                 t*)
22426                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
22427                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
22428                                         cf_dir_suffix=t
22429                                         ;;
22430                                 w*)
22431                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
22432                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22433                                         cf_dir_suffix=w
22434                                         ;;
22435                                 esac
22436                         fi
22437                         fi
22438
22439                         $AWK -f $srcdir/mk-1st.awk \
22440                                 name=${cf_libname}${cf_dir_suffix} \
22441                                 traces=$LIB_TRACING \
22442                                 MODEL=$cf_ITEM \
22443                                 CXX_MODEL=$CXX_MODEL \
22444                                 model=$cf_subdir \
22445                                 prefix=$cf_prefix \
22446                                 suffix=$cf_suffix \
22447                                 subset=$cf_subset \
22448                                 driver=$cf_cv_term_driver \
22449                                 SymLink="$LN_S" \
22450                                 TermlibRoot=$TINFO_NAME \
22451                                 TermlibSuffix=$TINFO_SUFFIX \
22452                                 ShlibVer=$cf_cv_shlib_version \
22453                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22454                                 ReLink=${cf_cv_do_relink:-no} \
22455                                 DoLinks=$cf_cv_do_symlinks \
22456                                 rmSoLocs=$cf_cv_rm_so_locs \
22457                                 ldconfig="$LDCONFIG" \
22458                                 overwrite=$WITH_OVERWRITE \
22459                                 depend="$cf_depend" \
22460                                 host="$host" \
22461                                 libtool_version="$LIBTOOL_VERSION" \
22462                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22463
22464                         cf_suffix="$old_cf_suffix"
22465
22466                         for cf_subdir2 in $cf_subdirs lib
22467                         do
22468                                 test $cf_subdir = $cf_subdir2 && break
22469                         done
22470                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22471                         $AWK -f $srcdir/mk-2nd.awk \
22472                                 name=$cf_dir \
22473                                 traces=$LIB_TRACING \
22474                                 MODEL=$cf_ITEM \
22475                                 model=$cf_subdir \
22476                                 subset=$cf_subset \
22477                                 srcdir=$srcdir \
22478                                 echo=$WITH_ECHO \
22479                                 crenames=$cf_cv_prog_CC_c_o \
22480                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22481                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22482                         cf_subdirs="$cf_subdirs $cf_subdir"
22483                         done
22484                 done
22485         fi
22486
22487         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
22488 done
22489
22490 for cf_dir in $SRC_SUBDIRS
22491 do
22492         if test ! -d $srcdir/$cf_dir ; then
22493                 continue
22494         fi
22495
22496         if test -f $cf_dir/Makefile ; then
22497                 case "$cf_dir" in
22498                 Ada95) #(vi
22499                         echo 'libs \' >> Makefile
22500                         echo 'install.libs \' >> Makefile
22501                         echo 'uninstall.libs ::' >> Makefile
22502                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22503                         ;;
22504                 esac
22505         fi
22506
22507         if test -f $srcdir/$cf_dir/modules; then
22508                 echo >> Makefile
22509                 if test -f $srcdir/$cf_dir/headers; then
22510 cat >> Makefile <<CF_EOF
22511 install.includes \\
22512 uninstall.includes \\
22513 CF_EOF
22514                 fi
22515 if test "$cf_dir" != "c++" ; then
22516 echo 'lint \' >> Makefile
22517 fi
22518 cat >> Makefile <<CF_EOF
22519 libs \\
22520 lintlib \\
22521 install.libs \\
22522 uninstall.libs \\
22523 install.$cf_dir \\
22524 uninstall.$cf_dir ::
22525         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22526 CF_EOF
22527         elif test -f $srcdir/$cf_dir/headers; then
22528 cat >> Makefile <<CF_EOF
22529
22530 libs \\
22531 install.libs \\
22532 uninstall.libs \\
22533 install.includes \\
22534 uninstall.includes ::
22535         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22536 CF_EOF
22537 fi
22538 done
22539
22540 cat >> Makefile <<CF_EOF
22541
22542 install.libs uninstall.libs \\
22543 install.data uninstall.data ::
22544 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22545 CF_EOF
22546
22547 if test "x$cf_with_manpages" = xyes; then
22548 cat >> Makefile <<CF_EOF
22549
22550 install.man \\
22551 uninstall.man ::
22552         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22553 CF_EOF
22554 fi
22555
22556 cat >> Makefile <<CF_EOF
22557
22558 distclean ::
22559         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22560         rm -f headers.sh headers.sed mk_shared_lib.sh
22561         rm -f edit_man.* man_alias.*
22562         rm -rf \${DIRS_TO_MAKE}
22563 CF_EOF
22564
22565 # Special case: tack's manpage lives in its own directory.
22566 if test "x$cf_with_manpages" = xyes; then
22567 if test -d tack ; then
22568 if test -f $srcdir/$tack.h; then
22569 cat >> Makefile <<CF_EOF
22570
22571 install.man \\
22572 uninstall.man ::
22573         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22574 CF_EOF
22575 fi
22576 fi
22577 fi
22578
22579 rm -f headers.sed headers.sh
22580
22581 echo creating headers.sh
22582 cat >headers.sh <<CF_EOF
22583 #! /bin/sh
22584 # This shell script is generated by the 'configure' script.  It is invoked in a
22585 # subdirectory of the build tree.  It generates a sed-script in the parent
22586 # directory that is used to adjust includes for header files that reside in a
22587 # subdirectory of /usr/include, etc.
22588 PRG=""
22589 while test \$# != 3
22590 do
22591 PRG="\$PRG \$1"; shift
22592 done
22593 DST=\$1
22594 REF=\$2
22595 SRC=\$3
22596 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22597 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22598 echo installing \$SRC in \$DST
22599 CF_EOF
22600
22601 if test $WITH_CURSES_H = yes; then
22602         cat >>headers.sh <<CF_EOF
22603 case \$DST in
22604 /*/include/*)
22605         END=\`basename \$DST\`
22606         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22607         do
22608                 NAME=\`basename \$i\`
22609                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22610         done
22611         ;;
22612 *)
22613         echo "" >> \$TMPSED
22614         ;;
22615 esac
22616 CF_EOF
22617
22618 else
22619         cat >>headers.sh <<CF_EOF
22620 case \$DST in
22621 /*/include/*)
22622         END=\`basename \$DST\`
22623         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22624         do
22625                 NAME=\`basename \$i\`
22626                 if test "\$NAME" = "curses.h"
22627                 then
22628                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22629                         NAME=ncurses.h
22630                 fi
22631                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22632         done
22633         ;;
22634 *)
22635         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22636         ;;
22637 esac
22638 CF_EOF
22639 fi
22640 cat >>headers.sh <<CF_EOF
22641 rm -f \$TMPSRC
22642 sed -f \$TMPSED \$SRC > \$TMPSRC
22643 NAME=\`basename \$SRC\`
22644 CF_EOF
22645 if test $WITH_CURSES_H != yes; then
22646         cat >>headers.sh <<CF_EOF
22647 test "\$NAME" = "curses.h" && NAME=ncurses.h
22648 CF_EOF
22649 fi
22650 cat >>headers.sh <<CF_EOF
22651 # Just in case someone gzip'd manpages, remove the conflicting copy.
22652 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22653
22654 eval \$PRG \$TMPSRC \$DST/\$NAME
22655 rm -f \$TMPSRC \$TMPSED
22656 CF_EOF
22657
22658 chmod 0755 headers.sh
22659
22660 for cf_dir in $SRC_SUBDIRS
22661 do
22662         if test ! -d $srcdir/$cf_dir ; then
22663                 continue
22664         fi
22665
22666         if test -f $srcdir/$cf_dir/headers; then
22667                 $AWK -f $srcdir/mk-hdr.awk \
22668                         subset="$LIB_SUBSETS" \
22669                         compat="$WITH_CURSES_H" \
22670                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22671         fi
22672
22673         if test -f $srcdir/$cf_dir/modules; then
22674                 if test "$cf_dir" != "c++" ; then
22675                         cat >>$cf_dir/Makefile <<"CF_EOF"
22676 depend : ${AUTO_SRC}
22677         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22678
22679 # DO NOT DELETE THIS LINE -- make depend depends on it.
22680 CF_EOF
22681                 fi
22682         fi
22683 done
22684
22685 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22686 if test -z "$USE_OLD_MAKERULES" ; then
22687         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22688 fi
22689 fi
22690  ;;
22691   esac
22692 done
22693 EOF
22694
22695 cat >>$CONFIG_STATUS <<\EOF
22696
22697 { (exit 0); exit 0; }
22698 EOF
22699 chmod +x $CONFIG_STATUS
22700 ac_clean_files=$ac_clean_files_save
22701
22702 # configure is writing to config.log, and then calls config.status.
22703 # config.status does its own redirection, appending to config.log.
22704 # Unfortunately, on DOS this fails, as config.log is still kept open
22705 # by configure, so config.status won't be able to write to it; its
22706 # output is simply discarded.  So we exec the FD to /dev/null,
22707 # effectively closing config.log, so it can be properly (re)opened and
22708 # appended to by config.status.  When coming back to configure, we
22709 # need to make the FD available again.
22710 if test "$no_create" != yes; then
22711   ac_cs_success=:
22712   exec 5>/dev/null
22713   $SHELL $CONFIG_STATUS || ac_cs_success=false
22714   exec 5>>config.log
22715   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22716   # would make configure fail if this is the last instruction.
22717   $ac_cs_success || { (exit 1); exit 1; }
22718 fi
22719 ${MAKE:-make} preinstall