]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20130824
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.573 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20121002.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --enable-mixed-case     tic should assume mixed-case filenames
718   --with-install-prefix   prefixes actual install-location ($DESTDIR)
719 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
720   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
721   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
722   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
723   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
724   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
725   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
726 Options to Specify the Libraries Built/Used:
727   --disable-libtool-version  enable to use libtool's incompatible naming scheme
728   --with-libtool          generate libraries with libtool
729   --with-shared           generate shared-libraries
730   --with-normal           generate normal-libraries (default)
731   --with-debug            generate debug-libraries (default)
732   --with-profile          generate profile-libraries
733   --with-cxx-shared       generate C++ shared-libraries
734   --with-lib-prefix       override library-prefix
735   --with-termlib          generate separate terminfo library
736   --with-ticlib           generate separate tic library
737   --with-gpm              use Alessandro Rubini's GPM library
738   --without-dlsym         do not use dlsym() to load GPM dynamically
739   --with-sysmouse         use sysmouse (FreeBSD console)
740   --enable-rpath          use rpath option when generating shared libraries
741   --disable-relink        relink shared libraries during install
742   --with-shlib-version=X  Specify rel or abi version for shared libs
743   --disable-rpath-hack    don't add rpath options for additional libraries
744 Fine-Tuning Your Configuration:
745   --disable-overwrite     leave out the link to -lcurses
746   --disable-database      do not use terminfo, only fallbacks/termcap
747   --with-database=XXX     specify terminfo source to install
748   --with-hashed-db        specify hashed-database library
749   --with-fallbacks=XXX    specify list of fallback terminal descriptions
750   --without-xterm-new     specify if xterm terminfo should be old version
751   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
752   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
753   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
754   --disable-big-core      assume machine has little memory
755   --disable-big-strings   assume compiler has only standard-size strings
756   --enable-termcap        compile in termcap fallback support
757   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
758   --enable-getcap         fast termcap load, no xrefs to terminfo
759   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
760   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
761   --disable-root-environ  restrict environment when running as root
762   --enable-symlinks       make tic use symbolic links not hard links
763   --enable-broken_linker  compile with broken-linker support code
764   --enable-bsdpad         recognize BSD-style prefix padding
765   --enable-widec          compile with wide-char/UTF-8 code
766   --disable-lp64          allow chtype to be long (ignore _LP64)
767   --disable-largefile     omit support for large files
768   --disable-tparm-varargs compile tparm() without varargs interface
769   --disable-tic-depends   link tic library without explicit dependency on ncurses library
770   --with-bool=TYPE        override fallback type of bool variable
771   --with-caps=alt         compile with alternate Caps file
772   --with-chtype=TYPE      override type of chtype
773   --with-ospeed=TYPE      override type of ospeed variable
774   --with-mmask-t=TYPE     override type of mmask_t
775   --with-ccharw-max=XXX   override size CCHARW_MAX
776   --with-tparm-arg=TYPE   override parameter type of tparm
777   --with-rcs-ids          compile-in RCS identifiers
778 Options to Specify How Manpages are Installed:
779   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
780                           optionally formatted/catonly, e.g., gzip,formatted
781   --with-manpage-renames  specify manpage-renaming
782   --with-manpage-aliases  specify manpage-aliases using .so
783   --with-manpage-symlinks specify manpage-aliases using symlinks
784   --with-manpage-tbl      specify manpage processing with tbl
785 Extensions:
786   --disable-ext-funcs     disable function-extensions
787   --enable-sp-funcs       enable experimental SCREEN-extensions
788   --enable-term-driver    enable experimental terminal-driver
789   --enable-const          compile with extra/non-standard const
790   --enable-ext-colors     compile for 256-color support
791   --enable-ext-mouse      compile for extended mouse-encoding
792   --enable-no-padding     compile with $NCURSES_NO_PADDING code
793   --enable-signed-char    compile using signed Boolean's in term.h
794   --enable-sigwinch       compile with SIGWINCH handler
795   --enable-tcap-names     compile with user-definable terminal capabilities
796 Development Code:
797   --without-develop       disable development options
798   --enable-hard-tabs      compile with hard-tabs code
799   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
800 Experimental Code:
801   --disable-assumed-color do not assume anything about default-colors
802   --disable-hashmap       compile without hashmap scrolling-optimization
803   --enable-colorfgbg      compile-in experimental $COLORFGBG code
804   --enable-interop        compile-in experimental interop bindings
805   --with-pthread          use POSIX thread library
806   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
807   --enable-weak-symbols   enable weak-symbols for pthreads
808   --enable-reentrant      compile with experimental reentrant code
809   --with-wrap-prefix=XXX  override prefix used for public variables
810   --enable-safe-sprintf   compile with experimental safe-sprintf code
811   --disable-scroll-hints  compile without scroll-hints code
812   --enable-wgetch-events  compile with experimental wgetch-events code
813 Testing/development Options:
814   --disable-echo          do not display "compiling" commands
815   --enable-warnings       build: turn on GCC compiler warnings
816   --enable-string-hacks   work around bogus compiler/loader warnings
817   --enable-assertions     test: turn on generation of assertion code
818   --with-dmalloc          test: use Gray Watson's dmalloc library
819   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
820   --with-valgrind         test: use valgrind
821   --disable-leaks         test: free permanent memory, analyze leaks
822   --enable-expanded       test: generate functions for certain macros
823   --disable-macros        test: use functions rather than macros
824   --with-trace            test: add trace() function to all models of ncurses
825 Ada95 Binding Options:
826   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
827   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
828   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
829   --with-ada-sharedlib=XX build Ada95 shared-library
830
831 Some influential environment variables:
832   CC          C compiler command
833   CFLAGS      C compiler flags
834   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
835               nonstandard directory <lib dir>
836   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
837               headers in a nonstandard directory <include dir>
838   CPP         C preprocessor
839   CXX         C++ compiler command
840   CXXFLAGS    C++ compiler flags
841   CXXCPP      C++ preprocessor
842
843 Use these variables to override the choices made by `configure' or to help
844 it to find libraries and programs with nonstandard names/locations.
845
846 EOF
847 fi
848
849 if test "$ac_init_help" = "recursive"; then
850   # If there are subdirs, report their specific --help.
851   ac_popdir=`pwd`
852   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
853     cd $ac_subdir
854     # A "../" for each directory in /$ac_subdir.
855     ac_dots=`echo $ac_subdir |
856              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
857
858     case $srcdir in
859     .) # No --srcdir option.  We are building in place.
860       ac_sub_srcdir=$srcdir ;;
861     [\\/]* | ?:[\\/]* ) # Absolute path.
862       ac_sub_srcdir=$srcdir/$ac_subdir ;;
863     *) # Relative path.
864       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
865     esac
866
867     # Check for guested configure; otherwise get Cygnus style configure.
868     if test -f $ac_sub_srcdir/configure.gnu; then
869       echo
870       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
871     elif test -f $ac_sub_srcdir/configure; then
872       echo
873       $SHELL $ac_sub_srcdir/configure  --help=recursive
874     elif test -f $ac_sub_srcdir/configure.ac ||
875            test -f $ac_sub_srcdir/configure.in; then
876       echo
877       $ac_configure --help
878     else
879       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
880     fi
881     cd $ac_popdir
882   done
883 fi
884
885 test -n "$ac_init_help" && exit 0
886 if $ac_init_version; then
887   cat <<\EOF
888
889 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
890 Free Software Foundation, Inc.
891 This configure script is free software; the Free Software Foundation
892 gives unlimited permission to copy, distribute and modify it.
893 EOF
894   exit 0
895 fi
896 exec 5>config.log
897 cat >&5 <<EOF
898 This file contains any messages produced by compilers while
899 running configure, to aid debugging if configure makes a mistake.
900
901 It was created by $as_me, which was
902 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
903
904   $ $0 $@
905
906 EOF
907 {
908 cat <<_ASUNAME
909 ## ---------- ##
910 ## Platform.  ##
911 ## ---------- ##
912
913 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
914 uname -m = `(uname -m) 2>/dev/null || echo unknown`
915 uname -r = `(uname -r) 2>/dev/null || echo unknown`
916 uname -s = `(uname -s) 2>/dev/null || echo unknown`
917 uname -v = `(uname -v) 2>/dev/null || echo unknown`
918
919 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
920 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
921
922 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
923 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
924 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
925 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
926 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
927 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
928 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
929
930 PATH = $PATH
931
932 _ASUNAME
933 } >&5
934
935 cat >&5 <<EOF
936 ## ------------ ##
937 ## Core tests.  ##
938 ## ------------ ##
939
940 EOF
941
942 # Keep a trace of the command line.
943 # Strip out --no-create and --no-recursion so they do not pile up.
944 # Also quote any args containing shell meta-characters.
945 ac_configure_args=
946 ac_sep=
947 for ac_arg
948 do
949   case $ac_arg in
950   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
951   | --no-cr | --no-c) ;;
952   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
953   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
954   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
955     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
956     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
957     ac_sep=" " ;;
958   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
959      ac_sep=" " ;;
960   esac
961   # Get rid of the leading space.
962 done
963
964 # When interrupted or exit'd, cleanup temporary files, and complete
965 # config.log.  We remove comments because anyway the quotes in there
966 # would cause problems or look ugly.
967 trap 'exit_status=$?
968   # Save into config.log some information that might help in debugging.
969   echo >&5
970   echo "## ----------------- ##" >&5
971   echo "## Cache variables.  ##" >&5
972   echo "## ----------------- ##" >&5
973   echo >&5
974   # The following way of writing the cache mishandles newlines in values,
975 {
976   (set) 2>&1 |
977     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
978     *ac_space=\ *)
979       sed -n \
980         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
981           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
982       ;;
983     *)
984       sed -n \
985         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
986       ;;
987     esac;
988 } >&5
989   sed "/^$/d" confdefs.h >conftest.log
990   if test -s conftest.log; then
991     echo >&5
992     echo "## ------------ ##" >&5
993     echo "## confdefs.h.  ##" >&5
994     echo "## ------------ ##" >&5
995     echo >&5
996     cat conftest.log >&5
997   fi
998   (echo; echo) >&5
999   test "$ac_signal" != 0 &&
1000     echo "$as_me: caught signal $ac_signal" >&5
1001   echo "$as_me: exit $exit_status" >&5
1002   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1003     exit $exit_status
1004      ' 0
1005 for ac_signal in 1 2 13 15; do
1006   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1007 done
1008 ac_signal=0
1009
1010 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1011 rm -rf conftest* confdefs.h
1012 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1013 echo >confdefs.h
1014
1015 # Let the site file select an alternate cache file if it wants to.
1016 # Prefer explicitly selected file to automatically selected ones.
1017 if test -z "$CONFIG_SITE"; then
1018   if test "x$prefix" != xNONE; then
1019     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1020   else
1021     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1022   fi
1023 fi
1024 for ac_site_file in $CONFIG_SITE; do
1025   if test -r "$ac_site_file"; then
1026     { echo "$as_me:1026: loading site script $ac_site_file" >&5
1027 echo "$as_me: loading site script $ac_site_file" >&6;}
1028     cat "$ac_site_file" >&5
1029     . "$ac_site_file"
1030   fi
1031 done
1032
1033 if test -r "$cache_file"; then
1034   # Some versions of bash will fail to source /dev/null (special
1035   # files actually), so we avoid doing that.
1036   if test -f "$cache_file"; then
1037     { echo "$as_me:1037: loading cache $cache_file" >&5
1038 echo "$as_me: loading cache $cache_file" >&6;}
1039     case $cache_file in
1040       [\\/]* | ?:[\\/]* ) . $cache_file;;
1041       *)                      . ./$cache_file;;
1042     esac
1043   fi
1044 else
1045   { echo "$as_me:1045: creating cache $cache_file" >&5
1046 echo "$as_me: creating cache $cache_file" >&6;}
1047   >$cache_file
1048 fi
1049
1050 # Check that the precious variables saved in the cache have kept the same
1051 # value.
1052 ac_cache_corrupted=false
1053 for ac_var in `(set) 2>&1 |
1054                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1055   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1056   eval ac_new_set=\$ac_env_${ac_var}_set
1057   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1058   eval ac_new_val="\$ac_env_${ac_var}_value"
1059   case $ac_old_set,$ac_new_set in
1060     set,)
1061       { echo "$as_me:1061: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1062 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1063       ac_cache_corrupted=: ;;
1064     ,set)
1065       { echo "$as_me:1065: error: \`$ac_var' was not set in the previous run" >&5
1066 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1067       ac_cache_corrupted=: ;;
1068     ,);;
1069     *)
1070       if test "x$ac_old_val" != "x$ac_new_val"; then
1071         { echo "$as_me:1071: error: \`$ac_var' has changed since the previous run:" >&5
1072 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1073         { echo "$as_me:1073:   former value:  $ac_old_val" >&5
1074 echo "$as_me:   former value:  $ac_old_val" >&2;}
1075         { echo "$as_me:1075:   current value: $ac_new_val" >&5
1076 echo "$as_me:   current value: $ac_new_val" >&2;}
1077         ac_cache_corrupted=:
1078       fi;;
1079   esac
1080   # Pass precious variables to config.status.  It doesn't matter if
1081   # we pass some twice (in addition to the command line arguments).
1082   if test "$ac_new_set" = set; then
1083     case $ac_new_val in
1084     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1085       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1086       ac_configure_args="$ac_configure_args '$ac_arg'"
1087       ;;
1088     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1089        ;;
1090     esac
1091   fi
1092 done
1093 if $ac_cache_corrupted; then
1094   { echo "$as_me:1094: error: changes in the environment can compromise the build" >&5
1095 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1096   { { echo "$as_me:1096: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1097 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1098    { (exit 1); exit 1; }; }
1099 fi
1100
1101 ac_ext=c
1102 ac_cpp='$CPP $CPPFLAGS'
1103 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1104 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1105 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1106 ac_main_return=return
1107
1108 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1109   *c*,-n*) ECHO_N= ECHO_C='
1110 ' ECHO_T='      ' ;;
1111   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1112   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1113 esac
1114 echo "#! $SHELL" >conftest.sh
1115 echo  "exit 0"   >>conftest.sh
1116 chmod +x conftest.sh
1117 if { (echo "$as_me:1117: PATH=\".;.\"; conftest.sh") >&5
1118   (PATH=".;."; conftest.sh) 2>&5
1119   ac_status=$?
1120   echo "$as_me:1120: \$? = $ac_status" >&5
1121   (exit $ac_status); }; then
1122   ac_path_separator=';'
1123 else
1124   ac_path_separator=:
1125 fi
1126 PATH_SEPARATOR="$ac_path_separator"
1127 rm -f conftest.sh
1128
1129 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1130
1131 top_builddir=`pwd`
1132
1133 echo "$as_me:1133: checking for egrep" >&5
1134 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1135 if test "${ac_cv_prog_egrep+set}" = set; then
1136   echo $ECHO_N "(cached) $ECHO_C" >&6
1137 else
1138   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1139     then ac_cv_prog_egrep='grep -E'
1140     else ac_cv_prog_egrep='egrep'
1141     fi
1142 fi
1143 echo "$as_me:1143: result: $ac_cv_prog_egrep" >&5
1144 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1145  EGREP=$ac_cv_prog_egrep
1146
1147 test -z "$EGREP" && { { echo "$as_me:1147: error: No egrep program found" >&5
1148 echo "$as_me: error: No egrep program found" >&2;}
1149    { (exit 1); exit 1; }; }
1150
1151 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1152 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1153 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1154 cf_cv_abi_version=${NCURSES_MAJOR}
1155 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1156 cf_cv_timestamp=`date`
1157 echo "$as_me:1157: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1158 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1159
1160 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1161
1162 # Check whether --with-rel-version or --without-rel-version was given.
1163 if test "${with_rel_version+set}" = set; then
1164   withval="$with_rel_version"
1165   { echo "$as_me:1165: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1166 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1167  cf_cv_rel_version=$withval
1168 fi;
1169
1170  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1171  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1172
1173 if test -n "$NCURSES_MAJOR" ; then
1174   case $NCURSES_MAJOR in #(vi
1175   [0-9]*) #(vi
1176         ;;
1177   *)
1178         { { echo "$as_me:1178: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1179 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1180    { (exit 1); exit 1; }; }
1181         ;;
1182   esac
1183 else
1184   { { echo "$as_me:1184: error: Release major-version value is empty" >&5
1185 echo "$as_me: error: Release major-version value is empty" >&2;}
1186    { (exit 1); exit 1; }; }
1187 fi
1188
1189 if test -n "$NCURSES_MINOR" ; then
1190   case $NCURSES_MINOR in #(vi
1191   [0-9]*) #(vi
1192         ;;
1193   *)
1194         { { echo "$as_me:1194: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1195 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1196    { (exit 1); exit 1; }; }
1197         ;;
1198   esac
1199 else
1200   { { echo "$as_me:1200: error: Release minor-version value is empty" >&5
1201 echo "$as_me: error: Release minor-version value is empty" >&2;}
1202    { (exit 1); exit 1; }; }
1203 fi
1204
1205 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1206
1207 # Check whether --with-abi-version or --without-abi-version was given.
1208 if test "${with_abi_version+set}" = set; then
1209   withval="$with_abi_version"
1210   { echo "$as_me:1210: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1211 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1212  cf_cv_abi_version=$withval
1213 fi;
1214
1215 if test -n "$cf_cv_abi_version" ; then
1216   case $cf_cv_abi_version in #(vi
1217   [0-9]*) #(vi
1218         ;;
1219   *)
1220         { { echo "$as_me:1220: error: ABI version is not a number: $cf_cv_abi_version" >&5
1221 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1222    { (exit 1); exit 1; }; }
1223         ;;
1224   esac
1225 else
1226   { { echo "$as_me:1226: error: ABI version value is empty" >&5
1227 echo "$as_me: error: ABI version value is empty" >&2;}
1228    { (exit 1); exit 1; }; }
1229 fi
1230
1231 ac_aux_dir=
1232 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1233   if test -f $ac_dir/install-sh; then
1234     ac_aux_dir=$ac_dir
1235     ac_install_sh="$ac_aux_dir/install-sh -c"
1236     break
1237   elif test -f $ac_dir/install.sh; then
1238     ac_aux_dir=$ac_dir
1239     ac_install_sh="$ac_aux_dir/install.sh -c"
1240     break
1241   elif test -f $ac_dir/shtool; then
1242     ac_aux_dir=$ac_dir
1243     ac_install_sh="$ac_aux_dir/shtool install -c"
1244     break
1245   fi
1246 done
1247 if test -z "$ac_aux_dir"; then
1248   { { echo "$as_me:1248: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1249 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1250    { (exit 1); exit 1; }; }
1251 fi
1252 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1253 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1254 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1255
1256 # Make sure we can run config.sub.
1257 $ac_config_sub sun4 >/dev/null 2>&1 ||
1258   { { echo "$as_me:1258: error: cannot run $ac_config_sub" >&5
1259 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1260    { (exit 1); exit 1; }; }
1261
1262 echo "$as_me:1262: checking build system type" >&5
1263 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1264 if test "${ac_cv_build+set}" = set; then
1265   echo $ECHO_N "(cached) $ECHO_C" >&6
1266 else
1267   ac_cv_build_alias=$build_alias
1268 test -z "$ac_cv_build_alias" &&
1269   ac_cv_build_alias=`$ac_config_guess`
1270 test -z "$ac_cv_build_alias" &&
1271   { { echo "$as_me:1271: error: cannot guess build type; you must specify one" >&5
1272 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1273    { (exit 1); exit 1; }; }
1274 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1275   { { echo "$as_me:1275: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1276 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1277    { (exit 1); exit 1; }; }
1278
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_build" >&5
1281 echo "${ECHO_T}$ac_cv_build" >&6
1282 build=$ac_cv_build
1283 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1284 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1285 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1286
1287 echo "$as_me:1287: checking host system type" >&5
1288 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1289 if test "${ac_cv_host+set}" = set; then
1290   echo $ECHO_N "(cached) $ECHO_C" >&6
1291 else
1292   ac_cv_host_alias=$host_alias
1293 test -z "$ac_cv_host_alias" &&
1294   ac_cv_host_alias=$ac_cv_build_alias
1295 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1296   { { echo "$as_me:1296: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1297 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1298    { (exit 1); exit 1; }; }
1299
1300 fi
1301 echo "$as_me:1301: result: $ac_cv_host" >&5
1302 echo "${ECHO_T}$ac_cv_host" >&6
1303 host=$ac_cv_host
1304 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1305 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1306 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1307
1308 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1309         echo "$as_me:1309: checking target system type" >&5
1310 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1311 if test "${ac_cv_target+set}" = set; then
1312   echo $ECHO_N "(cached) $ECHO_C" >&6
1313 else
1314   ac_cv_target_alias=$target_alias
1315 test "x$ac_cv_target_alias" = "x" &&
1316   ac_cv_target_alias=$ac_cv_host_alias
1317 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1318   { { echo "$as_me:1318: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1319 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1320    { (exit 1); exit 1; }; }
1321
1322 fi
1323 echo "$as_me:1323: result: $ac_cv_target" >&5
1324 echo "${ECHO_T}$ac_cv_target" >&6
1325 target=$ac_cv_target
1326 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1327 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1328 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1329
1330 # The aliases save the names the user supplied, while $host etc.
1331 # will get canonicalized.
1332 test -n "$target_alias" &&
1333   test "$program_prefix$program_suffix$program_transform_name" = \
1334     NONENONEs,x,x, &&
1335   program_prefix=${target_alias}-
1336         system_name="$host_os"
1337 else
1338         system_name="`(uname -s -r) 2>/dev/null`"
1339         if test -z "$system_name" ; then
1340                 system_name="`(hostname) 2>/dev/null`"
1341         fi
1342 fi
1343 test -n "$system_name" &&
1344 cat >>confdefs.h <<EOF
1345 #define SYSTEM_NAME "$system_name"
1346 EOF
1347
1348 if test "${cf_cv_system_name+set}" = set; then
1349   echo $ECHO_N "(cached) $ECHO_C" >&6
1350 else
1351   cf_cv_system_name="$system_name"
1352 fi
1353
1354 test -z "$system_name" && system_name="$cf_cv_system_name"
1355 test -n "$cf_cv_system_name" && echo "$as_me:1355: result: Configuring for $cf_cv_system_name" >&5
1356 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1357
1358 if test ".$system_name" != ".$cf_cv_system_name" ; then
1359         echo "$as_me:1359: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1360 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1361         { { echo "$as_me:1361: error: \"Please remove config.cache and try again.\"" >&5
1362 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1363    { (exit 1); exit 1; }; }
1364 fi
1365
1366 # Check whether --with-system-type or --without-system-type was given.
1367 if test "${with_system_type+set}" = set; then
1368   withval="$with_system_type"
1369   { echo "$as_me:1369: WARNING: overriding system type to $withval" >&5
1370 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1371         cf_cv_system_name=$withval
1372         host_os=$withval
1373
1374 fi;
1375
1376 ###     Save the given $CFLAGS to allow user-override.
1377 cf_user_CFLAGS="$CFLAGS"
1378
1379 ###     Default install-location
1380
1381 echo "$as_me:1381: checking for prefix" >&5
1382 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1383 if test "x$prefix" = "xNONE" ; then
1384         case "$cf_cv_system_name" in
1385                 # non-vendor systems don't have a conflict
1386         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu|mingw*)
1387                 prefix=/usr
1388                 ;;
1389         *)      prefix=$ac_default_prefix
1390                 ;;
1391         esac
1392 fi
1393 echo "$as_me:1393: result: $prefix" >&5
1394 echo "${ECHO_T}$prefix" >&6
1395
1396 if test "x$prefix" = "xNONE" ; then
1397 echo "$as_me:1397: checking for default include-directory" >&5
1398 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1399 test -n "$verbose" && echo 1>&6
1400 for cf_symbol in \
1401         $includedir \
1402         $includedir/ncurses \
1403         $prefix/include \
1404         $prefix/include/ncurses \
1405         /usr/local/include \
1406         /usr/local/include/ncurses \
1407         /usr/include \
1408         /usr/include/ncurses
1409 do
1410         cf_dir=`eval echo $cf_symbol`
1411         if test -f $cf_dir/curses.h ; then
1412         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1413                 includedir="$cf_symbol"
1414                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1415                 break
1416         fi
1417         fi
1418         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1419 done
1420 echo "$as_me:1420: result: $includedir" >&5
1421 echo "${ECHO_T}$includedir" >&6
1422 fi
1423
1424 ###     Checks for programs.
1425
1426 # Check whether --with-ada or --without-ada was given.
1427 if test "${with_ada+set}" = set; then
1428   withval="$with_ada"
1429   cf_with_ada=$withval
1430 else
1431   cf_with_ada=yes
1432 fi;
1433 if test "x$cf_with_ada" = xyes
1434 then
1435         cf_PROG_CC="gnatgcc gcc cc"
1436 else
1437         cf_PROG_CC="gcc cc"
1438 fi
1439
1440 ac_ext=c
1441 ac_cpp='$CPP $CPPFLAGS'
1442 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1443 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1444 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1445 ac_main_return=return
1446 if test -n "$ac_tool_prefix"; then
1447   for ac_prog in $cf_PROG_CC
1448   do
1449     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1450 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1451 echo "$as_me:1451: checking for $ac_word" >&5
1452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1453 if test "${ac_cv_prog_CC+set}" = set; then
1454   echo $ECHO_N "(cached) $ECHO_C" >&6
1455 else
1456   if test -n "$CC"; then
1457   ac_cv_prog_CC="$CC" # Let the user override the test.
1458 else
1459   ac_save_IFS=$IFS; IFS=$ac_path_separator
1460 ac_dummy="$PATH"
1461 for ac_dir in $ac_dummy; do
1462   IFS=$ac_save_IFS
1463   test -z "$ac_dir" && ac_dir=.
1464   $as_executable_p "$ac_dir/$ac_word" || continue
1465 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1466 echo "$as_me:1466: found $ac_dir/$ac_word" >&5
1467 break
1468 done
1469
1470 fi
1471 fi
1472 CC=$ac_cv_prog_CC
1473 if test -n "$CC"; then
1474   echo "$as_me:1474: result: $CC" >&5
1475 echo "${ECHO_T}$CC" >&6
1476 else
1477   echo "$as_me:1477: result: no" >&5
1478 echo "${ECHO_T}no" >&6
1479 fi
1480
1481     test -n "$CC" && break
1482   done
1483 fi
1484 if test -z "$CC"; then
1485   ac_ct_CC=$CC
1486   for ac_prog in $cf_PROG_CC
1487 do
1488   # Extract the first word of "$ac_prog", so it can be a program name with args.
1489 set dummy $ac_prog; ac_word=$2
1490 echo "$as_me:1490: checking for $ac_word" >&5
1491 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1492 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1493   echo $ECHO_N "(cached) $ECHO_C" >&6
1494 else
1495   if test -n "$ac_ct_CC"; then
1496   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1497 else
1498   ac_save_IFS=$IFS; IFS=$ac_path_separator
1499 ac_dummy="$PATH"
1500 for ac_dir in $ac_dummy; do
1501   IFS=$ac_save_IFS
1502   test -z "$ac_dir" && ac_dir=.
1503   $as_executable_p "$ac_dir/$ac_word" || continue
1504 ac_cv_prog_ac_ct_CC="$ac_prog"
1505 echo "$as_me:1505: found $ac_dir/$ac_word" >&5
1506 break
1507 done
1508
1509 fi
1510 fi
1511 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1512 if test -n "$ac_ct_CC"; then
1513   echo "$as_me:1513: result: $ac_ct_CC" >&5
1514 echo "${ECHO_T}$ac_ct_CC" >&6
1515 else
1516   echo "$as_me:1516: result: no" >&5
1517 echo "${ECHO_T}no" >&6
1518 fi
1519
1520   test -n "$ac_ct_CC" && break
1521 done
1522
1523   CC=$ac_ct_CC
1524 fi
1525
1526 test -z "$CC" && { { echo "$as_me:1526: error: no acceptable cc found in \$PATH" >&5
1527 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1528    { (exit 1); exit 1; }; }
1529
1530 # Provide some information about the compiler.
1531 echo "$as_me:1531:" \
1532      "checking for C compiler version" >&5
1533 ac_compiler=`set X $ac_compile; echo $2`
1534 { (eval echo "$as_me:1534: \"$ac_compiler --version </dev/null >&5\"") >&5
1535   (eval $ac_compiler --version </dev/null >&5) 2>&5
1536   ac_status=$?
1537   echo "$as_me:1537: \$? = $ac_status" >&5
1538   (exit $ac_status); }
1539 { (eval echo "$as_me:1539: \"$ac_compiler -v </dev/null >&5\"") >&5
1540   (eval $ac_compiler -v </dev/null >&5) 2>&5
1541   ac_status=$?
1542   echo "$as_me:1542: \$? = $ac_status" >&5
1543   (exit $ac_status); }
1544 { (eval echo "$as_me:1544: \"$ac_compiler -V </dev/null >&5\"") >&5
1545   (eval $ac_compiler -V </dev/null >&5) 2>&5
1546   ac_status=$?
1547   echo "$as_me:1547: \$? = $ac_status" >&5
1548   (exit $ac_status); }
1549
1550 cat >conftest.$ac_ext <<_ACEOF
1551 #line 1551 "configure"
1552 #include "confdefs.h"
1553
1554 int
1555 main ()
1556 {
1557
1558   ;
1559   return 0;
1560 }
1561 _ACEOF
1562 ac_clean_files_save=$ac_clean_files
1563 ac_clean_files="$ac_clean_files a.out a.exe"
1564 # Try to create an executable without -o first, disregard a.out.
1565 # It will help us diagnose broken compilers, and finding out an intuition
1566 # of exeext.
1567 echo "$as_me:1567: checking for C compiler default output" >&5
1568 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1569 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1570 if { (eval echo "$as_me:1570: \"$ac_link_default\"") >&5
1571   (eval $ac_link_default) 2>&5
1572   ac_status=$?
1573   echo "$as_me:1573: \$? = $ac_status" >&5
1574   (exit $ac_status); }; then
1575   # Find the output, starting from the most likely.  This scheme is
1576 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1577 # resort.
1578 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1579                 ls a.out conftest 2>/dev/null;
1580                 ls a.* conftest.* 2>/dev/null`; do
1581   case $ac_file in
1582     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1583     a.out ) # We found the default executable, but exeext='' is most
1584             # certainly right.
1585             break;;
1586     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1587           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1588           export ac_cv_exeext
1589           break;;
1590     * ) break;;
1591   esac
1592 done
1593 else
1594   echo "$as_me: failed program was:" >&5
1595 cat conftest.$ac_ext >&5
1596 { { echo "$as_me:1596: error: C compiler cannot create executables" >&5
1597 echo "$as_me: error: C compiler cannot create executables" >&2;}
1598    { (exit 77); exit 77; }; }
1599 fi
1600
1601 ac_exeext=$ac_cv_exeext
1602 echo "$as_me:1602: result: $ac_file" >&5
1603 echo "${ECHO_T}$ac_file" >&6
1604
1605 # Check the compiler produces executables we can run.  If not, either
1606 # the compiler is broken, or we cross compile.
1607 echo "$as_me:1607: checking whether the C compiler works" >&5
1608 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1609 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1610 # If not cross compiling, check that we can run a simple program.
1611 if test "$cross_compiling" != yes; then
1612   if { ac_try='./$ac_file'
1613   { (eval echo "$as_me:1613: \"$ac_try\"") >&5
1614   (eval $ac_try) 2>&5
1615   ac_status=$?
1616   echo "$as_me:1616: \$? = $ac_status" >&5
1617   (exit $ac_status); }; }; then
1618     cross_compiling=no
1619   else
1620     if test "$cross_compiling" = maybe; then
1621         cross_compiling=yes
1622     else
1623         { { echo "$as_me:1623: error: cannot run C compiled programs.
1624 If you meant to cross compile, use \`--host'." >&5
1625 echo "$as_me: error: cannot run C compiled programs.
1626 If you meant to cross compile, use \`--host'." >&2;}
1627    { (exit 1); exit 1; }; }
1628     fi
1629   fi
1630 fi
1631 echo "$as_me:1631: result: yes" >&5
1632 echo "${ECHO_T}yes" >&6
1633
1634 rm -f a.out a.exe conftest$ac_cv_exeext
1635 ac_clean_files=$ac_clean_files_save
1636 # Check the compiler produces executables we can run.  If not, either
1637 # the compiler is broken, or we cross compile.
1638 echo "$as_me:1638: checking whether we are cross compiling" >&5
1639 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1640 echo "$as_me:1640: result: $cross_compiling" >&5
1641 echo "${ECHO_T}$cross_compiling" >&6
1642
1643 echo "$as_me:1643: checking for executable suffix" >&5
1644 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1645 if { (eval echo "$as_me:1645: \"$ac_link\"") >&5
1646   (eval $ac_link) 2>&5
1647   ac_status=$?
1648   echo "$as_me:1648: \$? = $ac_status" >&5
1649   (exit $ac_status); }; then
1650   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1651 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1652 # work properly (i.e., refer to `conftest.exe'), while it won't with
1653 # `rm'.
1654 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1655   case $ac_file in
1656     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1657     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1658           export ac_cv_exeext
1659           break;;
1660     * ) break;;
1661   esac
1662 done
1663 else
1664   { { echo "$as_me:1664: error: cannot compute EXEEXT: cannot compile and link" >&5
1665 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1666    { (exit 1); exit 1; }; }
1667 fi
1668
1669 rm -f conftest$ac_cv_exeext
1670 echo "$as_me:1670: result: $ac_cv_exeext" >&5
1671 echo "${ECHO_T}$ac_cv_exeext" >&6
1672
1673 rm -f conftest.$ac_ext
1674 EXEEXT=$ac_cv_exeext
1675 ac_exeext=$EXEEXT
1676 echo "$as_me:1676: checking for object suffix" >&5
1677 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1678 if test "${ac_cv_objext+set}" = set; then
1679   echo $ECHO_N "(cached) $ECHO_C" >&6
1680 else
1681   cat >conftest.$ac_ext <<_ACEOF
1682 #line 1682 "configure"
1683 #include "confdefs.h"
1684
1685 int
1686 main ()
1687 {
1688
1689   ;
1690   return 0;
1691 }
1692 _ACEOF
1693 rm -f conftest.o conftest.obj
1694 if { (eval echo "$as_me:1694: \"$ac_compile\"") >&5
1695   (eval $ac_compile) 2>&5
1696   ac_status=$?
1697   echo "$as_me:1697: \$? = $ac_status" >&5
1698   (exit $ac_status); }; then
1699   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1700   case $ac_file in
1701     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1702     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1703        break;;
1704   esac
1705 done
1706 else
1707   echo "$as_me: failed program was:" >&5
1708 cat conftest.$ac_ext >&5
1709 { { echo "$as_me:1709: error: cannot compute OBJEXT: cannot compile" >&5
1710 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1711    { (exit 1); exit 1; }; }
1712 fi
1713
1714 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1715 fi
1716 echo "$as_me:1716: result: $ac_cv_objext" >&5
1717 echo "${ECHO_T}$ac_cv_objext" >&6
1718 OBJEXT=$ac_cv_objext
1719 ac_objext=$OBJEXT
1720 echo "$as_me:1720: checking whether we are using the GNU C compiler" >&5
1721 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1722 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1723   echo $ECHO_N "(cached) $ECHO_C" >&6
1724 else
1725   cat >conftest.$ac_ext <<_ACEOF
1726 #line 1726 "configure"
1727 #include "confdefs.h"
1728
1729 int
1730 main ()
1731 {
1732 #ifndef __GNUC__
1733        choke me
1734 #endif
1735
1736   ;
1737   return 0;
1738 }
1739 _ACEOF
1740 rm -f conftest.$ac_objext
1741 if { (eval echo "$as_me:1741: \"$ac_compile\"") >&5
1742   (eval $ac_compile) 2>&5
1743   ac_status=$?
1744   echo "$as_me:1744: \$? = $ac_status" >&5
1745   (exit $ac_status); } &&
1746          { ac_try='test -s conftest.$ac_objext'
1747   { (eval echo "$as_me:1747: \"$ac_try\"") >&5
1748   (eval $ac_try) 2>&5
1749   ac_status=$?
1750   echo "$as_me:1750: \$? = $ac_status" >&5
1751   (exit $ac_status); }; }; then
1752   ac_compiler_gnu=yes
1753 else
1754   echo "$as_me: failed program was:" >&5
1755 cat conftest.$ac_ext >&5
1756 ac_compiler_gnu=no
1757 fi
1758 rm -f conftest.$ac_objext conftest.$ac_ext
1759 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1760
1761 fi
1762 echo "$as_me:1762: result: $ac_cv_c_compiler_gnu" >&5
1763 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1764 GCC=`test $ac_compiler_gnu = yes && echo yes`
1765 ac_test_CFLAGS=${CFLAGS+set}
1766 ac_save_CFLAGS=$CFLAGS
1767 CFLAGS="-g"
1768 echo "$as_me:1768: checking whether $CC accepts -g" >&5
1769 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1770 if test "${ac_cv_prog_cc_g+set}" = set; then
1771   echo $ECHO_N "(cached) $ECHO_C" >&6
1772 else
1773   cat >conftest.$ac_ext <<_ACEOF
1774 #line 1774 "configure"
1775 #include "confdefs.h"
1776
1777 int
1778 main ()
1779 {
1780
1781   ;
1782   return 0;
1783 }
1784 _ACEOF
1785 rm -f conftest.$ac_objext
1786 if { (eval echo "$as_me:1786: \"$ac_compile\"") >&5
1787   (eval $ac_compile) 2>&5
1788   ac_status=$?
1789   echo "$as_me:1789: \$? = $ac_status" >&5
1790   (exit $ac_status); } &&
1791          { ac_try='test -s conftest.$ac_objext'
1792   { (eval echo "$as_me:1792: \"$ac_try\"") >&5
1793   (eval $ac_try) 2>&5
1794   ac_status=$?
1795   echo "$as_me:1795: \$? = $ac_status" >&5
1796   (exit $ac_status); }; }; then
1797   ac_cv_prog_cc_g=yes
1798 else
1799   echo "$as_me: failed program was:" >&5
1800 cat conftest.$ac_ext >&5
1801 ac_cv_prog_cc_g=no
1802 fi
1803 rm -f conftest.$ac_objext conftest.$ac_ext
1804 fi
1805 echo "$as_me:1805: result: $ac_cv_prog_cc_g" >&5
1806 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1807 if test "$ac_test_CFLAGS" = set; then
1808   CFLAGS=$ac_save_CFLAGS
1809 elif test $ac_cv_prog_cc_g = yes; then
1810   if test "$GCC" = yes; then
1811     CFLAGS="-g -O2"
1812   else
1813     CFLAGS="-g"
1814   fi
1815 else
1816   if test "$GCC" = yes; then
1817     CFLAGS="-O2"
1818   else
1819     CFLAGS=
1820   fi
1821 fi
1822 # Some people use a C++ compiler to compile C.  Since we use `exit',
1823 # in C++ we need to declare it.  In case someone uses the same compiler
1824 # for both compiling C and C++ we need to have the C++ compiler decide
1825 # the declaration of exit, since it's the most demanding environment.
1826 cat >conftest.$ac_ext <<_ACEOF
1827 #ifndef __cplusplus
1828   choke me
1829 #endif
1830 _ACEOF
1831 rm -f conftest.$ac_objext
1832 if { (eval echo "$as_me:1832: \"$ac_compile\"") >&5
1833   (eval $ac_compile) 2>&5
1834   ac_status=$?
1835   echo "$as_me:1835: \$? = $ac_status" >&5
1836   (exit $ac_status); } &&
1837          { ac_try='test -s conftest.$ac_objext'
1838   { (eval echo "$as_me:1838: \"$ac_try\"") >&5
1839   (eval $ac_try) 2>&5
1840   ac_status=$?
1841   echo "$as_me:1841: \$? = $ac_status" >&5
1842   (exit $ac_status); }; }; then
1843   for ac_declaration in \
1844    ''\
1845    '#include <stdlib.h>' \
1846    'extern "C" void std::exit (int) throw (); using std::exit;' \
1847    'extern "C" void std::exit (int); using std::exit;' \
1848    'extern "C" void exit (int) throw ();' \
1849    'extern "C" void exit (int);' \
1850    'void exit (int);'
1851 do
1852   cat >conftest.$ac_ext <<_ACEOF
1853 #line 1853 "configure"
1854 #include "confdefs.h"
1855 #include <stdlib.h>
1856 $ac_declaration
1857 int
1858 main ()
1859 {
1860 exit (42);
1861   ;
1862   return 0;
1863 }
1864 _ACEOF
1865 rm -f conftest.$ac_objext
1866 if { (eval echo "$as_me:1866: \"$ac_compile\"") >&5
1867   (eval $ac_compile) 2>&5
1868   ac_status=$?
1869   echo "$as_me:1869: \$? = $ac_status" >&5
1870   (exit $ac_status); } &&
1871          { ac_try='test -s conftest.$ac_objext'
1872   { (eval echo "$as_me:1872: \"$ac_try\"") >&5
1873   (eval $ac_try) 2>&5
1874   ac_status=$?
1875   echo "$as_me:1875: \$? = $ac_status" >&5
1876   (exit $ac_status); }; }; then
1877   :
1878 else
1879   echo "$as_me: failed program was:" >&5
1880 cat conftest.$ac_ext >&5
1881 continue
1882 fi
1883 rm -f conftest.$ac_objext conftest.$ac_ext
1884   cat >conftest.$ac_ext <<_ACEOF
1885 #line 1885 "configure"
1886 #include "confdefs.h"
1887 $ac_declaration
1888 int
1889 main ()
1890 {
1891 exit (42);
1892   ;
1893   return 0;
1894 }
1895 _ACEOF
1896 rm -f conftest.$ac_objext
1897 if { (eval echo "$as_me:1897: \"$ac_compile\"") >&5
1898   (eval $ac_compile) 2>&5
1899   ac_status=$?
1900   echo "$as_me:1900: \$? = $ac_status" >&5
1901   (exit $ac_status); } &&
1902          { ac_try='test -s conftest.$ac_objext'
1903   { (eval echo "$as_me:1903: \"$ac_try\"") >&5
1904   (eval $ac_try) 2>&5
1905   ac_status=$?
1906   echo "$as_me:1906: \$? = $ac_status" >&5
1907   (exit $ac_status); }; }; then
1908   break
1909 else
1910   echo "$as_me: failed program was:" >&5
1911 cat conftest.$ac_ext >&5
1912 fi
1913 rm -f conftest.$ac_objext conftest.$ac_ext
1914 done
1915 rm -rf conftest*
1916 if test -n "$ac_declaration"; then
1917   echo '#ifdef __cplusplus' >>confdefs.h
1918   echo $ac_declaration      >>confdefs.h
1919   echo '#endif'             >>confdefs.h
1920 fi
1921
1922 else
1923   echo "$as_me: failed program was:" >&5
1924 cat conftest.$ac_ext >&5
1925 fi
1926 rm -f conftest.$ac_objext conftest.$ac_ext
1927 ac_ext=c
1928 ac_cpp='$CPP $CPPFLAGS'
1929 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1930 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1931 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1932 ac_main_return=return
1933
1934 GCC_VERSION=none
1935 if test "$GCC" = yes ; then
1936         echo "$as_me:1936: checking version of $CC" >&5
1937 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1938         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.].*//'`"
1939         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1940         echo "$as_me:1940: result: $GCC_VERSION" >&5
1941 echo "${ECHO_T}$GCC_VERSION" >&6
1942 fi
1943
1944 echo "$as_me:1944: checking for $CC option to accept ANSI C" >&5
1945 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1946 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1947   echo $ECHO_N "(cached) $ECHO_C" >&6
1948 else
1949   ac_cv_prog_cc_stdc=no
1950 ac_save_CC=$CC
1951 cat >conftest.$ac_ext <<_ACEOF
1952 #line 1952 "configure"
1953 #include "confdefs.h"
1954 #include <stdarg.h>
1955 #include <stdio.h>
1956 #include <sys/types.h>
1957 #include <sys/stat.h>
1958 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1959 struct buf { int x; };
1960 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1961 static char *e (p, i)
1962      char **p;
1963      int i;
1964 {
1965   return p[i];
1966 }
1967 static char *f (char * (*g) (char **, int), char **p, ...)
1968 {
1969   char *s;
1970   va_list v;
1971   va_start (v,p);
1972   s = g (p, va_arg (v,int));
1973   va_end (v);
1974   return s;
1975 }
1976 int test (int i, double x);
1977 struct s1 {int (*f) (int a);};
1978 struct s2 {int (*f) (double a);};
1979 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1980 int argc;
1981 char **argv;
1982 int
1983 main ()
1984 {
1985 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1986   ;
1987   return 0;
1988 }
1989 _ACEOF
1990 # Don't try gcc -ansi; that turns off useful extensions and
1991 # breaks some systems' header files.
1992 # AIX                   -qlanglvl=ansi
1993 # Ultrix and OSF/1      -std1
1994 # HP-UX 10.20 and later -Ae
1995 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1996 # SVR4                  -Xc -D__EXTENSIONS__
1997 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1998 do
1999   CC="$ac_save_CC $ac_arg"
2000   rm -f conftest.$ac_objext
2001 if { (eval echo "$as_me:2001: \"$ac_compile\"") >&5
2002   (eval $ac_compile) 2>&5
2003   ac_status=$?
2004   echo "$as_me:2004: \$? = $ac_status" >&5
2005   (exit $ac_status); } &&
2006          { ac_try='test -s conftest.$ac_objext'
2007   { (eval echo "$as_me:2007: \"$ac_try\"") >&5
2008   (eval $ac_try) 2>&5
2009   ac_status=$?
2010   echo "$as_me:2010: \$? = $ac_status" >&5
2011   (exit $ac_status); }; }; then
2012   ac_cv_prog_cc_stdc=$ac_arg
2013 break
2014 else
2015   echo "$as_me: failed program was:" >&5
2016 cat conftest.$ac_ext >&5
2017 fi
2018 rm -f conftest.$ac_objext
2019 done
2020 rm -f conftest.$ac_ext conftest.$ac_objext
2021 CC=$ac_save_CC
2022
2023 fi
2024
2025 case "x$ac_cv_prog_cc_stdc" in
2026   x|xno)
2027     echo "$as_me:2027: result: none needed" >&5
2028 echo "${ECHO_T}none needed" >&6 ;;
2029   *)
2030     echo "$as_me:2030: result: $ac_cv_prog_cc_stdc" >&5
2031 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2032     CC="$CC $ac_cv_prog_cc_stdc" ;;
2033 esac
2034
2035 # This should have been defined by AC_PROG_CC
2036 : ${CC:=cc}
2037
2038 echo "$as_me:2038: checking \$CC variable" >&5
2039 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2040 case "$CC" in #(vi
2041 *[\ \   ]-[IUD]*)
2042         echo "$as_me:2042: result: broken" >&5
2043 echo "${ECHO_T}broken" >&6
2044         { echo "$as_me:2044: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2045 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2046         # humor him...
2047         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2048         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2049
2050 cf_fix_cppflags=no
2051 cf_new_cflags=
2052 cf_new_cppflags=
2053 cf_new_extra_cppflags=
2054
2055 for cf_add_cflags in $cf_flags
2056 do
2057 case $cf_fix_cppflags in
2058 no)
2059         case $cf_add_cflags in #(vi
2060         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2061                 case $cf_add_cflags in
2062                 -D*)
2063                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2064
2065                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2066                                 && test -z "${cf_tst_cflags}" \
2067                                 && cf_fix_cppflags=yes
2068
2069                         if test $cf_fix_cppflags = yes ; then
2070                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2071                                 continue
2072                         elif test "${cf_tst_cflags}" = "\"'" ; then
2073                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2074                                 continue
2075                         fi
2076                         ;;
2077                 esac
2078                 case "$CPPFLAGS" in
2079                 *$cf_add_cflags) #(vi
2080                         ;;
2081                 *) #(vi
2082                         case $cf_add_cflags in #(vi
2083                         -D*)
2084                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2085
2086 CPPFLAGS=`echo "$CPPFLAGS" | \
2087         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2088                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2089
2090                                 ;;
2091                         esac
2092                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2093                         ;;
2094                 esac
2095                 ;;
2096         *)
2097                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2098                 ;;
2099         esac
2100         ;;
2101 yes)
2102         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2103
2104         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2105
2106         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2107                 && test -z "${cf_tst_cflags}" \
2108                 && cf_fix_cppflags=no
2109         ;;
2110 esac
2111 done
2112
2113 if test -n "$cf_new_cflags" ; then
2114
2115         CFLAGS="$CFLAGS $cf_new_cflags"
2116 fi
2117
2118 if test -n "$cf_new_cppflags" ; then
2119
2120         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2121 fi
2122
2123 if test -n "$cf_new_extra_cppflags" ; then
2124
2125         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2126 fi
2127
2128         ;;
2129 *)
2130         echo "$as_me:2130: result: ok" >&5
2131 echo "${ECHO_T}ok" >&6
2132         ;;
2133 esac
2134
2135 ac_ext=c
2136 ac_cpp='$CPP $CPPFLAGS'
2137 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2138 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2139 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2140 ac_main_return=return
2141 echo "$as_me:2141: checking how to run the C preprocessor" >&5
2142 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2143 # On Suns, sometimes $CPP names a directory.
2144 if test -n "$CPP" && test -d "$CPP"; then
2145   CPP=
2146 fi
2147 if test -z "$CPP"; then
2148   if test "${ac_cv_prog_CPP+set}" = set; then
2149   echo $ECHO_N "(cached) $ECHO_C" >&6
2150 else
2151       # Double quotes because CPP needs to be expanded
2152     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2153     do
2154       ac_preproc_ok=false
2155 for ac_c_preproc_warn_flag in '' yes
2156 do
2157   # Use a header file that comes with gcc, so configuring glibc
2158   # with a fresh cross-compiler works.
2159   # On the NeXT, cc -E runs the code through the compiler's parser,
2160   # not just through cpp. "Syntax error" is here to catch this case.
2161   cat >conftest.$ac_ext <<_ACEOF
2162 #line 2162 "configure"
2163 #include "confdefs.h"
2164 #include <assert.h>
2165                      Syntax error
2166 _ACEOF
2167 if { (eval echo "$as_me:2167: \"$ac_cpp conftest.$ac_ext\"") >&5
2168   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2169   ac_status=$?
2170   egrep -v '^ *\+' conftest.er1 >conftest.err
2171   rm -f conftest.er1
2172   cat conftest.err >&5
2173   echo "$as_me:2173: \$? = $ac_status" >&5
2174   (exit $ac_status); } >/dev/null; then
2175   if test -s conftest.err; then
2176     ac_cpp_err=$ac_c_preproc_warn_flag
2177   else
2178     ac_cpp_err=
2179   fi
2180 else
2181   ac_cpp_err=yes
2182 fi
2183 if test -z "$ac_cpp_err"; then
2184   :
2185 else
2186   echo "$as_me: failed program was:" >&5
2187   cat conftest.$ac_ext >&5
2188   # Broken: fails on valid input.
2189 continue
2190 fi
2191 rm -f conftest.err conftest.$ac_ext
2192
2193   # OK, works on sane cases.  Now check whether non-existent headers
2194   # can be detected and how.
2195   cat >conftest.$ac_ext <<_ACEOF
2196 #line 2196 "configure"
2197 #include "confdefs.h"
2198 #include <ac_nonexistent.h>
2199 _ACEOF
2200 if { (eval echo "$as_me:2200: \"$ac_cpp conftest.$ac_ext\"") >&5
2201   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2202   ac_status=$?
2203   egrep -v '^ *\+' conftest.er1 >conftest.err
2204   rm -f conftest.er1
2205   cat conftest.err >&5
2206   echo "$as_me:2206: \$? = $ac_status" >&5
2207   (exit $ac_status); } >/dev/null; then
2208   if test -s conftest.err; then
2209     ac_cpp_err=$ac_c_preproc_warn_flag
2210   else
2211     ac_cpp_err=
2212   fi
2213 else
2214   ac_cpp_err=yes
2215 fi
2216 if test -z "$ac_cpp_err"; then
2217   # Broken: success on invalid input.
2218 continue
2219 else
2220   echo "$as_me: failed program was:" >&5
2221   cat conftest.$ac_ext >&5
2222   # Passes both tests.
2223 ac_preproc_ok=:
2224 break
2225 fi
2226 rm -f conftest.err conftest.$ac_ext
2227
2228 done
2229 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2230 rm -f conftest.err conftest.$ac_ext
2231 if $ac_preproc_ok; then
2232   break
2233 fi
2234
2235     done
2236     ac_cv_prog_CPP=$CPP
2237
2238 fi
2239   CPP=$ac_cv_prog_CPP
2240 else
2241   ac_cv_prog_CPP=$CPP
2242 fi
2243 echo "$as_me:2243: result: $CPP" >&5
2244 echo "${ECHO_T}$CPP" >&6
2245 ac_preproc_ok=false
2246 for ac_c_preproc_warn_flag in '' yes
2247 do
2248   # Use a header file that comes with gcc, so configuring glibc
2249   # with a fresh cross-compiler works.
2250   # On the NeXT, cc -E runs the code through the compiler's parser,
2251   # not just through cpp. "Syntax error" is here to catch this case.
2252   cat >conftest.$ac_ext <<_ACEOF
2253 #line 2253 "configure"
2254 #include "confdefs.h"
2255 #include <assert.h>
2256                      Syntax error
2257 _ACEOF
2258 if { (eval echo "$as_me:2258: \"$ac_cpp conftest.$ac_ext\"") >&5
2259   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2260   ac_status=$?
2261   egrep -v '^ *\+' conftest.er1 >conftest.err
2262   rm -f conftest.er1
2263   cat conftest.err >&5
2264   echo "$as_me:2264: \$? = $ac_status" >&5
2265   (exit $ac_status); } >/dev/null; then
2266   if test -s conftest.err; then
2267     ac_cpp_err=$ac_c_preproc_warn_flag
2268   else
2269     ac_cpp_err=
2270   fi
2271 else
2272   ac_cpp_err=yes
2273 fi
2274 if test -z "$ac_cpp_err"; then
2275   :
2276 else
2277   echo "$as_me: failed program was:" >&5
2278   cat conftest.$ac_ext >&5
2279   # Broken: fails on valid input.
2280 continue
2281 fi
2282 rm -f conftest.err conftest.$ac_ext
2283
2284   # OK, works on sane cases.  Now check whether non-existent headers
2285   # can be detected and how.
2286   cat >conftest.$ac_ext <<_ACEOF
2287 #line 2287 "configure"
2288 #include "confdefs.h"
2289 #include <ac_nonexistent.h>
2290 _ACEOF
2291 if { (eval echo "$as_me:2291: \"$ac_cpp conftest.$ac_ext\"") >&5
2292   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2293   ac_status=$?
2294   egrep -v '^ *\+' conftest.er1 >conftest.err
2295   rm -f conftest.er1
2296   cat conftest.err >&5
2297   echo "$as_me:2297: \$? = $ac_status" >&5
2298   (exit $ac_status); } >/dev/null; then
2299   if test -s conftest.err; then
2300     ac_cpp_err=$ac_c_preproc_warn_flag
2301   else
2302     ac_cpp_err=
2303   fi
2304 else
2305   ac_cpp_err=yes
2306 fi
2307 if test -z "$ac_cpp_err"; then
2308   # Broken: success on invalid input.
2309 continue
2310 else
2311   echo "$as_me: failed program was:" >&5
2312   cat conftest.$ac_ext >&5
2313   # Passes both tests.
2314 ac_preproc_ok=:
2315 break
2316 fi
2317 rm -f conftest.err conftest.$ac_ext
2318
2319 done
2320 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2321 rm -f conftest.err conftest.$ac_ext
2322 if $ac_preproc_ok; then
2323   :
2324 else
2325   { { echo "$as_me:2325: error: C preprocessor \"$CPP\" fails sanity check" >&5
2326 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2327    { (exit 1); exit 1; }; }
2328 fi
2329
2330 ac_ext=c
2331 ac_cpp='$CPP $CPPFLAGS'
2332 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2333 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2334 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2335 ac_main_return=return
2336
2337 if test $ac_cv_c_compiler_gnu = yes; then
2338     echo "$as_me:2338: checking whether $CC needs -traditional" >&5
2339 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2340 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2341   echo $ECHO_N "(cached) $ECHO_C" >&6
2342 else
2343     ac_pattern="Autoconf.*'x'"
2344   cat >conftest.$ac_ext <<_ACEOF
2345 #line 2345 "configure"
2346 #include "confdefs.h"
2347 #include <sgtty.h>
2348 int Autoconf = TIOCGETP;
2349 _ACEOF
2350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2351   egrep "$ac_pattern" >/dev/null 2>&1; then
2352   ac_cv_prog_gcc_traditional=yes
2353 else
2354   ac_cv_prog_gcc_traditional=no
2355 fi
2356 rm -rf conftest*
2357
2358   if test $ac_cv_prog_gcc_traditional = no; then
2359     cat >conftest.$ac_ext <<_ACEOF
2360 #line 2360 "configure"
2361 #include "confdefs.h"
2362 #include <termio.h>
2363 int Autoconf = TCGETA;
2364 _ACEOF
2365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2366   egrep "$ac_pattern" >/dev/null 2>&1; then
2367   ac_cv_prog_gcc_traditional=yes
2368 fi
2369 rm -rf conftest*
2370
2371   fi
2372 fi
2373 echo "$as_me:2373: result: $ac_cv_prog_gcc_traditional" >&5
2374 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2375   if test $ac_cv_prog_gcc_traditional = yes; then
2376     CC="$CC -traditional"
2377   fi
2378 fi
2379
2380 echo "$as_me:2380: checking whether $CC understands -c and -o together" >&5
2381 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2382 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2383   echo $ECHO_N "(cached) $ECHO_C" >&6
2384 else
2385
2386 cat > conftest.$ac_ext <<CF_EOF
2387 #include <stdio.h>
2388 int main()
2389 {
2390         ${cf_cv_main_return:-return}(0);
2391 }
2392 CF_EOF
2393 # We do the test twice because some compilers refuse to overwrite an
2394 # existing .o file with -o, though they will create one.
2395 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2396 if { (eval echo "$as_me:2396: \"$ac_try\"") >&5
2397   (eval $ac_try) 2>&5
2398   ac_status=$?
2399   echo "$as_me:2399: \$? = $ac_status" >&5
2400   (exit $ac_status); } &&
2401   test -f conftest2.$ac_objext && { (eval echo "$as_me:2401: \"$ac_try\"") >&5
2402   (eval $ac_try) 2>&5
2403   ac_status=$?
2404   echo "$as_me:2404: \$? = $ac_status" >&5
2405   (exit $ac_status); };
2406 then
2407   eval cf_cv_prog_CC_c_o=yes
2408 else
2409   eval cf_cv_prog_CC_c_o=no
2410 fi
2411 rm -rf conftest*
2412
2413 fi
2414 if test $cf_cv_prog_CC_c_o = yes; then
2415   echo "$as_me:2415: result: yes" >&5
2416 echo "${ECHO_T}yes" >&6
2417 else
2418   echo "$as_me:2418: result: no" >&5
2419 echo "${ECHO_T}no" >&6
2420 fi
2421
2422 if test "$cross_compiling" = yes ; then
2423   LDCONFIG=:
2424 else
2425 case "$cf_cv_system_name" in #(vi
2426 dragonfly*|mirbsd*|freebsd*) #(vi
2427   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2428   ;;
2429 *) LDPATH=$PATH:/sbin:/usr/sbin
2430   # Extract the first word of "ldconfig", so it can be a program name with args.
2431 set dummy ldconfig; ac_word=$2
2432 echo "$as_me:2432: checking for $ac_word" >&5
2433 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2434 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2435   echo $ECHO_N "(cached) $ECHO_C" >&6
2436 else
2437   case $LDCONFIG in
2438   [\\/]* | ?:[\\/]*)
2439   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2440   ;;
2441   *)
2442   ac_save_IFS=$IFS; IFS=$ac_path_separator
2443 ac_dummy="$LDPATH"
2444 for ac_dir in $ac_dummy; do
2445   IFS=$ac_save_IFS
2446   test -z "$ac_dir" && ac_dir=.
2447   if $as_executable_p "$ac_dir/$ac_word"; then
2448    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2449    echo "$as_me:2449: found $ac_dir/$ac_word" >&5
2450    break
2451 fi
2452 done
2453
2454   ;;
2455 esac
2456 fi
2457 LDCONFIG=$ac_cv_path_LDCONFIG
2458
2459 if test -n "$LDCONFIG"; then
2460   echo "$as_me:2460: result: $LDCONFIG" >&5
2461 echo "${ECHO_T}$LDCONFIG" >&6
2462 else
2463   echo "$as_me:2463: result: no" >&5
2464 echo "${ECHO_T}no" >&6
2465 fi
2466
2467   ;;
2468 esac
2469 fi
2470
2471 echo "$as_me:2471: checking if you want to ensure bool is consistent with C++" >&5
2472 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2473
2474 # Check whether --with-cxx or --without-cxx was given.
2475 if test "${with_cxx+set}" = set; then
2476   withval="$with_cxx"
2477   cf_with_cxx=$withval
2478 else
2479   cf_with_cxx=yes
2480 fi;
2481 echo "$as_me:2481: result: $cf_with_cxx" >&5
2482 echo "${ECHO_T}$cf_with_cxx" >&6
2483 if test "X$cf_with_cxx" = Xno ; then
2484         CXX=""
2485         GXX=""
2486 else
2487         # with autoconf 2.13, we can change the error to a warning:
2488                 ac_ext=cc
2489 ac_cpp='$CXXCPP $CPPFLAGS'
2490 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2491 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2492 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2493 ac_main_return=return
2494 if test -n "$ac_tool_prefix"; then
2495   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2496   do
2497     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2498 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2499 echo "$as_me:2499: checking for $ac_word" >&5
2500 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2501 if test "${ac_cv_prog_CXX+set}" = set; then
2502   echo $ECHO_N "(cached) $ECHO_C" >&6
2503 else
2504   if test -n "$CXX"; then
2505   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2506 else
2507   ac_save_IFS=$IFS; IFS=$ac_path_separator
2508 ac_dummy="$PATH"
2509 for ac_dir in $ac_dummy; do
2510   IFS=$ac_save_IFS
2511   test -z "$ac_dir" && ac_dir=.
2512   $as_executable_p "$ac_dir/$ac_word" || continue
2513 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2514 echo "$as_me:2514: found $ac_dir/$ac_word" >&5
2515 break
2516 done
2517
2518 fi
2519 fi
2520 CXX=$ac_cv_prog_CXX
2521 if test -n "$CXX"; then
2522   echo "$as_me:2522: result: $CXX" >&5
2523 echo "${ECHO_T}$CXX" >&6
2524 else
2525   echo "$as_me:2525: result: no" >&5
2526 echo "${ECHO_T}no" >&6
2527 fi
2528
2529     test -n "$CXX" && break
2530   done
2531 fi
2532 if test -z "$CXX"; then
2533   ac_ct_CXX=$CXX
2534   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2535 do
2536   # Extract the first word of "$ac_prog", so it can be a program name with args.
2537 set dummy $ac_prog; ac_word=$2
2538 echo "$as_me:2538: checking for $ac_word" >&5
2539 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2540 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2541   echo $ECHO_N "(cached) $ECHO_C" >&6
2542 else
2543   if test -n "$ac_ct_CXX"; then
2544   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2545 else
2546   ac_save_IFS=$IFS; IFS=$ac_path_separator
2547 ac_dummy="$PATH"
2548 for ac_dir in $ac_dummy; do
2549   IFS=$ac_save_IFS
2550   test -z "$ac_dir" && ac_dir=.
2551   $as_executable_p "$ac_dir/$ac_word" || continue
2552 ac_cv_prog_ac_ct_CXX="$ac_prog"
2553 echo "$as_me:2553: found $ac_dir/$ac_word" >&5
2554 break
2555 done
2556
2557 fi
2558 fi
2559 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2560 if test -n "$ac_ct_CXX"; then
2561   echo "$as_me:2561: result: $ac_ct_CXX" >&5
2562 echo "${ECHO_T}$ac_ct_CXX" >&6
2563 else
2564   echo "$as_me:2564: result: no" >&5
2565 echo "${ECHO_T}no" >&6
2566 fi
2567
2568   test -n "$ac_ct_CXX" && break
2569 done
2570 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2571
2572   CXX=$ac_ct_CXX
2573 fi
2574
2575 # Provide some information about the compiler.
2576 echo "$as_me:2576:" \
2577      "checking for C++ compiler version" >&5
2578 ac_compiler=`set X $ac_compile; echo $2`
2579 { (eval echo "$as_me:2579: \"$ac_compiler --version </dev/null >&5\"") >&5
2580   (eval $ac_compiler --version </dev/null >&5) 2>&5
2581   ac_status=$?
2582   echo "$as_me:2582: \$? = $ac_status" >&5
2583   (exit $ac_status); }
2584 { (eval echo "$as_me:2584: \"$ac_compiler -v </dev/null >&5\"") >&5
2585   (eval $ac_compiler -v </dev/null >&5) 2>&5
2586   ac_status=$?
2587   echo "$as_me:2587: \$? = $ac_status" >&5
2588   (exit $ac_status); }
2589 { (eval echo "$as_me:2589: \"$ac_compiler -V </dev/null >&5\"") >&5
2590   (eval $ac_compiler -V </dev/null >&5) 2>&5
2591   ac_status=$?
2592   echo "$as_me:2592: \$? = $ac_status" >&5
2593   (exit $ac_status); }
2594
2595 echo "$as_me:2595: checking whether we are using the GNU C++ compiler" >&5
2596 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2597 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2598   echo $ECHO_N "(cached) $ECHO_C" >&6
2599 else
2600   cat >conftest.$ac_ext <<_ACEOF
2601 #line 2601 "configure"
2602 #include "confdefs.h"
2603
2604 int
2605 main ()
2606 {
2607 #ifndef __GNUC__
2608        choke me
2609 #endif
2610
2611   ;
2612   return 0;
2613 }
2614 _ACEOF
2615 rm -f conftest.$ac_objext
2616 if { (eval echo "$as_me:2616: \"$ac_compile\"") >&5
2617   (eval $ac_compile) 2>&5
2618   ac_status=$?
2619   echo "$as_me:2619: \$? = $ac_status" >&5
2620   (exit $ac_status); } &&
2621          { ac_try='test -s conftest.$ac_objext'
2622   { (eval echo "$as_me:2622: \"$ac_try\"") >&5
2623   (eval $ac_try) 2>&5
2624   ac_status=$?
2625   echo "$as_me:2625: \$? = $ac_status" >&5
2626   (exit $ac_status); }; }; then
2627   ac_compiler_gnu=yes
2628 else
2629   echo "$as_me: failed program was:" >&5
2630 cat conftest.$ac_ext >&5
2631 ac_compiler_gnu=no
2632 fi
2633 rm -f conftest.$ac_objext conftest.$ac_ext
2634 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2635
2636 fi
2637 echo "$as_me:2637: result: $ac_cv_cxx_compiler_gnu" >&5
2638 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2639 GXX=`test $ac_compiler_gnu = yes && echo yes`
2640 ac_test_CXXFLAGS=${CXXFLAGS+set}
2641 ac_save_CXXFLAGS=$CXXFLAGS
2642 CXXFLAGS="-g"
2643 echo "$as_me:2643: checking whether $CXX accepts -g" >&5
2644 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2645 if test "${ac_cv_prog_cxx_g+set}" = set; then
2646   echo $ECHO_N "(cached) $ECHO_C" >&6
2647 else
2648   cat >conftest.$ac_ext <<_ACEOF
2649 #line 2649 "configure"
2650 #include "confdefs.h"
2651
2652 int
2653 main ()
2654 {
2655
2656   ;
2657   return 0;
2658 }
2659 _ACEOF
2660 rm -f conftest.$ac_objext
2661 if { (eval echo "$as_me:2661: \"$ac_compile\"") >&5
2662   (eval $ac_compile) 2>&5
2663   ac_status=$?
2664   echo "$as_me:2664: \$? = $ac_status" >&5
2665   (exit $ac_status); } &&
2666          { ac_try='test -s conftest.$ac_objext'
2667   { (eval echo "$as_me:2667: \"$ac_try\"") >&5
2668   (eval $ac_try) 2>&5
2669   ac_status=$?
2670   echo "$as_me:2670: \$? = $ac_status" >&5
2671   (exit $ac_status); }; }; then
2672   ac_cv_prog_cxx_g=yes
2673 else
2674   echo "$as_me: failed program was:" >&5
2675 cat conftest.$ac_ext >&5
2676 ac_cv_prog_cxx_g=no
2677 fi
2678 rm -f conftest.$ac_objext conftest.$ac_ext
2679 fi
2680 echo "$as_me:2680: result: $ac_cv_prog_cxx_g" >&5
2681 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2682 if test "$ac_test_CXXFLAGS" = set; then
2683   CXXFLAGS=$ac_save_CXXFLAGS
2684 elif test $ac_cv_prog_cxx_g = yes; then
2685   if test "$GXX" = yes; then
2686     CXXFLAGS="-g -O2"
2687   else
2688     CXXFLAGS="-g"
2689   fi
2690 else
2691   if test "$GXX" = yes; then
2692     CXXFLAGS="-O2"
2693   else
2694     CXXFLAGS=
2695   fi
2696 fi
2697 for ac_declaration in \
2698    ''\
2699    '#include <stdlib.h>' \
2700    'extern "C" void std::exit (int) throw (); using std::exit;' \
2701    'extern "C" void std::exit (int); using std::exit;' \
2702    'extern "C" void exit (int) throw ();' \
2703    'extern "C" void exit (int);' \
2704    'void exit (int);'
2705 do
2706   cat >conftest.$ac_ext <<_ACEOF
2707 #line 2707 "configure"
2708 #include "confdefs.h"
2709 #include <stdlib.h>
2710 $ac_declaration
2711 int
2712 main ()
2713 {
2714 exit (42);
2715   ;
2716   return 0;
2717 }
2718 _ACEOF
2719 rm -f conftest.$ac_objext
2720 if { (eval echo "$as_me:2720: \"$ac_compile\"") >&5
2721   (eval $ac_compile) 2>&5
2722   ac_status=$?
2723   echo "$as_me:2723: \$? = $ac_status" >&5
2724   (exit $ac_status); } &&
2725          { ac_try='test -s conftest.$ac_objext'
2726   { (eval echo "$as_me:2726: \"$ac_try\"") >&5
2727   (eval $ac_try) 2>&5
2728   ac_status=$?
2729   echo "$as_me:2729: \$? = $ac_status" >&5
2730   (exit $ac_status); }; }; then
2731   :
2732 else
2733   echo "$as_me: failed program was:" >&5
2734 cat conftest.$ac_ext >&5
2735 continue
2736 fi
2737 rm -f conftest.$ac_objext conftest.$ac_ext
2738   cat >conftest.$ac_ext <<_ACEOF
2739 #line 2739 "configure"
2740 #include "confdefs.h"
2741 $ac_declaration
2742 int
2743 main ()
2744 {
2745 exit (42);
2746   ;
2747   return 0;
2748 }
2749 _ACEOF
2750 rm -f conftest.$ac_objext
2751 if { (eval echo "$as_me:2751: \"$ac_compile\"") >&5
2752   (eval $ac_compile) 2>&5
2753   ac_status=$?
2754   echo "$as_me:2754: \$? = $ac_status" >&5
2755   (exit $ac_status); } &&
2756          { ac_try='test -s conftest.$ac_objext'
2757   { (eval echo "$as_me:2757: \"$ac_try\"") >&5
2758   (eval $ac_try) 2>&5
2759   ac_status=$?
2760   echo "$as_me:2760: \$? = $ac_status" >&5
2761   (exit $ac_status); }; }; then
2762   break
2763 else
2764   echo "$as_me: failed program was:" >&5
2765 cat conftest.$ac_ext >&5
2766 fi
2767 rm -f conftest.$ac_objext conftest.$ac_ext
2768 done
2769 rm -rf conftest*
2770 if test -n "$ac_declaration"; then
2771   echo '#ifdef __cplusplus' >>confdefs.h
2772   echo $ac_declaration      >>confdefs.h
2773   echo '#endif'             >>confdefs.h
2774 fi
2775
2776 ac_ext=c
2777 ac_cpp='$CPP $CPPFLAGS'
2778 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2779 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2780 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2781 ac_main_return=return
2782
2783                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2784         if test "$CXX" = "g++" ; then
2785                 # Extract the first word of "g++", so it can be a program name with args.
2786 set dummy g++; ac_word=$2
2787 echo "$as_me:2787: checking for $ac_word" >&5
2788 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2789 if test "${ac_cv_path_CXX+set}" = set; then
2790   echo $ECHO_N "(cached) $ECHO_C" >&6
2791 else
2792   case $CXX in
2793   [\\/]* | ?:[\\/]*)
2794   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2795   ;;
2796   *)
2797   ac_save_IFS=$IFS; IFS=$ac_path_separator
2798 ac_dummy="$PATH"
2799 for ac_dir in $ac_dummy; do
2800   IFS=$ac_save_IFS
2801   test -z "$ac_dir" && ac_dir=.
2802   if $as_executable_p "$ac_dir/$ac_word"; then
2803    ac_cv_path_CXX="$ac_dir/$ac_word"
2804    echo "$as_me:2804: found $ac_dir/$ac_word" >&5
2805    break
2806 fi
2807 done
2808
2809   ;;
2810 esac
2811 fi
2812 CXX=$ac_cv_path_CXX
2813
2814 if test -n "$CXX"; then
2815   echo "$as_me:2815: result: $CXX" >&5
2816 echo "${ECHO_T}$CXX" >&6
2817 else
2818   echo "$as_me:2818: result: no" >&5
2819 echo "${ECHO_T}no" >&6
2820 fi
2821
2822         fi
2823         case "x$CXX" in #(vi
2824         x|xg++)
2825                 { echo "$as_me:2825: WARNING: You don't have any C++ compiler, too bad" >&5
2826 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2827                 cf_with_cxx=no; CXX=""; GXX="";
2828                 ;;
2829         esac
2830 fi
2831
2832 GXX_VERSION=none
2833 if test "$GXX" = yes; then
2834         echo "$as_me:2834: checking version of ${CXX:-g++}" >&5
2835 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2836         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2837         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2838         echo "$as_me:2838: result: $GXX_VERSION" >&5
2839 echo "${ECHO_T}$GXX_VERSION" >&6
2840 fi
2841
2842 case $GXX_VERSION in
2843 1*|2.[0-6]*)
2844         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2845         # cf_cxx_library=no
2846         { echo "$as_me:2846: WARNING: templates do not work" >&5
2847 echo "$as_me: WARNING: templates do not work" >&2;}
2848         ;;
2849 esac
2850
2851 echo "$as_me:2851: checking if you want to build C++ binding and demo" >&5
2852 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2853
2854 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2855 if test "${with_cxx_binding+set}" = set; then
2856   withval="$with_cxx_binding"
2857   cf_with_cxx_binding=$withval
2858 else
2859   cf_with_cxx_binding=$cf_with_cxx
2860 fi;
2861 echo "$as_me:2861: result: $cf_with_cxx_binding" >&5
2862 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2863
2864 echo "$as_me:2864: checking if you want to build with Ada95" >&5
2865 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2866 echo "$as_me:2866: result: $cf_with_ada" >&5
2867 echo "${ECHO_T}$cf_with_ada" >&6
2868
2869 echo "$as_me:2869: checking if you want to install terminal database" >&5
2870 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
2871
2872 # Check whether --enable-db-install or --disable-db-install was given.
2873 if test "${enable_db_install+set}" = set; then
2874   enableval="$enable_db_install"
2875   cf_with_db_install=$enableval
2876 else
2877   cf_with_db_install=yes
2878 fi;
2879 echo "$as_me:2879: result: $cf_with_db_install" >&5
2880 echo "${ECHO_T}$cf_with_db_install" >&6
2881
2882 echo "$as_me:2882: checking if you want to install manpages" >&5
2883 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2884
2885 # Check whether --with-manpages or --without-manpages was given.
2886 if test "${with_manpages+set}" = set; then
2887   withval="$with_manpages"
2888   cf_with_manpages=$withval
2889 else
2890   cf_with_manpages=yes
2891 fi;
2892 echo "$as_me:2892: result: $cf_with_manpages" >&5
2893 echo "${ECHO_T}$cf_with_manpages" >&6
2894
2895 echo "$as_me:2895: checking if you want to build programs such as tic" >&5
2896 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2897
2898 # Check whether --with-progs or --without-progs was given.
2899 if test "${with_progs+set}" = set; then
2900   withval="$with_progs"
2901   cf_with_progs=$withval
2902 else
2903   cf_with_progs=yes
2904 fi;
2905 echo "$as_me:2905: result: $cf_with_progs" >&5
2906 echo "${ECHO_T}$cf_with_progs" >&6
2907
2908 echo "$as_me:2908: checking if you want to build test-programs" >&5
2909 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2910
2911 # Check whether --with-tests or --without-tests was given.
2912 if test "${with_tests+set}" = set; then
2913   withval="$with_tests"
2914   cf_with_tests=$withval
2915 else
2916   cf_with_tests=yes
2917 fi;
2918 echo "$as_me:2918: result: $cf_with_tests" >&5
2919 echo "${ECHO_T}$cf_with_tests" >&6
2920
2921 echo "$as_me:2921: checking if you wish to install curses.h" >&5
2922 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2923
2924 # Check whether --with-curses-h or --without-curses-h was given.
2925 if test "${with_curses_h+set}" = set; then
2926   withval="$with_curses_h"
2927   with_curses_h=$withval
2928 else
2929   with_curses_h=yes
2930 fi;
2931 echo "$as_me:2931: result: $with_curses_h" >&5
2932 echo "${ECHO_T}$with_curses_h" >&6
2933
2934 modules_to_build="ncurses"
2935 if test "X$cf_with_progs" != Xno ; then
2936 modules_to_build="$modules_to_build progs tack"
2937 fi
2938 modules_to_build="$modules_to_build panel menu form"
2939
2940 test "$program_prefix" != NONE &&
2941   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2942 # Use a double $ so make ignores it.
2943 test "$program_suffix" != NONE &&
2944   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2945 # Double any \ or $.  echo might interpret backslashes.
2946 # By default was `s,x,x', remove it if useless.
2947 cat <<\_ACEOF >conftest.sed
2948 s/[\\$]/&&/g;s/;s,x,x,$//
2949 _ACEOF
2950 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2951 rm conftest.sed
2952
2953 for ac_prog in mawk gawk nawk awk
2954 do
2955   # Extract the first word of "$ac_prog", so it can be a program name with args.
2956 set dummy $ac_prog; ac_word=$2
2957 echo "$as_me:2957: checking for $ac_word" >&5
2958 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2959 if test "${ac_cv_prog_AWK+set}" = set; then
2960   echo $ECHO_N "(cached) $ECHO_C" >&6
2961 else
2962   if test -n "$AWK"; then
2963   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2964 else
2965   ac_save_IFS=$IFS; IFS=$ac_path_separator
2966 ac_dummy="$PATH"
2967 for ac_dir in $ac_dummy; do
2968   IFS=$ac_save_IFS
2969   test -z "$ac_dir" && ac_dir=.
2970   $as_executable_p "$ac_dir/$ac_word" || continue
2971 ac_cv_prog_AWK="$ac_prog"
2972 echo "$as_me:2972: found $ac_dir/$ac_word" >&5
2973 break
2974 done
2975
2976 fi
2977 fi
2978 AWK=$ac_cv_prog_AWK
2979 if test -n "$AWK"; then
2980   echo "$as_me:2980: result: $AWK" >&5
2981 echo "${ECHO_T}$AWK" >&6
2982 else
2983   echo "$as_me:2983: result: no" >&5
2984 echo "${ECHO_T}no" >&6
2985 fi
2986
2987   test -n "$AWK" && break
2988 done
2989
2990 test -z "$AWK" && { { echo "$as_me:2990: error: No awk program found" >&5
2991 echo "$as_me: error: No awk program found" >&2;}
2992    { (exit 1); exit 1; }; }
2993
2994 echo "$as_me:2994: checking for egrep" >&5
2995 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2996 if test "${ac_cv_prog_egrep+set}" = set; then
2997   echo $ECHO_N "(cached) $ECHO_C" >&6
2998 else
2999   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3000     then ac_cv_prog_egrep='grep -E'
3001     else ac_cv_prog_egrep='egrep'
3002     fi
3003 fi
3004 echo "$as_me:3004: result: $ac_cv_prog_egrep" >&5
3005 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3006  EGREP=$ac_cv_prog_egrep
3007
3008 test -z "$EGREP" && { { echo "$as_me:3008: error: No egrep program found" >&5
3009 echo "$as_me: error: No egrep program found" >&2;}
3010    { (exit 1); exit 1; }; }
3011
3012 # Find a good install program.  We prefer a C program (faster),
3013 # so one script is as good as another.  But avoid the broken or
3014 # incompatible versions:
3015 # SysV /etc/install, /usr/sbin/install
3016 # SunOS /usr/etc/install
3017 # IRIX /sbin/install
3018 # AIX /bin/install
3019 # AmigaOS /C/install, which installs bootblocks on floppy discs
3020 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3021 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3022 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3023 # ./install, which can be erroneously created by make from ./install.sh.
3024 echo "$as_me:3024: checking for a BSD compatible install" >&5
3025 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3026 if test -z "$INSTALL"; then
3027 if test "${ac_cv_path_install+set}" = set; then
3028   echo $ECHO_N "(cached) $ECHO_C" >&6
3029 else
3030     ac_save_IFS=$IFS; IFS=$ac_path_separator
3031   for ac_dir in $PATH; do
3032     IFS=$ac_save_IFS
3033     # Account for people who put trailing slashes in PATH elements.
3034     case $ac_dir/ in
3035     / | ./ | .// | /cC/* \
3036     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3037     | /usr/ucb/* ) ;;
3038     *)
3039       # OSF1 and SCO ODT 3.0 have their own names for install.
3040       # Don't use installbsd from OSF since it installs stuff as root
3041       # by default.
3042       for ac_prog in ginstall scoinst install; do
3043         if $as_executable_p "$ac_dir/$ac_prog"; then
3044           if test $ac_prog = install &&
3045             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3046             # AIX install.  It has an incompatible calling convention.
3047             :
3048           elif test $ac_prog = install &&
3049             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3050             # program-specific install script used by HP pwplus--don't use.
3051             :
3052           else
3053             ac_cv_path_install="$ac_dir/$ac_prog -c"
3054             break 2
3055           fi
3056         fi
3057       done
3058       ;;
3059     esac
3060   done
3061
3062 fi
3063   if test "${ac_cv_path_install+set}" = set; then
3064     INSTALL=$ac_cv_path_install
3065   else
3066     # As a last resort, use the slow shell script.  We don't cache a
3067     # path for INSTALL within a source directory, because that will
3068     # break other packages using the cache if that directory is
3069     # removed, or if the path is relative.
3070     INSTALL=$ac_install_sh
3071   fi
3072 fi
3073 echo "$as_me:3073: result: $INSTALL" >&5
3074 echo "${ECHO_T}$INSTALL" >&6
3075
3076 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3077 # It thinks the first close brace ends the variable substitution.
3078 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3079
3080 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3081
3082 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3083
3084 case $INSTALL in
3085 /*)
3086   ;;
3087 *)
3088   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3089   test -z "$cf_dir" && cf_dir=.
3090   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3091   ;;
3092 esac
3093
3094 for ac_prog in tdlint lint alint splint lclint
3095 do
3096   # Extract the first word of "$ac_prog", so it can be a program name with args.
3097 set dummy $ac_prog; ac_word=$2
3098 echo "$as_me:3098: checking for $ac_word" >&5
3099 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3100 if test "${ac_cv_prog_LINT+set}" = set; then
3101   echo $ECHO_N "(cached) $ECHO_C" >&6
3102 else
3103   if test -n "$LINT"; then
3104   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3105 else
3106   ac_save_IFS=$IFS; IFS=$ac_path_separator
3107 ac_dummy="$PATH"
3108 for ac_dir in $ac_dummy; do
3109   IFS=$ac_save_IFS
3110   test -z "$ac_dir" && ac_dir=.
3111   $as_executable_p "$ac_dir/$ac_word" || continue
3112 ac_cv_prog_LINT="$ac_prog"
3113 echo "$as_me:3113: found $ac_dir/$ac_word" >&5
3114 break
3115 done
3116
3117 fi
3118 fi
3119 LINT=$ac_cv_prog_LINT
3120 if test -n "$LINT"; then
3121   echo "$as_me:3121: result: $LINT" >&5
3122 echo "${ECHO_T}$LINT" >&6
3123 else
3124   echo "$as_me:3124: result: no" >&5
3125 echo "${ECHO_T}no" >&6
3126 fi
3127
3128   test -n "$LINT" && break
3129 done
3130
3131 echo "$as_me:3131: checking whether ln -s works" >&5
3132 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3133 LN_S=$as_ln_s
3134 if test "$LN_S" = "ln -s"; then
3135   echo "$as_me:3135: result: yes" >&5
3136 echo "${ECHO_T}yes" >&6
3137 else
3138   echo "$as_me:3138: result: no, using $LN_S" >&5
3139 echo "${ECHO_T}no, using $LN_S" >&6
3140 fi
3141
3142 echo "$as_me:3142: checking if $LN_S -f options work" >&5
3143 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3144
3145 rm -f conf$$.src conf$$dst
3146 echo >conf$$.dst
3147 echo first >conf$$.src
3148 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3149         cf_prog_ln_sf=yes
3150 else
3151         cf_prog_ln_sf=no
3152 fi
3153 rm -f conf$$.dst conf$$src
3154 echo "$as_me:3154: result: $cf_prog_ln_sf" >&5
3155 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3156
3157 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3158
3159 echo "$as_me:3159: checking for long file names" >&5
3160 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3161 if test "${ac_cv_sys_long_file_names+set}" = set; then
3162   echo $ECHO_N "(cached) $ECHO_C" >&6
3163 else
3164   ac_cv_sys_long_file_names=yes
3165 # Test for long file names in all the places we know might matter:
3166 #      .                the current directory, where building will happen
3167 #      $prefix/lib      where we will be installing things
3168 #      $exec_prefix/lib likewise
3169 # eval it to expand exec_prefix.
3170 #      $TMPDIR          if set, where it might want to write temporary files
3171 # if $TMPDIR is not set:
3172 #      /tmp             where it might want to write temporary files
3173 #      /var/tmp         likewise
3174 #      /usr/tmp         likewise
3175 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3176   ac_tmpdirs=$TMPDIR
3177 else
3178   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3179 fi
3180 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3181   test -d $ac_dir || continue
3182   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3183   ac_xdir=$ac_dir/cf$$
3184   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3185   ac_tf1=$ac_xdir/conftest9012345
3186   ac_tf2=$ac_xdir/conftest9012346
3187   (echo 1 >$ac_tf1) 2>/dev/null
3188   (echo 2 >$ac_tf2) 2>/dev/null
3189   ac_val=`cat $ac_tf1 2>/dev/null`
3190   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3191     ac_cv_sys_long_file_names=no
3192     rm -rf $ac_xdir 2>/dev/null
3193     break
3194   fi
3195   rm -rf $ac_xdir 2>/dev/null
3196 done
3197 fi
3198 echo "$as_me:3198: result: $ac_cv_sys_long_file_names" >&5
3199 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3200 if test $ac_cv_sys_long_file_names = yes; then
3201
3202 cat >>confdefs.h <<\EOF
3203 #define HAVE_LONG_FILE_NAMES 1
3204 EOF
3205
3206 fi
3207
3208 # if we find pkg-config, check if we should install the ".pc" files.
3209
3210 echo "$as_me:3210: checking if you want to use pkg-config" >&5
3211 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3212
3213 # Check whether --with-pkg-config or --without-pkg-config was given.
3214 if test "${with_pkg_config+set}" = set; then
3215   withval="$with_pkg_config"
3216   cf_pkg_config=$withval
3217 else
3218   cf_pkg_config=yes
3219 fi;
3220 echo "$as_me:3220: result: $cf_pkg_config" >&5
3221 echo "${ECHO_T}$cf_pkg_config" >&6
3222
3223 case $cf_pkg_config in #(vi
3224 no) #(vi
3225         PKG_CONFIG=none
3226         ;;
3227 yes) #(vi
3228
3229 if test -n "$ac_tool_prefix"; then
3230   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3231 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3232 echo "$as_me:3232: checking for $ac_word" >&5
3233 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3234 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3235   echo $ECHO_N "(cached) $ECHO_C" >&6
3236 else
3237   case $PKG_CONFIG in
3238   [\\/]* | ?:[\\/]*)
3239   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3240   ;;
3241   *)
3242   ac_save_IFS=$IFS; IFS=$ac_path_separator
3243 ac_dummy="$PATH"
3244 for ac_dir in $ac_dummy; do
3245   IFS=$ac_save_IFS
3246   test -z "$ac_dir" && ac_dir=.
3247   if $as_executable_p "$ac_dir/$ac_word"; then
3248    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3249    echo "$as_me:3249: found $ac_dir/$ac_word" >&5
3250    break
3251 fi
3252 done
3253
3254   ;;
3255 esac
3256 fi
3257 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3258
3259 if test -n "$PKG_CONFIG"; then
3260   echo "$as_me:3260: result: $PKG_CONFIG" >&5
3261 echo "${ECHO_T}$PKG_CONFIG" >&6
3262 else
3263   echo "$as_me:3263: result: no" >&5
3264 echo "${ECHO_T}no" >&6
3265 fi
3266
3267 fi
3268 if test -z "$ac_cv_path_PKG_CONFIG"; then
3269   ac_pt_PKG_CONFIG=$PKG_CONFIG
3270   # Extract the first word of "pkg-config", so it can be a program name with args.
3271 set dummy pkg-config; ac_word=$2
3272 echo "$as_me:3272: checking for $ac_word" >&5
3273 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3274 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3275   echo $ECHO_N "(cached) $ECHO_C" >&6
3276 else
3277   case $ac_pt_PKG_CONFIG in
3278   [\\/]* | ?:[\\/]*)
3279   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3280   ;;
3281   *)
3282   ac_save_IFS=$IFS; IFS=$ac_path_separator
3283 ac_dummy="$PATH"
3284 for ac_dir in $ac_dummy; do
3285   IFS=$ac_save_IFS
3286   test -z "$ac_dir" && ac_dir=.
3287   if $as_executable_p "$ac_dir/$ac_word"; then
3288    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3289    echo "$as_me:3289: found $ac_dir/$ac_word" >&5
3290    break
3291 fi
3292 done
3293
3294   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3295   ;;
3296 esac
3297 fi
3298 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3299
3300 if test -n "$ac_pt_PKG_CONFIG"; then
3301   echo "$as_me:3301: result: $ac_pt_PKG_CONFIG" >&5
3302 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3303 else
3304   echo "$as_me:3304: result: no" >&5
3305 echo "${ECHO_T}no" >&6
3306 fi
3307
3308   PKG_CONFIG=$ac_pt_PKG_CONFIG
3309 else
3310   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3311 fi
3312
3313         ;;
3314 *)
3315         PKG_CONFIG=$withval
3316         ;;
3317 esac
3318
3319 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3320 if test "$PKG_CONFIG" != none ; then
3321
3322 if test "x$prefix" != xNONE; then
3323   cf_path_syntax="$prefix"
3324 else
3325   cf_path_syntax="$ac_default_prefix"
3326 fi
3327
3328 case ".$PKG_CONFIG" in #(vi
3329 .\$\(*\)*|.\'*\'*) #(vi
3330   ;;
3331 ..|./*|.\\*) #(vi
3332   ;;
3333 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3334   ;;
3335 .\${*prefix}*|.\${*dir}*) #(vi
3336   eval PKG_CONFIG="$PKG_CONFIG"
3337   case ".$PKG_CONFIG" in #(vi
3338   .NONE/*)
3339     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3340     ;;
3341   esac
3342   ;; #(vi
3343 .no|.NONE/*)
3344   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3345   ;;
3346 *)
3347   { { echo "$as_me:3347: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3348 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3349    { (exit 1); exit 1; }; }
3350   ;;
3351 esac
3352
3353 fi
3354
3355 if test "$PKG_CONFIG" != none ; then
3356         echo "$as_me:3356: checking for $PKG_CONFIG library directory" >&5
3357 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3358
3359 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3360 if test "${with_pkg_config_libdir+set}" = set; then
3361   withval="$with_pkg_config_libdir"
3362   PKG_CONFIG_LIBDIR=$withval
3363 else
3364   PKG_CONFIG_LIBDIR=yes
3365 fi;
3366
3367         case x$PKG_CONFIG_LIBDIR in #(vi
3368         x/*) #(vi
3369                 ;;
3370         xyes) #(vi
3371                 # look for the library directory using the same prefix as the executable
3372                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3373                 case x`(arch) 2>/dev/null` in #(vi
3374                 *64) #(vi
3375                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3376                         do
3377                                 if test -d $cf_config/pkgconfig
3378                                 then
3379                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3380                                         break
3381                                 fi
3382                         done
3383                         ;;
3384                 *)
3385                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3386                         ;;
3387                 esac
3388                 ;;
3389         *)
3390                 ;;
3391         esac
3392
3393         echo "$as_me:3393: result: $PKG_CONFIG_LIBDIR" >&5
3394 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3395 fi
3396
3397 if test "$PKG_CONFIG" != none ; then
3398         echo "$as_me:3398: checking if we should install .pc files for $PKG_CONFIG" >&5
3399 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3400
3401 # Check whether --enable-pc-files or --disable-pc-files was given.
3402 if test "${enable_pc_files+set}" = set; then
3403   enableval="$enable_pc_files"
3404   enable_pc_files=$enableval
3405 else
3406   enable_pc_files=no
3407 fi;
3408         echo "$as_me:3408: result: $enable_pc_files" >&5
3409 echo "${ECHO_T}$enable_pc_files" >&6
3410         if test "$enable_pc_files" != no
3411         then
3412
3413 if test "x$prefix" != xNONE; then
3414   cf_path_syntax="$prefix"
3415 else
3416   cf_path_syntax="$ac_default_prefix"
3417 fi
3418
3419 case ".$PKG_CONFIG_LIBDIR" in #(vi
3420 .\$\(*\)*|.\'*\'*) #(vi
3421   ;;
3422 ..|./*|.\\*) #(vi
3423   ;;
3424 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3425   ;;
3426 .\${*prefix}*|.\${*dir}*) #(vi
3427   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3428   case ".$PKG_CONFIG_LIBDIR" in #(vi
3429   .NONE/*)
3430     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3431     ;;
3432   esac
3433   ;; #(vi
3434 .no|.NONE/*)
3435   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3436   ;;
3437 *)
3438   { { echo "$as_me:3438: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3439 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3440    { (exit 1); exit 1; }; }
3441   ;;
3442 esac
3443
3444         fi
3445 else
3446         enable_pc_files=no
3447 fi
3448
3449 echo "$as_me:3449: checking if we should assume mixed-case filenames" >&5
3450 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3451
3452 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3453 if test "${enable_mixed_case+set}" = set; then
3454   enableval="$enable_mixed_case"
3455   enable_mixedcase=$enableval
3456 else
3457   enable_mixedcase=auto
3458 fi;
3459 echo "$as_me:3459: result: $enable_mixedcase" >&5
3460 echo "${ECHO_T}$enable_mixedcase" >&6
3461 if test "$enable_mixedcase" = "auto" ; then
3462
3463 echo "$as_me:3463: checking if filesystem supports mixed-case filenames" >&5
3464 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3465 if test "${cf_cv_mixedcase+set}" = set; then
3466   echo $ECHO_N "(cached) $ECHO_C" >&6
3467 else
3468
3469 if test "$cross_compiling" = yes ; then
3470         case $target_alias in #(vi
3471         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3472                 cf_cv_mixedcase=no
3473                 ;;
3474         *)
3475                 cf_cv_mixedcase=yes
3476                 ;;
3477         esac
3478 else
3479         rm -f conftest CONFTEST
3480         echo test >conftest
3481         if test -f CONFTEST ; then
3482                 cf_cv_mixedcase=no
3483         else
3484                 cf_cv_mixedcase=yes
3485         fi
3486         rm -f conftest CONFTEST
3487 fi
3488
3489 fi
3490 echo "$as_me:3490: result: $cf_cv_mixedcase" >&5
3491 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3492 test "$cf_cv_mixedcase" = yes &&
3493 cat >>confdefs.h <<\EOF
3494 #define MIXEDCASE_FILENAMES 1
3495 EOF
3496
3497 else
3498     cf_cv_mixedcase=$enable_mixedcase
3499     if test "x$enable_mixedcase" = "xyes" ; then
3500
3501 cat >>confdefs.h <<\EOF
3502 #define MIXEDCASE_FILENAMES 1
3503 EOF
3504
3505     fi
3506 fi
3507
3508 # do this after mixed-case option (tags/TAGS is not as important as tic).
3509 echo "$as_me:3509: checking whether ${MAKE-make} sets \${MAKE}" >&5
3510 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3511 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3512 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3513   echo $ECHO_N "(cached) $ECHO_C" >&6
3514 else
3515   cat >conftest.make <<\EOF
3516 all:
3517         @echo 'ac_maketemp="${MAKE}"'
3518 EOF
3519 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3520 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3521 if test -n "$ac_maketemp"; then
3522   eval ac_cv_prog_make_${ac_make}_set=yes
3523 else
3524   eval ac_cv_prog_make_${ac_make}_set=no
3525 fi
3526 rm -f conftest.make
3527 fi
3528 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3529   echo "$as_me:3529: result: yes" >&5
3530 echo "${ECHO_T}yes" >&6
3531   SET_MAKE=
3532 else
3533   echo "$as_me:3533: result: no" >&5
3534 echo "${ECHO_T}no" >&6
3535   SET_MAKE="MAKE=${MAKE-make}"
3536 fi
3537
3538 for ac_prog in exctags ctags
3539 do
3540   # Extract the first word of "$ac_prog", so it can be a program name with args.
3541 set dummy $ac_prog; ac_word=$2
3542 echo "$as_me:3542: checking for $ac_word" >&5
3543 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3544 if test "${ac_cv_prog_CTAGS+set}" = set; then
3545   echo $ECHO_N "(cached) $ECHO_C" >&6
3546 else
3547   if test -n "$CTAGS"; then
3548   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3549 else
3550   ac_save_IFS=$IFS; IFS=$ac_path_separator
3551 ac_dummy="$PATH"
3552 for ac_dir in $ac_dummy; do
3553   IFS=$ac_save_IFS
3554   test -z "$ac_dir" && ac_dir=.
3555   $as_executable_p "$ac_dir/$ac_word" || continue
3556 ac_cv_prog_CTAGS="$ac_prog"
3557 echo "$as_me:3557: found $ac_dir/$ac_word" >&5
3558 break
3559 done
3560
3561 fi
3562 fi
3563 CTAGS=$ac_cv_prog_CTAGS
3564 if test -n "$CTAGS"; then
3565   echo "$as_me:3565: result: $CTAGS" >&5
3566 echo "${ECHO_T}$CTAGS" >&6
3567 else
3568   echo "$as_me:3568: result: no" >&5
3569 echo "${ECHO_T}no" >&6
3570 fi
3571
3572   test -n "$CTAGS" && break
3573 done
3574
3575 for ac_prog in exetags etags
3576 do
3577   # Extract the first word of "$ac_prog", so it can be a program name with args.
3578 set dummy $ac_prog; ac_word=$2
3579 echo "$as_me:3579: checking for $ac_word" >&5
3580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3581 if test "${ac_cv_prog_ETAGS+set}" = set; then
3582   echo $ECHO_N "(cached) $ECHO_C" >&6
3583 else
3584   if test -n "$ETAGS"; then
3585   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3586 else
3587   ac_save_IFS=$IFS; IFS=$ac_path_separator
3588 ac_dummy="$PATH"
3589 for ac_dir in $ac_dummy; do
3590   IFS=$ac_save_IFS
3591   test -z "$ac_dir" && ac_dir=.
3592   $as_executable_p "$ac_dir/$ac_word" || continue
3593 ac_cv_prog_ETAGS="$ac_prog"
3594 echo "$as_me:3594: found $ac_dir/$ac_word" >&5
3595 break
3596 done
3597
3598 fi
3599 fi
3600 ETAGS=$ac_cv_prog_ETAGS
3601 if test -n "$ETAGS"; then
3602   echo "$as_me:3602: result: $ETAGS" >&5
3603 echo "${ECHO_T}$ETAGS" >&6
3604 else
3605   echo "$as_me:3605: result: no" >&5
3606 echo "${ECHO_T}no" >&6
3607 fi
3608
3609   test -n "$ETAGS" && break
3610 done
3611
3612 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3613 set dummy ${CTAGS:-ctags}; ac_word=$2
3614 echo "$as_me:3614: checking for $ac_word" >&5
3615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3616 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3617   echo $ECHO_N "(cached) $ECHO_C" >&6
3618 else
3619   if test -n "$MAKE_LOWER_TAGS"; then
3620   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3621 else
3622   ac_save_IFS=$IFS; IFS=$ac_path_separator
3623 ac_dummy="$PATH"
3624 for ac_dir in $ac_dummy; do
3625   IFS=$ac_save_IFS
3626   test -z "$ac_dir" && ac_dir=.
3627   $as_executable_p "$ac_dir/$ac_word" || continue
3628 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3629 echo "$as_me:3629: found $ac_dir/$ac_word" >&5
3630 break
3631 done
3632
3633   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3634 fi
3635 fi
3636 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3637 if test -n "$MAKE_LOWER_TAGS"; then
3638   echo "$as_me:3638: result: $MAKE_LOWER_TAGS" >&5
3639 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3640 else
3641   echo "$as_me:3641: result: no" >&5
3642 echo "${ECHO_T}no" >&6
3643 fi
3644
3645 if test "$cf_cv_mixedcase" = yes ; then
3646         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3647 set dummy ${ETAGS:-etags}; ac_word=$2
3648 echo "$as_me:3648: checking for $ac_word" >&5
3649 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3650 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3651   echo $ECHO_N "(cached) $ECHO_C" >&6
3652 else
3653   if test -n "$MAKE_UPPER_TAGS"; then
3654   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3655 else
3656   ac_save_IFS=$IFS; IFS=$ac_path_separator
3657 ac_dummy="$PATH"
3658 for ac_dir in $ac_dummy; do
3659   IFS=$ac_save_IFS
3660   test -z "$ac_dir" && ac_dir=.
3661   $as_executable_p "$ac_dir/$ac_word" || continue
3662 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3663 echo "$as_me:3663: found $ac_dir/$ac_word" >&5
3664 break
3665 done
3666
3667   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3668 fi
3669 fi
3670 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3671 if test -n "$MAKE_UPPER_TAGS"; then
3672   echo "$as_me:3672: result: $MAKE_UPPER_TAGS" >&5
3673 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3674 else
3675   echo "$as_me:3675: result: no" >&5
3676 echo "${ECHO_T}no" >&6
3677 fi
3678
3679 else
3680         MAKE_UPPER_TAGS=no
3681 fi
3682
3683 if test "$MAKE_UPPER_TAGS" = yes ; then
3684         MAKE_UPPER_TAGS=
3685 else
3686         MAKE_UPPER_TAGS="#"
3687 fi
3688
3689 if test "$MAKE_LOWER_TAGS" = yes ; then
3690         MAKE_LOWER_TAGS=
3691 else
3692         MAKE_LOWER_TAGS="#"
3693 fi
3694
3695 echo "$as_me:3695: checking for makeflags variable" >&5
3696 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3697 if test "${cf_cv_makeflags+set}" = set; then
3698   echo $ECHO_N "(cached) $ECHO_C" >&6
3699 else
3700
3701         cf_cv_makeflags=''
3702         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3703         do
3704                 cat >cf_makeflags.tmp <<CF_EOF
3705 SHELL = /bin/sh
3706 all :
3707         @ echo '.$cf_option'
3708 CF_EOF
3709                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3710                 case "$cf_result" in
3711                 .*k)
3712                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3713                         case "$cf_result" in
3714                         .*CC=*) cf_cv_makeflags=
3715                                 ;;
3716                         *)      cf_cv_makeflags=$cf_option
3717                                 ;;
3718                         esac
3719                         break
3720                         ;;
3721                 .-)     ;;
3722                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3723                         ;;
3724                 esac
3725         done
3726         rm -f cf_makeflags.tmp
3727
3728 fi
3729 echo "$as_me:3729: result: $cf_cv_makeflags" >&5
3730 echo "${ECHO_T}$cf_cv_makeflags" >&6
3731
3732 if test -n "$ac_tool_prefix"; then
3733   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3734 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3735 echo "$as_me:3735: checking for $ac_word" >&5
3736 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3737 if test "${ac_cv_prog_RANLIB+set}" = set; then
3738   echo $ECHO_N "(cached) $ECHO_C" >&6
3739 else
3740   if test -n "$RANLIB"; then
3741   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3742 else
3743   ac_save_IFS=$IFS; IFS=$ac_path_separator
3744 ac_dummy="$PATH"
3745 for ac_dir in $ac_dummy; do
3746   IFS=$ac_save_IFS
3747   test -z "$ac_dir" && ac_dir=.
3748   $as_executable_p "$ac_dir/$ac_word" || continue
3749 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3750 echo "$as_me:3750: found $ac_dir/$ac_word" >&5
3751 break
3752 done
3753
3754 fi
3755 fi
3756 RANLIB=$ac_cv_prog_RANLIB
3757 if test -n "$RANLIB"; then
3758   echo "$as_me:3758: result: $RANLIB" >&5
3759 echo "${ECHO_T}$RANLIB" >&6
3760 else
3761   echo "$as_me:3761: result: no" >&5
3762 echo "${ECHO_T}no" >&6
3763 fi
3764
3765 fi
3766 if test -z "$ac_cv_prog_RANLIB"; then
3767   ac_ct_RANLIB=$RANLIB
3768   # Extract the first word of "ranlib", so it can be a program name with args.
3769 set dummy ranlib; ac_word=$2
3770 echo "$as_me:3770: checking for $ac_word" >&5
3771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3772 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3773   echo $ECHO_N "(cached) $ECHO_C" >&6
3774 else
3775   if test -n "$ac_ct_RANLIB"; then
3776   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3777 else
3778   ac_save_IFS=$IFS; IFS=$ac_path_separator
3779 ac_dummy="$PATH"
3780 for ac_dir in $ac_dummy; do
3781   IFS=$ac_save_IFS
3782   test -z "$ac_dir" && ac_dir=.
3783   $as_executable_p "$ac_dir/$ac_word" || continue
3784 ac_cv_prog_ac_ct_RANLIB="ranlib"
3785 echo "$as_me:3785: found $ac_dir/$ac_word" >&5
3786 break
3787 done
3788
3789   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3790 fi
3791 fi
3792 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3793 if test -n "$ac_ct_RANLIB"; then
3794   echo "$as_me:3794: result: $ac_ct_RANLIB" >&5
3795 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3796 else
3797   echo "$as_me:3797: result: no" >&5
3798 echo "${ECHO_T}no" >&6
3799 fi
3800
3801   RANLIB=$ac_ct_RANLIB
3802 else
3803   RANLIB="$ac_cv_prog_RANLIB"
3804 fi
3805
3806 if test -n "$ac_tool_prefix"; then
3807   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3808 set dummy ${ac_tool_prefix}ld; ac_word=$2
3809 echo "$as_me:3809: checking for $ac_word" >&5
3810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3811 if test "${ac_cv_prog_LD+set}" = set; then
3812   echo $ECHO_N "(cached) $ECHO_C" >&6
3813 else
3814   if test -n "$LD"; then
3815   ac_cv_prog_LD="$LD" # Let the user override the test.
3816 else
3817   ac_save_IFS=$IFS; IFS=$ac_path_separator
3818 ac_dummy="$PATH"
3819 for ac_dir in $ac_dummy; do
3820   IFS=$ac_save_IFS
3821   test -z "$ac_dir" && ac_dir=.
3822   $as_executable_p "$ac_dir/$ac_word" || continue
3823 ac_cv_prog_LD="${ac_tool_prefix}ld"
3824 echo "$as_me:3824: found $ac_dir/$ac_word" >&5
3825 break
3826 done
3827
3828 fi
3829 fi
3830 LD=$ac_cv_prog_LD
3831 if test -n "$LD"; then
3832   echo "$as_me:3832: result: $LD" >&5
3833 echo "${ECHO_T}$LD" >&6
3834 else
3835   echo "$as_me:3835: result: no" >&5
3836 echo "${ECHO_T}no" >&6
3837 fi
3838
3839 fi
3840 if test -z "$ac_cv_prog_LD"; then
3841   ac_ct_LD=$LD
3842   # Extract the first word of "ld", so it can be a program name with args.
3843 set dummy ld; ac_word=$2
3844 echo "$as_me:3844: checking for $ac_word" >&5
3845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3846 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3847   echo $ECHO_N "(cached) $ECHO_C" >&6
3848 else
3849   if test -n "$ac_ct_LD"; then
3850   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3851 else
3852   ac_save_IFS=$IFS; IFS=$ac_path_separator
3853 ac_dummy="$PATH"
3854 for ac_dir in $ac_dummy; do
3855   IFS=$ac_save_IFS
3856   test -z "$ac_dir" && ac_dir=.
3857   $as_executable_p "$ac_dir/$ac_word" || continue
3858 ac_cv_prog_ac_ct_LD="ld"
3859 echo "$as_me:3859: found $ac_dir/$ac_word" >&5
3860 break
3861 done
3862
3863   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3864 fi
3865 fi
3866 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3867 if test -n "$ac_ct_LD"; then
3868   echo "$as_me:3868: result: $ac_ct_LD" >&5
3869 echo "${ECHO_T}$ac_ct_LD" >&6
3870 else
3871   echo "$as_me:3871: result: no" >&5
3872 echo "${ECHO_T}no" >&6
3873 fi
3874
3875   LD=$ac_ct_LD
3876 else
3877   LD="$ac_cv_prog_LD"
3878 fi
3879
3880 if test -n "$ac_tool_prefix"; then
3881   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3882 set dummy ${ac_tool_prefix}ar; ac_word=$2
3883 echo "$as_me:3883: checking for $ac_word" >&5
3884 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3885 if test "${ac_cv_prog_AR+set}" = set; then
3886   echo $ECHO_N "(cached) $ECHO_C" >&6
3887 else
3888   if test -n "$AR"; then
3889   ac_cv_prog_AR="$AR" # Let the user override the test.
3890 else
3891   ac_save_IFS=$IFS; IFS=$ac_path_separator
3892 ac_dummy="$PATH"
3893 for ac_dir in $ac_dummy; do
3894   IFS=$ac_save_IFS
3895   test -z "$ac_dir" && ac_dir=.
3896   $as_executable_p "$ac_dir/$ac_word" || continue
3897 ac_cv_prog_AR="${ac_tool_prefix}ar"
3898 echo "$as_me:3898: found $ac_dir/$ac_word" >&5
3899 break
3900 done
3901
3902 fi
3903 fi
3904 AR=$ac_cv_prog_AR
3905 if test -n "$AR"; then
3906   echo "$as_me:3906: result: $AR" >&5
3907 echo "${ECHO_T}$AR" >&6
3908 else
3909   echo "$as_me:3909: result: no" >&5
3910 echo "${ECHO_T}no" >&6
3911 fi
3912
3913 fi
3914 if test -z "$ac_cv_prog_AR"; then
3915   ac_ct_AR=$AR
3916   # Extract the first word of "ar", so it can be a program name with args.
3917 set dummy ar; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3921   echo $ECHO_N "(cached) $ECHO_C" >&6
3922 else
3923   if test -n "$ac_ct_AR"; then
3924   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3925 else
3926   ac_save_IFS=$IFS; IFS=$ac_path_separator
3927 ac_dummy="$PATH"
3928 for ac_dir in $ac_dummy; do
3929   IFS=$ac_save_IFS
3930   test -z "$ac_dir" && ac_dir=.
3931   $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_ac_ct_AR="ar"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3934 break
3935 done
3936
3937   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3938 fi
3939 fi
3940 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3941 if test -n "$ac_ct_AR"; then
3942   echo "$as_me:3942: result: $ac_ct_AR" >&5
3943 echo "${ECHO_T}$ac_ct_AR" >&6
3944 else
3945   echo "$as_me:3945: result: no" >&5
3946 echo "${ECHO_T}no" >&6
3947 fi
3948
3949   AR=$ac_ct_AR
3950 else
3951   AR="$ac_cv_prog_AR"
3952 fi
3953
3954 if test -n "$ac_tool_prefix"; then
3955   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
3956 set dummy ${ac_tool_prefix}nm; ac_word=$2
3957 echo "$as_me:3957: checking for $ac_word" >&5
3958 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3959 if test "${ac_cv_prog_NM+set}" = set; then
3960   echo $ECHO_N "(cached) $ECHO_C" >&6
3961 else
3962   if test -n "$NM"; then
3963   ac_cv_prog_NM="$NM" # Let the user override the test.
3964 else
3965   ac_save_IFS=$IFS; IFS=$ac_path_separator
3966 ac_dummy="$PATH"
3967 for ac_dir in $ac_dummy; do
3968   IFS=$ac_save_IFS
3969   test -z "$ac_dir" && ac_dir=.
3970   $as_executable_p "$ac_dir/$ac_word" || continue
3971 ac_cv_prog_NM="${ac_tool_prefix}nm"
3972 echo "$as_me:3972: found $ac_dir/$ac_word" >&5
3973 break
3974 done
3975
3976 fi
3977 fi
3978 NM=$ac_cv_prog_NM
3979 if test -n "$NM"; then
3980   echo "$as_me:3980: result: $NM" >&5
3981 echo "${ECHO_T}$NM" >&6
3982 else
3983   echo "$as_me:3983: result: no" >&5
3984 echo "${ECHO_T}no" >&6
3985 fi
3986
3987 fi
3988 if test -z "$ac_cv_prog_NM"; then
3989   ac_ct_NM=$NM
3990   # Extract the first word of "nm", so it can be a program name with args.
3991 set dummy nm; ac_word=$2
3992 echo "$as_me:3992: checking for $ac_word" >&5
3993 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3994 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
3995   echo $ECHO_N "(cached) $ECHO_C" >&6
3996 else
3997   if test -n "$ac_ct_NM"; then
3998   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
3999 else
4000   ac_save_IFS=$IFS; IFS=$ac_path_separator
4001 ac_dummy="$PATH"
4002 for ac_dir in $ac_dummy; do
4003   IFS=$ac_save_IFS
4004   test -z "$ac_dir" && ac_dir=.
4005   $as_executable_p "$ac_dir/$ac_word" || continue
4006 ac_cv_prog_ac_ct_NM="nm"
4007 echo "$as_me:4007: found $ac_dir/$ac_word" >&5
4008 break
4009 done
4010
4011   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4012 fi
4013 fi
4014 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4015 if test -n "$ac_ct_NM"; then
4016   echo "$as_me:4016: result: $ac_ct_NM" >&5
4017 echo "${ECHO_T}$ac_ct_NM" >&6
4018 else
4019   echo "$as_me:4019: result: no" >&5
4020 echo "${ECHO_T}no" >&6
4021 fi
4022
4023   NM=$ac_ct_NM
4024 else
4025   NM="$ac_cv_prog_NM"
4026 fi
4027
4028 if test -n "$ac_tool_prefix"; then
4029   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4030 set dummy ${ac_tool_prefix}ar; ac_word=$2
4031 echo "$as_me:4031: checking for $ac_word" >&5
4032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4033 if test "${ac_cv_prog_AR+set}" = set; then
4034   echo $ECHO_N "(cached) $ECHO_C" >&6
4035 else
4036   if test -n "$AR"; then
4037   ac_cv_prog_AR="$AR" # Let the user override the test.
4038 else
4039   ac_save_IFS=$IFS; IFS=$ac_path_separator
4040 ac_dummy="$PATH"
4041 for ac_dir in $ac_dummy; do
4042   IFS=$ac_save_IFS
4043   test -z "$ac_dir" && ac_dir=.
4044   $as_executable_p "$ac_dir/$ac_word" || continue
4045 ac_cv_prog_AR="${ac_tool_prefix}ar"
4046 echo "$as_me:4046: found $ac_dir/$ac_word" >&5
4047 break
4048 done
4049
4050 fi
4051 fi
4052 AR=$ac_cv_prog_AR
4053 if test -n "$AR"; then
4054   echo "$as_me:4054: result: $AR" >&5
4055 echo "${ECHO_T}$AR" >&6
4056 else
4057   echo "$as_me:4057: result: no" >&5
4058 echo "${ECHO_T}no" >&6
4059 fi
4060
4061 fi
4062 if test -z "$ac_cv_prog_AR"; then
4063   ac_ct_AR=$AR
4064   # Extract the first word of "ar", so it can be a program name with args.
4065 set dummy ar; ac_word=$2
4066 echo "$as_me:4066: checking for $ac_word" >&5
4067 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4068 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4069   echo $ECHO_N "(cached) $ECHO_C" >&6
4070 else
4071   if test -n "$ac_ct_AR"; then
4072   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4073 else
4074   ac_save_IFS=$IFS; IFS=$ac_path_separator
4075 ac_dummy="$PATH"
4076 for ac_dir in $ac_dummy; do
4077   IFS=$ac_save_IFS
4078   test -z "$ac_dir" && ac_dir=.
4079   $as_executable_p "$ac_dir/$ac_word" || continue
4080 ac_cv_prog_ac_ct_AR="ar"
4081 echo "$as_me:4081: found $ac_dir/$ac_word" >&5
4082 break
4083 done
4084
4085   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4086 fi
4087 fi
4088 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4089 if test -n "$ac_ct_AR"; then
4090   echo "$as_me:4090: result: $ac_ct_AR" >&5
4091 echo "${ECHO_T}$ac_ct_AR" >&6
4092 else
4093   echo "$as_me:4093: result: no" >&5
4094 echo "${ECHO_T}no" >&6
4095 fi
4096
4097   AR=$ac_ct_AR
4098 else
4099   AR="$ac_cv_prog_AR"
4100 fi
4101
4102 echo "$as_me:4102: checking for options to update archives" >&5
4103 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4104 if test "${cf_cv_ar_flags+set}" = set; then
4105   echo $ECHO_N "(cached) $ECHO_C" >&6
4106 else
4107
4108         cf_cv_ar_flags=unknown
4109         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4110         do
4111
4112                 # check if $ARFLAGS already contains this choice
4113                 if test "x$ARFLAGS" != "x" ; then
4114                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4115                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4116                                 cf_cv_ar_flags=
4117                                 break
4118                         fi
4119                 fi
4120
4121                 rm -f conftest.$ac_cv_objext
4122                 rm -f conftest.a
4123
4124                 cat >conftest.$ac_ext <<EOF
4125 #line 4125 "configure"
4126 int     testdata[3] = { 123, 456, 789 };
4127 EOF
4128                 if { (eval echo "$as_me:4128: \"$ac_compile\"") >&5
4129   (eval $ac_compile) 2>&5
4130   ac_status=$?
4131   echo "$as_me:4131: \$? = $ac_status" >&5
4132   (exit $ac_status); } ; then
4133                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4134                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4135                         if test -f conftest.a ; then
4136                                 cf_cv_ar_flags=$cf_ar_flags
4137                                 break
4138                         fi
4139                 else
4140                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4141
4142 echo "${as_me:-configure}:4142: testing cannot compile test-program ..." 1>&5
4143
4144                         break
4145                 fi
4146         done
4147         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4148
4149 fi
4150 echo "$as_me:4150: result: $cf_cv_ar_flags" >&5
4151 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4152
4153 if test -n "$ARFLAGS" ; then
4154         if test -n "$cf_cv_ar_flags" ; then
4155                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4156         fi
4157 else
4158         ARFLAGS=$cf_cv_ar_flags
4159 fi
4160
4161 echo "$as_me:4161: checking if you have specified an install-prefix" >&5
4162 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4163
4164 # Check whether --with-install-prefix or --without-install-prefix was given.
4165 if test "${with_install_prefix+set}" = set; then
4166   withval="$with_install_prefix"
4167   case "x$withval" in #(vi
4168         xyes|xno) #(vi
4169                 ;;
4170         *)      DESTDIR="$withval"
4171                 ;;
4172         esac
4173 fi;
4174 echo "$as_me:4174: result: $DESTDIR" >&5
4175 echo "${ECHO_T}$DESTDIR" >&6
4176
4177 ###############################################################################
4178
4179 # If we're cross-compiling, allow the user to override the tools and their
4180 # options.  The configure script is oriented toward identifying the host
4181 # compiler, etc., but we need a build compiler to generate parts of the source.
4182
4183 if test "$cross_compiling" = yes ; then
4184
4185         # defaults that we might want to override
4186         : ${BUILD_CFLAGS:=''}
4187         : ${BUILD_CPPFLAGS:=''}
4188         : ${BUILD_LDFLAGS:=''}
4189         : ${BUILD_LIBS:=''}
4190         : ${BUILD_EXEEXT:='$x'}
4191         : ${BUILD_OBJEXT:='o'}
4192
4193 # Check whether --with-build-cc or --without-build-cc was given.
4194 if test "${with_build_cc+set}" = set; then
4195   withval="$with_build_cc"
4196   BUILD_CC="$withval"
4197 else
4198   for ac_prog in gcc cc cl
4199 do
4200   # Extract the first word of "$ac_prog", so it can be a program name with args.
4201 set dummy $ac_prog; ac_word=$2
4202 echo "$as_me:4202: checking for $ac_word" >&5
4203 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4204 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4205   echo $ECHO_N "(cached) $ECHO_C" >&6
4206 else
4207   if test -n "$BUILD_CC"; then
4208   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4209 else
4210   ac_save_IFS=$IFS; IFS=$ac_path_separator
4211 ac_dummy="$PATH"
4212 for ac_dir in $ac_dummy; do
4213   IFS=$ac_save_IFS
4214   test -z "$ac_dir" && ac_dir=.
4215   $as_executable_p "$ac_dir/$ac_word" || continue
4216 ac_cv_prog_BUILD_CC="$ac_prog"
4217 echo "$as_me:4217: found $ac_dir/$ac_word" >&5
4218 break
4219 done
4220
4221 fi
4222 fi
4223 BUILD_CC=$ac_cv_prog_BUILD_CC
4224 if test -n "$BUILD_CC"; then
4225   echo "$as_me:4225: result: $BUILD_CC" >&5
4226 echo "${ECHO_T}$BUILD_CC" >&6
4227 else
4228   echo "$as_me:4228: result: no" >&5
4229 echo "${ECHO_T}no" >&6
4230 fi
4231
4232   test -n "$BUILD_CC" && break
4233 done
4234
4235 fi;
4236         echo "$as_me:4236: checking for native build C compiler" >&5
4237 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4238         echo "$as_me:4238: result: $BUILD_CC" >&5
4239 echo "${ECHO_T}$BUILD_CC" >&6
4240
4241         echo "$as_me:4241: checking for native build C preprocessor" >&5
4242 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4243
4244 # Check whether --with-build-cpp or --without-build-cpp was given.
4245 if test "${with_build_cpp+set}" = set; then
4246   withval="$with_build_cpp"
4247   BUILD_CPP="$withval"
4248 else
4249   BUILD_CPP='${BUILD_CC} -E'
4250 fi;
4251         echo "$as_me:4251: result: $BUILD_CPP" >&5
4252 echo "${ECHO_T}$BUILD_CPP" >&6
4253
4254         echo "$as_me:4254: checking for native build C flags" >&5
4255 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4256
4257 # Check whether --with-build-cflags or --without-build-cflags was given.
4258 if test "${with_build_cflags+set}" = set; then
4259   withval="$with_build_cflags"
4260   BUILD_CFLAGS="$withval"
4261 fi;
4262         echo "$as_me:4262: result: $BUILD_CFLAGS" >&5
4263 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4264
4265         echo "$as_me:4265: checking for native build C preprocessor-flags" >&5
4266 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4267
4268 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4269 if test "${with_build_cppflags+set}" = set; then
4270   withval="$with_build_cppflags"
4271   BUILD_CPPFLAGS="$withval"
4272 fi;
4273         echo "$as_me:4273: result: $BUILD_CPPFLAGS" >&5
4274 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4275
4276         echo "$as_me:4276: checking for native build linker-flags" >&5
4277 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4278
4279 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4280 if test "${with_build_ldflags+set}" = set; then
4281   withval="$with_build_ldflags"
4282   BUILD_LDFLAGS="$withval"
4283 fi;
4284         echo "$as_me:4284: result: $BUILD_LDFLAGS" >&5
4285 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4286
4287         echo "$as_me:4287: checking for native build linker-libraries" >&5
4288 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4289
4290 # Check whether --with-build-libs or --without-build-libs was given.
4291 if test "${with_build_libs+set}" = set; then
4292   withval="$with_build_libs"
4293   BUILD_LIBS="$withval"
4294 fi;
4295         echo "$as_me:4295: result: $BUILD_LIBS" >&5
4296 echo "${ECHO_T}$BUILD_LIBS" >&6
4297
4298         # this assumes we're on Unix.
4299         BUILD_EXEEXT=
4300         BUILD_OBJEXT=o
4301
4302         : ${BUILD_CC:='${CC}'}
4303
4304         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4305                 { { echo "$as_me:4305: error: Cross-build requires two compilers.
4306 Use --with-build-cc to specify the native compiler." >&5
4307 echo "$as_me: error: Cross-build requires two compilers.
4308 Use --with-build-cc to specify the native compiler." >&2;}
4309    { (exit 1); exit 1; }; }
4310         fi
4311
4312 else
4313         : ${BUILD_CC:='${CC}'}
4314         : ${BUILD_CPP:='${CPP}'}
4315         : ${BUILD_CFLAGS:='${CFLAGS}'}
4316         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4317         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4318         : ${BUILD_LIBS:='${LIBS}'}
4319         : ${BUILD_EXEEXT:='$x'}
4320         : ${BUILD_OBJEXT:='o'}
4321 fi
4322
4323 ###############################################################################
4324
4325 ### Options to allow the user to specify the set of libraries which are used.
4326 ### Use "--without-normal --with-shared" to allow the default model to be
4327 ### shared, for example.
4328 cf_list_models=""
4329
4330 echo "$as_me:4330: checking if libtool -version-number should be used" >&5
4331 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4332
4333 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4334 if test "${enable_libtool_version+set}" = set; then
4335   enableval="$enable_libtool_version"
4336   test "$enableval" != no && enableval=yes
4337   if test "$enableval" != "yes" ; then
4338     cf_libtool_version=no
4339   else
4340     cf_libtool_version=yes
4341   fi
4342 else
4343   enableval=yes
4344   cf_libtool_version=yes
4345
4346 fi;
4347 echo "$as_me:4347: result: $cf_libtool_version" >&5
4348 echo "${ECHO_T}$cf_libtool_version" >&6
4349
4350 if test "$cf_libtool_version" = yes ; then
4351         LIBTOOL_VERSION="-version-number"
4352 else
4353         LIBTOOL_VERSION="-version-info"
4354 fi
4355
4356 LIBTOOL=
4357
4358 # common library maintenance symbols that are convenient for libtool scripts:
4359 LIB_CREATE='${AR} -cr'
4360 LIB_OBJECT='${OBJECTS}'
4361 LIB_SUFFIX=.a
4362 LIB_PREP="$RANLIB"
4363
4364 # symbols used to prop libtool up to enable it to determine what it should be
4365 # doing:
4366 LIB_CLEAN=
4367 LIB_COMPILE=
4368 LIB_LINK='${CC}'
4369 LIB_INSTALL=
4370 LIB_UNINSTALL=
4371
4372 echo "$as_me:4372: checking if you want to build libraries with libtool" >&5
4373 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4374
4375 # Check whether --with-libtool or --without-libtool was given.
4376 if test "${with_libtool+set}" = set; then
4377   withval="$with_libtool"
4378   with_libtool=$withval
4379 else
4380   with_libtool=no
4381 fi;
4382 echo "$as_me:4382: result: $with_libtool" >&5
4383 echo "${ECHO_T}$with_libtool" >&6
4384 if test "$with_libtool" != "no"; then
4385
4386         if test "$with_libtool" != "yes" ; then
4387
4388 if test "x$prefix" != xNONE; then
4389   cf_path_syntax="$prefix"
4390 else
4391   cf_path_syntax="$ac_default_prefix"
4392 fi
4393
4394 case ".$with_libtool" in #(vi
4395 .\$\(*\)*|.\'*\'*) #(vi
4396   ;;
4397 ..|./*|.\\*) #(vi
4398   ;;
4399 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4400   ;;
4401 .\${*prefix}*|.\${*dir}*) #(vi
4402   eval with_libtool="$with_libtool"
4403   case ".$with_libtool" in #(vi
4404   .NONE/*)
4405     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4406     ;;
4407   esac
4408   ;; #(vi
4409 .no|.NONE/*)
4410   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4411   ;;
4412 *)
4413   { { echo "$as_me:4413: error: expected a pathname, not \"$with_libtool\"" >&5
4414 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4415    { (exit 1); exit 1; }; }
4416   ;;
4417 esac
4418
4419                 LIBTOOL=$with_libtool
4420         else
4421                 if test -n "$ac_tool_prefix"; then
4422   for ac_prog in libtool glibtool
4423   do
4424     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4425 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4426 echo "$as_me:4426: checking for $ac_word" >&5
4427 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4428 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4429   echo $ECHO_N "(cached) $ECHO_C" >&6
4430 else
4431   if test -n "$LIBTOOL"; then
4432   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4433 else
4434   ac_save_IFS=$IFS; IFS=$ac_path_separator
4435 ac_dummy="$PATH"
4436 for ac_dir in $ac_dummy; do
4437   IFS=$ac_save_IFS
4438   test -z "$ac_dir" && ac_dir=.
4439   $as_executable_p "$ac_dir/$ac_word" || continue
4440 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4441 echo "$as_me:4441: found $ac_dir/$ac_word" >&5
4442 break
4443 done
4444
4445 fi
4446 fi
4447 LIBTOOL=$ac_cv_prog_LIBTOOL
4448 if test -n "$LIBTOOL"; then
4449   echo "$as_me:4449: result: $LIBTOOL" >&5
4450 echo "${ECHO_T}$LIBTOOL" >&6
4451 else
4452   echo "$as_me:4452: result: no" >&5
4453 echo "${ECHO_T}no" >&6
4454 fi
4455
4456     test -n "$LIBTOOL" && break
4457   done
4458 fi
4459 if test -z "$LIBTOOL"; then
4460   ac_ct_LIBTOOL=$LIBTOOL
4461   for ac_prog in libtool glibtool
4462 do
4463   # Extract the first word of "$ac_prog", so it can be a program name with args.
4464 set dummy $ac_prog; ac_word=$2
4465 echo "$as_me:4465: checking for $ac_word" >&5
4466 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4467 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4468   echo $ECHO_N "(cached) $ECHO_C" >&6
4469 else
4470   if test -n "$ac_ct_LIBTOOL"; then
4471   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4472 else
4473   ac_save_IFS=$IFS; IFS=$ac_path_separator
4474 ac_dummy="$PATH"
4475 for ac_dir in $ac_dummy; do
4476   IFS=$ac_save_IFS
4477   test -z "$ac_dir" && ac_dir=.
4478   $as_executable_p "$ac_dir/$ac_word" || continue
4479 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4480 echo "$as_me:4480: found $ac_dir/$ac_word" >&5
4481 break
4482 done
4483
4484 fi
4485 fi
4486 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4487 if test -n "$ac_ct_LIBTOOL"; then
4488   echo "$as_me:4488: result: $ac_ct_LIBTOOL" >&5
4489 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4490 else
4491   echo "$as_me:4491: result: no" >&5
4492 echo "${ECHO_T}no" >&6
4493 fi
4494
4495   test -n "$ac_ct_LIBTOOL" && break
4496 done
4497 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4498
4499   LIBTOOL=$ac_ct_LIBTOOL
4500 fi
4501
4502 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4503 then
4504         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.].*//'`
4505 else
4506         cf_cv_libtool_version=
4507 fi
4508 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4509
4510                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4511                 then
4512
4513 unset ac_cv_prog_ac_ct_LIBTOOL
4514 unset ac_ct_LIBTOOL
4515 unset LIBTOOL
4516
4517                         if test -n "$ac_tool_prefix"; then
4518   for ac_prog in glibtool
4519   do
4520     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4521 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4522 echo "$as_me:4522: checking for $ac_word" >&5
4523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4524 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4525   echo $ECHO_N "(cached) $ECHO_C" >&6
4526 else
4527   if test -n "$LIBTOOL"; then
4528   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4529 else
4530   ac_save_IFS=$IFS; IFS=$ac_path_separator
4531 ac_dummy="$PATH"
4532 for ac_dir in $ac_dummy; do
4533   IFS=$ac_save_IFS
4534   test -z "$ac_dir" && ac_dir=.
4535   $as_executable_p "$ac_dir/$ac_word" || continue
4536 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4537 echo "$as_me:4537: found $ac_dir/$ac_word" >&5
4538 break
4539 done
4540
4541 fi
4542 fi
4543 LIBTOOL=$ac_cv_prog_LIBTOOL
4544 if test -n "$LIBTOOL"; then
4545   echo "$as_me:4545: result: $LIBTOOL" >&5
4546 echo "${ECHO_T}$LIBTOOL" >&6
4547 else
4548   echo "$as_me:4548: result: no" >&5
4549 echo "${ECHO_T}no" >&6
4550 fi
4551
4552     test -n "$LIBTOOL" && break
4553   done
4554 fi
4555 if test -z "$LIBTOOL"; then
4556   ac_ct_LIBTOOL=$LIBTOOL
4557   for ac_prog in glibtool
4558 do
4559   # Extract the first word of "$ac_prog", so it can be a program name with args.
4560 set dummy $ac_prog; ac_word=$2
4561 echo "$as_me:4561: checking for $ac_word" >&5
4562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4563 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4564   echo $ECHO_N "(cached) $ECHO_C" >&6
4565 else
4566   if test -n "$ac_ct_LIBTOOL"; then
4567   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4568 else
4569   ac_save_IFS=$IFS; IFS=$ac_path_separator
4570 ac_dummy="$PATH"
4571 for ac_dir in $ac_dummy; do
4572   IFS=$ac_save_IFS
4573   test -z "$ac_dir" && ac_dir=.
4574   $as_executable_p "$ac_dir/$ac_word" || continue
4575 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4576 echo "$as_me:4576: found $ac_dir/$ac_word" >&5
4577 break
4578 done
4579
4580 fi
4581 fi
4582 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4583 if test -n "$ac_ct_LIBTOOL"; then
4584   echo "$as_me:4584: result: $ac_ct_LIBTOOL" >&5
4585 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4586 else
4587   echo "$as_me:4587: result: no" >&5
4588 echo "${ECHO_T}no" >&6
4589 fi
4590
4591   test -n "$ac_ct_LIBTOOL" && break
4592 done
4593 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4594
4595   LIBTOOL=$ac_ct_LIBTOOL
4596 fi
4597
4598 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4599 then
4600         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.].*//'`
4601 else
4602         cf_cv_libtool_version=
4603 fi
4604 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4605
4606                 fi
4607         fi
4608         if test -z "$LIBTOOL" ; then
4609                 { { echo "$as_me:4609: error: Cannot find libtool" >&5
4610 echo "$as_me: error: Cannot find libtool" >&2;}
4611    { (exit 1); exit 1; }; }
4612         fi
4613         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4614         LIB_OBJECT='${OBJECTS:.o=.lo}'
4615         LIB_SUFFIX=.la
4616         LIB_CLEAN='${LIBTOOL} --mode=clean'
4617         LIB_COMPILE='${LIBTOOL} --mode=compile'
4618         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4619         LIB_INSTALL='${LIBTOOL} --mode=install'
4620         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4621         LIB_PREP=:
4622
4623 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4624 then
4625         echo "$as_me:4625: checking version of $LIBTOOL" >&5
4626 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4627
4628 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4629 then
4630         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.].*//'`
4631 else
4632         cf_cv_libtool_version=
4633 fi
4634 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4635
4636         echo "$as_me:4636: result: $cf_cv_libtool_version" >&5
4637 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4638         if test -z "$cf_cv_libtool_version" ; then
4639                 { { echo "$as_me:4639: error: This is not GNU libtool" >&5
4640 echo "$as_me: error: This is not GNU libtool" >&2;}
4641    { (exit 1); exit 1; }; }
4642         fi
4643 else
4644         { { echo "$as_me:4644: error: GNU libtool has not been found" >&5
4645 echo "$as_me: error: GNU libtool has not been found" >&2;}
4646    { (exit 1); exit 1; }; }
4647 fi
4648
4649         # special hack to add -no-undefined (which libtool should do for itself)
4650         LT_UNDEF=
4651         case "$cf_cv_system_name" in #(vi
4652         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4653                 LT_UNDEF=-no-undefined
4654                 ;;
4655         esac
4656
4657         # special hack to add --tag option for C++ compiler
4658         case $cf_cv_libtool_version in #(vi
4659         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4660                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4661                 LIBTOOL="$LIBTOOL --tag=CC"
4662                 ;;
4663         *)
4664                 LIBTOOL_CXX="$LIBTOOL"
4665                 ;;
4666         esac
4667 else
4668         LIBTOOL=""
4669         LIBTOOL_CXX=""
4670 fi
4671
4672 test -z "$LIBTOOL" && ECHO_LT=
4673
4674 if test "$with_libtool" != "no" ; then
4675
4676 cf_list_models="$cf_list_models libtool"
4677
4678 else
4679
4680 echo "$as_me:4680: checking if you want to build shared libraries" >&5
4681 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4682
4683 # Check whether --with-shared or --without-shared was given.
4684 if test "${with_shared+set}" = set; then
4685   withval="$with_shared"
4686   with_shared=$withval
4687 else
4688   with_shared=no
4689 fi;
4690 echo "$as_me:4690: result: $with_shared" >&5
4691 echo "${ECHO_T}$with_shared" >&6
4692 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4693
4694 echo "$as_me:4694: checking if you want to build static libraries" >&5
4695 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4696
4697 # Check whether --with-normal or --without-normal was given.
4698 if test "${with_normal+set}" = set; then
4699   withval="$with_normal"
4700   with_normal=$withval
4701 else
4702   with_normal=yes
4703 fi;
4704 echo "$as_me:4704: result: $with_normal" >&5
4705 echo "${ECHO_T}$with_normal" >&6
4706 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4707
4708 echo "$as_me:4708: checking if you want to build debug libraries" >&5
4709 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4710
4711 # Check whether --with-debug or --without-debug was given.
4712 if test "${with_debug+set}" = set; then
4713   withval="$with_debug"
4714   with_debug=$withval
4715 else
4716   with_debug=yes
4717 fi;
4718 echo "$as_me:4718: result: $with_debug" >&5
4719 echo "${ECHO_T}$with_debug" >&6
4720 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4721
4722 echo "$as_me:4722: checking if you want to build profiling libraries" >&5
4723 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4724
4725 # Check whether --with-profile or --without-profile was given.
4726 if test "${with_profile+set}" = set; then
4727   withval="$with_profile"
4728   with_profile=$withval
4729 else
4730   with_profile=no
4731 fi;
4732 echo "$as_me:4732: result: $with_profile" >&5
4733 echo "${ECHO_T}$with_profile" >&6
4734 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4735
4736 fi
4737
4738 if test "X$cf_with_cxx_binding" != Xno; then
4739 if test "x$with_shared" = "xyes"; then
4740 echo "$as_me:4740: checking if you want to build C++ shared libraries" >&5
4741 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4742
4743 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4744 if test "${with_cxx_shared+set}" = set; then
4745   withval="$with_cxx_shared"
4746   with_shared_cxx=$withval
4747 else
4748   with_shared_cxx=no
4749 fi;
4750 echo "$as_me:4750: result: $with_shared_cxx" >&5
4751 echo "${ECHO_T}$with_shared_cxx" >&6
4752 fi
4753 fi
4754
4755 ###############################################################################
4756
4757 echo "$as_me:4757: checking for specified models" >&5
4758 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4759 test -z "$cf_list_models" && cf_list_models=normal
4760 test "$with_libtool" != "no" && cf_list_models=libtool
4761 echo "$as_me:4761: result: $cf_list_models" >&5
4762 echo "${ECHO_T}$cf_list_models" >&6
4763
4764 ### Use the first model as the default, and save its suffix for use in building
4765 ### up test-applications.
4766 echo "$as_me:4766: checking for default model" >&5
4767 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4768 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4769 echo "$as_me:4769: result: $DFT_LWR_MODEL" >&5
4770 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4771
4772 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4773
4774 TICS_NAME=tic
4775
4776 TINFO_NAME=tinfo
4777
4778 LIB_NAME=ncurses
4779
4780 LIB_DIR=../lib
4781 LIB_2ND=../../lib
4782
4783 echo "$as_me:4783: checking if you want to have a library-prefix" >&5
4784 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4785
4786 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4787 if test "${with_lib_prefix+set}" = set; then
4788   withval="$with_lib_prefix"
4789   with_lib_prefix=$withval
4790 else
4791   with_lib_prefix=auto
4792 fi;
4793 echo "$as_me:4793: result: $with_lib_prefix" >&5
4794 echo "${ECHO_T}$with_lib_prefix" >&6
4795
4796 if test $with_lib_prefix = auto
4797 then
4798
4799         case $cf_cv_system_name in #(vi
4800         OS/2*|os2*) #(vi
4801         LIB_PREFIX=''
4802         ;;
4803         *)      LIB_PREFIX='lib'
4804         ;;
4805         esac
4806 cf_prefix=$LIB_PREFIX
4807
4808 elif test $with_lib_prefix = no
4809 then
4810         LIB_PREFIX=
4811 else
4812         LIB_PREFIX=$with_lib_prefix
4813 fi
4814
4815 LIB_SUFFIX=
4816
4817         echo "$as_me:4817: checking for PATH separator" >&5
4818 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4819         case $cf_cv_system_name in
4820         os2*)   PATH_SEPARATOR=';'  ;;
4821         *)      ${PATH_SEPARATOR:=':'}  ;;
4822         esac
4823
4824         echo "$as_me:4824: result: $PATH_SEPARATOR" >&5
4825 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4826
4827 ###############################################################################
4828
4829 echo "$as_me:4829: checking if you want to build a separate terminfo library" >&5
4830 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4831
4832 # Check whether --with-termlib or --without-termlib was given.
4833 if test "${with_termlib+set}" = set; then
4834   withval="$with_termlib"
4835   with_termlib=$withval
4836 else
4837   with_termlib=no
4838 fi;
4839 echo "$as_me:4839: result: $with_termlib" >&5
4840 echo "${ECHO_T}$with_termlib" >&6
4841
4842 echo "$as_me:4842: checking if you want to build a separate tic library" >&5
4843 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4844
4845 # Check whether --with-ticlib or --without-ticlib was given.
4846 if test "${with_ticlib+set}" = set; then
4847   withval="$with_ticlib"
4848   with_ticlib=$withval
4849 else
4850   with_ticlib=no
4851 fi;
4852 echo "$as_me:4852: result: $with_ticlib" >&5
4853 echo "${ECHO_T}$with_ticlib" >&6
4854
4855 ### Checks for special libraries, must be done up-front.
4856 SHLIB_LIST=""
4857
4858 echo "$as_me:4858: checking if you want to link with the GPM mouse library" >&5
4859 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4860
4861 # Check whether --with-gpm or --without-gpm was given.
4862 if test "${with_gpm+set}" = set; then
4863   withval="$with_gpm"
4864   with_gpm=$withval
4865 else
4866   with_gpm=maybe
4867 fi;
4868 echo "$as_me:4868: result: $with_gpm" >&5
4869 echo "${ECHO_T}$with_gpm" >&6
4870
4871 if test "$with_gpm" != no ; then
4872         echo "$as_me:4872: checking for gpm.h" >&5
4873 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4874 if test "${ac_cv_header_gpm_h+set}" = set; then
4875   echo $ECHO_N "(cached) $ECHO_C" >&6
4876 else
4877   cat >conftest.$ac_ext <<_ACEOF
4878 #line 4878 "configure"
4879 #include "confdefs.h"
4880 #include <gpm.h>
4881 _ACEOF
4882 if { (eval echo "$as_me:4882: \"$ac_cpp conftest.$ac_ext\"") >&5
4883   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4884   ac_status=$?
4885   egrep -v '^ *\+' conftest.er1 >conftest.err
4886   rm -f conftest.er1
4887   cat conftest.err >&5
4888   echo "$as_me:4888: \$? = $ac_status" >&5
4889   (exit $ac_status); } >/dev/null; then
4890   if test -s conftest.err; then
4891     ac_cpp_err=$ac_c_preproc_warn_flag
4892   else
4893     ac_cpp_err=
4894   fi
4895 else
4896   ac_cpp_err=yes
4897 fi
4898 if test -z "$ac_cpp_err"; then
4899   ac_cv_header_gpm_h=yes
4900 else
4901   echo "$as_me: failed program was:" >&5
4902   cat conftest.$ac_ext >&5
4903   ac_cv_header_gpm_h=no
4904 fi
4905 rm -f conftest.err conftest.$ac_ext
4906 fi
4907 echo "$as_me:4907: result: $ac_cv_header_gpm_h" >&5
4908 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4909 if test $ac_cv_header_gpm_h = yes; then
4910
4911 cat >>confdefs.h <<\EOF
4912 #define HAVE_GPM_H 1
4913 EOF
4914
4915                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4916                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4917
4918 echo "${as_me:-configure}:4918: testing assuming we really have GPM library ..." 1>&5
4919
4920 cat >>confdefs.h <<\EOF
4921 #define HAVE_LIBGPM 1
4922 EOF
4923
4924                 else
4925                         echo "$as_me:4925: checking for Gpm_Open in -lgpm" >&5
4926 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4927 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4928   echo $ECHO_N "(cached) $ECHO_C" >&6
4929 else
4930   ac_check_lib_save_LIBS=$LIBS
4931 LIBS="-lgpm  $LIBS"
4932 cat >conftest.$ac_ext <<_ACEOF
4933 #line 4933 "configure"
4934 #include "confdefs.h"
4935
4936 /* Override any gcc2 internal prototype to avoid an error.  */
4937 #ifdef __cplusplus
4938 extern "C"
4939 #endif
4940 /* We use char because int might match the return type of a gcc2
4941    builtin and then its argument prototype would still apply.  */
4942 char Gpm_Open ();
4943 int
4944 main ()
4945 {
4946 Gpm_Open ();
4947   ;
4948   return 0;
4949 }
4950 _ACEOF
4951 rm -f conftest.$ac_objext conftest$ac_exeext
4952 if { (eval echo "$as_me:4952: \"$ac_link\"") >&5
4953   (eval $ac_link) 2>&5
4954   ac_status=$?
4955   echo "$as_me:4955: \$? = $ac_status" >&5
4956   (exit $ac_status); } &&
4957          { ac_try='test -s conftest$ac_exeext'
4958   { (eval echo "$as_me:4958: \"$ac_try\"") >&5
4959   (eval $ac_try) 2>&5
4960   ac_status=$?
4961   echo "$as_me:4961: \$? = $ac_status" >&5
4962   (exit $ac_status); }; }; then
4963   ac_cv_lib_gpm_Gpm_Open=yes
4964 else
4965   echo "$as_me: failed program was:" >&5
4966 cat conftest.$ac_ext >&5
4967 ac_cv_lib_gpm_Gpm_Open=no
4968 fi
4969 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4970 LIBS=$ac_check_lib_save_LIBS
4971 fi
4972 echo "$as_me:4972: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4973 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4974 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4975   :
4976 else
4977
4978                                 { { echo "$as_me:4978: error: Cannot link with GPM library" >&5
4979 echo "$as_me: error: Cannot link with GPM library" >&2;}
4980    { (exit 1); exit 1; }; }
4981                 fi
4982                 with_gpm=yes
4983
4984 fi
4985
4986 else
4987
4988                 test "$with_gpm" != maybe && { echo "$as_me:4988: WARNING: Cannot find GPM header" >&5
4989 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4990                 with_gpm=no
4991
4992 fi
4993
4994 fi
4995
4996 if test "$with_gpm" != no ; then
4997         echo "$as_me:4997: checking if you want to load GPM dynamically" >&5
4998 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4999
5000 # Check whether --with-dlsym or --without-dlsym was given.
5001 if test "${with_dlsym+set}" = set; then
5002   withval="$with_dlsym"
5003   with_dlsym=$withval
5004 else
5005   with_dlsym=yes
5006 fi;
5007         echo "$as_me:5007: result: $with_dlsym" >&5
5008 echo "${ECHO_T}$with_dlsym" >&6
5009         if test "x$with_dlsym" = xyes ; then
5010
5011 cf_have_dlsym=no
5012 echo "$as_me:5012: checking for dlsym" >&5
5013 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5014 if test "${ac_cv_func_dlsym+set}" = set; then
5015   echo $ECHO_N "(cached) $ECHO_C" >&6
5016 else
5017   cat >conftest.$ac_ext <<_ACEOF
5018 #line 5018 "configure"
5019 #include "confdefs.h"
5020 /* System header to define __stub macros and hopefully few prototypes,
5021     which can conflict with char dlsym (); below.  */
5022 #include <assert.h>
5023 /* Override any gcc2 internal prototype to avoid an error.  */
5024 #ifdef __cplusplus
5025 extern "C"
5026 #endif
5027 /* We use char because int might match the return type of a gcc2
5028    builtin and then its argument prototype would still apply.  */
5029 char dlsym ();
5030 char (*f) ();
5031
5032 int
5033 main ()
5034 {
5035 /* The GNU C library defines this for functions which it implements
5036     to always fail with ENOSYS.  Some functions are actually named
5037     something starting with __ and the normal name is an alias.  */
5038 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5039 choke me
5040 #else
5041 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5042 #endif
5043
5044   ;
5045   return 0;
5046 }
5047 _ACEOF
5048 rm -f conftest.$ac_objext conftest$ac_exeext
5049 if { (eval echo "$as_me:5049: \"$ac_link\"") >&5
5050   (eval $ac_link) 2>&5
5051   ac_status=$?
5052   echo "$as_me:5052: \$? = $ac_status" >&5
5053   (exit $ac_status); } &&
5054          { ac_try='test -s conftest$ac_exeext'
5055   { (eval echo "$as_me:5055: \"$ac_try\"") >&5
5056   (eval $ac_try) 2>&5
5057   ac_status=$?
5058   echo "$as_me:5058: \$? = $ac_status" >&5
5059   (exit $ac_status); }; }; then
5060   ac_cv_func_dlsym=yes
5061 else
5062   echo "$as_me: failed program was:" >&5
5063 cat conftest.$ac_ext >&5
5064 ac_cv_func_dlsym=no
5065 fi
5066 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5067 fi
5068 echo "$as_me:5068: result: $ac_cv_func_dlsym" >&5
5069 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5070 if test $ac_cv_func_dlsym = yes; then
5071   cf_have_dlsym=yes
5072 else
5073
5074 cf_have_libdl=no
5075 echo "$as_me:5075: checking for dlsym in -ldl" >&5
5076 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5077 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5078   echo $ECHO_N "(cached) $ECHO_C" >&6
5079 else
5080   ac_check_lib_save_LIBS=$LIBS
5081 LIBS="-ldl  $LIBS"
5082 cat >conftest.$ac_ext <<_ACEOF
5083 #line 5083 "configure"
5084 #include "confdefs.h"
5085
5086 /* Override any gcc2 internal prototype to avoid an error.  */
5087 #ifdef __cplusplus
5088 extern "C"
5089 #endif
5090 /* We use char because int might match the return type of a gcc2
5091    builtin and then its argument prototype would still apply.  */
5092 char dlsym ();
5093 int
5094 main ()
5095 {
5096 dlsym ();
5097   ;
5098   return 0;
5099 }
5100 _ACEOF
5101 rm -f conftest.$ac_objext conftest$ac_exeext
5102 if { (eval echo "$as_me:5102: \"$ac_link\"") >&5
5103   (eval $ac_link) 2>&5
5104   ac_status=$?
5105   echo "$as_me:5105: \$? = $ac_status" >&5
5106   (exit $ac_status); } &&
5107          { ac_try='test -s conftest$ac_exeext'
5108   { (eval echo "$as_me:5108: \"$ac_try\"") >&5
5109   (eval $ac_try) 2>&5
5110   ac_status=$?
5111   echo "$as_me:5111: \$? = $ac_status" >&5
5112   (exit $ac_status); }; }; then
5113   ac_cv_lib_dl_dlsym=yes
5114 else
5115   echo "$as_me: failed program was:" >&5
5116 cat conftest.$ac_ext >&5
5117 ac_cv_lib_dl_dlsym=no
5118 fi
5119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5120 LIBS=$ac_check_lib_save_LIBS
5121 fi
5122 echo "$as_me:5122: result: $ac_cv_lib_dl_dlsym" >&5
5123 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5124 if test $ac_cv_lib_dl_dlsym = yes; then
5125
5126         cf_have_dlsym=yes
5127         cf_have_libdl=yes
5128 fi
5129
5130 fi
5131
5132 if test "$cf_have_dlsym" = yes ; then
5133         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5134
5135         echo "$as_me:5135: checking whether able to link to dl*() functions" >&5
5136 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5137         cat >conftest.$ac_ext <<_ACEOF
5138 #line 5138 "configure"
5139 #include "confdefs.h"
5140 #include <dlfcn.h>
5141 int
5142 main ()
5143 {
5144
5145                 void *obj;
5146                 if ((obj = dlopen("filename", 0)) != 0) {
5147                         if (dlsym(obj, "symbolname") == 0) {
5148                         dlclose(obj);
5149                         }
5150                 }
5151   ;
5152   return 0;
5153 }
5154 _ACEOF
5155 rm -f conftest.$ac_objext conftest$ac_exeext
5156 if { (eval echo "$as_me:5156: \"$ac_link\"") >&5
5157   (eval $ac_link) 2>&5
5158   ac_status=$?
5159   echo "$as_me:5159: \$? = $ac_status" >&5
5160   (exit $ac_status); } &&
5161          { ac_try='test -s conftest$ac_exeext'
5162   { (eval echo "$as_me:5162: \"$ac_try\"") >&5
5163   (eval $ac_try) 2>&5
5164   ac_status=$?
5165   echo "$as_me:5165: \$? = $ac_status" >&5
5166   (exit $ac_status); }; }; then
5167
5168 cat >>confdefs.h <<\EOF
5169 #define HAVE_LIBDL 1
5170 EOF
5171
5172 else
5173   echo "$as_me: failed program was:" >&5
5174 cat conftest.$ac_ext >&5
5175
5176                 { { echo "$as_me:5176: error: Cannot link test program for libdl" >&5
5177 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5178    { (exit 1); exit 1; }; }
5179 fi
5180 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5181         echo "$as_me:5181: result: ok" >&5
5182 echo "${ECHO_T}ok" >&6
5183 else
5184         { { echo "$as_me:5184: error: Cannot find dlsym function" >&5
5185 echo "$as_me: error: Cannot find dlsym function" >&2;}
5186    { (exit 1); exit 1; }; }
5187 fi
5188
5189                 if test "x$with_gpm" != xyes ; then
5190                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5191
5192 echo "${as_me:-configure}:5192: testing assuming soname for gpm is $with_gpm ..." 1>&5
5193
5194                         cf_cv_gpm_soname="$with_gpm"
5195                 else
5196
5197 echo "$as_me:5197: checking for soname of gpm library" >&5
5198 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5199 if test "${cf_cv_gpm_soname+set}" = set; then
5200   echo $ECHO_N "(cached) $ECHO_C" >&6
5201 else
5202
5203 cf_cv_gpm_soname=unknown
5204 if test "$cross_compiling" != yes ; then
5205 cat >conftest.$ac_ext <<CF_EOF
5206 #include <gpm.h>
5207 int main()
5208 {
5209 if (Gpm_Open(0,0)) Gpm_Close();
5210         ${cf_cv_main_return:-return}(0);
5211 }
5212 CF_EOF
5213 cf_save_LIBS="$LIBS"
5214         LIBS="-lgpm $LIBS"
5215         if { (eval echo "$as_me:5215: \"$ac_compile\"") >&5
5216   (eval $ac_compile) 2>&5
5217   ac_status=$?
5218   echo "$as_me:5218: \$? = $ac_status" >&5
5219   (exit $ac_status); } ; then
5220                 if { (eval echo "$as_me:5220: \"$ac_link\"") >&5
5221   (eval $ac_link) 2>&5
5222   ac_status=$?
5223   echo "$as_me:5223: \$? = $ac_status" >&5
5224   (exit $ac_status); } ; then
5225                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5226                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5227                 fi
5228         fi
5229 rm -rf conftest*
5230 LIBS="$cf_save_LIBS"
5231 fi
5232
5233 fi
5234 echo "$as_me:5234: result: $cf_cv_gpm_soname" >&5
5235 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5236
5237                 fi
5238                 test "$cf_cv_gpm_soname" != "unknown" &&
5239 cat >>confdefs.h <<EOF
5240 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5241 EOF
5242
5243                 SHLIB_LIST="-ldl $SHLIB_LIST"
5244         else
5245                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5246                 TEST_LIBS="-lgpm $TEST_LIBS"
5247         fi
5248
5249 cat >>confdefs.h <<\EOF
5250 #define HAVE_LIBGPM 1
5251 EOF
5252
5253 echo "$as_me:5253: checking for Gpm_Wgetch in -lgpm" >&5
5254 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5255 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5256   echo $ECHO_N "(cached) $ECHO_C" >&6
5257 else
5258   ac_check_lib_save_LIBS=$LIBS
5259 LIBS="-lgpm  $LIBS"
5260 cat >conftest.$ac_ext <<_ACEOF
5261 #line 5261 "configure"
5262 #include "confdefs.h"
5263
5264 /* Override any gcc2 internal prototype to avoid an error.  */
5265 #ifdef __cplusplus
5266 extern "C"
5267 #endif
5268 /* We use char because int might match the return type of a gcc2
5269    builtin and then its argument prototype would still apply.  */
5270 char Gpm_Wgetch ();
5271 int
5272 main ()
5273 {
5274 Gpm_Wgetch ();
5275   ;
5276   return 0;
5277 }
5278 _ACEOF
5279 rm -f conftest.$ac_objext conftest$ac_exeext
5280 if { (eval echo "$as_me:5280: \"$ac_link\"") >&5
5281   (eval $ac_link) 2>&5
5282   ac_status=$?
5283   echo "$as_me:5283: \$? = $ac_status" >&5
5284   (exit $ac_status); } &&
5285          { ac_try='test -s conftest$ac_exeext'
5286   { (eval echo "$as_me:5286: \"$ac_try\"") >&5
5287   (eval $ac_try) 2>&5
5288   ac_status=$?
5289   echo "$as_me:5289: \$? = $ac_status" >&5
5290   (exit $ac_status); }; }; then
5291   ac_cv_lib_gpm_Gpm_Wgetch=yes
5292 else
5293   echo "$as_me: failed program was:" >&5
5294 cat conftest.$ac_ext >&5
5295 ac_cv_lib_gpm_Gpm_Wgetch=no
5296 fi
5297 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5298 LIBS=$ac_check_lib_save_LIBS
5299 fi
5300 echo "$as_me:5300: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5301 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5302 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5303
5304 echo "$as_me:5304: checking if GPM is weakly bound to curses library" >&5
5305 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5306 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5307   echo $ECHO_N "(cached) $ECHO_C" >&6
5308 else
5309
5310 cf_cv_check_gpm_wgetch=unknown
5311 if test "$cross_compiling" != yes ; then
5312
5313 cat >conftest.$ac_ext <<CF_EOF
5314 #include <gpm.h>
5315 int main()
5316 {
5317         Gpm_Wgetch();
5318         ${cf_cv_main_return:-return}(0);
5319 }
5320 CF_EOF
5321
5322         cf_save_LIBS="$LIBS"
5323         # This only works if we can look at the symbol table.  If a shared
5324         # library is stripped for install, we cannot use that.  So we're forced
5325         # to rely on the static library, noting that some packagers may not
5326         # include it.
5327         LIBS="-static -lgpm -dynamic $LIBS"
5328         if { (eval echo "$as_me:5328: \"$ac_compile\"") >&5
5329   (eval $ac_compile) 2>&5
5330   ac_status=$?
5331   echo "$as_me:5331: \$? = $ac_status" >&5
5332   (exit $ac_status); } ; then
5333                 if { (eval echo "$as_me:5333: \"$ac_link\"") >&5
5334   (eval $ac_link) 2>&5
5335   ac_status=$?
5336   echo "$as_me:5336: \$? = $ac_status" >&5
5337   (exit $ac_status); } ; then
5338                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5339                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5340                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5341                 fi
5342         fi
5343         rm -rf conftest*
5344         LIBS="$cf_save_LIBS"
5345 fi
5346
5347 fi
5348 echo "$as_me:5348: result: $cf_cv_check_gpm_wgetch" >&5
5349 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5350
5351 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5352         { echo "$as_me:5352: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5353 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5354 fi
5355
5356 fi
5357
5358 fi
5359
5360 # not everyone has "test -c"
5361 if test -c /dev/sysmouse 2>/dev/null ; then
5362 echo "$as_me:5362: checking if you want to use sysmouse" >&5
5363 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5364
5365 # Check whether --with-sysmouse or --without-sysmouse was given.
5366 if test "${with_sysmouse+set}" = set; then
5367   withval="$with_sysmouse"
5368   cf_with_sysmouse=$withval
5369 else
5370   cf_with_sysmouse=maybe
5371 fi;
5372         if test "$cf_with_sysmouse" != no ; then
5373         cat >conftest.$ac_ext <<_ACEOF
5374 #line 5374 "configure"
5375 #include "confdefs.h"
5376
5377 #include <osreldate.h>
5378 #if (__FreeBSD_version >= 400017)
5379 #include <sys/consio.h>
5380 #include <sys/fbio.h>
5381 #else
5382 #include <machine/console.h>
5383 #endif
5384
5385 int
5386 main ()
5387 {
5388
5389         struct mouse_info the_mouse;
5390         ioctl(0, CONS_MOUSECTL, &the_mouse);
5391
5392   ;
5393   return 0;
5394 }
5395 _ACEOF
5396 rm -f conftest.$ac_objext
5397 if { (eval echo "$as_me:5397: \"$ac_compile\"") >&5
5398   (eval $ac_compile) 2>&5
5399   ac_status=$?
5400   echo "$as_me:5400: \$? = $ac_status" >&5
5401   (exit $ac_status); } &&
5402          { ac_try='test -s conftest.$ac_objext'
5403   { (eval echo "$as_me:5403: \"$ac_try\"") >&5
5404   (eval $ac_try) 2>&5
5405   ac_status=$?
5406   echo "$as_me:5406: \$? = $ac_status" >&5
5407   (exit $ac_status); }; }; then
5408   cf_with_sysmouse=yes
5409 else
5410   echo "$as_me: failed program was:" >&5
5411 cat conftest.$ac_ext >&5
5412 cf_with_sysmouse=no
5413 fi
5414 rm -f conftest.$ac_objext conftest.$ac_ext
5415         fi
5416 echo "$as_me:5416: result: $cf_with_sysmouse" >&5
5417 echo "${ECHO_T}$cf_with_sysmouse" >&6
5418 test "$cf_with_sysmouse" = yes &&
5419 cat >>confdefs.h <<\EOF
5420 #define USE_SYSMOUSE 1
5421 EOF
5422
5423 fi
5424
5425 if test X"$CC_G_OPT" = X"" ; then
5426         CC_G_OPT='-g'
5427         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5428 fi
5429
5430 if test X"$CXX_G_OPT" = X"" ; then
5431         CXX_G_OPT='-g'
5432         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5433 fi
5434
5435 echo "$as_me:5435: checking for default loader flags" >&5
5436 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5437 case $DFT_LWR_MODEL in
5438 libtool) LD_MODEL=''   ;;
5439 normal)  LD_MODEL=''   ;;
5440 debug)   LD_MODEL=$CC_G_OPT ;;
5441 profile) LD_MODEL='-pg';;
5442 shared)  LD_MODEL=''   ;;
5443 esac
5444 echo "$as_me:5444: result: $LD_MODEL" >&5
5445 echo "${ECHO_T}$LD_MODEL" >&6
5446
5447 case $DFT_LWR_MODEL in
5448 shared)
5449
5450 echo "$as_me:5450: checking if rpath option should be used" >&5
5451 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5452
5453 # Check whether --enable-rpath or --disable-rpath was given.
5454 if test "${enable_rpath+set}" = set; then
5455   enableval="$enable_rpath"
5456   cf_cv_enable_rpath=$enableval
5457 else
5458   cf_cv_enable_rpath=no
5459 fi;
5460 echo "$as_me:5460: result: $cf_cv_enable_rpath" >&5
5461 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5462
5463 echo "$as_me:5463: checking if shared libraries should be relinked during install" >&5
5464 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5465
5466 # Check whether --enable-relink or --disable-relink was given.
5467 if test "${enable_relink+set}" = set; then
5468   enableval="$enable_relink"
5469   cf_cv_do_relink=$enableval
5470 else
5471   cf_cv_do_relink=yes
5472 fi;
5473 echo "$as_me:5473: result: $cf_cv_do_relink" >&5
5474 echo "${ECHO_T}$cf_cv_do_relink" >&6
5475         ;;
5476 esac
5477
5478 # we will build libraries one-level down.
5479 rel_builddir=..
5480
5481 LD_RPATH_OPT=
5482 echo "$as_me:5482: checking for an rpath option" >&5
5483 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5484 case $cf_cv_system_name in #(vi
5485 irix*) #(vi
5486         if test "$GCC" = yes; then
5487                 LD_RPATH_OPT="-Wl,-rpath,"
5488         else
5489                 LD_RPATH_OPT="-rpath "
5490         fi
5491         ;;
5492 linux*|gnu*|k*bsd*-gnu) #(vi
5493         LD_RPATH_OPT="-Wl,-rpath,"
5494         ;;
5495 openbsd[2-9].*|mirbsd*) #(vi
5496         LD_RPATH_OPT="-Wl,-rpath,"
5497         ;;
5498 dragonfly*|freebsd*) #(vi
5499         LD_RPATH_OPT="-rpath "
5500         ;;
5501 netbsd*) #(vi
5502         LD_RPATH_OPT="-Wl,-rpath,"
5503         ;;
5504 osf*|mls+*) #(vi
5505         LD_RPATH_OPT="-rpath "
5506         ;;
5507 solaris2*) #(vi
5508         LD_RPATH_OPT="-R"
5509         ;;
5510 *)
5511         ;;
5512 esac
5513 echo "$as_me:5513: result: $LD_RPATH_OPT" >&5
5514 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5515
5516 case "x$LD_RPATH_OPT" in #(vi
5517 x-R*)
5518         echo "$as_me:5518: checking if we need a space after rpath option" >&5
5519 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5520         cf_save_LIBS="$LIBS"
5521         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5522         cat >conftest.$ac_ext <<_ACEOF
5523 #line 5523 "configure"
5524 #include "confdefs.h"
5525
5526 int
5527 main ()
5528 {
5529
5530   ;
5531   return 0;
5532 }
5533 _ACEOF
5534 rm -f conftest.$ac_objext conftest$ac_exeext
5535 if { (eval echo "$as_me:5535: \"$ac_link\"") >&5
5536   (eval $ac_link) 2>&5
5537   ac_status=$?
5538   echo "$as_me:5538: \$? = $ac_status" >&5
5539   (exit $ac_status); } &&
5540          { ac_try='test -s conftest$ac_exeext'
5541   { (eval echo "$as_me:5541: \"$ac_try\"") >&5
5542   (eval $ac_try) 2>&5
5543   ac_status=$?
5544   echo "$as_me:5544: \$? = $ac_status" >&5
5545   (exit $ac_status); }; }; then
5546   cf_rpath_space=no
5547 else
5548   echo "$as_me: failed program was:" >&5
5549 cat conftest.$ac_ext >&5
5550 cf_rpath_space=yes
5551 fi
5552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5553         LIBS="$cf_save_LIBS"
5554         echo "$as_me:5554: result: $cf_rpath_space" >&5
5555 echo "${ECHO_T}$cf_rpath_space" >&6
5556         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5557         ;;
5558 esac
5559
5560         RM_SHARED_OPTS=
5561         LOCAL_LDFLAGS=
5562         LOCAL_LDFLAGS2=
5563         LD_SHARED_OPTS=
5564         INSTALL_LIB="-m 644"
5565         : ${rel_builddir:=.}
5566
5567         cf_cv_do_symlinks=no
5568         cf_ld_rpath_opt=
5569         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5570
5571         echo "$as_me:5571: checking if release/abi version should be used for shared libs" >&5
5572 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5573
5574 # Check whether --with-shlib-version or --without-shlib-version was given.
5575 if test "${with_shlib_version+set}" = set; then
5576   withval="$with_shlib_version"
5577   test -z "$withval" && withval=auto
5578         case $withval in #(vi
5579         yes) #(vi
5580                 cf_cv_shlib_version=auto
5581                 ;;
5582         rel|abi|auto|no) #(vi
5583                 cf_cv_shlib_version=$withval
5584                 ;;
5585         *)
5586                 { { echo "$as_me:5586: error: option value must be one of: rel, abi, auto or no" >&5
5587 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5588    { (exit 1); exit 1; }; }
5589                 ;;
5590         esac
5591
5592 else
5593   cf_cv_shlib_version=auto
5594 fi;
5595         echo "$as_me:5595: result: $cf_cv_shlib_version" >&5
5596 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5597
5598         cf_cv_rm_so_locs=no
5599         cf_try_cflags=
5600
5601         # Some less-capable ports of gcc support only -fpic
5602         CC_SHARED_OPTS=
5603         if test "$GCC" = yes
5604         then
5605                 echo "$as_me:5605: checking which $CC option to use" >&5
5606 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5607                 cf_save_CFLAGS="$CFLAGS"
5608                 for CC_SHARED_OPTS in -fPIC -fpic ''
5609                 do
5610                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5611                         cat >conftest.$ac_ext <<_ACEOF
5612 #line 5612 "configure"
5613 #include "confdefs.h"
5614 #include <stdio.h>
5615 int
5616 main ()
5617 {
5618 int x = 1
5619   ;
5620   return 0;
5621 }
5622 _ACEOF
5623 rm -f conftest.$ac_objext
5624 if { (eval echo "$as_me:5624: \"$ac_compile\"") >&5
5625   (eval $ac_compile) 2>&5
5626   ac_status=$?
5627   echo "$as_me:5627: \$? = $ac_status" >&5
5628   (exit $ac_status); } &&
5629          { ac_try='test -s conftest.$ac_objext'
5630   { (eval echo "$as_me:5630: \"$ac_try\"") >&5
5631   (eval $ac_try) 2>&5
5632   ac_status=$?
5633   echo "$as_me:5633: \$? = $ac_status" >&5
5634   (exit $ac_status); }; }; then
5635   break
5636 else
5637   echo "$as_me: failed program was:" >&5
5638 cat conftest.$ac_ext >&5
5639 fi
5640 rm -f conftest.$ac_objext conftest.$ac_ext
5641                 done
5642                 echo "$as_me:5642: result: $CC_SHARED_OPTS" >&5
5643 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5644                 CFLAGS="$cf_save_CFLAGS"
5645         fi
5646
5647         cf_cv_shlib_version_infix=no
5648
5649         case $cf_cv_system_name in #(vi
5650         aix4.3-9*|aix[5-7]*) #(vi
5651                 if test "$GCC" = yes; then
5652                         CC_SHARED_OPTS=
5653                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5654                 else
5655                         # CC_SHARED_OPTS='-qpic=large -G'
5656                         # perhaps "-bM:SRE -bnoentry -bexpall"
5657                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5658                 fi
5659                 ;;
5660         beos*) #(vi
5661                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5662                 ;;
5663         cygwin*) #(vi
5664                 CC_SHARED_OPTS=
5665                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5666                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5667                 cf_cv_shlib_version=cygdll
5668                 cf_cv_shlib_version_infix=cygdll
5669                 cat >mk_shared_lib.sh <<-CF_EOF
5670                 #!/bin/sh
5671                 SHARED_LIB=\$1
5672                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5673                 shift
5674                 cat <<-EOF
5675                 Linking shared library
5676                 ** SHARED_LIB \$SHARED_LIB
5677                 ** IMPORT_LIB \$IMPORT_LIB
5678 EOF
5679                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5680 CF_EOF
5681                 chmod +x mk_shared_lib.sh
5682                 ;;
5683         darwin*) #(vi
5684                 cf_try_cflags="no-cpp-precomp"
5685                 CC_SHARED_OPTS="-dynamic"
5686                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5687                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5688                 cf_cv_shlib_version_infix=yes
5689                 echo "$as_me:5689: checking if ld -search_paths_first works" >&5
5690 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5691 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5692   echo $ECHO_N "(cached) $ECHO_C" >&6
5693 else
5694
5695                         cf_save_LDFLAGS=$LDFLAGS
5696                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5697                         cat >conftest.$ac_ext <<_ACEOF
5698 #line 5698 "configure"
5699 #include "confdefs.h"
5700
5701 int
5702 main ()
5703 {
5704 int i;
5705   ;
5706   return 0;
5707 }
5708 _ACEOF
5709 rm -f conftest.$ac_objext conftest$ac_exeext
5710 if { (eval echo "$as_me:5710: \"$ac_link\"") >&5
5711   (eval $ac_link) 2>&5
5712   ac_status=$?
5713   echo "$as_me:5713: \$? = $ac_status" >&5
5714   (exit $ac_status); } &&
5715          { ac_try='test -s conftest$ac_exeext'
5716   { (eval echo "$as_me:5716: \"$ac_try\"") >&5
5717   (eval $ac_try) 2>&5
5718   ac_status=$?
5719   echo "$as_me:5719: \$? = $ac_status" >&5
5720   (exit $ac_status); }; }; then
5721   cf_cv_ldflags_search_paths_first=yes
5722 else
5723   echo "$as_me: failed program was:" >&5
5724 cat conftest.$ac_ext >&5
5725 cf_cv_ldflags_search_paths_first=no
5726 fi
5727 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5728                                 LDFLAGS=$cf_save_LDFLAGS
5729 fi
5730 echo "$as_me:5730: result: $cf_cv_ldflags_search_paths_first" >&5
5731 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5732                 if test $cf_cv_ldflags_search_paths_first = yes; then
5733                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5734                 fi
5735                 ;;
5736         hpux[7-8]*) #(vi
5737                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5738                 if test "$GCC" != yes; then
5739                         CC_SHARED_OPTS='+Z'
5740                 fi
5741                 MK_SHARED_LIB='${LD} -b -o $@'
5742                 INSTALL_LIB="-m 555"
5743                 ;;
5744         hpux*) #(vi
5745                 # (tested with gcc 2.7.2 -- I don't have c89)
5746                 if test "$GCC" = yes; then
5747                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5748                 else
5749                         CC_SHARED_OPTS='+Z'
5750                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5751                 fi
5752                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5753                 # HP-UX shared libraries must be executable, and should be
5754                 # readonly to exploit a quirk in the memory manager.
5755                 INSTALL_LIB="-m 555"
5756                 ;;
5757         interix*)
5758                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5759                 if test "$cf_cv_shlib_version" = rel; then
5760                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5761                 else
5762                         cf_shared_soname='`basename `'
5763                 fi
5764                 CC_SHARED_OPTS=
5765                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5766                 ;;
5767         irix*) #(vi
5768                 if test "$cf_cv_enable_rpath" = yes ; then
5769                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5770                 fi
5771                 # tested with IRIX 5.2 and 'cc'.
5772                 if test "$GCC" != yes; then
5773                         CC_SHARED_OPTS='-KPIC'
5774                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5775                 else
5776                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5777                 fi
5778                 cf_cv_rm_so_locs=yes
5779                 ;;
5780         linux*|gnu*|k*bsd*-gnu) #(vi
5781                 if test "$DFT_LWR_MODEL" = "shared" ; then
5782                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5783                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5784                 fi
5785                 if test "$cf_cv_enable_rpath" = yes ; then
5786                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5787                 fi
5788
5789         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5790         if test "$cf_cv_shlib_version" = rel; then
5791                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5792         else
5793                 cf_cv_shared_soname='`basename $@`'
5794         fi
5795
5796                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5797                 ;;
5798         mingw*) #(vi
5799                 cf_cv_shlib_version=mingw
5800                 cf_cv_shlib_version_infix=mingw
5801                 if test "$DFT_LWR_MODEL" = "shared" ; then
5802                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5803                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5804                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5805                 fi
5806                 CC_SHARED_OPTS=
5807                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5808                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5809                 cat >mk_shared_lib.sh <<-CF_EOF
5810                 #!/bin/sh
5811                 SHARED_LIB=\$1
5812                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5813                 shift
5814                 cat <<-EOF
5815                 Linking shared library
5816                 ** SHARED_LIB \$SHARED_LIB
5817                 ** IMPORT_LIB \$IMPORT_LIB
5818 EOF
5819                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5820 CF_EOF
5821                 chmod +x mk_shared_lib.sh
5822                 ;;
5823         openbsd[2-9].*|mirbsd*) #(vi
5824                 if test "$DFT_LWR_MODEL" = "shared" ; then
5825                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5826                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5827                 fi
5828                 if test "$cf_cv_enable_rpath" = yes ; then
5829                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5830                 fi
5831                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5832
5833         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5834         if test "$cf_cv_shlib_version" = rel; then
5835                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5836         else
5837                 cf_cv_shared_soname='`basename $@`'
5838         fi
5839
5840                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5841                 ;;
5842         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5843                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5844                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5845                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5846                 ;;
5847         dragonfly*|freebsd*) #(vi
5848                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5849                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5850                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5851                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5852                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5853                 fi
5854
5855         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5856         if test "$cf_cv_shlib_version" = rel; then
5857                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5858         else
5859                 cf_cv_shared_soname='`basename $@`'
5860         fi
5861
5862                 MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -soname=`basename $@` -o $@'
5863                 ;;
5864         netbsd*) #(vi
5865                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5866                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5867                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5868                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5869                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5870                         if test "$cf_cv_shlib_version" = auto; then
5871                         if test -f /usr/libexec/ld.elf_so; then
5872                                 cf_cv_shlib_version=abi
5873                         else
5874                                 cf_cv_shlib_version=rel
5875                         fi
5876                         fi
5877
5878         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5879         if test "$cf_cv_shlib_version" = rel; then
5880                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5881         else
5882                 cf_cv_shared_soname='`basename $@`'
5883         fi
5884
5885                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5886                 else
5887                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
5888                 fi
5889                 ;;
5890         osf*|mls+*) #(vi
5891                 # tested with OSF/1 V3.2 and 'cc'
5892                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5893                 # link with shared libs).
5894                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5895                 case $host_os in #(vi
5896                 osf4*)
5897                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5898                         ;;
5899                 esac
5900                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5901                 if test "$DFT_LWR_MODEL" = "shared" ; then
5902                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5903                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5904                 fi
5905                 cf_cv_rm_so_locs=yes
5906                 ;;
5907         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5908                 # tested with osr5.0.5
5909                 if test "$GCC" != yes; then
5910                         CC_SHARED_OPTS='-belf -KPIC'
5911                 fi
5912                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5913                 if test "$cf_cv_enable_rpath" = yes ; then
5914                         # only way is to set LD_RUN_PATH but no switch for it
5915                         RUN_PATH=$libdir
5916                 fi
5917                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5918                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5919                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5920                 ;;
5921         sunos4*) #(vi
5922                 # tested with SunOS 4.1.1 and gcc 2.7.0
5923                 if test "$GCC" != yes; then
5924                         CC_SHARED_OPTS='-KPIC'
5925                 fi
5926                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5927                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5928                 ;;
5929         solaris2*) #(vi
5930                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5931                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5932                 if test "$DFT_LWR_MODEL" = "shared" ; then
5933                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5934                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5935                 fi
5936                 if test "$cf_cv_enable_rpath" = yes ; then
5937                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5938                 fi
5939
5940         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5941         if test "$cf_cv_shlib_version" = rel; then
5942                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5943         else
5944                 cf_cv_shared_soname='`basename $@`'
5945         fi
5946
5947                 if test "$GCC" != yes; then
5948                         cf_save_CFLAGS="$CFLAGS"
5949                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5950                         do
5951                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5952                                 cat >conftest.$ac_ext <<_ACEOF
5953 #line 5953 "configure"
5954 #include "confdefs.h"
5955 #include <stdio.h>
5956 int
5957 main ()
5958 {
5959 printf("Hello\n");
5960   ;
5961   return 0;
5962 }
5963 _ACEOF
5964 rm -f conftest.$ac_objext
5965 if { (eval echo "$as_me:5965: \"$ac_compile\"") >&5
5966   (eval $ac_compile) 2>&5
5967   ac_status=$?
5968   echo "$as_me:5968: \$? = $ac_status" >&5
5969   (exit $ac_status); } &&
5970          { ac_try='test -s conftest.$ac_objext'
5971   { (eval echo "$as_me:5971: \"$ac_try\"") >&5
5972   (eval $ac_try) 2>&5
5973   ac_status=$?
5974   echo "$as_me:5974: \$? = $ac_status" >&5
5975   (exit $ac_status); }; }; then
5976   break
5977 else
5978   echo "$as_me: failed program was:" >&5
5979 cat conftest.$ac_ext >&5
5980 fi
5981 rm -f conftest.$ac_objext conftest.$ac_ext
5982                         done
5983                         CFLAGS="$cf_save_CFLAGS"
5984                         CC_SHARED_OPTS=$cf_shared_opts
5985                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5986                 else
5987                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5988                 fi
5989                 ;;
5990         sysv5uw7*|unix_sv*) #(vi
5991                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5992                 if test "$GCC" != yes; then
5993                         CC_SHARED_OPTS='-KPIC'
5994                 fi
5995                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5996                 ;;
5997         *)
5998                 CC_SHARED_OPTS='unknown'
5999                 MK_SHARED_LIB='echo unknown'
6000                 ;;
6001         esac
6002
6003         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6004         case "$cf_cv_shlib_version" in #(vi
6005         rel|abi)
6006                 case "$MK_SHARED_LIB" in #(vi
6007                 *'-o $@') #(vi
6008                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6009                         ;;
6010                 *)
6011                         { echo "$as_me:6011: WARNING: ignored --with-shlib-version" >&5
6012 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6013                         ;;
6014                 esac
6015                 ;;
6016         esac
6017
6018         if test -n "$cf_try_cflags"
6019         then
6020 cat > conftest.$ac_ext <<EOF
6021 #line 6021 "${as_me:-configure}"
6022 #include <stdio.h>
6023 int main(int argc, char *argv[])
6024 {
6025         printf("hello\n");
6026         return (argv[argc-1] == 0) ;
6027 }
6028 EOF
6029                 cf_save_CFLAGS="$CFLAGS"
6030                 for cf_opt in $cf_try_cflags
6031                 do
6032                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6033                         echo "$as_me:6033: checking if CFLAGS option -$cf_opt works" >&5
6034 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6035                         if { (eval echo "$as_me:6035: \"$ac_compile\"") >&5
6036   (eval $ac_compile) 2>&5
6037   ac_status=$?
6038   echo "$as_me:6038: \$? = $ac_status" >&5
6039   (exit $ac_status); }; then
6040                                 echo "$as_me:6040: result: yes" >&5
6041 echo "${ECHO_T}yes" >&6
6042                                 cf_save_CFLAGS="$CFLAGS"
6043                         else
6044                                 echo "$as_me:6044: result: no" >&5
6045 echo "${ECHO_T}no" >&6
6046                         fi
6047                 done
6048                 CFLAGS="$cf_save_CFLAGS"
6049         fi
6050
6051         # RPATH_LIST is a colon-separated list of directories
6052         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6053         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6054
6055         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6056
6057         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6058
6059 echo "${as_me:-configure}:6059: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6060
6061         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6062
6063 echo "${as_me:-configure}:6063: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6064
6065 if test "$CC_SHARED_OPTS" = "unknown"; then
6066         for model in $cf_list_models; do
6067                 if test "$model" = "shared"; then
6068                         { { echo "$as_me:6068: error: Shared libraries are not supported in this version" >&5
6069 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6070    { (exit 1); exit 1; }; }
6071                 fi
6072         done
6073 fi
6074
6075 ### If we're building with rpath, try to link non-standard libs that way too.
6076 if test "$DFT_LWR_MODEL" = "shared"; then
6077
6078 echo "$as_me:6078: checking if rpath-hack should be disabled" >&5
6079 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6080
6081 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6082 if test "${enable_rpath_hack+set}" = set; then
6083   enableval="$enable_rpath_hack"
6084   test "$enableval" != no && enableval=yes
6085   if test "$enableval" != "yes" ; then
6086     cf_disable_rpath_hack=yes
6087   else
6088     cf_disable_rpath_hack=no
6089   fi
6090 else
6091   enableval=yes
6092   cf_disable_rpath_hack=no
6093
6094 fi;
6095 echo "$as_me:6095: result: $cf_disable_rpath_hack" >&5
6096 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6097 if test "$cf_disable_rpath_hack" = no ; then
6098
6099 echo "$as_me:6099: checking for updated LDFLAGS" >&5
6100 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6101 if test -n "$LD_RPATH_OPT" ; then
6102         echo "$as_me:6102: result: maybe" >&5
6103 echo "${ECHO_T}maybe" >&6
6104
6105         for ac_prog in ldd
6106 do
6107   # Extract the first word of "$ac_prog", so it can be a program name with args.
6108 set dummy $ac_prog; ac_word=$2
6109 echo "$as_me:6109: checking for $ac_word" >&5
6110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6111 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6112   echo $ECHO_N "(cached) $ECHO_C" >&6
6113 else
6114   if test -n "$cf_ldd_prog"; then
6115   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6116 else
6117   ac_save_IFS=$IFS; IFS=$ac_path_separator
6118 ac_dummy="$PATH"
6119 for ac_dir in $ac_dummy; do
6120   IFS=$ac_save_IFS
6121   test -z "$ac_dir" && ac_dir=.
6122   $as_executable_p "$ac_dir/$ac_word" || continue
6123 ac_cv_prog_cf_ldd_prog="$ac_prog"
6124 echo "$as_me:6124: found $ac_dir/$ac_word" >&5
6125 break
6126 done
6127
6128 fi
6129 fi
6130 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6131 if test -n "$cf_ldd_prog"; then
6132   echo "$as_me:6132: result: $cf_ldd_prog" >&5
6133 echo "${ECHO_T}$cf_ldd_prog" >&6
6134 else
6135   echo "$as_me:6135: result: no" >&5
6136 echo "${ECHO_T}no" >&6
6137 fi
6138
6139   test -n "$cf_ldd_prog" && break
6140 done
6141 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6142
6143         cf_rpath_list="/usr/lib /lib"
6144         if test "$cf_ldd_prog" != no
6145         then
6146                 cf_rpath_oops=
6147
6148 cat >conftest.$ac_ext <<_ACEOF
6149 #line 6149 "configure"
6150 #include "confdefs.h"
6151 #include <stdio.h>
6152 int
6153 main ()
6154 {
6155 printf("Hello");
6156   ;
6157   return 0;
6158 }
6159 _ACEOF
6160 rm -f conftest.$ac_objext conftest$ac_exeext
6161 if { (eval echo "$as_me:6161: \"$ac_link\"") >&5
6162   (eval $ac_link) 2>&5
6163   ac_status=$?
6164   echo "$as_me:6164: \$? = $ac_status" >&5
6165   (exit $ac_status); } &&
6166          { ac_try='test -s conftest$ac_exeext'
6167   { (eval echo "$as_me:6167: \"$ac_try\"") >&5
6168   (eval $ac_try) 2>&5
6169   ac_status=$?
6170   echo "$as_me:6170: \$? = $ac_status" >&5
6171   (exit $ac_status); }; }; then
6172   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6173                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6174 else
6175   echo "$as_me: failed program was:" >&5
6176 cat conftest.$ac_ext >&5
6177 fi
6178 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6179
6180                 # If we passed the link-test, but get a "not found" on a given library,
6181                 # this could be due to inept reconfiguration of gcc to make it only
6182                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6183                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6184                 # /usr/local libraries.
6185                 if test -n "$cf_rpath_oops"
6186                 then
6187                         for cf_rpath_src in $cf_rpath_oops
6188                         do
6189                                 for cf_rpath_dir in \
6190                                         /usr/local \
6191                                         /usr/pkg \
6192                                         /opt/sfw
6193                                 do
6194                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6195                                         then
6196                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6197
6198 echo "${as_me:-configure}:6198: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6199
6200                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6201                                                 break
6202                                         fi
6203                                 done
6204                         done
6205                 fi
6206         fi
6207
6208         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6209
6210 echo "${as_me:-configure}:6210: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6211
6212 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6213
6214 echo "${as_me:-configure}:6214: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6215
6216 cf_rpath_dst=
6217 for cf_rpath_src in $LDFLAGS
6218 do
6219         case $cf_rpath_src in #(vi
6220         -L*) #(vi
6221
6222                 # check if this refers to a directory which we will ignore
6223                 cf_rpath_skip=no
6224                 if test -n "$cf_rpath_list"
6225                 then
6226                         for cf_rpath_item in $cf_rpath_list
6227                         do
6228                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6229                                 then
6230                                         cf_rpath_skip=yes
6231                                         break
6232                                 fi
6233                         done
6234                 fi
6235
6236                 if test "$cf_rpath_skip" = no
6237                 then
6238                         # transform the option
6239                         if test "$LD_RPATH_OPT" = "-R " ; then
6240                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6241                         else
6242                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6243                         fi
6244
6245                         # if we have not already added this, add it now
6246                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6247                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6248                         then
6249                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6250
6251 echo "${as_me:-configure}:6251: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6252
6253                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6254                         fi
6255                 fi
6256                 ;;
6257         esac
6258         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6259 done
6260 LDFLAGS=$cf_rpath_dst
6261
6262 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6263
6264 echo "${as_me:-configure}:6264: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6265
6266 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6267
6268 echo "${as_me:-configure}:6268: testing ...checking LIBS $LIBS ..." 1>&5
6269
6270 cf_rpath_dst=
6271 for cf_rpath_src in $LIBS
6272 do
6273         case $cf_rpath_src in #(vi
6274         -L*) #(vi
6275
6276                 # check if this refers to a directory which we will ignore
6277                 cf_rpath_skip=no
6278                 if test -n "$cf_rpath_list"
6279                 then
6280                         for cf_rpath_item in $cf_rpath_list
6281                         do
6282                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6283                                 then
6284                                         cf_rpath_skip=yes
6285                                         break
6286                                 fi
6287                         done
6288                 fi
6289
6290                 if test "$cf_rpath_skip" = no
6291                 then
6292                         # transform the option
6293                         if test "$LD_RPATH_OPT" = "-R " ; then
6294                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6295                         else
6296                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6297                         fi
6298
6299                         # if we have not already added this, add it now
6300                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6301                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6302                         then
6303                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6304
6305 echo "${as_me:-configure}:6305: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6306
6307                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6308                         fi
6309                 fi
6310                 ;;
6311         esac
6312         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6313 done
6314 LIBS=$cf_rpath_dst
6315
6316 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6317
6318 echo "${as_me:-configure}:6318: testing ...checked LIBS $LIBS ..." 1>&5
6319
6320         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6321
6322 echo "${as_me:-configure}:6322: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6323
6324 else
6325         echo "$as_me:6325: result: no" >&5
6326 echo "${ECHO_T}no" >&6
6327 fi
6328
6329 fi
6330
6331 fi
6332
6333 ###############################################################################
6334
6335 ###     use option --disable-overwrite to leave out the link to -lcurses
6336 echo "$as_me:6336: checking if you wish to install ncurses overwriting curses" >&5
6337 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6338
6339 # Check whether --enable-overwrite or --disable-overwrite was given.
6340 if test "${enable_overwrite+set}" = set; then
6341   enableval="$enable_overwrite"
6342   with_overwrite=$enableval
6343 else
6344   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6345 fi;
6346 echo "$as_me:6346: result: $with_overwrite" >&5
6347 echo "${ECHO_T}$with_overwrite" >&6
6348
6349 echo "$as_me:6349: checking if external terminfo-database is used" >&5
6350 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6351
6352 # Check whether --enable-database or --disable-database was given.
6353 if test "${enable_database+set}" = set; then
6354   enableval="$enable_database"
6355   use_database=$enableval
6356 else
6357   use_database=yes
6358 fi;
6359 echo "$as_me:6359: result: $use_database" >&5
6360 echo "${ECHO_T}$use_database" >&6
6361
6362 case $host_os in #(vi
6363 os2*) #(vi
6364         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6365         ;;
6366 *) #(vi
6367         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6368         ;;
6369 esac
6370
6371 NCURSES_USE_DATABASE=0
6372 if test "$use_database" != no ; then
6373         NCURSES_USE_DATABASE=1
6374
6375         echo "$as_me:6375: checking which terminfo source-file will be installed" >&5
6376 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6377
6378 # Check whether --with-database or --without-database was given.
6379 if test "${with_database+set}" = set; then
6380   withval="$with_database"
6381   TERMINFO_SRC=$withval
6382 fi;
6383         echo "$as_me:6383: result: $TERMINFO_SRC" >&5
6384 echo "${ECHO_T}$TERMINFO_SRC" >&6
6385
6386         echo "$as_me:6386: checking whether to use hashed database instead of directory/tree" >&5
6387 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6388
6389 # Check whether --with-hashed-db or --without-hashed-db was given.
6390 if test "${with_hashed_db+set}" = set; then
6391   withval="$with_hashed_db"
6392
6393 else
6394   with_hashed_db=no
6395 fi;
6396         echo "$as_me:6396: result: $with_hashed_db" >&5
6397 echo "${ECHO_T}$with_hashed_db" >&6
6398 else
6399         with_hashed_db=no
6400 fi
6401
6402 echo "$as_me:6402: checking for list of fallback descriptions" >&5
6403 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6404
6405 # Check whether --with-fallbacks or --without-fallbacks was given.
6406 if test "${with_fallbacks+set}" = set; then
6407   withval="$with_fallbacks"
6408   with_fallback=$withval
6409 else
6410   with_fallback=
6411 fi;
6412 echo "$as_me:6412: result: $with_fallback" >&5
6413 echo "${ECHO_T}$with_fallback" >&6
6414 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6415
6416 echo "$as_me:6416: checking if you want modern xterm or antique" >&5
6417 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6418
6419 # Check whether --with-xterm-new or --without-xterm-new was given.
6420 if test "${with_xterm_new+set}" = set; then
6421   withval="$with_xterm_new"
6422   with_xterm_new=$withval
6423 else
6424   with_xterm_new=yes
6425 fi;
6426 case $with_xterm_new in
6427 no)     with_xterm_new=xterm-old;;
6428 *)      with_xterm_new=xterm-new;;
6429 esac
6430 echo "$as_me:6430: result: $with_xterm_new" >&5
6431 echo "${ECHO_T}$with_xterm_new" >&6
6432 WHICH_XTERM=$with_xterm_new
6433
6434 echo "$as_me:6434: checking if xterm backspace sends BS or DEL" >&5
6435 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6436
6437 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6438 if test "${with_xterm_kbs+set}" = set; then
6439   withval="$with_xterm_kbs"
6440   with_xterm_kbs=$withval
6441 else
6442   with_xterm_kbs=BS
6443 fi;
6444 case x$with_xterm_kbs in
6445 xyes|xno|xBS|xbs|x8)
6446         with_xterm_kbs=BS
6447         ;;
6448 xDEL|xdel|x127)
6449         with_xterm_kbs=DEL
6450         ;;
6451 *)
6452         with_xterm_kbs=$withval
6453         ;;
6454 esac
6455 echo "$as_me:6455: result: $with_xterm_kbs" >&5
6456 echo "${ECHO_T}$with_xterm_kbs" >&6
6457 XTERM_KBS=$with_xterm_kbs
6458
6459 MAKE_TERMINFO=
6460 if test "$use_database" = no ; then
6461         TERMINFO="${datadir}/terminfo"
6462         MAKE_TERMINFO="#"
6463 else
6464
6465 echo "$as_me:6465: checking for list of terminfo directories" >&5
6466 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6467
6468 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6469 if test "${with_terminfo_dirs+set}" = set; then
6470   withval="$with_terminfo_dirs"
6471
6472 else
6473   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6474 fi;
6475 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6476 cf_dst_path=
6477 for cf_src_path in $withval
6478 do
6479
6480 if test "x$prefix" != xNONE; then
6481   cf_path_syntax="$prefix"
6482 else
6483   cf_path_syntax="$ac_default_prefix"
6484 fi
6485
6486 case ".$cf_src_path" in #(vi
6487 .\$\(*\)*|.\'*\'*) #(vi
6488   ;;
6489 ..|./*|.\\*) #(vi
6490   ;;
6491 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6492   ;;
6493 .\${*prefix}*|.\${*dir}*) #(vi
6494   eval cf_src_path="$cf_src_path"
6495   case ".$cf_src_path" in #(vi
6496   .NONE/*)
6497     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6498     ;;
6499   esac
6500   ;; #(vi
6501 .no|.NONE/*)
6502   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6503   ;;
6504 *)
6505   { { echo "$as_me:6505: error: expected a pathname, not \"$cf_src_path\"" >&5
6506 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6507    { (exit 1); exit 1; }; }
6508   ;;
6509 esac
6510
6511   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6512   cf_dst_path="${cf_dst_path}${cf_src_path}"
6513 done
6514 IFS="$ac_save_ifs"
6515
6516 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6517 # so we have to check/work around.  We do prefer the result of "eval"...
6518 eval cf_dst_eval="$cf_dst_path"
6519 case "x$cf_dst_eval" in #(vi
6520 xNONE*) #(vi
6521         TERMINFO_DIRS=$cf_dst_path
6522         ;;
6523 *)
6524         TERMINFO_DIRS="$cf_dst_eval"
6525         ;;
6526 esac
6527
6528 echo "$as_me:6528: result: $TERMINFO_DIRS" >&5
6529 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6530 test -n "$TERMINFO_DIRS" &&
6531 cat >>confdefs.h <<EOF
6532 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6533 EOF
6534
6535 echo "$as_me:6535: checking for default terminfo directory" >&5
6536 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6537
6538 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6539 if test "${with_default_terminfo_dir+set}" = set; then
6540   withval="$with_default_terminfo_dir"
6541
6542 else
6543   withval="${TERMINFO:-${datadir}/terminfo}"
6544 fi; if test -n "${datadir}/terminfo" ; then
6545
6546 if test "x$prefix" != xNONE; then
6547   cf_path_syntax="$prefix"
6548 else
6549   cf_path_syntax="$ac_default_prefix"
6550 fi
6551
6552 case ".$withval" in #(vi
6553 .\$\(*\)*|.\'*\'*) #(vi
6554   ;;
6555 ..|./*|.\\*) #(vi
6556   ;;
6557 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6558   ;;
6559 .\${*prefix}*|.\${*dir}*) #(vi
6560   eval withval="$withval"
6561   case ".$withval" in #(vi
6562   .NONE/*)
6563     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6564     ;;
6565   esac
6566   ;; #(vi
6567 .no|.NONE/*)
6568   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6569   ;;
6570 *)
6571   { { echo "$as_me:6571: error: expected a pathname, not \"$withval\"" >&5
6572 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6573    { (exit 1); exit 1; }; }
6574   ;;
6575 esac
6576
6577 fi
6578 eval TERMINFO="$withval"
6579
6580 echo "$as_me:6580: result: $TERMINFO" >&5
6581 echo "${ECHO_T}$TERMINFO" >&6
6582
6583 cat >>confdefs.h <<EOF
6584 #define TERMINFO "$TERMINFO"
6585 EOF
6586
6587 fi
6588
6589 ###     use option --disable-big-core to make tic run on small machines
6590 ###     We need 4Mb, check if we can allocate 50% more than that.
6591 echo "$as_me:6591: checking if big-core option selected" >&5
6592 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6593
6594 # Check whether --enable-big-core or --disable-big-core was given.
6595 if test "${enable_big_core+set}" = set; then
6596   enableval="$enable_big_core"
6597   with_big_core=$enableval
6598 else
6599   if test "$cross_compiling" = yes; then
6600   with_big_core=no
6601 else
6602   cat >conftest.$ac_ext <<_ACEOF
6603 #line 6603 "configure"
6604 #include "confdefs.h"
6605
6606 #include <stdlib.h>
6607 #include <string.h>
6608 int main() {
6609         unsigned long n = 6000000L;
6610         char *s = malloc(n);
6611         if (s != 0)
6612                 s[0] = s[n-1] = 0;
6613         ${cf_cv_main_return:-return}(s == 0);
6614 }
6615 _ACEOF
6616 rm -f conftest$ac_exeext
6617 if { (eval echo "$as_me:6617: \"$ac_link\"") >&5
6618   (eval $ac_link) 2>&5
6619   ac_status=$?
6620   echo "$as_me:6620: \$? = $ac_status" >&5
6621   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6622   { (eval echo "$as_me:6622: \"$ac_try\"") >&5
6623   (eval $ac_try) 2>&5
6624   ac_status=$?
6625   echo "$as_me:6625: \$? = $ac_status" >&5
6626   (exit $ac_status); }; }; then
6627   with_big_core=yes
6628 else
6629   echo "$as_me: program exited with status $ac_status" >&5
6630 echo "$as_me: failed program was:" >&5
6631 cat conftest.$ac_ext >&5
6632 with_big_core=no
6633 fi
6634 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6635 fi
6636 fi;
6637 echo "$as_me:6637: result: $with_big_core" >&5
6638 echo "${ECHO_T}$with_big_core" >&6
6639 test "x$with_big_core" = "xyes" &&
6640 cat >>confdefs.h <<\EOF
6641 #define HAVE_BIG_CORE 1
6642 EOF
6643
6644 ### ISO C only guarantees 512-char strings, we have tables which load faster
6645 ### when constructed using "big" strings.  More than the C compiler, the awk
6646 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6647 echo "$as_me:6647: checking if big-strings option selected" >&5
6648 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6649
6650 # Check whether --enable-big-strings or --disable-big-strings was given.
6651 if test "${enable_big_strings+set}" = set; then
6652   enableval="$enable_big_strings"
6653   with_big_strings=$enableval
6654 else
6655
6656         case x$AWK in #(vi
6657         x)
6658                 eval with_big_strings=no
6659                 ;;
6660         *) #(vi
6661                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6662                         | $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
6663                         eval with_big_strings=yes
6664                 else
6665                         eval with_big_strings=no
6666                 fi
6667                 ;;
6668         esac
6669
6670 fi;
6671 echo "$as_me:6671: result: $with_big_strings" >&5
6672 echo "${ECHO_T}$with_big_strings" >&6
6673
6674 USE_BIG_STRINGS=0
6675 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6676
6677 ###     use option --enable-termcap to compile in the termcap fallback support
6678 echo "$as_me:6678: checking if you want termcap-fallback support" >&5
6679 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6680
6681 # Check whether --enable-termcap or --disable-termcap was given.
6682 if test "${enable_termcap+set}" = set; then
6683   enableval="$enable_termcap"
6684   with_termcap=$enableval
6685 else
6686   with_termcap=no
6687 fi;
6688 echo "$as_me:6688: result: $with_termcap" >&5
6689 echo "${ECHO_T}$with_termcap" >&6
6690
6691 NCURSES_USE_TERMCAP=0
6692 if test "x$with_termcap" != "xyes" ; then
6693         if test "$use_database" = no ; then
6694                 if test -z "$with_fallback" ; then
6695                         { { echo "$as_me:6695: error: You have disabled the database w/o specifying fallbacks" >&5
6696 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6697    { (exit 1); exit 1; }; }
6698                 fi
6699         fi
6700
6701 cat >>confdefs.h <<\EOF
6702 #define PURE_TERMINFO 1
6703 EOF
6704
6705 else
6706
6707         if test "$with_ticlib" != no ; then
6708                 { { echo "$as_me:6708: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6709 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6710    { (exit 1); exit 1; }; }
6711         fi
6712
6713         NCURSES_USE_TERMCAP=1
6714         echo "$as_me:6714: checking for list of termcap files" >&5
6715 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6716
6717 # Check whether --with-termpath or --without-termpath was given.
6718 if test "${with_termpath+set}" = set; then
6719   withval="$with_termpath"
6720
6721 else
6722   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6723 fi;
6724 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6725 cf_dst_path=
6726 for cf_src_path in $withval
6727 do
6728
6729 if test "x$prefix" != xNONE; then
6730   cf_path_syntax="$prefix"
6731 else
6732   cf_path_syntax="$ac_default_prefix"
6733 fi
6734
6735 case ".$cf_src_path" in #(vi
6736 .\$\(*\)*|.\'*\'*) #(vi
6737   ;;
6738 ..|./*|.\\*) #(vi
6739   ;;
6740 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6741   ;;
6742 .\${*prefix}*|.\${*dir}*) #(vi
6743   eval cf_src_path="$cf_src_path"
6744   case ".$cf_src_path" in #(vi
6745   .NONE/*)
6746     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6747     ;;
6748   esac
6749   ;; #(vi
6750 .no|.NONE/*)
6751   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6752   ;;
6753 *)
6754   { { echo "$as_me:6754: error: expected a pathname, not \"$cf_src_path\"" >&5
6755 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6756    { (exit 1); exit 1; }; }
6757   ;;
6758 esac
6759
6760   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6761   cf_dst_path="${cf_dst_path}${cf_src_path}"
6762 done
6763 IFS="$ac_save_ifs"
6764
6765 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6766 # so we have to check/work around.  We do prefer the result of "eval"...
6767 eval cf_dst_eval="$cf_dst_path"
6768 case "x$cf_dst_eval" in #(vi
6769 xNONE*) #(vi
6770         TERMPATH=$cf_dst_path
6771         ;;
6772 *)
6773         TERMPATH="$cf_dst_eval"
6774         ;;
6775 esac
6776
6777         echo "$as_me:6777: result: $TERMPATH" >&5
6778 echo "${ECHO_T}$TERMPATH" >&6
6779         test -n "$TERMPATH" &&
6780 cat >>confdefs.h <<EOF
6781 #define TERMPATH "$TERMPATH"
6782 EOF
6783
6784         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6785         echo "$as_me:6785: checking if fast termcap-loader is needed" >&5
6786 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6787
6788 # Check whether --enable-getcap or --disable-getcap was given.
6789 if test "${enable_getcap+set}" = set; then
6790   enableval="$enable_getcap"
6791   with_getcap=$enableval
6792 else
6793   with_getcap=no
6794 fi;
6795         echo "$as_me:6795: result: $with_getcap" >&5
6796 echo "${ECHO_T}$with_getcap" >&6
6797         test "x$with_getcap" = "xyes" &&
6798 cat >>confdefs.h <<\EOF
6799 #define USE_GETCAP 1
6800 EOF
6801
6802         echo "$as_me:6802: checking if translated termcaps will be cached in ~/.terminfo" >&5
6803 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6804
6805 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6806 if test "${enable_getcap_cache+set}" = set; then
6807   enableval="$enable_getcap_cache"
6808   with_getcap_cache=$enableval
6809 else
6810   with_getcap_cache=no
6811 fi;
6812         echo "$as_me:6812: result: $with_getcap_cache" >&5
6813 echo "${ECHO_T}$with_getcap_cache" >&6
6814         test "x$with_getcap_cache" = "xyes" &&
6815 cat >>confdefs.h <<\EOF
6816 #define USE_GETCAP_CACHE 1
6817 EOF
6818
6819 fi
6820
6821 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6822 echo "$as_me:6822: checking if ~/.terminfo is wanted" >&5
6823 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6824
6825 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6826 if test "${enable_home_terminfo+set}" = set; then
6827   enableval="$enable_home_terminfo"
6828   with_home_terminfo=$enableval
6829 else
6830   with_home_terminfo=yes
6831 fi;
6832 echo "$as_me:6832: result: $with_home_terminfo" >&5
6833 echo "${ECHO_T}$with_home_terminfo" >&6
6834 test "x$with_home_terminfo" = "xyes" &&
6835 cat >>confdefs.h <<\EOF
6836 #define USE_HOME_TERMINFO 1
6837 EOF
6838
6839 echo "$as_me:6839: checking if you want to use restricted environment when running as root" >&5
6840 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6841
6842 # Check whether --enable-root-environ or --disable-root-environ was given.
6843 if test "${enable_root_environ+set}" = set; then
6844   enableval="$enable_root_environ"
6845   with_root_environ=$enableval
6846 else
6847   with_root_environ=yes
6848 fi;
6849 echo "$as_me:6849: result: $with_root_environ" >&5
6850 echo "${ECHO_T}$with_root_environ" >&6
6851 test "x$with_root_environ" = xyes &&
6852 cat >>confdefs.h <<\EOF
6853 #define USE_ROOT_ENVIRON 1
6854 EOF
6855
6856 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6857 ###   to reduce storage requirements for the terminfo database.
6858
6859 for ac_func in \
6860         remove \
6861         unlink
6862 do
6863 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6864 echo "$as_me:6864: checking for $ac_func" >&5
6865 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6866 if eval "test \"\${$as_ac_var+set}\" = set"; then
6867   echo $ECHO_N "(cached) $ECHO_C" >&6
6868 else
6869   cat >conftest.$ac_ext <<_ACEOF
6870 #line 6870 "configure"
6871 #include "confdefs.h"
6872 /* System header to define __stub macros and hopefully few prototypes,
6873     which can conflict with char $ac_func (); below.  */
6874 #include <assert.h>
6875 /* Override any gcc2 internal prototype to avoid an error.  */
6876 #ifdef __cplusplus
6877 extern "C"
6878 #endif
6879 /* We use char because int might match the return type of a gcc2
6880    builtin and then its argument prototype would still apply.  */
6881 char $ac_func ();
6882 char (*f) ();
6883
6884 int
6885 main ()
6886 {
6887 /* The GNU C library defines this for functions which it implements
6888     to always fail with ENOSYS.  Some functions are actually named
6889     something starting with __ and the normal name is an alias.  */
6890 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6891 choke me
6892 #else
6893 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6894 #endif
6895
6896   ;
6897   return 0;
6898 }
6899 _ACEOF
6900 rm -f conftest.$ac_objext conftest$ac_exeext
6901 if { (eval echo "$as_me:6901: \"$ac_link\"") >&5
6902   (eval $ac_link) 2>&5
6903   ac_status=$?
6904   echo "$as_me:6904: \$? = $ac_status" >&5
6905   (exit $ac_status); } &&
6906          { ac_try='test -s conftest$ac_exeext'
6907   { (eval echo "$as_me:6907: \"$ac_try\"") >&5
6908   (eval $ac_try) 2>&5
6909   ac_status=$?
6910   echo "$as_me:6910: \$? = $ac_status" >&5
6911   (exit $ac_status); }; }; then
6912   eval "$as_ac_var=yes"
6913 else
6914   echo "$as_me: failed program was:" >&5
6915 cat conftest.$ac_ext >&5
6916 eval "$as_ac_var=no"
6917 fi
6918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6919 fi
6920 echo "$as_me:6920: result: `eval echo '${'$as_ac_var'}'`" >&5
6921 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6922 if test `eval echo '${'$as_ac_var'}'` = yes; then
6923   cat >>confdefs.h <<EOF
6924 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6925 EOF
6926
6927 fi
6928 done
6929
6930 if test "$cross_compiling" = yes ; then
6931
6932 for ac_func in \
6933                 link \
6934                 symlink
6935 do
6936 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6937 echo "$as_me:6937: checking for $ac_func" >&5
6938 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6939 if eval "test \"\${$as_ac_var+set}\" = set"; then
6940   echo $ECHO_N "(cached) $ECHO_C" >&6
6941 else
6942   cat >conftest.$ac_ext <<_ACEOF
6943 #line 6943 "configure"
6944 #include "confdefs.h"
6945 /* System header to define __stub macros and hopefully few prototypes,
6946     which can conflict with char $ac_func (); below.  */
6947 #include <assert.h>
6948 /* Override any gcc2 internal prototype to avoid an error.  */
6949 #ifdef __cplusplus
6950 extern "C"
6951 #endif
6952 /* We use char because int might match the return type of a gcc2
6953    builtin and then its argument prototype would still apply.  */
6954 char $ac_func ();
6955 char (*f) ();
6956
6957 int
6958 main ()
6959 {
6960 /* The GNU C library defines this for functions which it implements
6961     to always fail with ENOSYS.  Some functions are actually named
6962     something starting with __ and the normal name is an alias.  */
6963 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6964 choke me
6965 #else
6966 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6967 #endif
6968
6969   ;
6970   return 0;
6971 }
6972 _ACEOF
6973 rm -f conftest.$ac_objext conftest$ac_exeext
6974 if { (eval echo "$as_me:6974: \"$ac_link\"") >&5
6975   (eval $ac_link) 2>&5
6976   ac_status=$?
6977   echo "$as_me:6977: \$? = $ac_status" >&5
6978   (exit $ac_status); } &&
6979          { ac_try='test -s conftest$ac_exeext'
6980   { (eval echo "$as_me:6980: \"$ac_try\"") >&5
6981   (eval $ac_try) 2>&5
6982   ac_status=$?
6983   echo "$as_me:6983: \$? = $ac_status" >&5
6984   (exit $ac_status); }; }; then
6985   eval "$as_ac_var=yes"
6986 else
6987   echo "$as_me: failed program was:" >&5
6988 cat conftest.$ac_ext >&5
6989 eval "$as_ac_var=no"
6990 fi
6991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6992 fi
6993 echo "$as_me:6993: result: `eval echo '${'$as_ac_var'}'`" >&5
6994 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6995 if test `eval echo '${'$as_ac_var'}'` = yes; then
6996   cat >>confdefs.h <<EOF
6997 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6998 EOF
6999
7000 fi
7001 done
7002
7003 else
7004         echo "$as_me:7004: checking if link/symlink functions work" >&5
7005 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7006 if test "${cf_cv_link_funcs+set}" = set; then
7007   echo $ECHO_N "(cached) $ECHO_C" >&6
7008 else
7009
7010                 cf_cv_link_funcs=
7011                 for cf_func in link symlink ; do
7012                         if test "$cross_compiling" = yes; then
7013
7014                         eval 'ac_cv_func_'$cf_func'=error'
7015 else
7016   cat >conftest.$ac_ext <<_ACEOF
7017 #line 7017 "configure"
7018 #include "confdefs.h"
7019
7020 #include <sys/types.h>
7021 #include <sys/stat.h>
7022 #ifdef HAVE_UNISTD_H
7023 #include <unistd.h>
7024 #endif
7025 int main()
7026 {
7027         int fail = 0;
7028         char *src = "config.log";
7029         char *dst = "conftest.chk";
7030         struct stat src_sb;
7031         struct stat dst_sb;
7032
7033         stat(src, &src_sb);
7034         fail = ($cf_func("config.log", "conftest.chk") < 0)
7035             || (stat(dst, &dst_sb) < 0)
7036             || (dst_sb.st_mtime != src_sb.st_mtime);
7037 #ifdef HAVE_UNLINK
7038         unlink(dst);
7039 #else
7040         remove(dst);
7041 #endif
7042         ${cf_cv_main_return:-return} (fail);
7043 }
7044
7045 _ACEOF
7046 rm -f conftest$ac_exeext
7047 if { (eval echo "$as_me:7047: \"$ac_link\"") >&5
7048   (eval $ac_link) 2>&5
7049   ac_status=$?
7050   echo "$as_me:7050: \$? = $ac_status" >&5
7051   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7052   { (eval echo "$as_me:7052: \"$ac_try\"") >&5
7053   (eval $ac_try) 2>&5
7054   ac_status=$?
7055   echo "$as_me:7055: \$? = $ac_status" >&5
7056   (exit $ac_status); }; }; then
7057
7058                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7059                         eval 'ac_cv_func_'$cf_func'=yes'
7060 else
7061   echo "$as_me: program exited with status $ac_status" >&5
7062 echo "$as_me: failed program was:" >&5
7063 cat conftest.$ac_ext >&5
7064
7065                         eval 'ac_cv_func_'$cf_func'=no'
7066 fi
7067 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7068 fi
7069                 done
7070                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7071
7072 fi
7073 echo "$as_me:7073: result: $cf_cv_link_funcs" >&5
7074 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7075         test "$ac_cv_func_link"    = yes &&
7076 cat >>confdefs.h <<\EOF
7077 #define HAVE_LINK 1
7078 EOF
7079
7080         test "$ac_cv_func_symlink" = yes &&
7081 cat >>confdefs.h <<\EOF
7082 #define HAVE_SYMLINK 1
7083 EOF
7084
7085 fi
7086
7087 with_links=no
7088 with_symlinks=no
7089
7090 # soft links (symbolic links) are useful for some systems where hard links do
7091 # not work, or to make it simpler to copy terminfo trees around.
7092 if test "x$ac_cv_func_symlink" = xyes ; then
7093     echo "$as_me:7093: checking if tic should use symbolic links" >&5
7094 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7095
7096 # Check whether --enable-symlinks or --disable-symlinks was given.
7097 if test "${enable_symlinks+set}" = set; then
7098   enableval="$enable_symlinks"
7099   with_symlinks=$enableval
7100 else
7101   with_symlinks=no
7102 fi;
7103     echo "$as_me:7103: result: $with_symlinks" >&5
7104 echo "${ECHO_T}$with_symlinks" >&6
7105 fi
7106
7107 # If we have hard links and did not choose to use soft links instead, there is
7108 # no reason to make this choice optional - use the hard links.
7109 if test "$with_symlinks" = no ; then
7110     echo "$as_me:7110: checking if tic should use hard links" >&5
7111 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7112     if test "x$ac_cv_func_link" = xyes ; then
7113         with_links=yes
7114     else
7115         with_links=no
7116     fi
7117     echo "$as_me:7117: result: $with_links" >&5
7118 echo "${ECHO_T}$with_links" >&6
7119 fi
7120
7121 test "x$with_links" = xyes &&
7122 cat >>confdefs.h <<\EOF
7123 #define USE_LINKS 1
7124 EOF
7125
7126 test "x$with_symlinks" = xyes &&
7127 cat >>confdefs.h <<\EOF
7128 #define USE_SYMLINKS 1
7129 EOF
7130
7131 ###   use option --enable-broken-linker to force on use of broken-linker support
7132 echo "$as_me:7132: checking if you want broken-linker support code" >&5
7133 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7134
7135 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7136 if test "${enable_broken_linker+set}" = set; then
7137   enableval="$enable_broken_linker"
7138   with_broken_linker=$enableval
7139 else
7140   with_broken_linker=${BROKEN_LINKER:-no}
7141 fi;
7142 echo "$as_me:7142: result: $with_broken_linker" >&5
7143 echo "${ECHO_T}$with_broken_linker" >&6
7144
7145 BROKEN_LINKER=0
7146 if test "x$with_broken_linker" = xyes ; then
7147
7148 cat >>confdefs.h <<\EOF
7149 #define BROKEN_LINKER 1
7150 EOF
7151
7152         BROKEN_LINKER=1
7153 elif test "$DFT_LWR_MODEL" = shared ; then
7154         case $cf_cv_system_name in #(vi
7155         cygwin*)
7156
7157 cat >>confdefs.h <<\EOF
7158 #define BROKEN_LINKER 1
7159 EOF
7160
7161                 BROKEN_LINKER=1
7162                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7163
7164 echo "${as_me:-configure}:7164: testing cygwin linker is broken anyway ..." 1>&5
7165
7166                 ;;
7167         esac
7168 fi
7169
7170 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7171 echo "$as_me:7171: checking if tputs should process BSD-style prefix padding" >&5
7172 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7173
7174 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7175 if test "${enable_bsdpad+set}" = set; then
7176   enableval="$enable_bsdpad"
7177   with_bsdpad=$enableval
7178 else
7179   with_bsdpad=no
7180 fi;
7181 echo "$as_me:7181: result: $with_bsdpad" >&5
7182 echo "${ECHO_T}$with_bsdpad" >&6
7183 test "x$with_bsdpad" = xyes &&
7184 cat >>confdefs.h <<\EOF
7185 #define BSD_TPUTS 1
7186 EOF
7187
7188 ###   use option --enable-widec to turn on use of wide-character support
7189 NCURSES_CH_T=chtype
7190 NCURSES_LIBUTF8=0
7191
7192 NEED_WCHAR_H=0
7193 NCURSES_MBSTATE_T=0
7194 NCURSES_WCHAR_T=0
7195 NCURSES_WINT_T=0
7196
7197 # Check to define _XOPEN_SOURCE "automatically"
7198
7199 cf_XOPEN_SOURCE=500
7200 cf_POSIX_C_SOURCE=199506L
7201 cf_xopen_source=
7202
7203 case $host_os in #(vi
7204 aix[4-7]*) #(vi
7205         cf_xopen_source="-D_ALL_SOURCE"
7206         ;;
7207 cygwin) #(vi
7208         cf_XOPEN_SOURCE=600
7209         ;;
7210 darwin[0-8].*) #(vi
7211         cf_xopen_source="-D_APPLE_C_SOURCE"
7212         ;;
7213 darwin*) #(vi
7214         cf_xopen_source="-D_DARWIN_C_SOURCE"
7215         cf_XOPEN_SOURCE=
7216         ;;
7217 freebsd*|dragonfly*) #(vi
7218         # 5.x headers associate
7219         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7220         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7221         cf_POSIX_C_SOURCE=200112L
7222         cf_XOPEN_SOURCE=600
7223         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7224         ;;
7225 hpux11*) #(vi
7226         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7227         ;;
7228 hpux*) #(vi
7229         cf_xopen_source="-D_HPUX_SOURCE"
7230         ;;
7231 irix[56].*) #(vi
7232         cf_xopen_source="-D_SGI_SOURCE"
7233         cf_XOPEN_SOURCE=
7234         ;;
7235 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7236
7237 echo "$as_me:7237: checking if we must define _GNU_SOURCE" >&5
7238 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7239 if test "${cf_cv_gnu_source+set}" = set; then
7240   echo $ECHO_N "(cached) $ECHO_C" >&6
7241 else
7242
7243 cat >conftest.$ac_ext <<_ACEOF
7244 #line 7244 "configure"
7245 #include "confdefs.h"
7246 #include <sys/types.h>
7247 int
7248 main ()
7249 {
7250
7251 #ifndef _XOPEN_SOURCE
7252 make an error
7253 #endif
7254   ;
7255   return 0;
7256 }
7257 _ACEOF
7258 rm -f conftest.$ac_objext
7259 if { (eval echo "$as_me:7259: \"$ac_compile\"") >&5
7260   (eval $ac_compile) 2>&5
7261   ac_status=$?
7262   echo "$as_me:7262: \$? = $ac_status" >&5
7263   (exit $ac_status); } &&
7264          { ac_try='test -s conftest.$ac_objext'
7265   { (eval echo "$as_me:7265: \"$ac_try\"") >&5
7266   (eval $ac_try) 2>&5
7267   ac_status=$?
7268   echo "$as_me:7268: \$? = $ac_status" >&5
7269   (exit $ac_status); }; }; then
7270   cf_cv_gnu_source=no
7271 else
7272   echo "$as_me: failed program was:" >&5
7273 cat conftest.$ac_ext >&5
7274 cf_save="$CPPFLAGS"
7275          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7276          cat >conftest.$ac_ext <<_ACEOF
7277 #line 7277 "configure"
7278 #include "confdefs.h"
7279 #include <sys/types.h>
7280 int
7281 main ()
7282 {
7283
7284 #ifdef _XOPEN_SOURCE
7285 make an error
7286 #endif
7287   ;
7288   return 0;
7289 }
7290 _ACEOF
7291 rm -f conftest.$ac_objext
7292 if { (eval echo "$as_me:7292: \"$ac_compile\"") >&5
7293   (eval $ac_compile) 2>&5
7294   ac_status=$?
7295   echo "$as_me:7295: \$? = $ac_status" >&5
7296   (exit $ac_status); } &&
7297          { ac_try='test -s conftest.$ac_objext'
7298   { (eval echo "$as_me:7298: \"$ac_try\"") >&5
7299   (eval $ac_try) 2>&5
7300   ac_status=$?
7301   echo "$as_me:7301: \$? = $ac_status" >&5
7302   (exit $ac_status); }; }; then
7303   cf_cv_gnu_source=no
7304 else
7305   echo "$as_me: failed program was:" >&5
7306 cat conftest.$ac_ext >&5
7307 cf_cv_gnu_source=yes
7308 fi
7309 rm -f conftest.$ac_objext conftest.$ac_ext
7310         CPPFLAGS="$cf_save"
7311
7312 fi
7313 rm -f conftest.$ac_objext conftest.$ac_ext
7314
7315 fi
7316 echo "$as_me:7316: result: $cf_cv_gnu_source" >&5
7317 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7318 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7319
7320         ;;
7321 mirbsd*) #(vi
7322         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7323         cf_XOPEN_SOURCE=
7324
7325 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7326
7327 cf_save_CFLAGS="$CFLAGS"
7328 cf_save_CPPFLAGS="$CPPFLAGS"
7329
7330 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7331         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7332                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7333
7334 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7335         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7336                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7337
7338 echo "$as_me:7338: checking if we should define _POSIX_C_SOURCE" >&5
7339 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7340 if test "${cf_cv_posix_c_source+set}" = set; then
7341   echo $ECHO_N "(cached) $ECHO_C" >&6
7342 else
7343
7344 echo "${as_me:-configure}:7344: testing if the symbol is already defined go no further ..." 1>&5
7345
7346         cat >conftest.$ac_ext <<_ACEOF
7347 #line 7347 "configure"
7348 #include "confdefs.h"
7349 #include <sys/types.h>
7350 int
7351 main ()
7352 {
7353
7354 #ifndef _POSIX_C_SOURCE
7355 make an error
7356 #endif
7357   ;
7358   return 0;
7359 }
7360 _ACEOF
7361 rm -f conftest.$ac_objext
7362 if { (eval echo "$as_me:7362: \"$ac_compile\"") >&5
7363   (eval $ac_compile) 2>&5
7364   ac_status=$?
7365   echo "$as_me:7365: \$? = $ac_status" >&5
7366   (exit $ac_status); } &&
7367          { ac_try='test -s conftest.$ac_objext'
7368   { (eval echo "$as_me:7368: \"$ac_try\"") >&5
7369   (eval $ac_try) 2>&5
7370   ac_status=$?
7371   echo "$as_me:7371: \$? = $ac_status" >&5
7372   (exit $ac_status); }; }; then
7373   cf_cv_posix_c_source=no
7374 else
7375   echo "$as_me: failed program was:" >&5
7376 cat conftest.$ac_ext >&5
7377 cf_want_posix_source=no
7378          case .$cf_POSIX_C_SOURCE in #(vi
7379          .[12]??*) #(vi
7380                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7381                 ;;
7382          .2) #(vi
7383                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7384                 cf_want_posix_source=yes
7385                 ;;
7386          .*)
7387                 cf_want_posix_source=yes
7388                 ;;
7389          esac
7390          if test "$cf_want_posix_source" = yes ; then
7391                 cat >conftest.$ac_ext <<_ACEOF
7392 #line 7392 "configure"
7393 #include "confdefs.h"
7394 #include <sys/types.h>
7395 int
7396 main ()
7397 {
7398
7399 #ifdef _POSIX_SOURCE
7400 make an error
7401 #endif
7402   ;
7403   return 0;
7404 }
7405 _ACEOF
7406 rm -f conftest.$ac_objext
7407 if { (eval echo "$as_me:7407: \"$ac_compile\"") >&5
7408   (eval $ac_compile) 2>&5
7409   ac_status=$?
7410   echo "$as_me:7410: \$? = $ac_status" >&5
7411   (exit $ac_status); } &&
7412          { ac_try='test -s conftest.$ac_objext'
7413   { (eval echo "$as_me:7413: \"$ac_try\"") >&5
7414   (eval $ac_try) 2>&5
7415   ac_status=$?
7416   echo "$as_me:7416: \$? = $ac_status" >&5
7417   (exit $ac_status); }; }; then
7418   :
7419 else
7420   echo "$as_me: failed program was:" >&5
7421 cat conftest.$ac_ext >&5
7422 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7423 fi
7424 rm -f conftest.$ac_objext conftest.$ac_ext
7425          fi
7426
7427 echo "${as_me:-configure}:7427: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7428
7429          CFLAGS="$cf_trim_CFLAGS"
7430          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7431
7432 echo "${as_me:-configure}:7432: testing if the second compile does not leave our definition intact error ..." 1>&5
7433
7434          cat >conftest.$ac_ext <<_ACEOF
7435 #line 7435 "configure"
7436 #include "confdefs.h"
7437 #include <sys/types.h>
7438 int
7439 main ()
7440 {
7441
7442 #ifndef _POSIX_C_SOURCE
7443 make an error
7444 #endif
7445   ;
7446   return 0;
7447 }
7448 _ACEOF
7449 rm -f conftest.$ac_objext
7450 if { (eval echo "$as_me:7450: \"$ac_compile\"") >&5
7451   (eval $ac_compile) 2>&5
7452   ac_status=$?
7453   echo "$as_me:7453: \$? = $ac_status" >&5
7454   (exit $ac_status); } &&
7455          { ac_try='test -s conftest.$ac_objext'
7456   { (eval echo "$as_me:7456: \"$ac_try\"") >&5
7457   (eval $ac_try) 2>&5
7458   ac_status=$?
7459   echo "$as_me:7459: \$? = $ac_status" >&5
7460   (exit $ac_status); }; }; then
7461   :
7462 else
7463   echo "$as_me: failed program was:" >&5
7464 cat conftest.$ac_ext >&5
7465 cf_cv_posix_c_source=no
7466 fi
7467 rm -f conftest.$ac_objext conftest.$ac_ext
7468          CFLAGS="$cf_save_CFLAGS"
7469          CPPFLAGS="$cf_save_CPPFLAGS"
7470
7471 fi
7472 rm -f conftest.$ac_objext conftest.$ac_ext
7473
7474 fi
7475 echo "$as_me:7475: result: $cf_cv_posix_c_source" >&5
7476 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7477
7478 if test "$cf_cv_posix_c_source" != no ; then
7479         CFLAGS="$cf_trim_CFLAGS"
7480         CPPFLAGS="$cf_trim_CPPFLAGS"
7481
7482 cf_fix_cppflags=no
7483 cf_new_cflags=
7484 cf_new_cppflags=
7485 cf_new_extra_cppflags=
7486
7487 for cf_add_cflags in $cf_cv_posix_c_source
7488 do
7489 case $cf_fix_cppflags in
7490 no)
7491         case $cf_add_cflags in #(vi
7492         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7493                 case $cf_add_cflags in
7494                 -D*)
7495                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7496
7497                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7498                                 && test -z "${cf_tst_cflags}" \
7499                                 && cf_fix_cppflags=yes
7500
7501                         if test $cf_fix_cppflags = yes ; then
7502                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7503                                 continue
7504                         elif test "${cf_tst_cflags}" = "\"'" ; then
7505                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7506                                 continue
7507                         fi
7508                         ;;
7509                 esac
7510                 case "$CPPFLAGS" in
7511                 *$cf_add_cflags) #(vi
7512                         ;;
7513                 *) #(vi
7514                         case $cf_add_cflags in #(vi
7515                         -D*)
7516                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7517
7518 CPPFLAGS=`echo "$CPPFLAGS" | \
7519         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7520                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7521
7522                                 ;;
7523                         esac
7524                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7525                         ;;
7526                 esac
7527                 ;;
7528         *)
7529                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7530                 ;;
7531         esac
7532         ;;
7533 yes)
7534         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7535
7536         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7537
7538         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7539                 && test -z "${cf_tst_cflags}" \
7540                 && cf_fix_cppflags=no
7541         ;;
7542 esac
7543 done
7544
7545 if test -n "$cf_new_cflags" ; then
7546
7547         CFLAGS="$CFLAGS $cf_new_cflags"
7548 fi
7549
7550 if test -n "$cf_new_cppflags" ; then
7551
7552         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7553 fi
7554
7555 if test -n "$cf_new_extra_cppflags" ; then
7556
7557         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7558 fi
7559
7560 fi
7561
7562         ;;
7563 netbsd*) #(vi
7564         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7565         ;;
7566 openbsd[4-9]*) #(vi
7567         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7568         cf_xopen_source="-D_BSD_SOURCE"
7569         cf_XOPEN_SOURCE=600
7570         ;;
7571 openbsd*) #(vi
7572         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7573         ;;
7574 osf[45]*) #(vi
7575         cf_xopen_source="-D_OSF_SOURCE"
7576         ;;
7577 nto-qnx*) #(vi
7578         cf_xopen_source="-D_QNX_SOURCE"
7579         ;;
7580 sco*) #(vi
7581         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7582         ;;
7583 solaris2.*) #(vi
7584         cf_xopen_source="-D__EXTENSIONS__"
7585         ;;
7586 *)
7587
7588 echo "$as_me:7588: checking if we should define _XOPEN_SOURCE" >&5
7589 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7590 if test "${cf_cv_xopen_source+set}" = set; then
7591   echo $ECHO_N "(cached) $ECHO_C" >&6
7592 else
7593
7594         cat >conftest.$ac_ext <<_ACEOF
7595 #line 7595 "configure"
7596 #include "confdefs.h"
7597
7598 #include <stdlib.h>
7599 #include <string.h>
7600 #include <sys/types.h>
7601
7602 int
7603 main ()
7604 {
7605
7606 #ifndef _XOPEN_SOURCE
7607 make an error
7608 #endif
7609   ;
7610   return 0;
7611 }
7612 _ACEOF
7613 rm -f conftest.$ac_objext
7614 if { (eval echo "$as_me:7614: \"$ac_compile\"") >&5
7615   (eval $ac_compile) 2>&5
7616   ac_status=$?
7617   echo "$as_me:7617: \$? = $ac_status" >&5
7618   (exit $ac_status); } &&
7619          { ac_try='test -s conftest.$ac_objext'
7620   { (eval echo "$as_me:7620: \"$ac_try\"") >&5
7621   (eval $ac_try) 2>&5
7622   ac_status=$?
7623   echo "$as_me:7623: \$? = $ac_status" >&5
7624   (exit $ac_status); }; }; then
7625   cf_cv_xopen_source=no
7626 else
7627   echo "$as_me: failed program was:" >&5
7628 cat conftest.$ac_ext >&5
7629 cf_save="$CPPFLAGS"
7630          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7631          cat >conftest.$ac_ext <<_ACEOF
7632 #line 7632 "configure"
7633 #include "confdefs.h"
7634
7635 #include <stdlib.h>
7636 #include <string.h>
7637 #include <sys/types.h>
7638
7639 int
7640 main ()
7641 {
7642
7643 #ifdef _XOPEN_SOURCE
7644 make an error
7645 #endif
7646   ;
7647   return 0;
7648 }
7649 _ACEOF
7650 rm -f conftest.$ac_objext
7651 if { (eval echo "$as_me:7651: \"$ac_compile\"") >&5
7652   (eval $ac_compile) 2>&5
7653   ac_status=$?
7654   echo "$as_me:7654: \$? = $ac_status" >&5
7655   (exit $ac_status); } &&
7656          { ac_try='test -s conftest.$ac_objext'
7657   { (eval echo "$as_me:7657: \"$ac_try\"") >&5
7658   (eval $ac_try) 2>&5
7659   ac_status=$?
7660   echo "$as_me:7660: \$? = $ac_status" >&5
7661   (exit $ac_status); }; }; then
7662   cf_cv_xopen_source=no
7663 else
7664   echo "$as_me: failed program was:" >&5
7665 cat conftest.$ac_ext >&5
7666 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7667 fi
7668 rm -f conftest.$ac_objext conftest.$ac_ext
7669         CPPFLAGS="$cf_save"
7670
7671 fi
7672 rm -f conftest.$ac_objext conftest.$ac_ext
7673
7674 fi
7675 echo "$as_me:7675: result: $cf_cv_xopen_source" >&5
7676 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7677
7678 if test "$cf_cv_xopen_source" != no ; then
7679
7680 CFLAGS=`echo "$CFLAGS" | \
7681         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7682                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7683
7684 CPPFLAGS=`echo "$CPPFLAGS" | \
7685         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7686                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7687
7688         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7689
7690 cf_fix_cppflags=no
7691 cf_new_cflags=
7692 cf_new_cppflags=
7693 cf_new_extra_cppflags=
7694
7695 for cf_add_cflags in $cf_temp_xopen_source
7696 do
7697 case $cf_fix_cppflags in
7698 no)
7699         case $cf_add_cflags in #(vi
7700         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7701                 case $cf_add_cflags in
7702                 -D*)
7703                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7704
7705                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7706                                 && test -z "${cf_tst_cflags}" \
7707                                 && cf_fix_cppflags=yes
7708
7709                         if test $cf_fix_cppflags = yes ; then
7710                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7711                                 continue
7712                         elif test "${cf_tst_cflags}" = "\"'" ; then
7713                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7714                                 continue
7715                         fi
7716                         ;;
7717                 esac
7718                 case "$CPPFLAGS" in
7719                 *$cf_add_cflags) #(vi
7720                         ;;
7721                 *) #(vi
7722                         case $cf_add_cflags in #(vi
7723                         -D*)
7724                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7725
7726 CPPFLAGS=`echo "$CPPFLAGS" | \
7727         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7728                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7729
7730                                 ;;
7731                         esac
7732                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7733                         ;;
7734                 esac
7735                 ;;
7736         *)
7737                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7738                 ;;
7739         esac
7740         ;;
7741 yes)
7742         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7743
7744         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7745
7746         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7747                 && test -z "${cf_tst_cflags}" \
7748                 && cf_fix_cppflags=no
7749         ;;
7750 esac
7751 done
7752
7753 if test -n "$cf_new_cflags" ; then
7754
7755         CFLAGS="$CFLAGS $cf_new_cflags"
7756 fi
7757
7758 if test -n "$cf_new_cppflags" ; then
7759
7760         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7761 fi
7762
7763 if test -n "$cf_new_extra_cppflags" ; then
7764
7765         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7766 fi
7767
7768 fi
7769
7770 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7771
7772 cf_save_CFLAGS="$CFLAGS"
7773 cf_save_CPPFLAGS="$CPPFLAGS"
7774
7775 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7776         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7777                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7778
7779 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7780         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7781                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7782
7783 echo "$as_me:7783: checking if we should define _POSIX_C_SOURCE" >&5
7784 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7785 if test "${cf_cv_posix_c_source+set}" = set; then
7786   echo $ECHO_N "(cached) $ECHO_C" >&6
7787 else
7788
7789 echo "${as_me:-configure}:7789: testing if the symbol is already defined go no further ..." 1>&5
7790
7791         cat >conftest.$ac_ext <<_ACEOF
7792 #line 7792 "configure"
7793 #include "confdefs.h"
7794 #include <sys/types.h>
7795 int
7796 main ()
7797 {
7798
7799 #ifndef _POSIX_C_SOURCE
7800 make an error
7801 #endif
7802   ;
7803   return 0;
7804 }
7805 _ACEOF
7806 rm -f conftest.$ac_objext
7807 if { (eval echo "$as_me:7807: \"$ac_compile\"") >&5
7808   (eval $ac_compile) 2>&5
7809   ac_status=$?
7810   echo "$as_me:7810: \$? = $ac_status" >&5
7811   (exit $ac_status); } &&
7812          { ac_try='test -s conftest.$ac_objext'
7813   { (eval echo "$as_me:7813: \"$ac_try\"") >&5
7814   (eval $ac_try) 2>&5
7815   ac_status=$?
7816   echo "$as_me:7816: \$? = $ac_status" >&5
7817   (exit $ac_status); }; }; then
7818   cf_cv_posix_c_source=no
7819 else
7820   echo "$as_me: failed program was:" >&5
7821 cat conftest.$ac_ext >&5
7822 cf_want_posix_source=no
7823          case .$cf_POSIX_C_SOURCE in #(vi
7824          .[12]??*) #(vi
7825                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7826                 ;;
7827          .2) #(vi
7828                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7829                 cf_want_posix_source=yes
7830                 ;;
7831          .*)
7832                 cf_want_posix_source=yes
7833                 ;;
7834          esac
7835          if test "$cf_want_posix_source" = yes ; then
7836                 cat >conftest.$ac_ext <<_ACEOF
7837 #line 7837 "configure"
7838 #include "confdefs.h"
7839 #include <sys/types.h>
7840 int
7841 main ()
7842 {
7843
7844 #ifdef _POSIX_SOURCE
7845 make an error
7846 #endif
7847   ;
7848   return 0;
7849 }
7850 _ACEOF
7851 rm -f conftest.$ac_objext
7852 if { (eval echo "$as_me:7852: \"$ac_compile\"") >&5
7853   (eval $ac_compile) 2>&5
7854   ac_status=$?
7855   echo "$as_me:7855: \$? = $ac_status" >&5
7856   (exit $ac_status); } &&
7857          { ac_try='test -s conftest.$ac_objext'
7858   { (eval echo "$as_me:7858: \"$ac_try\"") >&5
7859   (eval $ac_try) 2>&5
7860   ac_status=$?
7861   echo "$as_me:7861: \$? = $ac_status" >&5
7862   (exit $ac_status); }; }; then
7863   :
7864 else
7865   echo "$as_me: failed program was:" >&5
7866 cat conftest.$ac_ext >&5
7867 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7868 fi
7869 rm -f conftest.$ac_objext conftest.$ac_ext
7870          fi
7871
7872 echo "${as_me:-configure}:7872: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7873
7874          CFLAGS="$cf_trim_CFLAGS"
7875          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7876
7877 echo "${as_me:-configure}:7877: testing if the second compile does not leave our definition intact error ..." 1>&5
7878
7879          cat >conftest.$ac_ext <<_ACEOF
7880 #line 7880 "configure"
7881 #include "confdefs.h"
7882 #include <sys/types.h>
7883 int
7884 main ()
7885 {
7886
7887 #ifndef _POSIX_C_SOURCE
7888 make an error
7889 #endif
7890   ;
7891   return 0;
7892 }
7893 _ACEOF
7894 rm -f conftest.$ac_objext
7895 if { (eval echo "$as_me:7895: \"$ac_compile\"") >&5
7896   (eval $ac_compile) 2>&5
7897   ac_status=$?
7898   echo "$as_me:7898: \$? = $ac_status" >&5
7899   (exit $ac_status); } &&
7900          { ac_try='test -s conftest.$ac_objext'
7901   { (eval echo "$as_me:7901: \"$ac_try\"") >&5
7902   (eval $ac_try) 2>&5
7903   ac_status=$?
7904   echo "$as_me:7904: \$? = $ac_status" >&5
7905   (exit $ac_status); }; }; then
7906   :
7907 else
7908   echo "$as_me: failed program was:" >&5
7909 cat conftest.$ac_ext >&5
7910 cf_cv_posix_c_source=no
7911 fi
7912 rm -f conftest.$ac_objext conftest.$ac_ext
7913          CFLAGS="$cf_save_CFLAGS"
7914          CPPFLAGS="$cf_save_CPPFLAGS"
7915
7916 fi
7917 rm -f conftest.$ac_objext conftest.$ac_ext
7918
7919 fi
7920 echo "$as_me:7920: result: $cf_cv_posix_c_source" >&5
7921 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7922
7923 if test "$cf_cv_posix_c_source" != no ; then
7924         CFLAGS="$cf_trim_CFLAGS"
7925         CPPFLAGS="$cf_trim_CPPFLAGS"
7926
7927 cf_fix_cppflags=no
7928 cf_new_cflags=
7929 cf_new_cppflags=
7930 cf_new_extra_cppflags=
7931
7932 for cf_add_cflags in $cf_cv_posix_c_source
7933 do
7934 case $cf_fix_cppflags in
7935 no)
7936         case $cf_add_cflags in #(vi
7937         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7938                 case $cf_add_cflags in
7939                 -D*)
7940                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7941
7942                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7943                                 && test -z "${cf_tst_cflags}" \
7944                                 && cf_fix_cppflags=yes
7945
7946                         if test $cf_fix_cppflags = yes ; then
7947                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7948                                 continue
7949                         elif test "${cf_tst_cflags}" = "\"'" ; then
7950                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7951                                 continue
7952                         fi
7953                         ;;
7954                 esac
7955                 case "$CPPFLAGS" in
7956                 *$cf_add_cflags) #(vi
7957                         ;;
7958                 *) #(vi
7959                         case $cf_add_cflags in #(vi
7960                         -D*)
7961                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7962
7963 CPPFLAGS=`echo "$CPPFLAGS" | \
7964         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7965                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7966
7967                                 ;;
7968                         esac
7969                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7970                         ;;
7971                 esac
7972                 ;;
7973         *)
7974                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7975                 ;;
7976         esac
7977         ;;
7978 yes)
7979         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7980
7981         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7982
7983         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7984                 && test -z "${cf_tst_cflags}" \
7985                 && cf_fix_cppflags=no
7986         ;;
7987 esac
7988 done
7989
7990 if test -n "$cf_new_cflags" ; then
7991
7992         CFLAGS="$CFLAGS $cf_new_cflags"
7993 fi
7994
7995 if test -n "$cf_new_cppflags" ; then
7996
7997         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7998 fi
7999
8000 if test -n "$cf_new_extra_cppflags" ; then
8001
8002         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8003 fi
8004
8005 fi
8006
8007         ;;
8008 esac
8009
8010 if test -n "$cf_xopen_source" ; then
8011
8012 cf_fix_cppflags=no
8013 cf_new_cflags=
8014 cf_new_cppflags=
8015 cf_new_extra_cppflags=
8016
8017 for cf_add_cflags in $cf_xopen_source
8018 do
8019 case $cf_fix_cppflags in
8020 no)
8021         case $cf_add_cflags in #(vi
8022         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8023                 case $cf_add_cflags in
8024                 -D*)
8025                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8026
8027                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8028                                 && test -z "${cf_tst_cflags}" \
8029                                 && cf_fix_cppflags=yes
8030
8031                         if test $cf_fix_cppflags = yes ; then
8032                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8033                                 continue
8034                         elif test "${cf_tst_cflags}" = "\"'" ; then
8035                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8036                                 continue
8037                         fi
8038                         ;;
8039                 esac
8040                 case "$CPPFLAGS" in
8041                 *$cf_add_cflags) #(vi
8042                         ;;
8043                 *) #(vi
8044                         case $cf_add_cflags in #(vi
8045                         -D*)
8046                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8047
8048 CPPFLAGS=`echo "$CPPFLAGS" | \
8049         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8050                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8051
8052                                 ;;
8053                         esac
8054                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8055                         ;;
8056                 esac
8057                 ;;
8058         *)
8059                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8060                 ;;
8061         esac
8062         ;;
8063 yes)
8064         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8065
8066         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8067
8068         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8069                 && test -z "${cf_tst_cflags}" \
8070                 && cf_fix_cppflags=no
8071         ;;
8072 esac
8073 done
8074
8075 if test -n "$cf_new_cflags" ; then
8076
8077         CFLAGS="$CFLAGS $cf_new_cflags"
8078 fi
8079
8080 if test -n "$cf_new_cppflags" ; then
8081
8082         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8083 fi
8084
8085 if test -n "$cf_new_extra_cppflags" ; then
8086
8087         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8088 fi
8089
8090 fi
8091
8092 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8093         echo "$as_me:8093: checking if _XOPEN_SOURCE really is set" >&5
8094 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8095         cat >conftest.$ac_ext <<_ACEOF
8096 #line 8096 "configure"
8097 #include "confdefs.h"
8098 #include <stdlib.h>
8099 int
8100 main ()
8101 {
8102
8103 #ifndef _XOPEN_SOURCE
8104 make an error
8105 #endif
8106   ;
8107   return 0;
8108 }
8109 _ACEOF
8110 rm -f conftest.$ac_objext
8111 if { (eval echo "$as_me:8111: \"$ac_compile\"") >&5
8112   (eval $ac_compile) 2>&5
8113   ac_status=$?
8114   echo "$as_me:8114: \$? = $ac_status" >&5
8115   (exit $ac_status); } &&
8116          { ac_try='test -s conftest.$ac_objext'
8117   { (eval echo "$as_me:8117: \"$ac_try\"") >&5
8118   (eval $ac_try) 2>&5
8119   ac_status=$?
8120   echo "$as_me:8120: \$? = $ac_status" >&5
8121   (exit $ac_status); }; }; then
8122   cf_XOPEN_SOURCE_set=yes
8123 else
8124   echo "$as_me: failed program was:" >&5
8125 cat conftest.$ac_ext >&5
8126 cf_XOPEN_SOURCE_set=no
8127 fi
8128 rm -f conftest.$ac_objext conftest.$ac_ext
8129         echo "$as_me:8129: result: $cf_XOPEN_SOURCE_set" >&5
8130 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8131         if test $cf_XOPEN_SOURCE_set = yes
8132         then
8133                 cat >conftest.$ac_ext <<_ACEOF
8134 #line 8134 "configure"
8135 #include "confdefs.h"
8136 #include <stdlib.h>
8137 int
8138 main ()
8139 {
8140
8141 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8142 make an error
8143 #endif
8144   ;
8145   return 0;
8146 }
8147 _ACEOF
8148 rm -f conftest.$ac_objext
8149 if { (eval echo "$as_me:8149: \"$ac_compile\"") >&5
8150   (eval $ac_compile) 2>&5
8151   ac_status=$?
8152   echo "$as_me:8152: \$? = $ac_status" >&5
8153   (exit $ac_status); } &&
8154          { ac_try='test -s conftest.$ac_objext'
8155   { (eval echo "$as_me:8155: \"$ac_try\"") >&5
8156   (eval $ac_try) 2>&5
8157   ac_status=$?
8158   echo "$as_me:8158: \$? = $ac_status" >&5
8159   (exit $ac_status); }; }; then
8160   cf_XOPEN_SOURCE_set_ok=yes
8161 else
8162   echo "$as_me: failed program was:" >&5
8163 cat conftest.$ac_ext >&5
8164 cf_XOPEN_SOURCE_set_ok=no
8165 fi
8166 rm -f conftest.$ac_objext conftest.$ac_ext
8167                 if test $cf_XOPEN_SOURCE_set_ok = no
8168                 then
8169                         { echo "$as_me:8169: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8170 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8171                 fi
8172         else
8173
8174 echo "$as_me:8174: checking if we should define _XOPEN_SOURCE" >&5
8175 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8176 if test "${cf_cv_xopen_source+set}" = set; then
8177   echo $ECHO_N "(cached) $ECHO_C" >&6
8178 else
8179
8180         cat >conftest.$ac_ext <<_ACEOF
8181 #line 8181 "configure"
8182 #include "confdefs.h"
8183
8184 #include <stdlib.h>
8185 #include <string.h>
8186 #include <sys/types.h>
8187
8188 int
8189 main ()
8190 {
8191
8192 #ifndef _XOPEN_SOURCE
8193 make an error
8194 #endif
8195   ;
8196   return 0;
8197 }
8198 _ACEOF
8199 rm -f conftest.$ac_objext
8200 if { (eval echo "$as_me:8200: \"$ac_compile\"") >&5
8201   (eval $ac_compile) 2>&5
8202   ac_status=$?
8203   echo "$as_me:8203: \$? = $ac_status" >&5
8204   (exit $ac_status); } &&
8205          { ac_try='test -s conftest.$ac_objext'
8206   { (eval echo "$as_me:8206: \"$ac_try\"") >&5
8207   (eval $ac_try) 2>&5
8208   ac_status=$?
8209   echo "$as_me:8209: \$? = $ac_status" >&5
8210   (exit $ac_status); }; }; then
8211   cf_cv_xopen_source=no
8212 else
8213   echo "$as_me: failed program was:" >&5
8214 cat conftest.$ac_ext >&5
8215 cf_save="$CPPFLAGS"
8216          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8217          cat >conftest.$ac_ext <<_ACEOF
8218 #line 8218 "configure"
8219 #include "confdefs.h"
8220
8221 #include <stdlib.h>
8222 #include <string.h>
8223 #include <sys/types.h>
8224
8225 int
8226 main ()
8227 {
8228
8229 #ifdef _XOPEN_SOURCE
8230 make an error
8231 #endif
8232   ;
8233   return 0;
8234 }
8235 _ACEOF
8236 rm -f conftest.$ac_objext
8237 if { (eval echo "$as_me:8237: \"$ac_compile\"") >&5
8238   (eval $ac_compile) 2>&5
8239   ac_status=$?
8240   echo "$as_me:8240: \$? = $ac_status" >&5
8241   (exit $ac_status); } &&
8242          { ac_try='test -s conftest.$ac_objext'
8243   { (eval echo "$as_me:8243: \"$ac_try\"") >&5
8244   (eval $ac_try) 2>&5
8245   ac_status=$?
8246   echo "$as_me:8246: \$? = $ac_status" >&5
8247   (exit $ac_status); }; }; then
8248   cf_cv_xopen_source=no
8249 else
8250   echo "$as_me: failed program was:" >&5
8251 cat conftest.$ac_ext >&5
8252 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8253 fi
8254 rm -f conftest.$ac_objext conftest.$ac_ext
8255         CPPFLAGS="$cf_save"
8256
8257 fi
8258 rm -f conftest.$ac_objext conftest.$ac_ext
8259
8260 fi
8261 echo "$as_me:8261: result: $cf_cv_xopen_source" >&5
8262 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8263
8264 if test "$cf_cv_xopen_source" != no ; then
8265
8266 CFLAGS=`echo "$CFLAGS" | \
8267         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8268                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8269
8270 CPPFLAGS=`echo "$CPPFLAGS" | \
8271         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8272                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8273
8274         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8275
8276 cf_fix_cppflags=no
8277 cf_new_cflags=
8278 cf_new_cppflags=
8279 cf_new_extra_cppflags=
8280
8281 for cf_add_cflags in $cf_temp_xopen_source
8282 do
8283 case $cf_fix_cppflags in
8284 no)
8285         case $cf_add_cflags in #(vi
8286         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8287                 case $cf_add_cflags in
8288                 -D*)
8289                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8290
8291                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8292                                 && test -z "${cf_tst_cflags}" \
8293                                 && cf_fix_cppflags=yes
8294
8295                         if test $cf_fix_cppflags = yes ; then
8296                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8297                                 continue
8298                         elif test "${cf_tst_cflags}" = "\"'" ; then
8299                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8300                                 continue
8301                         fi
8302                         ;;
8303                 esac
8304                 case "$CPPFLAGS" in
8305                 *$cf_add_cflags) #(vi
8306                         ;;
8307                 *) #(vi
8308                         case $cf_add_cflags in #(vi
8309                         -D*)
8310                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8311
8312 CPPFLAGS=`echo "$CPPFLAGS" | \
8313         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8314                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8315
8316                                 ;;
8317                         esac
8318                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8319                         ;;
8320                 esac
8321                 ;;
8322         *)
8323                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8324                 ;;
8325         esac
8326         ;;
8327 yes)
8328         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8329
8330         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8331
8332         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8333                 && test -z "${cf_tst_cflags}" \
8334                 && cf_fix_cppflags=no
8335         ;;
8336 esac
8337 done
8338
8339 if test -n "$cf_new_cflags" ; then
8340
8341         CFLAGS="$CFLAGS $cf_new_cflags"
8342 fi
8343
8344 if test -n "$cf_new_cppflags" ; then
8345
8346         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8347 fi
8348
8349 if test -n "$cf_new_extra_cppflags" ; then
8350
8351         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8352 fi
8353
8354 fi
8355
8356         fi
8357 fi
8358
8359 # Work around breakage on OS X
8360
8361 echo "$as_me:8361: checking if SIGWINCH is defined" >&5
8362 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8363 if test "${cf_cv_define_sigwinch+set}" = set; then
8364   echo $ECHO_N "(cached) $ECHO_C" >&6
8365 else
8366
8367         cat >conftest.$ac_ext <<_ACEOF
8368 #line 8368 "configure"
8369 #include "confdefs.h"
8370
8371 #include <sys/types.h>
8372 #include <sys/signal.h>
8373
8374 int
8375 main ()
8376 {
8377 int x = SIGWINCH
8378   ;
8379   return 0;
8380 }
8381 _ACEOF
8382 rm -f conftest.$ac_objext
8383 if { (eval echo "$as_me:8383: \"$ac_compile\"") >&5
8384   (eval $ac_compile) 2>&5
8385   ac_status=$?
8386   echo "$as_me:8386: \$? = $ac_status" >&5
8387   (exit $ac_status); } &&
8388          { ac_try='test -s conftest.$ac_objext'
8389   { (eval echo "$as_me:8389: \"$ac_try\"") >&5
8390   (eval $ac_try) 2>&5
8391   ac_status=$?
8392   echo "$as_me:8392: \$? = $ac_status" >&5
8393   (exit $ac_status); }; }; then
8394   cf_cv_define_sigwinch=yes
8395 else
8396   echo "$as_me: failed program was:" >&5
8397 cat conftest.$ac_ext >&5
8398 cat >conftest.$ac_ext <<_ACEOF
8399 #line 8399 "configure"
8400 #include "confdefs.h"
8401
8402 #undef _XOPEN_SOURCE
8403 #undef _POSIX_SOURCE
8404 #undef _POSIX_C_SOURCE
8405 #include <sys/types.h>
8406 #include <sys/signal.h>
8407
8408 int
8409 main ()
8410 {
8411 int x = SIGWINCH
8412   ;
8413   return 0;
8414 }
8415 _ACEOF
8416 rm -f conftest.$ac_objext
8417 if { (eval echo "$as_me:8417: \"$ac_compile\"") >&5
8418   (eval $ac_compile) 2>&5
8419   ac_status=$?
8420   echo "$as_me:8420: \$? = $ac_status" >&5
8421   (exit $ac_status); } &&
8422          { ac_try='test -s conftest.$ac_objext'
8423   { (eval echo "$as_me:8423: \"$ac_try\"") >&5
8424   (eval $ac_try) 2>&5
8425   ac_status=$?
8426   echo "$as_me:8426: \$? = $ac_status" >&5
8427   (exit $ac_status); }; }; then
8428   cf_cv_define_sigwinch=maybe
8429 else
8430   echo "$as_me: failed program was:" >&5
8431 cat conftest.$ac_ext >&5
8432 cf_cv_define_sigwinch=no
8433 fi
8434 rm -f conftest.$ac_objext conftest.$ac_ext
8435
8436 fi
8437 rm -f conftest.$ac_objext conftest.$ac_ext
8438
8439 fi
8440 echo "$as_me:8440: result: $cf_cv_define_sigwinch" >&5
8441 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8442
8443 if test "$cf_cv_define_sigwinch" = maybe ; then
8444 echo "$as_me:8444: checking for actual SIGWINCH definition" >&5
8445 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8446 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8447   echo $ECHO_N "(cached) $ECHO_C" >&6
8448 else
8449
8450 cf_cv_fixup_sigwinch=unknown
8451 cf_sigwinch=32
8452 while test $cf_sigwinch != 1
8453 do
8454         cat >conftest.$ac_ext <<_ACEOF
8455 #line 8455 "configure"
8456 #include "confdefs.h"
8457
8458 #undef _XOPEN_SOURCE
8459 #undef _POSIX_SOURCE
8460 #undef _POSIX_C_SOURCE
8461 #include <sys/types.h>
8462 #include <sys/signal.h>
8463
8464 int
8465 main ()
8466 {
8467
8468 #if SIGWINCH != $cf_sigwinch
8469 make an error
8470 #endif
8471 int x = SIGWINCH
8472   ;
8473   return 0;
8474 }
8475 _ACEOF
8476 rm -f conftest.$ac_objext
8477 if { (eval echo "$as_me:8477: \"$ac_compile\"") >&5
8478   (eval $ac_compile) 2>&5
8479   ac_status=$?
8480   echo "$as_me:8480: \$? = $ac_status" >&5
8481   (exit $ac_status); } &&
8482          { ac_try='test -s conftest.$ac_objext'
8483   { (eval echo "$as_me:8483: \"$ac_try\"") >&5
8484   (eval $ac_try) 2>&5
8485   ac_status=$?
8486   echo "$as_me:8486: \$? = $ac_status" >&5
8487   (exit $ac_status); }; }; then
8488   cf_cv_fixup_sigwinch=$cf_sigwinch
8489          break
8490 else
8491   echo "$as_me: failed program was:" >&5
8492 cat conftest.$ac_ext >&5
8493 fi
8494 rm -f conftest.$ac_objext conftest.$ac_ext
8495
8496 cf_sigwinch=`expr $cf_sigwinch - 1`
8497 done
8498
8499 fi
8500 echo "$as_me:8500: result: $cf_cv_fixup_sigwinch" >&5
8501 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8502
8503         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8504                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8505         fi
8506 fi
8507
8508 # Checks for CODESET support.
8509
8510   echo "$as_me:8510: checking for nl_langinfo and CODESET" >&5
8511 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8512 if test "${am_cv_langinfo_codeset+set}" = set; then
8513   echo $ECHO_N "(cached) $ECHO_C" >&6
8514 else
8515   cat >conftest.$ac_ext <<_ACEOF
8516 #line 8516 "configure"
8517 #include "confdefs.h"
8518 #include <langinfo.h>
8519 int
8520 main ()
8521 {
8522 char* cs = nl_langinfo(CODESET);
8523   ;
8524   return 0;
8525 }
8526 _ACEOF
8527 rm -f conftest.$ac_objext conftest$ac_exeext
8528 if { (eval echo "$as_me:8528: \"$ac_link\"") >&5
8529   (eval $ac_link) 2>&5
8530   ac_status=$?
8531   echo "$as_me:8531: \$? = $ac_status" >&5
8532   (exit $ac_status); } &&
8533          { ac_try='test -s conftest$ac_exeext'
8534   { (eval echo "$as_me:8534: \"$ac_try\"") >&5
8535   (eval $ac_try) 2>&5
8536   ac_status=$?
8537   echo "$as_me:8537: \$? = $ac_status" >&5
8538   (exit $ac_status); }; }; then
8539   am_cv_langinfo_codeset=yes
8540 else
8541   echo "$as_me: failed program was:" >&5
8542 cat conftest.$ac_ext >&5
8543 am_cv_langinfo_codeset=no
8544 fi
8545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8546
8547 fi
8548 echo "$as_me:8548: result: $am_cv_langinfo_codeset" >&5
8549 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8550   if test $am_cv_langinfo_codeset = yes; then
8551
8552 cat >>confdefs.h <<\EOF
8553 #define HAVE_LANGINFO_CODESET 1
8554 EOF
8555
8556   fi
8557
8558 # use these variables to work around a defect in gcc's fixincludes.
8559 NCURSES_OK_WCHAR_T=
8560 NCURSES_OK_WINT_T=
8561
8562 echo "$as_me:8562: checking if you want wide-character code" >&5
8563 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8564
8565 # Check whether --enable-widec or --disable-widec was given.
8566 if test "${enable_widec+set}" = set; then
8567   enableval="$enable_widec"
8568   with_widec=$enableval
8569 else
8570   with_widec=no
8571 fi;
8572 echo "$as_me:8572: result: $with_widec" >&5
8573 echo "${ECHO_T}$with_widec" >&6
8574 if test "x$with_widec" = xyes ; then
8575         LIB_SUFFIX="w${LIB_SUFFIX}"
8576
8577 cat >>confdefs.h <<\EOF
8578 #define USE_WIDEC_SUPPORT 1
8579 EOF
8580
8581 cat >>confdefs.h <<\EOF
8582 #define NCURSES_WIDECHAR 1
8583 EOF
8584
8585 echo "$as_me:8585: checking if wchar.h can be used as is" >&5
8586 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8587 if test "${cf_cv_wchar_h_okay+set}" = set; then
8588   echo $ECHO_N "(cached) $ECHO_C" >&6
8589 else
8590
8591 cat >conftest.$ac_ext <<_ACEOF
8592 #line 8592 "configure"
8593 #include "confdefs.h"
8594
8595 #include <stdlib.h>
8596 #include <wchar.h>
8597
8598 int
8599 main ()
8600 {
8601
8602         wint_t foo = 0;
8603         int bar = iswpunct(foo)
8604   ;
8605   return 0;
8606 }
8607 _ACEOF
8608 rm -f conftest.$ac_objext
8609 if { (eval echo "$as_me:8609: \"$ac_compile\"") >&5
8610   (eval $ac_compile) 2>&5
8611   ac_status=$?
8612   echo "$as_me:8612: \$? = $ac_status" >&5
8613   (exit $ac_status); } &&
8614          { ac_try='test -s conftest.$ac_objext'
8615   { (eval echo "$as_me:8615: \"$ac_try\"") >&5
8616   (eval $ac_try) 2>&5
8617   ac_status=$?
8618   echo "$as_me:8618: \$? = $ac_status" >&5
8619   (exit $ac_status); }; }; then
8620   cf_cv_wchar_h_okay=yes
8621 else
8622   echo "$as_me: failed program was:" >&5
8623 cat conftest.$ac_ext >&5
8624 cf_cv_wchar_h_okay=no
8625 fi
8626 rm -f conftest.$ac_objext conftest.$ac_ext
8627 fi
8628 echo "$as_me:8628: result: $cf_cv_wchar_h_okay" >&5
8629 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8630
8631 if test $cf_cv_wchar_h_okay = no
8632 then
8633
8634 echo "$as_me:8634: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8635 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8636 cat >conftest.$ac_ext <<_ACEOF
8637 #line 8637 "configure"
8638 #include "confdefs.h"
8639 #include <sys/types.h>
8640
8641 int
8642 main ()
8643 {
8644
8645 #ifndef _XOPEN_SOURCE_EXTENDED
8646 make an error
8647 #endif
8648   ;
8649   return 0;
8650 }
8651 _ACEOF
8652 rm -f conftest.$ac_objext
8653 if { (eval echo "$as_me:8653: \"$ac_compile\"") >&5
8654   (eval $ac_compile) 2>&5
8655   ac_status=$?
8656   echo "$as_me:8656: \$? = $ac_status" >&5
8657   (exit $ac_status); } &&
8658          { ac_try='test -s conftest.$ac_objext'
8659   { (eval echo "$as_me:8659: \"$ac_try\"") >&5
8660   (eval $ac_try) 2>&5
8661   ac_status=$?
8662   echo "$as_me:8662: \$? = $ac_status" >&5
8663   (exit $ac_status); }; }; then
8664   cf_result=no
8665 else
8666   echo "$as_me: failed program was:" >&5
8667 cat conftest.$ac_ext >&5
8668 cf_result=yes
8669 fi
8670 rm -f conftest.$ac_objext conftest.$ac_ext
8671 echo "$as_me:8671: result: $cf_result" >&5
8672 echo "${ECHO_T}$cf_result" >&6
8673
8674 if test "$cf_result" = yes ; then
8675         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8676 elif test "x" != "x" ; then
8677         echo "$as_me:8677: checking checking for compatible value versus " >&5
8678 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8679         cat >conftest.$ac_ext <<_ACEOF
8680 #line 8680 "configure"
8681 #include "confdefs.h"
8682 #include <sys/types.h>
8683
8684 int
8685 main ()
8686 {
8687
8688 #if _XOPEN_SOURCE_EXTENDED- < 0
8689 make an error
8690 #endif
8691   ;
8692   return 0;
8693 }
8694 _ACEOF
8695 rm -f conftest.$ac_objext
8696 if { (eval echo "$as_me:8696: \"$ac_compile\"") >&5
8697   (eval $ac_compile) 2>&5
8698   ac_status=$?
8699   echo "$as_me:8699: \$? = $ac_status" >&5
8700   (exit $ac_status); } &&
8701          { ac_try='test -s conftest.$ac_objext'
8702   { (eval echo "$as_me:8702: \"$ac_try\"") >&5
8703   (eval $ac_try) 2>&5
8704   ac_status=$?
8705   echo "$as_me:8705: \$? = $ac_status" >&5
8706   (exit $ac_status); }; }; then
8707   cf_result=yes
8708 else
8709   echo "$as_me: failed program was:" >&5
8710 cat conftest.$ac_ext >&5
8711 cf_result=no
8712 fi
8713 rm -f conftest.$ac_objext conftest.$ac_ext
8714         echo "$as_me:8714: result: $cf_result" >&5
8715 echo "${ECHO_T}$cf_result" >&6
8716         if test "$cf_result" = no ; then
8717                 # perhaps we can override it - try...
8718                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8719         fi
8720 fi
8721
8722 fi
8723
8724         # with_overwrite=no
8725         NCURSES_CH_T=cchar_t
8726
8727 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8728 do
8729 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8730 echo "$as_me:8730: checking for $ac_func" >&5
8731 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8732 if eval "test \"\${$as_ac_var+set}\" = set"; then
8733   echo $ECHO_N "(cached) $ECHO_C" >&6
8734 else
8735   cat >conftest.$ac_ext <<_ACEOF
8736 #line 8736 "configure"
8737 #include "confdefs.h"
8738 /* System header to define __stub macros and hopefully few prototypes,
8739     which can conflict with char $ac_func (); below.  */
8740 #include <assert.h>
8741 /* Override any gcc2 internal prototype to avoid an error.  */
8742 #ifdef __cplusplus
8743 extern "C"
8744 #endif
8745 /* We use char because int might match the return type of a gcc2
8746    builtin and then its argument prototype would still apply.  */
8747 char $ac_func ();
8748 char (*f) ();
8749
8750 int
8751 main ()
8752 {
8753 /* The GNU C library defines this for functions which it implements
8754     to always fail with ENOSYS.  Some functions are actually named
8755     something starting with __ and the normal name is an alias.  */
8756 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8757 choke me
8758 #else
8759 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8760 #endif
8761
8762   ;
8763   return 0;
8764 }
8765 _ACEOF
8766 rm -f conftest.$ac_objext conftest$ac_exeext
8767 if { (eval echo "$as_me:8767: \"$ac_link\"") >&5
8768   (eval $ac_link) 2>&5
8769   ac_status=$?
8770   echo "$as_me:8770: \$? = $ac_status" >&5
8771   (exit $ac_status); } &&
8772          { ac_try='test -s conftest$ac_exeext'
8773   { (eval echo "$as_me:8773: \"$ac_try\"") >&5
8774   (eval $ac_try) 2>&5
8775   ac_status=$?
8776   echo "$as_me:8776: \$? = $ac_status" >&5
8777   (exit $ac_status); }; }; then
8778   eval "$as_ac_var=yes"
8779 else
8780   echo "$as_me: failed program was:" >&5
8781 cat conftest.$ac_ext >&5
8782 eval "$as_ac_var=no"
8783 fi
8784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8785 fi
8786 echo "$as_me:8786: result: `eval echo '${'$as_ac_var'}'`" >&5
8787 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8788 if test `eval echo '${'$as_ac_var'}'` = yes; then
8789   cat >>confdefs.h <<EOF
8790 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8791 EOF
8792
8793 fi
8794 done
8795
8796         if test "x$ac_cv_func_putwc" != xyes ; then
8797
8798 echo "$as_me:8798: checking for multibyte character support" >&5
8799 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8800 if test "${cf_cv_utf8_lib+set}" = set; then
8801   echo $ECHO_N "(cached) $ECHO_C" >&6
8802 else
8803
8804         cf_save_LIBS="$LIBS"
8805         cat >conftest.$ac_ext <<_ACEOF
8806 #line 8806 "configure"
8807 #include "confdefs.h"
8808
8809 #include <stdlib.h>
8810 int
8811 main ()
8812 {
8813 putwc(0,0);
8814   ;
8815   return 0;
8816 }
8817 _ACEOF
8818 rm -f conftest.$ac_objext conftest$ac_exeext
8819 if { (eval echo "$as_me:8819: \"$ac_link\"") >&5
8820   (eval $ac_link) 2>&5
8821   ac_status=$?
8822   echo "$as_me:8822: \$? = $ac_status" >&5
8823   (exit $ac_status); } &&
8824          { ac_try='test -s conftest$ac_exeext'
8825   { (eval echo "$as_me:8825: \"$ac_try\"") >&5
8826   (eval $ac_try) 2>&5
8827   ac_status=$?
8828   echo "$as_me:8828: \$? = $ac_status" >&5
8829   (exit $ac_status); }; }; then
8830   cf_cv_utf8_lib=yes
8831 else
8832   echo "$as_me: failed program was:" >&5
8833 cat conftest.$ac_ext >&5
8834
8835 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8836 # will be set on completion of the AC_TRY_LINK below.
8837 cf_cv_header_path_utf8=
8838 cf_cv_library_path_utf8=
8839
8840 echo "${as_me:-configure}:8840: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8841
8842 cf_save_LIBS="$LIBS"
8843
8844 cat >conftest.$ac_ext <<_ACEOF
8845 #line 8845 "configure"
8846 #include "confdefs.h"
8847
8848 #include <libutf8.h>
8849 int
8850 main ()
8851 {
8852 putwc(0,0);
8853   ;
8854   return 0;
8855 }
8856 _ACEOF
8857 rm -f conftest.$ac_objext conftest$ac_exeext
8858 if { (eval echo "$as_me:8858: \"$ac_link\"") >&5
8859   (eval $ac_link) 2>&5
8860   ac_status=$?
8861   echo "$as_me:8861: \$? = $ac_status" >&5
8862   (exit $ac_status); } &&
8863          { ac_try='test -s conftest$ac_exeext'
8864   { (eval echo "$as_me:8864: \"$ac_try\"") >&5
8865   (eval $ac_try) 2>&5
8866   ac_status=$?
8867   echo "$as_me:8867: \$? = $ac_status" >&5
8868   (exit $ac_status); }; }; then
8869
8870         cf_cv_find_linkage_utf8=yes
8871         cf_cv_header_path_utf8=/usr/include
8872         cf_cv_library_path_utf8=/usr/lib
8873
8874 else
8875   echo "$as_me: failed program was:" >&5
8876 cat conftest.$ac_ext >&5
8877
8878 LIBS="-lutf8  $cf_save_LIBS"
8879
8880 cat >conftest.$ac_ext <<_ACEOF
8881 #line 8881 "configure"
8882 #include "confdefs.h"
8883
8884 #include <libutf8.h>
8885 int
8886 main ()
8887 {
8888 putwc(0,0);
8889   ;
8890   return 0;
8891 }
8892 _ACEOF
8893 rm -f conftest.$ac_objext conftest$ac_exeext
8894 if { (eval echo "$as_me:8894: \"$ac_link\"") >&5
8895   (eval $ac_link) 2>&5
8896   ac_status=$?
8897   echo "$as_me:8897: \$? = $ac_status" >&5
8898   (exit $ac_status); } &&
8899          { ac_try='test -s conftest$ac_exeext'
8900   { (eval echo "$as_me:8900: \"$ac_try\"") >&5
8901   (eval $ac_try) 2>&5
8902   ac_status=$?
8903   echo "$as_me:8903: \$? = $ac_status" >&5
8904   (exit $ac_status); }; }; then
8905
8906         cf_cv_find_linkage_utf8=yes
8907         cf_cv_header_path_utf8=/usr/include
8908         cf_cv_library_path_utf8=/usr/lib
8909         cf_cv_library_file_utf8="-lutf8"
8910
8911 else
8912   echo "$as_me: failed program was:" >&5
8913 cat conftest.$ac_ext >&5
8914
8915         cf_cv_find_linkage_utf8=no
8916         LIBS="$cf_save_LIBS"
8917
8918     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8919
8920 echo "${as_me:-configure}:8920: testing find linkage for utf8 library ..." 1>&5
8921
8922 echo "${as_me:-configure}:8922: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8923
8924     cf_save_CPPFLAGS="$CPPFLAGS"
8925     cf_test_CPPFLAGS="$CPPFLAGS"
8926
8927 cf_search=
8928
8929 # collect the current set of include-directories from compiler flags
8930 cf_header_path_list=""
8931 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8932         for cf_header_path in $CPPFLAGS $CFLAGS
8933         do
8934                 case $cf_header_path in #(vi
8935                 -I*)
8936                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8937
8938 test "$cf_header_path" != "NONE" && \
8939 test -d "$cf_header_path" && \
8940  {
8941         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8942         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8943         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8944         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8945         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8946         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8947 }
8948
8949                         cf_header_path_list="$cf_header_path_list $cf_search"
8950                         ;;
8951                 esac
8952         done
8953 fi
8954
8955 # add the variations for the package we are looking for
8956
8957 cf_search=
8958
8959 test "/usr" != "$prefix" && \
8960 test -d "/usr" && \
8961 (test $prefix = NONE || test "/usr" != "$prefix") && {
8962         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8963         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8964         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8965         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8966         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8967         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8968 }
8969
8970 test "$prefix" != "NONE" && \
8971 test -d "$prefix" && \
8972  {
8973         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8974         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8975         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8976         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8977         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8978         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8979 }
8980
8981 test "/usr/local" != "$prefix" && \
8982 test -d "/usr/local" && \
8983 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8984         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8985         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8986         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8987         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8988         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8989         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8990 }
8991
8992 test "/opt" != "$prefix" && \
8993 test -d "/opt" && \
8994 (test $prefix = NONE || test "/opt" != "$prefix") && {
8995         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8996         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8997         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8998         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8999         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9000         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9001 }
9002
9003 test "$HOME" != "$prefix" && \
9004 test -d "$HOME" && \
9005 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9006         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9007         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9008         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9009         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9010         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9011         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9012 }
9013
9014 test "$includedir" != NONE && \
9015 test "$includedir" != "/usr/include" && \
9016 test -d "$includedir" && {
9017         test -d $includedir &&    cf_search="$cf_search $includedir"
9018         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9019 }
9020
9021 test "$oldincludedir" != NONE && \
9022 test "$oldincludedir" != "/usr/include" && \
9023 test -d "$oldincludedir" && {
9024         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9025         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9026 }
9027
9028 cf_search="$cf_search $cf_header_path_list"
9029
9030     for cf_cv_header_path_utf8 in $cf_search
9031     do
9032       if test -d $cf_cv_header_path_utf8 ; then
9033         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9034
9035 echo "${as_me:-configure}:9035: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9036
9037         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9038         cat >conftest.$ac_ext <<_ACEOF
9039 #line 9039 "configure"
9040 #include "confdefs.h"
9041
9042 #include <libutf8.h>
9043 int
9044 main ()
9045 {
9046 putwc(0,0);
9047   ;
9048   return 0;
9049 }
9050 _ACEOF
9051 rm -f conftest.$ac_objext
9052 if { (eval echo "$as_me:9052: \"$ac_compile\"") >&5
9053   (eval $ac_compile) 2>&5
9054   ac_status=$?
9055   echo "$as_me:9055: \$? = $ac_status" >&5
9056   (exit $ac_status); } &&
9057          { ac_try='test -s conftest.$ac_objext'
9058   { (eval echo "$as_me:9058: \"$ac_try\"") >&5
9059   (eval $ac_try) 2>&5
9060   ac_status=$?
9061   echo "$as_me:9061: \$? = $ac_status" >&5
9062   (exit $ac_status); }; }; then
9063
9064             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9065
9066 echo "${as_me:-configure}:9066: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9067
9068             cf_cv_find_linkage_utf8=maybe
9069             cf_test_CPPFLAGS="$CPPFLAGS"
9070             break
9071 else
9072   echo "$as_me: failed program was:" >&5
9073 cat conftest.$ac_ext >&5
9074
9075             CPPFLAGS="$cf_save_CPPFLAGS"
9076
9077 fi
9078 rm -f conftest.$ac_objext conftest.$ac_ext
9079       fi
9080     done
9081
9082     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9083
9084 echo "${as_me:-configure}:9084: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9085
9086       cf_save_LIBS="$LIBS"
9087       cf_save_LDFLAGS="$LDFLAGS"
9088
9089       if test "$cf_cv_find_linkage_utf8" != yes ; then
9090
9091 cf_search=
9092 cf_library_path_list=""
9093 if test -n "${LDFLAGS}${LIBS}" ; then
9094         for cf_library_path in $LDFLAGS $LIBS
9095         do
9096                 case $cf_library_path in #(vi
9097                 -L*)
9098                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9099
9100 test "$cf_library_path" != "NONE" && \
9101 test -d "$cf_library_path" && \
9102  {
9103         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9104         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9105         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9106         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9107         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9108         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9109 }
9110
9111                         cf_library_path_list="$cf_library_path_list $cf_search"
9112                         ;;
9113                 esac
9114         done
9115 fi
9116
9117 cf_search=
9118
9119 test "/usr" != "$prefix" && \
9120 test -d "/usr" && \
9121 (test $prefix = NONE || test "/usr" != "$prefix") && {
9122         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9123         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9124         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9125         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9126         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9127         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9128 }
9129
9130 test "$prefix" != "NONE" && \
9131 test -d "$prefix" && \
9132  {
9133         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9134         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9135         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9136         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9137         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9138         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9139 }
9140
9141 test "/usr/local" != "$prefix" && \
9142 test -d "/usr/local" && \
9143 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9144         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9145         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9146         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9147         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9148         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9149         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9150 }
9151
9152 test "/opt" != "$prefix" && \
9153 test -d "/opt" && \
9154 (test $prefix = NONE || test "/opt" != "$prefix") && {
9155         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9156         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9157         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9158         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9159         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9160         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9161 }
9162
9163 test "$HOME" != "$prefix" && \
9164 test -d "$HOME" && \
9165 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9166         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9167         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9168         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9169         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9170         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9171         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9172 }
9173
9174 cf_search="$cf_library_path_list $cf_search"
9175
9176         for cf_cv_library_path_utf8 in $cf_search
9177         do
9178           if test -d $cf_cv_library_path_utf8 ; then
9179             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9180
9181 echo "${as_me:-configure}:9181: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9182
9183             CPPFLAGS="$cf_test_CPPFLAGS"
9184             LIBS="-lutf8  $cf_save_LIBS"
9185             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9186             cat >conftest.$ac_ext <<_ACEOF
9187 #line 9187 "configure"
9188 #include "confdefs.h"
9189
9190 #include <libutf8.h>
9191 int
9192 main ()
9193 {
9194 putwc(0,0);
9195   ;
9196   return 0;
9197 }
9198 _ACEOF
9199 rm -f conftest.$ac_objext conftest$ac_exeext
9200 if { (eval echo "$as_me:9200: \"$ac_link\"") >&5
9201   (eval $ac_link) 2>&5
9202   ac_status=$?
9203   echo "$as_me:9203: \$? = $ac_status" >&5
9204   (exit $ac_status); } &&
9205          { ac_try='test -s conftest$ac_exeext'
9206   { (eval echo "$as_me:9206: \"$ac_try\"") >&5
9207   (eval $ac_try) 2>&5
9208   ac_status=$?
9209   echo "$as_me:9209: \$? = $ac_status" >&5
9210   (exit $ac_status); }; }; then
9211
9212                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9213
9214 echo "${as_me:-configure}:9214: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9215
9216                 cf_cv_find_linkage_utf8=yes
9217                 cf_cv_library_file_utf8="-lutf8"
9218                 break
9219 else
9220   echo "$as_me: failed program was:" >&5
9221 cat conftest.$ac_ext >&5
9222
9223                 CPPFLAGS="$cf_save_CPPFLAGS"
9224                 LIBS="$cf_save_LIBS"
9225                 LDFLAGS="$cf_save_LDFLAGS"
9226
9227 fi
9228 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9229           fi
9230         done
9231         CPPFLAGS="$cf_save_CPPFLAGS"
9232         LDFLAGS="$cf_save_LDFLAGS"
9233       fi
9234
9235     else
9236       cf_cv_find_linkage_utf8=no
9237     fi
9238
9239 fi
9240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9241
9242 fi
9243 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9244
9245 LIBS="$cf_save_LIBS"
9246
9247 if test "$cf_cv_find_linkage_utf8" = yes ; then
9248 cf_cv_utf8_lib=add-on
9249 else
9250 cf_cv_utf8_lib=no
9251 fi
9252
9253 fi
9254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9255 fi
9256 echo "$as_me:9256: result: $cf_cv_utf8_lib" >&5
9257 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9258
9259 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9260 # ncurses/ncursesw:
9261 if test "$cf_cv_utf8_lib" = "add-on" ; then
9262
9263 cat >>confdefs.h <<\EOF
9264 #define HAVE_LIBUTF8_H 1
9265 EOF
9266
9267 if test -n "$cf_cv_header_path_utf8" ; then
9268   for cf_add_incdir in $cf_cv_header_path_utf8
9269   do
9270         while test $cf_add_incdir != /usr/include
9271         do
9272           if test -d $cf_add_incdir
9273           then
9274                 cf_have_incdir=no
9275                 if test -n "$CFLAGS$CPPFLAGS" ; then
9276                   # a loop is needed to ensure we can add subdirs of existing dirs
9277                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9278                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9279                           cf_have_incdir=yes; break
9280                         fi
9281                   done
9282                 fi
9283
9284                 if test "$cf_have_incdir" = no ; then
9285                   if test "$cf_add_incdir" = /usr/local/include ; then
9286                         if test "$GCC" = yes
9287                         then
9288                           cf_save_CPPFLAGS=$CPPFLAGS
9289                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9290                           cat >conftest.$ac_ext <<_ACEOF
9291 #line 9291 "configure"
9292 #include "confdefs.h"
9293 #include <stdio.h>
9294 int
9295 main ()
9296 {
9297 printf("Hello")
9298   ;
9299   return 0;
9300 }
9301 _ACEOF
9302 rm -f conftest.$ac_objext
9303 if { (eval echo "$as_me:9303: \"$ac_compile\"") >&5
9304   (eval $ac_compile) 2>&5
9305   ac_status=$?
9306   echo "$as_me:9306: \$? = $ac_status" >&5
9307   (exit $ac_status); } &&
9308          { ac_try='test -s conftest.$ac_objext'
9309   { (eval echo "$as_me:9309: \"$ac_try\"") >&5
9310   (eval $ac_try) 2>&5
9311   ac_status=$?
9312   echo "$as_me:9312: \$? = $ac_status" >&5
9313   (exit $ac_status); }; }; then
9314   :
9315 else
9316   echo "$as_me: failed program was:" >&5
9317 cat conftest.$ac_ext >&5
9318 cf_have_incdir=yes
9319 fi
9320 rm -f conftest.$ac_objext conftest.$ac_ext
9321                           CPPFLAGS=$cf_save_CPPFLAGS
9322                         fi
9323                   fi
9324                 fi
9325
9326                 if test "$cf_have_incdir" = no ; then
9327                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9328
9329 echo "${as_me:-configure}:9329: testing adding $cf_add_incdir to include-path ..." 1>&5
9330
9331                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9332
9333                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9334                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9335                   cf_add_incdir="$cf_top_incdir"
9336                 else
9337                   break
9338                 fi
9339           fi
9340         done
9341   done
9342 fi
9343
9344 if test -n "$cf_cv_library_path_utf8" ; then
9345   for cf_add_libdir in $cf_cv_library_path_utf8
9346   do
9347     if test $cf_add_libdir = /usr/lib ; then
9348       :
9349     elif test -d $cf_add_libdir
9350     then
9351       cf_have_libdir=no
9352       if test -n "$LDFLAGS$LIBS" ; then
9353         # a loop is needed to ensure we can add subdirs of existing dirs
9354         for cf_test_libdir in $LDFLAGS $LIBS ; do
9355           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9356             cf_have_libdir=yes; break
9357           fi
9358         done
9359       fi
9360       if test "$cf_have_libdir" = no ; then
9361         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9362
9363 echo "${as_me:-configure}:9363: testing adding $cf_add_libdir to library-path ..." 1>&5
9364
9365         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9366       fi
9367     fi
9368   done
9369 fi
9370
9371         LIBS="$cf_cv_library_file_utf8 $LIBS"
9372 fi
9373
9374                 if test "$cf_cv_utf8_lib" != no ; then
9375                         NCURSES_LIBUTF8=1
9376                 fi
9377         fi
9378
9379 # This is needed on Tru64 5.0 to declare mbstate_t
9380 echo "$as_me:9380: checking if we must include wchar.h to declare mbstate_t" >&5
9381 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9382 if test "${cf_cv_mbstate_t+set}" = set; then
9383   echo $ECHO_N "(cached) $ECHO_C" >&6
9384 else
9385
9386 cat >conftest.$ac_ext <<_ACEOF
9387 #line 9387 "configure"
9388 #include "confdefs.h"
9389
9390 #include <stdlib.h>
9391 #include <stdarg.h>
9392 #include <stdio.h>
9393 #ifdef HAVE_LIBUTF8_H
9394 #include <libutf8.h>
9395 #endif
9396 int
9397 main ()
9398 {
9399 mbstate_t state
9400   ;
9401   return 0;
9402 }
9403 _ACEOF
9404 rm -f conftest.$ac_objext
9405 if { (eval echo "$as_me:9405: \"$ac_compile\"") >&5
9406   (eval $ac_compile) 2>&5
9407   ac_status=$?
9408   echo "$as_me:9408: \$? = $ac_status" >&5
9409   (exit $ac_status); } &&
9410          { ac_try='test -s conftest.$ac_objext'
9411   { (eval echo "$as_me:9411: \"$ac_try\"") >&5
9412   (eval $ac_try) 2>&5
9413   ac_status=$?
9414   echo "$as_me:9414: \$? = $ac_status" >&5
9415   (exit $ac_status); }; }; then
9416   cf_cv_mbstate_t=no
9417 else
9418   echo "$as_me: failed program was:" >&5
9419 cat conftest.$ac_ext >&5
9420 cat >conftest.$ac_ext <<_ACEOF
9421 #line 9421 "configure"
9422 #include "confdefs.h"
9423
9424 #include <stdlib.h>
9425 #include <stdarg.h>
9426 #include <stdio.h>
9427 #include <wchar.h>
9428 #ifdef HAVE_LIBUTF8_H
9429 #include <libutf8.h>
9430 #endif
9431 int
9432 main ()
9433 {
9434 mbstate_t value
9435   ;
9436   return 0;
9437 }
9438 _ACEOF
9439 rm -f conftest.$ac_objext
9440 if { (eval echo "$as_me:9440: \"$ac_compile\"") >&5
9441   (eval $ac_compile) 2>&5
9442   ac_status=$?
9443   echo "$as_me:9443: \$? = $ac_status" >&5
9444   (exit $ac_status); } &&
9445          { ac_try='test -s conftest.$ac_objext'
9446   { (eval echo "$as_me:9446: \"$ac_try\"") >&5
9447   (eval $ac_try) 2>&5
9448   ac_status=$?
9449   echo "$as_me:9449: \$? = $ac_status" >&5
9450   (exit $ac_status); }; }; then
9451   cf_cv_mbstate_t=yes
9452 else
9453   echo "$as_me: failed program was:" >&5
9454 cat conftest.$ac_ext >&5
9455 cf_cv_mbstate_t=unknown
9456 fi
9457 rm -f conftest.$ac_objext conftest.$ac_ext
9458 fi
9459 rm -f conftest.$ac_objext conftest.$ac_ext
9460 fi
9461 echo "$as_me:9461: result: $cf_cv_mbstate_t" >&5
9462 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9463
9464 if test "$cf_cv_mbstate_t" = yes ; then
9465
9466 cat >>confdefs.h <<\EOF
9467 #define NEED_WCHAR_H 1
9468 EOF
9469
9470         NEED_WCHAR_H=1
9471 fi
9472
9473 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9474 if test "$cf_cv_mbstate_t" = unknown ; then
9475         NCURSES_MBSTATE_T=1
9476 fi
9477
9478 # This is needed on Tru64 5.0 to declare wchar_t
9479 echo "$as_me:9479: checking if we must include wchar.h to declare wchar_t" >&5
9480 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9481 if test "${cf_cv_wchar_t+set}" = set; then
9482   echo $ECHO_N "(cached) $ECHO_C" >&6
9483 else
9484
9485 cat >conftest.$ac_ext <<_ACEOF
9486 #line 9486 "configure"
9487 #include "confdefs.h"
9488
9489 #include <stdlib.h>
9490 #include <stdarg.h>
9491 #include <stdio.h>
9492 #ifdef HAVE_LIBUTF8_H
9493 #include <libutf8.h>
9494 #endif
9495 int
9496 main ()
9497 {
9498 wchar_t state
9499   ;
9500   return 0;
9501 }
9502 _ACEOF
9503 rm -f conftest.$ac_objext
9504 if { (eval echo "$as_me:9504: \"$ac_compile\"") >&5
9505   (eval $ac_compile) 2>&5
9506   ac_status=$?
9507   echo "$as_me:9507: \$? = $ac_status" >&5
9508   (exit $ac_status); } &&
9509          { ac_try='test -s conftest.$ac_objext'
9510   { (eval echo "$as_me:9510: \"$ac_try\"") >&5
9511   (eval $ac_try) 2>&5
9512   ac_status=$?
9513   echo "$as_me:9513: \$? = $ac_status" >&5
9514   (exit $ac_status); }; }; then
9515   cf_cv_wchar_t=no
9516 else
9517   echo "$as_me: failed program was:" >&5
9518 cat conftest.$ac_ext >&5
9519 cat >conftest.$ac_ext <<_ACEOF
9520 #line 9520 "configure"
9521 #include "confdefs.h"
9522
9523 #include <stdlib.h>
9524 #include <stdarg.h>
9525 #include <stdio.h>
9526 #include <wchar.h>
9527 #ifdef HAVE_LIBUTF8_H
9528 #include <libutf8.h>
9529 #endif
9530 int
9531 main ()
9532 {
9533 wchar_t value
9534   ;
9535   return 0;
9536 }
9537 _ACEOF
9538 rm -f conftest.$ac_objext
9539 if { (eval echo "$as_me:9539: \"$ac_compile\"") >&5
9540   (eval $ac_compile) 2>&5
9541   ac_status=$?
9542   echo "$as_me:9542: \$? = $ac_status" >&5
9543   (exit $ac_status); } &&
9544          { ac_try='test -s conftest.$ac_objext'
9545   { (eval echo "$as_me:9545: \"$ac_try\"") >&5
9546   (eval $ac_try) 2>&5
9547   ac_status=$?
9548   echo "$as_me:9548: \$? = $ac_status" >&5
9549   (exit $ac_status); }; }; then
9550   cf_cv_wchar_t=yes
9551 else
9552   echo "$as_me: failed program was:" >&5
9553 cat conftest.$ac_ext >&5
9554 cf_cv_wchar_t=unknown
9555 fi
9556 rm -f conftest.$ac_objext conftest.$ac_ext
9557 fi
9558 rm -f conftest.$ac_objext conftest.$ac_ext
9559 fi
9560 echo "$as_me:9560: result: $cf_cv_wchar_t" >&5
9561 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9562
9563 if test "$cf_cv_wchar_t" = yes ; then
9564
9565 cat >>confdefs.h <<\EOF
9566 #define NEED_WCHAR_H 1
9567 EOF
9568
9569         NEED_WCHAR_H=1
9570 fi
9571
9572 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9573 if test "$cf_cv_wchar_t" = unknown ; then
9574         NCURSES_WCHAR_T=1
9575 fi
9576
9577 # if we find wchar_t in either place, use substitution to provide a fallback.
9578 if test "$cf_cv_wchar_t" != unknown ; then
9579         NCURSES_OK_WCHAR_T=1
9580 fi
9581
9582 # This is needed on Tru64 5.0 to declare wint_t
9583 echo "$as_me:9583: checking if we must include wchar.h to declare wint_t" >&5
9584 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9585 if test "${cf_cv_wint_t+set}" = set; then
9586   echo $ECHO_N "(cached) $ECHO_C" >&6
9587 else
9588
9589 cat >conftest.$ac_ext <<_ACEOF
9590 #line 9590 "configure"
9591 #include "confdefs.h"
9592
9593 #include <stdlib.h>
9594 #include <stdarg.h>
9595 #include <stdio.h>
9596 #ifdef HAVE_LIBUTF8_H
9597 #include <libutf8.h>
9598 #endif
9599 int
9600 main ()
9601 {
9602 wint_t state
9603   ;
9604   return 0;
9605 }
9606 _ACEOF
9607 rm -f conftest.$ac_objext
9608 if { (eval echo "$as_me:9608: \"$ac_compile\"") >&5
9609   (eval $ac_compile) 2>&5
9610   ac_status=$?
9611   echo "$as_me:9611: \$? = $ac_status" >&5
9612   (exit $ac_status); } &&
9613          { ac_try='test -s conftest.$ac_objext'
9614   { (eval echo "$as_me:9614: \"$ac_try\"") >&5
9615   (eval $ac_try) 2>&5
9616   ac_status=$?
9617   echo "$as_me:9617: \$? = $ac_status" >&5
9618   (exit $ac_status); }; }; then
9619   cf_cv_wint_t=no
9620 else
9621   echo "$as_me: failed program was:" >&5
9622 cat conftest.$ac_ext >&5
9623 cat >conftest.$ac_ext <<_ACEOF
9624 #line 9624 "configure"
9625 #include "confdefs.h"
9626
9627 #include <stdlib.h>
9628 #include <stdarg.h>
9629 #include <stdio.h>
9630 #include <wchar.h>
9631 #ifdef HAVE_LIBUTF8_H
9632 #include <libutf8.h>
9633 #endif
9634 int
9635 main ()
9636 {
9637 wint_t value
9638   ;
9639   return 0;
9640 }
9641 _ACEOF
9642 rm -f conftest.$ac_objext
9643 if { (eval echo "$as_me:9643: \"$ac_compile\"") >&5
9644   (eval $ac_compile) 2>&5
9645   ac_status=$?
9646   echo "$as_me:9646: \$? = $ac_status" >&5
9647   (exit $ac_status); } &&
9648          { ac_try='test -s conftest.$ac_objext'
9649   { (eval echo "$as_me:9649: \"$ac_try\"") >&5
9650   (eval $ac_try) 2>&5
9651   ac_status=$?
9652   echo "$as_me:9652: \$? = $ac_status" >&5
9653   (exit $ac_status); }; }; then
9654   cf_cv_wint_t=yes
9655 else
9656   echo "$as_me: failed program was:" >&5
9657 cat conftest.$ac_ext >&5
9658 cf_cv_wint_t=unknown
9659 fi
9660 rm -f conftest.$ac_objext conftest.$ac_ext
9661 fi
9662 rm -f conftest.$ac_objext conftest.$ac_ext
9663 fi
9664 echo "$as_me:9664: result: $cf_cv_wint_t" >&5
9665 echo "${ECHO_T}$cf_cv_wint_t" >&6
9666
9667 if test "$cf_cv_wint_t" = yes ; then
9668
9669 cat >>confdefs.h <<\EOF
9670 #define NEED_WCHAR_H 1
9671 EOF
9672
9673         NEED_WCHAR_H=1
9674 fi
9675
9676 # if we do not find wint_t in either place, use substitution to provide a fallback.
9677 if test "$cf_cv_wint_t" = unknown ; then
9678         NCURSES_WINT_T=1
9679 fi
9680
9681 # if we find wint_t in either place, use substitution to provide a fallback.
9682 if test "$cf_cv_wint_t" != unknown ; then
9683         NCURSES_OK_WINT_T=1
9684 fi
9685
9686         if test "$NCURSES_MBSTATE_T" != 0; then
9687
9688 cat >>confdefs.h <<\EOF
9689 #define NEED_MBSTATE_T_DEF 1
9690 EOF
9691
9692         fi
9693 fi
9694
9695 ###   use option --disable-lp64 to allow long chtype
9696 case $cf_cv_abi_version in
9697 [345]*)
9698         default_with_lp64=no
9699         ;;
9700 *)
9701         default_with_lp64=yes
9702         ;;
9703 esac
9704
9705 echo "$as_me:9705: checking whether to enable _LP64 definition in curses.h" >&5
9706 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9707
9708 # Check whether --enable-lp64 or --disable-lp64 was given.
9709 if test "${enable_lp64+set}" = set; then
9710   enableval="$enable_lp64"
9711   with_lp64=$enableval
9712 else
9713   with_lp64=$default_with_lp64
9714 fi;
9715 echo "$as_me:9715: result: $with_lp64" >&5
9716 echo "${ECHO_T}$with_lp64" >&6
9717
9718 if test "x$with_lp64" = xyes ; then
9719         cf_cv_enable_lp64=1
9720 else
9721         cf_cv_enable_lp64=0
9722 fi
9723
9724 # Check whether --enable-largefile or --disable-largefile was given.
9725 if test "${enable_largefile+set}" = set; then
9726   enableval="$enable_largefile"
9727
9728 fi;
9729 if test "$enable_largefile" != no; then
9730
9731   echo "$as_me:9731: checking for special C compiler options needed for large files" >&5
9732 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9733 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9734   echo $ECHO_N "(cached) $ECHO_C" >&6
9735 else
9736   ac_cv_sys_largefile_CC=no
9737      if test "$GCC" != yes; then
9738        ac_save_CC=$CC
9739        while :; do
9740          # IRIX 6.2 and later do not support large files by default,
9741          # so use the C compiler's -n32 option if that helps.
9742          cat >conftest.$ac_ext <<_ACEOF
9743 #line 9743 "configure"
9744 #include "confdefs.h"
9745 #include <sys/types.h>
9746  /* Check that off_t can represent 2**63 - 1 correctly.
9747     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9748     since some C++ compilers masquerading as C compilers
9749     incorrectly reject 9223372036854775807.  */
9750 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9751   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9752                        && LARGE_OFF_T % 2147483647 == 1)
9753                       ? 1 : -1];
9754 int
9755 main ()
9756 {
9757
9758   ;
9759   return 0;
9760 }
9761 _ACEOF
9762          rm -f conftest.$ac_objext
9763 if { (eval echo "$as_me:9763: \"$ac_compile\"") >&5
9764   (eval $ac_compile) 2>&5
9765   ac_status=$?
9766   echo "$as_me:9766: \$? = $ac_status" >&5
9767   (exit $ac_status); } &&
9768          { ac_try='test -s conftest.$ac_objext'
9769   { (eval echo "$as_me:9769: \"$ac_try\"") >&5
9770   (eval $ac_try) 2>&5
9771   ac_status=$?
9772   echo "$as_me:9772: \$? = $ac_status" >&5
9773   (exit $ac_status); }; }; then
9774   break
9775 else
9776   echo "$as_me: failed program was:" >&5
9777 cat conftest.$ac_ext >&5
9778 fi
9779 rm -f conftest.$ac_objext
9780          CC="$CC -n32"
9781          rm -f conftest.$ac_objext
9782 if { (eval echo "$as_me:9782: \"$ac_compile\"") >&5
9783   (eval $ac_compile) 2>&5
9784   ac_status=$?
9785   echo "$as_me:9785: \$? = $ac_status" >&5
9786   (exit $ac_status); } &&
9787          { ac_try='test -s conftest.$ac_objext'
9788   { (eval echo "$as_me:9788: \"$ac_try\"") >&5
9789   (eval $ac_try) 2>&5
9790   ac_status=$?
9791   echo "$as_me:9791: \$? = $ac_status" >&5
9792   (exit $ac_status); }; }; then
9793   ac_cv_sys_largefile_CC=' -n32'; break
9794 else
9795   echo "$as_me: failed program was:" >&5
9796 cat conftest.$ac_ext >&5
9797 fi
9798 rm -f conftest.$ac_objext
9799          break
9800        done
9801        CC=$ac_save_CC
9802        rm -f conftest.$ac_ext
9803     fi
9804 fi
9805 echo "$as_me:9805: result: $ac_cv_sys_largefile_CC" >&5
9806 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9807   if test "$ac_cv_sys_largefile_CC" != no; then
9808     CC=$CC$ac_cv_sys_largefile_CC
9809   fi
9810
9811   echo "$as_me:9811: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9812 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9813 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9814   echo $ECHO_N "(cached) $ECHO_C" >&6
9815 else
9816   while :; do
9817   ac_cv_sys_file_offset_bits=no
9818   cat >conftest.$ac_ext <<_ACEOF
9819 #line 9819 "configure"
9820 #include "confdefs.h"
9821 #include <sys/types.h>
9822  /* Check that off_t can represent 2**63 - 1 correctly.
9823     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9824     since some C++ compilers masquerading as C compilers
9825     incorrectly reject 9223372036854775807.  */
9826 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9827   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9828                        && LARGE_OFF_T % 2147483647 == 1)
9829                       ? 1 : -1];
9830 int
9831 main ()
9832 {
9833
9834   ;
9835   return 0;
9836 }
9837 _ACEOF
9838 rm -f conftest.$ac_objext
9839 if { (eval echo "$as_me:9839: \"$ac_compile\"") >&5
9840   (eval $ac_compile) 2>&5
9841   ac_status=$?
9842   echo "$as_me:9842: \$? = $ac_status" >&5
9843   (exit $ac_status); } &&
9844          { ac_try='test -s conftest.$ac_objext'
9845   { (eval echo "$as_me:9845: \"$ac_try\"") >&5
9846   (eval $ac_try) 2>&5
9847   ac_status=$?
9848   echo "$as_me:9848: \$? = $ac_status" >&5
9849   (exit $ac_status); }; }; then
9850   break
9851 else
9852   echo "$as_me: failed program was:" >&5
9853 cat conftest.$ac_ext >&5
9854 fi
9855 rm -f conftest.$ac_objext conftest.$ac_ext
9856   cat >conftest.$ac_ext <<_ACEOF
9857 #line 9857 "configure"
9858 #include "confdefs.h"
9859 #define _FILE_OFFSET_BITS 64
9860 #include <sys/types.h>
9861  /* Check that off_t can represent 2**63 - 1 correctly.
9862     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9863     since some C++ compilers masquerading as C compilers
9864     incorrectly reject 9223372036854775807.  */
9865 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9866   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9867                        && LARGE_OFF_T % 2147483647 == 1)
9868                       ? 1 : -1];
9869 int
9870 main ()
9871 {
9872
9873   ;
9874   return 0;
9875 }
9876 _ACEOF
9877 rm -f conftest.$ac_objext
9878 if { (eval echo "$as_me:9878: \"$ac_compile\"") >&5
9879   (eval $ac_compile) 2>&5
9880   ac_status=$?
9881   echo "$as_me:9881: \$? = $ac_status" >&5
9882   (exit $ac_status); } &&
9883          { ac_try='test -s conftest.$ac_objext'
9884   { (eval echo "$as_me:9884: \"$ac_try\"") >&5
9885   (eval $ac_try) 2>&5
9886   ac_status=$?
9887   echo "$as_me:9887: \$? = $ac_status" >&5
9888   (exit $ac_status); }; }; then
9889   ac_cv_sys_file_offset_bits=64; break
9890 else
9891   echo "$as_me: failed program was:" >&5
9892 cat conftest.$ac_ext >&5
9893 fi
9894 rm -f conftest.$ac_objext conftest.$ac_ext
9895   break
9896 done
9897 fi
9898 echo "$as_me:9898: result: $ac_cv_sys_file_offset_bits" >&5
9899 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9900 if test "$ac_cv_sys_file_offset_bits" != no; then
9901
9902 cat >>confdefs.h <<EOF
9903 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9904 EOF
9905
9906 fi
9907 rm -rf conftest*
9908   echo "$as_me:9908: checking for _LARGE_FILES value needed for large files" >&5
9909 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9910 if test "${ac_cv_sys_large_files+set}" = set; then
9911   echo $ECHO_N "(cached) $ECHO_C" >&6
9912 else
9913   while :; do
9914   ac_cv_sys_large_files=no
9915   cat >conftest.$ac_ext <<_ACEOF
9916 #line 9916 "configure"
9917 #include "confdefs.h"
9918 #include <sys/types.h>
9919  /* Check that off_t can represent 2**63 - 1 correctly.
9920     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9921     since some C++ compilers masquerading as C compilers
9922     incorrectly reject 9223372036854775807.  */
9923 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9924   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9925                        && LARGE_OFF_T % 2147483647 == 1)
9926                       ? 1 : -1];
9927 int
9928 main ()
9929 {
9930
9931   ;
9932   return 0;
9933 }
9934 _ACEOF
9935 rm -f conftest.$ac_objext
9936 if { (eval echo "$as_me:9936: \"$ac_compile\"") >&5
9937   (eval $ac_compile) 2>&5
9938   ac_status=$?
9939   echo "$as_me:9939: \$? = $ac_status" >&5
9940   (exit $ac_status); } &&
9941          { ac_try='test -s conftest.$ac_objext'
9942   { (eval echo "$as_me:9942: \"$ac_try\"") >&5
9943   (eval $ac_try) 2>&5
9944   ac_status=$?
9945   echo "$as_me:9945: \$? = $ac_status" >&5
9946   (exit $ac_status); }; }; then
9947   break
9948 else
9949   echo "$as_me: failed program was:" >&5
9950 cat conftest.$ac_ext >&5
9951 fi
9952 rm -f conftest.$ac_objext conftest.$ac_ext
9953   cat >conftest.$ac_ext <<_ACEOF
9954 #line 9954 "configure"
9955 #include "confdefs.h"
9956 #define _LARGE_FILES 1
9957 #include <sys/types.h>
9958  /* Check that off_t can represent 2**63 - 1 correctly.
9959     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9960     since some C++ compilers masquerading as C compilers
9961     incorrectly reject 9223372036854775807.  */
9962 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9963   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9964                        && LARGE_OFF_T % 2147483647 == 1)
9965                       ? 1 : -1];
9966 int
9967 main ()
9968 {
9969
9970   ;
9971   return 0;
9972 }
9973 _ACEOF
9974 rm -f conftest.$ac_objext
9975 if { (eval echo "$as_me:9975: \"$ac_compile\"") >&5
9976   (eval $ac_compile) 2>&5
9977   ac_status=$?
9978   echo "$as_me:9978: \$? = $ac_status" >&5
9979   (exit $ac_status); } &&
9980          { ac_try='test -s conftest.$ac_objext'
9981   { (eval echo "$as_me:9981: \"$ac_try\"") >&5
9982   (eval $ac_try) 2>&5
9983   ac_status=$?
9984   echo "$as_me:9984: \$? = $ac_status" >&5
9985   (exit $ac_status); }; }; then
9986   ac_cv_sys_large_files=1; break
9987 else
9988   echo "$as_me: failed program was:" >&5
9989 cat conftest.$ac_ext >&5
9990 fi
9991 rm -f conftest.$ac_objext conftest.$ac_ext
9992   break
9993 done
9994 fi
9995 echo "$as_me:9995: result: $ac_cv_sys_large_files" >&5
9996 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9997 if test "$ac_cv_sys_large_files" != no; then
9998
9999 cat >>confdefs.h <<EOF
10000 #define _LARGE_FILES $ac_cv_sys_large_files
10001 EOF
10002
10003 fi
10004 rm -rf conftest*
10005 fi
10006
10007     if test "$enable_largefile" != no ; then
10008         echo "$as_me:10008: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10009 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10010 if test "${ac_cv_sys_largefile_source+set}" = set; then
10011   echo $ECHO_N "(cached) $ECHO_C" >&6
10012 else
10013   while :; do
10014   ac_cv_sys_largefile_source=no
10015   cat >conftest.$ac_ext <<_ACEOF
10016 #line 10016 "configure"
10017 #include "confdefs.h"
10018 #include <stdio.h>
10019 int
10020 main ()
10021 {
10022 return !fseeko;
10023   ;
10024   return 0;
10025 }
10026 _ACEOF
10027 rm -f conftest.$ac_objext
10028 if { (eval echo "$as_me:10028: \"$ac_compile\"") >&5
10029   (eval $ac_compile) 2>&5
10030   ac_status=$?
10031   echo "$as_me:10031: \$? = $ac_status" >&5
10032   (exit $ac_status); } &&
10033          { ac_try='test -s conftest.$ac_objext'
10034   { (eval echo "$as_me:10034: \"$ac_try\"") >&5
10035   (eval $ac_try) 2>&5
10036   ac_status=$?
10037   echo "$as_me:10037: \$? = $ac_status" >&5
10038   (exit $ac_status); }; }; then
10039   break
10040 else
10041   echo "$as_me: failed program was:" >&5
10042 cat conftest.$ac_ext >&5
10043 fi
10044 rm -f conftest.$ac_objext conftest.$ac_ext
10045   cat >conftest.$ac_ext <<_ACEOF
10046 #line 10046 "configure"
10047 #include "confdefs.h"
10048 #define _LARGEFILE_SOURCE 1
10049 #include <stdio.h>
10050 int
10051 main ()
10052 {
10053 return !fseeko;
10054   ;
10055   return 0;
10056 }
10057 _ACEOF
10058 rm -f conftest.$ac_objext
10059 if { (eval echo "$as_me:10059: \"$ac_compile\"") >&5
10060   (eval $ac_compile) 2>&5
10061   ac_status=$?
10062   echo "$as_me:10062: \$? = $ac_status" >&5
10063   (exit $ac_status); } &&
10064          { ac_try='test -s conftest.$ac_objext'
10065   { (eval echo "$as_me:10065: \"$ac_try\"") >&5
10066   (eval $ac_try) 2>&5
10067   ac_status=$?
10068   echo "$as_me:10068: \$? = $ac_status" >&5
10069   (exit $ac_status); }; }; then
10070   ac_cv_sys_largefile_source=1; break
10071 else
10072   echo "$as_me: failed program was:" >&5
10073 cat conftest.$ac_ext >&5
10074 fi
10075 rm -f conftest.$ac_objext conftest.$ac_ext
10076   break
10077 done
10078 fi
10079 echo "$as_me:10079: result: $ac_cv_sys_largefile_source" >&5
10080 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10081 if test "$ac_cv_sys_largefile_source" != no; then
10082
10083 cat >>confdefs.h <<EOF
10084 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10085 EOF
10086
10087 fi
10088 rm -rf conftest*
10089
10090 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10091 # in glibc 2.1.3, but that breaks too many other things.
10092 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10093 echo "$as_me:10093: checking for fseeko" >&5
10094 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10095 if test "${ac_cv_func_fseeko+set}" = set; then
10096   echo $ECHO_N "(cached) $ECHO_C" >&6
10097 else
10098   cat >conftest.$ac_ext <<_ACEOF
10099 #line 10099 "configure"
10100 #include "confdefs.h"
10101 #include <stdio.h>
10102 int
10103 main ()
10104 {
10105 return fseeko && fseeko (stdin, 0, 0);
10106   ;
10107   return 0;
10108 }
10109 _ACEOF
10110 rm -f conftest.$ac_objext conftest$ac_exeext
10111 if { (eval echo "$as_me:10111: \"$ac_link\"") >&5
10112   (eval $ac_link) 2>&5
10113   ac_status=$?
10114   echo "$as_me:10114: \$? = $ac_status" >&5
10115   (exit $ac_status); } &&
10116          { ac_try='test -s conftest$ac_exeext'
10117   { (eval echo "$as_me:10117: \"$ac_try\"") >&5
10118   (eval $ac_try) 2>&5
10119   ac_status=$?
10120   echo "$as_me:10120: \$? = $ac_status" >&5
10121   (exit $ac_status); }; }; then
10122   ac_cv_func_fseeko=yes
10123 else
10124   echo "$as_me: failed program was:" >&5
10125 cat conftest.$ac_ext >&5
10126 ac_cv_func_fseeko=no
10127 fi
10128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10129 fi
10130 echo "$as_me:10130: result: $ac_cv_func_fseeko" >&5
10131 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10132 if test $ac_cv_func_fseeko = yes; then
10133
10134 cat >>confdefs.h <<\EOF
10135 #define HAVE_FSEEKO 1
10136 EOF
10137
10138 fi
10139
10140         # Normally we would collect these definitions in the config.h,
10141         # but (like _XOPEN_SOURCE), some environments rely on having these
10142         # defined before any of the system headers are included.  Another
10143         # case comes up with C++, e.g., on AIX the compiler compiles the
10144         # header files by themselves before looking at the body files it is
10145         # told to compile.  For ncurses, those header files do not include
10146         # the config.h
10147         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10148         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10149         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10150
10151         echo "$as_me:10151: checking whether to use struct dirent64" >&5
10152 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10153 if test "${cf_cv_struct_dirent64+set}" = set; then
10154   echo $ECHO_N "(cached) $ECHO_C" >&6
10155 else
10156
10157                 cat >conftest.$ac_ext <<_ACEOF
10158 #line 10158 "configure"
10159 #include "confdefs.h"
10160
10161 #include <sys/types.h>
10162 #include <dirent.h>
10163
10164 int
10165 main ()
10166 {
10167
10168                 /* if transitional largefile support is setup, this is true */
10169                 extern struct dirent64 * readdir(DIR *);
10170                 struct dirent64 *x = readdir((DIR *)0);
10171                 struct dirent *y = readdir((DIR *)0);
10172                 int z = x - y;
10173
10174   ;
10175   return 0;
10176 }
10177 _ACEOF
10178 rm -f conftest.$ac_objext
10179 if { (eval echo "$as_me:10179: \"$ac_compile\"") >&5
10180   (eval $ac_compile) 2>&5
10181   ac_status=$?
10182   echo "$as_me:10182: \$? = $ac_status" >&5
10183   (exit $ac_status); } &&
10184          { ac_try='test -s conftest.$ac_objext'
10185   { (eval echo "$as_me:10185: \"$ac_try\"") >&5
10186   (eval $ac_try) 2>&5
10187   ac_status=$?
10188   echo "$as_me:10188: \$? = $ac_status" >&5
10189   (exit $ac_status); }; }; then
10190   cf_cv_struct_dirent64=yes
10191 else
10192   echo "$as_me: failed program was:" >&5
10193 cat conftest.$ac_ext >&5
10194 cf_cv_struct_dirent64=no
10195 fi
10196 rm -f conftest.$ac_objext conftest.$ac_ext
10197
10198 fi
10199 echo "$as_me:10199: result: $cf_cv_struct_dirent64" >&5
10200 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10201         test "$cf_cv_struct_dirent64" = yes &&
10202 cat >>confdefs.h <<\EOF
10203 #define HAVE_STRUCT_DIRENT64 1
10204 EOF
10205
10206     fi
10207
10208 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10209 echo "$as_me:10209: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10210 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10211
10212 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10213 if test "${enable_tparm_varargs+set}" = set; then
10214   enableval="$enable_tparm_varargs"
10215   with_tparm_varargs=$enableval
10216 else
10217   with_tparm_varargs=yes
10218 fi;
10219 echo "$as_me:10219: result: $with_tparm_varargs" >&5
10220 echo "${ECHO_T}$with_tparm_varargs" >&6
10221 NCURSES_TPARM_VARARGS=0
10222 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10223
10224 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10225 if test "$with_ticlib" != no ; then
10226 echo "$as_me:10226: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10227 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10228
10229 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10230 if test "${enable_tic_depends+set}" = set; then
10231   enableval="$enable_tic_depends"
10232   with_tic_depends=$enableval
10233 else
10234   with_tic_depends=yes
10235 fi;
10236 echo "$as_me:10236: result: $with_tic_depends" >&5
10237 echo "${ECHO_T}$with_tic_depends" >&6
10238 else
10239         with_tic_depends=no
10240 fi
10241
10242 ###   use option --with-bool to override bool's type
10243 echo "$as_me:10243: checking for type of bool" >&5
10244 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10245
10246 # Check whether --with-bool or --without-bool was given.
10247 if test "${with_bool+set}" = set; then
10248   withval="$with_bool"
10249   NCURSES_BOOL="$withval"
10250 else
10251   NCURSES_BOOL=auto
10252 fi;
10253 echo "$as_me:10253: result: $NCURSES_BOOL" >&5
10254 echo "${ECHO_T}$NCURSES_BOOL" >&6
10255
10256 echo "$as_me:10256: checking for alternate terminal capabilities file" >&5
10257 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10258
10259 # Check whether --with-caps or --without-caps was given.
10260 if test "${with_caps+set}" = set; then
10261   withval="$with_caps"
10262   TERMINFO_CAPS=Caps.$withval
10263 else
10264   TERMINFO_CAPS=Caps
10265 fi;
10266 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10267 echo "$as_me:10267: result: $TERMINFO_CAPS" >&5
10268 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10269
10270 ###   use option --with-chtype to override chtype's type
10271 echo "$as_me:10271: checking for type of chtype" >&5
10272 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10273
10274 # Check whether --with-chtype or --without-chtype was given.
10275 if test "${with_chtype+set}" = set; then
10276   withval="$with_chtype"
10277   NCURSES_CHTYPE="$withval"
10278 else
10279   NCURSES_CHTYPE=auto
10280 fi;
10281 echo "$as_me:10281: result: $NCURSES_CHTYPE" >&5
10282 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10283
10284 ###   use option --with-ospeed to override ospeed's type
10285 echo "$as_me:10285: checking for type of ospeed" >&5
10286 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10287
10288 # Check whether --with-ospeed or --without-ospeed was given.
10289 if test "${with_ospeed+set}" = set; then
10290   withval="$with_ospeed"
10291   NCURSES_OSPEED="$withval"
10292 else
10293   NCURSES_OSPEED=short
10294 fi;
10295 echo "$as_me:10295: result: $NCURSES_OSPEED" >&5
10296 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10297
10298 ###   use option --with-mmask-t to override mmask_t's type
10299 echo "$as_me:10299: checking for type of mmask_t" >&5
10300 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10301
10302 # Check whether --with-mmask-t or --without-mmask-t was given.
10303 if test "${with_mmask_t+set}" = set; then
10304   withval="$with_mmask_t"
10305   NCURSES_MMASK_T="$withval"
10306 else
10307   NCURSES_MMASK_T=auto
10308 fi;
10309 echo "$as_me:10309: result: $NCURSES_MMASK_T" >&5
10310 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10311
10312 ###   use option --with-ccharw-max to override CCHARW_MAX size
10313 echo "$as_me:10313: checking for size CCHARW_MAX" >&5
10314 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10315
10316 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10317 if test "${with_ccharw_max+set}" = set; then
10318   withval="$with_ccharw_max"
10319   NCURSES_CCHARW_MAX="$withval"
10320 else
10321   NCURSES_CCHARW_MAX=5
10322 fi;
10323 echo "$as_me:10323: result: $NCURSES_CCHARW_MAX" >&5
10324 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10325
10326 ###   use option --with-tparm-arg to override tparm's argument type
10327 echo "$as_me:10327: checking for type of tparm args" >&5
10328 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10329
10330 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10331 if test "${with_tparm_arg+set}" = set; then
10332   withval="$with_tparm_arg"
10333   NCURSES_TPARM_ARG="$withval"
10334 else
10335   NCURSES_TPARM_ARG=long
10336 fi;
10337 echo "$as_me:10337: result: $NCURSES_TPARM_ARG" >&5
10338 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10339
10340 ### Enable compiling-in rcs id's
10341 echo "$as_me:10341: checking if RCS identifiers should be compiled-in" >&5
10342 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10343
10344 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10345 if test "${with_rcs_ids+set}" = set; then
10346   withval="$with_rcs_ids"
10347   with_rcs_ids=$withval
10348 else
10349   with_rcs_ids=no
10350 fi;
10351 echo "$as_me:10351: result: $with_rcs_ids" >&5
10352 echo "${ECHO_T}$with_rcs_ids" >&6
10353 test "x$with_rcs_ids" = xyes &&
10354 cat >>confdefs.h <<\EOF
10355 #define USE_RCS_IDS 1
10356 EOF
10357
10358 ###############################################################################
10359
10360 echo "$as_me:10360: checking format of man-pages" >&5
10361 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10362
10363 # Check whether --with-manpage-format or --without-manpage-format was given.
10364 if test "${with_manpage_format+set}" = set; then
10365   withval="$with_manpage_format"
10366   MANPAGE_FORMAT=$withval
10367 else
10368   MANPAGE_FORMAT=unknown
10369 fi;
10370
10371 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10372 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10373
10374 cf_unknown=
10375
10376 case $MANPAGE_FORMAT in
10377 unknown)
10378   if test -z "$MANPATH" ; then
10379     MANPATH="/usr/man:/usr/share/man"
10380   fi
10381
10382   # look for the 'date' man-page (it's most likely to be installed!)
10383   MANPAGE_FORMAT=
10384   cf_preform=no
10385   cf_catonly=yes
10386   cf_example=date
10387
10388   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10389   for cf_dir in $MANPATH; do
10390     test -z "$cf_dir" && cf_dir=/usr/man
10391     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
10392     do
10393       cf_test=`echo $cf_name | sed -e 's/*//'`
10394       if test "x$cf_test" = "x$cf_name" ; then
10395
10396         case "$cf_name" in
10397         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10398         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10399         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10400         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10401         esac
10402
10403         case "$cf_name" in
10404         $cf_dir/man*)
10405           cf_catonly=no
10406           ;;
10407         $cf_dir/cat*)
10408           cf_preform=yes
10409           ;;
10410         esac
10411         break
10412       fi
10413
10414       # if we found a match in either man* or cat*, stop looking
10415       if test -n "$MANPAGE_FORMAT" ; then
10416         cf_found=no
10417         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10418         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10419         case "$cf_name" in
10420         $cf_dir/cat*)
10421           cf_found=yes
10422           ;;
10423         esac
10424         test $cf_found=yes && break
10425       fi
10426     done
10427     # only check the first directory in $MANPATH where we find manpages
10428     if test -n "$MANPAGE_FORMAT" ; then
10429        break
10430     fi
10431   done
10432   # if we did not find the example, just assume it is normal
10433   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10434   IFS="$ac_save_ifs"
10435   ;;
10436 *)
10437   for cf_option in $MANPAGE_FORMAT; do
10438      case $cf_option in #(vi
10439      gzip|compress|BSDI|normal|formatted|catonly)
10440        ;;
10441      *)
10442        cf_unknown="$cf_unknown $cf_option"
10443        ;;
10444      esac
10445   done
10446   ;;
10447 esac
10448
10449 echo "$as_me:10449: result: $MANPAGE_FORMAT" >&5
10450 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10451 if test -n "$cf_unknown" ; then
10452   { echo "$as_me:10452: WARNING: Unexpected manpage-format $cf_unknown" >&5
10453 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10454 fi
10455
10456 echo "$as_me:10456: checking for manpage renaming" >&5
10457 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10458
10459 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10460 if test "${with_manpage_renames+set}" = set; then
10461   withval="$with_manpage_renames"
10462   MANPAGE_RENAMES=$withval
10463 else
10464   MANPAGE_RENAMES=yes
10465 fi;
10466
10467 case ".$MANPAGE_RENAMES" in #(vi
10468 .no) #(vi
10469   ;;
10470 .|.yes)
10471   # Debian 'man' program?
10472   if test -f /etc/debian_version ; then
10473     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10474   else
10475     MANPAGE_RENAMES=no
10476   fi
10477   ;;
10478 esac
10479
10480 if test "$MANPAGE_RENAMES" != no ; then
10481   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10482     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10483   elif test ! -f $MANPAGE_RENAMES ; then
10484     { { echo "$as_me:10484: error: not a filename: $MANPAGE_RENAMES" >&5
10485 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10486    { (exit 1); exit 1; }; }
10487   fi
10488
10489   test ! -d man && mkdir man
10490
10491   # Construct a sed-script to perform renaming within man-pages
10492   if test -n "$MANPAGE_RENAMES" ; then
10493     test ! -d man && mkdir man
10494     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10495   fi
10496 fi
10497
10498 echo "$as_me:10498: result: $MANPAGE_RENAMES" >&5
10499 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10500
10501 echo "$as_me:10501: checking if manpage aliases will be installed" >&5
10502 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10503
10504 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10505 if test "${with_manpage_aliases+set}" = set; then
10506   withval="$with_manpage_aliases"
10507   MANPAGE_ALIASES=$withval
10508 else
10509   MANPAGE_ALIASES=yes
10510 fi;
10511
10512 echo "$as_me:10512: result: $MANPAGE_ALIASES" >&5
10513 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10514
10515 case "x$LN_S" in #(vi
10516 xln*) #(vi
10517         cf_use_symlinks=yes
10518         ;;
10519 *)
10520         cf_use_symlinks=no
10521         ;;
10522 esac
10523
10524 MANPAGE_SYMLINKS=no
10525 if test "$MANPAGE_ALIASES" = yes ; then
10526 echo "$as_me:10526: checking if manpage symlinks should be used" >&5
10527 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10528
10529 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10530 if test "${with_manpage_symlinks+set}" = set; then
10531   withval="$with_manpage_symlinks"
10532   MANPAGE_SYMLINKS=$withval
10533 else
10534   MANPAGE_SYMLINKS=$cf_use_symlinks
10535 fi;
10536
10537 if test "$$cf_use_symlinks" = no; then
10538 if test "$MANPAGE_SYMLINKS" = yes ; then
10539         { echo "$as_me:10539: WARNING: cannot make symlinks" >&5
10540 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10541         MANPAGE_SYMLINKS=no
10542 fi
10543 fi
10544
10545 echo "$as_me:10545: result: $MANPAGE_SYMLINKS" >&5
10546 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10547 fi
10548
10549 echo "$as_me:10549: checking for manpage tbl" >&5
10550 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10551
10552 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10553 if test "${with_manpage_tbl+set}" = set; then
10554   withval="$with_manpage_tbl"
10555   MANPAGE_TBL=$withval
10556 else
10557   MANPAGE_TBL=no
10558 fi;
10559
10560 echo "$as_me:10560: result: $MANPAGE_TBL" >&5
10561 echo "${ECHO_T}$MANPAGE_TBL" >&6
10562
10563   if test "$prefix" = "NONE" ; then
10564      cf_prefix="$ac_default_prefix"
10565   else
10566      cf_prefix="$prefix"
10567   fi
10568
10569   case "$MANPAGE_FORMAT" in # (vi
10570   *catonly*) # (vi
10571     cf_format=yes
10572     cf_inboth=no
10573     ;;
10574   *formatted*) # (vi
10575     cf_format=yes
10576     cf_inboth=yes
10577     ;;
10578   *)
10579     cf_format=no
10580     cf_inboth=no
10581     ;;
10582   esac
10583
10584 test ! -d man && mkdir man
10585
10586 cf_so_strip=
10587 cf_compress=
10588 case "$MANPAGE_FORMAT" in #(vi
10589 *compress*) #(vi
10590         cf_so_strip="Z"
10591         cf_compress=compress
10592   ;;
10593 *gzip*)
10594         cf_so_strip="gz"
10595         cf_compress=gzip
10596   ;;
10597 esac
10598
10599 cf_edit_man=./edit_man.sh
10600 cf_man_alias=`pwd`/man_alias.sed
10601
10602 cat >$cf_edit_man <<CF_EOF
10603 #! /bin/sh
10604 # this script is generated by the configure-script CF_MAN_PAGES macro.
10605
10606 prefix="$cf_prefix"
10607 datarootdir="$datarootdir"
10608 datadir="$datadir"
10609
10610 NCURSES_MAJOR="$NCURSES_MAJOR"
10611 NCURSES_MINOR="$NCURSES_MINOR"
10612 NCURSES_PATCH="$NCURSES_PATCH"
10613
10614 NCURSES_OSPEED="$NCURSES_OSPEED"
10615 TERMINFO="$TERMINFO"
10616
10617 INSTALL="$INSTALL"
10618 INSTALL_DATA="$INSTALL_DATA"
10619
10620 transform="$program_transform_name"
10621
10622 TMP=\${TMPDIR:=/tmp}/man\$\$
10623 trap "rm -f \$TMP" 0 1 2 5 15
10624
10625 form=\$1
10626 shift || exit 1
10627
10628 verb=\$1
10629 shift || exit 1
10630
10631 mandir=\$1
10632 shift || exit 1
10633
10634 srcdir=\$1
10635 top_srcdir=\$srcdir/..
10636 shift || exit 1
10637
10638 if test "\$form" = normal ; then
10639         if test "$cf_format" = yes ; then
10640         if test "$cf_inboth" = no ; then
10641                 sh \$0 format \$verb \$mandir \$srcdir \$*
10642                 exit $?
10643         fi
10644         fi
10645         cf_subdir=\$mandir/man
10646         cf_tables=$MANPAGE_TBL
10647 else
10648         cf_subdir=\$mandir/cat
10649         cf_tables=yes
10650 fi
10651
10652 # process the list of source-files
10653 for i in \$* ; do
10654 case \$i in #(vi
10655 *.orig|*.rej) ;; #(vi
10656 *.[0-9]*)
10657         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10658         if test \$verb = installing ; then
10659         if test ! -d \$cf_subdir\${section} ; then
10660                 mkdir -p \$cf_subdir\$section
10661         fi
10662         fi
10663
10664         # replace variables in man page
10665         if test ! -f $cf_man_alias ; then
10666 cat >>$cf_man_alias <<-CF_EOF2
10667                 s,@DATADIR@,\$datadir,g
10668                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10669                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10670                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10671                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10672                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10673                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10674 CF_EOF
10675
10676         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10677         do
10678                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10679                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10680 cat >>$cf_edit_man <<-CF_EOF
10681                 s,@$cf_NAME@,$cf_name,g
10682 CF_EOF
10683         done
10684
10685 cat >>$cf_edit_man <<CF_EOF
10686 CF_EOF2
10687                 echo "...made $cf_man_alias"
10688         fi
10689
10690         aliases=
10691         cf_source=\`basename \$i\`
10692         inalias=\$cf_source
10693         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10694         if test ! -f \$inalias ; then
10695                 echo .. skipped \$cf_source
10696                 continue
10697         fi
10698 CF_EOF
10699
10700 if test "$MANPAGE_ALIASES" != no ; then
10701 cat >>$cf_edit_man <<CF_EOF
10702         nCurses=ignore.3x
10703         test $with_curses_h = yes && nCurses=ncurses.3x
10704         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10705 CF_EOF
10706 fi
10707
10708 if test "$MANPAGE_RENAMES" = no ; then
10709 cat >>$cf_edit_man <<CF_EOF
10710         # perform program transformations for section 1 man pages
10711         if test \$section = 1 ; then
10712                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10713         else
10714                 cf_target=\$cf_subdir\${section}/\$cf_source
10715         fi
10716 CF_EOF
10717 else
10718 cat >>$cf_edit_man <<CF_EOF
10719         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10720         if test -z "\$cf_target" ; then
10721                 echo '? missing rename for '\$cf_source
10722                 cf_target="\$cf_source"
10723         fi
10724         cf_target="\$cf_subdir\${section}/\${cf_target}"
10725
10726 CF_EOF
10727 fi
10728
10729 cat >>$cf_edit_man <<CF_EOF
10730         sed     -f $cf_man_alias \\
10731 CF_EOF
10732
10733 if test -f $MANPAGE_RENAMES ; then
10734 cat >>$cf_edit_man <<CF_EOF
10735                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10736 CF_EOF
10737 else
10738 cat >>$cf_edit_man <<CF_EOF
10739                 < \$i >\$TMP
10740 CF_EOF
10741 fi
10742
10743 cat >>$cf_edit_man <<CF_EOF
10744 if test \$cf_tables = yes ; then
10745         tbl \$TMP >\$TMP.out
10746         mv \$TMP.out \$TMP
10747 fi
10748 CF_EOF
10749
10750 if test $with_overwrite != yes ; then
10751 cat >>$cf_edit_man <<CF_EOF
10752         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10753         mv \$TMP.out \$TMP
10754 CF_EOF
10755 fi
10756
10757 if test $with_curses_h != yes ; then
10758 cat >>$cf_edit_man <<CF_EOF
10759         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10760         mv \$TMP.out \$TMP
10761 CF_EOF
10762 fi
10763
10764 cat >>$cf_edit_man <<CF_EOF
10765         if test \$form = format ; then
10766                 nroff -man \$TMP >\$TMP.out
10767                 mv \$TMP.out \$TMP
10768         fi
10769 CF_EOF
10770
10771 if test -n "$cf_compress" ; then
10772 cat >>$cf_edit_man <<CF_EOF
10773         if test \$verb = installing ; then
10774         if ( $cf_compress -f \$TMP )
10775         then
10776                 mv \$TMP.$cf_so_strip \$TMP
10777         fi
10778         fi
10779         cf_target="\$cf_target.$cf_so_strip"
10780 CF_EOF
10781 fi
10782
10783 case "$MANPAGE_FORMAT" in #(vi
10784 *BSDI*)
10785 cat >>$cf_edit_man <<CF_EOF
10786         if test \$form = format ; then
10787                 # BSDI installs only .0 suffixes in the cat directories
10788                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10789         fi
10790 CF_EOF
10791   ;;
10792 esac
10793
10794 cat >>$cf_edit_man <<CF_EOF
10795         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10796         if test \$verb = installing ; then
10797                 echo \$verb \$cf_target
10798                 \$INSTALL_DATA \$TMP \$cf_target
10799                 test -d \$cf_subdir\${section} &&
10800                 test -n "\$aliases" && (
10801                         cd \$cf_subdir\${section} && (
10802                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10803                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10804                                 cf_target=\`basename \$cf_target\`
10805                                 for cf_alias in \$aliases
10806                                 do
10807                                         if test \$section = 1 ; then
10808                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10809                                         fi
10810
10811                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10812                                                 if test -f \$cf_alias\${suffix} ; then
10813                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10814                                                         then
10815                                                                 continue
10816                                                         fi
10817                                                 fi
10818                                                 echo .. \$verb alias \$cf_alias\${suffix}
10819 CF_EOF
10820 case "x$LN_S" in #(vi
10821 *-f) #(vi
10822 cat >>$cf_edit_man <<CF_EOF
10823                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10824 CF_EOF
10825         ;;
10826 *)
10827 cat >>$cf_edit_man <<CF_EOF
10828                                                 rm -f \$cf_alias\${suffix}
10829                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10830 CF_EOF
10831         ;;
10832 esac
10833 cat >>$cf_edit_man <<CF_EOF
10834                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10835                                                 echo ".so \$cf_source" >\$TMP
10836 CF_EOF
10837 if test -n "$cf_compress" ; then
10838 cat >>$cf_edit_man <<CF_EOF
10839                                                 if test -n "$cf_so_strip" ; then
10840                                                         $cf_compress -f \$TMP
10841                                                         mv \$TMP.$cf_so_strip \$TMP
10842                                                 fi
10843 CF_EOF
10844 fi
10845 cat >>$cf_edit_man <<CF_EOF
10846                                                 echo .. \$verb alias \$cf_alias\${suffix}
10847                                                 rm -f \$cf_alias\${suffix}
10848                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10849                                         fi
10850                                 done
10851                         )
10852                 )
10853         elif test \$verb = removing ; then
10854                 test -f \$cf_target && (
10855                         echo \$verb \$cf_target
10856                         rm -f \$cf_target
10857                 )
10858                 test -d \$cf_subdir\${section} &&
10859                 test -n "\$aliases" && (
10860                         cd \$cf_subdir\${section} && (
10861                                 for cf_alias in \$aliases
10862                                 do
10863                                         if test \$section = 1 ; then
10864                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10865                                         fi
10866
10867                                         echo .. \$verb alias \$cf_alias\${suffix}
10868                                         rm -f \$cf_alias\${suffix}
10869                                 done
10870                         )
10871                 )
10872         else
10873 #               echo ".hy 0"
10874                 cat \$TMP
10875         fi
10876         ;;
10877 esac
10878 done
10879
10880 if test $cf_inboth = yes ; then
10881 if test \$form != format ; then
10882         sh \$0 format \$verb \$mandir \$srcdir \$*
10883 fi
10884 fi
10885
10886 exit 0
10887 CF_EOF
10888 chmod 755 $cf_edit_man
10889
10890 ###############################################################################
10891
10892 ### Note that some functions (such as const) are normally disabled anyway.
10893 echo "$as_me:10893: checking if you want to build with function extensions" >&5
10894 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10895
10896 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10897 if test "${enable_ext_funcs+set}" = set; then
10898   enableval="$enable_ext_funcs"
10899   with_ext_funcs=$enableval
10900 else
10901   with_ext_funcs=yes
10902 fi;
10903 echo "$as_me:10903: result: $with_ext_funcs" >&5
10904 echo "${ECHO_T}$with_ext_funcs" >&6
10905 if test "x$with_ext_funcs" = xyes ; then
10906         NCURSES_EXT_FUNCS=1
10907
10908 cat >>confdefs.h <<\EOF
10909 #define HAVE_ASSUME_DEFAULT_COLORS 1
10910 EOF
10911
10912 cat >>confdefs.h <<\EOF
10913 #define HAVE_CURSES_VERSION 1
10914 EOF
10915
10916 cat >>confdefs.h <<\EOF
10917 #define HAVE_HAS_KEY 1
10918 EOF
10919
10920 cat >>confdefs.h <<\EOF
10921 #define HAVE_RESIZETERM 1
10922 EOF
10923
10924 cat >>confdefs.h <<\EOF
10925 #define HAVE_RESIZE_TERM 1
10926 EOF
10927
10928 cat >>confdefs.h <<\EOF
10929 #define HAVE_TERM_ENTRY_H 1
10930 EOF
10931
10932 cat >>confdefs.h <<\EOF
10933 #define HAVE_USE_DEFAULT_COLORS 1
10934 EOF
10935
10936 cat >>confdefs.h <<\EOF
10937 #define HAVE_USE_SCREEN 1
10938 EOF
10939
10940 cat >>confdefs.h <<\EOF
10941 #define HAVE_USE_WINDOW 1
10942 EOF
10943
10944 cat >>confdefs.h <<\EOF
10945 #define HAVE_WRESIZE 1
10946 EOF
10947
10948 cat >>confdefs.h <<\EOF
10949 #define NCURSES_EXT_FUNCS 1
10950 EOF
10951
10952         GENERATED_EXT_FUNCS=generated
10953 else
10954         NCURSES_EXT_FUNCS=0
10955         GENERATED_EXT_FUNCS=
10956 fi
10957
10958 echo "$as_me:10958: checking if you want to build with experimental SCREEN extensions" >&5
10959 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10960
10961 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10962 if test "${enable_sp_funcs+set}" = set; then
10963   enableval="$enable_sp_funcs"
10964   with_sp_funcs=$enableval
10965 else
10966   with_sp_funcs=no
10967 fi;
10968 echo "$as_me:10968: result: $with_sp_funcs" >&5
10969 echo "${ECHO_T}$with_sp_funcs" >&6
10970 if test "x$with_sp_funcs" = xyes ; then
10971         NCURSES_SP_FUNCS=1
10972
10973 cat >>confdefs.h <<\EOF
10974 #define NCURSES_SP_FUNCS 1
10975 EOF
10976
10977         GENERATED_SP_FUNCS=generated
10978 else
10979         NCURSES_SP_FUNCS=0
10980         GENERATED_SP_FUNCS=
10981 fi
10982
10983 echo "$as_me:10983: checking if you want to build with experimental terminal-driver" >&5
10984 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10985
10986 # Check whether --enable-term-driver or --disable-term-driver was given.
10987 if test "${enable_term_driver+set}" = set; then
10988   enableval="$enable_term_driver"
10989   with_term_driver=$enableval
10990 else
10991   with_term_driver=no
10992 fi;
10993 echo "$as_me:10993: result: $with_term_driver" >&5
10994 echo "${ECHO_T}$with_term_driver" >&6
10995 if test "x$with_term_driver" = xyes ; then
10996
10997 cat >>confdefs.h <<\EOF
10998 #define USE_TERM_DRIVER 1
10999 EOF
11000
11001         if test "x$with_sp_funcs" != xyes ; then
11002                 { { echo "$as_me:11002: error: The term-driver option relies upon sp-funcs" >&5
11003 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11004    { (exit 1); exit 1; }; }
11005         fi
11006 fi
11007
11008 ###   use option --enable-const to turn on use of const beyond that in XSI.
11009 echo "$as_me:11009: checking for extended use of const keyword" >&5
11010 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11011
11012 # Check whether --enable-const or --disable-const was given.
11013 if test "${enable_const+set}" = set; then
11014   enableval="$enable_const"
11015   with_ext_const=$enableval
11016 else
11017   with_ext_const=no
11018 fi;
11019 echo "$as_me:11019: result: $with_ext_const" >&5
11020 echo "${ECHO_T}$with_ext_const" >&6
11021 NCURSES_CONST='/*nothing*/'
11022 if test "x$with_ext_const" = xyes ; then
11023         NCURSES_CONST=const
11024 fi
11025
11026 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11027 echo "$as_me:11027: checking if you want to use extended colors" >&5
11028 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11029
11030 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11031 if test "${enable_ext_colors+set}" = set; then
11032   enableval="$enable_ext_colors"
11033   with_ext_colors=$enableval
11034 else
11035   with_ext_colors=no
11036 fi;
11037 echo "$as_me:11037: result: $with_ext_colors" >&5
11038 echo "${ECHO_T}$with_ext_colors" >&6
11039 NCURSES_EXT_COLORS=0
11040 if test "x$with_ext_colors" = xyes ; then
11041         if test "x$with_widec" != xyes ; then
11042                 { { echo "$as_me:11042: error: This option applies only to wide-character library" >&5
11043 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11044    { (exit 1); exit 1; }; }
11045         else
11046                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11047
11048 if test "${with_abi_version+set}" != set; then
11049         case $cf_cv_rel_version in
11050         5.*)
11051                 cf_cv_rel_version=6.0
11052                 cf_cv_abi_version=6
11053                 { echo "$as_me:11053: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11054 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11055                 ;;
11056         esac
11057 fi
11058
11059         fi
11060         NCURSES_EXT_COLORS=1
11061
11062 cat >>confdefs.h <<\EOF
11063 #define NCURSES_EXT_COLORS 1
11064 EOF
11065
11066 fi
11067
11068 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11069 echo "$as_me:11069: checking if you want to use extended mouse encoding" >&5
11070 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11071
11072 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11073 if test "${enable_ext_mouse+set}" = set; then
11074   enableval="$enable_ext_mouse"
11075   with_ext_mouse=$enableval
11076 else
11077   with_ext_mouse=no
11078 fi;
11079 echo "$as_me:11079: result: $with_ext_mouse" >&5
11080 echo "${ECHO_T}$with_ext_mouse" >&6
11081 NCURSES_MOUSE_VERSION=1
11082 if test "x$with_ext_mouse" = xyes ; then
11083         NCURSES_MOUSE_VERSION=2
11084
11085 if test "${with_abi_version+set}" != set; then
11086         case $cf_cv_rel_version in
11087         5.*)
11088                 cf_cv_rel_version=6.0
11089                 cf_cv_abi_version=6
11090                 { echo "$as_me:11090: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11091 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11092                 ;;
11093         esac
11094 fi
11095
11096 fi
11097
11098 echo "$as_me:11098: checking if you want \$NCURSES_NO_PADDING code" >&5
11099 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11100
11101 # Check whether --enable-no-padding or --disable-no-padding was given.
11102 if test "${enable_no_padding+set}" = set; then
11103   enableval="$enable_no_padding"
11104   with_no_padding=$enableval
11105 else
11106   with_no_padding=$with_ext_funcs
11107 fi;
11108 echo "$as_me:11108: result: $with_no_padding" >&5
11109 echo "${ECHO_T}$with_no_padding" >&6
11110 test "x$with_no_padding" = xyes &&
11111 cat >>confdefs.h <<\EOF
11112 #define NCURSES_NO_PADDING 1
11113 EOF
11114
11115 echo "$as_me:11115: checking for ANSI C header files" >&5
11116 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11117 if test "${ac_cv_header_stdc+set}" = set; then
11118   echo $ECHO_N "(cached) $ECHO_C" >&6
11119 else
11120   cat >conftest.$ac_ext <<_ACEOF
11121 #line 11121 "configure"
11122 #include "confdefs.h"
11123 #include <stdlib.h>
11124 #include <stdarg.h>
11125 #include <string.h>
11126 #include <float.h>
11127
11128 _ACEOF
11129 if { (eval echo "$as_me:11129: \"$ac_cpp conftest.$ac_ext\"") >&5
11130   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11131   ac_status=$?
11132   egrep -v '^ *\+' conftest.er1 >conftest.err
11133   rm -f conftest.er1
11134   cat conftest.err >&5
11135   echo "$as_me:11135: \$? = $ac_status" >&5
11136   (exit $ac_status); } >/dev/null; then
11137   if test -s conftest.err; then
11138     ac_cpp_err=$ac_c_preproc_warn_flag
11139   else
11140     ac_cpp_err=
11141   fi
11142 else
11143   ac_cpp_err=yes
11144 fi
11145 if test -z "$ac_cpp_err"; then
11146   ac_cv_header_stdc=yes
11147 else
11148   echo "$as_me: failed program was:" >&5
11149   cat conftest.$ac_ext >&5
11150   ac_cv_header_stdc=no
11151 fi
11152 rm -f conftest.err conftest.$ac_ext
11153
11154 if test $ac_cv_header_stdc = yes; then
11155   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11156   cat >conftest.$ac_ext <<_ACEOF
11157 #line 11157 "configure"
11158 #include "confdefs.h"
11159 #include <string.h>
11160
11161 _ACEOF
11162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11163   egrep "memchr" >/dev/null 2>&1; then
11164   :
11165 else
11166   ac_cv_header_stdc=no
11167 fi
11168 rm -rf conftest*
11169
11170 fi
11171
11172 if test $ac_cv_header_stdc = yes; then
11173   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11174   cat >conftest.$ac_ext <<_ACEOF
11175 #line 11175 "configure"
11176 #include "confdefs.h"
11177 #include <stdlib.h>
11178
11179 _ACEOF
11180 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11181   egrep "free" >/dev/null 2>&1; then
11182   :
11183 else
11184   ac_cv_header_stdc=no
11185 fi
11186 rm -rf conftest*
11187
11188 fi
11189
11190 if test $ac_cv_header_stdc = yes; then
11191   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11192   if test "$cross_compiling" = yes; then
11193   :
11194 else
11195   cat >conftest.$ac_ext <<_ACEOF
11196 #line 11196 "configure"
11197 #include "confdefs.h"
11198 #include <ctype.h>
11199 #if ((' ' & 0x0FF) == 0x020)
11200 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11201 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11202 #else
11203 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11204                      || ('j' <= (c) && (c) <= 'r') \
11205                      || ('s' <= (c) && (c) <= 'z'))
11206 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11207 #endif
11208
11209 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11210 int
11211 main ()
11212 {
11213   int i;
11214   for (i = 0; i < 256; i++)
11215     if (XOR (islower (i), ISLOWER (i))
11216         || toupper (i) != TOUPPER (i))
11217       $ac_main_return(2);
11218   $ac_main_return (0);
11219 }
11220 _ACEOF
11221 rm -f conftest$ac_exeext
11222 if { (eval echo "$as_me:11222: \"$ac_link\"") >&5
11223   (eval $ac_link) 2>&5
11224   ac_status=$?
11225   echo "$as_me:11225: \$? = $ac_status" >&5
11226   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11227   { (eval echo "$as_me:11227: \"$ac_try\"") >&5
11228   (eval $ac_try) 2>&5
11229   ac_status=$?
11230   echo "$as_me:11230: \$? = $ac_status" >&5
11231   (exit $ac_status); }; }; then
11232   :
11233 else
11234   echo "$as_me: program exited with status $ac_status" >&5
11235 echo "$as_me: failed program was:" >&5
11236 cat conftest.$ac_ext >&5
11237 ac_cv_header_stdc=no
11238 fi
11239 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11240 fi
11241 fi
11242 fi
11243 echo "$as_me:11243: result: $ac_cv_header_stdc" >&5
11244 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11245 if test $ac_cv_header_stdc = yes; then
11246
11247 cat >>confdefs.h <<\EOF
11248 #define STDC_HEADERS 1
11249 EOF
11250
11251 fi
11252
11253 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11254
11255 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11256                   inttypes.h stdint.h unistd.h
11257 do
11258 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11259 echo "$as_me:11259: checking for $ac_header" >&5
11260 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11262   echo $ECHO_N "(cached) $ECHO_C" >&6
11263 else
11264   cat >conftest.$ac_ext <<_ACEOF
11265 #line 11265 "configure"
11266 #include "confdefs.h"
11267 $ac_includes_default
11268 #include <$ac_header>
11269 _ACEOF
11270 rm -f conftest.$ac_objext
11271 if { (eval echo "$as_me:11271: \"$ac_compile\"") >&5
11272   (eval $ac_compile) 2>&5
11273   ac_status=$?
11274   echo "$as_me:11274: \$? = $ac_status" >&5
11275   (exit $ac_status); } &&
11276          { ac_try='test -s conftest.$ac_objext'
11277   { (eval echo "$as_me:11277: \"$ac_try\"") >&5
11278   (eval $ac_try) 2>&5
11279   ac_status=$?
11280   echo "$as_me:11280: \$? = $ac_status" >&5
11281   (exit $ac_status); }; }; then
11282   eval "$as_ac_Header=yes"
11283 else
11284   echo "$as_me: failed program was:" >&5
11285 cat conftest.$ac_ext >&5
11286 eval "$as_ac_Header=no"
11287 fi
11288 rm -f conftest.$ac_objext conftest.$ac_ext
11289 fi
11290 echo "$as_me:11290: result: `eval echo '${'$as_ac_Header'}'`" >&5
11291 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11292 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11293   cat >>confdefs.h <<EOF
11294 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11295 EOF
11296
11297 fi
11298 done
11299
11300 echo "$as_me:11300: checking for signed char" >&5
11301 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11302 if test "${ac_cv_type_signed_char+set}" = set; then
11303   echo $ECHO_N "(cached) $ECHO_C" >&6
11304 else
11305   cat >conftest.$ac_ext <<_ACEOF
11306 #line 11306 "configure"
11307 #include "confdefs.h"
11308 $ac_includes_default
11309 int
11310 main ()
11311 {
11312 if ((signed char *) 0)
11313   return 0;
11314 if (sizeof (signed char))
11315   return 0;
11316   ;
11317   return 0;
11318 }
11319 _ACEOF
11320 rm -f conftest.$ac_objext
11321 if { (eval echo "$as_me:11321: \"$ac_compile\"") >&5
11322   (eval $ac_compile) 2>&5
11323   ac_status=$?
11324   echo "$as_me:11324: \$? = $ac_status" >&5
11325   (exit $ac_status); } &&
11326          { ac_try='test -s conftest.$ac_objext'
11327   { (eval echo "$as_me:11327: \"$ac_try\"") >&5
11328   (eval $ac_try) 2>&5
11329   ac_status=$?
11330   echo "$as_me:11330: \$? = $ac_status" >&5
11331   (exit $ac_status); }; }; then
11332   ac_cv_type_signed_char=yes
11333 else
11334   echo "$as_me: failed program was:" >&5
11335 cat conftest.$ac_ext >&5
11336 ac_cv_type_signed_char=no
11337 fi
11338 rm -f conftest.$ac_objext conftest.$ac_ext
11339 fi
11340 echo "$as_me:11340: result: $ac_cv_type_signed_char" >&5
11341 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11342
11343 echo "$as_me:11343: checking size of signed char" >&5
11344 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11345 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11346   echo $ECHO_N "(cached) $ECHO_C" >&6
11347 else
11348   if test "$ac_cv_type_signed_char" = yes; then
11349   if test "$cross_compiling" = yes; then
11350   # Depending upon the size, compute the lo and hi bounds.
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)) >= 0)]
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_lo=0 ac_mid=0
11376   while :; do
11377     cat >conftest.$ac_ext <<_ACEOF
11378 #line 11378 "configure"
11379 #include "confdefs.h"
11380 $ac_includes_default
11381 int
11382 main ()
11383 {
11384 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11385   ;
11386   return 0;
11387 }
11388 _ACEOF
11389 rm -f conftest.$ac_objext
11390 if { (eval echo "$as_me:11390: \"$ac_compile\"") >&5
11391   (eval $ac_compile) 2>&5
11392   ac_status=$?
11393   echo "$as_me:11393: \$? = $ac_status" >&5
11394   (exit $ac_status); } &&
11395          { ac_try='test -s conftest.$ac_objext'
11396   { (eval echo "$as_me:11396: \"$ac_try\"") >&5
11397   (eval $ac_try) 2>&5
11398   ac_status=$?
11399   echo "$as_me:11399: \$? = $ac_status" >&5
11400   (exit $ac_status); }; }; then
11401   ac_hi=$ac_mid; break
11402 else
11403   echo "$as_me: failed program was:" >&5
11404 cat conftest.$ac_ext >&5
11405 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11406 fi
11407 rm -f conftest.$ac_objext conftest.$ac_ext
11408   done
11409 else
11410   echo "$as_me: failed program was:" >&5
11411 cat conftest.$ac_ext >&5
11412 ac_hi=-1 ac_mid=-1
11413   while :; do
11414     cat >conftest.$ac_ext <<_ACEOF
11415 #line 11415 "configure"
11416 #include "confdefs.h"
11417 $ac_includes_default
11418 int
11419 main ()
11420 {
11421 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11422   ;
11423   return 0;
11424 }
11425 _ACEOF
11426 rm -f conftest.$ac_objext
11427 if { (eval echo "$as_me:11427: \"$ac_compile\"") >&5
11428   (eval $ac_compile) 2>&5
11429   ac_status=$?
11430   echo "$as_me:11430: \$? = $ac_status" >&5
11431   (exit $ac_status); } &&
11432          { ac_try='test -s conftest.$ac_objext'
11433   { (eval echo "$as_me:11433: \"$ac_try\"") >&5
11434   (eval $ac_try) 2>&5
11435   ac_status=$?
11436   echo "$as_me:11436: \$? = $ac_status" >&5
11437   (exit $ac_status); }; }; then
11438   ac_lo=$ac_mid; break
11439 else
11440   echo "$as_me: failed program was:" >&5
11441 cat conftest.$ac_ext >&5
11442 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11443 fi
11444 rm -f conftest.$ac_objext conftest.$ac_ext
11445   done
11446 fi
11447 rm -f conftest.$ac_objext conftest.$ac_ext
11448 # Binary search between lo and hi bounds.
11449 while test "x$ac_lo" != "x$ac_hi"; do
11450   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11451   cat >conftest.$ac_ext <<_ACEOF
11452 #line 11452 "configure"
11453 #include "confdefs.h"
11454 $ac_includes_default
11455 int
11456 main ()
11457 {
11458 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11459   ;
11460   return 0;
11461 }
11462 _ACEOF
11463 rm -f conftest.$ac_objext
11464 if { (eval echo "$as_me:11464: \"$ac_compile\"") >&5
11465   (eval $ac_compile) 2>&5
11466   ac_status=$?
11467   echo "$as_me:11467: \$? = $ac_status" >&5
11468   (exit $ac_status); } &&
11469          { ac_try='test -s conftest.$ac_objext'
11470   { (eval echo "$as_me:11470: \"$ac_try\"") >&5
11471   (eval $ac_try) 2>&5
11472   ac_status=$?
11473   echo "$as_me:11473: \$? = $ac_status" >&5
11474   (exit $ac_status); }; }; then
11475   ac_hi=$ac_mid
11476 else
11477   echo "$as_me: failed program was:" >&5
11478 cat conftest.$ac_ext >&5
11479 ac_lo=`expr $ac_mid + 1`
11480 fi
11481 rm -f conftest.$ac_objext conftest.$ac_ext
11482 done
11483 ac_cv_sizeof_signed_char=$ac_lo
11484 else
11485   if test "$cross_compiling" = yes; then
11486   { { echo "$as_me:11486: error: cannot run test program while cross compiling" >&5
11487 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11488    { (exit 1); exit 1; }; }
11489 else
11490   cat >conftest.$ac_ext <<_ACEOF
11491 #line 11491 "configure"
11492 #include "confdefs.h"
11493 $ac_includes_default
11494 int
11495 main ()
11496 {
11497 FILE *f = fopen ("conftest.val", "w");
11498 if (!f)
11499   $ac_main_return (1);
11500 fprintf (f, "%d", (sizeof (signed char)));
11501 fclose (f);
11502   ;
11503   return 0;
11504 }
11505 _ACEOF
11506 rm -f conftest$ac_exeext
11507 if { (eval echo "$as_me:11507: \"$ac_link\"") >&5
11508   (eval $ac_link) 2>&5
11509   ac_status=$?
11510   echo "$as_me:11510: \$? = $ac_status" >&5
11511   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11512   { (eval echo "$as_me:11512: \"$ac_try\"") >&5
11513   (eval $ac_try) 2>&5
11514   ac_status=$?
11515   echo "$as_me:11515: \$? = $ac_status" >&5
11516   (exit $ac_status); }; }; then
11517   ac_cv_sizeof_signed_char=`cat conftest.val`
11518 else
11519   echo "$as_me: program exited with status $ac_status" >&5
11520 echo "$as_me: failed program was:" >&5
11521 cat conftest.$ac_ext >&5
11522 fi
11523 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11524 fi
11525 fi
11526 rm -f conftest.val
11527 else
11528   ac_cv_sizeof_signed_char=0
11529 fi
11530 fi
11531 echo "$as_me:11531: result: $ac_cv_sizeof_signed_char" >&5
11532 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11533 cat >>confdefs.h <<EOF
11534 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11535 EOF
11536
11537 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11538         NCURSES_SBOOL="signed char"
11539 else
11540         NCURSES_SBOOL="char"
11541 fi
11542 echo "$as_me:11542: checking if you want to use signed Boolean array in term.h" >&5
11543 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11544
11545 # Check whether --enable-signed-char or --disable-signed-char was given.
11546 if test "${enable_signed_char+set}" = set; then
11547   enableval="$enable_signed_char"
11548   with_signed_char=$enableval
11549 else
11550   with_signed_char=no
11551 fi;
11552 echo "$as_me:11552: result: $with_signed_char" >&5
11553 echo "${ECHO_T}$with_signed_char" >&6
11554 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11555
11556 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11557 echo "$as_me:11557: checking if you want SIGWINCH handler" >&5
11558 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11559
11560 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11561 if test "${enable_sigwinch+set}" = set; then
11562   enableval="$enable_sigwinch"
11563   with_sigwinch=$enableval
11564 else
11565   with_sigwinch=$with_ext_funcs
11566 fi;
11567 echo "$as_me:11567: result: $with_sigwinch" >&5
11568 echo "${ECHO_T}$with_sigwinch" >&6
11569 test "x$with_sigwinch" = xyes &&
11570 cat >>confdefs.h <<\EOF
11571 #define USE_SIGWINCH 1
11572 EOF
11573
11574 ###   use option --enable-tcap-names to allow user to define new capabilities
11575 echo "$as_me:11575: checking if you want user-definable terminal capabilities like termcap" >&5
11576 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11577
11578 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11579 if test "${enable_tcap_names+set}" = set; then
11580   enableval="$enable_tcap_names"
11581   with_tcap_names=$enableval
11582 else
11583   with_tcap_names=$with_ext_funcs
11584 fi;
11585 echo "$as_me:11585: result: $with_tcap_names" >&5
11586 echo "${ECHO_T}$with_tcap_names" >&6
11587 NCURSES_XNAMES=0
11588 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11589
11590 ###############################################################################
11591 # These options are relatively safe to experiment with.
11592
11593 echo "$as_me:11593: checking if you want all development code" >&5
11594 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11595
11596 # Check whether --with-develop or --without-develop was given.
11597 if test "${with_develop+set}" = set; then
11598   withval="$with_develop"
11599   with_develop=$withval
11600 else
11601   with_develop=no
11602 fi;
11603 echo "$as_me:11603: result: $with_develop" >&5
11604 echo "${ECHO_T}$with_develop" >&6
11605
11606 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11607 echo "$as_me:11607: checking if you want hard-tabs code" >&5
11608 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11609
11610 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11611 if test "${enable_hard_tabs+set}" = set; then
11612   enableval="$enable_hard_tabs"
11613
11614 else
11615   enable_hard_tabs=$with_develop
11616 fi;
11617 echo "$as_me:11617: result: $enable_hard_tabs" >&5
11618 echo "${ECHO_T}$enable_hard_tabs" >&6
11619 test "x$enable_hard_tabs" = xyes &&
11620 cat >>confdefs.h <<\EOF
11621 #define USE_HARD_TABS 1
11622 EOF
11623
11624 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11625 echo "$as_me:11625: checking if you want limited support for xmc" >&5
11626 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11627
11628 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11629 if test "${enable_xmc_glitch+set}" = set; then
11630   enableval="$enable_xmc_glitch"
11631
11632 else
11633   enable_xmc_glitch=$with_develop
11634 fi;
11635 echo "$as_me:11635: result: $enable_xmc_glitch" >&5
11636 echo "${ECHO_T}$enable_xmc_glitch" >&6
11637 test "x$enable_xmc_glitch" = xyes &&
11638 cat >>confdefs.h <<\EOF
11639 #define USE_XMC_SUPPORT 1
11640 EOF
11641
11642 ###############################################################################
11643 # These are just experimental, probably should not be in a package:
11644
11645 echo "$as_me:11645: checking if you do not want to assume colors are white-on-black" >&5
11646 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11647
11648 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11649 if test "${enable_assumed_color+set}" = set; then
11650   enableval="$enable_assumed_color"
11651   with_assumed_color=$enableval
11652 else
11653   with_assumed_color=yes
11654 fi;
11655 echo "$as_me:11655: result: $with_assumed_color" >&5
11656 echo "${ECHO_T}$with_assumed_color" >&6
11657 test "x$with_assumed_color" = xyes &&
11658 cat >>confdefs.h <<\EOF
11659 #define USE_ASSUMED_COLOR 1
11660 EOF
11661
11662 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11663 echo "$as_me:11663: checking if you want hashmap scrolling-optimization code" >&5
11664 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11665
11666 # Check whether --enable-hashmap or --disable-hashmap was given.
11667 if test "${enable_hashmap+set}" = set; then
11668   enableval="$enable_hashmap"
11669   with_hashmap=$enableval
11670 else
11671   with_hashmap=yes
11672 fi;
11673 echo "$as_me:11673: result: $with_hashmap" >&5
11674 echo "${ECHO_T}$with_hashmap" >&6
11675 test "x$with_hashmap" = xyes &&
11676 cat >>confdefs.h <<\EOF
11677 #define USE_HASHMAP 1
11678 EOF
11679
11680 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11681 echo "$as_me:11681: checking if you want colorfgbg code" >&5
11682 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11683
11684 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11685 if test "${enable_colorfgbg+set}" = set; then
11686   enableval="$enable_colorfgbg"
11687   with_colorfgbg=$enableval
11688 else
11689   with_colorfgbg=no
11690 fi;
11691 echo "$as_me:11691: result: $with_colorfgbg" >&5
11692 echo "${ECHO_T}$with_colorfgbg" >&6
11693 test "x$with_colorfgbg" = xyes &&
11694 cat >>confdefs.h <<\EOF
11695 #define USE_COLORFGBG 1
11696 EOF
11697
11698 ###   use option --enable-interop to turn on use of bindings used for interop
11699 echo "$as_me:11699: checking if you want interop bindings" >&5
11700 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11701
11702 # Check whether --enable-interop or --disable-interop was given.
11703 if test "${enable_interop+set}" = set; then
11704   enableval="$enable_interop"
11705   with_exp_interop=$enableval
11706 else
11707   with_exp_interop=no
11708 fi;
11709 echo "$as_me:11709: result: $with_exp_interop" >&5
11710 echo "${ECHO_T}$with_exp_interop" >&6
11711
11712 NCURSES_INTEROP_FUNCS=0
11713 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11714
11715 # This is still experimental (20080329), but should ultimately be moved to
11716 # the script-block --with-normal, etc.
11717
11718 echo "$as_me:11718: checking if you want to link with the pthread library" >&5
11719 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11720
11721 # Check whether --with-pthread or --without-pthread was given.
11722 if test "${with_pthread+set}" = set; then
11723   withval="$with_pthread"
11724   with_pthread=$withval
11725 else
11726   with_pthread=no
11727 fi;
11728 echo "$as_me:11728: result: $with_pthread" >&5
11729 echo "${ECHO_T}$with_pthread" >&6
11730
11731 if test "$with_pthread" != no ; then
11732     echo "$as_me:11732: checking for pthread.h" >&5
11733 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11734 if test "${ac_cv_header_pthread_h+set}" = set; then
11735   echo $ECHO_N "(cached) $ECHO_C" >&6
11736 else
11737   cat >conftest.$ac_ext <<_ACEOF
11738 #line 11738 "configure"
11739 #include "confdefs.h"
11740 #include <pthread.h>
11741 _ACEOF
11742 if { (eval echo "$as_me:11742: \"$ac_cpp conftest.$ac_ext\"") >&5
11743   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11744   ac_status=$?
11745   egrep -v '^ *\+' conftest.er1 >conftest.err
11746   rm -f conftest.er1
11747   cat conftest.err >&5
11748   echo "$as_me:11748: \$? = $ac_status" >&5
11749   (exit $ac_status); } >/dev/null; then
11750   if test -s conftest.err; then
11751     ac_cpp_err=$ac_c_preproc_warn_flag
11752   else
11753     ac_cpp_err=
11754   fi
11755 else
11756   ac_cpp_err=yes
11757 fi
11758 if test -z "$ac_cpp_err"; then
11759   ac_cv_header_pthread_h=yes
11760 else
11761   echo "$as_me: failed program was:" >&5
11762   cat conftest.$ac_ext >&5
11763   ac_cv_header_pthread_h=no
11764 fi
11765 rm -f conftest.err conftest.$ac_ext
11766 fi
11767 echo "$as_me:11767: result: $ac_cv_header_pthread_h" >&5
11768 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11769 if test $ac_cv_header_pthread_h = yes; then
11770
11771 cat >>confdefs.h <<\EOF
11772 #define HAVE_PTHREADS_H 1
11773 EOF
11774
11775         for cf_lib_pthread in pthread c_r
11776         do
11777             echo "$as_me:11777: checking if we can link with the $cf_lib_pthread library" >&5
11778 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11779             cf_save_LIBS="$LIBS"
11780             LIBS="-l$cf_lib_pthread $LIBS"
11781             cat >conftest.$ac_ext <<_ACEOF
11782 #line 11782 "configure"
11783 #include "confdefs.h"
11784
11785 #include <pthread.h>
11786
11787 int
11788 main ()
11789 {
11790
11791                 int rc = pthread_create(0,0,0,0);
11792                 int r2 = pthread_mutexattr_settype(0, 0);
11793
11794   ;
11795   return 0;
11796 }
11797 _ACEOF
11798 rm -f conftest.$ac_objext conftest$ac_exeext
11799 if { (eval echo "$as_me:11799: \"$ac_link\"") >&5
11800   (eval $ac_link) 2>&5
11801   ac_status=$?
11802   echo "$as_me:11802: \$? = $ac_status" >&5
11803   (exit $ac_status); } &&
11804          { ac_try='test -s conftest$ac_exeext'
11805   { (eval echo "$as_me:11805: \"$ac_try\"") >&5
11806   (eval $ac_try) 2>&5
11807   ac_status=$?
11808   echo "$as_me:11808: \$? = $ac_status" >&5
11809   (exit $ac_status); }; }; then
11810   with_pthread=yes
11811 else
11812   echo "$as_me: failed program was:" >&5
11813 cat conftest.$ac_ext >&5
11814 with_pthread=no
11815 fi
11816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11817             LIBS="$cf_save_LIBS"
11818             echo "$as_me:11818: result: $with_pthread" >&5
11819 echo "${ECHO_T}$with_pthread" >&6
11820             test "$with_pthread" = yes && break
11821         done
11822
11823         if test "$with_pthread" = yes ; then
11824             LIBS="-l$cf_lib_pthread $LIBS"
11825
11826 cat >>confdefs.h <<\EOF
11827 #define HAVE_LIBPTHREADS 1
11828 EOF
11829
11830         else
11831             { { echo "$as_me:11831: error: Cannot link with pthread library" >&5
11832 echo "$as_me: error: Cannot link with pthread library" >&2;}
11833    { (exit 1); exit 1; }; }
11834         fi
11835
11836 fi
11837
11838 fi
11839
11840 if test "x$with_pthread" != xno; then
11841         echo "$as_me:11841: checking for pthread_kill" >&5
11842 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11843 if test "${ac_cv_func_pthread_kill+set}" = set; then
11844   echo $ECHO_N "(cached) $ECHO_C" >&6
11845 else
11846   cat >conftest.$ac_ext <<_ACEOF
11847 #line 11847 "configure"
11848 #include "confdefs.h"
11849 /* System header to define __stub macros and hopefully few prototypes,
11850     which can conflict with char pthread_kill (); below.  */
11851 #include <assert.h>
11852 /* Override any gcc2 internal prototype to avoid an error.  */
11853 #ifdef __cplusplus
11854 extern "C"
11855 #endif
11856 /* We use char because int might match the return type of a gcc2
11857    builtin and then its argument prototype would still apply.  */
11858 char pthread_kill ();
11859 char (*f) ();
11860
11861 int
11862 main ()
11863 {
11864 /* The GNU C library defines this for functions which it implements
11865     to always fail with ENOSYS.  Some functions are actually named
11866     something starting with __ and the normal name is an alias.  */
11867 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11868 choke me
11869 #else
11870 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11871 #endif
11872
11873   ;
11874   return 0;
11875 }
11876 _ACEOF
11877 rm -f conftest.$ac_objext conftest$ac_exeext
11878 if { (eval echo "$as_me:11878: \"$ac_link\"") >&5
11879   (eval $ac_link) 2>&5
11880   ac_status=$?
11881   echo "$as_me:11881: \$? = $ac_status" >&5
11882   (exit $ac_status); } &&
11883          { ac_try='test -s conftest$ac_exeext'
11884   { (eval echo "$as_me:11884: \"$ac_try\"") >&5
11885   (eval $ac_try) 2>&5
11886   ac_status=$?
11887   echo "$as_me:11887: \$? = $ac_status" >&5
11888   (exit $ac_status); }; }; then
11889   ac_cv_func_pthread_kill=yes
11890 else
11891   echo "$as_me: failed program was:" >&5
11892 cat conftest.$ac_ext >&5
11893 ac_cv_func_pthread_kill=no
11894 fi
11895 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11896 fi
11897 echo "$as_me:11897: result: $ac_cv_func_pthread_kill" >&5
11898 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11899 if test $ac_cv_func_pthread_kill = yes; then
11900
11901                 echo "$as_me:11901: checking if you want to allow EINTR in wgetch with pthreads" >&5
11902 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11903
11904 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11905 if test "${enable_pthreads_eintr+set}" = set; then
11906   enableval="$enable_pthreads_eintr"
11907   use_pthreads_eintr=$enableval
11908 else
11909   use_pthreads_eintr=no
11910 fi;
11911                 echo "$as_me:11911: result: $use_pthreads_eintr" >&5
11912 echo "${ECHO_T}$use_pthreads_eintr" >&6
11913                 if test "x$use_pthreads_eintr" = xyes ; then
11914
11915 cat >>confdefs.h <<\EOF
11916 #define USE_PTHREADS_EINTR 1
11917 EOF
11918
11919                 fi
11920 fi
11921
11922         echo "$as_me:11922: checking if you want to use weak-symbols for pthreads" >&5
11923 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11924
11925 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11926 if test "${enable_weak_symbols+set}" = set; then
11927   enableval="$enable_weak_symbols"
11928   use_weak_symbols=$enableval
11929 else
11930   use_weak_symbols=no
11931 fi;
11932         echo "$as_me:11932: result: $use_weak_symbols" >&5
11933 echo "${ECHO_T}$use_weak_symbols" >&6
11934         if test "x$use_weak_symbols" = xyes ; then
11935
11936 echo "$as_me:11936: checking if $CC supports weak symbols" >&5
11937 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11938 if test "${cf_cv_weak_symbols+set}" = set; then
11939   echo $ECHO_N "(cached) $ECHO_C" >&6
11940 else
11941
11942 cat >conftest.$ac_ext <<_ACEOF
11943 #line 11943 "configure"
11944 #include "confdefs.h"
11945
11946 #include <stdio.h>
11947 int
11948 main ()
11949 {
11950
11951 #if defined(__GNUC__)
11952 #  if defined __USE_ISOC99
11953 #    define _cat_pragma(exp)    _Pragma(#exp)
11954 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11955 #  else
11956 #    define _weak_pragma(exp)
11957 #  endif
11958 #  define _declare(name)        __extension__ extern __typeof__(name) name
11959 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11960 #endif
11961
11962 weak_symbol(fopen);
11963
11964   ;
11965   return 0;
11966 }
11967 _ACEOF
11968 rm -f conftest.$ac_objext
11969 if { (eval echo "$as_me:11969: \"$ac_compile\"") >&5
11970   (eval $ac_compile) 2>&5
11971   ac_status=$?
11972   echo "$as_me:11972: \$? = $ac_status" >&5
11973   (exit $ac_status); } &&
11974          { ac_try='test -s conftest.$ac_objext'
11975   { (eval echo "$as_me:11975: \"$ac_try\"") >&5
11976   (eval $ac_try) 2>&5
11977   ac_status=$?
11978   echo "$as_me:11978: \$? = $ac_status" >&5
11979   (exit $ac_status); }; }; then
11980   cf_cv_weak_symbols=yes
11981 else
11982   echo "$as_me: failed program was:" >&5
11983 cat conftest.$ac_ext >&5
11984 cf_cv_weak_symbols=no
11985 fi
11986 rm -f conftest.$ac_objext conftest.$ac_ext
11987
11988 fi
11989 echo "$as_me:11989: result: $cf_cv_weak_symbols" >&5
11990 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11991
11992         else
11993                 cf_cv_weak_symbols=no
11994         fi
11995
11996         if test "x$cf_cv_weak_symbols" = xyes ; then
11997
11998 cat >>confdefs.h <<\EOF
11999 #define USE_WEAK_SYMBOLS 1
12000 EOF
12001
12002         fi
12003 fi
12004
12005 PTHREAD=
12006 if test "x$with_pthread" = "xyes" ; then
12007
12008 cat >>confdefs.h <<\EOF
12009 #define USE_PTHREADS 1
12010 EOF
12011
12012     enable_reentrant=yes
12013     if test "x$cf_cv_weak_symbols" = xyes ; then
12014         PTHREAD=-lpthread
12015     fi
12016 fi
12017
12018 # Reentrant code has to be opaque; there's little advantage to making ncurses
12019 # opaque outside of that, so there is no --enable-opaque option.  We can use
12020 # this option without --with-pthreads, but this will be always set for
12021 # pthreads.
12022 echo "$as_me:12022: checking if you want experimental reentrant code" >&5
12023 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12024
12025 # Check whether --enable-reentrant or --disable-reentrant was given.
12026 if test "${enable_reentrant+set}" = set; then
12027   enableval="$enable_reentrant"
12028   with_reentrant=$enableval
12029 else
12030   with_reentrant=no
12031 fi;
12032 echo "$as_me:12032: result: $with_reentrant" >&5
12033 echo "${ECHO_T}$with_reentrant" >&6
12034 if test "x$with_reentrant" = xyes ; then
12035         cf_cv_enable_reentrant=1
12036         cf_cv_enable_opaque="NCURSES_INTERNALS"
12037         NCURSES_OPAQUE=1
12038         NCURSES_SIZE_T=int
12039         if test "x$cf_cv_weak_symbols" = xyes ; then
12040
12041 # remove pthread library from $LIBS
12042 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12043
12044                 TEST_LIBS="-lpthread $TEST_LIBS"
12045                 TEST_LIBS2="-lpthread $TEST_LIBS2"
12046         else
12047                 LIB_SUFFIX="t${LIB_SUFFIX}"
12048         fi
12049
12050 cat >>confdefs.h <<\EOF
12051 #define USE_REENTRANT 1
12052 EOF
12053
12054 if test "${with_abi_version+set}" != set; then
12055         case $cf_cv_rel_version in
12056         5.*)
12057                 cf_cv_rel_version=6.0
12058                 cf_cv_abi_version=6
12059                 { echo "$as_me:12059: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12060 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12061                 ;;
12062         esac
12063 fi
12064
12065 else
12066         cf_cv_enable_reentrant=0
12067         cf_cv_enable_opaque="NCURSES_OPAQUE"
12068         NCURSES_OPAQUE=0
12069         NCURSES_SIZE_T=short
12070 fi
12071
12072 ### Allow using a different wrap-prefix
12073 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12074         echo "$as_me:12074: checking for prefix used to wrap public variables" >&5
12075 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12076
12077 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12078 if test "${with_wrap_prefix+set}" = set; then
12079   withval="$with_wrap_prefix"
12080   NCURSES_WRAP_PREFIX=$withval
12081 else
12082   NCURSES_WRAP_PREFIX=_nc_
12083 fi;
12084         echo "$as_me:12084: result: $NCURSES_WRAP_PREFIX" >&5
12085 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12086 else
12087         NCURSES_WRAP_PREFIX=_nc_
12088 fi
12089
12090 cat >>confdefs.h <<EOF
12091 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12092 EOF
12093
12094 echo "$as_me:12094: checking if you want experimental safe-sprintf code" >&5
12095 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12096
12097 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12098 if test "${enable_safe_sprintf+set}" = set; then
12099   enableval="$enable_safe_sprintf"
12100   with_safe_sprintf=$enableval
12101 else
12102   with_safe_sprintf=no
12103 fi;
12104 echo "$as_me:12104: result: $with_safe_sprintf" >&5
12105 echo "${ECHO_T}$with_safe_sprintf" >&6
12106 test "x$with_safe_sprintf" = xyes &&
12107 cat >>confdefs.h <<\EOF
12108 #define USE_SAFE_SPRINTF 1
12109 EOF
12110
12111 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12112 # when hashmap is used scroll hints are useless
12113 if test "$with_hashmap" = no ; then
12114 echo "$as_me:12114: checking if you want to experiment without scrolling-hints code" >&5
12115 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12116
12117 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12118 if test "${enable_scroll_hints+set}" = set; then
12119   enableval="$enable_scroll_hints"
12120   with_scroll_hints=$enableval
12121 else
12122   with_scroll_hints=yes
12123 fi;
12124 echo "$as_me:12124: result: $with_scroll_hints" >&5
12125 echo "${ECHO_T}$with_scroll_hints" >&6
12126 test "x$with_scroll_hints" = xyes &&
12127 cat >>confdefs.h <<\EOF
12128 #define USE_SCROLL_HINTS 1
12129 EOF
12130
12131 fi
12132
12133 echo "$as_me:12133: checking if you want experimental wgetch-events code" >&5
12134 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12135
12136 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12137 if test "${enable_wgetch_events+set}" = set; then
12138   enableval="$enable_wgetch_events"
12139   with_wgetch_events=$enableval
12140 else
12141   with_wgetch_events=no
12142 fi;
12143 echo "$as_me:12143: result: $with_wgetch_events" >&5
12144 echo "${ECHO_T}$with_wgetch_events" >&6
12145 test "x$with_wgetch_events" = xyes &&
12146 cat >>confdefs.h <<\EOF
12147 #define NCURSES_WGETCH_EVENTS 1
12148 EOF
12149
12150 ###############################################################################
12151
12152 ###     use option --disable-echo to suppress full display compiling commands
12153
12154 echo "$as_me:12154: checking if you want to see long compiling messages" >&5
12155 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12156
12157 # Check whether --enable-echo or --disable-echo was given.
12158 if test "${enable_echo+set}" = set; then
12159   enableval="$enable_echo"
12160   test "$enableval" != no && enableval=yes
12161   if test "$enableval" != "yes" ; then
12162
12163     ECHO_LT='--silent'
12164     ECHO_LD='@echo linking $@;'
12165     RULE_CC='@echo compiling $<'
12166     SHOW_CC='@echo compiling $@'
12167     ECHO_CC='@'
12168
12169   else
12170
12171     ECHO_LT=''
12172     ECHO_LD=''
12173     RULE_CC=''
12174     SHOW_CC=''
12175     ECHO_CC=''
12176
12177   fi
12178 else
12179   enableval=yes
12180
12181     ECHO_LT=''
12182     ECHO_LD=''
12183     RULE_CC=''
12184     SHOW_CC=''
12185     ECHO_CC=''
12186
12187 fi;
12188 echo "$as_me:12188: result: $enableval" >&5
12189 echo "${ECHO_T}$enableval" >&6
12190
12191 if test "x$enable_echo" = xyes; then
12192         ECHO_LINK=
12193 else
12194         ECHO_LINK='@ echo linking $@ ... ;'
12195         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12196         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12197 fi
12198
12199 ###     use option --enable-warnings to turn on all gcc warnings
12200 echo "$as_me:12200: checking if you want to see compiler warnings" >&5
12201 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12202
12203 # Check whether --enable-warnings or --disable-warnings was given.
12204 if test "${enable_warnings+set}" = set; then
12205   enableval="$enable_warnings"
12206   with_warnings=$enableval
12207 fi;
12208 echo "$as_me:12208: result: $with_warnings" >&5
12209 echo "${ECHO_T}$with_warnings" >&6
12210
12211 if test "x$with_warnings" = "xyes"; then
12212
12213         ADAFLAGS="$ADAFLAGS -gnatg"
12214
12215 INTEL_COMPILER=no
12216
12217 if test "$GCC" = yes ; then
12218         case $host_os in
12219         linux*|gnu*)
12220                 echo "$as_me:12220: checking if this is really Intel C compiler" >&5
12221 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12222                 cf_save_CFLAGS="$CFLAGS"
12223                 CFLAGS="$CFLAGS -no-gcc"
12224                 cat >conftest.$ac_ext <<_ACEOF
12225 #line 12225 "configure"
12226 #include "confdefs.h"
12227
12228 int
12229 main ()
12230 {
12231
12232 #ifdef __INTEL_COMPILER
12233 #else
12234 make an error
12235 #endif
12236
12237   ;
12238   return 0;
12239 }
12240 _ACEOF
12241 rm -f conftest.$ac_objext
12242 if { (eval echo "$as_me:12242: \"$ac_compile\"") >&5
12243   (eval $ac_compile) 2>&5
12244   ac_status=$?
12245   echo "$as_me:12245: \$? = $ac_status" >&5
12246   (exit $ac_status); } &&
12247          { ac_try='test -s conftest.$ac_objext'
12248   { (eval echo "$as_me:12248: \"$ac_try\"") >&5
12249   (eval $ac_try) 2>&5
12250   ac_status=$?
12251   echo "$as_me:12251: \$? = $ac_status" >&5
12252   (exit $ac_status); }; }; then
12253   INTEL_COMPILER=yes
12254 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12255
12256 else
12257   echo "$as_me: failed program was:" >&5
12258 cat conftest.$ac_ext >&5
12259 fi
12260 rm -f conftest.$ac_objext conftest.$ac_ext
12261                 CFLAGS="$cf_save_CFLAGS"
12262                 echo "$as_me:12262: result: $INTEL_COMPILER" >&5
12263 echo "${ECHO_T}$INTEL_COMPILER" >&6
12264                 ;;
12265         esac
12266 fi
12267
12268 CLANG_COMPILER=no
12269
12270 if test "$GCC" = yes ; then
12271         echo "$as_me:12271: checking if this is really Clang C compiler" >&5
12272 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12273         cf_save_CFLAGS="$CFLAGS"
12274         CFLAGS="$CFLAGS -Qunused-arguments"
12275         cat >conftest.$ac_ext <<_ACEOF
12276 #line 12276 "configure"
12277 #include "confdefs.h"
12278
12279 int
12280 main ()
12281 {
12282
12283 #ifdef __clang__
12284 #else
12285 make an error
12286 #endif
12287
12288   ;
12289   return 0;
12290 }
12291 _ACEOF
12292 rm -f conftest.$ac_objext
12293 if { (eval echo "$as_me:12293: \"$ac_compile\"") >&5
12294   (eval $ac_compile) 2>&5
12295   ac_status=$?
12296   echo "$as_me:12296: \$? = $ac_status" >&5
12297   (exit $ac_status); } &&
12298          { ac_try='test -s conftest.$ac_objext'
12299   { (eval echo "$as_me:12299: \"$ac_try\"") >&5
12300   (eval $ac_try) 2>&5
12301   ac_status=$?
12302   echo "$as_me:12302: \$? = $ac_status" >&5
12303   (exit $ac_status); }; }; then
12304   CLANG_COMPILER=yes
12305 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12306
12307 else
12308   echo "$as_me: failed program was:" >&5
12309 cat conftest.$ac_ext >&5
12310 fi
12311 rm -f conftest.$ac_objext conftest.$ac_ext
12312         CFLAGS="$cf_save_CFLAGS"
12313         echo "$as_me:12313: result: $CLANG_COMPILER" >&5
12314 echo "${ECHO_T}$CLANG_COMPILER" >&6
12315 fi
12316
12317 cat > conftest.$ac_ext <<EOF
12318 #line 12318 "${as_me:-configure}"
12319 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12320 EOF
12321
12322 if test "$INTEL_COMPILER" = yes
12323 then
12324 # The "-wdXXX" options suppress warnings:
12325 # remark #1419: external declaration in primary source file
12326 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12327 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12328 # remark #193: zero used for undefined preprocessing identifier
12329 # remark #593: variable "curs_sb_left_arrow" was set but never used
12330 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12331 # remark #869: parameter "tw" was never referenced
12332 # remark #981: operands are evaluated in unspecified order
12333 # warning #279: controlling expression is constant
12334
12335         { echo "$as_me:12335: checking for $CC warning options..." >&5
12336 echo "$as_me: checking for $CC warning options..." >&6;}
12337         cf_save_CFLAGS="$CFLAGS"
12338         EXTRA_CFLAGS="-Wall"
12339         for cf_opt in \
12340                 wd1419 \
12341                 wd1683 \
12342                 wd1684 \
12343                 wd193 \
12344                 wd593 \
12345                 wd279 \
12346                 wd810 \
12347                 wd869 \
12348                 wd981
12349         do
12350                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12351                 if { (eval echo "$as_me:12351: \"$ac_compile\"") >&5
12352   (eval $ac_compile) 2>&5
12353   ac_status=$?
12354   echo "$as_me:12354: \$? = $ac_status" >&5
12355   (exit $ac_status); }; then
12356                         test -n "$verbose" && echo "$as_me:12356: result: ... -$cf_opt" >&5
12357 echo "${ECHO_T}... -$cf_opt" >&6
12358                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12359                 fi
12360         done
12361         CFLAGS="$cf_save_CFLAGS"
12362
12363 elif test "$GCC" = yes
12364 then
12365         { echo "$as_me:12365: checking for $CC warning options..." >&5
12366 echo "$as_me: checking for $CC warning options..." >&6;}
12367         cf_save_CFLAGS="$CFLAGS"
12368         EXTRA_CFLAGS=
12369         cf_warn_CONST=""
12370         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12371         for cf_opt in W Wall \
12372                 Wbad-function-cast \
12373                 Wcast-align \
12374                 Wcast-qual \
12375                 Winline \
12376                 Wmissing-declarations \
12377                 Wmissing-prototypes \
12378                 Wnested-externs \
12379                 Wpointer-arith \
12380                 Wshadow \
12381                 Wstrict-prototypes \
12382                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12383         do
12384                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12385                 if { (eval echo "$as_me:12385: \"$ac_compile\"") >&5
12386   (eval $ac_compile) 2>&5
12387   ac_status=$?
12388   echo "$as_me:12388: \$? = $ac_status" >&5
12389   (exit $ac_status); }; then
12390                         test -n "$verbose" && echo "$as_me:12390: result: ... -$cf_opt" >&5
12391 echo "${ECHO_T}... -$cf_opt" >&6
12392                         case $cf_opt in #(vi
12393                         Wcast-qual) #(vi
12394                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12395                                 ;;
12396                         Winline) #(vi
12397                                 case $GCC_VERSION in
12398                                 [34].*)
12399                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12400
12401 echo "${as_me:-configure}:12401: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12402
12403                                         continue;;
12404                                 esac
12405                                 ;;
12406                         Wpointer-arith) #(vi
12407                                 case $GCC_VERSION in
12408                                 [12].*)
12409                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12410
12411 echo "${as_me:-configure}:12411: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12412
12413                                         continue;;
12414                                 esac
12415                                 ;;
12416                         esac
12417                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12418                 fi
12419         done
12420         CFLAGS="$cf_save_CFLAGS"
12421 fi
12422 rm -rf conftest*
12423
12424         if test "x$cf_with_cxx" = xyes ; then
12425
12426 INTEL_CPLUSPLUS=no
12427
12428 if test "$GCC" = yes ; then
12429         case $host_os in
12430         linux*|gnu*)
12431                 echo "$as_me:12431: checking if this is really Intel C++ compiler" >&5
12432 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12433                 cf_save_CFLAGS="$CXXFLAGS"
12434                 CXXFLAGS="$CXXFLAGS -no-gcc"
12435                 cat >conftest.$ac_ext <<_ACEOF
12436 #line 12436 "configure"
12437 #include "confdefs.h"
12438
12439 int
12440 main ()
12441 {
12442
12443 #ifdef __INTEL_COMPILER
12444 #else
12445 make an error
12446 #endif
12447
12448   ;
12449   return 0;
12450 }
12451 _ACEOF
12452 rm -f conftest.$ac_objext
12453 if { (eval echo "$as_me:12453: \"$ac_compile\"") >&5
12454   (eval $ac_compile) 2>&5
12455   ac_status=$?
12456   echo "$as_me:12456: \$? = $ac_status" >&5
12457   (exit $ac_status); } &&
12458          { ac_try='test -s conftest.$ac_objext'
12459   { (eval echo "$as_me:12459: \"$ac_try\"") >&5
12460   (eval $ac_try) 2>&5
12461   ac_status=$?
12462   echo "$as_me:12462: \$? = $ac_status" >&5
12463   (exit $ac_status); }; }; then
12464   INTEL_CPLUSPLUS=yes
12465 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12466
12467 else
12468   echo "$as_me: failed program was:" >&5
12469 cat conftest.$ac_ext >&5
12470 fi
12471 rm -f conftest.$ac_objext conftest.$ac_ext
12472                 CXXFLAGS="$cf_save_CFLAGS"
12473                 echo "$as_me:12473: result: $INTEL_CPLUSPLUS" >&5
12474 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12475                 ;;
12476         esac
12477 fi
12478
12479 CLANG_CPLUSPLUS=no
12480
12481 if test "$GCC" = yes ; then
12482         echo "$as_me:12482: checking if this is really Clang C++ compiler" >&5
12483 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12484         cf_save_CFLAGS="$CXXFLAGS"
12485         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12486         cat >conftest.$ac_ext <<_ACEOF
12487 #line 12487 "configure"
12488 #include "confdefs.h"
12489
12490 int
12491 main ()
12492 {
12493
12494 #ifdef __clang__
12495 #else
12496 make an error
12497 #endif
12498
12499   ;
12500   return 0;
12501 }
12502 _ACEOF
12503 rm -f conftest.$ac_objext
12504 if { (eval echo "$as_me:12504: \"$ac_compile\"") >&5
12505   (eval $ac_compile) 2>&5
12506   ac_status=$?
12507   echo "$as_me:12507: \$? = $ac_status" >&5
12508   (exit $ac_status); } &&
12509          { ac_try='test -s conftest.$ac_objext'
12510   { (eval echo "$as_me:12510: \"$ac_try\"") >&5
12511   (eval $ac_try) 2>&5
12512   ac_status=$?
12513   echo "$as_me:12513: \$? = $ac_status" >&5
12514   (exit $ac_status); }; }; then
12515   CLANG_CPLUSPLUS=yes
12516 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12517
12518 else
12519   echo "$as_me: failed program was:" >&5
12520 cat conftest.$ac_ext >&5
12521 fi
12522 rm -f conftest.$ac_objext conftest.$ac_ext
12523         CXXFLAGS="$cf_save_CFLAGS"
12524         echo "$as_me:12524: result: $CLANG_CPLUSPLUS" >&5
12525 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12526 fi
12527
12528 ac_ext=cc
12529 ac_cpp='$CXXCPP $CPPFLAGS'
12530 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12531 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12532 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12533 ac_main_return=return
12534
12535 cat > conftest.$ac_ext <<EOF
12536 #line 12536 "configure"
12537 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12538 EOF
12539
12540 if test "$INTEL_CPLUSPLUS" = yes
12541 then
12542 # The "-wdXXX" options suppress warnings:
12543 # remark #1419: external declaration in primary source file
12544 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12545 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12546 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12547 # remark #193: zero used for undefined preprocessing identifier
12548 # remark #593: variable "curs_sb_left_arrow" was set but never used
12549 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12550 # remark #869: parameter "tw" was never referenced
12551 # remark #981: operands are evaluated in unspecified order
12552 # warning #269: invalid format string conversion
12553
12554         { echo "$as_me:12554: checking for $CC warning options..." >&5
12555 echo "$as_me: checking for $CC warning options..." >&6;}
12556         cf_save_CXXFLAGS="$CXXFLAGS"
12557         EXTRA_CXXFLAGS="-Wall"
12558         for cf_opt in \
12559                 wd1419 \
12560                 wd1682 \
12561                 wd1683 \
12562                 wd1684 \
12563                 wd193 \
12564                 wd279 \
12565                 wd593 \
12566                 wd810 \
12567                 wd869 \
12568                 wd981
12569         do
12570                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12571                 if { (eval echo "$as_me:12571: \"$ac_compile\"") >&5
12572   (eval $ac_compile) 2>&5
12573   ac_status=$?
12574   echo "$as_me:12574: \$? = $ac_status" >&5
12575   (exit $ac_status); }; then
12576                         test -n "$verbose" && echo "$as_me:12576: result: ... -$cf_opt" >&5
12577 echo "${ECHO_T}... -$cf_opt" >&6
12578                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12579                 fi
12580         done
12581         CXXFLAGS="$cf_save_CXXFLAGS"
12582
12583 elif test "$GXX" = yes
12584 then
12585         { echo "$as_me:12585: checking for $CXX warning options..." >&5
12586 echo "$as_me: checking for $CXX warning options..." >&6;}
12587         cf_save_CXXFLAGS="$CXXFLAGS"
12588         EXTRA_CXXFLAGS="-W -Wall"
12589         cf_gxx_extra_warnings=""
12590         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12591         case "$GCC_VERSION" in
12592         [1-2].*)
12593                 ;;
12594         *)
12595                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12596                 ;;
12597         esac
12598         for cf_opt in \
12599                 Wabi \
12600                 fabi-version=0 \
12601                 Woverloaded-virtual \
12602                 Wsign-promo \
12603                 Wsynth \
12604                 Wold-style-cast \
12605                 Wcast-align \
12606                 Wcast-qual \
12607                 Wmissing-prototypes \
12608                 Wpointer-arith \
12609                 Wshadow \
12610                 Wstrict-prototypes \
12611                 Wundef $cf_gxx_extra_warnings Wno-unused
12612         do
12613                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12614                 if { (eval echo "$as_me:12614: \"$ac_compile\"") >&5
12615   (eval $ac_compile) 2>&5
12616   ac_status=$?
12617   echo "$as_me:12617: \$? = $ac_status" >&5
12618   (exit $ac_status); }; then
12619                         test -n "$verbose" && echo "$as_me:12619: result: ... -$cf_opt" >&5
12620 echo "${ECHO_T}... -$cf_opt" >&6
12621                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12622                 else
12623                         test -n "$verbose" && echo "$as_me:12623: result: ... no -$cf_opt" >&5
12624 echo "${ECHO_T}... no -$cf_opt" >&6
12625                 fi
12626         done
12627         CXXFLAGS="$cf_save_CXXFLAGS"
12628 fi
12629
12630 rm -rf conftest*
12631 ac_ext=c
12632 ac_cpp='$CPP $CPPFLAGS'
12633 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12634 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12635 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12636 ac_main_return=return
12637
12638         fi
12639 fi
12640
12641 if test "$GCC" = yes
12642 then
12643 cat > conftest.i <<EOF
12644 #ifndef GCC_PRINTF
12645 #define GCC_PRINTF 0
12646 #endif
12647 #ifndef GCC_SCANF
12648 #define GCC_SCANF 0
12649 #endif
12650 #ifndef GCC_NORETURN
12651 #define GCC_NORETURN /* nothing */
12652 #endif
12653 #ifndef GCC_UNUSED
12654 #define GCC_UNUSED /* nothing */
12655 #endif
12656 EOF
12657 if test "$GCC" = yes
12658 then
12659         { echo "$as_me:12659: checking for $CC __attribute__ directives..." >&5
12660 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12661 cat > conftest.$ac_ext <<EOF
12662 #line 12662 "${as_me:-configure}"
12663 #include "confdefs.h"
12664 #include "conftest.h"
12665 #include "conftest.i"
12666 #if     GCC_PRINTF
12667 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12668 #else
12669 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12670 #endif
12671 #if     GCC_SCANF
12672 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12673 #else
12674 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12675 #endif
12676 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12677 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12678 extern void foo(void) GCC_NORETURN;
12679 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12680 EOF
12681         cf_printf_attribute=no
12682         cf_scanf_attribute=no
12683         for cf_attribute in scanf printf unused noreturn
12684         do
12685
12686 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12687
12688                 cf_directive="__attribute__(($cf_attribute))"
12689                 echo "checking for $CC $cf_directive" 1>&5
12690
12691                 case $cf_attribute in #(vi
12692                 printf) #(vi
12693                         cf_printf_attribute=yes
12694                         cat >conftest.h <<EOF
12695 #define GCC_$cf_ATTRIBUTE 1
12696 EOF
12697                         ;;
12698                 scanf) #(vi
12699                         cf_scanf_attribute=yes
12700                         cat >conftest.h <<EOF
12701 #define GCC_$cf_ATTRIBUTE 1
12702 EOF
12703                         ;;
12704                 *) #(vi
12705                         cat >conftest.h <<EOF
12706 #define GCC_$cf_ATTRIBUTE $cf_directive
12707 EOF
12708                         ;;
12709                 esac
12710
12711                 if { (eval echo "$as_me:12711: \"$ac_compile\"") >&5
12712   (eval $ac_compile) 2>&5
12713   ac_status=$?
12714   echo "$as_me:12714: \$? = $ac_status" >&5
12715   (exit $ac_status); }; then
12716                         test -n "$verbose" && echo "$as_me:12716: result: ... $cf_attribute" >&5
12717 echo "${ECHO_T}... $cf_attribute" >&6
12718                         cat conftest.h >>confdefs.h
12719                         case $cf_attribute in #(vi
12720                         noreturn) #(vi
12721
12722 cat >>confdefs.h <<EOF
12723 #define GCC_NORETURN $cf_directive
12724 EOF
12725
12726                                 ;;
12727                         printf) #(vi
12728                                 cf_value='/* nothing */'
12729                                 if test "$cf_printf_attribute" != no ; then
12730                                         cf_value='__attribute__((format(printf,fmt,var)))'
12731
12732 cat >>confdefs.h <<\EOF
12733 #define GCC_PRINTF 1
12734 EOF
12735
12736                                 fi
12737
12738 cat >>confdefs.h <<EOF
12739 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12740 EOF
12741
12742                                 ;;
12743                         scanf) #(vi
12744                                 cf_value='/* nothing */'
12745                                 if test "$cf_scanf_attribute" != no ; then
12746                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12747
12748 cat >>confdefs.h <<\EOF
12749 #define GCC_SCANF 1
12750 EOF
12751
12752                                 fi
12753
12754 cat >>confdefs.h <<EOF
12755 #define GCC_SCANFLIKE(fmt,var) $cf_value
12756 EOF
12757
12758                                 ;;
12759                         unused) #(vi
12760
12761 cat >>confdefs.h <<EOF
12762 #define GCC_UNUSED $cf_directive
12763 EOF
12764
12765                                 ;;
12766                         esac
12767                 fi
12768         done
12769 else
12770         fgrep define conftest.i >>confdefs.h
12771 fi
12772 rm -rf conftest*
12773 fi
12774
12775 echo "$as_me:12775: checking if you want to work around bogus compiler/loader warnings" >&5
12776 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12777
12778 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12779 if test "${enable_string_hacks+set}" = set; then
12780   enableval="$enable_string_hacks"
12781   with_string_hacks=$enableval
12782 else
12783   with_string_hacks=no
12784 fi;
12785 echo "$as_me:12785: result: $with_string_hacks" >&5
12786 echo "${ECHO_T}$with_string_hacks" >&6
12787
12788 if test "x$with_string_hacks" = "xyes"; then
12789
12790 cat >>confdefs.h <<\EOF
12791 #define USE_STRING_HACKS 1
12792 EOF
12793
12794         { echo "$as_me:12794: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12795 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12796
12797 for ac_func in strlcat strlcpy snprintf
12798 do
12799 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12800 echo "$as_me:12800: checking for $ac_func" >&5
12801 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12802 if eval "test \"\${$as_ac_var+set}\" = set"; then
12803   echo $ECHO_N "(cached) $ECHO_C" >&6
12804 else
12805   cat >conftest.$ac_ext <<_ACEOF
12806 #line 12806 "configure"
12807 #include "confdefs.h"
12808 /* System header to define __stub macros and hopefully few prototypes,
12809     which can conflict with char $ac_func (); below.  */
12810 #include <assert.h>
12811 /* Override any gcc2 internal prototype to avoid an error.  */
12812 #ifdef __cplusplus
12813 extern "C"
12814 #endif
12815 /* We use char because int might match the return type of a gcc2
12816    builtin and then its argument prototype would still apply.  */
12817 char $ac_func ();
12818 char (*f) ();
12819
12820 int
12821 main ()
12822 {
12823 /* The GNU C library defines this for functions which it implements
12824     to always fail with ENOSYS.  Some functions are actually named
12825     something starting with __ and the normal name is an alias.  */
12826 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12827 choke me
12828 #else
12829 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12830 #endif
12831
12832   ;
12833   return 0;
12834 }
12835 _ACEOF
12836 rm -f conftest.$ac_objext conftest$ac_exeext
12837 if { (eval echo "$as_me:12837: \"$ac_link\"") >&5
12838   (eval $ac_link) 2>&5
12839   ac_status=$?
12840   echo "$as_me:12840: \$? = $ac_status" >&5
12841   (exit $ac_status); } &&
12842          { ac_try='test -s conftest$ac_exeext'
12843   { (eval echo "$as_me:12843: \"$ac_try\"") >&5
12844   (eval $ac_try) 2>&5
12845   ac_status=$?
12846   echo "$as_me:12846: \$? = $ac_status" >&5
12847   (exit $ac_status); }; }; then
12848   eval "$as_ac_var=yes"
12849 else
12850   echo "$as_me: failed program was:" >&5
12851 cat conftest.$ac_ext >&5
12852 eval "$as_ac_var=no"
12853 fi
12854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12855 fi
12856 echo "$as_me:12856: result: `eval echo '${'$as_ac_var'}'`" >&5
12857 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12858 if test `eval echo '${'$as_ac_var'}'` = yes; then
12859   cat >>confdefs.h <<EOF
12860 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12861 EOF
12862
12863 fi
12864 done
12865
12866 fi
12867
12868 ###     use option --enable-assertions to turn on generation of assertion code
12869 echo "$as_me:12869: checking if you want to enable runtime assertions" >&5
12870 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12871
12872 # Check whether --enable-assertions or --disable-assertions was given.
12873 if test "${enable_assertions+set}" = set; then
12874   enableval="$enable_assertions"
12875   with_assertions=$enableval
12876 else
12877   with_assertions=no
12878 fi;
12879 echo "$as_me:12879: result: $with_assertions" >&5
12880 echo "${ECHO_T}$with_assertions" >&6
12881 if test -n "$GCC"
12882 then
12883         if test "$with_assertions" = no
12884         then
12885                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12886         else
12887
12888         ADAFLAGS="$ADAFLAGS -gnata"
12889
12890         fi
12891 fi
12892
12893 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12894
12895 echo "$as_me:12895: checking if you want to use dmalloc for testing" >&5
12896 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12897
12898 # Check whether --with-dmalloc or --without-dmalloc was given.
12899 if test "${with_dmalloc+set}" = set; then
12900   withval="$with_dmalloc"
12901
12902 cat >>confdefs.h <<EOF
12903 #define USE_DMALLOC 1
12904 EOF
12905
12906         : ${with_cflags:=-g}
12907         : ${with_no_leaks:=yes}
12908          with_dmalloc=yes
12909 else
12910   with_dmalloc=
12911 fi;
12912 echo "$as_me:12912: result: ${with_dmalloc:-no}" >&5
12913 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12914
12915 case .$with_cflags in #(vi
12916 .*-g*)
12917         case .$CFLAGS in #(vi
12918         .*-g*) #(vi
12919                 ;;
12920         *)
12921
12922 cf_fix_cppflags=no
12923 cf_new_cflags=
12924 cf_new_cppflags=
12925 cf_new_extra_cppflags=
12926
12927 for cf_add_cflags in -g
12928 do
12929 case $cf_fix_cppflags in
12930 no)
12931         case $cf_add_cflags in #(vi
12932         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12933                 case $cf_add_cflags in
12934                 -D*)
12935                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12936
12937                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12938                                 && test -z "${cf_tst_cflags}" \
12939                                 && cf_fix_cppflags=yes
12940
12941                         if test $cf_fix_cppflags = yes ; then
12942                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12943                                 continue
12944                         elif test "${cf_tst_cflags}" = "\"'" ; then
12945                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12946                                 continue
12947                         fi
12948                         ;;
12949                 esac
12950                 case "$CPPFLAGS" in
12951                 *$cf_add_cflags) #(vi
12952                         ;;
12953                 *) #(vi
12954                         case $cf_add_cflags in #(vi
12955                         -D*)
12956                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12957
12958 CPPFLAGS=`echo "$CPPFLAGS" | \
12959         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12960                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12961
12962                                 ;;
12963                         esac
12964                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12965                         ;;
12966                 esac
12967                 ;;
12968         *)
12969                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12970                 ;;
12971         esac
12972         ;;
12973 yes)
12974         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12975
12976         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12977
12978         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12979                 && test -z "${cf_tst_cflags}" \
12980                 && cf_fix_cppflags=no
12981         ;;
12982 esac
12983 done
12984
12985 if test -n "$cf_new_cflags" ; then
12986
12987         CFLAGS="$CFLAGS $cf_new_cflags"
12988 fi
12989
12990 if test -n "$cf_new_cppflags" ; then
12991
12992         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12993 fi
12994
12995 if test -n "$cf_new_extra_cppflags" ; then
12996
12997         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12998 fi
12999
13000                 ;;
13001         esac
13002         ;;
13003 esac
13004
13005 if test "$with_dmalloc" = yes ; then
13006         echo "$as_me:13006: checking for dmalloc.h" >&5
13007 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13008 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13009   echo $ECHO_N "(cached) $ECHO_C" >&6
13010 else
13011   cat >conftest.$ac_ext <<_ACEOF
13012 #line 13012 "configure"
13013 #include "confdefs.h"
13014 #include <dmalloc.h>
13015 _ACEOF
13016 if { (eval echo "$as_me:13016: \"$ac_cpp conftest.$ac_ext\"") >&5
13017   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13018   ac_status=$?
13019   egrep -v '^ *\+' conftest.er1 >conftest.err
13020   rm -f conftest.er1
13021   cat conftest.err >&5
13022   echo "$as_me:13022: \$? = $ac_status" >&5
13023   (exit $ac_status); } >/dev/null; then
13024   if test -s conftest.err; then
13025     ac_cpp_err=$ac_c_preproc_warn_flag
13026   else
13027     ac_cpp_err=
13028   fi
13029 else
13030   ac_cpp_err=yes
13031 fi
13032 if test -z "$ac_cpp_err"; then
13033   ac_cv_header_dmalloc_h=yes
13034 else
13035   echo "$as_me: failed program was:" >&5
13036   cat conftest.$ac_ext >&5
13037   ac_cv_header_dmalloc_h=no
13038 fi
13039 rm -f conftest.err conftest.$ac_ext
13040 fi
13041 echo "$as_me:13041: result: $ac_cv_header_dmalloc_h" >&5
13042 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13043 if test $ac_cv_header_dmalloc_h = yes; then
13044
13045 echo "$as_me:13045: checking for dmalloc_debug in -ldmalloc" >&5
13046 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13047 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13048   echo $ECHO_N "(cached) $ECHO_C" >&6
13049 else
13050   ac_check_lib_save_LIBS=$LIBS
13051 LIBS="-ldmalloc  $LIBS"
13052 cat >conftest.$ac_ext <<_ACEOF
13053 #line 13053 "configure"
13054 #include "confdefs.h"
13055
13056 /* Override any gcc2 internal prototype to avoid an error.  */
13057 #ifdef __cplusplus
13058 extern "C"
13059 #endif
13060 /* We use char because int might match the return type of a gcc2
13061    builtin and then its argument prototype would still apply.  */
13062 char dmalloc_debug ();
13063 int
13064 main ()
13065 {
13066 dmalloc_debug ();
13067   ;
13068   return 0;
13069 }
13070 _ACEOF
13071 rm -f conftest.$ac_objext conftest$ac_exeext
13072 if { (eval echo "$as_me:13072: \"$ac_link\"") >&5
13073   (eval $ac_link) 2>&5
13074   ac_status=$?
13075   echo "$as_me:13075: \$? = $ac_status" >&5
13076   (exit $ac_status); } &&
13077          { ac_try='test -s conftest$ac_exeext'
13078   { (eval echo "$as_me:13078: \"$ac_try\"") >&5
13079   (eval $ac_try) 2>&5
13080   ac_status=$?
13081   echo "$as_me:13081: \$? = $ac_status" >&5
13082   (exit $ac_status); }; }; then
13083   ac_cv_lib_dmalloc_dmalloc_debug=yes
13084 else
13085   echo "$as_me: failed program was:" >&5
13086 cat conftest.$ac_ext >&5
13087 ac_cv_lib_dmalloc_dmalloc_debug=no
13088 fi
13089 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13090 LIBS=$ac_check_lib_save_LIBS
13091 fi
13092 echo "$as_me:13092: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13093 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13094 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13095   cat >>confdefs.h <<EOF
13096 #define HAVE_LIBDMALLOC 1
13097 EOF
13098
13099   LIBS="-ldmalloc $LIBS"
13100
13101 fi
13102
13103 fi
13104
13105 fi
13106
13107 echo "$as_me:13107: checking if you want to use dbmalloc for testing" >&5
13108 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13109
13110 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13111 if test "${with_dbmalloc+set}" = set; then
13112   withval="$with_dbmalloc"
13113
13114 cat >>confdefs.h <<EOF
13115 #define USE_DBMALLOC 1
13116 EOF
13117
13118         : ${with_cflags:=-g}
13119         : ${with_no_leaks:=yes}
13120          with_dbmalloc=yes
13121 else
13122   with_dbmalloc=
13123 fi;
13124 echo "$as_me:13124: result: ${with_dbmalloc:-no}" >&5
13125 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13126
13127 case .$with_cflags in #(vi
13128 .*-g*)
13129         case .$CFLAGS in #(vi
13130         .*-g*) #(vi
13131                 ;;
13132         *)
13133
13134 cf_fix_cppflags=no
13135 cf_new_cflags=
13136 cf_new_cppflags=
13137 cf_new_extra_cppflags=
13138
13139 for cf_add_cflags in -g
13140 do
13141 case $cf_fix_cppflags in
13142 no)
13143         case $cf_add_cflags in #(vi
13144         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13145                 case $cf_add_cflags in
13146                 -D*)
13147                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13148
13149                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13150                                 && test -z "${cf_tst_cflags}" \
13151                                 && cf_fix_cppflags=yes
13152
13153                         if test $cf_fix_cppflags = yes ; then
13154                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13155                                 continue
13156                         elif test "${cf_tst_cflags}" = "\"'" ; then
13157                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13158                                 continue
13159                         fi
13160                         ;;
13161                 esac
13162                 case "$CPPFLAGS" in
13163                 *$cf_add_cflags) #(vi
13164                         ;;
13165                 *) #(vi
13166                         case $cf_add_cflags in #(vi
13167                         -D*)
13168                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13169
13170 CPPFLAGS=`echo "$CPPFLAGS" | \
13171         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13172                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13173
13174                                 ;;
13175                         esac
13176                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13177                         ;;
13178                 esac
13179                 ;;
13180         *)
13181                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13182                 ;;
13183         esac
13184         ;;
13185 yes)
13186         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13187
13188         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13189
13190         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13191                 && test -z "${cf_tst_cflags}" \
13192                 && cf_fix_cppflags=no
13193         ;;
13194 esac
13195 done
13196
13197 if test -n "$cf_new_cflags" ; then
13198
13199         CFLAGS="$CFLAGS $cf_new_cflags"
13200 fi
13201
13202 if test -n "$cf_new_cppflags" ; then
13203
13204         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13205 fi
13206
13207 if test -n "$cf_new_extra_cppflags" ; then
13208
13209         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13210 fi
13211
13212                 ;;
13213         esac
13214         ;;
13215 esac
13216
13217 if test "$with_dbmalloc" = yes ; then
13218         echo "$as_me:13218: checking for dbmalloc.h" >&5
13219 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13220 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13221   echo $ECHO_N "(cached) $ECHO_C" >&6
13222 else
13223   cat >conftest.$ac_ext <<_ACEOF
13224 #line 13224 "configure"
13225 #include "confdefs.h"
13226 #include <dbmalloc.h>
13227 _ACEOF
13228 if { (eval echo "$as_me:13228: \"$ac_cpp conftest.$ac_ext\"") >&5
13229   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13230   ac_status=$?
13231   egrep -v '^ *\+' conftest.er1 >conftest.err
13232   rm -f conftest.er1
13233   cat conftest.err >&5
13234   echo "$as_me:13234: \$? = $ac_status" >&5
13235   (exit $ac_status); } >/dev/null; then
13236   if test -s conftest.err; then
13237     ac_cpp_err=$ac_c_preproc_warn_flag
13238   else
13239     ac_cpp_err=
13240   fi
13241 else
13242   ac_cpp_err=yes
13243 fi
13244 if test -z "$ac_cpp_err"; then
13245   ac_cv_header_dbmalloc_h=yes
13246 else
13247   echo "$as_me: failed program was:" >&5
13248   cat conftest.$ac_ext >&5
13249   ac_cv_header_dbmalloc_h=no
13250 fi
13251 rm -f conftest.err conftest.$ac_ext
13252 fi
13253 echo "$as_me:13253: result: $ac_cv_header_dbmalloc_h" >&5
13254 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13255 if test $ac_cv_header_dbmalloc_h = yes; then
13256
13257 echo "$as_me:13257: checking for debug_malloc in -ldbmalloc" >&5
13258 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13259 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13260   echo $ECHO_N "(cached) $ECHO_C" >&6
13261 else
13262   ac_check_lib_save_LIBS=$LIBS
13263 LIBS="-ldbmalloc  $LIBS"
13264 cat >conftest.$ac_ext <<_ACEOF
13265 #line 13265 "configure"
13266 #include "confdefs.h"
13267
13268 /* Override any gcc2 internal prototype to avoid an error.  */
13269 #ifdef __cplusplus
13270 extern "C"
13271 #endif
13272 /* We use char because int might match the return type of a gcc2
13273    builtin and then its argument prototype would still apply.  */
13274 char debug_malloc ();
13275 int
13276 main ()
13277 {
13278 debug_malloc ();
13279   ;
13280   return 0;
13281 }
13282 _ACEOF
13283 rm -f conftest.$ac_objext conftest$ac_exeext
13284 if { (eval echo "$as_me:13284: \"$ac_link\"") >&5
13285   (eval $ac_link) 2>&5
13286   ac_status=$?
13287   echo "$as_me:13287: \$? = $ac_status" >&5
13288   (exit $ac_status); } &&
13289          { ac_try='test -s conftest$ac_exeext'
13290   { (eval echo "$as_me:13290: \"$ac_try\"") >&5
13291   (eval $ac_try) 2>&5
13292   ac_status=$?
13293   echo "$as_me:13293: \$? = $ac_status" >&5
13294   (exit $ac_status); }; }; then
13295   ac_cv_lib_dbmalloc_debug_malloc=yes
13296 else
13297   echo "$as_me: failed program was:" >&5
13298 cat conftest.$ac_ext >&5
13299 ac_cv_lib_dbmalloc_debug_malloc=no
13300 fi
13301 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13302 LIBS=$ac_check_lib_save_LIBS
13303 fi
13304 echo "$as_me:13304: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13305 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13306 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13307   cat >>confdefs.h <<EOF
13308 #define HAVE_LIBDBMALLOC 1
13309 EOF
13310
13311   LIBS="-ldbmalloc $LIBS"
13312
13313 fi
13314
13315 fi
13316
13317 fi
13318
13319 echo "$as_me:13319: checking if you want to use valgrind for testing" >&5
13320 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13321
13322 # Check whether --with-valgrind or --without-valgrind was given.
13323 if test "${with_valgrind+set}" = set; then
13324   withval="$with_valgrind"
13325
13326 cat >>confdefs.h <<EOF
13327 #define USE_VALGRIND 1
13328 EOF
13329
13330         : ${with_cflags:=-g}
13331         : ${with_no_leaks:=yes}
13332          with_valgrind=yes
13333 else
13334   with_valgrind=
13335 fi;
13336 echo "$as_me:13336: result: ${with_valgrind:-no}" >&5
13337 echo "${ECHO_T}${with_valgrind:-no}" >&6
13338
13339 case .$with_cflags in #(vi
13340 .*-g*)
13341         case .$CFLAGS in #(vi
13342         .*-g*) #(vi
13343                 ;;
13344         *)
13345
13346 cf_fix_cppflags=no
13347 cf_new_cflags=
13348 cf_new_cppflags=
13349 cf_new_extra_cppflags=
13350
13351 for cf_add_cflags in -g
13352 do
13353 case $cf_fix_cppflags in
13354 no)
13355         case $cf_add_cflags in #(vi
13356         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13357                 case $cf_add_cflags in
13358                 -D*)
13359                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13360
13361                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13362                                 && test -z "${cf_tst_cflags}" \
13363                                 && cf_fix_cppflags=yes
13364
13365                         if test $cf_fix_cppflags = yes ; then
13366                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13367                                 continue
13368                         elif test "${cf_tst_cflags}" = "\"'" ; then
13369                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13370                                 continue
13371                         fi
13372                         ;;
13373                 esac
13374                 case "$CPPFLAGS" in
13375                 *$cf_add_cflags) #(vi
13376                         ;;
13377                 *) #(vi
13378                         case $cf_add_cflags in #(vi
13379                         -D*)
13380                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13381
13382 CPPFLAGS=`echo "$CPPFLAGS" | \
13383         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13384                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13385
13386                                 ;;
13387                         esac
13388                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13389                         ;;
13390                 esac
13391                 ;;
13392         *)
13393                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13394                 ;;
13395         esac
13396         ;;
13397 yes)
13398         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13399
13400         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13401
13402         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13403                 && test -z "${cf_tst_cflags}" \
13404                 && cf_fix_cppflags=no
13405         ;;
13406 esac
13407 done
13408
13409 if test -n "$cf_new_cflags" ; then
13410
13411         CFLAGS="$CFLAGS $cf_new_cflags"
13412 fi
13413
13414 if test -n "$cf_new_cppflags" ; then
13415
13416         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13417 fi
13418
13419 if test -n "$cf_new_extra_cppflags" ; then
13420
13421         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13422 fi
13423
13424                 ;;
13425         esac
13426         ;;
13427 esac
13428
13429 echo "$as_me:13429: checking if you want to perform memory-leak testing" >&5
13430 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13431
13432 # Check whether --enable-leaks or --disable-leaks was given.
13433 if test "${enable_leaks+set}" = set; then
13434   enableval="$enable_leaks"
13435   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13436 else
13437   : ${with_no_leaks:=no}
13438 fi;
13439 echo "$as_me:13439: result: $with_no_leaks" >&5
13440 echo "${ECHO_T}$with_no_leaks" >&6
13441
13442 if test "$with_no_leaks" = yes ; then
13443
13444 cat >>confdefs.h <<\EOF
13445 #define NO_LEAKS 1
13446 EOF
13447
13448 cat >>confdefs.h <<\EOF
13449 #define YY_NO_LEAKS 1
13450 EOF
13451
13452 fi
13453
13454 cat >>confdefs.h <<\EOF
13455 #define HAVE_NC_ALLOC_H 1
13456 EOF
13457
13458 ###     use option --enable-expanded to generate certain macros as functions
13459
13460 # Check whether --enable-expanded or --disable-expanded was given.
13461 if test "${enable_expanded+set}" = set; then
13462   enableval="$enable_expanded"
13463   test "x$enableval" = xyes &&
13464 cat >>confdefs.h <<\EOF
13465 #define NCURSES_EXPANDED 1
13466 EOF
13467
13468 fi;
13469
13470 ###     use option --disable-macros to suppress macros in favor of functions
13471
13472 # Check whether --enable-macros or --disable-macros was given.
13473 if test "${enable_macros+set}" = set; then
13474   enableval="$enable_macros"
13475   test "$enableval" = no &&
13476 cat >>confdefs.h <<\EOF
13477 #define NCURSES_NOMACROS 1
13478 EOF
13479
13480 fi;
13481
13482 # Normally we only add trace() to the debug-library.  Allow this to be
13483 # extended to all models of the ncurses library:
13484 cf_all_traces=no
13485 case "$CFLAGS $CPPFLAGS" in
13486 *-DTRACE*)
13487         cf_all_traces=yes
13488         ;;
13489 esac
13490
13491 echo "$as_me:13491: checking whether to add trace feature to all models" >&5
13492 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13493
13494 # Check whether --with-trace or --without-trace was given.
13495 if test "${with_trace+set}" = set; then
13496   withval="$with_trace"
13497   cf_with_trace=$withval
13498 else
13499   cf_with_trace=$cf_all_traces
13500 fi;
13501 echo "$as_me:13501: result: $cf_with_trace" >&5
13502 echo "${ECHO_T}$cf_with_trace" >&6
13503
13504 if test "x$cf_with_trace" = xyes ; then
13505         LIB_TRACING=all
13506         ADA_TRACE=TRUE
13507
13508 cf_fix_cppflags=no
13509 cf_new_cflags=
13510 cf_new_cppflags=
13511 cf_new_extra_cppflags=
13512
13513 for cf_add_cflags in -DTRACE
13514 do
13515 case $cf_fix_cppflags in
13516 no)
13517         case $cf_add_cflags in #(vi
13518         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13519                 case $cf_add_cflags in
13520                 -D*)
13521                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13522
13523                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13524                                 && test -z "${cf_tst_cflags}" \
13525                                 && cf_fix_cppflags=yes
13526
13527                         if test $cf_fix_cppflags = yes ; then
13528                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13529                                 continue
13530                         elif test "${cf_tst_cflags}" = "\"'" ; then
13531                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13532                                 continue
13533                         fi
13534                         ;;
13535                 esac
13536                 case "$CPPFLAGS" in
13537                 *$cf_add_cflags) #(vi
13538                         ;;
13539                 *) #(vi
13540                         case $cf_add_cflags in #(vi
13541                         -D*)
13542                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13543
13544 CPPFLAGS=`echo "$CPPFLAGS" | \
13545         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13546                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13547
13548                                 ;;
13549                         esac
13550                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13551                         ;;
13552                 esac
13553                 ;;
13554         *)
13555                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13556                 ;;
13557         esac
13558         ;;
13559 yes)
13560         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13561
13562         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13563
13564         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13565                 && test -z "${cf_tst_cflags}" \
13566                 && cf_fix_cppflags=no
13567         ;;
13568 esac
13569 done
13570
13571 if test -n "$cf_new_cflags" ; then
13572
13573         CFLAGS="$CFLAGS $cf_new_cflags"
13574 fi
13575
13576 if test -n "$cf_new_cppflags" ; then
13577
13578         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13579 fi
13580
13581 if test -n "$cf_new_extra_cppflags" ; then
13582
13583         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13584 fi
13585
13586 else
13587         LIB_TRACING=DEBUG
13588         ADA_TRACE=FALSE
13589 fi
13590
13591 ###     Checks for libraries.
13592 case $cf_cv_system_name in #(vi
13593 *mingw32*) #(vi
13594         ;;
13595 *)
13596 echo "$as_me:13596: checking for gettimeofday" >&5
13597 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13598 if test "${ac_cv_func_gettimeofday+set}" = set; then
13599   echo $ECHO_N "(cached) $ECHO_C" >&6
13600 else
13601   cat >conftest.$ac_ext <<_ACEOF
13602 #line 13602 "configure"
13603 #include "confdefs.h"
13604 /* System header to define __stub macros and hopefully few prototypes,
13605     which can conflict with char gettimeofday (); below.  */
13606 #include <assert.h>
13607 /* Override any gcc2 internal prototype to avoid an error.  */
13608 #ifdef __cplusplus
13609 extern "C"
13610 #endif
13611 /* We use char because int might match the return type of a gcc2
13612    builtin and then its argument prototype would still apply.  */
13613 char gettimeofday ();
13614 char (*f) ();
13615
13616 int
13617 main ()
13618 {
13619 /* The GNU C library defines this for functions which it implements
13620     to always fail with ENOSYS.  Some functions are actually named
13621     something starting with __ and the normal name is an alias.  */
13622 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13623 choke me
13624 #else
13625 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13626 #endif
13627
13628   ;
13629   return 0;
13630 }
13631 _ACEOF
13632 rm -f conftest.$ac_objext conftest$ac_exeext
13633 if { (eval echo "$as_me:13633: \"$ac_link\"") >&5
13634   (eval $ac_link) 2>&5
13635   ac_status=$?
13636   echo "$as_me:13636: \$? = $ac_status" >&5
13637   (exit $ac_status); } &&
13638          { ac_try='test -s conftest$ac_exeext'
13639   { (eval echo "$as_me:13639: \"$ac_try\"") >&5
13640   (eval $ac_try) 2>&5
13641   ac_status=$?
13642   echo "$as_me:13642: \$? = $ac_status" >&5
13643   (exit $ac_status); }; }; then
13644   ac_cv_func_gettimeofday=yes
13645 else
13646   echo "$as_me: failed program was:" >&5
13647 cat conftest.$ac_ext >&5
13648 ac_cv_func_gettimeofday=no
13649 fi
13650 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13651 fi
13652 echo "$as_me:13652: result: $ac_cv_func_gettimeofday" >&5
13653 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13654 if test $ac_cv_func_gettimeofday = yes; then
13655
13656 cat >>confdefs.h <<\EOF
13657 #define HAVE_GETTIMEOFDAY 1
13658 EOF
13659
13660 else
13661
13662 echo "$as_me:13662: checking for gettimeofday in -lbsd" >&5
13663 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13664 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13665   echo $ECHO_N "(cached) $ECHO_C" >&6
13666 else
13667   ac_check_lib_save_LIBS=$LIBS
13668 LIBS="-lbsd  $LIBS"
13669 cat >conftest.$ac_ext <<_ACEOF
13670 #line 13670 "configure"
13671 #include "confdefs.h"
13672
13673 /* Override any gcc2 internal prototype to avoid an error.  */
13674 #ifdef __cplusplus
13675 extern "C"
13676 #endif
13677 /* We use char because int might match the return type of a gcc2
13678    builtin and then its argument prototype would still apply.  */
13679 char gettimeofday ();
13680 int
13681 main ()
13682 {
13683 gettimeofday ();
13684   ;
13685   return 0;
13686 }
13687 _ACEOF
13688 rm -f conftest.$ac_objext conftest$ac_exeext
13689 if { (eval echo "$as_me:13689: \"$ac_link\"") >&5
13690   (eval $ac_link) 2>&5
13691   ac_status=$?
13692   echo "$as_me:13692: \$? = $ac_status" >&5
13693   (exit $ac_status); } &&
13694          { ac_try='test -s conftest$ac_exeext'
13695   { (eval echo "$as_me:13695: \"$ac_try\"") >&5
13696   (eval $ac_try) 2>&5
13697   ac_status=$?
13698   echo "$as_me:13698: \$? = $ac_status" >&5
13699   (exit $ac_status); }; }; then
13700   ac_cv_lib_bsd_gettimeofday=yes
13701 else
13702   echo "$as_me: failed program was:" >&5
13703 cat conftest.$ac_ext >&5
13704 ac_cv_lib_bsd_gettimeofday=no
13705 fi
13706 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13707 LIBS=$ac_check_lib_save_LIBS
13708 fi
13709 echo "$as_me:13709: result: $ac_cv_lib_bsd_gettimeofday" >&5
13710 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13711 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13712
13713 cat >>confdefs.h <<\EOF
13714 #define HAVE_GETTIMEOFDAY 1
13715 EOF
13716
13717         LIBS="-lbsd $LIBS"
13718 fi
13719
13720 fi
13721         ;;
13722 esac
13723
13724 echo "$as_me:13724: checking if -lm needed for math functions" >&5
13725 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13726 if test "${cf_cv_need_libm+set}" = set; then
13727   echo $ECHO_N "(cached) $ECHO_C" >&6
13728 else
13729
13730         cat >conftest.$ac_ext <<_ACEOF
13731 #line 13731 "configure"
13732 #include "confdefs.h"
13733
13734         #include <stdio.h>
13735         #include <math.h>
13736
13737 int
13738 main ()
13739 {
13740 double x = rand(); printf("result = %g\n", pow(sin(x),x))
13741   ;
13742   return 0;
13743 }
13744 _ACEOF
13745 rm -f conftest.$ac_objext conftest$ac_exeext
13746 if { (eval echo "$as_me:13746: \"$ac_link\"") >&5
13747   (eval $ac_link) 2>&5
13748   ac_status=$?
13749   echo "$as_me:13749: \$? = $ac_status" >&5
13750   (exit $ac_status); } &&
13751          { ac_try='test -s conftest$ac_exeext'
13752   { (eval echo "$as_me:13752: \"$ac_try\"") >&5
13753   (eval $ac_try) 2>&5
13754   ac_status=$?
13755   echo "$as_me:13755: \$? = $ac_status" >&5
13756   (exit $ac_status); }; }; then
13757   cf_cv_need_libm=no
13758 else
13759   echo "$as_me: failed program was:" >&5
13760 cat conftest.$ac_ext >&5
13761 cf_cv_need_libm=yes
13762 fi
13763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13764 fi
13765 echo "$as_me:13765: result: $cf_cv_need_libm" >&5
13766 echo "${ECHO_T}$cf_cv_need_libm" >&6
13767 if test "$cf_cv_need_libm" = yes
13768 then
13769 MATH_LIB=-lm
13770 fi
13771
13772 ###     Checks for header files.
13773 echo "$as_me:13773: checking for ANSI C header files" >&5
13774 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13775 if test "${ac_cv_header_stdc+set}" = set; then
13776   echo $ECHO_N "(cached) $ECHO_C" >&6
13777 else
13778   cat >conftest.$ac_ext <<_ACEOF
13779 #line 13779 "configure"
13780 #include "confdefs.h"
13781 #include <stdlib.h>
13782 #include <stdarg.h>
13783 #include <string.h>
13784 #include <float.h>
13785
13786 _ACEOF
13787 if { (eval echo "$as_me:13787: \"$ac_cpp conftest.$ac_ext\"") >&5
13788   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13789   ac_status=$?
13790   egrep -v '^ *\+' conftest.er1 >conftest.err
13791   rm -f conftest.er1
13792   cat conftest.err >&5
13793   echo "$as_me:13793: \$? = $ac_status" >&5
13794   (exit $ac_status); } >/dev/null; then
13795   if test -s conftest.err; then
13796     ac_cpp_err=$ac_c_preproc_warn_flag
13797   else
13798     ac_cpp_err=
13799   fi
13800 else
13801   ac_cpp_err=yes
13802 fi
13803 if test -z "$ac_cpp_err"; then
13804   ac_cv_header_stdc=yes
13805 else
13806   echo "$as_me: failed program was:" >&5
13807   cat conftest.$ac_ext >&5
13808   ac_cv_header_stdc=no
13809 fi
13810 rm -f conftest.err conftest.$ac_ext
13811
13812 if test $ac_cv_header_stdc = yes; then
13813   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13814   cat >conftest.$ac_ext <<_ACEOF
13815 #line 13815 "configure"
13816 #include "confdefs.h"
13817 #include <string.h>
13818
13819 _ACEOF
13820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13821   egrep "memchr" >/dev/null 2>&1; then
13822   :
13823 else
13824   ac_cv_header_stdc=no
13825 fi
13826 rm -rf conftest*
13827
13828 fi
13829
13830 if test $ac_cv_header_stdc = yes; then
13831   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13832   cat >conftest.$ac_ext <<_ACEOF
13833 #line 13833 "configure"
13834 #include "confdefs.h"
13835 #include <stdlib.h>
13836
13837 _ACEOF
13838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13839   egrep "free" >/dev/null 2>&1; then
13840   :
13841 else
13842   ac_cv_header_stdc=no
13843 fi
13844 rm -rf conftest*
13845
13846 fi
13847
13848 if test $ac_cv_header_stdc = yes; then
13849   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13850   if test "$cross_compiling" = yes; then
13851   :
13852 else
13853   cat >conftest.$ac_ext <<_ACEOF
13854 #line 13854 "configure"
13855 #include "confdefs.h"
13856 #include <ctype.h>
13857 #if ((' ' & 0x0FF) == 0x020)
13858 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13859 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13860 #else
13861 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13862                      || ('j' <= (c) && (c) <= 'r') \
13863                      || ('s' <= (c) && (c) <= 'z'))
13864 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13865 #endif
13866
13867 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13868 int
13869 main ()
13870 {
13871   int i;
13872   for (i = 0; i < 256; i++)
13873     if (XOR (islower (i), ISLOWER (i))
13874         || toupper (i) != TOUPPER (i))
13875       $ac_main_return(2);
13876   $ac_main_return (0);
13877 }
13878 _ACEOF
13879 rm -f conftest$ac_exeext
13880 if { (eval echo "$as_me:13880: \"$ac_link\"") >&5
13881   (eval $ac_link) 2>&5
13882   ac_status=$?
13883   echo "$as_me:13883: \$? = $ac_status" >&5
13884   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13885   { (eval echo "$as_me:13885: \"$ac_try\"") >&5
13886   (eval $ac_try) 2>&5
13887   ac_status=$?
13888   echo "$as_me:13888: \$? = $ac_status" >&5
13889   (exit $ac_status); }; }; then
13890   :
13891 else
13892   echo "$as_me: program exited with status $ac_status" >&5
13893 echo "$as_me: failed program was:" >&5
13894 cat conftest.$ac_ext >&5
13895 ac_cv_header_stdc=no
13896 fi
13897 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13898 fi
13899 fi
13900 fi
13901 echo "$as_me:13901: result: $ac_cv_header_stdc" >&5
13902 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13903 if test $ac_cv_header_stdc = yes; then
13904
13905 cat >>confdefs.h <<\EOF
13906 #define STDC_HEADERS 1
13907 EOF
13908
13909 fi
13910
13911 ac_header_dirent=no
13912 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13913   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13914 echo "$as_me:13914: checking for $ac_hdr that defines DIR" >&5
13915 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13916 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13917   echo $ECHO_N "(cached) $ECHO_C" >&6
13918 else
13919   cat >conftest.$ac_ext <<_ACEOF
13920 #line 13920 "configure"
13921 #include "confdefs.h"
13922 #include <sys/types.h>
13923 #include <$ac_hdr>
13924
13925 int
13926 main ()
13927 {
13928 if ((DIR *) 0)
13929 return 0;
13930   ;
13931   return 0;
13932 }
13933 _ACEOF
13934 rm -f conftest.$ac_objext
13935 if { (eval echo "$as_me:13935: \"$ac_compile\"") >&5
13936   (eval $ac_compile) 2>&5
13937   ac_status=$?
13938   echo "$as_me:13938: \$? = $ac_status" >&5
13939   (exit $ac_status); } &&
13940          { ac_try='test -s conftest.$ac_objext'
13941   { (eval echo "$as_me:13941: \"$ac_try\"") >&5
13942   (eval $ac_try) 2>&5
13943   ac_status=$?
13944   echo "$as_me:13944: \$? = $ac_status" >&5
13945   (exit $ac_status); }; }; then
13946   eval "$as_ac_Header=yes"
13947 else
13948   echo "$as_me: failed program was:" >&5
13949 cat conftest.$ac_ext >&5
13950 eval "$as_ac_Header=no"
13951 fi
13952 rm -f conftest.$ac_objext conftest.$ac_ext
13953 fi
13954 echo "$as_me:13954: result: `eval echo '${'$as_ac_Header'}'`" >&5
13955 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13956 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13957   cat >>confdefs.h <<EOF
13958 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13959 EOF
13960
13961 ac_header_dirent=$ac_hdr; break
13962 fi
13963
13964 done
13965 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13966 if test $ac_header_dirent = dirent.h; then
13967   echo "$as_me:13967: checking for opendir in -ldir" >&5
13968 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13969 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13970   echo $ECHO_N "(cached) $ECHO_C" >&6
13971 else
13972   ac_check_lib_save_LIBS=$LIBS
13973 LIBS="-ldir  $LIBS"
13974 cat >conftest.$ac_ext <<_ACEOF
13975 #line 13975 "configure"
13976 #include "confdefs.h"
13977
13978 /* Override any gcc2 internal prototype to avoid an error.  */
13979 #ifdef __cplusplus
13980 extern "C"
13981 #endif
13982 /* We use char because int might match the return type of a gcc2
13983    builtin and then its argument prototype would still apply.  */
13984 char opendir ();
13985 int
13986 main ()
13987 {
13988 opendir ();
13989   ;
13990   return 0;
13991 }
13992 _ACEOF
13993 rm -f conftest.$ac_objext conftest$ac_exeext
13994 if { (eval echo "$as_me:13994: \"$ac_link\"") >&5
13995   (eval $ac_link) 2>&5
13996   ac_status=$?
13997   echo "$as_me:13997: \$? = $ac_status" >&5
13998   (exit $ac_status); } &&
13999          { ac_try='test -s conftest$ac_exeext'
14000   { (eval echo "$as_me:14000: \"$ac_try\"") >&5
14001   (eval $ac_try) 2>&5
14002   ac_status=$?
14003   echo "$as_me:14003: \$? = $ac_status" >&5
14004   (exit $ac_status); }; }; then
14005   ac_cv_lib_dir_opendir=yes
14006 else
14007   echo "$as_me: failed program was:" >&5
14008 cat conftest.$ac_ext >&5
14009 ac_cv_lib_dir_opendir=no
14010 fi
14011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14012 LIBS=$ac_check_lib_save_LIBS
14013 fi
14014 echo "$as_me:14014: result: $ac_cv_lib_dir_opendir" >&5
14015 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14016 if test $ac_cv_lib_dir_opendir = yes; then
14017   LIBS="$LIBS -ldir"
14018 fi
14019
14020 else
14021   echo "$as_me:14021: checking for opendir in -lx" >&5
14022 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14023 if test "${ac_cv_lib_x_opendir+set}" = set; then
14024   echo $ECHO_N "(cached) $ECHO_C" >&6
14025 else
14026   ac_check_lib_save_LIBS=$LIBS
14027 LIBS="-lx  $LIBS"
14028 cat >conftest.$ac_ext <<_ACEOF
14029 #line 14029 "configure"
14030 #include "confdefs.h"
14031
14032 /* Override any gcc2 internal prototype to avoid an error.  */
14033 #ifdef __cplusplus
14034 extern "C"
14035 #endif
14036 /* We use char because int might match the return type of a gcc2
14037    builtin and then its argument prototype would still apply.  */
14038 char opendir ();
14039 int
14040 main ()
14041 {
14042 opendir ();
14043   ;
14044   return 0;
14045 }
14046 _ACEOF
14047 rm -f conftest.$ac_objext conftest$ac_exeext
14048 if { (eval echo "$as_me:14048: \"$ac_link\"") >&5
14049   (eval $ac_link) 2>&5
14050   ac_status=$?
14051   echo "$as_me:14051: \$? = $ac_status" >&5
14052   (exit $ac_status); } &&
14053          { ac_try='test -s conftest$ac_exeext'
14054   { (eval echo "$as_me:14054: \"$ac_try\"") >&5
14055   (eval $ac_try) 2>&5
14056   ac_status=$?
14057   echo "$as_me:14057: \$? = $ac_status" >&5
14058   (exit $ac_status); }; }; then
14059   ac_cv_lib_x_opendir=yes
14060 else
14061   echo "$as_me: failed program was:" >&5
14062 cat conftest.$ac_ext >&5
14063 ac_cv_lib_x_opendir=no
14064 fi
14065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14066 LIBS=$ac_check_lib_save_LIBS
14067 fi
14068 echo "$as_me:14068: result: $ac_cv_lib_x_opendir" >&5
14069 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14070 if test $ac_cv_lib_x_opendir = yes; then
14071   LIBS="$LIBS -lx"
14072 fi
14073
14074 fi
14075
14076 echo "$as_me:14076: checking whether time.h and sys/time.h may both be included" >&5
14077 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14078 if test "${ac_cv_header_time+set}" = set; then
14079   echo $ECHO_N "(cached) $ECHO_C" >&6
14080 else
14081   cat >conftest.$ac_ext <<_ACEOF
14082 #line 14082 "configure"
14083 #include "confdefs.h"
14084 #include <sys/types.h>
14085 #include <sys/time.h>
14086 #include <time.h>
14087
14088 int
14089 main ()
14090 {
14091 if ((struct tm *) 0)
14092 return 0;
14093   ;
14094   return 0;
14095 }
14096 _ACEOF
14097 rm -f conftest.$ac_objext
14098 if { (eval echo "$as_me:14098: \"$ac_compile\"") >&5
14099   (eval $ac_compile) 2>&5
14100   ac_status=$?
14101   echo "$as_me:14101: \$? = $ac_status" >&5
14102   (exit $ac_status); } &&
14103          { ac_try='test -s conftest.$ac_objext'
14104   { (eval echo "$as_me:14104: \"$ac_try\"") >&5
14105   (eval $ac_try) 2>&5
14106   ac_status=$?
14107   echo "$as_me:14107: \$? = $ac_status" >&5
14108   (exit $ac_status); }; }; then
14109   ac_cv_header_time=yes
14110 else
14111   echo "$as_me: failed program was:" >&5
14112 cat conftest.$ac_ext >&5
14113 ac_cv_header_time=no
14114 fi
14115 rm -f conftest.$ac_objext conftest.$ac_ext
14116 fi
14117 echo "$as_me:14117: result: $ac_cv_header_time" >&5
14118 echo "${ECHO_T}$ac_cv_header_time" >&6
14119 if test $ac_cv_header_time = yes; then
14120
14121 cat >>confdefs.h <<\EOF
14122 #define TIME_WITH_SYS_TIME 1
14123 EOF
14124
14125 fi
14126
14127 cf_regex_func=no
14128
14129 cf_regex_libs="regex re"
14130 case $host_os in #(vi
14131 mingw*)
14132         cf_regex_libs="gnurx $cf_regex_libs"
14133         ;;
14134 esac
14135
14136 echo "$as_me:14136: checking for regcomp" >&5
14137 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14138 if test "${ac_cv_func_regcomp+set}" = set; then
14139   echo $ECHO_N "(cached) $ECHO_C" >&6
14140 else
14141   cat >conftest.$ac_ext <<_ACEOF
14142 #line 14142 "configure"
14143 #include "confdefs.h"
14144 /* System header to define __stub macros and hopefully few prototypes,
14145     which can conflict with char regcomp (); below.  */
14146 #include <assert.h>
14147 /* Override any gcc2 internal prototype to avoid an error.  */
14148 #ifdef __cplusplus
14149 extern "C"
14150 #endif
14151 /* We use char because int might match the return type of a gcc2
14152    builtin and then its argument prototype would still apply.  */
14153 char regcomp ();
14154 char (*f) ();
14155
14156 int
14157 main ()
14158 {
14159 /* The GNU C library defines this for functions which it implements
14160     to always fail with ENOSYS.  Some functions are actually named
14161     something starting with __ and the normal name is an alias.  */
14162 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14163 choke me
14164 #else
14165 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14166 #endif
14167
14168   ;
14169   return 0;
14170 }
14171 _ACEOF
14172 rm -f conftest.$ac_objext conftest$ac_exeext
14173 if { (eval echo "$as_me:14173: \"$ac_link\"") >&5
14174   (eval $ac_link) 2>&5
14175   ac_status=$?
14176   echo "$as_me:14176: \$? = $ac_status" >&5
14177   (exit $ac_status); } &&
14178          { ac_try='test -s conftest$ac_exeext'
14179   { (eval echo "$as_me:14179: \"$ac_try\"") >&5
14180   (eval $ac_try) 2>&5
14181   ac_status=$?
14182   echo "$as_me:14182: \$? = $ac_status" >&5
14183   (exit $ac_status); }; }; then
14184   ac_cv_func_regcomp=yes
14185 else
14186   echo "$as_me: failed program was:" >&5
14187 cat conftest.$ac_ext >&5
14188 ac_cv_func_regcomp=no
14189 fi
14190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14191 fi
14192 echo "$as_me:14192: result: $ac_cv_func_regcomp" >&5
14193 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14194 if test $ac_cv_func_regcomp = yes; then
14195   cf_regex_func=regcomp
14196 else
14197
14198         for cf_regex_lib in $cf_regex_libs
14199         do
14200                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14201 echo "$as_me:14201: checking for regcomp in -l$cf_regex_lib" >&5
14202 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14203 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14204   echo $ECHO_N "(cached) $ECHO_C" >&6
14205 else
14206   ac_check_lib_save_LIBS=$LIBS
14207 LIBS="-l$cf_regex_lib  $LIBS"
14208 cat >conftest.$ac_ext <<_ACEOF
14209 #line 14209 "configure"
14210 #include "confdefs.h"
14211
14212 /* Override any gcc2 internal prototype to avoid an error.  */
14213 #ifdef __cplusplus
14214 extern "C"
14215 #endif
14216 /* We use char because int might match the return type of a gcc2
14217    builtin and then its argument prototype would still apply.  */
14218 char regcomp ();
14219 int
14220 main ()
14221 {
14222 regcomp ();
14223   ;
14224   return 0;
14225 }
14226 _ACEOF
14227 rm -f conftest.$ac_objext conftest$ac_exeext
14228 if { (eval echo "$as_me:14228: \"$ac_link\"") >&5
14229   (eval $ac_link) 2>&5
14230   ac_status=$?
14231   echo "$as_me:14231: \$? = $ac_status" >&5
14232   (exit $ac_status); } &&
14233          { ac_try='test -s conftest$ac_exeext'
14234   { (eval echo "$as_me:14234: \"$ac_try\"") >&5
14235   (eval $ac_try) 2>&5
14236   ac_status=$?
14237   echo "$as_me:14237: \$? = $ac_status" >&5
14238   (exit $ac_status); }; }; then
14239   eval "$as_ac_Lib=yes"
14240 else
14241   echo "$as_me: failed program was:" >&5
14242 cat conftest.$ac_ext >&5
14243 eval "$as_ac_Lib=no"
14244 fi
14245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14246 LIBS=$ac_check_lib_save_LIBS
14247 fi
14248 echo "$as_me:14248: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14249 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14250 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14251
14252                                 LIBS="-l$cf_regex_lib $LIBS"
14253                                 cf_regex_func=regcomp
14254                                 break
14255 fi
14256
14257         done
14258
14259 fi
14260
14261 if test "$cf_regex_func" = no ; then
14262         echo "$as_me:14262: checking for compile" >&5
14263 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14264 if test "${ac_cv_func_compile+set}" = set; then
14265   echo $ECHO_N "(cached) $ECHO_C" >&6
14266 else
14267   cat >conftest.$ac_ext <<_ACEOF
14268 #line 14268 "configure"
14269 #include "confdefs.h"
14270 /* System header to define __stub macros and hopefully few prototypes,
14271     which can conflict with char compile (); below.  */
14272 #include <assert.h>
14273 /* Override any gcc2 internal prototype to avoid an error.  */
14274 #ifdef __cplusplus
14275 extern "C"
14276 #endif
14277 /* We use char because int might match the return type of a gcc2
14278    builtin and then its argument prototype would still apply.  */
14279 char compile ();
14280 char (*f) ();
14281
14282 int
14283 main ()
14284 {
14285 /* The GNU C library defines this for functions which it implements
14286     to always fail with ENOSYS.  Some functions are actually named
14287     something starting with __ and the normal name is an alias.  */
14288 #if defined (__stub_compile) || defined (__stub___compile)
14289 choke me
14290 #else
14291 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14292 #endif
14293
14294   ;
14295   return 0;
14296 }
14297 _ACEOF
14298 rm -f conftest.$ac_objext conftest$ac_exeext
14299 if { (eval echo "$as_me:14299: \"$ac_link\"") >&5
14300   (eval $ac_link) 2>&5
14301   ac_status=$?
14302   echo "$as_me:14302: \$? = $ac_status" >&5
14303   (exit $ac_status); } &&
14304          { ac_try='test -s conftest$ac_exeext'
14305   { (eval echo "$as_me:14305: \"$ac_try\"") >&5
14306   (eval $ac_try) 2>&5
14307   ac_status=$?
14308   echo "$as_me:14308: \$? = $ac_status" >&5
14309   (exit $ac_status); }; }; then
14310   ac_cv_func_compile=yes
14311 else
14312   echo "$as_me: failed program was:" >&5
14313 cat conftest.$ac_ext >&5
14314 ac_cv_func_compile=no
14315 fi
14316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14317 fi
14318 echo "$as_me:14318: result: $ac_cv_func_compile" >&5
14319 echo "${ECHO_T}$ac_cv_func_compile" >&6
14320 if test $ac_cv_func_compile = yes; then
14321   cf_regex_func=compile
14322 else
14323
14324                 echo "$as_me:14324: checking for compile in -lgen" >&5
14325 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14326 if test "${ac_cv_lib_gen_compile+set}" = set; then
14327   echo $ECHO_N "(cached) $ECHO_C" >&6
14328 else
14329   ac_check_lib_save_LIBS=$LIBS
14330 LIBS="-lgen  $LIBS"
14331 cat >conftest.$ac_ext <<_ACEOF
14332 #line 14332 "configure"
14333 #include "confdefs.h"
14334
14335 /* Override any gcc2 internal prototype to avoid an error.  */
14336 #ifdef __cplusplus
14337 extern "C"
14338 #endif
14339 /* We use char because int might match the return type of a gcc2
14340    builtin and then its argument prototype would still apply.  */
14341 char compile ();
14342 int
14343 main ()
14344 {
14345 compile ();
14346   ;
14347   return 0;
14348 }
14349 _ACEOF
14350 rm -f conftest.$ac_objext conftest$ac_exeext
14351 if { (eval echo "$as_me:14351: \"$ac_link\"") >&5
14352   (eval $ac_link) 2>&5
14353   ac_status=$?
14354   echo "$as_me:14354: \$? = $ac_status" >&5
14355   (exit $ac_status); } &&
14356          { ac_try='test -s conftest$ac_exeext'
14357   { (eval echo "$as_me:14357: \"$ac_try\"") >&5
14358   (eval $ac_try) 2>&5
14359   ac_status=$?
14360   echo "$as_me:14360: \$? = $ac_status" >&5
14361   (exit $ac_status); }; }; then
14362   ac_cv_lib_gen_compile=yes
14363 else
14364   echo "$as_me: failed program was:" >&5
14365 cat conftest.$ac_ext >&5
14366 ac_cv_lib_gen_compile=no
14367 fi
14368 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14369 LIBS=$ac_check_lib_save_LIBS
14370 fi
14371 echo "$as_me:14371: result: $ac_cv_lib_gen_compile" >&5
14372 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14373 if test $ac_cv_lib_gen_compile = yes; then
14374
14375                                 LIBS="-lgen $LIBS"
14376                                 cf_regex_func=compile
14377 fi
14378
14379 fi
14380
14381 fi
14382
14383 if test "$cf_regex_func" = no ; then
14384         { echo "$as_me:14384: WARNING: cannot find regular expression library" >&5
14385 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14386 fi
14387
14388 echo "$as_me:14388: checking for regular-expression headers" >&5
14389 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14390 if test "${cf_cv_regex_hdrs+set}" = set; then
14391   echo $ECHO_N "(cached) $ECHO_C" >&6
14392 else
14393
14394 cf_cv_regex_hdrs=no
14395 case $cf_regex_func in #(vi
14396 compile) #(vi
14397         for cf_regex_hdr in regexp.h regexpr.h
14398         do
14399                 cat >conftest.$ac_ext <<_ACEOF
14400 #line 14400 "configure"
14401 #include "confdefs.h"
14402 #include <$cf_regex_hdr>
14403 int
14404 main ()
14405 {
14406
14407                         char *p = compile("", "", "", 0);
14408                         int x = step("", "");
14409
14410   ;
14411   return 0;
14412 }
14413 _ACEOF
14414 rm -f conftest.$ac_objext conftest$ac_exeext
14415 if { (eval echo "$as_me:14415: \"$ac_link\"") >&5
14416   (eval $ac_link) 2>&5
14417   ac_status=$?
14418   echo "$as_me:14418: \$? = $ac_status" >&5
14419   (exit $ac_status); } &&
14420          { ac_try='test -s conftest$ac_exeext'
14421   { (eval echo "$as_me:14421: \"$ac_try\"") >&5
14422   (eval $ac_try) 2>&5
14423   ac_status=$?
14424   echo "$as_me:14424: \$? = $ac_status" >&5
14425   (exit $ac_status); }; }; then
14426
14427                         cf_cv_regex_hdrs=$cf_regex_hdr
14428                         break
14429
14430 else
14431   echo "$as_me: failed program was:" >&5
14432 cat conftest.$ac_ext >&5
14433 fi
14434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14435         done
14436         ;;
14437 *)
14438         for cf_regex_hdr in regex.h
14439         do
14440                 cat >conftest.$ac_ext <<_ACEOF
14441 #line 14441 "configure"
14442 #include "confdefs.h"
14443 #include <sys/types.h>
14444 #include <$cf_regex_hdr>
14445 int
14446 main ()
14447 {
14448
14449                         regex_t *p;
14450                         int x = regcomp(p, "", 0);
14451                         int y = regexec(p, "", 0, 0, 0);
14452                         regfree(p);
14453
14454   ;
14455   return 0;
14456 }
14457 _ACEOF
14458 rm -f conftest.$ac_objext conftest$ac_exeext
14459 if { (eval echo "$as_me:14459: \"$ac_link\"") >&5
14460   (eval $ac_link) 2>&5
14461   ac_status=$?
14462   echo "$as_me:14462: \$? = $ac_status" >&5
14463   (exit $ac_status); } &&
14464          { ac_try='test -s conftest$ac_exeext'
14465   { (eval echo "$as_me:14465: \"$ac_try\"") >&5
14466   (eval $ac_try) 2>&5
14467   ac_status=$?
14468   echo "$as_me:14468: \$? = $ac_status" >&5
14469   (exit $ac_status); }; }; then
14470
14471                         cf_cv_regex_hdrs=$cf_regex_hdr
14472                         break
14473
14474 else
14475   echo "$as_me: failed program was:" >&5
14476 cat conftest.$ac_ext >&5
14477 fi
14478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14479         done
14480         ;;
14481 esac
14482
14483 fi
14484 echo "$as_me:14484: result: $cf_cv_regex_hdrs" >&5
14485 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14486
14487 case $cf_cv_regex_hdrs in #(vi
14488     no)        { echo "$as_me:14488: WARNING: no regular expression header found" >&5
14489 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14490     regex.h)
14491 cat >>confdefs.h <<\EOF
14492 #define HAVE_REGEX_H_FUNCS 1
14493 EOF
14494  ;; #(vi
14495     regexp.h)
14496 cat >>confdefs.h <<\EOF
14497 #define HAVE_REGEXP_H_FUNCS 1
14498 EOF
14499  ;; #(vi
14500     regexpr.h)
14501 cat >>confdefs.h <<\EOF
14502 #define HAVE_REGEXPR_H_FUNCS 1
14503 EOF
14504  ;;
14505 esac
14506
14507 for ac_header in \
14508 fcntl.h \
14509 getopt.h \
14510 limits.h \
14511 locale.h \
14512 math.h \
14513 poll.h \
14514 sys/bsdtypes.h \
14515 sys/ioctl.h \
14516 sys/param.h \
14517 sys/poll.h \
14518 sys/select.h \
14519 sys/time.h \
14520 sys/times.h \
14521 ttyent.h \
14522 unistd.h \
14523 wctype.h \
14524
14525 do
14526 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14527 echo "$as_me:14527: checking for $ac_header" >&5
14528 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14529 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14530   echo $ECHO_N "(cached) $ECHO_C" >&6
14531 else
14532   cat >conftest.$ac_ext <<_ACEOF
14533 #line 14533 "configure"
14534 #include "confdefs.h"
14535 #include <$ac_header>
14536 _ACEOF
14537 if { (eval echo "$as_me:14537: \"$ac_cpp conftest.$ac_ext\"") >&5
14538   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14539   ac_status=$?
14540   egrep -v '^ *\+' conftest.er1 >conftest.err
14541   rm -f conftest.er1
14542   cat conftest.err >&5
14543   echo "$as_me:14543: \$? = $ac_status" >&5
14544   (exit $ac_status); } >/dev/null; then
14545   if test -s conftest.err; then
14546     ac_cpp_err=$ac_c_preproc_warn_flag
14547   else
14548     ac_cpp_err=
14549   fi
14550 else
14551   ac_cpp_err=yes
14552 fi
14553 if test -z "$ac_cpp_err"; then
14554   eval "$as_ac_Header=yes"
14555 else
14556   echo "$as_me: failed program was:" >&5
14557   cat conftest.$ac_ext >&5
14558   eval "$as_ac_Header=no"
14559 fi
14560 rm -f conftest.err conftest.$ac_ext
14561 fi
14562 echo "$as_me:14562: result: `eval echo '${'$as_ac_Header'}'`" >&5
14563 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14564 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14565   cat >>confdefs.h <<EOF
14566 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14567 EOF
14568
14569 fi
14570 done
14571
14572 for ac_header in unistd.h getopt.h
14573 do
14574 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14575 echo "$as_me:14575: checking for $ac_header" >&5
14576 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14577 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14578   echo $ECHO_N "(cached) $ECHO_C" >&6
14579 else
14580   cat >conftest.$ac_ext <<_ACEOF
14581 #line 14581 "configure"
14582 #include "confdefs.h"
14583 #include <$ac_header>
14584 _ACEOF
14585 if { (eval echo "$as_me:14585: \"$ac_cpp conftest.$ac_ext\"") >&5
14586   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14587   ac_status=$?
14588   egrep -v '^ *\+' conftest.er1 >conftest.err
14589   rm -f conftest.er1
14590   cat conftest.err >&5
14591   echo "$as_me:14591: \$? = $ac_status" >&5
14592   (exit $ac_status); } >/dev/null; then
14593   if test -s conftest.err; then
14594     ac_cpp_err=$ac_c_preproc_warn_flag
14595   else
14596     ac_cpp_err=
14597   fi
14598 else
14599   ac_cpp_err=yes
14600 fi
14601 if test -z "$ac_cpp_err"; then
14602   eval "$as_ac_Header=yes"
14603 else
14604   echo "$as_me: failed program was:" >&5
14605   cat conftest.$ac_ext >&5
14606   eval "$as_ac_Header=no"
14607 fi
14608 rm -f conftest.err conftest.$ac_ext
14609 fi
14610 echo "$as_me:14610: result: `eval echo '${'$as_ac_Header'}'`" >&5
14611 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14612 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14613   cat >>confdefs.h <<EOF
14614 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14615 EOF
14616
14617 fi
14618 done
14619
14620 echo "$as_me:14620: checking for header declaring getopt variables" >&5
14621 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14622 if test "${cf_cv_getopt_header+set}" = set; then
14623   echo $ECHO_N "(cached) $ECHO_C" >&6
14624 else
14625
14626 cf_cv_getopt_header=none
14627 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14628 do
14629 cat >conftest.$ac_ext <<_ACEOF
14630 #line 14630 "configure"
14631 #include "confdefs.h"
14632
14633 #include <$cf_header>
14634 int
14635 main ()
14636 {
14637 int x = optind; char *y = optarg
14638   ;
14639   return 0;
14640 }
14641 _ACEOF
14642 rm -f conftest.$ac_objext
14643 if { (eval echo "$as_me:14643: \"$ac_compile\"") >&5
14644   (eval $ac_compile) 2>&5
14645   ac_status=$?
14646   echo "$as_me:14646: \$? = $ac_status" >&5
14647   (exit $ac_status); } &&
14648          { ac_try='test -s conftest.$ac_objext'
14649   { (eval echo "$as_me:14649: \"$ac_try\"") >&5
14650   (eval $ac_try) 2>&5
14651   ac_status=$?
14652   echo "$as_me:14652: \$? = $ac_status" >&5
14653   (exit $ac_status); }; }; then
14654   cf_cv_getopt_header=$cf_header
14655  break
14656 else
14657   echo "$as_me: failed program was:" >&5
14658 cat conftest.$ac_ext >&5
14659 fi
14660 rm -f conftest.$ac_objext conftest.$ac_ext
14661 done
14662
14663 fi
14664 echo "$as_me:14664: result: $cf_cv_getopt_header" >&5
14665 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14666 if test $cf_cv_getopt_header != none ; then
14667
14668 cat >>confdefs.h <<\EOF
14669 #define HAVE_GETOPT_HEADER 1
14670 EOF
14671
14672 fi
14673
14674 # check for ISC (this may also define _POSIX_SOURCE)
14675 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14676 if test "x$ISC" = xyes ; then
14677
14678 echo "$as_me:14678: checking for main in -lcposix" >&5
14679 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14680 if test "${ac_cv_lib_cposix_main+set}" = set; then
14681   echo $ECHO_N "(cached) $ECHO_C" >&6
14682 else
14683   ac_check_lib_save_LIBS=$LIBS
14684 LIBS="-lcposix  $LIBS"
14685 cat >conftest.$ac_ext <<_ACEOF
14686 #line 14686 "configure"
14687 #include "confdefs.h"
14688
14689 int
14690 main ()
14691 {
14692 main ();
14693   ;
14694   return 0;
14695 }
14696 _ACEOF
14697 rm -f conftest.$ac_objext conftest$ac_exeext
14698 if { (eval echo "$as_me:14698: \"$ac_link\"") >&5
14699   (eval $ac_link) 2>&5
14700   ac_status=$?
14701   echo "$as_me:14701: \$? = $ac_status" >&5
14702   (exit $ac_status); } &&
14703          { ac_try='test -s conftest$ac_exeext'
14704   { (eval echo "$as_me:14704: \"$ac_try\"") >&5
14705   (eval $ac_try) 2>&5
14706   ac_status=$?
14707   echo "$as_me:14707: \$? = $ac_status" >&5
14708   (exit $ac_status); }; }; then
14709   ac_cv_lib_cposix_main=yes
14710 else
14711   echo "$as_me: failed program was:" >&5
14712 cat conftest.$ac_ext >&5
14713 ac_cv_lib_cposix_main=no
14714 fi
14715 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14716 LIBS=$ac_check_lib_save_LIBS
14717 fi
14718 echo "$as_me:14718: result: $ac_cv_lib_cposix_main" >&5
14719 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14720 if test $ac_cv_lib_cposix_main = yes; then
14721   cat >>confdefs.h <<EOF
14722 #define HAVE_LIBCPOSIX 1
14723 EOF
14724
14725   LIBS="-lcposix $LIBS"
14726
14727 fi
14728
14729         echo "$as_me:14729: checking for bzero in -linet" >&5
14730 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14731 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14732   echo $ECHO_N "(cached) $ECHO_C" >&6
14733 else
14734   ac_check_lib_save_LIBS=$LIBS
14735 LIBS="-linet  $LIBS"
14736 cat >conftest.$ac_ext <<_ACEOF
14737 #line 14737 "configure"
14738 #include "confdefs.h"
14739
14740 /* Override any gcc2 internal prototype to avoid an error.  */
14741 #ifdef __cplusplus
14742 extern "C"
14743 #endif
14744 /* We use char because int might match the return type of a gcc2
14745    builtin and then its argument prototype would still apply.  */
14746 char bzero ();
14747 int
14748 main ()
14749 {
14750 bzero ();
14751   ;
14752   return 0;
14753 }
14754 _ACEOF
14755 rm -f conftest.$ac_objext conftest$ac_exeext
14756 if { (eval echo "$as_me:14756: \"$ac_link\"") >&5
14757   (eval $ac_link) 2>&5
14758   ac_status=$?
14759   echo "$as_me:14759: \$? = $ac_status" >&5
14760   (exit $ac_status); } &&
14761          { ac_try='test -s conftest$ac_exeext'
14762   { (eval echo "$as_me:14762: \"$ac_try\"") >&5
14763   (eval $ac_try) 2>&5
14764   ac_status=$?
14765   echo "$as_me:14765: \$? = $ac_status" >&5
14766   (exit $ac_status); }; }; then
14767   ac_cv_lib_inet_bzero=yes
14768 else
14769   echo "$as_me: failed program was:" >&5
14770 cat conftest.$ac_ext >&5
14771 ac_cv_lib_inet_bzero=no
14772 fi
14773 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14774 LIBS=$ac_check_lib_save_LIBS
14775 fi
14776 echo "$as_me:14776: result: $ac_cv_lib_inet_bzero" >&5
14777 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14778 if test $ac_cv_lib_inet_bzero = yes; then
14779   LIBS="-linet $LIBS"
14780 fi
14781 fi
14782
14783 echo "$as_me:14783: checking if sys/time.h works with sys/select.h" >&5
14784 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14785 if test "${cf_cv_sys_time_select+set}" = set; then
14786   echo $ECHO_N "(cached) $ECHO_C" >&6
14787 else
14788
14789 cat >conftest.$ac_ext <<_ACEOF
14790 #line 14790 "configure"
14791 #include "confdefs.h"
14792
14793 #include <sys/types.h>
14794 #ifdef HAVE_SYS_TIME_H
14795 #include <sys/time.h>
14796 #endif
14797 #ifdef HAVE_SYS_SELECT_H
14798 #include <sys/select.h>
14799 #endif
14800
14801 int
14802 main ()
14803 {
14804
14805   ;
14806   return 0;
14807 }
14808 _ACEOF
14809 rm -f conftest.$ac_objext
14810 if { (eval echo "$as_me:14810: \"$ac_compile\"") >&5
14811   (eval $ac_compile) 2>&5
14812   ac_status=$?
14813   echo "$as_me:14813: \$? = $ac_status" >&5
14814   (exit $ac_status); } &&
14815          { ac_try='test -s conftest.$ac_objext'
14816   { (eval echo "$as_me:14816: \"$ac_try\"") >&5
14817   (eval $ac_try) 2>&5
14818   ac_status=$?
14819   echo "$as_me:14819: \$? = $ac_status" >&5
14820   (exit $ac_status); }; }; then
14821   cf_cv_sys_time_select=yes
14822 else
14823   echo "$as_me: failed program was:" >&5
14824 cat conftest.$ac_ext >&5
14825 cf_cv_sys_time_select=no
14826 fi
14827 rm -f conftest.$ac_objext conftest.$ac_ext
14828
14829 fi
14830
14831 echo "$as_me:14831: result: $cf_cv_sys_time_select" >&5
14832 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14833 test "$cf_cv_sys_time_select" = yes &&
14834 cat >>confdefs.h <<\EOF
14835 #define HAVE_SYS_TIME_SELECT 1
14836 EOF
14837
14838 ###     checks for compiler characteristics
14839 ac_ext=c
14840 ac_cpp='$CPP $CPPFLAGS'
14841 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14842 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14843 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14844 ac_main_return=return
14845
14846 echo "$as_me:14846: checking for an ANSI C-conforming const" >&5
14847 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14848 if test "${ac_cv_c_const+set}" = set; then
14849   echo $ECHO_N "(cached) $ECHO_C" >&6
14850 else
14851   cat >conftest.$ac_ext <<_ACEOF
14852 #line 14852 "configure"
14853 #include "confdefs.h"
14854
14855 int
14856 main ()
14857 {
14858 /* FIXME: Include the comments suggested by Paul. */
14859 #ifndef __cplusplus
14860   /* Ultrix mips cc rejects this.  */
14861   typedef int charset[2];
14862   const charset x;
14863   /* SunOS 4.1.1 cc rejects this.  */
14864   char const *const *ccp;
14865   char **p;
14866   /* NEC SVR4.0.2 mips cc rejects this.  */
14867   struct point {int x, y;};
14868   static struct point const zero = {0,0};
14869   /* AIX XL C 1.02.0.0 rejects this.
14870      It does not let you subtract one const X* pointer from another in
14871      an arm of an if-expression whose if-part is not a constant
14872      expression */
14873   const char *g = "string";
14874   ccp = &g + (g ? g-g : 0);
14875   /* HPUX 7.0 cc rejects these. */
14876   ++ccp;
14877   p = (char**) ccp;
14878   ccp = (char const *const *) p;
14879   { /* SCO 3.2v4 cc rejects this.  */
14880     char *t;
14881     char const *s = 0 ? (char *) 0 : (char const *) 0;
14882
14883     *t++ = 0;
14884   }
14885   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14886     int x[] = {25, 17};
14887     const int *foo = &x[0];
14888     ++foo;
14889   }
14890   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14891     typedef const int *iptr;
14892     iptr p = 0;
14893     ++p;
14894   }
14895   { /* AIX XL C 1.02.0.0 rejects this saying
14896        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14897     struct s { int j; const int *ap[3]; };
14898     struct s *b; b->j = 5;
14899   }
14900   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14901     const int foo = 10;
14902   }
14903 #endif
14904
14905   ;
14906   return 0;
14907 }
14908 _ACEOF
14909 rm -f conftest.$ac_objext
14910 if { (eval echo "$as_me:14910: \"$ac_compile\"") >&5
14911   (eval $ac_compile) 2>&5
14912   ac_status=$?
14913   echo "$as_me:14913: \$? = $ac_status" >&5
14914   (exit $ac_status); } &&
14915          { ac_try='test -s conftest.$ac_objext'
14916   { (eval echo "$as_me:14916: \"$ac_try\"") >&5
14917   (eval $ac_try) 2>&5
14918   ac_status=$?
14919   echo "$as_me:14919: \$? = $ac_status" >&5
14920   (exit $ac_status); }; }; then
14921   ac_cv_c_const=yes
14922 else
14923   echo "$as_me: failed program was:" >&5
14924 cat conftest.$ac_ext >&5
14925 ac_cv_c_const=no
14926 fi
14927 rm -f conftest.$ac_objext conftest.$ac_ext
14928 fi
14929 echo "$as_me:14929: result: $ac_cv_c_const" >&5
14930 echo "${ECHO_T}$ac_cv_c_const" >&6
14931 if test $ac_cv_c_const = no; then
14932
14933 cat >>confdefs.h <<\EOF
14934 #define const
14935 EOF
14936
14937 fi
14938
14939 echo "$as_me:14939: checking for inline" >&5
14940 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14941 if test "${ac_cv_c_inline+set}" = set; then
14942   echo $ECHO_N "(cached) $ECHO_C" >&6
14943 else
14944   ac_cv_c_inline=no
14945 for ac_kw in inline __inline__ __inline; do
14946   cat >conftest.$ac_ext <<_ACEOF
14947 #line 14947 "configure"
14948 #include "confdefs.h"
14949 #ifndef __cplusplus
14950 static $ac_kw int static_foo () {return 0; }
14951 $ac_kw int foo () {return 0; }
14952 #endif
14953
14954 _ACEOF
14955 rm -f conftest.$ac_objext
14956 if { (eval echo "$as_me:14956: \"$ac_compile\"") >&5
14957   (eval $ac_compile) 2>&5
14958   ac_status=$?
14959   echo "$as_me:14959: \$? = $ac_status" >&5
14960   (exit $ac_status); } &&
14961          { ac_try='test -s conftest.$ac_objext'
14962   { (eval echo "$as_me:14962: \"$ac_try\"") >&5
14963   (eval $ac_try) 2>&5
14964   ac_status=$?
14965   echo "$as_me:14965: \$? = $ac_status" >&5
14966   (exit $ac_status); }; }; then
14967   ac_cv_c_inline=$ac_kw; break
14968 else
14969   echo "$as_me: failed program was:" >&5
14970 cat conftest.$ac_ext >&5
14971 fi
14972 rm -f conftest.$ac_objext conftest.$ac_ext
14973 done
14974
14975 fi
14976 echo "$as_me:14976: result: $ac_cv_c_inline" >&5
14977 echo "${ECHO_T}$ac_cv_c_inline" >&6
14978 case $ac_cv_c_inline in
14979   inline | yes) ;;
14980   no)
14981 cat >>confdefs.h <<\EOF
14982 #define inline
14983 EOF
14984  ;;
14985   *)  cat >>confdefs.h <<EOF
14986 #define inline $ac_cv_c_inline
14987 EOF
14988  ;;
14989 esac
14990
14991 NCURSES_INLINE=
14992 if test "$ac_cv_c_inline" != no ; then
14993   NCURSES_INLINE=inline
14994   if test "$INTEL_COMPILER" = yes
14995   then
14996     :
14997   elif test "$CLANG_COMPILER" = yes
14998   then
14999     :
15000   elif test "$GCC" = yes
15001   then
15002     echo "$as_me:15002: checking if $CC supports options to tune inlining" >&5
15003 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15004 if test "${cf_cv_gcc_inline+set}" = set; then
15005   echo $ECHO_N "(cached) $ECHO_C" >&6
15006 else
15007
15008       cf_save_CFLAGS=$CFLAGS
15009       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15010       cat >conftest.$ac_ext <<_ACEOF
15011 #line 15011 "configure"
15012 #include "confdefs.h"
15013 inline int foo(void) { return 1; }
15014 int
15015 main ()
15016 {
15017 ${cf_cv_main_return:-return} foo()
15018   ;
15019   return 0;
15020 }
15021 _ACEOF
15022 rm -f conftest.$ac_objext
15023 if { (eval echo "$as_me:15023: \"$ac_compile\"") >&5
15024   (eval $ac_compile) 2>&5
15025   ac_status=$?
15026   echo "$as_me:15026: \$? = $ac_status" >&5
15027   (exit $ac_status); } &&
15028          { ac_try='test -s conftest.$ac_objext'
15029   { (eval echo "$as_me:15029: \"$ac_try\"") >&5
15030   (eval $ac_try) 2>&5
15031   ac_status=$?
15032   echo "$as_me:15032: \$? = $ac_status" >&5
15033   (exit $ac_status); }; }; then
15034   cf_cv_gcc_inline=yes
15035 else
15036   echo "$as_me: failed program was:" >&5
15037 cat conftest.$ac_ext >&5
15038 cf_cv_gcc_inline=no
15039 fi
15040 rm -f conftest.$ac_objext conftest.$ac_ext
15041       CFLAGS=$cf_save_CFLAGS
15042
15043 fi
15044 echo "$as_me:15044: result: $cf_cv_gcc_inline" >&5
15045 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15046     if test "$cf_cv_gcc_inline" = yes ; then
15047
15048 cf_fix_cppflags=no
15049 cf_new_cflags=
15050 cf_new_cppflags=
15051 cf_new_extra_cppflags=
15052
15053 for cf_add_cflags in --param max-inline-insns-single=1200
15054 do
15055 case $cf_fix_cppflags in
15056 no)
15057         case $cf_add_cflags in #(vi
15058         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15059                 case $cf_add_cflags in
15060                 -D*)
15061                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15062
15063                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15064                                 && test -z "${cf_tst_cflags}" \
15065                                 && cf_fix_cppflags=yes
15066
15067                         if test $cf_fix_cppflags = yes ; then
15068                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15069                                 continue
15070                         elif test "${cf_tst_cflags}" = "\"'" ; then
15071                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15072                                 continue
15073                         fi
15074                         ;;
15075                 esac
15076                 case "$CPPFLAGS" in
15077                 *$cf_add_cflags) #(vi
15078                         ;;
15079                 *) #(vi
15080                         case $cf_add_cflags in #(vi
15081                         -D*)
15082                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15083
15084 CPPFLAGS=`echo "$CPPFLAGS" | \
15085         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15086                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15087
15088                                 ;;
15089                         esac
15090                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15091                         ;;
15092                 esac
15093                 ;;
15094         *)
15095                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15096                 ;;
15097         esac
15098         ;;
15099 yes)
15100         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15101
15102         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15103
15104         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15105                 && test -z "${cf_tst_cflags}" \
15106                 && cf_fix_cppflags=no
15107         ;;
15108 esac
15109 done
15110
15111 if test -n "$cf_new_cflags" ; then
15112
15113         CFLAGS="$CFLAGS $cf_new_cflags"
15114 fi
15115
15116 if test -n "$cf_new_cppflags" ; then
15117
15118         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15119 fi
15120
15121 if test -n "$cf_new_extra_cppflags" ; then
15122
15123         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15124 fi
15125
15126     fi
15127   fi
15128 fi
15129
15130 echo "$as_me:15130: checking for signal global datatype" >&5
15131 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15132 if test "${cf_cv_sig_atomic_t+set}" = set; then
15133   echo $ECHO_N "(cached) $ECHO_C" >&6
15134 else
15135
15136         for cf_type in \
15137                 "volatile sig_atomic_t" \
15138                 "sig_atomic_t" \
15139                 "int"
15140         do
15141         cat >conftest.$ac_ext <<_ACEOF
15142 #line 15142 "configure"
15143 #include "confdefs.h"
15144
15145 #include <sys/types.h>
15146 #include <signal.h>
15147 #include <stdio.h>
15148
15149 extern $cf_type x;
15150 $cf_type x;
15151 static void handler(int sig)
15152 {
15153         x = 5;
15154 }
15155 int
15156 main ()
15157 {
15158 signal(SIGINT, handler);
15159                  x = 1
15160   ;
15161   return 0;
15162 }
15163 _ACEOF
15164 rm -f conftest.$ac_objext
15165 if { (eval echo "$as_me:15165: \"$ac_compile\"") >&5
15166   (eval $ac_compile) 2>&5
15167   ac_status=$?
15168   echo "$as_me:15168: \$? = $ac_status" >&5
15169   (exit $ac_status); } &&
15170          { ac_try='test -s conftest.$ac_objext'
15171   { (eval echo "$as_me:15171: \"$ac_try\"") >&5
15172   (eval $ac_try) 2>&5
15173   ac_status=$?
15174   echo "$as_me:15174: \$? = $ac_status" >&5
15175   (exit $ac_status); }; }; then
15176   cf_cv_sig_atomic_t=$cf_type
15177 else
15178   echo "$as_me: failed program was:" >&5
15179 cat conftest.$ac_ext >&5
15180 cf_cv_sig_atomic_t=no
15181 fi
15182 rm -f conftest.$ac_objext conftest.$ac_ext
15183                 test "$cf_cv_sig_atomic_t" != no && break
15184         done
15185
15186 fi
15187
15188 echo "$as_me:15188: result: $cf_cv_sig_atomic_t" >&5
15189 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15190 test "$cf_cv_sig_atomic_t" != no &&
15191 cat >>confdefs.h <<EOF
15192 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15193 EOF
15194
15195 if test $NCURSES_CHTYPE = auto ; then
15196
15197 echo "$as_me:15197: checking for type of chtype" >&5
15198 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15199 if test "${cf_cv_typeof_chtype+set}" = set; then
15200   echo $ECHO_N "(cached) $ECHO_C" >&6
15201 else
15202
15203                 if test "$cross_compiling" = yes; then
15204   cf_cv_typeof_chtype=long
15205 else
15206   cat >conftest.$ac_ext <<_ACEOF
15207 #line 15207 "configure"
15208 #include "confdefs.h"
15209
15210 #define WANT_BITS 31
15211 #include <stdio.h>
15212 int main()
15213 {
15214         FILE *fp = fopen("cf_test.out", "w");
15215         if (fp != 0) {
15216                 char *result = "long";
15217                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15218                         int n;
15219                         unsigned int x, y;
15220                         for (n = 0; n < WANT_BITS; n++) {
15221                                 x = (1 << n);
15222                                 y = (x >> n);
15223                                 if (y != 1 || x == 0) {
15224                                         x = 0;
15225                                         break;
15226                                 }
15227                         }
15228                         /*
15229                          * If x is nonzero, an int is big enough for the bits
15230                          * that we want.
15231                          */
15232                         result = (x != 0) ? "int" : "long";
15233                 }
15234                 fputs(result, fp);
15235                 fclose(fp);
15236         }
15237         ${cf_cv_main_return:-return}(0);
15238 }
15239
15240 _ACEOF
15241 rm -f conftest$ac_exeext
15242 if { (eval echo "$as_me:15242: \"$ac_link\"") >&5
15243   (eval $ac_link) 2>&5
15244   ac_status=$?
15245   echo "$as_me:15245: \$? = $ac_status" >&5
15246   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15247   { (eval echo "$as_me:15247: \"$ac_try\"") >&5
15248   (eval $ac_try) 2>&5
15249   ac_status=$?
15250   echo "$as_me:15250: \$? = $ac_status" >&5
15251   (exit $ac_status); }; }; then
15252   cf_cv_typeof_chtype=`cat cf_test.out`
15253 else
15254   echo "$as_me: program exited with status $ac_status" >&5
15255 echo "$as_me: failed program was:" >&5
15256 cat conftest.$ac_ext >&5
15257 cf_cv_typeof_chtype=long
15258 fi
15259 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15260 fi
15261                 rm -f cf_test.out
15262
15263 fi
15264
15265 echo "$as_me:15265: result: $cf_cv_typeof_chtype" >&5
15266 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15267
15268 cat >>confdefs.h <<EOF
15269 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15270 EOF
15271
15272 else
15273         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15274 fi
15275 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15276
15277 echo "$as_me:15277: checking if unsigned literals are legal" >&5
15278 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15279 if test "${cf_cv_unsigned_literals+set}" = set; then
15280   echo $ECHO_N "(cached) $ECHO_C" >&6
15281 else
15282
15283         cat >conftest.$ac_ext <<_ACEOF
15284 #line 15284 "configure"
15285 #include "confdefs.h"
15286
15287 int
15288 main ()
15289 {
15290 long x = 1L + 1UL + 1U + 1
15291   ;
15292   return 0;
15293 }
15294 _ACEOF
15295 rm -f conftest.$ac_objext
15296 if { (eval echo "$as_me:15296: \"$ac_compile\"") >&5
15297   (eval $ac_compile) 2>&5
15298   ac_status=$?
15299   echo "$as_me:15299: \$? = $ac_status" >&5
15300   (exit $ac_status); } &&
15301          { ac_try='test -s conftest.$ac_objext'
15302   { (eval echo "$as_me:15302: \"$ac_try\"") >&5
15303   (eval $ac_try) 2>&5
15304   ac_status=$?
15305   echo "$as_me:15305: \$? = $ac_status" >&5
15306   (exit $ac_status); }; }; then
15307   cf_cv_unsigned_literals=yes
15308 else
15309   echo "$as_me: failed program was:" >&5
15310 cat conftest.$ac_ext >&5
15311 cf_cv_unsigned_literals=no
15312 fi
15313 rm -f conftest.$ac_objext conftest.$ac_ext
15314
15315 fi
15316
15317 echo "$as_me:15317: result: $cf_cv_unsigned_literals" >&5
15318 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15319
15320 cf_cv_1UL="1"
15321 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15322 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15323
15324 if test $NCURSES_MMASK_T = auto ; then
15325         cf_cv_typeof_mmask_t=long
15326 else
15327         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15328 fi
15329 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15330
15331 ###     Checks for external-data
15332
15333 echo "$as_me:15333: checking if external errno is declared" >&5
15334 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15335 if test "${cf_cv_dcl_errno+set}" = set; then
15336   echo $ECHO_N "(cached) $ECHO_C" >&6
15337 else
15338
15339     cat >conftest.$ac_ext <<_ACEOF
15340 #line 15340 "configure"
15341 #include "confdefs.h"
15342
15343 #ifdef HAVE_STDLIB_H
15344 #include <stdlib.h>
15345 #endif
15346 #include <stdio.h>
15347 #include <sys/types.h>
15348 #include <errno.h>
15349 int
15350 main ()
15351 {
15352 int x = (int) errno
15353   ;
15354   return 0;
15355 }
15356 _ACEOF
15357 rm -f conftest.$ac_objext
15358 if { (eval echo "$as_me:15358: \"$ac_compile\"") >&5
15359   (eval $ac_compile) 2>&5
15360   ac_status=$?
15361   echo "$as_me:15361: \$? = $ac_status" >&5
15362   (exit $ac_status); } &&
15363          { ac_try='test -s conftest.$ac_objext'
15364   { (eval echo "$as_me:15364: \"$ac_try\"") >&5
15365   (eval $ac_try) 2>&5
15366   ac_status=$?
15367   echo "$as_me:15367: \$? = $ac_status" >&5
15368   (exit $ac_status); }; }; then
15369   cf_cv_dcl_errno=yes
15370 else
15371   echo "$as_me: failed program was:" >&5
15372 cat conftest.$ac_ext >&5
15373 cf_cv_dcl_errno=no
15374 fi
15375 rm -f conftest.$ac_objext conftest.$ac_ext
15376
15377 fi
15378 echo "$as_me:15378: result: $cf_cv_dcl_errno" >&5
15379 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15380
15381 if test "$cf_cv_dcl_errno" = no ; then
15382
15383 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15384
15385     cat >>confdefs.h <<EOF
15386 #define $cf_result 1
15387 EOF
15388
15389 fi
15390
15391 # It's possible (for near-UNIX clones) that the data doesn't exist
15392
15393 echo "$as_me:15393: checking if external errno exists" >&5
15394 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15395 if test "${cf_cv_have_errno+set}" = set; then
15396   echo $ECHO_N "(cached) $ECHO_C" >&6
15397 else
15398
15399     cat >conftest.$ac_ext <<_ACEOF
15400 #line 15400 "configure"
15401 #include "confdefs.h"
15402
15403 #undef errno
15404 extern int errno;
15405
15406 int
15407 main ()
15408 {
15409 errno = 2
15410   ;
15411   return 0;
15412 }
15413 _ACEOF
15414 rm -f conftest.$ac_objext conftest$ac_exeext
15415 if { (eval echo "$as_me:15415: \"$ac_link\"") >&5
15416   (eval $ac_link) 2>&5
15417   ac_status=$?
15418   echo "$as_me:15418: \$? = $ac_status" >&5
15419   (exit $ac_status); } &&
15420          { ac_try='test -s conftest$ac_exeext'
15421   { (eval echo "$as_me:15421: \"$ac_try\"") >&5
15422   (eval $ac_try) 2>&5
15423   ac_status=$?
15424   echo "$as_me:15424: \$? = $ac_status" >&5
15425   (exit $ac_status); }; }; then
15426   cf_cv_have_errno=yes
15427 else
15428   echo "$as_me: failed program was:" >&5
15429 cat conftest.$ac_ext >&5
15430 cf_cv_have_errno=no
15431 fi
15432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15433
15434 fi
15435 echo "$as_me:15435: result: $cf_cv_have_errno" >&5
15436 echo "${ECHO_T}$cf_cv_have_errno" >&6
15437
15438 if test "$cf_cv_have_errno" = yes ; then
15439
15440 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15441
15442     cat >>confdefs.h <<EOF
15443 #define $cf_result 1
15444 EOF
15445
15446 fi
15447
15448 echo "$as_me:15448: checking if data-only library module links" >&5
15449 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15450 if test "${cf_cv_link_dataonly+set}" = set; then
15451   echo $ECHO_N "(cached) $ECHO_C" >&6
15452 else
15453
15454         rm -f conftest.a
15455         cat >conftest.$ac_ext <<EOF
15456 #line 15456 "configure"
15457 int     testdata[3] = { 123, 456, 789 };
15458 EOF
15459         if { (eval echo "$as_me:15459: \"$ac_compile\"") >&5
15460   (eval $ac_compile) 2>&5
15461   ac_status=$?
15462   echo "$as_me:15462: \$? = $ac_status" >&5
15463   (exit $ac_status); } ; then
15464                 mv conftest.o data.o && \
15465                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15466         fi
15467         rm -f conftest.$ac_ext data.o
15468         cat >conftest.$ac_ext <<EOF
15469 #line 15469 "configure"
15470 int     testfunc()
15471 {
15472 #if defined(NeXT)
15473         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15474 #else
15475         extern int testdata[3];
15476         return testdata[0] == 123
15477            &&  testdata[1] == 456
15478            &&  testdata[2] == 789;
15479 #endif
15480 }
15481 EOF
15482         if { (eval echo "$as_me:15482: \"$ac_compile\"") >&5
15483   (eval $ac_compile) 2>&5
15484   ac_status=$?
15485   echo "$as_me:15485: \$? = $ac_status" >&5
15486   (exit $ac_status); }; then
15487                 mv conftest.o func.o && \
15488                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15489         fi
15490         rm -f conftest.$ac_ext func.o
15491         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15492         cf_saveLIBS="$LIBS"
15493         LIBS="conftest.a $LIBS"
15494         if test "$cross_compiling" = yes; then
15495   cf_cv_link_dataonly=unknown
15496 else
15497   cat >conftest.$ac_ext <<_ACEOF
15498 #line 15498 "configure"
15499 #include "confdefs.h"
15500
15501         int main()
15502         {
15503                 extern int testfunc();
15504                 ${cf_cv_main_return:-return} (!testfunc());
15505         }
15506
15507 _ACEOF
15508 rm -f conftest$ac_exeext
15509 if { (eval echo "$as_me:15509: \"$ac_link\"") >&5
15510   (eval $ac_link) 2>&5
15511   ac_status=$?
15512   echo "$as_me:15512: \$? = $ac_status" >&5
15513   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15514   { (eval echo "$as_me:15514: \"$ac_try\"") >&5
15515   (eval $ac_try) 2>&5
15516   ac_status=$?
15517   echo "$as_me:15517: \$? = $ac_status" >&5
15518   (exit $ac_status); }; }; then
15519   cf_cv_link_dataonly=yes
15520 else
15521   echo "$as_me: program exited with status $ac_status" >&5
15522 echo "$as_me: failed program was:" >&5
15523 cat conftest.$ac_ext >&5
15524 cf_cv_link_dataonly=no
15525 fi
15526 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15527 fi
15528         LIBS="$cf_saveLIBS"
15529
15530 fi
15531
15532 echo "$as_me:15532: result: $cf_cv_link_dataonly" >&5
15533 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15534
15535 if test "$cf_cv_link_dataonly" = no ; then
15536
15537 cat >>confdefs.h <<\EOF
15538 #define BROKEN_LINKER 1
15539 EOF
15540
15541         BROKEN_LINKER=1
15542 fi
15543
15544 ###     Checks for library functions.
15545
15546 for ac_func in \
15547 getcwd \
15548 getegid \
15549 geteuid \
15550 getttynam \
15551 issetugid \
15552 poll \
15553 putenv \
15554 remove \
15555 select \
15556 setbuf \
15557 setbuffer \
15558 setenv \
15559 setvbuf \
15560 sigaction \
15561 sigvec \
15562 strdup \
15563 strstr \
15564 tcgetpgrp \
15565 times \
15566 vsnprintf \
15567
15568 do
15569 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15570 echo "$as_me:15570: checking for $ac_func" >&5
15571 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15572 if eval "test \"\${$as_ac_var+set}\" = set"; then
15573   echo $ECHO_N "(cached) $ECHO_C" >&6
15574 else
15575   cat >conftest.$ac_ext <<_ACEOF
15576 #line 15576 "configure"
15577 #include "confdefs.h"
15578 /* System header to define __stub macros and hopefully few prototypes,
15579     which can conflict with char $ac_func (); below.  */
15580 #include <assert.h>
15581 /* Override any gcc2 internal prototype to avoid an error.  */
15582 #ifdef __cplusplus
15583 extern "C"
15584 #endif
15585 /* We use char because int might match the return type of a gcc2
15586    builtin and then its argument prototype would still apply.  */
15587 char $ac_func ();
15588 char (*f) ();
15589
15590 int
15591 main ()
15592 {
15593 /* The GNU C library defines this for functions which it implements
15594     to always fail with ENOSYS.  Some functions are actually named
15595     something starting with __ and the normal name is an alias.  */
15596 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15597 choke me
15598 #else
15599 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15600 #endif
15601
15602   ;
15603   return 0;
15604 }
15605 _ACEOF
15606 rm -f conftest.$ac_objext conftest$ac_exeext
15607 if { (eval echo "$as_me:15607: \"$ac_link\"") >&5
15608   (eval $ac_link) 2>&5
15609   ac_status=$?
15610   echo "$as_me:15610: \$? = $ac_status" >&5
15611   (exit $ac_status); } &&
15612          { ac_try='test -s conftest$ac_exeext'
15613   { (eval echo "$as_me:15613: \"$ac_try\"") >&5
15614   (eval $ac_try) 2>&5
15615   ac_status=$?
15616   echo "$as_me:15616: \$? = $ac_status" >&5
15617   (exit $ac_status); }; }; then
15618   eval "$as_ac_var=yes"
15619 else
15620   echo "$as_me: failed program was:" >&5
15621 cat conftest.$ac_ext >&5
15622 eval "$as_ac_var=no"
15623 fi
15624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15625 fi
15626 echo "$as_me:15626: result: `eval echo '${'$as_ac_var'}'`" >&5
15627 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15628 if test `eval echo '${'$as_ac_var'}'` = yes; then
15629   cat >>confdefs.h <<EOF
15630 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15631 EOF
15632
15633 fi
15634 done
15635
15636 if test "x$with_getcap" = "xyes" ; then
15637
15638 echo "$as_me:15638: checking for terminal-capability database functions" >&5
15639 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15640 if test "${cf_cv_cgetent+set}" = set; then
15641   echo $ECHO_N "(cached) $ECHO_C" >&6
15642 else
15643
15644 cat >conftest.$ac_ext <<_ACEOF
15645 #line 15645 "configure"
15646 #include "confdefs.h"
15647
15648 #include <stdlib.h>
15649 int
15650 main ()
15651 {
15652
15653         char temp[128];
15654         char *buf = temp;
15655         char *db_array = temp;
15656         cgetent(&buf, &db_array, "vt100");
15657         cgetcap(buf, "tc", '=');
15658         cgetmatch(buf, "tc");
15659
15660   ;
15661   return 0;
15662 }
15663 _ACEOF
15664 rm -f conftest.$ac_objext conftest$ac_exeext
15665 if { (eval echo "$as_me:15665: \"$ac_link\"") >&5
15666   (eval $ac_link) 2>&5
15667   ac_status=$?
15668   echo "$as_me:15668: \$? = $ac_status" >&5
15669   (exit $ac_status); } &&
15670          { ac_try='test -s conftest$ac_exeext'
15671   { (eval echo "$as_me:15671: \"$ac_try\"") >&5
15672   (eval $ac_try) 2>&5
15673   ac_status=$?
15674   echo "$as_me:15674: \$? = $ac_status" >&5
15675   (exit $ac_status); }; }; then
15676   cf_cv_cgetent=yes
15677 else
15678   echo "$as_me: failed program was:" >&5
15679 cat conftest.$ac_ext >&5
15680 cf_cv_cgetent=no
15681 fi
15682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15683
15684 fi
15685 echo "$as_me:15685: result: $cf_cv_cgetent" >&5
15686 echo "${ECHO_T}$cf_cv_cgetent" >&6
15687
15688 if test "$cf_cv_cgetent" = yes
15689 then
15690
15691 cat >>confdefs.h <<\EOF
15692 #define HAVE_BSD_CGETENT 1
15693 EOF
15694
15695 echo "$as_me:15695: checking if cgetent uses const parameter" >&5
15696 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15697 if test "${cf_cv_cgetent_const+set}" = set; then
15698   echo $ECHO_N "(cached) $ECHO_C" >&6
15699 else
15700
15701 cat >conftest.$ac_ext <<_ACEOF
15702 #line 15702 "configure"
15703 #include "confdefs.h"
15704
15705 #include <stdlib.h>
15706 int
15707 main ()
15708 {
15709
15710         char temp[128];
15711         char *buf = temp;
15712 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15713         const char *db_array = temp;
15714         cgetent(&buf, &db_array, "vt100");
15715 #endif
15716         cgetcap(buf, "tc", '=');
15717         cgetmatch(buf, "tc");
15718
15719   ;
15720   return 0;
15721 }
15722 _ACEOF
15723 rm -f conftest.$ac_objext conftest$ac_exeext
15724 if { (eval echo "$as_me:15724: \"$ac_link\"") >&5
15725   (eval $ac_link) 2>&5
15726   ac_status=$?
15727   echo "$as_me:15727: \$? = $ac_status" >&5
15728   (exit $ac_status); } &&
15729          { ac_try='test -s conftest$ac_exeext'
15730   { (eval echo "$as_me:15730: \"$ac_try\"") >&5
15731   (eval $ac_try) 2>&5
15732   ac_status=$?
15733   echo "$as_me:15733: \$? = $ac_status" >&5
15734   (exit $ac_status); }; }; then
15735   cf_cv_cgetent_const=yes
15736 else
15737   echo "$as_me: failed program was:" >&5
15738 cat conftest.$ac_ext >&5
15739 cf_cv_cgetent_const=no
15740 fi
15741 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15742
15743 fi
15744 echo "$as_me:15744: result: $cf_cv_cgetent_const" >&5
15745 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15746         if test "$cf_cv_cgetent_const" = yes
15747         then
15748
15749 cat >>confdefs.h <<EOF
15750 #define CGETENT_CONST const
15751 EOF
15752
15753         fi
15754 fi
15755
15756 fi
15757
15758 echo "$as_me:15758: checking for isascii" >&5
15759 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15760 if test "${cf_cv_have_isascii+set}" = set; then
15761   echo $ECHO_N "(cached) $ECHO_C" >&6
15762 else
15763
15764         cat >conftest.$ac_ext <<_ACEOF
15765 #line 15765 "configure"
15766 #include "confdefs.h"
15767 #include <ctype.h>
15768 int
15769 main ()
15770 {
15771 int x = isascii(' ')
15772   ;
15773   return 0;
15774 }
15775 _ACEOF
15776 rm -f conftest.$ac_objext conftest$ac_exeext
15777 if { (eval echo "$as_me:15777: \"$ac_link\"") >&5
15778   (eval $ac_link) 2>&5
15779   ac_status=$?
15780   echo "$as_me:15780: \$? = $ac_status" >&5
15781   (exit $ac_status); } &&
15782          { ac_try='test -s conftest$ac_exeext'
15783   { (eval echo "$as_me:15783: \"$ac_try\"") >&5
15784   (eval $ac_try) 2>&5
15785   ac_status=$?
15786   echo "$as_me:15786: \$? = $ac_status" >&5
15787   (exit $ac_status); }; }; then
15788   cf_cv_have_isascii=yes
15789 else
15790   echo "$as_me: failed program was:" >&5
15791 cat conftest.$ac_ext >&5
15792 cf_cv_have_isascii=no
15793 fi
15794 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15795
15796 fi
15797 echo "$as_me:15797: result: $cf_cv_have_isascii" >&5
15798 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15799 test "$cf_cv_have_isascii" = yes &&
15800 cat >>confdefs.h <<\EOF
15801 #define HAVE_ISASCII 1
15802 EOF
15803
15804 if test "$ac_cv_func_sigaction" = yes; then
15805 echo "$as_me:15805: checking whether sigaction needs _POSIX_SOURCE" >&5
15806 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15807 cat >conftest.$ac_ext <<_ACEOF
15808 #line 15808 "configure"
15809 #include "confdefs.h"
15810
15811 #include <sys/types.h>
15812 #include <signal.h>
15813 int
15814 main ()
15815 {
15816 struct sigaction act
15817   ;
15818   return 0;
15819 }
15820 _ACEOF
15821 rm -f conftest.$ac_objext
15822 if { (eval echo "$as_me:15822: \"$ac_compile\"") >&5
15823   (eval $ac_compile) 2>&5
15824   ac_status=$?
15825   echo "$as_me:15825: \$? = $ac_status" >&5
15826   (exit $ac_status); } &&
15827          { ac_try='test -s conftest.$ac_objext'
15828   { (eval echo "$as_me:15828: \"$ac_try\"") >&5
15829   (eval $ac_try) 2>&5
15830   ac_status=$?
15831   echo "$as_me:15831: \$? = $ac_status" >&5
15832   (exit $ac_status); }; }; then
15833   sigact_bad=no
15834 else
15835   echo "$as_me: failed program was:" >&5
15836 cat conftest.$ac_ext >&5
15837
15838 cat >conftest.$ac_ext <<_ACEOF
15839 #line 15839 "configure"
15840 #include "confdefs.h"
15841
15842 #define _POSIX_SOURCE
15843 #include <sys/types.h>
15844 #include <signal.h>
15845 int
15846 main ()
15847 {
15848 struct sigaction act
15849   ;
15850   return 0;
15851 }
15852 _ACEOF
15853 rm -f conftest.$ac_objext
15854 if { (eval echo "$as_me:15854: \"$ac_compile\"") >&5
15855   (eval $ac_compile) 2>&5
15856   ac_status=$?
15857   echo "$as_me:15857: \$? = $ac_status" >&5
15858   (exit $ac_status); } &&
15859          { ac_try='test -s conftest.$ac_objext'
15860   { (eval echo "$as_me:15860: \"$ac_try\"") >&5
15861   (eval $ac_try) 2>&5
15862   ac_status=$?
15863   echo "$as_me:15863: \$? = $ac_status" >&5
15864   (exit $ac_status); }; }; then
15865   sigact_bad=yes
15866
15867 cat >>confdefs.h <<\EOF
15868 #define _POSIX_SOURCE 1
15869 EOF
15870
15871 else
15872   echo "$as_me: failed program was:" >&5
15873 cat conftest.$ac_ext >&5
15874 sigact_bad=unknown
15875 fi
15876 rm -f conftest.$ac_objext conftest.$ac_ext
15877 fi
15878 rm -f conftest.$ac_objext conftest.$ac_ext
15879 echo "$as_me:15879: result: $sigact_bad" >&5
15880 echo "${ECHO_T}$sigact_bad" >&6
15881 fi
15882
15883 echo "$as_me:15883: checking if nanosleep really works" >&5
15884 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15885 if test "${cf_cv_func_nanosleep+set}" = set; then
15886   echo $ECHO_N "(cached) $ECHO_C" >&6
15887 else
15888
15889 if test "$cross_compiling" = yes; then
15890   cf_cv_func_nanosleep=unknown
15891 else
15892   cat >conftest.$ac_ext <<_ACEOF
15893 #line 15893 "configure"
15894 #include "confdefs.h"
15895
15896 #include <stdio.h>
15897 #include <errno.h>
15898 #include <time.h>
15899
15900 #ifdef HAVE_SYS_TIME_H
15901 #include <sys/time.h>
15902 #endif
15903
15904 int main() {
15905         struct timespec ts1, ts2;
15906         int code;
15907         ts1.tv_sec  = 0;
15908         ts1.tv_nsec = 750000000;
15909         ts2.tv_sec  = 0;
15910         ts2.tv_nsec = 0;
15911         errno = 0;
15912         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15913         ${cf_cv_main_return:-return}(code != 0);
15914 }
15915
15916 _ACEOF
15917 rm -f conftest$ac_exeext
15918 if { (eval echo "$as_me:15918: \"$ac_link\"") >&5
15919   (eval $ac_link) 2>&5
15920   ac_status=$?
15921   echo "$as_me:15921: \$? = $ac_status" >&5
15922   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15923   { (eval echo "$as_me:15923: \"$ac_try\"") >&5
15924   (eval $ac_try) 2>&5
15925   ac_status=$?
15926   echo "$as_me:15926: \$? = $ac_status" >&5
15927   (exit $ac_status); }; }; then
15928   cf_cv_func_nanosleep=yes
15929 else
15930   echo "$as_me: program exited with status $ac_status" >&5
15931 echo "$as_me: failed program was:" >&5
15932 cat conftest.$ac_ext >&5
15933 cf_cv_func_nanosleep=no
15934 fi
15935 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15936 fi
15937 fi
15938 echo "$as_me:15938: result: $cf_cv_func_nanosleep" >&5
15939 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15940
15941 test "$cf_cv_func_nanosleep" = "yes" &&
15942 cat >>confdefs.h <<\EOF
15943 #define HAVE_NANOSLEEP 1
15944 EOF
15945
15946 for ac_header in \
15947 termio.h \
15948 termios.h \
15949 unistd.h \
15950
15951 do
15952 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15953 echo "$as_me:15953: checking for $ac_header" >&5
15954 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15955 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15956   echo $ECHO_N "(cached) $ECHO_C" >&6
15957 else
15958   cat >conftest.$ac_ext <<_ACEOF
15959 #line 15959 "configure"
15960 #include "confdefs.h"
15961 #include <$ac_header>
15962 _ACEOF
15963 if { (eval echo "$as_me:15963: \"$ac_cpp conftest.$ac_ext\"") >&5
15964   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15965   ac_status=$?
15966   egrep -v '^ *\+' conftest.er1 >conftest.err
15967   rm -f conftest.er1
15968   cat conftest.err >&5
15969   echo "$as_me:15969: \$? = $ac_status" >&5
15970   (exit $ac_status); } >/dev/null; then
15971   if test -s conftest.err; then
15972     ac_cpp_err=$ac_c_preproc_warn_flag
15973   else
15974     ac_cpp_err=
15975   fi
15976 else
15977   ac_cpp_err=yes
15978 fi
15979 if test -z "$ac_cpp_err"; then
15980   eval "$as_ac_Header=yes"
15981 else
15982   echo "$as_me: failed program was:" >&5
15983   cat conftest.$ac_ext >&5
15984   eval "$as_ac_Header=no"
15985 fi
15986 rm -f conftest.err conftest.$ac_ext
15987 fi
15988 echo "$as_me:15988: result: `eval echo '${'$as_ac_Header'}'`" >&5
15989 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15990 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15991   cat >>confdefs.h <<EOF
15992 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15993 EOF
15994
15995 fi
15996 done
15997
15998 if test "$ISC" = yes ; then
15999
16000 for ac_header in sys/termio.h
16001 do
16002 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16003 echo "$as_me:16003: checking for $ac_header" >&5
16004 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16005 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16006   echo $ECHO_N "(cached) $ECHO_C" >&6
16007 else
16008   cat >conftest.$ac_ext <<_ACEOF
16009 #line 16009 "configure"
16010 #include "confdefs.h"
16011 #include <$ac_header>
16012 _ACEOF
16013 if { (eval echo "$as_me:16013: \"$ac_cpp conftest.$ac_ext\"") >&5
16014   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16015   ac_status=$?
16016   egrep -v '^ *\+' conftest.er1 >conftest.err
16017   rm -f conftest.er1
16018   cat conftest.err >&5
16019   echo "$as_me:16019: \$? = $ac_status" >&5
16020   (exit $ac_status); } >/dev/null; then
16021   if test -s conftest.err; then
16022     ac_cpp_err=$ac_c_preproc_warn_flag
16023   else
16024     ac_cpp_err=
16025   fi
16026 else
16027   ac_cpp_err=yes
16028 fi
16029 if test -z "$ac_cpp_err"; then
16030   eval "$as_ac_Header=yes"
16031 else
16032   echo "$as_me: failed program was:" >&5
16033   cat conftest.$ac_ext >&5
16034   eval "$as_ac_Header=no"
16035 fi
16036 rm -f conftest.err conftest.$ac_ext
16037 fi
16038 echo "$as_me:16038: result: `eval echo '${'$as_ac_Header'}'`" >&5
16039 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16040 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16041   cat >>confdefs.h <<EOF
16042 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16043 EOF
16044
16045 fi
16046 done
16047
16048 fi
16049 if test "$ac_cv_header_termios_h" = yes ; then
16050         case "$CFLAGS $CPPFLAGS" in
16051         *-D_POSIX_SOURCE*)
16052                 termios_bad=dunno ;;
16053         *)      termios_bad=maybe ;;
16054         esac
16055         if test "$termios_bad" = maybe ; then
16056         echo "$as_me:16056: checking whether termios.h needs _POSIX_SOURCE" >&5
16057 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16058         cat >conftest.$ac_ext <<_ACEOF
16059 #line 16059 "configure"
16060 #include "confdefs.h"
16061 #include <termios.h>
16062 int
16063 main ()
16064 {
16065 struct termios foo; int x = foo.c_iflag
16066   ;
16067   return 0;
16068 }
16069 _ACEOF
16070 rm -f conftest.$ac_objext
16071 if { (eval echo "$as_me:16071: \"$ac_compile\"") >&5
16072   (eval $ac_compile) 2>&5
16073   ac_status=$?
16074   echo "$as_me:16074: \$? = $ac_status" >&5
16075   (exit $ac_status); } &&
16076          { ac_try='test -s conftest.$ac_objext'
16077   { (eval echo "$as_me:16077: \"$ac_try\"") >&5
16078   (eval $ac_try) 2>&5
16079   ac_status=$?
16080   echo "$as_me:16080: \$? = $ac_status" >&5
16081   (exit $ac_status); }; }; then
16082   termios_bad=no
16083 else
16084   echo "$as_me: failed program was:" >&5
16085 cat conftest.$ac_ext >&5
16086
16087                 cat >conftest.$ac_ext <<_ACEOF
16088 #line 16088 "configure"
16089 #include "confdefs.h"
16090
16091 #define _POSIX_SOURCE
16092 #include <termios.h>
16093 int
16094 main ()
16095 {
16096 struct termios foo; int x = foo.c_iflag
16097   ;
16098   return 0;
16099 }
16100 _ACEOF
16101 rm -f conftest.$ac_objext
16102 if { (eval echo "$as_me:16102: \"$ac_compile\"") >&5
16103   (eval $ac_compile) 2>&5
16104   ac_status=$?
16105   echo "$as_me:16105: \$? = $ac_status" >&5
16106   (exit $ac_status); } &&
16107          { ac_try='test -s conftest.$ac_objext'
16108   { (eval echo "$as_me:16108: \"$ac_try\"") >&5
16109   (eval $ac_try) 2>&5
16110   ac_status=$?
16111   echo "$as_me:16111: \$? = $ac_status" >&5
16112   (exit $ac_status); }; }; then
16113   termios_bad=unknown
16114 else
16115   echo "$as_me: failed program was:" >&5
16116 cat conftest.$ac_ext >&5
16117 termios_bad=yes
16118 cat >>confdefs.h <<\EOF
16119 #define _POSIX_SOURCE 1
16120 EOF
16121
16122 fi
16123 rm -f conftest.$ac_objext conftest.$ac_ext
16124
16125 fi
16126 rm -f conftest.$ac_objext conftest.$ac_ext
16127         echo "$as_me:16127: result: $termios_bad" >&5
16128 echo "${ECHO_T}$termios_bad" >&6
16129         fi
16130 fi
16131
16132 echo "$as_me:16132: checking for tcgetattr" >&5
16133 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16134 if test "${cf_cv_have_tcgetattr+set}" = set; then
16135   echo $ECHO_N "(cached) $ECHO_C" >&6
16136 else
16137
16138 cat >conftest.$ac_ext <<_ACEOF
16139 #line 16139 "configure"
16140 #include "confdefs.h"
16141
16142 #include <sys/types.h>
16143 #ifdef HAVE_UNISTD_H
16144 #include <unistd.h>
16145 #endif
16146 #ifdef HAVE_TERMIOS_H
16147 #include <termios.h>
16148 #define TTY struct termios
16149 #else
16150 #ifdef HAVE_TERMIO_H
16151 #include <termio.h>
16152 #define TTY struct termio
16153 #endif
16154 #endif
16155
16156 int
16157 main ()
16158 {
16159
16160 TTY foo;
16161 tcgetattr(1, &foo);
16162   ;
16163   return 0;
16164 }
16165 _ACEOF
16166 rm -f conftest.$ac_objext conftest$ac_exeext
16167 if { (eval echo "$as_me:16167: \"$ac_link\"") >&5
16168   (eval $ac_link) 2>&5
16169   ac_status=$?
16170   echo "$as_me:16170: \$? = $ac_status" >&5
16171   (exit $ac_status); } &&
16172          { ac_try='test -s conftest$ac_exeext'
16173   { (eval echo "$as_me:16173: \"$ac_try\"") >&5
16174   (eval $ac_try) 2>&5
16175   ac_status=$?
16176   echo "$as_me:16176: \$? = $ac_status" >&5
16177   (exit $ac_status); }; }; then
16178   cf_cv_have_tcgetattr=yes
16179 else
16180   echo "$as_me: failed program was:" >&5
16181 cat conftest.$ac_ext >&5
16182 cf_cv_have_tcgetattr=no
16183 fi
16184 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16185 fi
16186 echo "$as_me:16186: result: $cf_cv_have_tcgetattr" >&5
16187 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16188 test "$cf_cv_have_tcgetattr" = yes &&
16189 cat >>confdefs.h <<\EOF
16190 #define HAVE_TCGETATTR 1
16191 EOF
16192
16193 echo "$as_me:16193: checking for vsscanf function or workaround" >&5
16194 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16195 if test "${cf_cv_func_vsscanf+set}" = set; then
16196   echo $ECHO_N "(cached) $ECHO_C" >&6
16197 else
16198
16199 cat >conftest.$ac_ext <<_ACEOF
16200 #line 16200 "configure"
16201 #include "confdefs.h"
16202
16203 #include <stdarg.h>
16204 #include <stdio.h>
16205 int
16206 main ()
16207 {
16208
16209         va_list ap;
16210         vsscanf("from", "%d", ap)
16211   ;
16212   return 0;
16213 }
16214 _ACEOF
16215 rm -f conftest.$ac_objext conftest$ac_exeext
16216 if { (eval echo "$as_me:16216: \"$ac_link\"") >&5
16217   (eval $ac_link) 2>&5
16218   ac_status=$?
16219   echo "$as_me:16219: \$? = $ac_status" >&5
16220   (exit $ac_status); } &&
16221          { ac_try='test -s conftest$ac_exeext'
16222   { (eval echo "$as_me:16222: \"$ac_try\"") >&5
16223   (eval $ac_try) 2>&5
16224   ac_status=$?
16225   echo "$as_me:16225: \$? = $ac_status" >&5
16226   (exit $ac_status); }; }; then
16227   cf_cv_func_vsscanf=vsscanf
16228 else
16229   echo "$as_me: failed program was:" >&5
16230 cat conftest.$ac_ext >&5
16231
16232 cat >conftest.$ac_ext <<_ACEOF
16233 #line 16233 "configure"
16234 #include "confdefs.h"
16235
16236 #include <stdarg.h>
16237 #include <stdio.h>
16238 int
16239 main ()
16240 {
16241
16242     FILE strbuf;
16243     char *str = "from";
16244
16245     strbuf._flag = _IOREAD;
16246     strbuf._ptr = strbuf._base = (unsigned char *) str;
16247     strbuf._cnt = strlen(str);
16248     strbuf._file = _NFILE;
16249     return (vfscanf(&strbuf, "%d", ap))
16250   ;
16251   return 0;
16252 }
16253 _ACEOF
16254 rm -f conftest.$ac_objext conftest$ac_exeext
16255 if { (eval echo "$as_me:16255: \"$ac_link\"") >&5
16256   (eval $ac_link) 2>&5
16257   ac_status=$?
16258   echo "$as_me:16258: \$? = $ac_status" >&5
16259   (exit $ac_status); } &&
16260          { ac_try='test -s conftest$ac_exeext'
16261   { (eval echo "$as_me:16261: \"$ac_try\"") >&5
16262   (eval $ac_try) 2>&5
16263   ac_status=$?
16264   echo "$as_me:16264: \$? = $ac_status" >&5
16265   (exit $ac_status); }; }; then
16266   cf_cv_func_vsscanf=vfscanf
16267 else
16268   echo "$as_me: failed program was:" >&5
16269 cat conftest.$ac_ext >&5
16270
16271 cat >conftest.$ac_ext <<_ACEOF
16272 #line 16272 "configure"
16273 #include "confdefs.h"
16274
16275 #include <stdarg.h>
16276 #include <stdio.h>
16277 int
16278 main ()
16279 {
16280
16281     FILE strbuf;
16282     char *str = "from";
16283
16284     strbuf._flag = _IOREAD;
16285     strbuf._ptr = strbuf._base = (unsigned char *) str;
16286     strbuf._cnt = strlen(str);
16287     strbuf._file = _NFILE;
16288     return (_doscan(&strbuf, "%d", ap))
16289   ;
16290   return 0;
16291 }
16292 _ACEOF
16293 rm -f conftest.$ac_objext conftest$ac_exeext
16294 if { (eval echo "$as_me:16294: \"$ac_link\"") >&5
16295   (eval $ac_link) 2>&5
16296   ac_status=$?
16297   echo "$as_me:16297: \$? = $ac_status" >&5
16298   (exit $ac_status); } &&
16299          { ac_try='test -s conftest$ac_exeext'
16300   { (eval echo "$as_me:16300: \"$ac_try\"") >&5
16301   (eval $ac_try) 2>&5
16302   ac_status=$?
16303   echo "$as_me:16303: \$? = $ac_status" >&5
16304   (exit $ac_status); }; }; then
16305   cf_cv_func_vsscanf=_doscan
16306 else
16307   echo "$as_me: failed program was:" >&5
16308 cat conftest.$ac_ext >&5
16309
16310 cf_cv_func_vsscanf=no
16311 fi
16312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16313 fi
16314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16315 fi
16316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16317 fi
16318 echo "$as_me:16318: result: $cf_cv_func_vsscanf" >&5
16319 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16320
16321 case $cf_cv_func_vsscanf in #(vi
16322 vsscanf)
16323 cat >>confdefs.h <<\EOF
16324 #define HAVE_VSSCANF 1
16325 EOF
16326 ;; #(vi
16327 vfscanf)
16328 cat >>confdefs.h <<\EOF
16329 #define HAVE_VFSCANF 1
16330 EOF
16331 ;; #(vi
16332 _doscan)
16333 cat >>confdefs.h <<\EOF
16334 #define HAVE__DOSCAN 1
16335 EOF
16336 ;;
16337 esac
16338
16339 echo "$as_me:16339: checking for working mkstemp" >&5
16340 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16341 if test "${cf_cv_func_mkstemp+set}" = set; then
16342   echo $ECHO_N "(cached) $ECHO_C" >&6
16343 else
16344
16345 rm -rf conftest*
16346 if test "$cross_compiling" = yes; then
16347   cf_cv_func_mkstemp=maybe
16348 else
16349   cat >conftest.$ac_ext <<_ACEOF
16350 #line 16350 "configure"
16351 #include "confdefs.h"
16352
16353 #include <sys/types.h>
16354 #include <stdlib.h>
16355 #include <stdio.h>
16356 #include <string.h>
16357 #include <sys/stat.h>
16358 int main()
16359 {
16360         char *tmpl = "conftestXXXXXX";
16361         char name[2][80];
16362         int n;
16363         int result = 0;
16364         int fd;
16365         struct stat sb;
16366
16367         umask(077);
16368         for (n = 0; n < 2; ++n) {
16369                 strcpy(name[n], tmpl);
16370                 if ((fd = mkstemp(name[n])) >= 0) {
16371                         if (!strcmp(name[n], tmpl)
16372                          || stat(name[n], &sb) != 0
16373                          || (sb.st_mode & S_IFMT) != S_IFREG
16374                          || (sb.st_mode & 077) != 0) {
16375                                 result = 1;
16376                         }
16377                         close(fd);
16378                 }
16379         }
16380         if (result == 0
16381          && !strcmp(name[0], name[1]))
16382                 result = 1;
16383         ${cf_cv_main_return:-return}(result);
16384 }
16385
16386 _ACEOF
16387 rm -f conftest$ac_exeext
16388 if { (eval echo "$as_me:16388: \"$ac_link\"") >&5
16389   (eval $ac_link) 2>&5
16390   ac_status=$?
16391   echo "$as_me:16391: \$? = $ac_status" >&5
16392   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16393   { (eval echo "$as_me:16393: \"$ac_try\"") >&5
16394   (eval $ac_try) 2>&5
16395   ac_status=$?
16396   echo "$as_me:16396: \$? = $ac_status" >&5
16397   (exit $ac_status); }; }; then
16398   cf_cv_func_mkstemp=yes
16399
16400 else
16401   echo "$as_me: program exited with status $ac_status" >&5
16402 echo "$as_me: failed program was:" >&5
16403 cat conftest.$ac_ext >&5
16404 cf_cv_func_mkstemp=no
16405
16406 fi
16407 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16408 fi
16409
16410 fi
16411 echo "$as_me:16411: result: $cf_cv_func_mkstemp" >&5
16412 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16413 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16414         echo "$as_me:16414: checking for mkstemp" >&5
16415 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16416 if test "${ac_cv_func_mkstemp+set}" = set; then
16417   echo $ECHO_N "(cached) $ECHO_C" >&6
16418 else
16419   cat >conftest.$ac_ext <<_ACEOF
16420 #line 16420 "configure"
16421 #include "confdefs.h"
16422 /* System header to define __stub macros and hopefully few prototypes,
16423     which can conflict with char mkstemp (); below.  */
16424 #include <assert.h>
16425 /* Override any gcc2 internal prototype to avoid an error.  */
16426 #ifdef __cplusplus
16427 extern "C"
16428 #endif
16429 /* We use char because int might match the return type of a gcc2
16430    builtin and then its argument prototype would still apply.  */
16431 char mkstemp ();
16432 char (*f) ();
16433
16434 int
16435 main ()
16436 {
16437 /* The GNU C library defines this for functions which it implements
16438     to always fail with ENOSYS.  Some functions are actually named
16439     something starting with __ and the normal name is an alias.  */
16440 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16441 choke me
16442 #else
16443 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16444 #endif
16445
16446   ;
16447   return 0;
16448 }
16449 _ACEOF
16450 rm -f conftest.$ac_objext conftest$ac_exeext
16451 if { (eval echo "$as_me:16451: \"$ac_link\"") >&5
16452   (eval $ac_link) 2>&5
16453   ac_status=$?
16454   echo "$as_me:16454: \$? = $ac_status" >&5
16455   (exit $ac_status); } &&
16456          { ac_try='test -s conftest$ac_exeext'
16457   { (eval echo "$as_me:16457: \"$ac_try\"") >&5
16458   (eval $ac_try) 2>&5
16459   ac_status=$?
16460   echo "$as_me:16460: \$? = $ac_status" >&5
16461   (exit $ac_status); }; }; then
16462   ac_cv_func_mkstemp=yes
16463 else
16464   echo "$as_me: failed program was:" >&5
16465 cat conftest.$ac_ext >&5
16466 ac_cv_func_mkstemp=no
16467 fi
16468 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16469 fi
16470 echo "$as_me:16470: result: $ac_cv_func_mkstemp" >&5
16471 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16472
16473 fi
16474 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16475
16476 cat >>confdefs.h <<\EOF
16477 #define HAVE_MKSTEMP 1
16478 EOF
16479
16480 fi
16481
16482 # setup for prototype of fallback for vsscanf()
16483
16484 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16485         HAVE_VSSCANF=1
16486 else
16487         HAVE_VSSCANF=0
16488 fi
16489
16490 if test "x$cross_compiling" = xyes ; then
16491         { echo "$as_me:16491: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16492 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16493 else
16494         echo "$as_me:16494: checking whether setvbuf arguments are reversed" >&5
16495 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16496 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16497   echo $ECHO_N "(cached) $ECHO_C" >&6
16498 else
16499   if test "$cross_compiling" = yes; then
16500   { { echo "$as_me:16500: error: cannot run test program while cross compiling" >&5
16501 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16502    { (exit 1); exit 1; }; }
16503 else
16504   cat >conftest.$ac_ext <<_ACEOF
16505 #line 16505 "configure"
16506 #include "confdefs.h"
16507 #include <stdio.h>
16508 /* If setvbuf has the reversed format, exit 0. */
16509 int
16510 main ()
16511 {
16512   /* This call has the arguments reversed.
16513      A reversed system may check and see that the address of main
16514      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16515   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16516     $ac_main_return(1);
16517   putc('\r', stdout);
16518   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16519 }
16520 _ACEOF
16521 rm -f conftest$ac_exeext
16522 if { (eval echo "$as_me:16522: \"$ac_link\"") >&5
16523   (eval $ac_link) 2>&5
16524   ac_status=$?
16525   echo "$as_me:16525: \$? = $ac_status" >&5
16526   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16527   { (eval echo "$as_me:16527: \"$ac_try\"") >&5
16528   (eval $ac_try) 2>&5
16529   ac_status=$?
16530   echo "$as_me:16530: \$? = $ac_status" >&5
16531   (exit $ac_status); }; }; then
16532   ac_cv_func_setvbuf_reversed=yes
16533 else
16534   echo "$as_me: program exited with status $ac_status" >&5
16535 echo "$as_me: failed program was:" >&5
16536 cat conftest.$ac_ext >&5
16537 ac_cv_func_setvbuf_reversed=no
16538 fi
16539 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16540 fi
16541 rm -f core core.* *.core
16542 fi
16543 echo "$as_me:16543: result: $ac_cv_func_setvbuf_reversed" >&5
16544 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16545 if test $ac_cv_func_setvbuf_reversed = yes; then
16546
16547 cat >>confdefs.h <<\EOF
16548 #define SETVBUF_REVERSED 1
16549 EOF
16550
16551 fi
16552
16553 fi
16554 echo "$as_me:16554: checking for intptr_t" >&5
16555 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16556 if test "${ac_cv_type_intptr_t+set}" = set; then
16557   echo $ECHO_N "(cached) $ECHO_C" >&6
16558 else
16559   cat >conftest.$ac_ext <<_ACEOF
16560 #line 16560 "configure"
16561 #include "confdefs.h"
16562 $ac_includes_default
16563 int
16564 main ()
16565 {
16566 if ((intptr_t *) 0)
16567   return 0;
16568 if (sizeof (intptr_t))
16569   return 0;
16570   ;
16571   return 0;
16572 }
16573 _ACEOF
16574 rm -f conftest.$ac_objext
16575 if { (eval echo "$as_me:16575: \"$ac_compile\"") >&5
16576   (eval $ac_compile) 2>&5
16577   ac_status=$?
16578   echo "$as_me:16578: \$? = $ac_status" >&5
16579   (exit $ac_status); } &&
16580          { ac_try='test -s conftest.$ac_objext'
16581   { (eval echo "$as_me:16581: \"$ac_try\"") >&5
16582   (eval $ac_try) 2>&5
16583   ac_status=$?
16584   echo "$as_me:16584: \$? = $ac_status" >&5
16585   (exit $ac_status); }; }; then
16586   ac_cv_type_intptr_t=yes
16587 else
16588   echo "$as_me: failed program was:" >&5
16589 cat conftest.$ac_ext >&5
16590 ac_cv_type_intptr_t=no
16591 fi
16592 rm -f conftest.$ac_objext conftest.$ac_ext
16593 fi
16594 echo "$as_me:16594: result: $ac_cv_type_intptr_t" >&5
16595 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16596 if test $ac_cv_type_intptr_t = yes; then
16597   :
16598 else
16599
16600 cat >>confdefs.h <<EOF
16601 #define intptr_t long
16602 EOF
16603
16604 fi
16605
16606 echo "$as_me:16606: checking for type sigaction_t" >&5
16607 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16608 if test "${cf_cv_type_sigaction+set}" = set; then
16609   echo $ECHO_N "(cached) $ECHO_C" >&6
16610 else
16611
16612         cat >conftest.$ac_ext <<_ACEOF
16613 #line 16613 "configure"
16614 #include "confdefs.h"
16615
16616 #include <signal.h>
16617 int
16618 main ()
16619 {
16620 sigaction_t x
16621   ;
16622   return 0;
16623 }
16624 _ACEOF
16625 rm -f conftest.$ac_objext
16626 if { (eval echo "$as_me:16626: \"$ac_compile\"") >&5
16627   (eval $ac_compile) 2>&5
16628   ac_status=$?
16629   echo "$as_me:16629: \$? = $ac_status" >&5
16630   (exit $ac_status); } &&
16631          { ac_try='test -s conftest.$ac_objext'
16632   { (eval echo "$as_me:16632: \"$ac_try\"") >&5
16633   (eval $ac_try) 2>&5
16634   ac_status=$?
16635   echo "$as_me:16635: \$? = $ac_status" >&5
16636   (exit $ac_status); }; }; then
16637   cf_cv_type_sigaction=yes
16638 else
16639   echo "$as_me: failed program was:" >&5
16640 cat conftest.$ac_ext >&5
16641 cf_cv_type_sigaction=no
16642 fi
16643 rm -f conftest.$ac_objext conftest.$ac_ext
16644 fi
16645
16646 echo "$as_me:16646: result: $cf_cv_type_sigaction" >&5
16647 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16648 test "$cf_cv_type_sigaction" = yes &&
16649 cat >>confdefs.h <<\EOF
16650 #define HAVE_TYPE_SIGACTION 1
16651 EOF
16652
16653 echo "$as_me:16653: checking declaration of size-change" >&5
16654 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16655 if test "${cf_cv_sizechange+set}" = set; then
16656   echo $ECHO_N "(cached) $ECHO_C" >&6
16657 else
16658
16659     cf_cv_sizechange=unknown
16660     cf_save_CPPFLAGS="$CPPFLAGS"
16661
16662 for cf_opts in "" "NEED_PTEM_H"
16663 do
16664
16665     CPPFLAGS="$cf_save_CPPFLAGS"
16666     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16667     cat >conftest.$ac_ext <<_ACEOF
16668 #line 16668 "configure"
16669 #include "confdefs.h"
16670 #include <sys/types.h>
16671 #ifdef HAVE_TERMIOS_H
16672 #include <termios.h>
16673 #else
16674 #ifdef HAVE_TERMIO_H
16675 #include <termio.h>
16676 #endif
16677 #endif
16678 #ifdef NEED_PTEM_H
16679 /* This is a workaround for SCO:  they neglected to define struct winsize in
16680  * termios.h -- it's only in termio.h and ptem.h
16681  */
16682 #include        <sys/stream.h>
16683 #include        <sys/ptem.h>
16684 #endif
16685 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16686 #include <sys/ioctl.h>
16687 #endif
16688
16689 int
16690 main ()
16691 {
16692
16693 #ifdef TIOCGSIZE
16694         struct ttysize win;     /* FIXME: what system is this? */
16695         int y = win.ts_lines;
16696         int x = win.ts_cols;
16697 #else
16698 #ifdef TIOCGWINSZ
16699         struct winsize win;
16700         int y = win.ws_row;
16701         int x = win.ws_col;
16702 #else
16703         no TIOCGSIZE or TIOCGWINSZ
16704 #endif /* TIOCGWINSZ */
16705 #endif /* TIOCGSIZE */
16706
16707   ;
16708   return 0;
16709 }
16710 _ACEOF
16711 rm -f conftest.$ac_objext
16712 if { (eval echo "$as_me:16712: \"$ac_compile\"") >&5
16713   (eval $ac_compile) 2>&5
16714   ac_status=$?
16715   echo "$as_me:16715: \$? = $ac_status" >&5
16716   (exit $ac_status); } &&
16717          { ac_try='test -s conftest.$ac_objext'
16718   { (eval echo "$as_me:16718: \"$ac_try\"") >&5
16719   (eval $ac_try) 2>&5
16720   ac_status=$?
16721   echo "$as_me:16721: \$? = $ac_status" >&5
16722   (exit $ac_status); }; }; then
16723   cf_cv_sizechange=yes
16724 else
16725   echo "$as_me: failed program was:" >&5
16726 cat conftest.$ac_ext >&5
16727 cf_cv_sizechange=no
16728 fi
16729 rm -f conftest.$ac_objext conftest.$ac_ext
16730
16731         CPPFLAGS="$cf_save_CPPFLAGS"
16732         if test "$cf_cv_sizechange" = yes ; then
16733                 echo "size-change succeeded ($cf_opts)" >&5
16734                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16735                 break
16736         fi
16737 done
16738
16739 fi
16740 echo "$as_me:16740: result: $cf_cv_sizechange" >&5
16741 echo "${ECHO_T}$cf_cv_sizechange" >&6
16742 if test "$cf_cv_sizechange" != no ; then
16743
16744 cat >>confdefs.h <<\EOF
16745 #define HAVE_SIZECHANGE 1
16746 EOF
16747
16748         case $cf_cv_sizechange in #(vi
16749         NEED*)
16750                 cat >>confdefs.h <<EOF
16751 #define $cf_cv_sizechange  1
16752 EOF
16753
16754                 ;;
16755         esac
16756 fi
16757
16758 echo "$as_me:16758: checking for memmove" >&5
16759 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16760 if test "${ac_cv_func_memmove+set}" = set; then
16761   echo $ECHO_N "(cached) $ECHO_C" >&6
16762 else
16763   cat >conftest.$ac_ext <<_ACEOF
16764 #line 16764 "configure"
16765 #include "confdefs.h"
16766 /* System header to define __stub macros and hopefully few prototypes,
16767     which can conflict with char memmove (); below.  */
16768 #include <assert.h>
16769 /* Override any gcc2 internal prototype to avoid an error.  */
16770 #ifdef __cplusplus
16771 extern "C"
16772 #endif
16773 /* We use char because int might match the return type of a gcc2
16774    builtin and then its argument prototype would still apply.  */
16775 char memmove ();
16776 char (*f) ();
16777
16778 int
16779 main ()
16780 {
16781 /* The GNU C library defines this for functions which it implements
16782     to always fail with ENOSYS.  Some functions are actually named
16783     something starting with __ and the normal name is an alias.  */
16784 #if defined (__stub_memmove) || defined (__stub___memmove)
16785 choke me
16786 #else
16787 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16788 #endif
16789
16790   ;
16791   return 0;
16792 }
16793 _ACEOF
16794 rm -f conftest.$ac_objext conftest$ac_exeext
16795 if { (eval echo "$as_me:16795: \"$ac_link\"") >&5
16796   (eval $ac_link) 2>&5
16797   ac_status=$?
16798   echo "$as_me:16798: \$? = $ac_status" >&5
16799   (exit $ac_status); } &&
16800          { ac_try='test -s conftest$ac_exeext'
16801   { (eval echo "$as_me:16801: \"$ac_try\"") >&5
16802   (eval $ac_try) 2>&5
16803   ac_status=$?
16804   echo "$as_me:16804: \$? = $ac_status" >&5
16805   (exit $ac_status); }; }; then
16806   ac_cv_func_memmove=yes
16807 else
16808   echo "$as_me: failed program was:" >&5
16809 cat conftest.$ac_ext >&5
16810 ac_cv_func_memmove=no
16811 fi
16812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16813 fi
16814 echo "$as_me:16814: result: $ac_cv_func_memmove" >&5
16815 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16816 if test $ac_cv_func_memmove = yes; then
16817   :
16818 else
16819
16820 echo "$as_me:16820: checking for bcopy" >&5
16821 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16822 if test "${ac_cv_func_bcopy+set}" = set; then
16823   echo $ECHO_N "(cached) $ECHO_C" >&6
16824 else
16825   cat >conftest.$ac_ext <<_ACEOF
16826 #line 16826 "configure"
16827 #include "confdefs.h"
16828 /* System header to define __stub macros and hopefully few prototypes,
16829     which can conflict with char bcopy (); below.  */
16830 #include <assert.h>
16831 /* Override any gcc2 internal prototype to avoid an error.  */
16832 #ifdef __cplusplus
16833 extern "C"
16834 #endif
16835 /* We use char because int might match the return type of a gcc2
16836    builtin and then its argument prototype would still apply.  */
16837 char bcopy ();
16838 char (*f) ();
16839
16840 int
16841 main ()
16842 {
16843 /* The GNU C library defines this for functions which it implements
16844     to always fail with ENOSYS.  Some functions are actually named
16845     something starting with __ and the normal name is an alias.  */
16846 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16847 choke me
16848 #else
16849 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16850 #endif
16851
16852   ;
16853   return 0;
16854 }
16855 _ACEOF
16856 rm -f conftest.$ac_objext conftest$ac_exeext
16857 if { (eval echo "$as_me:16857: \"$ac_link\"") >&5
16858   (eval $ac_link) 2>&5
16859   ac_status=$?
16860   echo "$as_me:16860: \$? = $ac_status" >&5
16861   (exit $ac_status); } &&
16862          { ac_try='test -s conftest$ac_exeext'
16863   { (eval echo "$as_me:16863: \"$ac_try\"") >&5
16864   (eval $ac_try) 2>&5
16865   ac_status=$?
16866   echo "$as_me:16866: \$? = $ac_status" >&5
16867   (exit $ac_status); }; }; then
16868   ac_cv_func_bcopy=yes
16869 else
16870   echo "$as_me: failed program was:" >&5
16871 cat conftest.$ac_ext >&5
16872 ac_cv_func_bcopy=no
16873 fi
16874 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16875 fi
16876 echo "$as_me:16876: result: $ac_cv_func_bcopy" >&5
16877 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16878 if test $ac_cv_func_bcopy = yes; then
16879
16880         echo "$as_me:16880: checking if bcopy does overlapping moves" >&5
16881 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16882 if test "${cf_cv_good_bcopy+set}" = set; then
16883   echo $ECHO_N "(cached) $ECHO_C" >&6
16884 else
16885
16886                 if test "$cross_compiling" = yes; then
16887   cf_cv_good_bcopy=unknown
16888 else
16889   cat >conftest.$ac_ext <<_ACEOF
16890 #line 16890 "configure"
16891 #include "confdefs.h"
16892
16893 int main() {
16894         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16895         char temp[40];
16896         bcopy(data, temp, sizeof(data));
16897         bcopy(temp+10, temp, 15);
16898         bcopy(temp+5, temp+15, 10);
16899         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16900 }
16901
16902 _ACEOF
16903 rm -f conftest$ac_exeext
16904 if { (eval echo "$as_me:16904: \"$ac_link\"") >&5
16905   (eval $ac_link) 2>&5
16906   ac_status=$?
16907   echo "$as_me:16907: \$? = $ac_status" >&5
16908   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16909   { (eval echo "$as_me:16909: \"$ac_try\"") >&5
16910   (eval $ac_try) 2>&5
16911   ac_status=$?
16912   echo "$as_me:16912: \$? = $ac_status" >&5
16913   (exit $ac_status); }; }; then
16914   cf_cv_good_bcopy=yes
16915 else
16916   echo "$as_me: program exited with status $ac_status" >&5
16917 echo "$as_me: failed program was:" >&5
16918 cat conftest.$ac_ext >&5
16919 cf_cv_good_bcopy=no
16920 fi
16921 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16922 fi
16923
16924 fi
16925 echo "$as_me:16925: result: $cf_cv_good_bcopy" >&5
16926 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16927
16928 else
16929   cf_cv_good_bcopy=no
16930 fi
16931
16932         if test "$cf_cv_good_bcopy" = yes ; then
16933
16934 cat >>confdefs.h <<\EOF
16935 #define USE_OK_BCOPY 1
16936 EOF
16937
16938         else
16939
16940 cat >>confdefs.h <<\EOF
16941 #define USE_MY_MEMMOVE 1
16942 EOF
16943
16944         fi
16945
16946 fi
16947
16948 echo "$as_me:16948: checking if poll really works" >&5
16949 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16950 if test "${cf_cv_working_poll+set}" = set; then
16951   echo $ECHO_N "(cached) $ECHO_C" >&6
16952 else
16953
16954 if test "$cross_compiling" = yes; then
16955   cf_cv_working_poll=unknown
16956 else
16957   cat >conftest.$ac_ext <<_ACEOF
16958 #line 16958 "configure"
16959 #include "confdefs.h"
16960
16961 #include <stdlib.h>
16962 #include <stdio.h>
16963 #include <unistd.h>
16964 #include <fcntl.h>
16965 #ifdef HAVE_POLL_H
16966 #include <poll.h>
16967 #else
16968 #include <sys/poll.h>
16969 #endif
16970 int main() {
16971         struct pollfd myfds;
16972         int ret;
16973
16974         /* check for Darwin bug with respect to "devices" */
16975         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16976         if (myfds.fd < 0)
16977                 myfds.fd = 0;
16978         myfds.events = POLLIN;
16979         myfds.revents = 0;
16980
16981         ret = poll(&myfds, 1, 100);
16982
16983         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16984                 ret = -1;
16985         } else {
16986                 int fd = 0;
16987                 if (!isatty(fd)) {
16988                         fd = open("/dev/tty", 2);       /* O_RDWR */
16989                 }
16990
16991                 if (fd >= 0) {
16992                         /* also check with standard input */
16993                         myfds.fd = fd;
16994                         myfds.events = POLLIN;
16995                         myfds.revents = 0;
16996                         ret = poll(&myfds, 1, 100);
16997                 } else {
16998                         ret = -1;
16999                 }
17000         }
17001         ${cf_cv_main_return:-return}(ret < 0);
17002 }
17003 _ACEOF
17004 rm -f conftest$ac_exeext
17005 if { (eval echo "$as_me:17005: \"$ac_link\"") >&5
17006   (eval $ac_link) 2>&5
17007   ac_status=$?
17008   echo "$as_me:17008: \$? = $ac_status" >&5
17009   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17010   { (eval echo "$as_me:17010: \"$ac_try\"") >&5
17011   (eval $ac_try) 2>&5
17012   ac_status=$?
17013   echo "$as_me:17013: \$? = $ac_status" >&5
17014   (exit $ac_status); }; }; then
17015   cf_cv_working_poll=yes
17016 else
17017   echo "$as_me: program exited with status $ac_status" >&5
17018 echo "$as_me: failed program was:" >&5
17019 cat conftest.$ac_ext >&5
17020 cf_cv_working_poll=no
17021 fi
17022 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17023 fi
17024 fi
17025 echo "$as_me:17025: result: $cf_cv_working_poll" >&5
17026 echo "${ECHO_T}$cf_cv_working_poll" >&6
17027 test "$cf_cv_working_poll" = "yes" &&
17028 cat >>confdefs.h <<\EOF
17029 #define HAVE_WORKING_POLL 1
17030 EOF
17031
17032 echo "$as_me:17032: checking for va_copy" >&5
17033 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17034 if test "${cf_cv_have_va_copy+set}" = set; then
17035   echo $ECHO_N "(cached) $ECHO_C" >&6
17036 else
17037
17038 cat >conftest.$ac_ext <<_ACEOF
17039 #line 17039 "configure"
17040 #include "confdefs.h"
17041
17042 #include <stdarg.h>
17043
17044 int
17045 main ()
17046 {
17047
17048         static va_list dst;
17049         static va_list src;
17050         va_copy(dst, src)
17051   ;
17052   return 0;
17053 }
17054 _ACEOF
17055 rm -f conftest.$ac_objext conftest$ac_exeext
17056 if { (eval echo "$as_me:17056: \"$ac_link\"") >&5
17057   (eval $ac_link) 2>&5
17058   ac_status=$?
17059   echo "$as_me:17059: \$? = $ac_status" >&5
17060   (exit $ac_status); } &&
17061          { ac_try='test -s conftest$ac_exeext'
17062   { (eval echo "$as_me:17062: \"$ac_try\"") >&5
17063   (eval $ac_try) 2>&5
17064   ac_status=$?
17065   echo "$as_me:17065: \$? = $ac_status" >&5
17066   (exit $ac_status); }; }; then
17067   cf_cv_have_va_copy=yes
17068 else
17069   echo "$as_me: failed program was:" >&5
17070 cat conftest.$ac_ext >&5
17071 cf_cv_have_va_copy=no
17072 fi
17073 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17074 fi
17075 echo "$as_me:17075: result: $cf_cv_have_va_copy" >&5
17076 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17077
17078 test "$cf_cv_have_va_copy" = yes &&
17079 cat >>confdefs.h <<\EOF
17080 #define HAVE_VA_COPY 1
17081 EOF
17082
17083 echo "$as_me:17083: checking for __va_copy" >&5
17084 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17085 if test "${cf_cv_have___va_copy+set}" = set; then
17086   echo $ECHO_N "(cached) $ECHO_C" >&6
17087 else
17088
17089 cat >conftest.$ac_ext <<_ACEOF
17090 #line 17090 "configure"
17091 #include "confdefs.h"
17092
17093 #include <stdarg.h>
17094
17095 int
17096 main ()
17097 {
17098
17099         static va_list dst;
17100         static va_list src;
17101         __va_copy(dst, src)
17102   ;
17103   return 0;
17104 }
17105 _ACEOF
17106 rm -f conftest.$ac_objext conftest$ac_exeext
17107 if { (eval echo "$as_me:17107: \"$ac_link\"") >&5
17108   (eval $ac_link) 2>&5
17109   ac_status=$?
17110   echo "$as_me:17110: \$? = $ac_status" >&5
17111   (exit $ac_status); } &&
17112          { ac_try='test -s conftest$ac_exeext'
17113   { (eval echo "$as_me:17113: \"$ac_try\"") >&5
17114   (eval $ac_try) 2>&5
17115   ac_status=$?
17116   echo "$as_me:17116: \$? = $ac_status" >&5
17117   (exit $ac_status); }; }; then
17118   cf_cv_have___va_copy=yes
17119 else
17120   echo "$as_me: failed program was:" >&5
17121 cat conftest.$ac_ext >&5
17122 cf_cv_have___va_copy=no
17123 fi
17124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17125 fi
17126 echo "$as_me:17126: result: $cf_cv_have___va_copy" >&5
17127 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17128
17129 test "$cf_cv_have___va_copy" = yes &&
17130 cat >>confdefs.h <<\EOF
17131 #define HAVE___VA_COPY 1
17132 EOF
17133
17134 echo "$as_me:17134: checking for pid_t" >&5
17135 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17136 if test "${ac_cv_type_pid_t+set}" = set; then
17137   echo $ECHO_N "(cached) $ECHO_C" >&6
17138 else
17139   cat >conftest.$ac_ext <<_ACEOF
17140 #line 17140 "configure"
17141 #include "confdefs.h"
17142 $ac_includes_default
17143 int
17144 main ()
17145 {
17146 if ((pid_t *) 0)
17147   return 0;
17148 if (sizeof (pid_t))
17149   return 0;
17150   ;
17151   return 0;
17152 }
17153 _ACEOF
17154 rm -f conftest.$ac_objext
17155 if { (eval echo "$as_me:17155: \"$ac_compile\"") >&5
17156   (eval $ac_compile) 2>&5
17157   ac_status=$?
17158   echo "$as_me:17158: \$? = $ac_status" >&5
17159   (exit $ac_status); } &&
17160          { ac_try='test -s conftest.$ac_objext'
17161   { (eval echo "$as_me:17161: \"$ac_try\"") >&5
17162   (eval $ac_try) 2>&5
17163   ac_status=$?
17164   echo "$as_me:17164: \$? = $ac_status" >&5
17165   (exit $ac_status); }; }; then
17166   ac_cv_type_pid_t=yes
17167 else
17168   echo "$as_me: failed program was:" >&5
17169 cat conftest.$ac_ext >&5
17170 ac_cv_type_pid_t=no
17171 fi
17172 rm -f conftest.$ac_objext conftest.$ac_ext
17173 fi
17174 echo "$as_me:17174: result: $ac_cv_type_pid_t" >&5
17175 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17176 if test $ac_cv_type_pid_t = yes; then
17177   :
17178 else
17179
17180 cat >>confdefs.h <<EOF
17181 #define pid_t int
17182 EOF
17183
17184 fi
17185
17186 for ac_header in unistd.h vfork.h
17187 do
17188 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17189 echo "$as_me:17189: checking for $ac_header" >&5
17190 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17191 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17192   echo $ECHO_N "(cached) $ECHO_C" >&6
17193 else
17194   cat >conftest.$ac_ext <<_ACEOF
17195 #line 17195 "configure"
17196 #include "confdefs.h"
17197 #include <$ac_header>
17198 _ACEOF
17199 if { (eval echo "$as_me:17199: \"$ac_cpp conftest.$ac_ext\"") >&5
17200   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17201   ac_status=$?
17202   egrep -v '^ *\+' conftest.er1 >conftest.err
17203   rm -f conftest.er1
17204   cat conftest.err >&5
17205   echo "$as_me:17205: \$? = $ac_status" >&5
17206   (exit $ac_status); } >/dev/null; then
17207   if test -s conftest.err; then
17208     ac_cpp_err=$ac_c_preproc_warn_flag
17209   else
17210     ac_cpp_err=
17211   fi
17212 else
17213   ac_cpp_err=yes
17214 fi
17215 if test -z "$ac_cpp_err"; then
17216   eval "$as_ac_Header=yes"
17217 else
17218   echo "$as_me: failed program was:" >&5
17219   cat conftest.$ac_ext >&5
17220   eval "$as_ac_Header=no"
17221 fi
17222 rm -f conftest.err conftest.$ac_ext
17223 fi
17224 echo "$as_me:17224: result: `eval echo '${'$as_ac_Header'}'`" >&5
17225 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17226 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17227   cat >>confdefs.h <<EOF
17228 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17229 EOF
17230
17231 fi
17232 done
17233
17234 for ac_func in fork vfork
17235 do
17236 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17237 echo "$as_me:17237: checking for $ac_func" >&5
17238 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17239 if eval "test \"\${$as_ac_var+set}\" = set"; then
17240   echo $ECHO_N "(cached) $ECHO_C" >&6
17241 else
17242   cat >conftest.$ac_ext <<_ACEOF
17243 #line 17243 "configure"
17244 #include "confdefs.h"
17245 /* System header to define __stub macros and hopefully few prototypes,
17246     which can conflict with char $ac_func (); below.  */
17247 #include <assert.h>
17248 /* Override any gcc2 internal prototype to avoid an error.  */
17249 #ifdef __cplusplus
17250 extern "C"
17251 #endif
17252 /* We use char because int might match the return type of a gcc2
17253    builtin and then its argument prototype would still apply.  */
17254 char $ac_func ();
17255 char (*f) ();
17256
17257 int
17258 main ()
17259 {
17260 /* The GNU C library defines this for functions which it implements
17261     to always fail with ENOSYS.  Some functions are actually named
17262     something starting with __ and the normal name is an alias.  */
17263 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17264 choke me
17265 #else
17266 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17267 #endif
17268
17269   ;
17270   return 0;
17271 }
17272 _ACEOF
17273 rm -f conftest.$ac_objext conftest$ac_exeext
17274 if { (eval echo "$as_me:17274: \"$ac_link\"") >&5
17275   (eval $ac_link) 2>&5
17276   ac_status=$?
17277   echo "$as_me:17277: \$? = $ac_status" >&5
17278   (exit $ac_status); } &&
17279          { ac_try='test -s conftest$ac_exeext'
17280   { (eval echo "$as_me:17280: \"$ac_try\"") >&5
17281   (eval $ac_try) 2>&5
17282   ac_status=$?
17283   echo "$as_me:17283: \$? = $ac_status" >&5
17284   (exit $ac_status); }; }; then
17285   eval "$as_ac_var=yes"
17286 else
17287   echo "$as_me: failed program was:" >&5
17288 cat conftest.$ac_ext >&5
17289 eval "$as_ac_var=no"
17290 fi
17291 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17292 fi
17293 echo "$as_me:17293: result: `eval echo '${'$as_ac_var'}'`" >&5
17294 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17295 if test `eval echo '${'$as_ac_var'}'` = yes; then
17296   cat >>confdefs.h <<EOF
17297 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17298 EOF
17299
17300 fi
17301 done
17302
17303 ac_cv_func_fork_works=$ac_cv_func_fork
17304 if test "x$ac_cv_func_fork" = xyes; then
17305   echo "$as_me:17305: checking for working fork" >&5
17306 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17307 if test "${ac_cv_func_fork_works+set}" = set; then
17308   echo $ECHO_N "(cached) $ECHO_C" >&6
17309 else
17310   if test "$cross_compiling" = yes; then
17311   ac_cv_func_fork_works=cross
17312 else
17313   cat >conftest.$ac_ext <<_ACEOF
17314 /* By Rüdiger Kuhlmann. */
17315       #include <sys/types.h>
17316       #if HAVE_UNISTD_H
17317       # include <unistd.h>
17318       #endif
17319       /* Some systems only have a dummy stub for fork() */
17320       int main ()
17321       {
17322         if (fork() < 0)
17323           $ac_main_return (1);
17324         $ac_main_return (0);
17325       }
17326 _ACEOF
17327 rm -f conftest$ac_exeext
17328 if { (eval echo "$as_me:17328: \"$ac_link\"") >&5
17329   (eval $ac_link) 2>&5
17330   ac_status=$?
17331   echo "$as_me:17331: \$? = $ac_status" >&5
17332   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17333   { (eval echo "$as_me:17333: \"$ac_try\"") >&5
17334   (eval $ac_try) 2>&5
17335   ac_status=$?
17336   echo "$as_me:17336: \$? = $ac_status" >&5
17337   (exit $ac_status); }; }; then
17338   ac_cv_func_fork_works=yes
17339 else
17340   echo "$as_me: program exited with status $ac_status" >&5
17341 echo "$as_me: failed program was:" >&5
17342 cat conftest.$ac_ext >&5
17343 ac_cv_func_fork_works=no
17344 fi
17345 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17346 fi
17347 fi
17348 echo "$as_me:17348: result: $ac_cv_func_fork_works" >&5
17349 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17350
17351 fi
17352 if test "x$ac_cv_func_fork_works" = xcross; then
17353   case $host in
17354     *-*-amigaos* | *-*-msdosdjgpp*)
17355       # Override, as these systems have only a dummy fork() stub
17356       ac_cv_func_fork_works=no
17357       ;;
17358     *)
17359       ac_cv_func_fork_works=yes
17360       ;;
17361   esac
17362   { echo "$as_me:17362: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17363 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17364 fi
17365 ac_cv_func_vfork_works=$ac_cv_func_vfork
17366 if test "x$ac_cv_func_vfork" = xyes; then
17367   echo "$as_me:17367: checking for working vfork" >&5
17368 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17369 if test "${ac_cv_func_vfork_works+set}" = set; then
17370   echo $ECHO_N "(cached) $ECHO_C" >&6
17371 else
17372   if test "$cross_compiling" = yes; then
17373   ac_cv_func_vfork_works=cross
17374 else
17375   cat >conftest.$ac_ext <<_ACEOF
17376 #line 17376 "configure"
17377 #include "confdefs.h"
17378 /* Thanks to Paul Eggert for this test.  */
17379 #include <stdio.h>
17380 #include <sys/types.h>
17381 #include <sys/stat.h>
17382 #if HAVE_UNISTD_H
17383 # include <unistd.h>
17384 #endif
17385 #if HAVE_VFORK_H
17386 # include <vfork.h>
17387 #endif
17388 /* On some sparc systems, changes by the child to local and incoming
17389    argument registers are propagated back to the parent.  The compiler
17390    is told about this with #include <vfork.h>, but some compilers
17391    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17392    static variable whose address is put into a register that is
17393    clobbered by the vfork.  */
17394 static
17395 #ifdef __cplusplus
17396 sparc_address_test (int arg)
17397 # else
17398 sparc_address_test (arg) int arg;
17399 #endif
17400 {
17401   static pid_t child;
17402   if (!child) {
17403     child = vfork ();
17404     if (child < 0) {
17405       perror ("vfork");
17406       _exit(2);
17407     }
17408     if (!child) {
17409       arg = getpid();
17410       write(-1, "", 0);
17411       _exit (arg);
17412     }
17413   }
17414 }
17415
17416 int
17417 main ()
17418 {
17419   pid_t parent = getpid ();
17420   pid_t child;
17421
17422   sparc_address_test ();
17423
17424   child = vfork ();
17425
17426   if (child == 0) {
17427     /* Here is another test for sparc vfork register problems.  This
17428        test uses lots of local variables, at least as many local
17429        variables as main has allocated so far including compiler
17430        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17431        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17432        reuse the register of parent for one of the local variables,
17433        since it will think that parent can't possibly be used any more
17434        in this routine.  Assigning to the local variable will thus
17435        munge parent in the parent process.  */
17436     pid_t
17437       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17438       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17439     /* Convince the compiler that p..p7 are live; otherwise, it might
17440        use the same hardware register for all 8 local variables.  */
17441     if (p != p1 || p != p2 || p != p3 || p != p4
17442         || p != p5 || p != p6 || p != p7)
17443       _exit(1);
17444
17445     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17446        from child file descriptors.  If the child closes a descriptor
17447        before it execs or exits, this munges the parent's descriptor
17448        as well.  Test for this by closing stdout in the child.  */
17449     _exit(close(fileno(stdout)) != 0);
17450   } else {
17451     int status;
17452     struct stat st;
17453
17454     while (wait(&status) != child)
17455       ;
17456     $ac_main_return(
17457          /* Was there some problem with vforking?  */
17458          child < 0
17459
17460          /* Did the child fail?  (This shouldn't happen.)  */
17461          || status
17462
17463          /* Did the vfork/compiler bug occur?  */
17464          || parent != getpid()
17465
17466          /* Did the file descriptor bug occur?  */
17467          || fstat(fileno(stdout), &st) != 0
17468          );
17469   }
17470 }
17471 _ACEOF
17472 rm -f conftest$ac_exeext
17473 if { (eval echo "$as_me:17473: \"$ac_link\"") >&5
17474   (eval $ac_link) 2>&5
17475   ac_status=$?
17476   echo "$as_me:17476: \$? = $ac_status" >&5
17477   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17478   { (eval echo "$as_me:17478: \"$ac_try\"") >&5
17479   (eval $ac_try) 2>&5
17480   ac_status=$?
17481   echo "$as_me:17481: \$? = $ac_status" >&5
17482   (exit $ac_status); }; }; then
17483   ac_cv_func_vfork_works=yes
17484 else
17485   echo "$as_me: program exited with status $ac_status" >&5
17486 echo "$as_me: failed program was:" >&5
17487 cat conftest.$ac_ext >&5
17488 ac_cv_func_vfork_works=no
17489 fi
17490 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17491 fi
17492 fi
17493 echo "$as_me:17493: result: $ac_cv_func_vfork_works" >&5
17494 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17495
17496 fi;
17497 if test "x$ac_cv_func_fork_works" = xcross; then
17498   ac_cv_func_vfork_works=ac_cv_func_vfork
17499   { echo "$as_me:17499: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17500 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17501 fi
17502
17503 if test "x$ac_cv_func_vfork_works" = xyes; then
17504
17505 cat >>confdefs.h <<\EOF
17506 #define HAVE_WORKING_VFORK 1
17507 EOF
17508
17509 else
17510
17511 cat >>confdefs.h <<\EOF
17512 #define vfork fork
17513 EOF
17514
17515 fi
17516 if test "x$ac_cv_func_fork_works" = xyes; then
17517
17518 cat >>confdefs.h <<\EOF
17519 #define HAVE_WORKING_FORK 1
17520 EOF
17521
17522 fi
17523
17524 # special check for test/ditto.c
17525
17526 echo "$as_me:17526: checking for openpty in -lutil" >&5
17527 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17528 if test "${ac_cv_lib_util_openpty+set}" = set; then
17529   echo $ECHO_N "(cached) $ECHO_C" >&6
17530 else
17531   ac_check_lib_save_LIBS=$LIBS
17532 LIBS="-lutil  $LIBS"
17533 cat >conftest.$ac_ext <<_ACEOF
17534 #line 17534 "configure"
17535 #include "confdefs.h"
17536
17537 /* Override any gcc2 internal prototype to avoid an error.  */
17538 #ifdef __cplusplus
17539 extern "C"
17540 #endif
17541 /* We use char because int might match the return type of a gcc2
17542    builtin and then its argument prototype would still apply.  */
17543 char openpty ();
17544 int
17545 main ()
17546 {
17547 openpty ();
17548   ;
17549   return 0;
17550 }
17551 _ACEOF
17552 rm -f conftest.$ac_objext conftest$ac_exeext
17553 if { (eval echo "$as_me:17553: \"$ac_link\"") >&5
17554   (eval $ac_link) 2>&5
17555   ac_status=$?
17556   echo "$as_me:17556: \$? = $ac_status" >&5
17557   (exit $ac_status); } &&
17558          { ac_try='test -s conftest$ac_exeext'
17559   { (eval echo "$as_me:17559: \"$ac_try\"") >&5
17560   (eval $ac_try) 2>&5
17561   ac_status=$?
17562   echo "$as_me:17562: \$? = $ac_status" >&5
17563   (exit $ac_status); }; }; then
17564   ac_cv_lib_util_openpty=yes
17565 else
17566   echo "$as_me: failed program was:" >&5
17567 cat conftest.$ac_ext >&5
17568 ac_cv_lib_util_openpty=no
17569 fi
17570 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17571 LIBS=$ac_check_lib_save_LIBS
17572 fi
17573 echo "$as_me:17573: result: $ac_cv_lib_util_openpty" >&5
17574 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17575 if test $ac_cv_lib_util_openpty = yes; then
17576   cf_cv_lib_util=yes
17577 else
17578   cf_cv_lib_util=no
17579 fi
17580
17581 echo "$as_me:17581: checking for openpty header" >&5
17582 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17583 if test "${cf_cv_func_openpty+set}" = set; then
17584   echo $ECHO_N "(cached) $ECHO_C" >&6
17585 else
17586
17587     cf_save_LIBS="$LIBS"
17588     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17589     for cf_header in pty.h libutil.h util.h
17590     do
17591     cat >conftest.$ac_ext <<_ACEOF
17592 #line 17592 "configure"
17593 #include "confdefs.h"
17594
17595 #include <$cf_header>
17596
17597 int
17598 main ()
17599 {
17600
17601     int x = openpty((int *)0, (int *)0, (char *)0,
17602                    (struct termios *)0, (struct winsize *)0);
17603
17604   ;
17605   return 0;
17606 }
17607 _ACEOF
17608 rm -f conftest.$ac_objext conftest$ac_exeext
17609 if { (eval echo "$as_me:17609: \"$ac_link\"") >&5
17610   (eval $ac_link) 2>&5
17611   ac_status=$?
17612   echo "$as_me:17612: \$? = $ac_status" >&5
17613   (exit $ac_status); } &&
17614          { ac_try='test -s conftest$ac_exeext'
17615   { (eval echo "$as_me:17615: \"$ac_try\"") >&5
17616   (eval $ac_try) 2>&5
17617   ac_status=$?
17618   echo "$as_me:17618: \$? = $ac_status" >&5
17619   (exit $ac_status); }; }; then
17620
17621         cf_cv_func_openpty=$cf_header
17622         break
17623
17624 else
17625   echo "$as_me: failed program was:" >&5
17626 cat conftest.$ac_ext >&5
17627
17628         cf_cv_func_openpty=no
17629
17630 fi
17631 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17632     done
17633     LIBS="$cf_save_LIBS"
17634
17635 fi
17636 echo "$as_me:17636: result: $cf_cv_func_openpty" >&5
17637 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17638
17639 if test "$cf_cv_func_openpty" != no ; then
17640
17641 cat >>confdefs.h <<EOF
17642 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17643 EOF
17644
17645 cat >>confdefs.h <<\EOF
17646 #define USE_XTERM_PTY 1
17647 EOF
17648
17649     if test "x$cf_cv_lib_util" = xyes ; then
17650         TEST_LIBS="-lutil $TEST_LIBS"
17651     fi
17652 fi
17653
17654 if test "$with_hashed_db" != no ; then
17655
17656 cat >>confdefs.h <<\EOF
17657 #define USE_HASHED_DB 1
17658 EOF
17659
17660 case $with_hashed_db in #(vi
17661 yes|*able*) #(vi
17662     ;;
17663 *)
17664     if test -d "$with_hashed_db" ; then
17665
17666 if test -n "$with_hashed_db/include" ; then
17667   for cf_add_incdir in $with_hashed_db/include
17668   do
17669         while test $cf_add_incdir != /usr/include
17670         do
17671           if test -d $cf_add_incdir
17672           then
17673                 cf_have_incdir=no
17674                 if test -n "$CFLAGS$CPPFLAGS" ; then
17675                   # a loop is needed to ensure we can add subdirs of existing dirs
17676                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17677                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17678                           cf_have_incdir=yes; break
17679                         fi
17680                   done
17681                 fi
17682
17683                 if test "$cf_have_incdir" = no ; then
17684                   if test "$cf_add_incdir" = /usr/local/include ; then
17685                         if test "$GCC" = yes
17686                         then
17687                           cf_save_CPPFLAGS=$CPPFLAGS
17688                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17689                           cat >conftest.$ac_ext <<_ACEOF
17690 #line 17690 "configure"
17691 #include "confdefs.h"
17692 #include <stdio.h>
17693 int
17694 main ()
17695 {
17696 printf("Hello")
17697   ;
17698   return 0;
17699 }
17700 _ACEOF
17701 rm -f conftest.$ac_objext
17702 if { (eval echo "$as_me:17702: \"$ac_compile\"") >&5
17703   (eval $ac_compile) 2>&5
17704   ac_status=$?
17705   echo "$as_me:17705: \$? = $ac_status" >&5
17706   (exit $ac_status); } &&
17707          { ac_try='test -s conftest.$ac_objext'
17708   { (eval echo "$as_me:17708: \"$ac_try\"") >&5
17709   (eval $ac_try) 2>&5
17710   ac_status=$?
17711   echo "$as_me:17711: \$? = $ac_status" >&5
17712   (exit $ac_status); }; }; then
17713   :
17714 else
17715   echo "$as_me: failed program was:" >&5
17716 cat conftest.$ac_ext >&5
17717 cf_have_incdir=yes
17718 fi
17719 rm -f conftest.$ac_objext conftest.$ac_ext
17720                           CPPFLAGS=$cf_save_CPPFLAGS
17721                         fi
17722                   fi
17723                 fi
17724
17725                 if test "$cf_have_incdir" = no ; then
17726                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17727
17728 echo "${as_me:-configure}:17728: testing adding $cf_add_incdir to include-path ..." 1>&5
17729
17730                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17731
17732                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17733                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17734                   cf_add_incdir="$cf_top_incdir"
17735                 else
17736                   break
17737                 fi
17738           fi
17739         done
17740   done
17741 fi
17742
17743 if test -n "$with_hashed_db/lib" ; then
17744   for cf_add_libdir in $with_hashed_db/lib
17745   do
17746     if test $cf_add_libdir = /usr/lib ; then
17747       :
17748     elif test -d $cf_add_libdir
17749     then
17750       cf_have_libdir=no
17751       if test -n "$LDFLAGS$LIBS" ; then
17752         # a loop is needed to ensure we can add subdirs of existing dirs
17753         for cf_test_libdir in $LDFLAGS $LIBS ; do
17754           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17755             cf_have_libdir=yes; break
17756           fi
17757         done
17758       fi
17759       if test "$cf_have_libdir" = no ; then
17760         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17761
17762 echo "${as_me:-configure}:17762: testing adding $cf_add_libdir to library-path ..." 1>&5
17763
17764         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17765       fi
17766     fi
17767   done
17768 fi
17769
17770     fi
17771 esac
17772
17773 echo "$as_me:17773: checking for db.h" >&5
17774 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17775 if test "${ac_cv_header_db_h+set}" = set; then
17776   echo $ECHO_N "(cached) $ECHO_C" >&6
17777 else
17778   cat >conftest.$ac_ext <<_ACEOF
17779 #line 17779 "configure"
17780 #include "confdefs.h"
17781 #include <db.h>
17782 _ACEOF
17783 if { (eval echo "$as_me:17783: \"$ac_cpp conftest.$ac_ext\"") >&5
17784   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17785   ac_status=$?
17786   egrep -v '^ *\+' conftest.er1 >conftest.err
17787   rm -f conftest.er1
17788   cat conftest.err >&5
17789   echo "$as_me:17789: \$? = $ac_status" >&5
17790   (exit $ac_status); } >/dev/null; then
17791   if test -s conftest.err; then
17792     ac_cpp_err=$ac_c_preproc_warn_flag
17793   else
17794     ac_cpp_err=
17795   fi
17796 else
17797   ac_cpp_err=yes
17798 fi
17799 if test -z "$ac_cpp_err"; then
17800   ac_cv_header_db_h=yes
17801 else
17802   echo "$as_me: failed program was:" >&5
17803   cat conftest.$ac_ext >&5
17804   ac_cv_header_db_h=no
17805 fi
17806 rm -f conftest.err conftest.$ac_ext
17807 fi
17808 echo "$as_me:17808: result: $ac_cv_header_db_h" >&5
17809 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17810 if test $ac_cv_header_db_h = yes; then
17811
17812 echo "$as_me:17812: checking for version of db" >&5
17813 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17814 if test "${cf_cv_hashed_db_version+set}" = set; then
17815   echo $ECHO_N "(cached) $ECHO_C" >&6
17816 else
17817
17818 cf_cv_hashed_db_version=unknown
17819
17820 for cf_db_version in 1 2 3 4 5
17821 do
17822
17823 echo "${as_me:-configure}:17823: testing checking for db version $cf_db_version ..." 1>&5
17824
17825         cat >conftest.$ac_ext <<_ACEOF
17826 #line 17826 "configure"
17827 #include "confdefs.h"
17828
17829 $ac_includes_default
17830 #include <db.h>
17831
17832 #ifdef DB_VERSION_MAJOR
17833         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17834 #if $cf_db_version == DB_VERSION_MAJOR
17835         /* ok */
17836 #else
17837         make an error
17838 #endif
17839 #else
17840 #if $cf_db_version == 1
17841         /* ok: assuming this is DB 1.8.5 */
17842 #else
17843         make an error
17844 #endif
17845 #endif
17846
17847 int
17848 main ()
17849 {
17850 DBT *foo = 0
17851   ;
17852   return 0;
17853 }
17854 _ACEOF
17855 rm -f conftest.$ac_objext
17856 if { (eval echo "$as_me:17856: \"$ac_compile\"") >&5
17857   (eval $ac_compile) 2>&5
17858   ac_status=$?
17859   echo "$as_me:17859: \$? = $ac_status" >&5
17860   (exit $ac_status); } &&
17861          { ac_try='test -s conftest.$ac_objext'
17862   { (eval echo "$as_me:17862: \"$ac_try\"") >&5
17863   (eval $ac_try) 2>&5
17864   ac_status=$?
17865   echo "$as_me:17865: \$? = $ac_status" >&5
17866   (exit $ac_status); }; }; then
17867
17868         cf_cv_hashed_db_version=$cf_db_version
17869         break
17870
17871 else
17872   echo "$as_me: failed program was:" >&5
17873 cat conftest.$ac_ext >&5
17874 fi
17875 rm -f conftest.$ac_objext conftest.$ac_ext
17876 done
17877
17878 fi
17879 echo "$as_me:17879: result: $cf_cv_hashed_db_version" >&5
17880 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17881
17882 if test "$cf_cv_hashed_db_version" = unknown ; then
17883         { { echo "$as_me:17883: error: Cannot determine version of db" >&5
17884 echo "$as_me: error: Cannot determine version of db" >&2;}
17885    { (exit 1); exit 1; }; }
17886 else
17887
17888 echo "$as_me:17888: checking for db libraries" >&5
17889 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17890 if test "${cf_cv_hashed_db_libs+set}" = set; then
17891   echo $ECHO_N "(cached) $ECHO_C" >&6
17892 else
17893
17894 cf_cv_hashed_db_libs=unknown
17895 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17896 do
17897         cf_save_libs="$LIBS"
17898         if test -n "$cf_db_libs"; then
17899                 LIBS="-l$cf_db_libs $LIBS"
17900         fi
17901
17902 echo "${as_me:-configure}:17902: testing checking for library "$cf_db_libs" ..." 1>&5
17903
17904         cat >conftest.$ac_ext <<_ACEOF
17905 #line 17905 "configure"
17906 #include "confdefs.h"
17907
17908 $ac_includes_default
17909 #include <db.h>
17910
17911 int
17912 main ()
17913 {
17914
17915         char *path = "/tmp/foo";
17916 #ifdef DB_VERSION_MAJOR
17917 #if DB_VERSION_MAJOR >= 4
17918         DB *result = 0;
17919         db_create(&result, NULL, 0);
17920         result->open(result,
17921                 NULL,
17922                 path,
17923                 path,
17924                 DB_HASH,
17925                 DB_CREATE,
17926                 0644);
17927 #elif DB_VERSION_MAJOR >= 3
17928         DB *result = 0;
17929         db_create(&result, NULL, 0);
17930         result->open(result,
17931                 path,
17932                 path,
17933                 DB_HASH,
17934                 DB_CREATE,
17935                 0644);
17936 #elif DB_VERSION_MAJOR >= 2
17937         DB *result = 0;
17938         db_open(path,
17939                 DB_HASH,
17940                 DB_CREATE,
17941                 0644,
17942                 (DB_ENV *) 0,
17943                 (DB_INFO *) 0,
17944                 &result);
17945 #endif /* DB_VERSION_MAJOR */
17946 #else
17947         DB *result = dbopen(path,
17948                      2,
17949                      0644,
17950                      DB_HASH,
17951                      0);
17952 #endif
17953         ${cf_cv_main_return:-return}(result != 0)
17954
17955   ;
17956   return 0;
17957 }
17958 _ACEOF
17959 rm -f conftest.$ac_objext conftest$ac_exeext
17960 if { (eval echo "$as_me:17960: \"$ac_link\"") >&5
17961   (eval $ac_link) 2>&5
17962   ac_status=$?
17963   echo "$as_me:17963: \$? = $ac_status" >&5
17964   (exit $ac_status); } &&
17965          { ac_try='test -s conftest$ac_exeext'
17966   { (eval echo "$as_me:17966: \"$ac_try\"") >&5
17967   (eval $ac_try) 2>&5
17968   ac_status=$?
17969   echo "$as_me:17969: \$? = $ac_status" >&5
17970   (exit $ac_status); }; }; then
17971
17972         if test -n "$cf_db_libs" ; then
17973                 cf_cv_hashed_db_libs=$cf_db_libs
17974         else
17975                 cf_cv_hashed_db_libs=default
17976         fi
17977         LIBS="$cf_save_libs"
17978         break
17979
17980 else
17981   echo "$as_me: failed program was:" >&5
17982 cat conftest.$ac_ext >&5
17983 fi
17984 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17985         LIBS="$cf_save_libs"
17986 done
17987
17988 fi
17989 echo "$as_me:17989: result: $cf_cv_hashed_db_libs" >&5
17990 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17991
17992         if test "$cf_cv_hashed_db_libs" = unknown ; then
17993                 { { echo "$as_me:17993: error: Cannot determine library for db" >&5
17994 echo "$as_me: error: Cannot determine library for db" >&2;}
17995    { (exit 1); exit 1; }; }
17996         elif test "$cf_cv_hashed_db_libs" != default ; then
17997                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17998         fi
17999 fi
18000
18001 else
18002
18003         { { echo "$as_me:18003: error: Cannot find db.h" >&5
18004 echo "$as_me: error: Cannot find db.h" >&2;}
18005    { (exit 1); exit 1; }; }
18006
18007 fi
18008
18009 fi
18010
18011 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18012         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18013         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18014 fi
18015
18016 # Just in case, check if the C compiler has a bool type.
18017
18018 echo "$as_me:18018: checking if we should include stdbool.h" >&5
18019 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18020
18021 if test "${cf_cv_header_stdbool_h+set}" = set; then
18022   echo $ECHO_N "(cached) $ECHO_C" >&6
18023 else
18024
18025         cat >conftest.$ac_ext <<_ACEOF
18026 #line 18026 "configure"
18027 #include "confdefs.h"
18028
18029 int
18030 main ()
18031 {
18032 bool foo = false
18033   ;
18034   return 0;
18035 }
18036 _ACEOF
18037 rm -f conftest.$ac_objext
18038 if { (eval echo "$as_me:18038: \"$ac_compile\"") >&5
18039   (eval $ac_compile) 2>&5
18040   ac_status=$?
18041   echo "$as_me:18041: \$? = $ac_status" >&5
18042   (exit $ac_status); } &&
18043          { ac_try='test -s conftest.$ac_objext'
18044   { (eval echo "$as_me:18044: \"$ac_try\"") >&5
18045   (eval $ac_try) 2>&5
18046   ac_status=$?
18047   echo "$as_me:18047: \$? = $ac_status" >&5
18048   (exit $ac_status); }; }; then
18049   cf_cv_header_stdbool_h=0
18050 else
18051   echo "$as_me: failed program was:" >&5
18052 cat conftest.$ac_ext >&5
18053 cat >conftest.$ac_ext <<_ACEOF
18054 #line 18054 "configure"
18055 #include "confdefs.h"
18056
18057 #ifndef __BEOS__
18058 #include <stdbool.h>
18059 #endif
18060
18061 int
18062 main ()
18063 {
18064 bool foo = false
18065   ;
18066   return 0;
18067 }
18068 _ACEOF
18069 rm -f conftest.$ac_objext
18070 if { (eval echo "$as_me:18070: \"$ac_compile\"") >&5
18071   (eval $ac_compile) 2>&5
18072   ac_status=$?
18073   echo "$as_me:18073: \$? = $ac_status" >&5
18074   (exit $ac_status); } &&
18075          { ac_try='test -s conftest.$ac_objext'
18076   { (eval echo "$as_me:18076: \"$ac_try\"") >&5
18077   (eval $ac_try) 2>&5
18078   ac_status=$?
18079   echo "$as_me:18079: \$? = $ac_status" >&5
18080   (exit $ac_status); }; }; then
18081   cf_cv_header_stdbool_h=1
18082 else
18083   echo "$as_me: failed program was:" >&5
18084 cat conftest.$ac_ext >&5
18085 cf_cv_header_stdbool_h=0
18086 fi
18087 rm -f conftest.$ac_objext conftest.$ac_ext
18088 fi
18089 rm -f conftest.$ac_objext conftest.$ac_ext
18090 fi
18091
18092 if test "$cf_cv_header_stdbool_h" = 1
18093 then    echo "$as_me:18093: result: yes" >&5
18094 echo "${ECHO_T}yes" >&6
18095 else    echo "$as_me:18095: result: no" >&5
18096 echo "${ECHO_T}no" >&6
18097 fi
18098
18099 echo "$as_me:18099: checking for builtin bool type" >&5
18100 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18101
18102 if test "${cf_cv_cc_bool_type+set}" = set; then
18103   echo $ECHO_N "(cached) $ECHO_C" >&6
18104 else
18105
18106         cat >conftest.$ac_ext <<_ACEOF
18107 #line 18107 "configure"
18108 #include "confdefs.h"
18109
18110 #include <stdio.h>
18111 #include <sys/types.h>
18112
18113 int
18114 main ()
18115 {
18116 bool x = false
18117   ;
18118   return 0;
18119 }
18120 _ACEOF
18121 rm -f conftest.$ac_objext
18122 if { (eval echo "$as_me:18122: \"$ac_compile\"") >&5
18123   (eval $ac_compile) 2>&5
18124   ac_status=$?
18125   echo "$as_me:18125: \$? = $ac_status" >&5
18126   (exit $ac_status); } &&
18127          { ac_try='test -s conftest.$ac_objext'
18128   { (eval echo "$as_me:18128: \"$ac_try\"") >&5
18129   (eval $ac_try) 2>&5
18130   ac_status=$?
18131   echo "$as_me:18131: \$? = $ac_status" >&5
18132   (exit $ac_status); }; }; then
18133   cf_cv_cc_bool_type=1
18134 else
18135   echo "$as_me: failed program was:" >&5
18136 cat conftest.$ac_ext >&5
18137 cf_cv_cc_bool_type=0
18138 fi
18139 rm -f conftest.$ac_objext conftest.$ac_ext
18140
18141 fi
18142
18143 if test "$cf_cv_cc_bool_type" = 1
18144 then    echo "$as_me:18144: result: yes" >&5
18145 echo "${ECHO_T}yes" >&6
18146 else    echo "$as_me:18146: result: no" >&5
18147 echo "${ECHO_T}no" >&6
18148 fi
18149
18150 # Check for C++ compiler characteristics (and ensure that it's there!)
18151 if test -n "$CXX" ; then
18152         ac_ext=cc
18153 ac_cpp='$CXXCPP $CPPFLAGS'
18154 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18155 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18156 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18157 ac_main_return=return
18158
18159 if test -n "$GXX" ; then
18160 case $cf_cv_system_name in #(vi
18161 os2*) #(vi
18162         cf_stdcpp_libname=stdcpp
18163         ;;
18164 *)
18165         cf_stdcpp_libname=stdc++
18166         ;;
18167 esac
18168 echo "$as_me:18168: checking for library $cf_stdcpp_libname" >&5
18169 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18170 if test "${cf_cv_libstdcpp+set}" = set; then
18171   echo $ECHO_N "(cached) $ECHO_C" >&6
18172 else
18173
18174         cf_save="$LIBS"
18175         LIBS="-l$cf_stdcpp_libname $LIBS"
18176 cat >conftest.$ac_ext <<_ACEOF
18177 #line 18177 "configure"
18178 #include "confdefs.h"
18179
18180 #include <strstream.h>
18181 int
18182 main ()
18183 {
18184
18185 char buf[80];
18186 strstreambuf foo(buf, sizeof(buf))
18187
18188   ;
18189   return 0;
18190 }
18191 _ACEOF
18192 rm -f conftest.$ac_objext conftest$ac_exeext
18193 if { (eval echo "$as_me:18193: \"$ac_link\"") >&5
18194   (eval $ac_link) 2>&5
18195   ac_status=$?
18196   echo "$as_me:18196: \$? = $ac_status" >&5
18197   (exit $ac_status); } &&
18198          { ac_try='test -s conftest$ac_exeext'
18199   { (eval echo "$as_me:18199: \"$ac_try\"") >&5
18200   (eval $ac_try) 2>&5
18201   ac_status=$?
18202   echo "$as_me:18202: \$? = $ac_status" >&5
18203   (exit $ac_status); }; }; then
18204   cf_cv_libstdcpp=yes
18205 else
18206   echo "$as_me: failed program was:" >&5
18207 cat conftest.$ac_ext >&5
18208 cf_cv_libstdcpp=no
18209 fi
18210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18211         LIBS="$cf_save"
18212
18213 fi
18214 echo "$as_me:18214: result: $cf_cv_libstdcpp" >&5
18215 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18216 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18217 fi
18218
18219         echo "$as_me:18219: checking whether $CXX understands -c and -o together" >&5
18220 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18221 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18222   echo $ECHO_N "(cached) $ECHO_C" >&6
18223 else
18224
18225 cat > conftest.$ac_ext <<CF_EOF
18226 #include <stdio.h>
18227 int main()
18228 {
18229         ${cf_cv_main_return:-return}(0);
18230 }
18231 CF_EOF
18232 # We do the test twice because some compilers refuse to overwrite an
18233 # existing .o file with -o, though they will create one.
18234 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18235 if { (eval echo "$as_me:18235: \"$ac_try\"") >&5
18236   (eval $ac_try) 2>&5
18237   ac_status=$?
18238   echo "$as_me:18238: \$? = $ac_status" >&5
18239   (exit $ac_status); } &&
18240   test -f conftest2.$ac_objext && { (eval echo "$as_me:18240: \"$ac_try\"") >&5
18241   (eval $ac_try) 2>&5
18242   ac_status=$?
18243   echo "$as_me:18243: \$? = $ac_status" >&5
18244   (exit $ac_status); };
18245 then
18246   eval cf_cv_prog_CXX_c_o=yes
18247 else
18248   eval cf_cv_prog_CXX_c_o=no
18249 fi
18250 rm -rf conftest*
18251
18252 fi
18253 if test $cf_cv_prog_CXX_c_o = yes; then
18254   echo "$as_me:18254: result: yes" >&5
18255 echo "${ECHO_T}yes" >&6
18256 else
18257   echo "$as_me:18257: result: no" >&5
18258 echo "${ECHO_T}no" >&6
18259 fi
18260
18261         case $GXX_VERSION in
18262         1*|2.0-6*)
18263                 cf_cxx_library=yes
18264                 ;;
18265         *-2.7*|2.7*)
18266
18267 cf_cxx_library=unknown
18268 case $cf_cv_system_name in #(vi
18269 os2*) #(vi
18270         cf_gpp_libname=gpp
18271         ;;
18272 *)
18273         cf_gpp_libname=g++
18274         ;;
18275 esac
18276 if test "$GXX" = yes; then
18277         echo "$as_me:18277: checking for lib$cf_gpp_libname" >&5
18278 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18279         cf_save="$LIBS"
18280         LIBS="-l$cf_gpp_libname $LIBS"
18281         cat >conftest.$ac_ext <<_ACEOF
18282 #line 18282 "configure"
18283 #include "confdefs.h"
18284
18285 #include <$cf_gpp_libname/builtin.h>
18286
18287 int
18288 main ()
18289 {
18290 two_arg_error_handler_t foo2 = lib_error_handler
18291   ;
18292   return 0;
18293 }
18294 _ACEOF
18295 rm -f conftest.$ac_objext conftest$ac_exeext
18296 if { (eval echo "$as_me:18296: \"$ac_link\"") >&5
18297   (eval $ac_link) 2>&5
18298   ac_status=$?
18299   echo "$as_me:18299: \$? = $ac_status" >&5
18300   (exit $ac_status); } &&
18301          { ac_try='test -s conftest$ac_exeext'
18302   { (eval echo "$as_me:18302: \"$ac_try\"") >&5
18303   (eval $ac_try) 2>&5
18304   ac_status=$?
18305   echo "$as_me:18305: \$? = $ac_status" >&5
18306   (exit $ac_status); }; }; then
18307   cf_cxx_library=yes
18308          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18309          if test "$cf_gpp_libname" = cpp ; then
18310
18311 cat >>confdefs.h <<\EOF
18312 #define HAVE_GPP_BUILTIN_H 1
18313 EOF
18314
18315          else
18316
18317 cat >>confdefs.h <<\EOF
18318 #define HAVE_GXX_BUILTIN_H 1
18319 EOF
18320
18321          fi
18322 else
18323   echo "$as_me: failed program was:" >&5
18324 cat conftest.$ac_ext >&5
18325 cat >conftest.$ac_ext <<_ACEOF
18326 #line 18326 "configure"
18327 #include "confdefs.h"
18328
18329 #include <builtin.h>
18330
18331 int
18332 main ()
18333 {
18334 two_arg_error_handler_t foo2 = lib_error_handler
18335   ;
18336   return 0;
18337 }
18338 _ACEOF
18339 rm -f conftest.$ac_objext conftest$ac_exeext
18340 if { (eval echo "$as_me:18340: \"$ac_link\"") >&5
18341   (eval $ac_link) 2>&5
18342   ac_status=$?
18343   echo "$as_me:18343: \$? = $ac_status" >&5
18344   (exit $ac_status); } &&
18345          { ac_try='test -s conftest$ac_exeext'
18346   { (eval echo "$as_me:18346: \"$ac_try\"") >&5
18347   (eval $ac_try) 2>&5
18348   ac_status=$?
18349   echo "$as_me:18349: \$? = $ac_status" >&5
18350   (exit $ac_status); }; }; then
18351   cf_cxx_library=yes
18352          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18353
18354 cat >>confdefs.h <<\EOF
18355 #define HAVE_BUILTIN_H 1
18356 EOF
18357
18358 else
18359   echo "$as_me: failed program was:" >&5
18360 cat conftest.$ac_ext >&5
18361 cf_cxx_library=no
18362 fi
18363 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18364 fi
18365 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18366         LIBS="$cf_save"
18367         echo "$as_me:18367: result: $cf_cxx_library" >&5
18368 echo "${ECHO_T}$cf_cxx_library" >&6
18369 fi
18370
18371                 ;;
18372         *)
18373                 cf_cxx_library=no
18374                 ;;
18375         esac
18376
18377         ac_ext=cc
18378 ac_cpp='$CXXCPP $CPPFLAGS'
18379 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18380 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18381 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18382 ac_main_return=return
18383 echo "$as_me:18383: checking how to run the C++ preprocessor" >&5
18384 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18385 if test -z "$CXXCPP"; then
18386   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18387   echo $ECHO_N "(cached) $ECHO_C" >&6
18388 else
18389       # Double quotes because CXXCPP needs to be expanded
18390     for CXXCPP in "$CXX -E" "/lib/cpp"
18391     do
18392       ac_preproc_ok=false
18393 for ac_cxx_preproc_warn_flag in '' yes
18394 do
18395   # Use a header file that comes with gcc, so configuring glibc
18396   # with a fresh cross-compiler works.
18397   # On the NeXT, cc -E runs the code through the compiler's parser,
18398   # not just through cpp. "Syntax error" is here to catch this case.
18399   cat >conftest.$ac_ext <<_ACEOF
18400 #line 18400 "configure"
18401 #include "confdefs.h"
18402 #include <assert.h>
18403                      Syntax error
18404 _ACEOF
18405 if { (eval echo "$as_me:18405: \"$ac_cpp conftest.$ac_ext\"") >&5
18406   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18407   ac_status=$?
18408   egrep -v '^ *\+' conftest.er1 >conftest.err
18409   rm -f conftest.er1
18410   cat conftest.err >&5
18411   echo "$as_me:18411: \$? = $ac_status" >&5
18412   (exit $ac_status); } >/dev/null; then
18413   if test -s conftest.err; then
18414     ac_cpp_err=$ac_cxx_preproc_warn_flag
18415   else
18416     ac_cpp_err=
18417   fi
18418 else
18419   ac_cpp_err=yes
18420 fi
18421 if test -z "$ac_cpp_err"; then
18422   :
18423 else
18424   echo "$as_me: failed program was:" >&5
18425   cat conftest.$ac_ext >&5
18426   # Broken: fails on valid input.
18427 continue
18428 fi
18429 rm -f conftest.err conftest.$ac_ext
18430
18431   # OK, works on sane cases.  Now check whether non-existent headers
18432   # can be detected and how.
18433   cat >conftest.$ac_ext <<_ACEOF
18434 #line 18434 "configure"
18435 #include "confdefs.h"
18436 #include <ac_nonexistent.h>
18437 _ACEOF
18438 if { (eval echo "$as_me:18438: \"$ac_cpp conftest.$ac_ext\"") >&5
18439   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18440   ac_status=$?
18441   egrep -v '^ *\+' conftest.er1 >conftest.err
18442   rm -f conftest.er1
18443   cat conftest.err >&5
18444   echo "$as_me:18444: \$? = $ac_status" >&5
18445   (exit $ac_status); } >/dev/null; then
18446   if test -s conftest.err; then
18447     ac_cpp_err=$ac_cxx_preproc_warn_flag
18448   else
18449     ac_cpp_err=
18450   fi
18451 else
18452   ac_cpp_err=yes
18453 fi
18454 if test -z "$ac_cpp_err"; then
18455   # Broken: success on invalid input.
18456 continue
18457 else
18458   echo "$as_me: failed program was:" >&5
18459   cat conftest.$ac_ext >&5
18460   # Passes both tests.
18461 ac_preproc_ok=:
18462 break
18463 fi
18464 rm -f conftest.err conftest.$ac_ext
18465
18466 done
18467 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18468 rm -f conftest.err conftest.$ac_ext
18469 if $ac_preproc_ok; then
18470   break
18471 fi
18472
18473     done
18474     ac_cv_prog_CXXCPP=$CXXCPP
18475
18476 fi
18477   CXXCPP=$ac_cv_prog_CXXCPP
18478 else
18479   ac_cv_prog_CXXCPP=$CXXCPP
18480 fi
18481 echo "$as_me:18481: result: $CXXCPP" >&5
18482 echo "${ECHO_T}$CXXCPP" >&6
18483 ac_preproc_ok=false
18484 for ac_cxx_preproc_warn_flag in '' yes
18485 do
18486   # Use a header file that comes with gcc, so configuring glibc
18487   # with a fresh cross-compiler works.
18488   # On the NeXT, cc -E runs the code through the compiler's parser,
18489   # not just through cpp. "Syntax error" is here to catch this case.
18490   cat >conftest.$ac_ext <<_ACEOF
18491 #line 18491 "configure"
18492 #include "confdefs.h"
18493 #include <assert.h>
18494                      Syntax error
18495 _ACEOF
18496 if { (eval echo "$as_me:18496: \"$ac_cpp conftest.$ac_ext\"") >&5
18497   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18498   ac_status=$?
18499   egrep -v '^ *\+' conftest.er1 >conftest.err
18500   rm -f conftest.er1
18501   cat conftest.err >&5
18502   echo "$as_me:18502: \$? = $ac_status" >&5
18503   (exit $ac_status); } >/dev/null; then
18504   if test -s conftest.err; then
18505     ac_cpp_err=$ac_cxx_preproc_warn_flag
18506   else
18507     ac_cpp_err=
18508   fi
18509 else
18510   ac_cpp_err=yes
18511 fi
18512 if test -z "$ac_cpp_err"; then
18513   :
18514 else
18515   echo "$as_me: failed program was:" >&5
18516   cat conftest.$ac_ext >&5
18517   # Broken: fails on valid input.
18518 continue
18519 fi
18520 rm -f conftest.err conftest.$ac_ext
18521
18522   # OK, works on sane cases.  Now check whether non-existent headers
18523   # can be detected and how.
18524   cat >conftest.$ac_ext <<_ACEOF
18525 #line 18525 "configure"
18526 #include "confdefs.h"
18527 #include <ac_nonexistent.h>
18528 _ACEOF
18529 if { (eval echo "$as_me:18529: \"$ac_cpp conftest.$ac_ext\"") >&5
18530   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18531   ac_status=$?
18532   egrep -v '^ *\+' conftest.er1 >conftest.err
18533   rm -f conftest.er1
18534   cat conftest.err >&5
18535   echo "$as_me:18535: \$? = $ac_status" >&5
18536   (exit $ac_status); } >/dev/null; then
18537   if test -s conftest.err; then
18538     ac_cpp_err=$ac_cxx_preproc_warn_flag
18539   else
18540     ac_cpp_err=
18541   fi
18542 else
18543   ac_cpp_err=yes
18544 fi
18545 if test -z "$ac_cpp_err"; then
18546   # Broken: success on invalid input.
18547 continue
18548 else
18549   echo "$as_me: failed program was:" >&5
18550   cat conftest.$ac_ext >&5
18551   # Passes both tests.
18552 ac_preproc_ok=:
18553 break
18554 fi
18555 rm -f conftest.err conftest.$ac_ext
18556
18557 done
18558 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18559 rm -f conftest.err conftest.$ac_ext
18560 if $ac_preproc_ok; then
18561   :
18562 else
18563   { { echo "$as_me:18563: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18564 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18565    { (exit 1); exit 1; }; }
18566 fi
18567
18568 ac_ext=cc
18569 ac_cpp='$CXXCPP $CPPFLAGS'
18570 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18571 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18572 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18573 ac_main_return=return
18574
18575 for ac_header in typeinfo
18576 do
18577 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18578 echo "$as_me:18578: checking for $ac_header" >&5
18579 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18580 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18581   echo $ECHO_N "(cached) $ECHO_C" >&6
18582 else
18583   cat >conftest.$ac_ext <<_ACEOF
18584 #line 18584 "configure"
18585 #include "confdefs.h"
18586 #include <$ac_header>
18587 _ACEOF
18588 if { (eval echo "$as_me:18588: \"$ac_cpp conftest.$ac_ext\"") >&5
18589   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18590   ac_status=$?
18591   egrep -v '^ *\+' conftest.er1 >conftest.err
18592   rm -f conftest.er1
18593   cat conftest.err >&5
18594   echo "$as_me:18594: \$? = $ac_status" >&5
18595   (exit $ac_status); } >/dev/null; then
18596   if test -s conftest.err; then
18597     ac_cpp_err=$ac_cxx_preproc_warn_flag
18598   else
18599     ac_cpp_err=
18600   fi
18601 else
18602   ac_cpp_err=yes
18603 fi
18604 if test -z "$ac_cpp_err"; then
18605   eval "$as_ac_Header=yes"
18606 else
18607   echo "$as_me: failed program was:" >&5
18608   cat conftest.$ac_ext >&5
18609   eval "$as_ac_Header=no"
18610 fi
18611 rm -f conftest.err conftest.$ac_ext
18612 fi
18613 echo "$as_me:18613: result: `eval echo '${'$as_ac_Header'}'`" >&5
18614 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18615 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18616   cat >>confdefs.h <<EOF
18617 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18618 EOF
18619
18620 fi
18621 done
18622
18623 for ac_header in iostream
18624 do
18625 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18626 echo "$as_me:18626: checking for $ac_header" >&5
18627 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18628 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18629   echo $ECHO_N "(cached) $ECHO_C" >&6
18630 else
18631   cat >conftest.$ac_ext <<_ACEOF
18632 #line 18632 "configure"
18633 #include "confdefs.h"
18634 #include <$ac_header>
18635 _ACEOF
18636 if { (eval echo "$as_me:18636: \"$ac_cpp conftest.$ac_ext\"") >&5
18637   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18638   ac_status=$?
18639   egrep -v '^ *\+' conftest.er1 >conftest.err
18640   rm -f conftest.er1
18641   cat conftest.err >&5
18642   echo "$as_me:18642: \$? = $ac_status" >&5
18643   (exit $ac_status); } >/dev/null; then
18644   if test -s conftest.err; then
18645     ac_cpp_err=$ac_cxx_preproc_warn_flag
18646   else
18647     ac_cpp_err=
18648   fi
18649 else
18650   ac_cpp_err=yes
18651 fi
18652 if test -z "$ac_cpp_err"; then
18653   eval "$as_ac_Header=yes"
18654 else
18655   echo "$as_me: failed program was:" >&5
18656   cat conftest.$ac_ext >&5
18657   eval "$as_ac_Header=no"
18658 fi
18659 rm -f conftest.err conftest.$ac_ext
18660 fi
18661 echo "$as_me:18661: result: `eval echo '${'$as_ac_Header'}'`" >&5
18662 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18663 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18664   cat >>confdefs.h <<EOF
18665 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18666 EOF
18667
18668 fi
18669 done
18670
18671 if test x"$ac_cv_header_iostream" = xyes ; then
18672         echo "$as_me:18672: checking if iostream uses std-namespace" >&5
18673 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18674         cat >conftest.$ac_ext <<_ACEOF
18675 #line 18675 "configure"
18676 #include "confdefs.h"
18677
18678 #include <iostream>
18679 using std::endl;
18680 using std::cerr;
18681 int
18682 main ()
18683 {
18684
18685 cerr << "testing" << endl;
18686
18687   ;
18688   return 0;
18689 }
18690 _ACEOF
18691 rm -f conftest.$ac_objext
18692 if { (eval echo "$as_me:18692: \"$ac_compile\"") >&5
18693   (eval $ac_compile) 2>&5
18694   ac_status=$?
18695   echo "$as_me:18695: \$? = $ac_status" >&5
18696   (exit $ac_status); } &&
18697          { ac_try='test -s conftest.$ac_objext'
18698   { (eval echo "$as_me:18698: \"$ac_try\"") >&5
18699   (eval $ac_try) 2>&5
18700   ac_status=$?
18701   echo "$as_me:18701: \$? = $ac_status" >&5
18702   (exit $ac_status); }; }; then
18703   cf_iostream_namespace=yes
18704 else
18705   echo "$as_me: failed program was:" >&5
18706 cat conftest.$ac_ext >&5
18707 cf_iostream_namespace=no
18708 fi
18709 rm -f conftest.$ac_objext conftest.$ac_ext
18710         echo "$as_me:18710: result: $cf_iostream_namespace" >&5
18711 echo "${ECHO_T}$cf_iostream_namespace" >&6
18712         if test "$cf_iostream_namespace" = yes ; then
18713
18714 cat >>confdefs.h <<\EOF
18715 #define IOSTREAM_NAMESPACE 1
18716 EOF
18717
18718         fi
18719 fi
18720
18721 echo "$as_me:18721: checking if we should include stdbool.h" >&5
18722 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18723
18724 if test "${cf_cv_header_stdbool_h+set}" = set; then
18725   echo $ECHO_N "(cached) $ECHO_C" >&6
18726 else
18727
18728         cat >conftest.$ac_ext <<_ACEOF
18729 #line 18729 "configure"
18730 #include "confdefs.h"
18731
18732 int
18733 main ()
18734 {
18735 bool foo = false
18736   ;
18737   return 0;
18738 }
18739 _ACEOF
18740 rm -f conftest.$ac_objext
18741 if { (eval echo "$as_me:18741: \"$ac_compile\"") >&5
18742   (eval $ac_compile) 2>&5
18743   ac_status=$?
18744   echo "$as_me:18744: \$? = $ac_status" >&5
18745   (exit $ac_status); } &&
18746          { ac_try='test -s conftest.$ac_objext'
18747   { (eval echo "$as_me:18747: \"$ac_try\"") >&5
18748   (eval $ac_try) 2>&5
18749   ac_status=$?
18750   echo "$as_me:18750: \$? = $ac_status" >&5
18751   (exit $ac_status); }; }; then
18752   cf_cv_header_stdbool_h=0
18753 else
18754   echo "$as_me: failed program was:" >&5
18755 cat conftest.$ac_ext >&5
18756 cat >conftest.$ac_ext <<_ACEOF
18757 #line 18757 "configure"
18758 #include "confdefs.h"
18759
18760 #ifndef __BEOS__
18761 #include <stdbool.h>
18762 #endif
18763
18764 int
18765 main ()
18766 {
18767 bool foo = false
18768   ;
18769   return 0;
18770 }
18771 _ACEOF
18772 rm -f conftest.$ac_objext
18773 if { (eval echo "$as_me:18773: \"$ac_compile\"") >&5
18774   (eval $ac_compile) 2>&5
18775   ac_status=$?
18776   echo "$as_me:18776: \$? = $ac_status" >&5
18777   (exit $ac_status); } &&
18778          { ac_try='test -s conftest.$ac_objext'
18779   { (eval echo "$as_me:18779: \"$ac_try\"") >&5
18780   (eval $ac_try) 2>&5
18781   ac_status=$?
18782   echo "$as_me:18782: \$? = $ac_status" >&5
18783   (exit $ac_status); }; }; then
18784   cf_cv_header_stdbool_h=1
18785 else
18786   echo "$as_me: failed program was:" >&5
18787 cat conftest.$ac_ext >&5
18788 cf_cv_header_stdbool_h=0
18789 fi
18790 rm -f conftest.$ac_objext conftest.$ac_ext
18791 fi
18792 rm -f conftest.$ac_objext conftest.$ac_ext
18793 fi
18794
18795 if test "$cf_cv_header_stdbool_h" = 1
18796 then    echo "$as_me:18796: result: yes" >&5
18797 echo "${ECHO_T}yes" >&6
18798 else    echo "$as_me:18798: result: no" >&5
18799 echo "${ECHO_T}no" >&6
18800 fi
18801
18802 echo "$as_me:18802: checking for builtin bool type" >&5
18803 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18804
18805 if test "${cf_cv_builtin_bool+set}" = set; then
18806   echo $ECHO_N "(cached) $ECHO_C" >&6
18807 else
18808
18809         cat >conftest.$ac_ext <<_ACEOF
18810 #line 18810 "configure"
18811 #include "confdefs.h"
18812
18813 #include <stdio.h>
18814 #include <sys/types.h>
18815
18816 int
18817 main ()
18818 {
18819 bool x = false
18820   ;
18821   return 0;
18822 }
18823 _ACEOF
18824 rm -f conftest.$ac_objext
18825 if { (eval echo "$as_me:18825: \"$ac_compile\"") >&5
18826   (eval $ac_compile) 2>&5
18827   ac_status=$?
18828   echo "$as_me:18828: \$? = $ac_status" >&5
18829   (exit $ac_status); } &&
18830          { ac_try='test -s conftest.$ac_objext'
18831   { (eval echo "$as_me:18831: \"$ac_try\"") >&5
18832   (eval $ac_try) 2>&5
18833   ac_status=$?
18834   echo "$as_me:18834: \$? = $ac_status" >&5
18835   (exit $ac_status); }; }; then
18836   cf_cv_builtin_bool=1
18837 else
18838   echo "$as_me: failed program was:" >&5
18839 cat conftest.$ac_ext >&5
18840 cf_cv_builtin_bool=0
18841 fi
18842 rm -f conftest.$ac_objext conftest.$ac_ext
18843
18844 fi
18845
18846 if test "$cf_cv_builtin_bool" = 1
18847 then    echo "$as_me:18847: result: yes" >&5
18848 echo "${ECHO_T}yes" >&6
18849 else    echo "$as_me:18849: result: no" >&5
18850 echo "${ECHO_T}no" >&6
18851 fi
18852
18853 echo "$as_me:18853: checking for size of bool" >&5
18854 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18855 if test "${cf_cv_type_of_bool+set}" = set; then
18856   echo $ECHO_N "(cached) $ECHO_C" >&6
18857 else
18858
18859         rm -f cf_test.out
18860         if test "$cross_compiling" = yes; then
18861   cf_cv_type_of_bool=unknown
18862 else
18863   cat >conftest.$ac_ext <<_ACEOF
18864 #line 18864 "configure"
18865 #include "confdefs.h"
18866
18867 #include <stdlib.h>
18868 #include <stdio.h>
18869
18870 #if defined(__cplusplus)
18871
18872 #ifdef HAVE_GXX_BUILTIN_H
18873 #include <g++/builtin.h>
18874 #elif HAVE_GPP_BUILTIN_H
18875 #include <gpp/builtin.h>
18876 #elif HAVE_BUILTIN_H
18877 #include <builtin.h>
18878 #endif
18879
18880 #else
18881
18882 #if $cf_cv_header_stdbool_h
18883 #include <stdbool.h>
18884 #endif
18885
18886 #endif
18887
18888 int main()
18889 {
18890         FILE *fp = fopen("cf_test.out", "w");
18891         if (fp != 0) {
18892                 bool x = true;
18893                 if ((bool)(-x) >= 0)
18894                         fputs("unsigned ", fp);
18895                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18896                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18897                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18898                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18899                 fclose(fp);
18900         }
18901         ${cf_cv_main_return:-return}(0);
18902 }
18903
18904 _ACEOF
18905 rm -f conftest$ac_exeext
18906 if { (eval echo "$as_me:18906: \"$ac_link\"") >&5
18907   (eval $ac_link) 2>&5
18908   ac_status=$?
18909   echo "$as_me:18909: \$? = $ac_status" >&5
18910   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18911   { (eval echo "$as_me:18911: \"$ac_try\"") >&5
18912   (eval $ac_try) 2>&5
18913   ac_status=$?
18914   echo "$as_me:18914: \$? = $ac_status" >&5
18915   (exit $ac_status); }; }; then
18916   cf_cv_type_of_bool=`cat cf_test.out`
18917                  if test -z "$cf_cv_type_of_bool"; then
18918                    cf_cv_type_of_bool=unknown
18919                  fi
18920 else
18921   echo "$as_me: program exited with status $ac_status" >&5
18922 echo "$as_me: failed program was:" >&5
18923 cat conftest.$ac_ext >&5
18924 cf_cv_type_of_bool=unknown
18925 fi
18926 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18927 fi
18928
18929 fi
18930
18931         rm -f cf_test.out
18932 echo "$as_me:18932: result: $cf_cv_type_of_bool" >&5
18933 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18934 if test "$cf_cv_type_of_bool" = unknown ; then
18935         case .$NCURSES_BOOL in #(vi
18936         .auto|.) NCURSES_BOOL=unsigned;;
18937         esac
18938         { echo "$as_me:18938: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18939 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18940         cf_cv_type_of_bool=$NCURSES_BOOL
18941 fi
18942
18943 echo "$as_me:18943: checking for special defines needed for etip.h" >&5
18944 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18945 cf_save_CXXFLAGS="$CXXFLAGS"
18946 cf_result="none"
18947
18948 # etip.h includes ncurses.h which includes ncurses_dll.h
18949 # But ncurses_dll.h is generated - fix here.
18950 test -d include || mkdir include
18951 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
18952
18953 for cf_math in "" MATH_H
18954 do
18955 for cf_excp in "" MATH_EXCEPTION
18956 do
18957         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18958         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18959         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18960 cat >conftest.$ac_ext <<_ACEOF
18961 #line 18961 "configure"
18962 #include "confdefs.h"
18963
18964 #include <etip.h.in>
18965
18966 int
18967 main ()
18968 {
18969
18970   ;
18971   return 0;
18972 }
18973 _ACEOF
18974 rm -f conftest.$ac_objext
18975 if { (eval echo "$as_me:18975: \"$ac_compile\"") >&5
18976   (eval $ac_compile) 2>&5
18977   ac_status=$?
18978   echo "$as_me:18978: \$? = $ac_status" >&5
18979   (exit $ac_status); } &&
18980          { ac_try='test -s conftest.$ac_objext'
18981   { (eval echo "$as_me:18981: \"$ac_try\"") >&5
18982   (eval $ac_try) 2>&5
18983   ac_status=$?
18984   echo "$as_me:18984: \$? = $ac_status" >&5
18985   (exit $ac_status); }; }; then
18986
18987         test -n "$cf_math" && cat >>confdefs.h <<EOF
18988 #define ETIP_NEEDS_${cf_math} 1
18989 EOF
18990
18991         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18992 #define ETIP_NEEDS_${cf_excp} 1
18993 EOF
18994
18995         cf_result="$cf_math $cf_excp"
18996         break 2
18997
18998 else
18999   echo "$as_me: failed program was:" >&5
19000 cat conftest.$ac_ext >&5
19001 fi
19002 rm -f conftest.$ac_objext conftest.$ac_ext
19003 done
19004 done
19005 echo "$as_me:19005: result: $cf_result" >&5
19006 echo "${ECHO_T}$cf_result" >&6
19007 CXXFLAGS="$cf_save_CXXFLAGS"
19008
19009 if test -n "$CXX"; then
19010 echo "$as_me:19010: checking if $CXX accepts parameter initialization" >&5
19011 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19012 if test "${cf_cv_cpp_param_init+set}" = set; then
19013   echo $ECHO_N "(cached) $ECHO_C" >&6
19014 else
19015
19016         ac_ext=cc
19017 ac_cpp='$CXXCPP $CPPFLAGS'
19018 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19019 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19020 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19021 ac_main_return=return
19022
19023         if test "$cross_compiling" = yes; then
19024   cf_cv_cpp_param_init=unknown
19025 else
19026   cat >conftest.$ac_ext <<_ACEOF
19027 #line 19027 "configure"
19028 #include "confdefs.h"
19029
19030 class TEST {
19031 private:
19032         int value;
19033 public:
19034         TEST(int x = 1);
19035         ~TEST();
19036 };
19037
19038 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19039 {
19040         value = x;
19041 }
19042 int main() { }
19043
19044 _ACEOF
19045 rm -f conftest$ac_exeext
19046 if { (eval echo "$as_me:19046: \"$ac_link\"") >&5
19047   (eval $ac_link) 2>&5
19048   ac_status=$?
19049   echo "$as_me:19049: \$? = $ac_status" >&5
19050   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19051   { (eval echo "$as_me:19051: \"$ac_try\"") >&5
19052   (eval $ac_try) 2>&5
19053   ac_status=$?
19054   echo "$as_me:19054: \$? = $ac_status" >&5
19055   (exit $ac_status); }; }; then
19056   cf_cv_cpp_param_init=yes
19057 else
19058   echo "$as_me: program exited with status $ac_status" >&5
19059 echo "$as_me: failed program was:" >&5
19060 cat conftest.$ac_ext >&5
19061 cf_cv_cpp_param_init=no
19062 fi
19063 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19064 fi
19065         ac_ext=cc
19066 ac_cpp='$CXXCPP $CPPFLAGS'
19067 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19068 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19069 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19070 ac_main_return=return
19071
19072 fi
19073 echo "$as_me:19073: result: $cf_cv_cpp_param_init" >&5
19074 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19075 fi
19076 test "$cf_cv_cpp_param_init" = yes &&
19077 cat >>confdefs.h <<\EOF
19078 #define CPP_HAS_PARAM_INIT 1
19079 EOF
19080
19081 if test -n "$CXX"; then
19082
19083 echo "$as_me:19083: checking if $CXX accepts static_cast" >&5
19084 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19085 if test "${cf_cv_cpp_static_cast+set}" = set; then
19086   echo $ECHO_N "(cached) $ECHO_C" >&6
19087 else
19088
19089         ac_ext=cc
19090 ac_cpp='$CXXCPP $CPPFLAGS'
19091 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19092 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19093 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19094 ac_main_return=return
19095
19096         cat >conftest.$ac_ext <<_ACEOF
19097 #line 19097 "configure"
19098 #include "confdefs.h"
19099
19100 class NCursesPanel
19101 {
19102 public:
19103   NCursesPanel(int nlines,
19104                int ncols,
19105                int begin_y = 0,
19106                int begin_x = 0)
19107   {
19108   }
19109   NCursesPanel();
19110   ~NCursesPanel();
19111 };
19112
19113 template<class T> class NCursesUserPanel : public NCursesPanel
19114 {
19115 public:
19116   NCursesUserPanel (int nlines,
19117                     int ncols,
19118                     int begin_y = 0,
19119                     int begin_x = 0,
19120                     const T* p_UserData = static_cast<T*>(0))
19121     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19122   {
19123   };
19124   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19125   {
19126   };
19127
19128   virtual ~NCursesUserPanel() {};
19129 };
19130
19131 int
19132 main ()
19133 {
19134
19135         const char* p_UserData = static_cast<char*>(0)
19136   ;
19137   return 0;
19138 }
19139 _ACEOF
19140 rm -f conftest.$ac_objext
19141 if { (eval echo "$as_me:19141: \"$ac_compile\"") >&5
19142   (eval $ac_compile) 2>&5
19143   ac_status=$?
19144   echo "$as_me:19144: \$? = $ac_status" >&5
19145   (exit $ac_status); } &&
19146          { ac_try='test -s conftest.$ac_objext'
19147   { (eval echo "$as_me:19147: \"$ac_try\"") >&5
19148   (eval $ac_try) 2>&5
19149   ac_status=$?
19150   echo "$as_me:19150: \$? = $ac_status" >&5
19151   (exit $ac_status); }; }; then
19152   cf_cv_cpp_static_cast=yes
19153 else
19154   echo "$as_me: failed program was:" >&5
19155 cat conftest.$ac_ext >&5
19156 cf_cv_cpp_static_cast=no
19157 fi
19158 rm -f conftest.$ac_objext conftest.$ac_ext
19159
19160         ac_ext=cc
19161 ac_cpp='$CXXCPP $CPPFLAGS'
19162 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19163 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19164 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19165 ac_main_return=return
19166
19167 fi
19168 echo "$as_me:19168: result: $cf_cv_cpp_static_cast" >&5
19169 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19170
19171 fi
19172
19173 test "$cf_cv_cpp_static_cast" = yes &&
19174 cat >>confdefs.h <<\EOF
19175 #define CPP_HAS_STATIC_CAST 1
19176 EOF
19177
19178         CXX_AR='$(AR)'
19179         CXX_ARFLAGS='$(ARFLAGS)'
19180         case $cf_cv_system_name in #(vi
19181         irix*) #(vi
19182             if test "$GXX" != yes ; then
19183                 CXX_AR='$(CXX)'
19184                 CXX_ARFLAGS='-ar -o'
19185             fi
19186             ;;
19187         sco3.2v5*) #(vi
19188             CXXLDFLAGS="-u main"
19189             ;;
19190         solaris2*)
19191             if test "$GXX" != yes ; then
19192                 CXX_AR='$(CXX)'
19193                 CXX_ARFLAGS='-xar -o'
19194             fi
19195             ;;
19196         esac
19197
19198 else
19199         cf_cxx_library=no
19200         cf_cv_builtin_bool=1
19201
19202         # Just because we are not configuring against C++ right now does not
19203         # mean that a user will not want to use C++.  Some distributors disable
19204         # the C++ portion of this configuration as a shortcut (or just to avoid
19205         # compiling the demo in the c++ directory).  So we need a reasonable
19206         # default for the 'bool' type.
19207         #
19208         # Caveat: since the storage of the bool type is not standardized, it
19209         # may change.
19210
19211         if test "$NCURSES_BOOL" != auto ; then
19212                 cf_cv_type_of_bool=$NCURSES_BOOL
19213                 cf_cv_header_stdbool_h=0
19214         else
19215                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19216
19217 echo "$as_me:19217: checking for size of bool" >&5
19218 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19219 if test "${cf_cv_type_of_bool+set}" = set; then
19220   echo $ECHO_N "(cached) $ECHO_C" >&6
19221 else
19222
19223         rm -f cf_test.out
19224         if test "$cross_compiling" = yes; then
19225   cf_cv_type_of_bool=unknown
19226 else
19227   cat >conftest.$ac_ext <<_ACEOF
19228 #line 19228 "configure"
19229 #include "confdefs.h"
19230
19231 #include <stdlib.h>
19232 #include <stdio.h>
19233
19234 #if defined(__cplusplus)
19235
19236 #ifdef HAVE_GXX_BUILTIN_H
19237 #include <g++/builtin.h>
19238 #elif HAVE_GPP_BUILTIN_H
19239 #include <gpp/builtin.h>
19240 #elif HAVE_BUILTIN_H
19241 #include <builtin.h>
19242 #endif
19243
19244 #else
19245
19246 #if $cf_cv_header_stdbool_h
19247 #include <stdbool.h>
19248 #endif
19249
19250 #endif
19251
19252 int main()
19253 {
19254         FILE *fp = fopen("cf_test.out", "w");
19255         if (fp != 0) {
19256                 bool x = true;
19257                 if ((bool)(-x) >= 0)
19258                         fputs("unsigned ", fp);
19259                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19260                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19261                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19262                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19263                 fclose(fp);
19264         }
19265         ${cf_cv_main_return:-return}(0);
19266 }
19267
19268 _ACEOF
19269 rm -f conftest$ac_exeext
19270 if { (eval echo "$as_me:19270: \"$ac_link\"") >&5
19271   (eval $ac_link) 2>&5
19272   ac_status=$?
19273   echo "$as_me:19273: \$? = $ac_status" >&5
19274   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19275   { (eval echo "$as_me:19275: \"$ac_try\"") >&5
19276   (eval $ac_try) 2>&5
19277   ac_status=$?
19278   echo "$as_me:19278: \$? = $ac_status" >&5
19279   (exit $ac_status); }; }; then
19280   cf_cv_type_of_bool=`cat cf_test.out`
19281                  if test -z "$cf_cv_type_of_bool"; then
19282                    cf_cv_type_of_bool=unknown
19283                  fi
19284 else
19285   echo "$as_me: program exited with status $ac_status" >&5
19286 echo "$as_me: failed program was:" >&5
19287 cat conftest.$ac_ext >&5
19288 cf_cv_type_of_bool=unknown
19289 fi
19290 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19291 fi
19292
19293 fi
19294
19295         rm -f cf_test.out
19296 echo "$as_me:19296: result: $cf_cv_type_of_bool" >&5
19297 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19298 if test "$cf_cv_type_of_bool" = unknown ; then
19299         case .$NCURSES_BOOL in #(vi
19300         .auto|.) NCURSES_BOOL=unsigned;;
19301         esac
19302         { echo "$as_me:19302: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19303 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19304         cf_cv_type_of_bool=$NCURSES_BOOL
19305 fi
19306
19307                 else
19308                         echo "$as_me:19308: checking for fallback type of bool" >&5
19309 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19310                         case "$host_cpu" in #(vi
19311                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19312                         *)      cf_cv_type_of_bool=int  ;;
19313                         esac
19314                         echo "$as_me:19314: result: $cf_cv_type_of_bool" >&5
19315 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19316                 fi
19317         fi
19318 fi
19319
19320 # If the C compiler did not declare bool, and we did not determine that the C++
19321 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19322 # ncurses library use the same type as C++ bool.  Note that this allows one to
19323 # specify the type of bool in a configure-script option and postpone
19324 # integration with the C++ compiler provided that the types are compatible.
19325 USE_CXX_BOOL=1
19326 if test $cf_cv_cc_bool_type = 1
19327 then
19328         # oops: C has a bool.  Unlikely, but C++ could differ.
19329         USE_CXX_BOOL=0
19330 elif test $cf_cv_builtin_bool = 0
19331 then
19332         # C++ has no bool
19333         USE_CXX_BOOL=0
19334 else
19335         # this is the normal case
19336         USE_CXX_BOOL='defined(__cplusplus)'
19337 fi
19338
19339 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19340
19341         if test "$cf_with_ada" != "no" ; then
19342                 if test "$with_libtool" != "no"; then
19343                         { echo "$as_me:19343: WARNING: libtool does not support Ada - disabling feature" >&5
19344 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19345                         cf_with_ada=no
19346                 fi
19347         fi
19348
19349         if test "$cf_with_ada" != "no" ; then
19350
19351 cf_ada_make=gnatmake
19352 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19353 set dummy $cf_ada_make; ac_word=$2
19354 echo "$as_me:19354: checking for $ac_word" >&5
19355 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19356 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19357   echo $ECHO_N "(cached) $ECHO_C" >&6
19358 else
19359   if test -n "$gnat_exists"; then
19360   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19361 else
19362   ac_save_IFS=$IFS; IFS=$ac_path_separator
19363 ac_dummy="$PATH"
19364 for ac_dir in $ac_dummy; do
19365   IFS=$ac_save_IFS
19366   test -z "$ac_dir" && ac_dir=.
19367   $as_executable_p "$ac_dir/$ac_word" || continue
19368 ac_cv_prog_gnat_exists="yes"
19369 echo "$as_me:19369: found $ac_dir/$ac_word" >&5
19370 break
19371 done
19372
19373   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19374 fi
19375 fi
19376 gnat_exists=$ac_cv_prog_gnat_exists
19377 if test -n "$gnat_exists"; then
19378   echo "$as_me:19378: result: $gnat_exists" >&5
19379 echo "${ECHO_T}$gnat_exists" >&6
19380 else
19381   echo "$as_me:19381: result: no" >&5
19382 echo "${ECHO_T}no" >&6
19383 fi
19384
19385 if test "$ac_cv_prog_gnat_exists" = no; then
19386    cf_ada_make=
19387    cf_cv_prog_gnat_correct=no
19388 else
19389
19390 echo "$as_me:19390: checking for gnat version" >&5
19391 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19392 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19393         grep '[0-9].[0-9][0-9]*' |\
19394     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19395 echo "$as_me:19395: result: $cf_gnat_version" >&5
19396 echo "${ECHO_T}$cf_gnat_version" >&6
19397
19398 case $cf_gnat_version in #(vi
19399 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19400         cf_cv_prog_gnat_correct=yes
19401         ;;
19402 *)
19403         { echo "$as_me:19403: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19404 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19405         cf_cv_prog_gnat_correct=no
19406         ;;
19407 esac
19408
19409    # Extract the first word of "m4", so it can be a program name with args.
19410 set dummy m4; ac_word=$2
19411 echo "$as_me:19411: checking for $ac_word" >&5
19412 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19413 if test "${ac_cv_prog_M4_exists+set}" = set; then
19414   echo $ECHO_N "(cached) $ECHO_C" >&6
19415 else
19416   if test -n "$M4_exists"; then
19417   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19418 else
19419   ac_save_IFS=$IFS; IFS=$ac_path_separator
19420 ac_dummy="$PATH"
19421 for ac_dir in $ac_dummy; do
19422   IFS=$ac_save_IFS
19423   test -z "$ac_dir" && ac_dir=.
19424   $as_executable_p "$ac_dir/$ac_word" || continue
19425 ac_cv_prog_M4_exists="yes"
19426 echo "$as_me:19426: found $ac_dir/$ac_word" >&5
19427 break
19428 done
19429
19430   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19431 fi
19432 fi
19433 M4_exists=$ac_cv_prog_M4_exists
19434 if test -n "$M4_exists"; then
19435   echo "$as_me:19435: result: $M4_exists" >&5
19436 echo "${ECHO_T}$M4_exists" >&6
19437 else
19438   echo "$as_me:19438: result: no" >&5
19439 echo "${ECHO_T}no" >&6
19440 fi
19441
19442    if test "$ac_cv_prog_M4_exists" = no; then
19443       cf_cv_prog_gnat_correct=no
19444       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19445    fi
19446    if test "$cf_cv_prog_gnat_correct" = yes; then
19447       echo "$as_me:19447: checking if GNAT works" >&5
19448 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19449
19450 rm -rf conftest* *~conftest*
19451 cat >>conftest.ads <<CF_EOF
19452 procedure conftest;
19453 CF_EOF
19454 cat >>conftest.adb <<CF_EOF
19455 with Text_IO;
19456 with GNAT.OS_Lib;
19457 procedure conftest is
19458 begin
19459    Text_IO.Put ("Hello World");
19460    Text_IO.New_Line;
19461    GNAT.OS_Lib.OS_Exit (0);
19462 end conftest;
19463 CF_EOF
19464 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19465    if ( ./conftest 1>&5 2>&1 ) ; then
19466       cf_cv_prog_gnat_correct=yes
19467    else
19468       cf_cv_prog_gnat_correct=no
19469    fi
19470 else
19471    cf_cv_prog_gnat_correct=no
19472 fi
19473 rm -rf conftest* *~conftest*
19474
19475       echo "$as_me:19475: result: $cf_cv_prog_gnat_correct" >&5
19476 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19477    fi
19478 fi
19479
19480                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19481
19482         ADAFLAGS="$ADAFLAGS -gnatpn"
19483
19484         echo "$as_me:19484: checking optimization options for ADAFLAGS" >&5
19485 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19486         case "$CFLAGS" in
19487         *-g*)
19488
19489         ADAFLAGS="$ADAFLAGS -g"
19490
19491                 ;;
19492         esac
19493         case "$CFLAGS" in
19494         *-O*)
19495                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19496
19497         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19498
19499                 ;;
19500         esac
19501         echo "$as_me:19501: result: $ADAFLAGS" >&5
19502 echo "${ECHO_T}$ADAFLAGS" >&6
19503
19504 echo "$as_me:19504: checking if GNAT supports generics" >&5
19505 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19506 case $cf_gnat_version in #(vi
19507 3.[1-9]*|[4-9].*) #(vi
19508         cf_gnat_generics=yes
19509         ;;
19510 *)
19511         cf_gnat_generics=no
19512         ;;
19513 esac
19514 echo "$as_me:19514: result: $cf_gnat_generics" >&5
19515 echo "${ECHO_T}$cf_gnat_generics" >&6
19516
19517 if test "$cf_gnat_generics" = yes
19518 then
19519         cf_compile_generics=generics
19520         cf_generic_objects="\${GENOBJS}"
19521 else
19522         cf_compile_generics=
19523         cf_generic_objects=
19524 fi
19525
19526 echo "$as_me:19526: checking if GNAT supports SIGINT" >&5
19527 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19528 if test "${cf_cv_gnat_sigint+set}" = set; then
19529   echo $ECHO_N "(cached) $ECHO_C" >&6
19530 else
19531
19532 rm -rf conftest* *~conftest*
19533 cat >>conftest.ads <<CF_EOF
19534 with Ada.Interrupts.Names;
19535
19536 package ConfTest is
19537
19538    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19539    pragma Unreserve_All_Interrupts;
19540    pragma Warnings (On);
19541
19542    protected Process is
19543       procedure Stop;
19544       function Continue return Boolean;
19545       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19546    private
19547       Done : Boolean := False;
19548    end Process;
19549
19550 end ConfTest;
19551 CF_EOF
19552 cat >>conftest.adb <<CF_EOF
19553 package body ConfTest is
19554    protected body Process is
19555       procedure Stop is
19556       begin
19557          Done := True;
19558       end Stop;
19559       function Continue return Boolean is
19560       begin
19561          return not Done;
19562       end Continue;
19563    end Process;
19564 end ConfTest;
19565 CF_EOF
19566 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19567       cf_cv_gnat_sigint=yes
19568 else
19569    cf_cv_gnat_sigint=no
19570 fi
19571 rm -rf conftest* *~conftest*
19572
19573 fi
19574 echo "$as_me:19574: result: $cf_cv_gnat_sigint" >&5
19575 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19576
19577 if test $cf_cv_gnat_sigint = yes ; then
19578         USE_GNAT_SIGINT=""
19579 else
19580         USE_GNAT_SIGINT="#"
19581 fi
19582
19583 echo "$as_me:19583: checking if GNAT pragma Unreferenced works" >&5
19584 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19585 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19586   echo $ECHO_N "(cached) $ECHO_C" >&6
19587 else
19588
19589 rm -rf conftest* *~conftest*
19590 cat >>conftest.ads <<CF_EOF
19591 procedure conftest;
19592 CF_EOF
19593 cat >>conftest.adb <<CF_EOF
19594 with Text_IO;
19595 with GNAT.OS_Lib;
19596 procedure conftest is
19597    test : Integer;
19598    pragma Unreferenced (test);
19599 begin
19600    test := 1;
19601    Text_IO.Put ("Hello World");
19602    Text_IO.New_Line;
19603    GNAT.OS_Lib.OS_Exit (0);
19604 end conftest;
19605 CF_EOF
19606 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19607       cf_cv_pragma_unreferenced=yes
19608 else
19609    cf_cv_pragma_unreferenced=no
19610 fi
19611 rm -rf conftest* *~conftest*
19612
19613 fi
19614 echo "$as_me:19614: result: $cf_cv_pragma_unreferenced" >&5
19615 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19616
19617 # if the pragma is supported, use it (needed in the Trace code).
19618 if test $cf_cv_pragma_unreferenced = yes ; then
19619         PRAGMA_UNREF=TRUE
19620 else
19621         PRAGMA_UNREF=FALSE
19622 fi
19623
19624 cf_gnat_libraries=no
19625 cf_gnat_projects=no
19626
19627 echo "$as_me:19627: checking if GNAT supports project files" >&5
19628 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19629 case $cf_gnat_version in #(vi
19630 3.[0-9]*) #(vi
19631         ;;
19632 *)
19633         case $cf_cv_system_name in #(vi
19634         cygwin*) #(vi
19635                 ;;
19636         *)
19637                 mkdir conftest.src conftest.bin conftest.lib
19638                 cd conftest.src
19639                 rm -rf conftest* *~conftest*
19640                 cat >>library.gpr <<CF_EOF
19641 project Library is
19642   Kind := External ("LIB_KIND");
19643   for Library_Name use "ConfTest";
19644   for Object_Dir use ".";
19645   for Library_ALI_Dir use External("LIBRARY_DIR");
19646   for Library_Version use External ("SONAME");
19647   for Library_Kind use Kind;
19648   for Library_Dir use External("BUILD_DIR");
19649   Source_Dir := External ("SOURCE_DIR");
19650   for Source_Dirs use (Source_Dir);
19651   package Compiler is
19652      for Default_Switches ("Ada") use
19653        ("-g",
19654         "-O2",
19655         "-gnatafno",
19656         "-gnatVa",   -- All validity checks
19657         "-gnatwa");  -- Activate all optional errors
19658   end Compiler;
19659 end Library;
19660 CF_EOF
19661                 cat >>confpackage.ads <<CF_EOF
19662 package ConfPackage is
19663    procedure conftest;
19664 end ConfPackage;
19665 CF_EOF
19666                 cat >>confpackage.adb <<CF_EOF
19667 with Text_IO;
19668 package body ConfPackage is
19669    procedure conftest is
19670    begin
19671       Text_IO.Put ("Hello World");
19672       Text_IO.New_Line;
19673    end conftest;
19674 end ConfPackage;
19675 CF_EOF
19676                 if ( $cf_ada_make $ADAFLAGS \
19677                                 -Plibrary.gpr \
19678                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19679                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19680                                 -XSOURCE_DIR=`pwd` \
19681                                 -XSONAME=libConfTest.so.1 \
19682                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19683                         cf_gnat_projects=yes
19684                 fi
19685                 cd ..
19686                 if test -f conftest.lib/confpackage.ali
19687                 then
19688                         cf_gnat_libraries=yes
19689                 fi
19690                 rm -rf conftest* *~conftest*
19691                 ;;
19692         esac
19693         ;;
19694 esac
19695 echo "$as_me:19695: result: $cf_gnat_projects" >&5
19696 echo "${ECHO_T}$cf_gnat_projects" >&6
19697
19698 if test $cf_gnat_projects = yes
19699 then
19700         echo "$as_me:19700: checking if GNAT supports libraries" >&5
19701 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19702         echo "$as_me:19702: result: $cf_gnat_libraries" >&5
19703 echo "${ECHO_T}$cf_gnat_libraries" >&6
19704 fi
19705
19706 if test "$cf_gnat_projects" = yes
19707 then
19708         USE_OLD_MAKERULES="#"
19709         USE_GNAT_PROJECTS=""
19710 else
19711         USE_OLD_MAKERULES=""
19712         USE_GNAT_PROJECTS="#"
19713 fi
19714
19715 if test "$cf_gnat_libraries" = yes
19716 then
19717         USE_GNAT_LIBRARIES=""
19718 else
19719         USE_GNAT_LIBRARIES="#"
19720 fi
19721
19722 echo "$as_me:19722: checking for ada-compiler" >&5
19723 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19724
19725 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19726 if test "${with_ada_compiler+set}" = set; then
19727   withval="$with_ada_compiler"
19728   cf_ada_compiler=$withval
19729 else
19730   cf_ada_compiler=gnatmake
19731 fi;
19732
19733 echo "$as_me:19733: result: $cf_ada_compiler" >&5
19734 echo "${ECHO_T}$cf_ada_compiler" >&6
19735
19736                         cf_ada_package=terminal_interface
19737
19738 echo "$as_me:19738: checking for ada-include" >&5
19739 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19740
19741 # Check whether --with-ada-include or --without-ada-include was given.
19742 if test "${with_ada_include+set}" = set; then
19743   withval="$with_ada_include"
19744
19745 else
19746   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19747 fi; if test -n "$prefix/share/ada/adainclude" ; then
19748
19749 if test "x$prefix" != xNONE; then
19750   cf_path_syntax="$prefix"
19751 else
19752   cf_path_syntax="$ac_default_prefix"
19753 fi
19754
19755 case ".$withval" in #(vi
19756 .\$\(*\)*|.\'*\'*) #(vi
19757   ;;
19758 ..|./*|.\\*) #(vi
19759   ;;
19760 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19761   ;;
19762 .\${*prefix}*|.\${*dir}*) #(vi
19763   eval withval="$withval"
19764   case ".$withval" in #(vi
19765   .NONE/*)
19766     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19767     ;;
19768   esac
19769   ;; #(vi
19770 .no|.NONE/*)
19771   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19772   ;;
19773 *)
19774   { { echo "$as_me:19774: error: expected a pathname, not \"$withval\"" >&5
19775 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19776    { (exit 1); exit 1; }; }
19777   ;;
19778 esac
19779
19780 fi
19781 eval ADA_INCLUDE="$withval"
19782
19783 echo "$as_me:19783: result: $ADA_INCLUDE" >&5
19784 echo "${ECHO_T}$ADA_INCLUDE" >&6
19785
19786 echo "$as_me:19786: checking for ada-objects" >&5
19787 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19788
19789 # Check whether --with-ada-objects or --without-ada-objects was given.
19790 if test "${with_ada_objects+set}" = set; then
19791   withval="$with_ada_objects"
19792
19793 else
19794   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19795 fi; if test -n "$prefix/lib/ada/adalib" ; then
19796
19797 if test "x$prefix" != xNONE; then
19798   cf_path_syntax="$prefix"
19799 else
19800   cf_path_syntax="$ac_default_prefix"
19801 fi
19802
19803 case ".$withval" in #(vi
19804 .\$\(*\)*|.\'*\'*) #(vi
19805   ;;
19806 ..|./*|.\\*) #(vi
19807   ;;
19808 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19809   ;;
19810 .\${*prefix}*|.\${*dir}*) #(vi
19811   eval withval="$withval"
19812   case ".$withval" in #(vi
19813   .NONE/*)
19814     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19815     ;;
19816   esac
19817   ;; #(vi
19818 .no|.NONE/*)
19819   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19820   ;;
19821 *)
19822   { { echo "$as_me:19822: error: expected a pathname, not \"$withval\"" >&5
19823 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19824    { (exit 1); exit 1; }; }
19825   ;;
19826 esac
19827
19828 fi
19829 eval ADA_OBJECTS="$withval"
19830
19831 echo "$as_me:19831: result: $ADA_OBJECTS" >&5
19832 echo "${ECHO_T}$ADA_OBJECTS" >&6
19833
19834 echo "$as_me:19834: checking if an Ada95 shared-library should be built" >&5
19835 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19836
19837 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19838 if test "${with_ada_sharedlib+set}" = set; then
19839   withval="$with_ada_sharedlib"
19840   with_ada_sharedlib=$withval
19841 else
19842   with_ada_sharedlib=no
19843 fi;
19844 echo "$as_me:19844: result: $with_ada_sharedlib" >&5
19845 echo "${ECHO_T}$with_ada_sharedlib" >&6
19846
19847 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19848 MAKE_ADA_SHAREDLIB="#"
19849
19850 if test "x$with_ada_sharedlib" != xno
19851 then
19852         MAKE_ADA_SHAREDLIB=
19853         if test "x$with_ada_sharedlib" != xyes
19854         then
19855                 ADA_SHAREDLIB="$with_ada_sharedlib"
19856         fi
19857 fi
19858
19859                 fi
19860         fi
19861 else
19862         cf_with_ada=no
19863 fi
19864
19865 # do this "late" to avoid conflict with header-checks
19866 if test "x$with_widec" = xyes ; then
19867         echo "$as_me:19867: checking for wchar_t" >&5
19868 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
19869 if test "${ac_cv_type_wchar_t+set}" = set; then
19870   echo $ECHO_N "(cached) $ECHO_C" >&6
19871 else
19872   cat >conftest.$ac_ext <<_ACEOF
19873 #line 19873 "configure"
19874 #include "confdefs.h"
19875 $ac_includes_default
19876 int
19877 main ()
19878 {
19879 if ((wchar_t *) 0)
19880   return 0;
19881 if (sizeof (wchar_t))
19882   return 0;
19883   ;
19884   return 0;
19885 }
19886 _ACEOF
19887 rm -f conftest.$ac_objext
19888 if { (eval echo "$as_me:19888: \"$ac_compile\"") >&5
19889   (eval $ac_compile) 2>&5
19890   ac_status=$?
19891   echo "$as_me:19891: \$? = $ac_status" >&5
19892   (exit $ac_status); } &&
19893          { ac_try='test -s conftest.$ac_objext'
19894   { (eval echo "$as_me:19894: \"$ac_try\"") >&5
19895   (eval $ac_try) 2>&5
19896   ac_status=$?
19897   echo "$as_me:19897: \$? = $ac_status" >&5
19898   (exit $ac_status); }; }; then
19899   ac_cv_type_wchar_t=yes
19900 else
19901   echo "$as_me: failed program was:" >&5
19902 cat conftest.$ac_ext >&5
19903 ac_cv_type_wchar_t=no
19904 fi
19905 rm -f conftest.$ac_objext conftest.$ac_ext
19906 fi
19907 echo "$as_me:19907: result: $ac_cv_type_wchar_t" >&5
19908 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
19909
19910 echo "$as_me:19910: checking size of wchar_t" >&5
19911 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
19912 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
19913   echo $ECHO_N "(cached) $ECHO_C" >&6
19914 else
19915   if test "$ac_cv_type_wchar_t" = yes; then
19916   if test "$cross_compiling" = yes; then
19917   # Depending upon the size, compute the lo and hi bounds.
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)) >= 0)]
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_lo=0 ac_mid=0
19943   while :; do
19944     cat >conftest.$ac_ext <<_ACEOF
19945 #line 19945 "configure"
19946 #include "confdefs.h"
19947 $ac_includes_default
19948 int
19949 main ()
19950 {
19951 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
19952   ;
19953   return 0;
19954 }
19955 _ACEOF
19956 rm -f conftest.$ac_objext
19957 if { (eval echo "$as_me:19957: \"$ac_compile\"") >&5
19958   (eval $ac_compile) 2>&5
19959   ac_status=$?
19960   echo "$as_me:19960: \$? = $ac_status" >&5
19961   (exit $ac_status); } &&
19962          { ac_try='test -s conftest.$ac_objext'
19963   { (eval echo "$as_me:19963: \"$ac_try\"") >&5
19964   (eval $ac_try) 2>&5
19965   ac_status=$?
19966   echo "$as_me:19966: \$? = $ac_status" >&5
19967   (exit $ac_status); }; }; then
19968   ac_hi=$ac_mid; break
19969 else
19970   echo "$as_me: failed program was:" >&5
19971 cat conftest.$ac_ext >&5
19972 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
19973 fi
19974 rm -f conftest.$ac_objext conftest.$ac_ext
19975   done
19976 else
19977   echo "$as_me: failed program was:" >&5
19978 cat conftest.$ac_ext >&5
19979 ac_hi=-1 ac_mid=-1
19980   while :; do
19981     cat >conftest.$ac_ext <<_ACEOF
19982 #line 19982 "configure"
19983 #include "confdefs.h"
19984 $ac_includes_default
19985 int
19986 main ()
19987 {
19988 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
19989   ;
19990   return 0;
19991 }
19992 _ACEOF
19993 rm -f conftest.$ac_objext
19994 if { (eval echo "$as_me:19994: \"$ac_compile\"") >&5
19995   (eval $ac_compile) 2>&5
19996   ac_status=$?
19997   echo "$as_me:19997: \$? = $ac_status" >&5
19998   (exit $ac_status); } &&
19999          { ac_try='test -s conftest.$ac_objext'
20000   { (eval echo "$as_me:20000: \"$ac_try\"") >&5
20001   (eval $ac_try) 2>&5
20002   ac_status=$?
20003   echo "$as_me:20003: \$? = $ac_status" >&5
20004   (exit $ac_status); }; }; then
20005   ac_lo=$ac_mid; break
20006 else
20007   echo "$as_me: failed program was:" >&5
20008 cat conftest.$ac_ext >&5
20009 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20010 fi
20011 rm -f conftest.$ac_objext conftest.$ac_ext
20012   done
20013 fi
20014 rm -f conftest.$ac_objext conftest.$ac_ext
20015 # Binary search between lo and hi bounds.
20016 while test "x$ac_lo" != "x$ac_hi"; do
20017   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20018   cat >conftest.$ac_ext <<_ACEOF
20019 #line 20019 "configure"
20020 #include "confdefs.h"
20021 $ac_includes_default
20022 int
20023 main ()
20024 {
20025 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20026   ;
20027   return 0;
20028 }
20029 _ACEOF
20030 rm -f conftest.$ac_objext
20031 if { (eval echo "$as_me:20031: \"$ac_compile\"") >&5
20032   (eval $ac_compile) 2>&5
20033   ac_status=$?
20034   echo "$as_me:20034: \$? = $ac_status" >&5
20035   (exit $ac_status); } &&
20036          { ac_try='test -s conftest.$ac_objext'
20037   { (eval echo "$as_me:20037: \"$ac_try\"") >&5
20038   (eval $ac_try) 2>&5
20039   ac_status=$?
20040   echo "$as_me:20040: \$? = $ac_status" >&5
20041   (exit $ac_status); }; }; then
20042   ac_hi=$ac_mid
20043 else
20044   echo "$as_me: failed program was:" >&5
20045 cat conftest.$ac_ext >&5
20046 ac_lo=`expr $ac_mid + 1`
20047 fi
20048 rm -f conftest.$ac_objext conftest.$ac_ext
20049 done
20050 ac_cv_sizeof_wchar_t=$ac_lo
20051 else
20052   if test "$cross_compiling" = yes; then
20053   { { echo "$as_me:20053: error: cannot run test program while cross compiling" >&5
20054 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20055    { (exit 1); exit 1; }; }
20056 else
20057   cat >conftest.$ac_ext <<_ACEOF
20058 #line 20058 "configure"
20059 #include "confdefs.h"
20060 $ac_includes_default
20061 int
20062 main ()
20063 {
20064 FILE *f = fopen ("conftest.val", "w");
20065 if (!f)
20066   $ac_main_return (1);
20067 fprintf (f, "%d", (sizeof (wchar_t)));
20068 fclose (f);
20069   ;
20070   return 0;
20071 }
20072 _ACEOF
20073 rm -f conftest$ac_exeext
20074 if { (eval echo "$as_me:20074: \"$ac_link\"") >&5
20075   (eval $ac_link) 2>&5
20076   ac_status=$?
20077   echo "$as_me:20077: \$? = $ac_status" >&5
20078   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20079   { (eval echo "$as_me:20079: \"$ac_try\"") >&5
20080   (eval $ac_try) 2>&5
20081   ac_status=$?
20082   echo "$as_me:20082: \$? = $ac_status" >&5
20083   (exit $ac_status); }; }; then
20084   ac_cv_sizeof_wchar_t=`cat conftest.val`
20085 else
20086   echo "$as_me: program exited with status $ac_status" >&5
20087 echo "$as_me: failed program was:" >&5
20088 cat conftest.$ac_ext >&5
20089 fi
20090 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20091 fi
20092 fi
20093 rm -f conftest.val
20094 else
20095   ac_cv_sizeof_wchar_t=0
20096 fi
20097 fi
20098 echo "$as_me:20098: result: $ac_cv_sizeof_wchar_t" >&5
20099 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20100 cat >>confdefs.h <<EOF
20101 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20102 EOF
20103
20104 fi
20105
20106 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20107 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20108 ###
20109 ### ticlib modules may be a separate library, otherwise contained in termlib.
20110 ### termlib modules may be a separate library, otherwise contained in ncurses.
20111 ###
20112 ### The of "+" or " " between the tokens controls the way the script
20113 ### chooses to split module lists into libraries.
20114 ###
20115 ### (see CF_LIB_RULES).
20116 echo "$as_me:20116: checking for library subsets" >&5
20117 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20118 LIB_SUBSETS=
20119
20120 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20121         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20122         if test "$with_ticlib" != no ; then
20123                 LIB_SUBSETS="${LIB_SUBSETS} "
20124         else
20125                 LIB_SUBSETS="${LIB_SUBSETS}+"
20126         fi
20127 fi
20128
20129 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20130 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20131
20132 if test "$with_termlib" != no ; then
20133         LIB_SUBSETS="${LIB_SUBSETS} "
20134 else
20135         LIB_SUBSETS="${LIB_SUBSETS}+"
20136 fi
20137
20138 LIB_SUBSETS="${LIB_SUBSETS}base"
20139
20140 # Most term-driver calls are to tinfo, but some like init_pair are to the
20141 # base library (so it resides in base).
20142 if test "$with_term_driver" != no ; then
20143         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20144         case $cf_cv_system_name in #(vi
20145         *mingw32*) #(vi
20146                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20147                 ;;
20148         *) #(vi
20149                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20150                 ;;
20151         esac
20152 fi
20153
20154 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20155 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20156
20157 echo "$as_me:20157: result: $LIB_SUBSETS" >&5
20158 echo "${ECHO_T}$LIB_SUBSETS" >&6
20159
20160 ### Construct the list of include-directories to be generated
20161
20162 if test "$GCC" != yes; then
20163         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20164 elif test "$includedir" != "/usr/include"; then
20165         if test "$includedir" = '${prefix}/include' ; then
20166                 if test $prefix != /usr ; then
20167                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20168                 fi
20169         else
20170                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
20171         fi
20172 fi
20173 if test "$srcdir" != "."; then
20174         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20175 fi
20176 CPPFLAGS="-I. -I../include $CPPFLAGS"
20177
20178 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20179 if test "$srcdir" != "."; then
20180         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20181 fi
20182 if test "$GCC" != yes; then
20183         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20184 elif test "$includedir" != "/usr/include"; then
20185         if test "$includedir" = '${prefix}/include' ; then
20186                 if test $prefix != /usr ; then
20187                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20188                 fi
20189         else
20190                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20191         fi
20192 fi
20193
20194 ### Build up pieces for makefile rules
20195 echo "$as_me:20195: checking default library suffix" >&5
20196 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20197
20198         case $DFT_LWR_MODEL in
20199         libtool) DFT_ARG_SUFFIX=''   ;;
20200         normal)  DFT_ARG_SUFFIX=''   ;;
20201         debug)   DFT_ARG_SUFFIX='_g' ;;
20202         profile) DFT_ARG_SUFFIX='_p' ;;
20203         shared)  DFT_ARG_SUFFIX=''   ;;
20204         esac
20205         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20206 echo "$as_me:20206: result: $DFT_ARG_SUFFIX" >&5
20207 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20208
20209 echo "$as_me:20209: checking default library-dependency suffix" >&5
20210 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20211
20212         case X$DFT_LWR_MODEL in #(vi
20213         Xlibtool) #(vi
20214                 DFT_LIB_SUFFIX='.la'
20215                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20216                 ;;
20217         Xdebug) #(vi
20218                 DFT_LIB_SUFFIX='_g.a'
20219                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20220                 ;;
20221         Xprofile) #(vi
20222                 DFT_LIB_SUFFIX='_p.a'
20223                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20224                 ;;
20225         Xshared) #(vi
20226                 case $cf_cv_system_name in
20227                 aix[5-7]*) #(vi
20228                         DFT_LIB_SUFFIX='.a'
20229                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20230                         ;;
20231                 cygwin*|mingw*) #(vi
20232                         DFT_LIB_SUFFIX='.dll'
20233                         DFT_DEP_SUFFIX='.dll.a'
20234                         ;;
20235                 darwin*) #(vi
20236                         DFT_LIB_SUFFIX='.dylib'
20237                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20238                         ;;
20239                 hpux*) #(vi
20240                         case $target in
20241                         ia64*) #(vi
20242                                 DFT_LIB_SUFFIX='.so'
20243                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20244                                 ;;
20245                         *) #(vi
20246                                 DFT_LIB_SUFFIX='.sl'
20247                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20248                                 ;;
20249                         esac
20250                         ;;
20251                 *) #(vi
20252                         DFT_LIB_SUFFIX='.so'
20253                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20254                         ;;
20255                 esac
20256                 ;;
20257         *)
20258                 DFT_LIB_SUFFIX='.a'
20259                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20260                 ;;
20261         esac
20262         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
20263         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
20264 echo "$as_me:20264: result: $DFT_DEP_SUFFIX" >&5
20265 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
20266
20267 echo "$as_me:20267: checking default object directory" >&5
20268 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
20269
20270         case $DFT_LWR_MODEL in
20271         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
20272         normal)  DFT_OBJ_SUBDIR='objects' ;;
20273         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
20274         profile) DFT_OBJ_SUBDIR='obj_p' ;;
20275         shared)
20276                 case $cf_cv_system_name in #(vi
20277                 cygwin) #(vi
20278                         DFT_OBJ_SUBDIR='objects' ;;
20279                 *)
20280                         DFT_OBJ_SUBDIR='obj_s' ;;
20281                 esac
20282         esac
20283 echo "$as_me:20283: result: $DFT_OBJ_SUBDIR" >&5
20284 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
20285
20286 if test "x$cf_with_cxx" = xyes ; then
20287 echo "$as_me:20287: checking c++ library-dependency suffix" >&5
20288 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
20289 if test "$with_libtool" != "no"; then
20290         # libtool thinks it can make c++ shared libraries (perhaps only g++)
20291         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20292 elif test "$with_shared_cxx" != "no"; then
20293         # also for g++ users...
20294         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20295 else
20296         # we normally make a static library because C/C++ library rules differ
20297
20298         case Xnormal in #(vi
20299         Xlibtool) #(vi
20300                 CXX_LIB_SUFFIX='.la'
20301                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20302                 ;;
20303         Xdebug) #(vi
20304                 CXX_LIB_SUFFIX='_g.a'
20305                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20306                 ;;
20307         Xprofile) #(vi
20308                 CXX_LIB_SUFFIX='_p.a'
20309                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20310                 ;;
20311         Xshared) #(vi
20312                 case $cf_cv_system_name in
20313                 aix[5-7]*) #(vi
20314                         CXX_LIB_SUFFIX='.a'
20315                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20316                         ;;
20317                 cygwin*|mingw*) #(vi
20318                         CXX_LIB_SUFFIX='.dll'
20319                         CXX_DEP_SUFFIX='.dll.a'
20320                         ;;
20321                 darwin*) #(vi
20322                         CXX_LIB_SUFFIX='.dylib'
20323                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20324                         ;;
20325                 hpux*) #(vi
20326                         case $target in
20327                         ia64*) #(vi
20328                                 CXX_LIB_SUFFIX='.so'
20329                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20330                                 ;;
20331                         *) #(vi
20332                                 CXX_LIB_SUFFIX='.sl'
20333                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20334                                 ;;
20335                         esac
20336                         ;;
20337                 *) #(vi
20338                         CXX_LIB_SUFFIX='.so'
20339                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20340                         ;;
20341                 esac
20342                 ;;
20343         *)
20344                 CXX_LIB_SUFFIX='.a'
20345                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20346                 ;;
20347         esac
20348         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20349         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20350
20351 fi
20352 echo "$as_me:20352: result: $CXX_LIB_SUFFIX" >&5
20353 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20354
20355 fi
20356
20357 # do not want -ldl in build except as needed for -lncurses dependency
20358 if test "x$with_dlsym" = xyes ; then
20359 if test $DFT_LWR_MODEL = shared || \
20360    test $DFT_LWR_MODEL = libtool ; then
20361
20362 # remove dl library from $LIBS
20363 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20364
20365 fi
20366 fi
20367 ### Set up low-level terminfo dependencies for makefiles.
20368
20369 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20370 # do not need libdl
20371 TICS_LIST=
20372 if test "x$with_dlsym" = xyes ; then
20373
20374 # remove dl library from $SHLIB_LIST
20375 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20376
20377 fi
20378
20379 if test "$with_ticlib" != no ; then
20380
20381         if test "x$with_ticlib" != xyes ; then
20382                 TICS_NAME=$with_ticlib
20383                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20384                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20385                 TICS_LIB_SUFFIX="${with_ticlib}"
20386         else
20387                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20388                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20389                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20390         fi
20391         TICS_LDFLAGS="-L${LIB_DIR}"
20392         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20393 else
20394         TICS_LDFLAGS="-L${LIB_DIR}"
20395         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20396 fi
20397
20398 if test "$with_termlib" != no ; then
20399
20400         if test "x$with_termlib" != xyes ; then
20401                 TINFO_NAME=$with_termlib
20402                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20403                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20404                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20405                 TINFO_LIB_SUFFIX="${with_termlib}"
20406         else
20407                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20408                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20409                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20410                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20411         fi
20412
20413         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20414         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20415         if test "$DFT_LWR_MODEL" = "libtool"; then
20416                 TEST_ARGS="${TEST_DEPS}"
20417                 TEST_ARG2="${TEST_DEP2}"
20418                 TINFO_LDFLAGS="-L${LIB_DIR}"
20419                 TINFO_LIBS="$TEST_ARGS"
20420                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20421                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20422         else
20423                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20424                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20425                 if test "x$with_term_driver" != xno ; then
20426                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20427                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20428                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20429                 else
20430                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20431                         TINFO_LIBS="$TEST_ARGS"
20432                 fi
20433                 TINFO_LDFLAGS="-L${LIB_DIR}"
20434                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20435         fi
20436 else
20437         # the next lines are needed for linking libtic over libncurses
20438         TINFO_NAME=${LIB_NAME}
20439         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20440         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20441         if test "x$with_tic_depends" = xyes ; then
20442                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20443         else
20444                 TICS_LIST="$SHLIB_LIST"
20445         fi
20446
20447         TINFO_LDFLAGS="-L${LIB_DIR}"
20448         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20449 fi
20450
20451 if test "$DFT_LWR_MODEL" = shared ; then
20452         case $cf_cv_system_name in #(vi
20453         cygwin*)
20454                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
20455                 TINFO_SUFFIX=.dll
20456                 ;;
20457         esac
20458 fi
20459
20460 if test "x$with_dlsym" = xyes ; then
20461
20462 # remove dl library from $TICS_LIST
20463 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20464
20465 fi
20466
20467 if test "$DFT_LWR_MODEL" = "libtool"; then
20468     OBJEXT=lo
20469 fi
20470
20471 # needed for Ada95
20472 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20473
20474 case $DFT_LWR_MODEL in
20475 normal|debug|profile)
20476
20477 if test "$GCC" = yes ; then
20478         case $cf_cv_system_name in #(
20479         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20480                 LDFLAGS_STATIC=
20481                 LDFLAGS_SHARED=
20482                 ;;
20483     *)  #( normally, except when broken
20484         LDFLAGS_STATIC=-static
20485         LDFLAGS_SHARED=-dynamic
20486         ;;
20487     esac
20488 else
20489         case $cf_cv_system_name in #(
20490         aix[4-7]*)      #( from ld manpage
20491                 LDFLAGS_STATIC=-bstatic
20492                 LDFLAGS_SHARED=-bdynamic
20493                 ;;
20494         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20495                 # We could also use just "archive" and "shared".
20496                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20497                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20498                 ;;
20499         irix*)          #( from ld manpage IRIX64
20500                 LDFLAGS_STATIC=-Bstatic
20501                 LDFLAGS_SHARED=-Bdynamic
20502                 ;;
20503         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20504                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20505                 LDFLAGS_STATIC=-noso
20506                 LDFLAGS_SHARED=-so_archive
20507                 ;;
20508         solaris2*)
20509                 LDFLAGS_STATIC=-Bstatic
20510                 LDFLAGS_SHARED=-Bdynamic
20511                 ;;
20512         esac
20513 fi
20514
20515 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20516 then
20517         echo "$as_me:20517: checking if linker supports switching between static/dynamic" >&5
20518 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20519
20520         rm -f libconftest.a
20521         cat >conftest.$ac_ext <<EOF
20522 #line 20522 "configure"
20523 #include <stdio.h>
20524 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20525 EOF
20526         if { (eval echo "$as_me:20526: \"$ac_compile\"") >&5
20527   (eval $ac_compile) 2>&5
20528   ac_status=$?
20529   echo "$as_me:20529: \$? = $ac_status" >&5
20530   (exit $ac_status); } ; then
20531                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20532                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20533         fi
20534         rm -f conftest.*
20535
20536         cf_save_LIBS="$LIBS"
20537
20538         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20539         cat >conftest.$ac_ext <<_ACEOF
20540 #line 20540 "configure"
20541 #include "confdefs.h"
20542
20543 #line 20543 "configure"
20544 #include <stdio.h>
20545 int cf_ldflags_static(FILE *fp);
20546
20547 int
20548 main ()
20549 {
20550
20551         return cf_ldflags_static(stdin);
20552
20553   ;
20554   return 0;
20555 }
20556 _ACEOF
20557 rm -f conftest.$ac_objext conftest$ac_exeext
20558 if { (eval echo "$as_me:20558: \"$ac_link\"") >&5
20559   (eval $ac_link) 2>&5
20560   ac_status=$?
20561   echo "$as_me:20561: \$? = $ac_status" >&5
20562   (exit $ac_status); } &&
20563          { ac_try='test -s conftest$ac_exeext'
20564   { (eval echo "$as_me:20564: \"$ac_try\"") >&5
20565   (eval $ac_try) 2>&5
20566   ac_status=$?
20567   echo "$as_me:20567: \$? = $ac_status" >&5
20568   (exit $ac_status); }; }; then
20569
20570         # some linkers simply ignore the -dynamic
20571         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20572         *static*) # (vi
20573                 cf_ldflags_static=no
20574                 ;;
20575         *)
20576                 cf_ldflags_static=yes
20577                 ;;
20578         esac
20579
20580 else
20581   echo "$as_me: failed program was:" >&5
20582 cat conftest.$ac_ext >&5
20583 cf_ldflags_static=no
20584 fi
20585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20586
20587         rm -f libconftest.*
20588         LIBS="$cf_save_LIBS"
20589
20590         echo "$as_me:20590: result: $cf_ldflags_static" >&5
20591 echo "${ECHO_T}$cf_ldflags_static" >&6
20592
20593         if test $cf_ldflags_static != yes
20594         then
20595                 LDFLAGS_STATIC=
20596                 LDFLAGS_SHARED=
20597         fi
20598 else
20599         LDFLAGS_STATIC=
20600         LDFLAGS_SHARED=
20601 fi
20602
20603         ;;
20604 esac
20605
20606 echo "$as_me:20606: checking where we will install curses.h" >&5
20607 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20608
20609 includesubdir=
20610 if test "$with_overwrite" = no && \
20611  ( test "x$includedir" = 'x${prefix}/include' || \
20612    test "x$includedir" = "x${prefix}/include" )
20613 then
20614         includesubdir="/ncurses${LIB_SUFFIX}"
20615 fi
20616 echo "$as_me:20616: result: ${includedir}${includesubdir}" >&5
20617 echo "${ECHO_T}${includedir}${includesubdir}" >&6
20618
20619 ### Resolve a conflict between normal and wide-curses by forcing applications
20620 ### that will need libutf8 to add it to their configure script.
20621 if test "$with_overwrite" != no ; then
20622 if test "$NCURSES_LIBUTF8" = 1 ; then
20623         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20624         { echo "$as_me:20624: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20625 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20626 fi
20627 fi
20628 WITH_OVERWRITE=$with_overwrite
20629
20630 # used to separate tack out of the tree
20631 NCURSES_TREE=
20632
20633 ### predefined stuff for the test programs
20634
20635 cat >>confdefs.h <<\EOF
20636 #define HAVE_SLK_COLOR 1
20637 EOF
20638
20639 ### Construct the list of subdirectories for which we'll customize makefiles
20640 ### with the appropriate compile-rules.
20641
20642 echo "$as_me:20642: checking for src modules" >&5
20643 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20644
20645 # dependencies and linker-arguments for test-programs
20646 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20647 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20648 if test "$DFT_LWR_MODEL" = "libtool"; then
20649         TEST_ARGS="${TEST_DEPS}"
20650         TEST_ARG2="${TEST_DEP2}"
20651 else
20652         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20653         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20654 fi
20655
20656 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20657 cf_cv_src_modules=
20658 for cf_dir in $modules_to_build
20659 do
20660         if test -f $srcdir/$cf_dir/modules; then
20661
20662                 # We may/may not have tack in the distribution, though the
20663                 # makefile is.
20664                 if test $cf_dir = tack ; then
20665                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20666                                 continue
20667                         fi
20668                 fi
20669
20670                 if test -z "$cf_cv_src_modules"; then
20671                         cf_cv_src_modules=$cf_dir
20672                 else
20673                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20674                 fi
20675
20676                 # Make the ncurses_cfg.h file record the library interface files as
20677                 # well.  These are header files that are the same name as their
20678                 # directory.  Ncurses is the only library that does not follow
20679                 # that pattern.
20680                 if test $cf_dir = tack ; then
20681                         continue
20682                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20683
20684 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20685
20686                         cat >>confdefs.h <<EOF
20687 #define HAVE_${cf_have_include}_H 1
20688 EOF
20689
20690                         cat >>confdefs.h <<EOF
20691 #define HAVE_LIB${cf_have_include} 1
20692 EOF
20693
20694                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20695                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20696                         if test "$DFT_LWR_MODEL" = "libtool"; then
20697                                 TEST_ARGS="${TEST_DEPS}"
20698                                 TEST_ARG2="${TEST_DEP2}"
20699                         else
20700                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20701                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20702                         fi
20703                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20704                 fi
20705         fi
20706 done
20707 echo "$as_me:20707: result: $cf_cv_src_modules" >&5
20708 echo "${ECHO_T}$cf_cv_src_modules" >&6
20709
20710 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20711 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20712
20713 SRC_SUBDIRS=
20714 if test "x$cf_with_manpages" != xno ; then
20715         SRC_SUBDIRS="$SRC_SUBDIRS man"
20716 fi
20717 SRC_SUBDIRS="$SRC_SUBDIRS include"
20718 for cf_dir in $cf_cv_src_modules
20719 do
20720         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20721 done
20722 if test "x$cf_with_tests" != "xno" ; then
20723         SRC_SUBDIRS="$SRC_SUBDIRS test"
20724 fi
20725 if test "x$cf_with_db_install" = xyes; then
20726         test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20727 fi
20728 if test "$cf_with_cxx_binding" != no; then
20729         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20730         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20731 fi
20732
20733 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20734 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20735
20736 ADA_SUBDIRS=
20737 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20738         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20739         ADA_SUBDIRS="gen src"
20740         if test "x$cf_with_tests" != "xno" ; then
20741                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20742         fi
20743 fi
20744
20745 SUB_MAKEFILES=
20746 for cf_dir in $SRC_SUBDIRS
20747 do
20748         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20749 done
20750
20751 if test -n "$ADA_SUBDIRS"; then
20752         for cf_dir in $ADA_SUBDIRS
20753         do
20754                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20755         done
20756
20757 fi
20758
20759 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20760    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20761    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20762 fi
20763
20764 DIRS_TO_MAKE="lib"
20765 for cf_item in $cf_list_models
20766 do
20767
20768         case $cf_item in
20769         libtool) cf_subdir='obj_lo'  ;;
20770         normal)  cf_subdir='objects' ;;
20771         debug)   cf_subdir='obj_g' ;;
20772         profile) cf_subdir='obj_p' ;;
20773         shared)
20774                 case $cf_cv_system_name in #(vi
20775                 cygwin) #(vi
20776                         cf_subdir='objects' ;;
20777                 *)
20778                         cf_subdir='obj_s' ;;
20779                 esac
20780         esac
20781
20782         for cf_item2 in $DIRS_TO_MAKE
20783         do
20784                 test $cf_item2 = $cf_subdir && break
20785         done
20786         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20787 done
20788 for cf_dir in $DIRS_TO_MAKE
20789 do
20790         test ! -d $cf_dir && mkdir $cf_dir
20791 done
20792
20793 # symbols that differ when compiling Ada95 by itself.
20794 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20795
20796 # values to use as strings
20797
20798 cat >>confdefs.h <<EOF
20799 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20800 EOF
20801
20802 cat >>confdefs.h <<EOF
20803 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20804 EOF
20805
20806 ### Now that we're done running tests, add the compiler-warnings, if any
20807
20808 cf_fix_cppflags=no
20809 cf_new_cflags=
20810 cf_new_cppflags=
20811 cf_new_extra_cppflags=
20812
20813 for cf_add_cflags in $EXTRA_CFLAGS
20814 do
20815 case $cf_fix_cppflags in
20816 no)
20817         case $cf_add_cflags in #(vi
20818         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20819                 case $cf_add_cflags in
20820                 -D*)
20821                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20822
20823                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20824                                 && test -z "${cf_tst_cflags}" \
20825                                 && cf_fix_cppflags=yes
20826
20827                         if test $cf_fix_cppflags = yes ; then
20828                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20829                                 continue
20830                         elif test "${cf_tst_cflags}" = "\"'" ; then
20831                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20832                                 continue
20833                         fi
20834                         ;;
20835                 esac
20836                 case "$CPPFLAGS" in
20837                 *$cf_add_cflags) #(vi
20838                         ;;
20839                 *) #(vi
20840                         case $cf_add_cflags in #(vi
20841                         -D*)
20842                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20843
20844 CPPFLAGS=`echo "$CPPFLAGS" | \
20845         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20846                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20847
20848                                 ;;
20849                         esac
20850                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20851                         ;;
20852                 esac
20853                 ;;
20854         *)
20855                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20856                 ;;
20857         esac
20858         ;;
20859 yes)
20860         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20861
20862         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20863
20864         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20865                 && test -z "${cf_tst_cflags}" \
20866                 && cf_fix_cppflags=no
20867         ;;
20868 esac
20869 done
20870
20871 if test -n "$cf_new_cflags" ; then
20872
20873         CFLAGS="$CFLAGS $cf_new_cflags"
20874 fi
20875
20876 if test -n "$cf_new_cppflags" ; then
20877
20878         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20879 fi
20880
20881 if test -n "$cf_new_extra_cppflags" ; then
20882
20883         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20884 fi
20885
20886 ### Define substitutions for header files to avoid name-pollution
20887
20888 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20889         HAVE_TCGETATTR=1
20890 else
20891         HAVE_TCGETATTR=0
20892 fi
20893
20894 if test "x$ac_cv_header_termio_h" = xyes ; then
20895         HAVE_TERMIO_H=1
20896 else
20897         HAVE_TERMIO_H=0
20898 fi
20899
20900 if test "x$ac_cv_header_termios_h" = xyes ; then
20901         HAVE_TERMIOS_H=1
20902 else
20903         HAVE_TERMIOS_H=0
20904 fi
20905
20906 ################################################################################
20907 test "x$use_database" = xyes && \
20908 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20909
20910 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20911 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20912
20913 if test "x$enable_pc_files" = xyes ; then \
20914 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20915 MAKE_PC_FILES=
20916 else
20917 MAKE_PC_FILES="#"
20918 fi
20919
20920 # Extract the first word of "tic", so it can be a program name with args.
20921 set dummy tic; ac_word=$2
20922 echo "$as_me:20922: checking for $ac_word" >&5
20923 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20924 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20925   echo $ECHO_N "(cached) $ECHO_C" >&6
20926 else
20927   case $TIC_PATH in
20928   [\\/]* | ?:[\\/]*)
20929   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20930   ;;
20931   *)
20932   ac_save_IFS=$IFS; IFS=$ac_path_separator
20933 ac_dummy="$PATH:/usr/local/ncurses/bin"
20934 for ac_dir in $ac_dummy; do
20935   IFS=$ac_save_IFS
20936   test -z "$ac_dir" && ac_dir=.
20937   if $as_executable_p "$ac_dir/$ac_word"; then
20938    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20939    echo "$as_me:20939: found $ac_dir/$ac_word" >&5
20940    break
20941 fi
20942 done
20943
20944   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20945   ;;
20946 esac
20947 fi
20948 TIC_PATH=$ac_cv_path_TIC_PATH
20949
20950 if test -n "$TIC_PATH"; then
20951   echo "$as_me:20951: result: $TIC_PATH" >&5
20952 echo "${ECHO_T}$TIC_PATH" >&6
20953 else
20954   echo "$as_me:20954: result: no" >&5
20955 echo "${ECHO_T}no" >&6
20956 fi
20957
20958 if test -n "$FALLBACK_LIST"
20959 then
20960         if test "$TIC_PATH" = unknown
20961         then
20962                 { echo "$as_me:20962: WARNING: no tic program found for fallbacks" >&5
20963 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20964         fi
20965 fi
20966
20967 if test "x$cf_with_tests" != xno ; then
20968         MAKE_TESTS=
20969 else
20970         MAKE_TESTS="#"
20971 fi
20972
20973 ADAHTML_DIR=../../doc/html/ada
20974
20975 # these could be configurable, but are not currently
20976 PANEL_NAME=panel
20977 MENU_NAME=menu
20978 FORM_NAME=form
20979 CXX_NAME=ncurses++
20980
20981 SUB_SCRIPTS=
20982
20983 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"
20984 ac_config_commands="$ac_config_commands default"
20985 cat >confcache <<\_ACEOF
20986 # This file is a shell script that caches the results of configure
20987 # tests run on this system so they can be shared between configure
20988 # scripts and configure runs, see configure's option --config-cache.
20989 # It is not useful on other systems.  If it contains results you don't
20990 # want to keep, you may remove or edit it.
20991 #
20992 # config.status only pays attention to the cache file if you give it
20993 # the --recheck option to rerun configure.
20994 #
20995 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20996 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20997 # following values.
20998
20999 _ACEOF
21000
21001 # The following way of writing the cache mishandles newlines in values,
21002 # but we know of no workaround that is simple, portable, and efficient.
21003 # So, don't put newlines in cache variables' values.
21004 # Ultrix sh set writes to stderr and can't be redirected directly,
21005 # and sets the high bit in the cache file unless we assign to the vars.
21006 {
21007   (set) 2>&1 |
21008     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21009     *ac_space=\ *)
21010       # `set' does not quote correctly, so add quotes (double-quote
21011       # substitution turns \\\\ into \\, and sed turns \\ into \).
21012       sed -n \
21013         "s/'/'\\\\''/g;
21014           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21015       ;;
21016     *)
21017       # `set' quotes correctly as required by POSIX, so do not add quotes.
21018       sed -n \
21019         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21020       ;;
21021     esac;
21022 } |
21023   sed '
21024      t clear
21025      : clear
21026      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21027      t end
21028      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21029      : end' >>confcache
21030 if cmp -s $cache_file confcache; then :; else
21031   if test -w $cache_file; then
21032     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21033     cat confcache >$cache_file
21034   else
21035     echo "not updating unwritable cache $cache_file"
21036   fi
21037 fi
21038 rm -f confcache
21039
21040 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21041 # Let make expand exec_prefix.
21042 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21043
21044 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21045 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21046 # trailing colons and then remove the whole line if VPATH becomes empty
21047 # (actually we leave an empty line to preserve line numbers).
21048 if test "x$srcdir" = x.; then
21049   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21050 s/:*\$(srcdir):*/:/;
21051 s/:*\${srcdir}:*/:/;
21052 s/:*@srcdir@:*/:/;
21053 s/^\([^=]*=[    ]*\):*/\1/;
21054 s/:*$//;
21055 s/^[^=]*=[      ]*$//;
21056 }'
21057 fi
21058
21059 DEFS=-DHAVE_CONFIG_H
21060
21061 : ${CONFIG_STATUS=./config.status}
21062 ac_clean_files_save=$ac_clean_files
21063 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21064 { echo "$as_me:21064: creating $CONFIG_STATUS" >&5
21065 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21066 cat >$CONFIG_STATUS <<_ACEOF
21067 #! $SHELL
21068 # Generated automatically by configure.
21069 # Run this file to recreate the current configuration.
21070 # Compiler output produced by configure, useful for debugging
21071 # configure, is in config.log if it exists.
21072
21073 debug=false
21074 SHELL=\${CONFIG_SHELL-$SHELL}
21075 ac_cs_invocation="\$0 \$@"
21076
21077 _ACEOF
21078
21079 cat >>$CONFIG_STATUS <<\_ACEOF
21080 # Be Bourne compatible
21081 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21082   emulate sh
21083   NULLCMD=:
21084 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21085   set -o posix
21086 fi
21087
21088 # Name of the executable.
21089 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21090
21091 if expr a : '\(a\)' >/dev/null 2>&1; then
21092   as_expr=expr
21093 else
21094   as_expr=false
21095 fi
21096
21097 rm -f conf$$ conf$$.exe conf$$.file
21098 echo >conf$$.file
21099 if ln -s conf$$.file conf$$ 2>/dev/null; then
21100   # We could just check for DJGPP; but this test a) works b) is more generic
21101   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21102   if test -f conf$$.exe; then
21103     # Don't use ln at all; we don't have any links
21104     as_ln_s='cp -p'
21105   else
21106     as_ln_s='ln -s'
21107   fi
21108 elif ln conf$$.file conf$$ 2>/dev/null; then
21109   as_ln_s=ln
21110 else
21111   as_ln_s='cp -p'
21112 fi
21113 rm -f conf$$ conf$$.exe conf$$.file
21114
21115 as_executable_p="test -f"
21116
21117 # Support unset when possible.
21118 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21119   as_unset=unset
21120 else
21121   as_unset=false
21122 fi
21123
21124 # NLS nuisances.
21125 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21126 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21127 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21128 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21129 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21130 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21131 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21132 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21133
21134 # IFS
21135 # We need space, tab and new line, in precisely that order.
21136 as_nl='
21137 '
21138 IFS="   $as_nl"
21139
21140 # CDPATH.
21141 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21142
21143 exec 6>&1
21144
21145 _ACEOF
21146
21147 # Files that config.status was made for.
21148 if test -n "$ac_config_files"; then
21149   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21150 fi
21151
21152 if test -n "$ac_config_headers"; then
21153   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21154 fi
21155
21156 if test -n "$ac_config_links"; then
21157   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21158 fi
21159
21160 if test -n "$ac_config_commands"; then
21161   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21162 fi
21163
21164 cat >>$CONFIG_STATUS <<\EOF
21165
21166 ac_cs_usage="\
21167 \`$as_me' instantiates files from templates according to the
21168 current configuration.
21169
21170 Usage: $0 [OPTIONS] [FILE]...
21171
21172   -h, --help       print this help, then exit
21173   -V, --version    print version number, then exit
21174   -d, --debug      don't remove temporary files
21175       --recheck    update $as_me by reconfiguring in the same conditions
21176   --file=FILE[:TEMPLATE]
21177                    instantiate the configuration file FILE
21178   --header=FILE[:TEMPLATE]
21179                    instantiate the configuration header FILE
21180
21181 Configuration files:
21182 $config_files
21183
21184 Configuration headers:
21185 $config_headers
21186
21187 Configuration commands:
21188 $config_commands
21189
21190 Report bugs to <dickey@invisible-island.net>."
21191 EOF
21192
21193 cat >>$CONFIG_STATUS <<EOF
21194 ac_cs_version="\\
21195 config.status
21196 configured by $0, generated by GNU Autoconf 2.52.20121002,
21197   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21198
21199 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21200 Free Software Foundation, Inc.
21201 This config.status script is free software; the Free Software Foundation
21202 gives unlimited permission to copy, distribute and modify it."
21203 srcdir=$srcdir
21204 INSTALL="$INSTALL"
21205 EOF
21206
21207 cat >>$CONFIG_STATUS <<\EOF
21208 # If no file are specified by the user, then we need to provide default
21209 # value.  By we need to know if files were specified by the user.
21210 ac_need_defaults=:
21211 while test $# != 0
21212 do
21213   case $1 in
21214   --*=*)
21215     ac_option=`expr "x$1" : 'x\([^=]*\)='`
21216     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21217     shift
21218     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21219     shift
21220     ;;
21221   -*);;
21222   *) # This is not an option, so the user has probably given explicit
21223      # arguments.
21224      ac_need_defaults=false;;
21225   esac
21226
21227   case $1 in
21228   # Handling of the options.
21229 EOF
21230 cat >>$CONFIG_STATUS <<EOF
21231   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21232     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21233     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21234 EOF
21235 cat >>$CONFIG_STATUS <<\EOF
21236   --version | --vers* | -V )
21237     echo "$ac_cs_version"; exit 0 ;;
21238   --he | --h)
21239     # Conflict between --help and --header
21240     { { echo "$as_me:21240: error: ambiguous option: $1
21241 Try \`$0 --help' for more information." >&5
21242 echo "$as_me: error: ambiguous option: $1
21243 Try \`$0 --help' for more information." >&2;}
21244    { (exit 1); exit 1; }; };;
21245   --help | --hel | -h )
21246     echo "$ac_cs_usage"; exit 0 ;;
21247   --debug | --d* | -d )
21248     debug=: ;;
21249   --file | --fil | --fi | --f )
21250     shift
21251     CONFIG_FILES="$CONFIG_FILES $1"
21252     ac_need_defaults=false;;
21253   --header | --heade | --head | --hea )
21254     shift
21255     CONFIG_HEADERS="$CONFIG_HEADERS $1"
21256     ac_need_defaults=false;;
21257
21258   # This is an error.
21259   -*) { { echo "$as_me:21259: error: unrecognized option: $1
21260 Try \`$0 --help' for more information." >&5
21261 echo "$as_me: error: unrecognized option: $1
21262 Try \`$0 --help' for more information." >&2;}
21263    { (exit 1); exit 1; }; } ;;
21264
21265   *) ac_config_targets="$ac_config_targets $1" ;;
21266
21267   esac
21268   shift
21269 done
21270
21271 exec 5>>config.log
21272 cat >&5 << _ACEOF
21273
21274 ## ----------------------- ##
21275 ## Running config.status.  ##
21276 ## ----------------------- ##
21277
21278 This file was extended by $as_me 2.52.20121002, executed with
21279   CONFIG_FILES    = $CONFIG_FILES
21280   CONFIG_HEADERS  = $CONFIG_HEADERS
21281   CONFIG_LINKS    = $CONFIG_LINKS
21282   CONFIG_COMMANDS = $CONFIG_COMMANDS
21283   > $ac_cs_invocation
21284 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21285
21286 _ACEOF
21287 EOF
21288
21289 cat >>$CONFIG_STATUS <<EOF
21290 #
21291 # INIT-COMMANDS section.
21292 #
21293
21294 ### Special initialization commands, used to pass information from the
21295 ### configuration-run into config.status
21296
21297 AWK="$AWK"
21298 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
21299 DFT_LWR_MODEL="$DFT_LWR_MODEL"
21300 ECHO_LD="$ECHO_LD"
21301 LDCONFIG="$LDCONFIG"
21302 LIBTOOL_VERSION="$LIBTOOL_VERSION"
21303 LIB_NAME="$LIB_NAME"
21304 LIB_PREFIX="$LIB_PREFIX"
21305 LIB_SUBSETS="$LIB_SUBSETS"
21306 LIB_SUFFIX="$LIB_SUFFIX"
21307 LIB_TRACING="$LIB_TRACING"
21308 LN_S="$LN_S"
21309 MAKE_TERMINFO="$MAKE_TERMINFO"
21310 NCURSES_MAJOR="$NCURSES_MAJOR"
21311 NCURSES_MINOR="$NCURSES_MINOR"
21312 NCURSES_OSPEED="$NCURSES_OSPEED"
21313 NCURSES_PATCH="$NCURSES_PATCH"
21314 SRC_SUBDIRS="$SRC_SUBDIRS"
21315 TERMINFO="$TERMINFO"
21316 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
21317 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
21318 TICS_NAME="$TICS_NAME"
21319 TIC_PATH="$TIC_PATH"
21320 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
21321 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
21322 TINFO_NAME="$TINFO_NAME"
21323 TINFO_SUFFIX="$TINFO_SUFFIX"
21324 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
21325 WITH_CURSES_H="$with_curses_h"
21326 WITH_ECHO="${enable_echo:=yes}"
21327 WITH_OVERWRITE="$with_overwrite"
21328 cf_LIST_MODELS="$cf_list_models"
21329 cf_cv_abi_version="$cf_cv_abi_version"
21330 cf_cv_do_relink="$cf_cv_do_relink"
21331 cf_cv_do_symlinks="$cf_cv_do_symlinks"
21332 cf_cv_enable_lp64="$cf_cv_enable_lp64"
21333 cf_cv_enable_opaque="$cf_cv_enable_opaque"
21334 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
21335 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
21336 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
21337 cf_cv_rel_version="$cf_cv_rel_version"
21338 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
21339 cf_cv_shared_soname='$cf_cv_shared_soname'
21340 cf_cv_shlib_version="$cf_cv_shlib_version"
21341 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
21342 cf_cv_system_name="$cf_cv_system_name"
21343 cf_cv_term_driver="$with_term_driver"
21344 cf_with_ada="$cf_with_ada"
21345 cf_with_cxx_binding="$cf_with_cxx_binding"
21346 cf_with_db_install="$cf_with_db_install"
21347 cf_with_manpages="$cf_with_manpages"
21348 cf_with_tests="$cf_with_tests"
21349 with_shared_cxx="$with_shared_cxx"
21350 host="$host"
21351 target="$target"
21352
21353 EOF
21354
21355 cat >>$CONFIG_STATUS <<\EOF
21356 for ac_config_target in $ac_config_targets
21357 do
21358   case "$ac_config_target" in
21359   # Handling of arguments.
21360   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
21361   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
21362   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
21363   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
21364   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
21365   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
21366   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
21367   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21368   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21369   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21370   *) { { echo "$as_me:21370: error: invalid argument: $ac_config_target" >&5
21371 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21372    { (exit 1); exit 1; }; };;
21373   esac
21374 done
21375
21376 # If the user did not use the arguments to specify the items to instantiate,
21377 # then the envvar interface is used.  Set only those that are not.
21378 # We use the long form for the default assignment because of an extremely
21379 # bizarre bug on SunOS 4.1.3.
21380 if $ac_need_defaults; then
21381   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21382   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21383   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21384 fi
21385
21386 # Create a temporary directory, and hook for its removal unless debugging.
21387 $debug ||
21388 {
21389   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21390   trap '{ (exit 1); exit 1; }' 1 2 13 15
21391 }
21392
21393 # Create a (secure) tmp directory for tmp files.
21394 : ${TMPDIR=/tmp}
21395 {
21396   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21397   test -n "$tmp" && test -d "$tmp"
21398 }  ||
21399 {
21400   tmp=$TMPDIR/cs$$-$RANDOM
21401   (umask 077 && mkdir $tmp)
21402 } ||
21403 {
21404    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21405    { (exit 1); exit 1; }
21406 }
21407
21408 EOF
21409
21410 cat >>$CONFIG_STATUS <<EOF
21411
21412 #
21413 # CONFIG_FILES section.
21414 #
21415
21416 # No need to generate the scripts if there are no CONFIG_FILES.
21417 # This happens for instance when ./config.status config.h
21418 if test -n "\$CONFIG_FILES"; then
21419   # Protect against being on the right side of a sed subst in config.status.
21420   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21421    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21422 s,@SHELL@,$SHELL,;t t
21423 s,@exec_prefix@,$exec_prefix,;t t
21424 s,@prefix@,$prefix,;t t
21425 s,@program_transform_name@,$program_transform_name,;t t
21426 s,@bindir@,$bindir,;t t
21427 s,@sbindir@,$sbindir,;t t
21428 s,@libexecdir@,$libexecdir,;t t
21429 s,@datarootdir@,$datarootdir,;t t
21430 s,@datadir@,$datadir,;t t
21431 s,@sysconfdir@,$sysconfdir,;t t
21432 s,@sharedstatedir@,$sharedstatedir,;t t
21433 s,@localstatedir@,$localstatedir,;t t
21434 s,@libdir@,$libdir,;t t
21435 s,@includedir@,$includedir,;t t
21436 s,@oldincludedir@,$oldincludedir,;t t
21437 s,@infodir@,$infodir,;t t
21438 s,@mandir@,$mandir,;t t
21439 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21440 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21441 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21442 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21443 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21444 s,@build_alias@,$build_alias,;t t
21445 s,@host_alias@,$host_alias,;t t
21446 s,@target_alias@,$target_alias,;t t
21447 s,@ECHO_C@,$ECHO_C,;t t
21448 s,@ECHO_N@,$ECHO_N,;t t
21449 s,@ECHO_T@,$ECHO_T,;t t
21450 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21451 s,@DEFS@,$DEFS,;t t
21452 s,@LIBS@,$LIBS,;t t
21453 s,@top_builddir@,$top_builddir,;t t
21454 s,@EGREP@,$EGREP,;t t
21455 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21456 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21457 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21458 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21459 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21460 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21461 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21462 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21463 s,@build@,$build,;t t
21464 s,@build_cpu@,$build_cpu,;t t
21465 s,@build_vendor@,$build_vendor,;t t
21466 s,@build_os@,$build_os,;t t
21467 s,@host@,$host,;t t
21468 s,@host_cpu@,$host_cpu,;t t
21469 s,@host_vendor@,$host_vendor,;t t
21470 s,@host_os@,$host_os,;t t
21471 s,@target@,$target,;t t
21472 s,@target_cpu@,$target_cpu,;t t
21473 s,@target_vendor@,$target_vendor,;t t
21474 s,@target_os@,$target_os,;t t
21475 s,@CC@,$CC,;t t
21476 s,@CFLAGS@,$CFLAGS,;t t
21477 s,@LDFLAGS@,$LDFLAGS,;t t
21478 s,@CPPFLAGS@,$CPPFLAGS,;t t
21479 s,@ac_ct_CC@,$ac_ct_CC,;t t
21480 s,@EXEEXT@,$EXEEXT,;t t
21481 s,@OBJEXT@,$OBJEXT,;t t
21482 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21483 s,@CPP@,$CPP,;t t
21484 s,@LDCONFIG@,$LDCONFIG,;t t
21485 s,@CXX@,$CXX,;t t
21486 s,@CXXFLAGS@,$CXXFLAGS,;t t
21487 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21488 s,@AWK@,$AWK,;t t
21489 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21490 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21491 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21492 s,@LINT@,$LINT,;t t
21493 s,@LINT_OPTS@,$LINT_OPTS,;t t
21494 s,@LN_S@,$LN_S,;t t
21495 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21496 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21497 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21498 s,@SET_MAKE@,$SET_MAKE,;t t
21499 s,@CTAGS@,$CTAGS,;t t
21500 s,@ETAGS@,$ETAGS,;t t
21501 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21502 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21503 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21504 s,@RANLIB@,$RANLIB,;t t
21505 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21506 s,@LD@,$LD,;t t
21507 s,@ac_ct_LD@,$ac_ct_LD,;t t
21508 s,@AR@,$AR,;t t
21509 s,@ac_ct_AR@,$ac_ct_AR,;t t
21510 s,@NM@,$NM,;t t
21511 s,@ac_ct_NM@,$ac_ct_NM,;t t
21512 s,@ARFLAGS@,$ARFLAGS,;t t
21513 s,@DESTDIR@,$DESTDIR,;t t
21514 s,@BUILD_CC@,$BUILD_CC,;t t
21515 s,@BUILD_CPP@,$BUILD_CPP,;t t
21516 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21517 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21518 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21519 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21520 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21521 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21522 s,@cf_list_models@,$cf_list_models,;t t
21523 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21524 s,@LIBTOOL@,$LIBTOOL,;t t
21525 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
21526 s,@LT_UNDEF@,$LT_UNDEF,;t t
21527 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21528 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21529 s,@LIB_CREATE@,$LIB_CREATE,;t t
21530 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21531 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21532 s,@LIB_PREP@,$LIB_PREP,;t t
21533 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21534 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21535 s,@LIB_LINK@,$LIB_LINK,;t t
21536 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21537 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21538 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21539 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21540 s,@TICS_NAME@,$TICS_NAME,;t t
21541 s,@TINFO_NAME@,$TINFO_NAME,;t t
21542 s,@LIB_NAME@,$LIB_NAME,;t t
21543 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21544 s,@CC_G_OPT@,$CC_G_OPT,;t t
21545 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21546 s,@LD_MODEL@,$LD_MODEL,;t t
21547 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21548 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21549 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21550 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21551 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
21552 s,@LINK_PROGS@,$LINK_PROGS,;t t
21553 s,@LINK_TESTS@,$LINK_TESTS,;t t
21554 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21555 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21556 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21557 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21558 s,@RPATH_LIST@,$RPATH_LIST,;t t
21559 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21560 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21561 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
21562 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21563 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21564 s,@XTERM_KBS@,$XTERM_KBS,;t t
21565 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21566 s,@TERMINFO@,$TERMINFO,;t t
21567 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21568 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21569 s,@TERMPATH@,$TERMPATH,;t t
21570 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
21571 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21572 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21573 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21574 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21575 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21576 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21577 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21578 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21579 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21580 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21581 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21582 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21583 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21584 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21585 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21586 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21587 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21588 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21589 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21590 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21591 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21592 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21593 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21594 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21595 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21596 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21597 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21598 s,@PTHREAD@,$PTHREAD,;t t
21599 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21600 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21601 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21602 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21603 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21604 s,@ECHO_LT@,$ECHO_LT,;t t
21605 s,@ECHO_LD@,$ECHO_LD,;t t
21606 s,@RULE_CC@,$RULE_CC,;t t
21607 s,@SHOW_CC@,$SHOW_CC,;t t
21608 s,@ECHO_CC@,$ECHO_CC,;t t
21609 s,@ECHO_LINK@,$ECHO_LINK,;t t
21610 s,@ADAFLAGS@,$ADAFLAGS,;t t
21611 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21612 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21613 s,@ADA_TRACE@,$ADA_TRACE,;t t
21614 s,@MATH_LIB@,$MATH_LIB,;t t
21615 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21616 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21617 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21618 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21619 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21620 s,@TEST_LIBS@,$TEST_LIBS,;t t
21621 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21622 s,@CXXCPP@,$CXXCPP,;t t
21623 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21624 s,@CXX_AR@,$CXX_AR,;t t
21625 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21626 s,@CXXLIBS@,$CXXLIBS,;t t
21627 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21628 s,@gnat_exists@,$gnat_exists,;t t
21629 s,@M4_exists@,$M4_exists,;t t
21630 s,@cf_ada_make@,$cf_ada_make,;t t
21631 s,@cf_compile_generics@,$cf_compile_generics,;t t
21632 s,@cf_generic_objects@,$cf_generic_objects,;t t
21633 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21634 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21635 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21636 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21637 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21638 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21639 s,@cf_ada_package@,$cf_ada_package,;t t
21640 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21641 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21642 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21643 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21644 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21645 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21646 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21647 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21648 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21649 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21650 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21651 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21652 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21653 s,@TICS_LIBS@,$TICS_LIBS,;t t
21654 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21655 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21656 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21657 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21658 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21659 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21660 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21661 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21662 s,@includesubdir@,$includesubdir,;t t
21663 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21664 s,@TICS_LIST@,$TICS_LIST,;t t
21665 s,@TINFO_LIST@,$TINFO_LIST,;t t
21666 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21667 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21668 s,@TEST_ARGS@,$TEST_ARGS,;t t
21669 s,@TEST_DEPS@,$TEST_DEPS,;t t
21670 s,@TEST_ARG2@,$TEST_ARG2,;t t
21671 s,@TEST_DEP2@,$TEST_DEP2,;t t
21672 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21673 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21674 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21675 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21676 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21677 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21678 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21679 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21680 s,@cross_compiling@,$cross_compiling,;t t
21681 s,@TIC_PATH@,$TIC_PATH,;t t
21682 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21683 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21684 s,@PANEL_NAME@,$PANEL_NAME,;t t
21685 s,@MENU_NAME@,$MENU_NAME,;t t
21686 s,@FORM_NAME@,$FORM_NAME,;t t
21687 s,@CXX_NAME@,$CXX_NAME,;t t
21688 CEOF
21689
21690 EOF
21691
21692   cat >>$CONFIG_STATUS <<\EOF
21693   # Split the substitutions into bite-sized pieces for seds with
21694   # small command number limits, like on Digital OSF/1 and HP-UX.
21695   ac_max_sed_lines=48
21696   ac_sed_frag=1 # Number of current file.
21697   ac_beg=1 # First line for current file.
21698   ac_end=$ac_max_sed_lines # Line after last line for current file.
21699   ac_more_lines=:
21700   ac_sed_cmds=
21701   while $ac_more_lines; do
21702     if test $ac_beg -gt 1; then
21703       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21704     else
21705       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21706     fi
21707     if test ! -s $tmp/subs.frag; then
21708       ac_more_lines=false
21709     else
21710       # The purpose of the label and of the branching condition is to
21711       # speed up the sed processing (if there are no `@' at all, there
21712       # is no need to browse any of the substitutions).
21713       # These are the two extra sed commands mentioned above.
21714       (echo ':t
21715   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21716       if test -z "$ac_sed_cmds"; then
21717         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21718       else
21719         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21720       fi
21721       ac_sed_frag=`expr $ac_sed_frag + 1`
21722       ac_beg=$ac_end
21723       ac_end=`expr $ac_end + $ac_max_sed_lines`
21724     fi
21725   done
21726   if test -z "$ac_sed_cmds"; then
21727     ac_sed_cmds=cat
21728   fi
21729 fi # test -n "$CONFIG_FILES"
21730
21731 EOF
21732 cat >>$CONFIG_STATUS <<\EOF
21733 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21734   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21735   case $ac_file in
21736   - | *:- | *:-:* ) # input from stdin
21737         cat >$tmp/stdin
21738         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21739         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21740   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21741         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21742   * )   ac_file_in=$ac_file.in ;;
21743   esac
21744
21745   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21746   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21747          X"$ac_file" : 'X\(//\)[^/]' \| \
21748          X"$ac_file" : 'X\(//\)$' \| \
21749          X"$ac_file" : 'X\(/\)' \| \
21750          .     : '\(.\)' 2>/dev/null ||
21751 echo X"$ac_file" |
21752     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21753           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21754           /^X\(\/\/\)$/{ s//\1/; q; }
21755           /^X\(\/\).*/{ s//\1/; q; }
21756           s/.*/./; q'`
21757   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21758     { case "$ac_dir" in
21759   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21760   *)                      as_incr_dir=.;;
21761 esac
21762 as_dummy="$ac_dir"
21763 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21764   case $as_mkdir_dir in
21765     # Skip DOS drivespec
21766     ?:) as_incr_dir=$as_mkdir_dir ;;
21767     *)
21768       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21769       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21770     ;;
21771   esac
21772 done; }
21773
21774     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21775     # A "../" for each directory in $ac_dir_suffix.
21776     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21777   else
21778     ac_dir_suffix= ac_dots=
21779   fi
21780
21781   case $srcdir in
21782   .)  ac_srcdir=.
21783       if test -z "$ac_dots"; then
21784          ac_top_srcdir=.
21785       else
21786          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21787       fi ;;
21788   [\\/]* | ?:[\\/]* )
21789       ac_srcdir=$srcdir$ac_dir_suffix;
21790       ac_top_srcdir=$srcdir ;;
21791   *) # Relative path.
21792     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21793     ac_top_srcdir=$ac_dots$srcdir ;;
21794   esac
21795
21796   case $INSTALL in
21797   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21798   *) ac_INSTALL=$ac_dots$INSTALL ;;
21799   esac
21800
21801   if test x"$ac_file" != x-; then
21802     { echo "$as_me:21802: creating $ac_file" >&5
21803 echo "$as_me: creating $ac_file" >&6;}
21804     rm -f "$ac_file"
21805   fi
21806   # Let's still pretend it is `configure' which instantiates (i.e., don't
21807   # use $as_me), people would be surprised to read:
21808   #    /* config.h.  Generated automatically by config.status.  */
21809   configure_input="Generated automatically from `echo $ac_file_in |
21810                                                  sed 's,.*/,,'` by configure."
21811
21812   # First look for the input files in the build tree, otherwise in the
21813   # src tree.
21814   ac_file_inputs=`IFS=:
21815     for f in $ac_file_in; do
21816       case $f in
21817       -) echo $tmp/stdin ;;
21818       [\\/$]*)
21819          # Absolute (can't be DOS-style, as IFS=:)
21820          test -f "$f" || { { echo "$as_me:21820: error: cannot find input file: $f" >&5
21821 echo "$as_me: error: cannot find input file: $f" >&2;}
21822    { (exit 1); exit 1; }; }
21823          echo $f;;
21824       *) # Relative
21825          if test -f "$f"; then
21826            # Build tree
21827            echo $f
21828          elif test -f "$srcdir/$f"; then
21829            # Source tree
21830            echo $srcdir/$f
21831          else
21832            # /dev/null tree
21833            { { echo "$as_me:21833: error: cannot find input file: $f" >&5
21834 echo "$as_me: error: cannot find input file: $f" >&2;}
21835    { (exit 1); exit 1; }; }
21836          fi;;
21837       esac
21838     done` || { (exit 1); exit 1; }
21839 EOF
21840 cat >>$CONFIG_STATUS <<\EOF
21841   ac_warn_datarootdir=no
21842   if test x"$ac_file" != x-; then
21843     for ac_item in $ac_file_inputs
21844     do
21845       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21846       if test -n "$ac_seen"; then
21847         ac_used=`grep '@datarootdir@' $ac_item`
21848         if test -z "$ac_used"; then
21849           { echo "$as_me:21849: WARNING: datarootdir was used implicitly but not set:
21850 $ac_seen" >&5
21851 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21852 $ac_seen" >&2;}
21853           ac_warn_datarootdir=yes
21854         fi
21855       fi
21856       ac_seen=`grep '${datarootdir}' $ac_item`
21857       if test -n "$ac_seen"; then
21858         { echo "$as_me:21858: WARNING: datarootdir was used explicitly but not set:
21859 $ac_seen" >&5
21860 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21861 $ac_seen" >&2;}
21862         ac_warn_datarootdir=yes
21863       fi
21864     done
21865   fi
21866
21867 if test "x$ac_warn_datarootdir" = xyes; then
21868   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21869 fi
21870
21871 EOF
21872 cat >>$CONFIG_STATUS <<EOF
21873   sed "$ac_vpsub
21874 $extrasub
21875 EOF
21876 cat >>$CONFIG_STATUS <<\EOF
21877 :t
21878 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21879 s,@configure_input@,$configure_input,;t t
21880 s,@srcdir@,$ac_srcdir,;t t
21881 s,@top_srcdir@,$ac_top_srcdir,;t t
21882 s,@INSTALL@,$ac_INSTALL,;t t
21883 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21884   rm -f $tmp/stdin
21885   if test x"$ac_file" != x-; then
21886     cp $tmp/out $ac_file
21887
21888     for ac_name in prefix exec_prefix datarootdir
21889     do
21890         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21891         if test -n "$ac_seen"; then
21892             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21893             if test -z "$ac_init"; then
21894               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21895               { echo "$as_me:21895: WARNING: Variable $ac_name is used but was not set:
21896 $ac_seen" >&5
21897 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21898 $ac_seen" >&2;}
21899             fi
21900         fi
21901     done
21902     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21903     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21904     if test -s $tmp/out; then
21905       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21906       { echo "$as_me:21906: WARNING: Some variables may not be substituted:
21907 $ac_seen" >&5
21908 echo "$as_me: WARNING: Some variables may not be substituted:
21909 $ac_seen" >&2;}
21910     fi
21911   else
21912     cat $tmp/out
21913   fi
21914   rm -f $tmp/out
21915
21916 done
21917 EOF
21918 cat >>$CONFIG_STATUS <<\EOF
21919
21920 #
21921 # CONFIG_HEADER section.
21922 #
21923
21924 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21925 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21926 #
21927 # ac_d sets the value in "#define NAME VALUE" lines.
21928 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21929 ac_dB='[        ].*$,\1#\2'
21930 ac_dC=' '
21931 ac_dD=',;t'
21932 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21933 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21934 ac_iB='\([      ]\),\1#\2define\3'
21935 ac_iC=' '
21936 ac_iD='\4,;t'
21937 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21938 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21939 ac_uB='$,\1#\2define\3'
21940 ac_uC=' '
21941 ac_uD=',;t'
21942
21943 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21944   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21945   case $ac_file in
21946   - | *:- | *:-:* ) # input from stdin
21947         cat >$tmp/stdin
21948         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21949         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21950   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21951         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21952   * )   ac_file_in=$ac_file.in ;;
21953   esac
21954
21955   test x"$ac_file" != x- && { echo "$as_me:21955: creating $ac_file" >&5
21956 echo "$as_me: creating $ac_file" >&6;}
21957
21958   # First look for the input files in the build tree, otherwise in the
21959   # src tree.
21960   ac_file_inputs=`IFS=:
21961     for f in $ac_file_in; do
21962       case $f in
21963       -) echo $tmp/stdin ;;
21964       [\\/$]*)
21965          # Absolute (can't be DOS-style, as IFS=:)
21966          test -f "$f" || { { echo "$as_me:21966: error: cannot find input file: $f" >&5
21967 echo "$as_me: error: cannot find input file: $f" >&2;}
21968    { (exit 1); exit 1; }; }
21969          echo $f;;
21970       *) # Relative
21971          if test -f "$f"; then
21972            # Build tree
21973            echo $f
21974          elif test -f "$srcdir/$f"; then
21975            # Source tree
21976            echo $srcdir/$f
21977          else
21978            # /dev/null tree
21979            { { echo "$as_me:21979: error: cannot find input file: $f" >&5
21980 echo "$as_me: error: cannot find input file: $f" >&2;}
21981    { (exit 1); exit 1; }; }
21982          fi;;
21983       esac
21984     done` || { (exit 1); exit 1; }
21985   # Remove the trailing spaces.
21986   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21987
21988 EOF
21989
21990 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21991 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21992 # be either 'cat' or 'sort'.
21993 cat confdefs.h | uniq >conftest.vals
21994
21995 # Break up conftest.vals because some shells have a limit on
21996 # the size of here documents, and old seds have small limits too.
21997
21998 rm -f conftest.tail
21999 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
22000 while grep . conftest.vals >/dev/null
22001 do
22002   # Write chunks of a limited-size here document to conftest.frag.
22003   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22004   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22005   echo 'CEOF' >> $CONFIG_STATUS
22006   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22007   rm -f conftest.vals
22008   mv conftest.tail conftest.vals
22009 done
22010 rm -f conftest.vals
22011
22012 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
22013 # marker @DEFS@.
22014 echo '  cat >> conftest.edit <<CEOF
22015 /@DEFS@/r conftest.frag
22016 /@DEFS@/d
22017 CEOF
22018 sed -f conftest.edit $tmp/in > $tmp/out
22019 rm -f $tmp/in
22020 mv $tmp/out $tmp/in
22021 rm -f conftest.edit conftest.frag
22022 ' >> $CONFIG_STATUS
22023
22024 cat >>$CONFIG_STATUS <<\EOF
22025   # Let's still pretend it is `configure' which instantiates (i.e., don't
22026   # use $as_me), people would be surprised to read:
22027   #    /* config.h.  Generated automatically by config.status.  */
22028   if test x"$ac_file" = x-; then
22029     echo "/* Generated automatically by configure.  */" >$tmp/config.h
22030   else
22031     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22032   fi
22033   cat $tmp/in >>$tmp/config.h
22034   rm -f $tmp/in
22035   if test x"$ac_file" != x-; then
22036     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22037       { echo "$as_me:22037: $ac_file is unchanged" >&5
22038 echo "$as_me: $ac_file is unchanged" >&6;}
22039     else
22040       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22041          X"$ac_file" : 'X\(//\)[^/]' \| \
22042          X"$ac_file" : 'X\(//\)$' \| \
22043          X"$ac_file" : 'X\(/\)' \| \
22044          .     : '\(.\)' 2>/dev/null ||
22045 echo X"$ac_file" |
22046     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22047           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22048           /^X\(\/\/\)$/{ s//\1/; q; }
22049           /^X\(\/\).*/{ s//\1/; q; }
22050           s/.*/./; q'`
22051       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22052         { case "$ac_dir" in
22053   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22054   *)                      as_incr_dir=.;;
22055 esac
22056 as_dummy="$ac_dir"
22057 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22058   case $as_mkdir_dir in
22059     # Skip DOS drivespec
22060     ?:) as_incr_dir=$as_mkdir_dir ;;
22061     *)
22062       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22063       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22064     ;;
22065   esac
22066 done; }
22067
22068       fi
22069       rm -f $ac_file
22070       mv $tmp/config.h $ac_file
22071     fi
22072   else
22073     cat $tmp/config.h
22074     rm -f $tmp/config.h
22075   fi
22076 done
22077 EOF
22078 cat >>$CONFIG_STATUS <<\EOF
22079 #
22080 # CONFIG_COMMANDS section.
22081 #
22082 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22083   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22084   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22085
22086   case $ac_dest in
22087     default )
22088 if test "x$cf_with_tests" != xno ; then
22089
22090 for cf_dir in test
22091 do
22092         if test ! -d $srcdir/$cf_dir; then
22093                 continue
22094         elif test -f $srcdir/$cf_dir/programs; then
22095                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22096         fi
22097 done
22098
22099 fi
22100
22101 cf_prefix=$LIB_PREFIX
22102
22103 case $cf_cv_shlib_version in #(vi
22104 cygdll|mingw)
22105         TINFO_NAME=$TINFO_ARG_SUFFIX
22106         TINFO_SUFFIX=.dll
22107         ;;
22108 esac
22109
22110 if test -n "$TINFO_SUFFIX" ; then
22111         case $TINFO_SUFFIX in
22112         tw*)
22113                 TINFO_NAME="${TINFO_NAME}tw"
22114                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22115                 ;;
22116         t*)
22117                 TINFO_NAME="${TINFO_NAME}t"
22118                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22119                 ;;
22120         w*)
22121                 TINFO_NAME="${TINFO_NAME}w"
22122                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22123                 ;;
22124         esac
22125 fi
22126
22127 for cf_dir in $SRC_SUBDIRS
22128 do
22129         if test ! -d $srcdir/$cf_dir ; then
22130                 continue
22131         elif test -f $srcdir/$cf_dir/modules; then
22132
22133                 SHARED_LIB=
22134                 Libs_To_Make=
22135                 for cf_item in $cf_LIST_MODELS
22136                 do
22137
22138         case X$cf_item in #(vi
22139         Xlibtool) #(vi
22140                 cf_suffix='.la'
22141                 cf_depsuf=$cf_suffix
22142                 ;;
22143         Xdebug) #(vi
22144                 cf_suffix='_g.a'
22145                 cf_depsuf=$cf_suffix
22146                 ;;
22147         Xprofile) #(vi
22148                 cf_suffix='_p.a'
22149                 cf_depsuf=$cf_suffix
22150                 ;;
22151         Xshared) #(vi
22152                 case $cf_cv_system_name in
22153                 aix[5-7]*) #(vi
22154                         cf_suffix='.a'
22155                         cf_depsuf=$cf_suffix
22156                         ;;
22157                 cygwin*|mingw*) #(vi
22158                         cf_suffix='.dll'
22159                         cf_depsuf='.dll.a'
22160                         ;;
22161                 darwin*) #(vi
22162                         cf_suffix='.dylib'
22163                         cf_depsuf=$cf_suffix
22164                         ;;
22165                 hpux*) #(vi
22166                         case $target in
22167                         ia64*) #(vi
22168                                 cf_suffix='.so'
22169                                 cf_depsuf=$cf_suffix
22170                                 ;;
22171                         *) #(vi
22172                                 cf_suffix='.sl'
22173                                 cf_depsuf=$cf_suffix
22174                                 ;;
22175                         esac
22176                         ;;
22177                 *) #(vi
22178                         cf_suffix='.so'
22179                         cf_depsuf=$cf_suffix
22180                         ;;
22181                 esac
22182                 ;;
22183         *)
22184                 cf_suffix='.a'
22185                 cf_depsuf=$cf_suffix
22186                 ;;
22187         esac
22188         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22189         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22190
22191                         cf_libname=$cf_dir
22192                         test "$cf_dir" = c++ && cf_libname=ncurses++
22193                         if test $cf_item = shared ; then
22194                                 if test -n "${LIB_SUFFIX}"
22195                                 then
22196                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22197                                 else
22198                                         cf_shared_suffix="$cf_suffix"
22199                                 fi
22200                                 if test "$cf_cv_do_symlinks" = yes ; then
22201                                         cf_version_name=
22202
22203                                         case "$cf_cv_shlib_version" in #(vi
22204                                         rel) #(vi
22205                                                 cf_version_name=REL_VERSION
22206                                                 ;;
22207                                         abi)
22208                                                 cf_version_name=ABI_VERSION
22209                                                 ;;
22210                                         esac
22211
22212                                         if test -n "$cf_version_name"
22213                                         then
22214                                                 case "$cf_cv_system_name" in #(vi
22215                                                 darwin*)
22216                                                         # "w", etc?
22217                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
22218                                                         ;; #(vi
22219                                                 *)
22220                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
22221                                                         ;;
22222                                                 esac
22223                                         fi
22224                                         if test -n "${LIB_SUFFIX}"
22225                                         then
22226                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22227                                         else
22228                                                 cf_shared_suffix="$cf_suffix"
22229                                         fi
22230                                 fi
22231                                 # cygwin needs import library, and has unique naming convention
22232                                 # use autodetected ${cf_prefix} for import lib and static lib, but
22233                                 # use 'cyg' prefix for shared lib.
22234                                 case $cf_cv_shlib_version in #(vi
22235                                 cygdll) #(vi
22236                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22237                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
22238                                         continue
22239                                         ;;
22240                                 mingw)
22241                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22242                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
22243                                         continue
22244                                         ;;
22245                                 esac
22246                         fi
22247                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
22248                 done
22249
22250                 if test $cf_dir = ncurses ; then
22251                         cf_subsets="$LIB_SUBSETS"
22252                         cf_r_parts="$cf_subsets"
22253                         cf_liblist="$Libs_To_Make"
22254
22255                         while test -n "$cf_r_parts"
22256                         do
22257                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
22258                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
22259                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
22260                                         cf_item=
22261                                         case $cf_l_parts in #(vi
22262                                         *termlib*) #(vi
22263                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
22264                                                 ;;
22265                                         *ticlib*)
22266                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
22267                                                 ;;
22268                                         *)
22269                                                 break
22270                                                 ;;
22271                                         esac
22272                                         if test -n "$cf_item"; then
22273                                                 Libs_To_Make="$cf_item $Libs_To_Make"
22274                                         fi
22275                                 else
22276                                         break
22277                                 fi
22278                         done
22279                 else
22280                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
22281                 fi
22282
22283                 if test $cf_dir = c++; then
22284                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
22285                                 cf_list=
22286                                 for cf_item in $Libs_To_Make
22287                                 do
22288                                         case $cf_item in
22289                                         *.a)
22290                                                 ;;
22291                                         *)
22292                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
22293                                                 ;;
22294                                         esac
22295                                         for cf_test in $cf_list
22296                                         do
22297                                                 if test "$cf_test" = "$cf_item"
22298                                                 then
22299                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
22300                                                         cf_item=
22301                                                         break
22302                                                 fi
22303                                         done
22304                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
22305                                 done
22306                                 Libs_To_Make="$cf_list"
22307                         fi
22308                 fi
22309
22310                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
22311                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
22312                         $cf_dir/Makefile >$cf_dir/Makefile.out
22313                 mv $cf_dir/Makefile.out $cf_dir/Makefile
22314
22315                 $AWK -f $srcdir/mk-0th.awk \
22316                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
22317                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22318
22319                 for cf_subset in $cf_subsets
22320                 do
22321                         cf_subdirs=
22322                         for cf_item in $cf_LIST_MODELS
22323                         do
22324
22325                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
22326
22327 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22328
22329                         CXX_MODEL=$cf_ITEM
22330                         if test "$CXX_MODEL" = SHARED; then
22331                                 case $cf_cv_shlib_version in #(vi
22332                                 cygdll|mingw) #(vi
22333                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
22334
22335 echo "${as_me:-configure}:22335: testing overriding CXX_MODEL to SHARED ..." 1>&5
22336
22337                                         with_shared_cxx=yes
22338                                         ;;
22339                                 *)
22340                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
22341                                         ;;
22342                                 esac
22343                         fi
22344
22345         case X$cf_item in #(vi
22346         Xlibtool) #(vi
22347                 cf_suffix='.la'
22348                 cf_depsuf=$cf_suffix
22349                 ;;
22350         Xdebug) #(vi
22351                 cf_suffix='_g.a'
22352                 cf_depsuf=$cf_suffix
22353                 ;;
22354         Xprofile) #(vi
22355                 cf_suffix='_p.a'
22356                 cf_depsuf=$cf_suffix
22357                 ;;
22358         Xshared) #(vi
22359                 case $cf_cv_system_name in
22360                 aix[5-7]*) #(vi
22361                         cf_suffix='.a'
22362                         cf_depsuf=$cf_suffix
22363                         ;;
22364                 cygwin*|mingw*) #(vi
22365                         cf_suffix='.dll'
22366                         cf_depsuf='.dll.a'
22367                         ;;
22368                 darwin*) #(vi
22369                         cf_suffix='.dylib'
22370                         cf_depsuf=$cf_suffix
22371                         ;;
22372                 hpux*) #(vi
22373                         case $target in
22374                         ia64*) #(vi
22375                                 cf_suffix='.so'
22376                                 cf_depsuf=$cf_suffix
22377                                 ;;
22378                         *) #(vi
22379                                 cf_suffix='.sl'
22380                                 cf_depsuf=$cf_suffix
22381                                 ;;
22382                         esac
22383                         ;;
22384                 *) #(vi
22385                         cf_suffix='.so'
22386                         cf_depsuf=$cf_suffix
22387                         ;;
22388                 esac
22389                 ;;
22390         *)
22391                 cf_suffix='.a'
22392                 cf_depsuf=$cf_suffix
22393                 ;;
22394         esac
22395         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22396         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22397
22398         case $cf_item in
22399         libtool) cf_subdir='obj_lo'  ;;
22400         normal)  cf_subdir='objects' ;;
22401         debug)   cf_subdir='obj_g' ;;
22402         profile) cf_subdir='obj_p' ;;
22403         shared)
22404                 case $cf_cv_system_name in #(vi
22405                 cygwin) #(vi
22406                         cf_subdir='objects' ;;
22407                 *)
22408                         cf_subdir='obj_s' ;;
22409                 esac
22410         esac
22411
22412                         # Test for case where we build libtinfo with a different name.
22413                         cf_libname=$cf_dir
22414                         if test $cf_dir = ncurses ; then
22415                                 case $cf_subset in
22416                                 *base*)
22417                                         cf_libname=${cf_libname}$LIB_SUFFIX
22418                                         ;;
22419                                 *termlib*)
22420                                         cf_libname=$TINFO_LIB_SUFFIX
22421                                         ;;
22422                                 ticlib*)
22423                                         cf_libname=$TICS_LIB_SUFFIX
22424                                         ;;
22425                                 esac
22426                         elif test $cf_dir = c++ ; then
22427                                 cf_libname=ncurses++$LIB_SUFFIX
22428                         else
22429                                 cf_libname=${cf_libname}$LIB_SUFFIX
22430                         fi
22431                         if test -n "${DFT_ARG_SUFFIX}" ; then
22432                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
22433                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
22434                         fi
22435
22436                         # These dependencies really are for development, not
22437                         # builds, but they are useful in porting, too.
22438                         cf_depend="../include/ncurses_cfg.h"
22439                         if test "$srcdir" = "."; then
22440                                 cf_reldir="."
22441                         else
22442                                 cf_reldir="\${srcdir}"
22443                         fi
22444
22445                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
22446                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
22447                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
22448                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
22449                         fi
22450
22451                         cf_dir_suffix=
22452                         old_cf_suffix="$cf_suffix"
22453                         if test "$cf_cv_shlib_version_infix" = yes ; then
22454                         if test -n "$LIB_SUFFIX" ; then
22455                                 case $LIB_SUFFIX in
22456                                 tw*)
22457                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
22458                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
22459                                         cf_dir_suffix=tw
22460                                         ;;
22461                                 t*)
22462                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
22463                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
22464                                         cf_dir_suffix=t
22465                                         ;;
22466                                 w*)
22467                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
22468                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22469                                         cf_dir_suffix=w
22470                                         ;;
22471                                 esac
22472                         fi
22473                         fi
22474
22475                         $AWK -f $srcdir/mk-1st.awk \
22476                                 name=${cf_libname}${cf_dir_suffix} \
22477                                 traces=$LIB_TRACING \
22478                                 MODEL=$cf_ITEM \
22479                                 CXX_MODEL=$CXX_MODEL \
22480                                 model=$cf_subdir \
22481                                 prefix=$cf_prefix \
22482                                 suffix=$cf_suffix \
22483                                 subset=$cf_subset \
22484                                 driver=$cf_cv_term_driver \
22485                                 SymLink="$LN_S" \
22486                                 TermlibRoot=$TINFO_NAME \
22487                                 TermlibSuffix=$TINFO_SUFFIX \
22488                                 ShlibVer=$cf_cv_shlib_version \
22489                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22490                                 ReLink=${cf_cv_do_relink:-no} \
22491                                 DoLinks=$cf_cv_do_symlinks \
22492                                 rmSoLocs=$cf_cv_rm_so_locs \
22493                                 ldconfig="$LDCONFIG" \
22494                                 overwrite=$WITH_OVERWRITE \
22495                                 depend="$cf_depend" \
22496                                 host="$host" \
22497                                 libtool_version="$LIBTOOL_VERSION" \
22498                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22499
22500                         cf_suffix="$old_cf_suffix"
22501
22502                         for cf_subdir2 in $cf_subdirs lib
22503                         do
22504                                 test $cf_subdir = $cf_subdir2 && break
22505                         done
22506                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22507                         $AWK -f $srcdir/mk-2nd.awk \
22508                                 name=$cf_dir \
22509                                 traces=$LIB_TRACING \
22510                                 MODEL=$cf_ITEM \
22511                                 model=$cf_subdir \
22512                                 subset=$cf_subset \
22513                                 srcdir=$srcdir \
22514                                 echo=$WITH_ECHO \
22515                                 crenames=$cf_cv_prog_CC_c_o \
22516                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22517                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22518                         cf_subdirs="$cf_subdirs $cf_subdir"
22519                         done
22520                 done
22521         fi
22522
22523         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
22524 done
22525
22526 for cf_dir in $SRC_SUBDIRS
22527 do
22528         if test ! -d $srcdir/$cf_dir ; then
22529                 continue
22530         fi
22531
22532         if test -f $cf_dir/Makefile ; then
22533                 case "$cf_dir" in
22534                 Ada95) #(vi
22535                         echo 'libs \' >> Makefile
22536                         echo 'install.libs \' >> Makefile
22537                         echo 'uninstall.libs ::' >> Makefile
22538                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22539                         ;;
22540                 esac
22541         fi
22542
22543         if test -f $srcdir/$cf_dir/modules; then
22544                 echo >> Makefile
22545                 if test -f $srcdir/$cf_dir/headers; then
22546 cat >> Makefile <<CF_EOF
22547 install.includes \\
22548 uninstall.includes \\
22549 CF_EOF
22550                 fi
22551 if test "$cf_dir" != "c++" ; then
22552 echo 'lint \' >> Makefile
22553 fi
22554 cat >> Makefile <<CF_EOF
22555 libs \\
22556 lintlib \\
22557 install.libs \\
22558 uninstall.libs \\
22559 install.$cf_dir \\
22560 uninstall.$cf_dir ::
22561         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22562 CF_EOF
22563         elif test -f $srcdir/$cf_dir/headers; then
22564 cat >> Makefile <<CF_EOF
22565
22566 libs \\
22567 install.libs \\
22568 uninstall.libs \\
22569 install.includes \\
22570 uninstall.includes ::
22571         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22572 CF_EOF
22573 fi
22574 done
22575
22576 if test "x$cf_with_db_install" = xyes; then
22577 cat >> Makefile <<CF_EOF
22578
22579 install.libs uninstall.libs \\
22580 install.data uninstall.data ::
22581 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22582 CF_EOF
22583 fi
22584
22585 if test "x$cf_with_manpages" = xyes; then
22586 cat >> Makefile <<CF_EOF
22587
22588 install.man \\
22589 uninstall.man ::
22590         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22591 CF_EOF
22592 fi
22593
22594 cat >> Makefile <<CF_EOF
22595
22596 distclean ::
22597         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22598         rm -f headers.sh headers.sed mk_shared_lib.sh
22599         rm -f edit_man.* man_alias.*
22600         rm -rf \${DIRS_TO_MAKE}
22601 CF_EOF
22602
22603 # Special case: tack's manpage lives in its own directory.
22604 if test "x$cf_with_manpages" = xyes; then
22605 if test -d tack ; then
22606 if test -f $srcdir/$tack.h; then
22607 cat >> Makefile <<CF_EOF
22608
22609 install.man \\
22610 uninstall.man ::
22611         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22612 CF_EOF
22613 fi
22614 fi
22615 fi
22616
22617 rm -f headers.sed headers.sh
22618
22619 echo creating headers.sh
22620 cat >headers.sh <<CF_EOF
22621 #! /bin/sh
22622 # This shell script is generated by the 'configure' script.  It is invoked in a
22623 # subdirectory of the build tree.  It generates a sed-script in the parent
22624 # directory that is used to adjust includes for header files that reside in a
22625 # subdirectory of /usr/include, etc.
22626 PRG=""
22627 while test \$# != 3
22628 do
22629 PRG="\$PRG \$1"; shift
22630 done
22631 DST=\$1
22632 REF=\$2
22633 SRC=\$3
22634 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22635 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22636 echo installing \$SRC in \$DST
22637 CF_EOF
22638
22639 if test $WITH_CURSES_H = yes; then
22640         cat >>headers.sh <<CF_EOF
22641 case \$DST in
22642 /*/include/*)
22643         END=\`basename \$DST\`
22644         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22645         do
22646                 NAME=\`basename \$i\`
22647                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22648         done
22649         ;;
22650 *)
22651         echo "" >> \$TMPSED
22652         ;;
22653 esac
22654 CF_EOF
22655
22656 else
22657         cat >>headers.sh <<CF_EOF
22658 case \$DST in
22659 /*/include/*)
22660         END=\`basename \$DST\`
22661         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22662         do
22663                 NAME=\`basename \$i\`
22664                 if test "\$NAME" = "curses.h"
22665                 then
22666                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22667                         NAME=ncurses.h
22668                 fi
22669                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22670         done
22671         ;;
22672 *)
22673         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22674         ;;
22675 esac
22676 CF_EOF
22677 fi
22678 cat >>headers.sh <<CF_EOF
22679 rm -f \$TMPSRC
22680 sed -f \$TMPSED \$SRC > \$TMPSRC
22681 NAME=\`basename \$SRC\`
22682 CF_EOF
22683 if test $WITH_CURSES_H != yes; then
22684         cat >>headers.sh <<CF_EOF
22685 test "\$NAME" = "curses.h" && NAME=ncurses.h
22686 CF_EOF
22687 fi
22688 cat >>headers.sh <<CF_EOF
22689 # Just in case someone gzip'd manpages, remove the conflicting copy.
22690 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22691
22692 eval \$PRG \$TMPSRC \$DST/\$NAME
22693 rm -f \$TMPSRC \$TMPSED
22694 CF_EOF
22695
22696 chmod 0755 headers.sh
22697
22698 for cf_dir in $SRC_SUBDIRS
22699 do
22700         if test ! -d $srcdir/$cf_dir ; then
22701                 continue
22702         fi
22703
22704         if test -f $srcdir/$cf_dir/headers; then
22705                 $AWK -f $srcdir/mk-hdr.awk \
22706                         subset="$LIB_SUBSETS" \
22707                         compat="$WITH_CURSES_H" \
22708                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22709         fi
22710
22711         if test -f $srcdir/$cf_dir/modules; then
22712                 if test "$cf_dir" != "c++" ; then
22713                         cat >>$cf_dir/Makefile <<"CF_EOF"
22714 depend : ${AUTO_SRC}
22715         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22716
22717 # DO NOT DELETE THIS LINE -- make depend depends on it.
22718 CF_EOF
22719                 fi
22720         fi
22721 done
22722
22723 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22724 if test -z "$USE_OLD_MAKERULES" ; then
22725         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22726 fi
22727 fi
22728  ;;
22729   esac
22730 done
22731 EOF
22732
22733 cat >>$CONFIG_STATUS <<\EOF
22734
22735 { (exit 0); exit 0; }
22736 EOF
22737 chmod +x $CONFIG_STATUS
22738 ac_clean_files=$ac_clean_files_save
22739
22740 # configure is writing to config.log, and then calls config.status.
22741 # config.status does its own redirection, appending to config.log.
22742 # Unfortunately, on DOS this fails, as config.log is still kept open
22743 # by configure, so config.status won't be able to write to it; its
22744 # output is simply discarded.  So we exec the FD to /dev/null,
22745 # effectively closing config.log, so it can be properly (re)opened and
22746 # appended to by config.status.  When coming back to configure, we
22747 # need to make the FD available again.
22748 if test "$no_create" != yes; then
22749   ac_cs_success=:
22750   exec 5>/dev/null
22751   $SHELL $CONFIG_STATUS || ac_cs_success=false
22752   exec 5>>config.log
22753   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22754   # would make configure fail if this is the last instruction.
22755   $ac_cs_success || { (exit 1); exit 1; }
22756 fi
22757 ${MAKE:-make} preinstall