]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20131019
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.574 .
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*|msys*|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*|*-msys*|*-mingw*|*-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*|msys*|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         msys*) #(vi
5684                 CC_SHARED_OPTS=
5685                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5686                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5687                 cf_cv_shlib_version=msysdll
5688                 cf_cv_shlib_version_infix=msysdll
5689                 cat >mk_shared_lib.sh <<-CF_EOF
5690                 #!/bin/sh
5691                 SHARED_LIB=\$1
5692                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5693                 shift
5694                 cat <<-EOF
5695                 Linking shared library
5696                 ** SHARED_LIB \$SHARED_LIB
5697                 ** IMPORT_LIB \$IMPORT_LIB
5698 EOF
5699                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5700 CF_EOF
5701                 chmod +x mk_shared_lib.sh
5702                 ;;
5703         darwin*) #(vi
5704                 cf_try_cflags="no-cpp-precomp"
5705                 CC_SHARED_OPTS="-dynamic"
5706                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5707                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5708                 cf_cv_shlib_version_infix=yes
5709                 echo "$as_me:5709: checking if ld -search_paths_first works" >&5
5710 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5711 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5712   echo $ECHO_N "(cached) $ECHO_C" >&6
5713 else
5714
5715                         cf_save_LDFLAGS=$LDFLAGS
5716                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5717                         cat >conftest.$ac_ext <<_ACEOF
5718 #line 5718 "configure"
5719 #include "confdefs.h"
5720
5721 int
5722 main ()
5723 {
5724 int i;
5725   ;
5726   return 0;
5727 }
5728 _ACEOF
5729 rm -f conftest.$ac_objext conftest$ac_exeext
5730 if { (eval echo "$as_me:5730: \"$ac_link\"") >&5
5731   (eval $ac_link) 2>&5
5732   ac_status=$?
5733   echo "$as_me:5733: \$? = $ac_status" >&5
5734   (exit $ac_status); } &&
5735          { ac_try='test -s conftest$ac_exeext'
5736   { (eval echo "$as_me:5736: \"$ac_try\"") >&5
5737   (eval $ac_try) 2>&5
5738   ac_status=$?
5739   echo "$as_me:5739: \$? = $ac_status" >&5
5740   (exit $ac_status); }; }; then
5741   cf_cv_ldflags_search_paths_first=yes
5742 else
5743   echo "$as_me: failed program was:" >&5
5744 cat conftest.$ac_ext >&5
5745 cf_cv_ldflags_search_paths_first=no
5746 fi
5747 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5748                                 LDFLAGS=$cf_save_LDFLAGS
5749 fi
5750 echo "$as_me:5750: result: $cf_cv_ldflags_search_paths_first" >&5
5751 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5752                 if test $cf_cv_ldflags_search_paths_first = yes; then
5753                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5754                 fi
5755                 ;;
5756         hpux[7-8]*) #(vi
5757                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5758                 if test "$GCC" != yes; then
5759                         CC_SHARED_OPTS='+Z'
5760                 fi
5761                 MK_SHARED_LIB='${LD} -b -o $@'
5762                 INSTALL_LIB="-m 555"
5763                 ;;
5764         hpux*) #(vi
5765                 # (tested with gcc 2.7.2 -- I don't have c89)
5766                 if test "$GCC" = yes; then
5767                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5768                 else
5769                         CC_SHARED_OPTS='+Z'
5770                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5771                 fi
5772                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5773                 # HP-UX shared libraries must be executable, and should be
5774                 # readonly to exploit a quirk in the memory manager.
5775                 INSTALL_LIB="-m 555"
5776                 ;;
5777         interix*)
5778                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5779                 if test "$cf_cv_shlib_version" = rel; then
5780                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5781                 else
5782                         cf_shared_soname='`basename `'
5783                 fi
5784                 CC_SHARED_OPTS=
5785                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5786                 ;;
5787         irix*) #(vi
5788                 if test "$cf_cv_enable_rpath" = yes ; then
5789                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5790                 fi
5791                 # tested with IRIX 5.2 and 'cc'.
5792                 if test "$GCC" != yes; then
5793                         CC_SHARED_OPTS='-KPIC'
5794                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5795                 else
5796                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5797                 fi
5798                 cf_cv_rm_so_locs=yes
5799                 ;;
5800         linux*|gnu*|k*bsd*-gnu) #(vi
5801                 if test "$DFT_LWR_MODEL" = "shared" ; then
5802                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5803                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5804                 fi
5805                 if test "$cf_cv_enable_rpath" = yes ; then
5806                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5807                 fi
5808
5809         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5810         if test "$cf_cv_shlib_version" = rel; then
5811                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5812         else
5813                 cf_cv_shared_soname='`basename $@`'
5814         fi
5815
5816                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5817                 ;;
5818         mingw*) #(vi
5819                 cf_cv_shlib_version=mingw
5820                 cf_cv_shlib_version_infix=mingw
5821                 if test "$DFT_LWR_MODEL" = "shared" ; then
5822                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5823                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5824                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5825                 fi
5826                 CC_SHARED_OPTS=
5827                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5828                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5829                 cat >mk_shared_lib.sh <<-CF_EOF
5830                 #!/bin/sh
5831                 SHARED_LIB=\$1
5832                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5833                 shift
5834                 cat <<-EOF
5835                 Linking shared library
5836                 ** SHARED_LIB \$SHARED_LIB
5837                 ** IMPORT_LIB \$IMPORT_LIB
5838 EOF
5839                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5840 CF_EOF
5841                 chmod +x mk_shared_lib.sh
5842                 ;;
5843         openbsd[2-9].*|mirbsd*) #(vi
5844                 if test "$DFT_LWR_MODEL" = "shared" ; then
5845                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5846                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5847                 fi
5848                 if test "$cf_cv_enable_rpath" = yes ; then
5849                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5850                 fi
5851                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5852
5853         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5854         if test "$cf_cv_shlib_version" = rel; then
5855                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5856         else
5857                 cf_cv_shared_soname='`basename $@`'
5858         fi
5859
5860                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5861                 ;;
5862         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5863                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5864                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5865                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5866                 ;;
5867         dragonfly*|freebsd*) #(vi
5868                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5869                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5870                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5871                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5872                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5873                 fi
5874
5875         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5876         if test "$cf_cv_shlib_version" = rel; then
5877                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5878         else
5879                 cf_cv_shared_soname='`basename $@`'
5880         fi
5881
5882                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5883                 ;;
5884         netbsd*) #(vi
5885                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5886                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5887                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5888                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5889                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5890                         if test "$cf_cv_shlib_version" = auto; then
5891                         if test -f /usr/libexec/ld.elf_so; then
5892                                 cf_cv_shlib_version=abi
5893                         else
5894                                 cf_cv_shlib_version=rel
5895                         fi
5896                         fi
5897
5898         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5899         if test "$cf_cv_shlib_version" = rel; then
5900                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5901         else
5902                 cf_cv_shared_soname='`basename $@`'
5903         fi
5904
5905                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5906                 else
5907                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
5908                 fi
5909                 ;;
5910         osf*|mls+*) #(vi
5911                 # tested with OSF/1 V3.2 and 'cc'
5912                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5913                 # link with shared libs).
5914                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5915                 case $host_os in #(vi
5916                 osf4*)
5917                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5918                         ;;
5919                 esac
5920                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5921                 if test "$DFT_LWR_MODEL" = "shared" ; then
5922                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5923                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5924                 fi
5925                 cf_cv_rm_so_locs=yes
5926                 ;;
5927         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5928                 # tested with osr5.0.5
5929                 if test "$GCC" != yes; then
5930                         CC_SHARED_OPTS='-belf -KPIC'
5931                 fi
5932                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5933                 if test "$cf_cv_enable_rpath" = yes ; then
5934                         # only way is to set LD_RUN_PATH but no switch for it
5935                         RUN_PATH=$libdir
5936                 fi
5937                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5938                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5939                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5940                 ;;
5941         sunos4*) #(vi
5942                 # tested with SunOS 4.1.1 and gcc 2.7.0
5943                 if test "$GCC" != yes; then
5944                         CC_SHARED_OPTS='-KPIC'
5945                 fi
5946                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5947                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5948                 ;;
5949         solaris2*) #(vi
5950                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5951                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5952                 if test "$DFT_LWR_MODEL" = "shared" ; then
5953                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5954                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5955                 fi
5956                 if test "$cf_cv_enable_rpath" = yes ; then
5957                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5958                 fi
5959
5960         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5961         if test "$cf_cv_shlib_version" = rel; then
5962                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5963         else
5964                 cf_cv_shared_soname='`basename $@`'
5965         fi
5966
5967                 if test "$GCC" != yes; then
5968                         cf_save_CFLAGS="$CFLAGS"
5969                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5970                         do
5971                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5972                                 cat >conftest.$ac_ext <<_ACEOF
5973 #line 5973 "configure"
5974 #include "confdefs.h"
5975 #include <stdio.h>
5976 int
5977 main ()
5978 {
5979 printf("Hello\n");
5980   ;
5981   return 0;
5982 }
5983 _ACEOF
5984 rm -f conftest.$ac_objext
5985 if { (eval echo "$as_me:5985: \"$ac_compile\"") >&5
5986   (eval $ac_compile) 2>&5
5987   ac_status=$?
5988   echo "$as_me:5988: \$? = $ac_status" >&5
5989   (exit $ac_status); } &&
5990          { ac_try='test -s conftest.$ac_objext'
5991   { (eval echo "$as_me:5991: \"$ac_try\"") >&5
5992   (eval $ac_try) 2>&5
5993   ac_status=$?
5994   echo "$as_me:5994: \$? = $ac_status" >&5
5995   (exit $ac_status); }; }; then
5996   break
5997 else
5998   echo "$as_me: failed program was:" >&5
5999 cat conftest.$ac_ext >&5
6000 fi
6001 rm -f conftest.$ac_objext conftest.$ac_ext
6002                         done
6003                         CFLAGS="$cf_save_CFLAGS"
6004                         CC_SHARED_OPTS=$cf_shared_opts
6005                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6006                 else
6007                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6008                 fi
6009                 ;;
6010         sysv5uw7*|unix_sv*) #(vi
6011                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6012                 if test "$GCC" != yes; then
6013                         CC_SHARED_OPTS='-KPIC'
6014                 fi
6015                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6016                 ;;
6017         *)
6018                 CC_SHARED_OPTS='unknown'
6019                 MK_SHARED_LIB='echo unknown'
6020                 ;;
6021         esac
6022
6023         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6024         case "$cf_cv_shlib_version" in #(vi
6025         rel|abi)
6026                 case "$MK_SHARED_LIB" in #(vi
6027                 *'-o $@') #(vi
6028                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6029                         ;;
6030                 *)
6031                         { echo "$as_me:6031: WARNING: ignored --with-shlib-version" >&5
6032 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6033                         ;;
6034                 esac
6035                 ;;
6036         esac
6037
6038         if test -n "$cf_try_cflags"
6039         then
6040 cat > conftest.$ac_ext <<EOF
6041 #line 6041 "${as_me:-configure}"
6042 #include <stdio.h>
6043 int main(int argc, char *argv[])
6044 {
6045         printf("hello\n");
6046         return (argv[argc-1] == 0) ;
6047 }
6048 EOF
6049                 cf_save_CFLAGS="$CFLAGS"
6050                 for cf_opt in $cf_try_cflags
6051                 do
6052                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6053                         echo "$as_me:6053: checking if CFLAGS option -$cf_opt works" >&5
6054 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6055                         if { (eval echo "$as_me:6055: \"$ac_compile\"") >&5
6056   (eval $ac_compile) 2>&5
6057   ac_status=$?
6058   echo "$as_me:6058: \$? = $ac_status" >&5
6059   (exit $ac_status); }; then
6060                                 echo "$as_me:6060: result: yes" >&5
6061 echo "${ECHO_T}yes" >&6
6062                                 cf_save_CFLAGS="$CFLAGS"
6063                         else
6064                                 echo "$as_me:6064: result: no" >&5
6065 echo "${ECHO_T}no" >&6
6066                         fi
6067                 done
6068                 CFLAGS="$cf_save_CFLAGS"
6069         fi
6070
6071         # RPATH_LIST is a colon-separated list of directories
6072         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6073         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6074
6075         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6076
6077         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6078
6079 echo "${as_me:-configure}:6079: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6080
6081         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6082
6083 echo "${as_me:-configure}:6083: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6084
6085 if test "$CC_SHARED_OPTS" = "unknown"; then
6086         for model in $cf_list_models; do
6087                 if test "$model" = "shared"; then
6088                         { { echo "$as_me:6088: error: Shared libraries are not supported in this version" >&5
6089 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6090    { (exit 1); exit 1; }; }
6091                 fi
6092         done
6093 fi
6094
6095 ### If we're building with rpath, try to link non-standard libs that way too.
6096 if test "$DFT_LWR_MODEL" = "shared"; then
6097
6098 echo "$as_me:6098: checking if rpath-hack should be disabled" >&5
6099 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6100
6101 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6102 if test "${enable_rpath_hack+set}" = set; then
6103   enableval="$enable_rpath_hack"
6104   test "$enableval" != no && enableval=yes
6105   if test "$enableval" != "yes" ; then
6106     cf_disable_rpath_hack=yes
6107   else
6108     cf_disable_rpath_hack=no
6109   fi
6110 else
6111   enableval=yes
6112   cf_disable_rpath_hack=no
6113
6114 fi;
6115 echo "$as_me:6115: result: $cf_disable_rpath_hack" >&5
6116 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6117 if test "$cf_disable_rpath_hack" = no ; then
6118
6119 echo "$as_me:6119: checking for updated LDFLAGS" >&5
6120 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6121 if test -n "$LD_RPATH_OPT" ; then
6122         echo "$as_me:6122: result: maybe" >&5
6123 echo "${ECHO_T}maybe" >&6
6124
6125         for ac_prog in ldd
6126 do
6127   # Extract the first word of "$ac_prog", so it can be a program name with args.
6128 set dummy $ac_prog; ac_word=$2
6129 echo "$as_me:6129: checking for $ac_word" >&5
6130 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6131 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6132   echo $ECHO_N "(cached) $ECHO_C" >&6
6133 else
6134   if test -n "$cf_ldd_prog"; then
6135   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6136 else
6137   ac_save_IFS=$IFS; IFS=$ac_path_separator
6138 ac_dummy="$PATH"
6139 for ac_dir in $ac_dummy; do
6140   IFS=$ac_save_IFS
6141   test -z "$ac_dir" && ac_dir=.
6142   $as_executable_p "$ac_dir/$ac_word" || continue
6143 ac_cv_prog_cf_ldd_prog="$ac_prog"
6144 echo "$as_me:6144: found $ac_dir/$ac_word" >&5
6145 break
6146 done
6147
6148 fi
6149 fi
6150 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6151 if test -n "$cf_ldd_prog"; then
6152   echo "$as_me:6152: result: $cf_ldd_prog" >&5
6153 echo "${ECHO_T}$cf_ldd_prog" >&6
6154 else
6155   echo "$as_me:6155: result: no" >&5
6156 echo "${ECHO_T}no" >&6
6157 fi
6158
6159   test -n "$cf_ldd_prog" && break
6160 done
6161 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6162
6163         cf_rpath_list="/usr/lib /lib"
6164         if test "$cf_ldd_prog" != no
6165         then
6166                 cf_rpath_oops=
6167
6168 cat >conftest.$ac_ext <<_ACEOF
6169 #line 6169 "configure"
6170 #include "confdefs.h"
6171 #include <stdio.h>
6172 int
6173 main ()
6174 {
6175 printf("Hello");
6176   ;
6177   return 0;
6178 }
6179 _ACEOF
6180 rm -f conftest.$ac_objext conftest$ac_exeext
6181 if { (eval echo "$as_me:6181: \"$ac_link\"") >&5
6182   (eval $ac_link) 2>&5
6183   ac_status=$?
6184   echo "$as_me:6184: \$? = $ac_status" >&5
6185   (exit $ac_status); } &&
6186          { ac_try='test -s conftest$ac_exeext'
6187   { (eval echo "$as_me:6187: \"$ac_try\"") >&5
6188   (eval $ac_try) 2>&5
6189   ac_status=$?
6190   echo "$as_me:6190: \$? = $ac_status" >&5
6191   (exit $ac_status); }; }; then
6192   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6193                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6194 else
6195   echo "$as_me: failed program was:" >&5
6196 cat conftest.$ac_ext >&5
6197 fi
6198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6199
6200                 # If we passed the link-test, but get a "not found" on a given library,
6201                 # this could be due to inept reconfiguration of gcc to make it only
6202                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6203                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6204                 # /usr/local libraries.
6205                 if test -n "$cf_rpath_oops"
6206                 then
6207                         for cf_rpath_src in $cf_rpath_oops
6208                         do
6209                                 for cf_rpath_dir in \
6210                                         /usr/local \
6211                                         /usr/pkg \
6212                                         /opt/sfw
6213                                 do
6214                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6215                                         then
6216                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6217
6218 echo "${as_me:-configure}:6218: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6219
6220                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6221                                                 break
6222                                         fi
6223                                 done
6224                         done
6225                 fi
6226         fi
6227
6228         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6229
6230 echo "${as_me:-configure}:6230: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6231
6232 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6233
6234 echo "${as_me:-configure}:6234: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6235
6236 cf_rpath_dst=
6237 for cf_rpath_src in $LDFLAGS
6238 do
6239         case $cf_rpath_src in #(vi
6240         -L*) #(vi
6241
6242                 # check if this refers to a directory which we will ignore
6243                 cf_rpath_skip=no
6244                 if test -n "$cf_rpath_list"
6245                 then
6246                         for cf_rpath_item in $cf_rpath_list
6247                         do
6248                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6249                                 then
6250                                         cf_rpath_skip=yes
6251                                         break
6252                                 fi
6253                         done
6254                 fi
6255
6256                 if test "$cf_rpath_skip" = no
6257                 then
6258                         # transform the option
6259                         if test "$LD_RPATH_OPT" = "-R " ; then
6260                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6261                         else
6262                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6263                         fi
6264
6265                         # if we have not already added this, add it now
6266                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6267                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6268                         then
6269                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6270
6271 echo "${as_me:-configure}:6271: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6272
6273                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6274                         fi
6275                 fi
6276                 ;;
6277         esac
6278         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6279 done
6280 LDFLAGS=$cf_rpath_dst
6281
6282 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6283
6284 echo "${as_me:-configure}:6284: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6285
6286 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6287
6288 echo "${as_me:-configure}:6288: testing ...checking LIBS $LIBS ..." 1>&5
6289
6290 cf_rpath_dst=
6291 for cf_rpath_src in $LIBS
6292 do
6293         case $cf_rpath_src in #(vi
6294         -L*) #(vi
6295
6296                 # check if this refers to a directory which we will ignore
6297                 cf_rpath_skip=no
6298                 if test -n "$cf_rpath_list"
6299                 then
6300                         for cf_rpath_item in $cf_rpath_list
6301                         do
6302                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6303                                 then
6304                                         cf_rpath_skip=yes
6305                                         break
6306                                 fi
6307                         done
6308                 fi
6309
6310                 if test "$cf_rpath_skip" = no
6311                 then
6312                         # transform the option
6313                         if test "$LD_RPATH_OPT" = "-R " ; then
6314                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6315                         else
6316                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6317                         fi
6318
6319                         # if we have not already added this, add it now
6320                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6321                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6322                         then
6323                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6324
6325 echo "${as_me:-configure}:6325: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6326
6327                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6328                         fi
6329                 fi
6330                 ;;
6331         esac
6332         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6333 done
6334 LIBS=$cf_rpath_dst
6335
6336 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6337
6338 echo "${as_me:-configure}:6338: testing ...checked LIBS $LIBS ..." 1>&5
6339
6340         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6341
6342 echo "${as_me:-configure}:6342: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6343
6344 else
6345         echo "$as_me:6345: result: no" >&5
6346 echo "${ECHO_T}no" >&6
6347 fi
6348
6349 fi
6350
6351 fi
6352
6353 ###############################################################################
6354
6355 ###     use option --disable-overwrite to leave out the link to -lcurses
6356 echo "$as_me:6356: checking if you wish to install ncurses overwriting curses" >&5
6357 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6358
6359 # Check whether --enable-overwrite or --disable-overwrite was given.
6360 if test "${enable_overwrite+set}" = set; then
6361   enableval="$enable_overwrite"
6362   with_overwrite=$enableval
6363 else
6364   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6365 fi;
6366 echo "$as_me:6366: result: $with_overwrite" >&5
6367 echo "${ECHO_T}$with_overwrite" >&6
6368
6369 echo "$as_me:6369: checking if external terminfo-database is used" >&5
6370 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6371
6372 # Check whether --enable-database or --disable-database was given.
6373 if test "${enable_database+set}" = set; then
6374   enableval="$enable_database"
6375   use_database=$enableval
6376 else
6377   use_database=yes
6378 fi;
6379 echo "$as_me:6379: result: $use_database" >&5
6380 echo "${ECHO_T}$use_database" >&6
6381
6382 case $host_os in #(vi
6383 os2*) #(vi
6384         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6385         ;;
6386 *) #(vi
6387         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6388         ;;
6389 esac
6390
6391 NCURSES_USE_DATABASE=0
6392 if test "$use_database" != no ; then
6393         NCURSES_USE_DATABASE=1
6394
6395         echo "$as_me:6395: checking which terminfo source-file will be installed" >&5
6396 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6397
6398 # Check whether --with-database or --without-database was given.
6399 if test "${with_database+set}" = set; then
6400   withval="$with_database"
6401   TERMINFO_SRC=$withval
6402 fi;
6403         echo "$as_me:6403: result: $TERMINFO_SRC" >&5
6404 echo "${ECHO_T}$TERMINFO_SRC" >&6
6405
6406         echo "$as_me:6406: checking whether to use hashed database instead of directory/tree" >&5
6407 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6408
6409 # Check whether --with-hashed-db or --without-hashed-db was given.
6410 if test "${with_hashed_db+set}" = set; then
6411   withval="$with_hashed_db"
6412
6413 else
6414   with_hashed_db=no
6415 fi;
6416         echo "$as_me:6416: result: $with_hashed_db" >&5
6417 echo "${ECHO_T}$with_hashed_db" >&6
6418 else
6419         with_hashed_db=no
6420 fi
6421
6422 echo "$as_me:6422: checking for list of fallback descriptions" >&5
6423 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6424
6425 # Check whether --with-fallbacks or --without-fallbacks was given.
6426 if test "${with_fallbacks+set}" = set; then
6427   withval="$with_fallbacks"
6428   with_fallback=$withval
6429 else
6430   with_fallback=
6431 fi;
6432 echo "$as_me:6432: result: $with_fallback" >&5
6433 echo "${ECHO_T}$with_fallback" >&6
6434 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6435
6436 echo "$as_me:6436: checking if you want modern xterm or antique" >&5
6437 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6438
6439 # Check whether --with-xterm-new or --without-xterm-new was given.
6440 if test "${with_xterm_new+set}" = set; then
6441   withval="$with_xterm_new"
6442   with_xterm_new=$withval
6443 else
6444   with_xterm_new=yes
6445 fi;
6446 case $with_xterm_new in
6447 no)     with_xterm_new=xterm-old;;
6448 *)      with_xterm_new=xterm-new;;
6449 esac
6450 echo "$as_me:6450: result: $with_xterm_new" >&5
6451 echo "${ECHO_T}$with_xterm_new" >&6
6452 WHICH_XTERM=$with_xterm_new
6453
6454 echo "$as_me:6454: checking if xterm backspace sends BS or DEL" >&5
6455 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6456
6457 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6458 if test "${with_xterm_kbs+set}" = set; then
6459   withval="$with_xterm_kbs"
6460   with_xterm_kbs=$withval
6461 else
6462   with_xterm_kbs=BS
6463 fi;
6464 case x$with_xterm_kbs in
6465 xyes|xno|xBS|xbs|x8)
6466         with_xterm_kbs=BS
6467         ;;
6468 xDEL|xdel|x127)
6469         with_xterm_kbs=DEL
6470         ;;
6471 *)
6472         with_xterm_kbs=$withval
6473         ;;
6474 esac
6475 echo "$as_me:6475: result: $with_xterm_kbs" >&5
6476 echo "${ECHO_T}$with_xterm_kbs" >&6
6477 XTERM_KBS=$with_xterm_kbs
6478
6479 MAKE_TERMINFO=
6480 if test "$use_database" = no ; then
6481         TERMINFO="${datadir}/terminfo"
6482         MAKE_TERMINFO="#"
6483 else
6484
6485 echo "$as_me:6485: checking for list of terminfo directories" >&5
6486 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6487
6488 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6489 if test "${with_terminfo_dirs+set}" = set; then
6490   withval="$with_terminfo_dirs"
6491
6492 else
6493   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6494 fi;
6495 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6496 cf_dst_path=
6497 for cf_src_path in $withval
6498 do
6499
6500 if test "x$prefix" != xNONE; then
6501   cf_path_syntax="$prefix"
6502 else
6503   cf_path_syntax="$ac_default_prefix"
6504 fi
6505
6506 case ".$cf_src_path" in #(vi
6507 .\$\(*\)*|.\'*\'*) #(vi
6508   ;;
6509 ..|./*|.\\*) #(vi
6510   ;;
6511 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6512   ;;
6513 .\${*prefix}*|.\${*dir}*) #(vi
6514   eval cf_src_path="$cf_src_path"
6515   case ".$cf_src_path" in #(vi
6516   .NONE/*)
6517     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6518     ;;
6519   esac
6520   ;; #(vi
6521 .no|.NONE/*)
6522   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6523   ;;
6524 *)
6525   { { echo "$as_me:6525: error: expected a pathname, not \"$cf_src_path\"" >&5
6526 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6527    { (exit 1); exit 1; }; }
6528   ;;
6529 esac
6530
6531   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6532   cf_dst_path="${cf_dst_path}${cf_src_path}"
6533 done
6534 IFS="$ac_save_ifs"
6535
6536 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6537 # so we have to check/work around.  We do prefer the result of "eval"...
6538 eval cf_dst_eval="$cf_dst_path"
6539 case "x$cf_dst_eval" in #(vi
6540 xNONE*) #(vi
6541         TERMINFO_DIRS=$cf_dst_path
6542         ;;
6543 *)
6544         TERMINFO_DIRS="$cf_dst_eval"
6545         ;;
6546 esac
6547
6548 echo "$as_me:6548: result: $TERMINFO_DIRS" >&5
6549 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6550 test -n "$TERMINFO_DIRS" &&
6551 cat >>confdefs.h <<EOF
6552 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6553 EOF
6554
6555 echo "$as_me:6555: checking for default terminfo directory" >&5
6556 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6557
6558 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6559 if test "${with_default_terminfo_dir+set}" = set; then
6560   withval="$with_default_terminfo_dir"
6561
6562 else
6563   withval="${TERMINFO:-${datadir}/terminfo}"
6564 fi; if test -n "${datadir}/terminfo" ; then
6565
6566 if test "x$prefix" != xNONE; then
6567   cf_path_syntax="$prefix"
6568 else
6569   cf_path_syntax="$ac_default_prefix"
6570 fi
6571
6572 case ".$withval" in #(vi
6573 .\$\(*\)*|.\'*\'*) #(vi
6574   ;;
6575 ..|./*|.\\*) #(vi
6576   ;;
6577 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6578   ;;
6579 .\${*prefix}*|.\${*dir}*) #(vi
6580   eval withval="$withval"
6581   case ".$withval" in #(vi
6582   .NONE/*)
6583     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6584     ;;
6585   esac
6586   ;; #(vi
6587 .no|.NONE/*)
6588   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6589   ;;
6590 *)
6591   { { echo "$as_me:6591: error: expected a pathname, not \"$withval\"" >&5
6592 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6593    { (exit 1); exit 1; }; }
6594   ;;
6595 esac
6596
6597 fi
6598 eval TERMINFO="$withval"
6599
6600 echo "$as_me:6600: result: $TERMINFO" >&5
6601 echo "${ECHO_T}$TERMINFO" >&6
6602
6603 cat >>confdefs.h <<EOF
6604 #define TERMINFO "$TERMINFO"
6605 EOF
6606
6607 fi
6608
6609 ###     use option --disable-big-core to make tic run on small machines
6610 ###     We need 4Mb, check if we can allocate 50% more than that.
6611 echo "$as_me:6611: checking if big-core option selected" >&5
6612 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6613
6614 # Check whether --enable-big-core or --disable-big-core was given.
6615 if test "${enable_big_core+set}" = set; then
6616   enableval="$enable_big_core"
6617   with_big_core=$enableval
6618 else
6619   if test "$cross_compiling" = yes; then
6620   with_big_core=no
6621 else
6622   cat >conftest.$ac_ext <<_ACEOF
6623 #line 6623 "configure"
6624 #include "confdefs.h"
6625
6626 #include <stdlib.h>
6627 #include <string.h>
6628 int main() {
6629         unsigned long n = 6000000L;
6630         char *s = malloc(n);
6631         if (s != 0)
6632                 s[0] = s[n-1] = 0;
6633         ${cf_cv_main_return:-return}(s == 0);
6634 }
6635 _ACEOF
6636 rm -f conftest$ac_exeext
6637 if { (eval echo "$as_me:6637: \"$ac_link\"") >&5
6638   (eval $ac_link) 2>&5
6639   ac_status=$?
6640   echo "$as_me:6640: \$? = $ac_status" >&5
6641   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6642   { (eval echo "$as_me:6642: \"$ac_try\"") >&5
6643   (eval $ac_try) 2>&5
6644   ac_status=$?
6645   echo "$as_me:6645: \$? = $ac_status" >&5
6646   (exit $ac_status); }; }; then
6647   with_big_core=yes
6648 else
6649   echo "$as_me: program exited with status $ac_status" >&5
6650 echo "$as_me: failed program was:" >&5
6651 cat conftest.$ac_ext >&5
6652 with_big_core=no
6653 fi
6654 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6655 fi
6656 fi;
6657 echo "$as_me:6657: result: $with_big_core" >&5
6658 echo "${ECHO_T}$with_big_core" >&6
6659 test "x$with_big_core" = "xyes" &&
6660 cat >>confdefs.h <<\EOF
6661 #define HAVE_BIG_CORE 1
6662 EOF
6663
6664 ### ISO C only guarantees 512-char strings, we have tables which load faster
6665 ### when constructed using "big" strings.  More than the C compiler, the awk
6666 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6667 echo "$as_me:6667: checking if big-strings option selected" >&5
6668 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6669
6670 # Check whether --enable-big-strings or --disable-big-strings was given.
6671 if test "${enable_big_strings+set}" = set; then
6672   enableval="$enable_big_strings"
6673   with_big_strings=$enableval
6674 else
6675
6676         case x$AWK in #(vi
6677         x)
6678                 eval with_big_strings=no
6679                 ;;
6680         *) #(vi
6681                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6682                         | $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
6683                         eval with_big_strings=yes
6684                 else
6685                         eval with_big_strings=no
6686                 fi
6687                 ;;
6688         esac
6689
6690 fi;
6691 echo "$as_me:6691: result: $with_big_strings" >&5
6692 echo "${ECHO_T}$with_big_strings" >&6
6693
6694 USE_BIG_STRINGS=0
6695 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6696
6697 ###     use option --enable-termcap to compile in the termcap fallback support
6698 echo "$as_me:6698: checking if you want termcap-fallback support" >&5
6699 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6700
6701 # Check whether --enable-termcap or --disable-termcap was given.
6702 if test "${enable_termcap+set}" = set; then
6703   enableval="$enable_termcap"
6704   with_termcap=$enableval
6705 else
6706   with_termcap=no
6707 fi;
6708 echo "$as_me:6708: result: $with_termcap" >&5
6709 echo "${ECHO_T}$with_termcap" >&6
6710
6711 NCURSES_USE_TERMCAP=0
6712 if test "x$with_termcap" != "xyes" ; then
6713         if test "$use_database" = no ; then
6714                 if test -z "$with_fallback" ; then
6715                         { { echo "$as_me:6715: error: You have disabled the database w/o specifying fallbacks" >&5
6716 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6717    { (exit 1); exit 1; }; }
6718                 fi
6719         fi
6720
6721 cat >>confdefs.h <<\EOF
6722 #define PURE_TERMINFO 1
6723 EOF
6724
6725 else
6726
6727         if test "$with_ticlib" != no ; then
6728                 { { echo "$as_me:6728: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6729 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6730    { (exit 1); exit 1; }; }
6731         fi
6732
6733         NCURSES_USE_TERMCAP=1
6734         echo "$as_me:6734: checking for list of termcap files" >&5
6735 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6736
6737 # Check whether --with-termpath or --without-termpath was given.
6738 if test "${with_termpath+set}" = set; then
6739   withval="$with_termpath"
6740
6741 else
6742   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6743 fi;
6744 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6745 cf_dst_path=
6746 for cf_src_path in $withval
6747 do
6748
6749 if test "x$prefix" != xNONE; then
6750   cf_path_syntax="$prefix"
6751 else
6752   cf_path_syntax="$ac_default_prefix"
6753 fi
6754
6755 case ".$cf_src_path" in #(vi
6756 .\$\(*\)*|.\'*\'*) #(vi
6757   ;;
6758 ..|./*|.\\*) #(vi
6759   ;;
6760 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6761   ;;
6762 .\${*prefix}*|.\${*dir}*) #(vi
6763   eval cf_src_path="$cf_src_path"
6764   case ".$cf_src_path" in #(vi
6765   .NONE/*)
6766     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6767     ;;
6768   esac
6769   ;; #(vi
6770 .no|.NONE/*)
6771   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6772   ;;
6773 *)
6774   { { echo "$as_me:6774: error: expected a pathname, not \"$cf_src_path\"" >&5
6775 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6776    { (exit 1); exit 1; }; }
6777   ;;
6778 esac
6779
6780   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6781   cf_dst_path="${cf_dst_path}${cf_src_path}"
6782 done
6783 IFS="$ac_save_ifs"
6784
6785 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6786 # so we have to check/work around.  We do prefer the result of "eval"...
6787 eval cf_dst_eval="$cf_dst_path"
6788 case "x$cf_dst_eval" in #(vi
6789 xNONE*) #(vi
6790         TERMPATH=$cf_dst_path
6791         ;;
6792 *)
6793         TERMPATH="$cf_dst_eval"
6794         ;;
6795 esac
6796
6797         echo "$as_me:6797: result: $TERMPATH" >&5
6798 echo "${ECHO_T}$TERMPATH" >&6
6799         test -n "$TERMPATH" &&
6800 cat >>confdefs.h <<EOF
6801 #define TERMPATH "$TERMPATH"
6802 EOF
6803
6804         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6805         echo "$as_me:6805: checking if fast termcap-loader is needed" >&5
6806 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6807
6808 # Check whether --enable-getcap or --disable-getcap was given.
6809 if test "${enable_getcap+set}" = set; then
6810   enableval="$enable_getcap"
6811   with_getcap=$enableval
6812 else
6813   with_getcap=no
6814 fi;
6815         echo "$as_me:6815: result: $with_getcap" >&5
6816 echo "${ECHO_T}$with_getcap" >&6
6817         test "x$with_getcap" = "xyes" &&
6818 cat >>confdefs.h <<\EOF
6819 #define USE_GETCAP 1
6820 EOF
6821
6822         echo "$as_me:6822: checking if translated termcaps will be cached in ~/.terminfo" >&5
6823 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6824
6825 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6826 if test "${enable_getcap_cache+set}" = set; then
6827   enableval="$enable_getcap_cache"
6828   with_getcap_cache=$enableval
6829 else
6830   with_getcap_cache=no
6831 fi;
6832         echo "$as_me:6832: result: $with_getcap_cache" >&5
6833 echo "${ECHO_T}$with_getcap_cache" >&6
6834         test "x$with_getcap_cache" = "xyes" &&
6835 cat >>confdefs.h <<\EOF
6836 #define USE_GETCAP_CACHE 1
6837 EOF
6838
6839 fi
6840
6841 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6842 echo "$as_me:6842: checking if ~/.terminfo is wanted" >&5
6843 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6844
6845 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6846 if test "${enable_home_terminfo+set}" = set; then
6847   enableval="$enable_home_terminfo"
6848   with_home_terminfo=$enableval
6849 else
6850   with_home_terminfo=yes
6851 fi;
6852 echo "$as_me:6852: result: $with_home_terminfo" >&5
6853 echo "${ECHO_T}$with_home_terminfo" >&6
6854 test "x$with_home_terminfo" = "xyes" &&
6855 cat >>confdefs.h <<\EOF
6856 #define USE_HOME_TERMINFO 1
6857 EOF
6858
6859 echo "$as_me:6859: checking if you want to use restricted environment when running as root" >&5
6860 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6861
6862 # Check whether --enable-root-environ or --disable-root-environ was given.
6863 if test "${enable_root_environ+set}" = set; then
6864   enableval="$enable_root_environ"
6865   with_root_environ=$enableval
6866 else
6867   with_root_environ=yes
6868 fi;
6869 echo "$as_me:6869: result: $with_root_environ" >&5
6870 echo "${ECHO_T}$with_root_environ" >&6
6871 test "x$with_root_environ" = xyes &&
6872 cat >>confdefs.h <<\EOF
6873 #define USE_ROOT_ENVIRON 1
6874 EOF
6875
6876 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6877 ###   to reduce storage requirements for the terminfo database.
6878
6879 for ac_func in \
6880         remove \
6881         unlink
6882 do
6883 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6884 echo "$as_me:6884: checking for $ac_func" >&5
6885 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6886 if eval "test \"\${$as_ac_var+set}\" = set"; then
6887   echo $ECHO_N "(cached) $ECHO_C" >&6
6888 else
6889   cat >conftest.$ac_ext <<_ACEOF
6890 #line 6890 "configure"
6891 #include "confdefs.h"
6892 /* System header to define __stub macros and hopefully few prototypes,
6893     which can conflict with char $ac_func (); below.  */
6894 #include <assert.h>
6895 /* Override any gcc2 internal prototype to avoid an error.  */
6896 #ifdef __cplusplus
6897 extern "C"
6898 #endif
6899 /* We use char because int might match the return type of a gcc2
6900    builtin and then its argument prototype would still apply.  */
6901 char $ac_func ();
6902 char (*f) ();
6903
6904 int
6905 main ()
6906 {
6907 /* The GNU C library defines this for functions which it implements
6908     to always fail with ENOSYS.  Some functions are actually named
6909     something starting with __ and the normal name is an alias.  */
6910 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6911 choke me
6912 #else
6913 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6914 #endif
6915
6916   ;
6917   return 0;
6918 }
6919 _ACEOF
6920 rm -f conftest.$ac_objext conftest$ac_exeext
6921 if { (eval echo "$as_me:6921: \"$ac_link\"") >&5
6922   (eval $ac_link) 2>&5
6923   ac_status=$?
6924   echo "$as_me:6924: \$? = $ac_status" >&5
6925   (exit $ac_status); } &&
6926          { ac_try='test -s conftest$ac_exeext'
6927   { (eval echo "$as_me:6927: \"$ac_try\"") >&5
6928   (eval $ac_try) 2>&5
6929   ac_status=$?
6930   echo "$as_me:6930: \$? = $ac_status" >&5
6931   (exit $ac_status); }; }; then
6932   eval "$as_ac_var=yes"
6933 else
6934   echo "$as_me: failed program was:" >&5
6935 cat conftest.$ac_ext >&5
6936 eval "$as_ac_var=no"
6937 fi
6938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6939 fi
6940 echo "$as_me:6940: result: `eval echo '${'$as_ac_var'}'`" >&5
6941 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6942 if test `eval echo '${'$as_ac_var'}'` = yes; then
6943   cat >>confdefs.h <<EOF
6944 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6945 EOF
6946
6947 fi
6948 done
6949
6950 if test "$cross_compiling" = yes ; then
6951
6952 for ac_func in \
6953                 link \
6954                 symlink
6955 do
6956 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6957 echo "$as_me:6957: checking for $ac_func" >&5
6958 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6959 if eval "test \"\${$as_ac_var+set}\" = set"; then
6960   echo $ECHO_N "(cached) $ECHO_C" >&6
6961 else
6962   cat >conftest.$ac_ext <<_ACEOF
6963 #line 6963 "configure"
6964 #include "confdefs.h"
6965 /* System header to define __stub macros and hopefully few prototypes,
6966     which can conflict with char $ac_func (); below.  */
6967 #include <assert.h>
6968 /* Override any gcc2 internal prototype to avoid an error.  */
6969 #ifdef __cplusplus
6970 extern "C"
6971 #endif
6972 /* We use char because int might match the return type of a gcc2
6973    builtin and then its argument prototype would still apply.  */
6974 char $ac_func ();
6975 char (*f) ();
6976
6977 int
6978 main ()
6979 {
6980 /* The GNU C library defines this for functions which it implements
6981     to always fail with ENOSYS.  Some functions are actually named
6982     something starting with __ and the normal name is an alias.  */
6983 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6984 choke me
6985 #else
6986 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6987 #endif
6988
6989   ;
6990   return 0;
6991 }
6992 _ACEOF
6993 rm -f conftest.$ac_objext conftest$ac_exeext
6994 if { (eval echo "$as_me:6994: \"$ac_link\"") >&5
6995   (eval $ac_link) 2>&5
6996   ac_status=$?
6997   echo "$as_me:6997: \$? = $ac_status" >&5
6998   (exit $ac_status); } &&
6999          { ac_try='test -s conftest$ac_exeext'
7000   { (eval echo "$as_me:7000: \"$ac_try\"") >&5
7001   (eval $ac_try) 2>&5
7002   ac_status=$?
7003   echo "$as_me:7003: \$? = $ac_status" >&5
7004   (exit $ac_status); }; }; then
7005   eval "$as_ac_var=yes"
7006 else
7007   echo "$as_me: failed program was:" >&5
7008 cat conftest.$ac_ext >&5
7009 eval "$as_ac_var=no"
7010 fi
7011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7012 fi
7013 echo "$as_me:7013: result: `eval echo '${'$as_ac_var'}'`" >&5
7014 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7015 if test `eval echo '${'$as_ac_var'}'` = yes; then
7016   cat >>confdefs.h <<EOF
7017 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7018 EOF
7019
7020 fi
7021 done
7022
7023 else
7024         echo "$as_me:7024: checking if link/symlink functions work" >&5
7025 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7026 if test "${cf_cv_link_funcs+set}" = set; then
7027   echo $ECHO_N "(cached) $ECHO_C" >&6
7028 else
7029
7030                 cf_cv_link_funcs=
7031                 for cf_func in link symlink ; do
7032                         if test "$cross_compiling" = yes; then
7033
7034                         eval 'ac_cv_func_'$cf_func'=error'
7035 else
7036   cat >conftest.$ac_ext <<_ACEOF
7037 #line 7037 "configure"
7038 #include "confdefs.h"
7039
7040 #include <sys/types.h>
7041 #include <sys/stat.h>
7042 #ifdef HAVE_UNISTD_H
7043 #include <unistd.h>
7044 #endif
7045 int main()
7046 {
7047         int fail = 0;
7048         char *src = "config.log";
7049         char *dst = "conftest.chk";
7050         struct stat src_sb;
7051         struct stat dst_sb;
7052
7053         stat(src, &src_sb);
7054         fail = ($cf_func("config.log", "conftest.chk") < 0)
7055             || (stat(dst, &dst_sb) < 0)
7056             || (dst_sb.st_mtime != src_sb.st_mtime);
7057 #ifdef HAVE_UNLINK
7058         unlink(dst);
7059 #else
7060         remove(dst);
7061 #endif
7062         ${cf_cv_main_return:-return} (fail);
7063 }
7064
7065 _ACEOF
7066 rm -f conftest$ac_exeext
7067 if { (eval echo "$as_me:7067: \"$ac_link\"") >&5
7068   (eval $ac_link) 2>&5
7069   ac_status=$?
7070   echo "$as_me:7070: \$? = $ac_status" >&5
7071   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7072   { (eval echo "$as_me:7072: \"$ac_try\"") >&5
7073   (eval $ac_try) 2>&5
7074   ac_status=$?
7075   echo "$as_me:7075: \$? = $ac_status" >&5
7076   (exit $ac_status); }; }; then
7077
7078                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7079                         eval 'ac_cv_func_'$cf_func'=yes'
7080 else
7081   echo "$as_me: program exited with status $ac_status" >&5
7082 echo "$as_me: failed program was:" >&5
7083 cat conftest.$ac_ext >&5
7084
7085                         eval 'ac_cv_func_'$cf_func'=no'
7086 fi
7087 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7088 fi
7089                 done
7090                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7091
7092 fi
7093 echo "$as_me:7093: result: $cf_cv_link_funcs" >&5
7094 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7095         test "$ac_cv_func_link"    = yes &&
7096 cat >>confdefs.h <<\EOF
7097 #define HAVE_LINK 1
7098 EOF
7099
7100         test "$ac_cv_func_symlink" = yes &&
7101 cat >>confdefs.h <<\EOF
7102 #define HAVE_SYMLINK 1
7103 EOF
7104
7105 fi
7106
7107 with_links=no
7108 with_symlinks=no
7109
7110 # soft links (symbolic links) are useful for some systems where hard links do
7111 # not work, or to make it simpler to copy terminfo trees around.
7112 if test "x$ac_cv_func_symlink" = xyes ; then
7113     echo "$as_me:7113: checking if tic should use symbolic links" >&5
7114 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7115
7116 # Check whether --enable-symlinks or --disable-symlinks was given.
7117 if test "${enable_symlinks+set}" = set; then
7118   enableval="$enable_symlinks"
7119   with_symlinks=$enableval
7120 else
7121   with_symlinks=no
7122 fi;
7123     echo "$as_me:7123: result: $with_symlinks" >&5
7124 echo "${ECHO_T}$with_symlinks" >&6
7125 fi
7126
7127 # If we have hard links and did not choose to use soft links instead, there is
7128 # no reason to make this choice optional - use the hard links.
7129 if test "$with_symlinks" = no ; then
7130     echo "$as_me:7130: checking if tic should use hard links" >&5
7131 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7132     if test "x$ac_cv_func_link" = xyes ; then
7133         with_links=yes
7134     else
7135         with_links=no
7136     fi
7137     echo "$as_me:7137: result: $with_links" >&5
7138 echo "${ECHO_T}$with_links" >&6
7139 fi
7140
7141 test "x$with_links" = xyes &&
7142 cat >>confdefs.h <<\EOF
7143 #define USE_LINKS 1
7144 EOF
7145
7146 test "x$with_symlinks" = xyes &&
7147 cat >>confdefs.h <<\EOF
7148 #define USE_SYMLINKS 1
7149 EOF
7150
7151 ###   use option --enable-broken-linker to force on use of broken-linker support
7152 echo "$as_me:7152: checking if you want broken-linker support code" >&5
7153 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7154
7155 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7156 if test "${enable_broken_linker+set}" = set; then
7157   enableval="$enable_broken_linker"
7158   with_broken_linker=$enableval
7159 else
7160   with_broken_linker=${BROKEN_LINKER:-no}
7161 fi;
7162 echo "$as_me:7162: result: $with_broken_linker" >&5
7163 echo "${ECHO_T}$with_broken_linker" >&6
7164
7165 BROKEN_LINKER=0
7166 if test "x$with_broken_linker" = xyes ; then
7167
7168 cat >>confdefs.h <<\EOF
7169 #define BROKEN_LINKER 1
7170 EOF
7171
7172         BROKEN_LINKER=1
7173 elif test "$DFT_LWR_MODEL" = shared ; then
7174         case $cf_cv_system_name in #(vi
7175         cygwin*)
7176
7177 cat >>confdefs.h <<\EOF
7178 #define BROKEN_LINKER 1
7179 EOF
7180
7181                 BROKEN_LINKER=1
7182                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7183
7184 echo "${as_me:-configure}:7184: testing cygwin linker is broken anyway ..." 1>&5
7185
7186                 ;;
7187         esac
7188 fi
7189
7190 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7191 echo "$as_me:7191: checking if tputs should process BSD-style prefix padding" >&5
7192 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7193
7194 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7195 if test "${enable_bsdpad+set}" = set; then
7196   enableval="$enable_bsdpad"
7197   with_bsdpad=$enableval
7198 else
7199   with_bsdpad=no
7200 fi;
7201 echo "$as_me:7201: result: $with_bsdpad" >&5
7202 echo "${ECHO_T}$with_bsdpad" >&6
7203 test "x$with_bsdpad" = xyes &&
7204 cat >>confdefs.h <<\EOF
7205 #define BSD_TPUTS 1
7206 EOF
7207
7208 ###   use option --enable-widec to turn on use of wide-character support
7209 NCURSES_CH_T=chtype
7210 NCURSES_LIBUTF8=0
7211
7212 NEED_WCHAR_H=0
7213 NCURSES_MBSTATE_T=0
7214 NCURSES_WCHAR_T=0
7215 NCURSES_WINT_T=0
7216
7217 # Check to define _XOPEN_SOURCE "automatically"
7218
7219 cf_XOPEN_SOURCE=500
7220 cf_POSIX_C_SOURCE=199506L
7221 cf_xopen_source=
7222
7223 case $host_os in #(vi
7224 aix[4-7]*) #(vi
7225         cf_xopen_source="-D_ALL_SOURCE"
7226         ;;
7227 cygwin|msys) #(vi
7228         cf_XOPEN_SOURCE=600
7229         ;;
7230 darwin[0-8].*) #(vi
7231         cf_xopen_source="-D_APPLE_C_SOURCE"
7232         ;;
7233 darwin*) #(vi
7234         cf_xopen_source="-D_DARWIN_C_SOURCE"
7235         cf_XOPEN_SOURCE=
7236         ;;
7237 freebsd*|dragonfly*) #(vi
7238         # 5.x headers associate
7239         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7240         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7241         cf_POSIX_C_SOURCE=200112L
7242         cf_XOPEN_SOURCE=600
7243         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7244         ;;
7245 hpux11*) #(vi
7246         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7247         ;;
7248 hpux*) #(vi
7249         cf_xopen_source="-D_HPUX_SOURCE"
7250         ;;
7251 irix[56].*) #(vi
7252         cf_xopen_source="-D_SGI_SOURCE"
7253         cf_XOPEN_SOURCE=
7254         ;;
7255 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7256
7257 echo "$as_me:7257: checking if we must define _GNU_SOURCE" >&5
7258 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7259 if test "${cf_cv_gnu_source+set}" = set; then
7260   echo $ECHO_N "(cached) $ECHO_C" >&6
7261 else
7262
7263 cat >conftest.$ac_ext <<_ACEOF
7264 #line 7264 "configure"
7265 #include "confdefs.h"
7266 #include <sys/types.h>
7267 int
7268 main ()
7269 {
7270
7271 #ifndef _XOPEN_SOURCE
7272 make an error
7273 #endif
7274   ;
7275   return 0;
7276 }
7277 _ACEOF
7278 rm -f conftest.$ac_objext
7279 if { (eval echo "$as_me:7279: \"$ac_compile\"") >&5
7280   (eval $ac_compile) 2>&5
7281   ac_status=$?
7282   echo "$as_me:7282: \$? = $ac_status" >&5
7283   (exit $ac_status); } &&
7284          { ac_try='test -s conftest.$ac_objext'
7285   { (eval echo "$as_me:7285: \"$ac_try\"") >&5
7286   (eval $ac_try) 2>&5
7287   ac_status=$?
7288   echo "$as_me:7288: \$? = $ac_status" >&5
7289   (exit $ac_status); }; }; then
7290   cf_cv_gnu_source=no
7291 else
7292   echo "$as_me: failed program was:" >&5
7293 cat conftest.$ac_ext >&5
7294 cf_save="$CPPFLAGS"
7295          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7296          cat >conftest.$ac_ext <<_ACEOF
7297 #line 7297 "configure"
7298 #include "confdefs.h"
7299 #include <sys/types.h>
7300 int
7301 main ()
7302 {
7303
7304 #ifdef _XOPEN_SOURCE
7305 make an error
7306 #endif
7307   ;
7308   return 0;
7309 }
7310 _ACEOF
7311 rm -f conftest.$ac_objext
7312 if { (eval echo "$as_me:7312: \"$ac_compile\"") >&5
7313   (eval $ac_compile) 2>&5
7314   ac_status=$?
7315   echo "$as_me:7315: \$? = $ac_status" >&5
7316   (exit $ac_status); } &&
7317          { ac_try='test -s conftest.$ac_objext'
7318   { (eval echo "$as_me:7318: \"$ac_try\"") >&5
7319   (eval $ac_try) 2>&5
7320   ac_status=$?
7321   echo "$as_me:7321: \$? = $ac_status" >&5
7322   (exit $ac_status); }; }; then
7323   cf_cv_gnu_source=no
7324 else
7325   echo "$as_me: failed program was:" >&5
7326 cat conftest.$ac_ext >&5
7327 cf_cv_gnu_source=yes
7328 fi
7329 rm -f conftest.$ac_objext conftest.$ac_ext
7330         CPPFLAGS="$cf_save"
7331
7332 fi
7333 rm -f conftest.$ac_objext conftest.$ac_ext
7334
7335 fi
7336 echo "$as_me:7336: result: $cf_cv_gnu_source" >&5
7337 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7338 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7339
7340         ;;
7341 mirbsd*) #(vi
7342         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7343         cf_XOPEN_SOURCE=
7344
7345 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7346
7347 cf_save_CFLAGS="$CFLAGS"
7348 cf_save_CPPFLAGS="$CPPFLAGS"
7349
7350 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7351         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7352                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7353
7354 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7355         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7356                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7357
7358 echo "$as_me:7358: checking if we should define _POSIX_C_SOURCE" >&5
7359 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7360 if test "${cf_cv_posix_c_source+set}" = set; then
7361   echo $ECHO_N "(cached) $ECHO_C" >&6
7362 else
7363
7364 echo "${as_me:-configure}:7364: testing if the symbol is already defined go no further ..." 1>&5
7365
7366         cat >conftest.$ac_ext <<_ACEOF
7367 #line 7367 "configure"
7368 #include "confdefs.h"
7369 #include <sys/types.h>
7370 int
7371 main ()
7372 {
7373
7374 #ifndef _POSIX_C_SOURCE
7375 make an error
7376 #endif
7377   ;
7378   return 0;
7379 }
7380 _ACEOF
7381 rm -f conftest.$ac_objext
7382 if { (eval echo "$as_me:7382: \"$ac_compile\"") >&5
7383   (eval $ac_compile) 2>&5
7384   ac_status=$?
7385   echo "$as_me:7385: \$? = $ac_status" >&5
7386   (exit $ac_status); } &&
7387          { ac_try='test -s conftest.$ac_objext'
7388   { (eval echo "$as_me:7388: \"$ac_try\"") >&5
7389   (eval $ac_try) 2>&5
7390   ac_status=$?
7391   echo "$as_me:7391: \$? = $ac_status" >&5
7392   (exit $ac_status); }; }; then
7393   cf_cv_posix_c_source=no
7394 else
7395   echo "$as_me: failed program was:" >&5
7396 cat conftest.$ac_ext >&5
7397 cf_want_posix_source=no
7398          case .$cf_POSIX_C_SOURCE in #(vi
7399          .[12]??*) #(vi
7400                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7401                 ;;
7402          .2) #(vi
7403                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7404                 cf_want_posix_source=yes
7405                 ;;
7406          .*)
7407                 cf_want_posix_source=yes
7408                 ;;
7409          esac
7410          if test "$cf_want_posix_source" = yes ; then
7411                 cat >conftest.$ac_ext <<_ACEOF
7412 #line 7412 "configure"
7413 #include "confdefs.h"
7414 #include <sys/types.h>
7415 int
7416 main ()
7417 {
7418
7419 #ifdef _POSIX_SOURCE
7420 make an error
7421 #endif
7422   ;
7423   return 0;
7424 }
7425 _ACEOF
7426 rm -f conftest.$ac_objext
7427 if { (eval echo "$as_me:7427: \"$ac_compile\"") >&5
7428   (eval $ac_compile) 2>&5
7429   ac_status=$?
7430   echo "$as_me:7430: \$? = $ac_status" >&5
7431   (exit $ac_status); } &&
7432          { ac_try='test -s conftest.$ac_objext'
7433   { (eval echo "$as_me:7433: \"$ac_try\"") >&5
7434   (eval $ac_try) 2>&5
7435   ac_status=$?
7436   echo "$as_me:7436: \$? = $ac_status" >&5
7437   (exit $ac_status); }; }; then
7438   :
7439 else
7440   echo "$as_me: failed program was:" >&5
7441 cat conftest.$ac_ext >&5
7442 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7443 fi
7444 rm -f conftest.$ac_objext conftest.$ac_ext
7445          fi
7446
7447 echo "${as_me:-configure}:7447: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7448
7449          CFLAGS="$cf_trim_CFLAGS"
7450          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7451
7452 echo "${as_me:-configure}:7452: testing if the second compile does not leave our definition intact error ..." 1>&5
7453
7454          cat >conftest.$ac_ext <<_ACEOF
7455 #line 7455 "configure"
7456 #include "confdefs.h"
7457 #include <sys/types.h>
7458 int
7459 main ()
7460 {
7461
7462 #ifndef _POSIX_C_SOURCE
7463 make an error
7464 #endif
7465   ;
7466   return 0;
7467 }
7468 _ACEOF
7469 rm -f conftest.$ac_objext
7470 if { (eval echo "$as_me:7470: \"$ac_compile\"") >&5
7471   (eval $ac_compile) 2>&5
7472   ac_status=$?
7473   echo "$as_me:7473: \$? = $ac_status" >&5
7474   (exit $ac_status); } &&
7475          { ac_try='test -s conftest.$ac_objext'
7476   { (eval echo "$as_me:7476: \"$ac_try\"") >&5
7477   (eval $ac_try) 2>&5
7478   ac_status=$?
7479   echo "$as_me:7479: \$? = $ac_status" >&5
7480   (exit $ac_status); }; }; then
7481   :
7482 else
7483   echo "$as_me: failed program was:" >&5
7484 cat conftest.$ac_ext >&5
7485 cf_cv_posix_c_source=no
7486 fi
7487 rm -f conftest.$ac_objext conftest.$ac_ext
7488          CFLAGS="$cf_save_CFLAGS"
7489          CPPFLAGS="$cf_save_CPPFLAGS"
7490
7491 fi
7492 rm -f conftest.$ac_objext conftest.$ac_ext
7493
7494 fi
7495 echo "$as_me:7495: result: $cf_cv_posix_c_source" >&5
7496 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7497
7498 if test "$cf_cv_posix_c_source" != no ; then
7499         CFLAGS="$cf_trim_CFLAGS"
7500         CPPFLAGS="$cf_trim_CPPFLAGS"
7501
7502 cf_fix_cppflags=no
7503 cf_new_cflags=
7504 cf_new_cppflags=
7505 cf_new_extra_cppflags=
7506
7507 for cf_add_cflags in $cf_cv_posix_c_source
7508 do
7509 case $cf_fix_cppflags in
7510 no)
7511         case $cf_add_cflags in #(vi
7512         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7513                 case $cf_add_cflags in
7514                 -D*)
7515                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7516
7517                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7518                                 && test -z "${cf_tst_cflags}" \
7519                                 && cf_fix_cppflags=yes
7520
7521                         if test $cf_fix_cppflags = yes ; then
7522                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7523                                 continue
7524                         elif test "${cf_tst_cflags}" = "\"'" ; then
7525                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7526                                 continue
7527                         fi
7528                         ;;
7529                 esac
7530                 case "$CPPFLAGS" in
7531                 *$cf_add_cflags) #(vi
7532                         ;;
7533                 *) #(vi
7534                         case $cf_add_cflags in #(vi
7535                         -D*)
7536                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7537
7538 CPPFLAGS=`echo "$CPPFLAGS" | \
7539         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7540                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7541
7542                                 ;;
7543                         esac
7544                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7545                         ;;
7546                 esac
7547                 ;;
7548         *)
7549                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7550                 ;;
7551         esac
7552         ;;
7553 yes)
7554         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7555
7556         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7557
7558         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7559                 && test -z "${cf_tst_cflags}" \
7560                 && cf_fix_cppflags=no
7561         ;;
7562 esac
7563 done
7564
7565 if test -n "$cf_new_cflags" ; then
7566
7567         CFLAGS="$CFLAGS $cf_new_cflags"
7568 fi
7569
7570 if test -n "$cf_new_cppflags" ; then
7571
7572         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7573 fi
7574
7575 if test -n "$cf_new_extra_cppflags" ; then
7576
7577         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7578 fi
7579
7580 fi
7581
7582         ;;
7583 netbsd*) #(vi
7584         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7585         ;;
7586 openbsd[4-9]*) #(vi
7587         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7588         cf_xopen_source="-D_BSD_SOURCE"
7589         cf_XOPEN_SOURCE=600
7590         ;;
7591 openbsd*) #(vi
7592         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7593         ;;
7594 osf[45]*) #(vi
7595         cf_xopen_source="-D_OSF_SOURCE"
7596         ;;
7597 nto-qnx*) #(vi
7598         cf_xopen_source="-D_QNX_SOURCE"
7599         ;;
7600 sco*) #(vi
7601         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7602         ;;
7603 solaris2.*) #(vi
7604         cf_xopen_source="-D__EXTENSIONS__"
7605         ;;
7606 *)
7607
7608 echo "$as_me:7608: checking if we should define _XOPEN_SOURCE" >&5
7609 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7610 if test "${cf_cv_xopen_source+set}" = set; then
7611   echo $ECHO_N "(cached) $ECHO_C" >&6
7612 else
7613
7614         cat >conftest.$ac_ext <<_ACEOF
7615 #line 7615 "configure"
7616 #include "confdefs.h"
7617
7618 #include <stdlib.h>
7619 #include <string.h>
7620 #include <sys/types.h>
7621
7622 int
7623 main ()
7624 {
7625
7626 #ifndef _XOPEN_SOURCE
7627 make an error
7628 #endif
7629   ;
7630   return 0;
7631 }
7632 _ACEOF
7633 rm -f conftest.$ac_objext
7634 if { (eval echo "$as_me:7634: \"$ac_compile\"") >&5
7635   (eval $ac_compile) 2>&5
7636   ac_status=$?
7637   echo "$as_me:7637: \$? = $ac_status" >&5
7638   (exit $ac_status); } &&
7639          { ac_try='test -s conftest.$ac_objext'
7640   { (eval echo "$as_me:7640: \"$ac_try\"") >&5
7641   (eval $ac_try) 2>&5
7642   ac_status=$?
7643   echo "$as_me:7643: \$? = $ac_status" >&5
7644   (exit $ac_status); }; }; then
7645   cf_cv_xopen_source=no
7646 else
7647   echo "$as_me: failed program was:" >&5
7648 cat conftest.$ac_ext >&5
7649 cf_save="$CPPFLAGS"
7650          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7651          cat >conftest.$ac_ext <<_ACEOF
7652 #line 7652 "configure"
7653 #include "confdefs.h"
7654
7655 #include <stdlib.h>
7656 #include <string.h>
7657 #include <sys/types.h>
7658
7659 int
7660 main ()
7661 {
7662
7663 #ifdef _XOPEN_SOURCE
7664 make an error
7665 #endif
7666   ;
7667   return 0;
7668 }
7669 _ACEOF
7670 rm -f conftest.$ac_objext
7671 if { (eval echo "$as_me:7671: \"$ac_compile\"") >&5
7672   (eval $ac_compile) 2>&5
7673   ac_status=$?
7674   echo "$as_me:7674: \$? = $ac_status" >&5
7675   (exit $ac_status); } &&
7676          { ac_try='test -s conftest.$ac_objext'
7677   { (eval echo "$as_me:7677: \"$ac_try\"") >&5
7678   (eval $ac_try) 2>&5
7679   ac_status=$?
7680   echo "$as_me:7680: \$? = $ac_status" >&5
7681   (exit $ac_status); }; }; then
7682   cf_cv_xopen_source=no
7683 else
7684   echo "$as_me: failed program was:" >&5
7685 cat conftest.$ac_ext >&5
7686 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7687 fi
7688 rm -f conftest.$ac_objext conftest.$ac_ext
7689         CPPFLAGS="$cf_save"
7690
7691 fi
7692 rm -f conftest.$ac_objext conftest.$ac_ext
7693
7694 fi
7695 echo "$as_me:7695: result: $cf_cv_xopen_source" >&5
7696 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7697
7698 if test "$cf_cv_xopen_source" != no ; then
7699
7700 CFLAGS=`echo "$CFLAGS" | \
7701         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7702                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7703
7704 CPPFLAGS=`echo "$CPPFLAGS" | \
7705         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7706                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7707
7708         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7709
7710 cf_fix_cppflags=no
7711 cf_new_cflags=
7712 cf_new_cppflags=
7713 cf_new_extra_cppflags=
7714
7715 for cf_add_cflags in $cf_temp_xopen_source
7716 do
7717 case $cf_fix_cppflags in
7718 no)
7719         case $cf_add_cflags in #(vi
7720         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7721                 case $cf_add_cflags in
7722                 -D*)
7723                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7724
7725                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7726                                 && test -z "${cf_tst_cflags}" \
7727                                 && cf_fix_cppflags=yes
7728
7729                         if test $cf_fix_cppflags = yes ; then
7730                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7731                                 continue
7732                         elif test "${cf_tst_cflags}" = "\"'" ; then
7733                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7734                                 continue
7735                         fi
7736                         ;;
7737                 esac
7738                 case "$CPPFLAGS" in
7739                 *$cf_add_cflags) #(vi
7740                         ;;
7741                 *) #(vi
7742                         case $cf_add_cflags in #(vi
7743                         -D*)
7744                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7745
7746 CPPFLAGS=`echo "$CPPFLAGS" | \
7747         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7748                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7749
7750                                 ;;
7751                         esac
7752                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7753                         ;;
7754                 esac
7755                 ;;
7756         *)
7757                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7758                 ;;
7759         esac
7760         ;;
7761 yes)
7762         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7763
7764         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7765
7766         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7767                 && test -z "${cf_tst_cflags}" \
7768                 && cf_fix_cppflags=no
7769         ;;
7770 esac
7771 done
7772
7773 if test -n "$cf_new_cflags" ; then
7774
7775         CFLAGS="$CFLAGS $cf_new_cflags"
7776 fi
7777
7778 if test -n "$cf_new_cppflags" ; then
7779
7780         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7781 fi
7782
7783 if test -n "$cf_new_extra_cppflags" ; then
7784
7785         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7786 fi
7787
7788 fi
7789
7790 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7791
7792 cf_save_CFLAGS="$CFLAGS"
7793 cf_save_CPPFLAGS="$CPPFLAGS"
7794
7795 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7796         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7797                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7798
7799 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7800         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7801                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7802
7803 echo "$as_me:7803: checking if we should define _POSIX_C_SOURCE" >&5
7804 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7805 if test "${cf_cv_posix_c_source+set}" = set; then
7806   echo $ECHO_N "(cached) $ECHO_C" >&6
7807 else
7808
7809 echo "${as_me:-configure}:7809: testing if the symbol is already defined go no further ..." 1>&5
7810
7811         cat >conftest.$ac_ext <<_ACEOF
7812 #line 7812 "configure"
7813 #include "confdefs.h"
7814 #include <sys/types.h>
7815 int
7816 main ()
7817 {
7818
7819 #ifndef _POSIX_C_SOURCE
7820 make an error
7821 #endif
7822   ;
7823   return 0;
7824 }
7825 _ACEOF
7826 rm -f conftest.$ac_objext
7827 if { (eval echo "$as_me:7827: \"$ac_compile\"") >&5
7828   (eval $ac_compile) 2>&5
7829   ac_status=$?
7830   echo "$as_me:7830: \$? = $ac_status" >&5
7831   (exit $ac_status); } &&
7832          { ac_try='test -s conftest.$ac_objext'
7833   { (eval echo "$as_me:7833: \"$ac_try\"") >&5
7834   (eval $ac_try) 2>&5
7835   ac_status=$?
7836   echo "$as_me:7836: \$? = $ac_status" >&5
7837   (exit $ac_status); }; }; then
7838   cf_cv_posix_c_source=no
7839 else
7840   echo "$as_me: failed program was:" >&5
7841 cat conftest.$ac_ext >&5
7842 cf_want_posix_source=no
7843          case .$cf_POSIX_C_SOURCE in #(vi
7844          .[12]??*) #(vi
7845                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7846                 ;;
7847          .2) #(vi
7848                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7849                 cf_want_posix_source=yes
7850                 ;;
7851          .*)
7852                 cf_want_posix_source=yes
7853                 ;;
7854          esac
7855          if test "$cf_want_posix_source" = yes ; then
7856                 cat >conftest.$ac_ext <<_ACEOF
7857 #line 7857 "configure"
7858 #include "confdefs.h"
7859 #include <sys/types.h>
7860 int
7861 main ()
7862 {
7863
7864 #ifdef _POSIX_SOURCE
7865 make an error
7866 #endif
7867   ;
7868   return 0;
7869 }
7870 _ACEOF
7871 rm -f conftest.$ac_objext
7872 if { (eval echo "$as_me:7872: \"$ac_compile\"") >&5
7873   (eval $ac_compile) 2>&5
7874   ac_status=$?
7875   echo "$as_me:7875: \$? = $ac_status" >&5
7876   (exit $ac_status); } &&
7877          { ac_try='test -s conftest.$ac_objext'
7878   { (eval echo "$as_me:7878: \"$ac_try\"") >&5
7879   (eval $ac_try) 2>&5
7880   ac_status=$?
7881   echo "$as_me:7881: \$? = $ac_status" >&5
7882   (exit $ac_status); }; }; then
7883   :
7884 else
7885   echo "$as_me: failed program was:" >&5
7886 cat conftest.$ac_ext >&5
7887 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7888 fi
7889 rm -f conftest.$ac_objext conftest.$ac_ext
7890          fi
7891
7892 echo "${as_me:-configure}:7892: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7893
7894          CFLAGS="$cf_trim_CFLAGS"
7895          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7896
7897 echo "${as_me:-configure}:7897: testing if the second compile does not leave our definition intact error ..." 1>&5
7898
7899          cat >conftest.$ac_ext <<_ACEOF
7900 #line 7900 "configure"
7901 #include "confdefs.h"
7902 #include <sys/types.h>
7903 int
7904 main ()
7905 {
7906
7907 #ifndef _POSIX_C_SOURCE
7908 make an error
7909 #endif
7910   ;
7911   return 0;
7912 }
7913 _ACEOF
7914 rm -f conftest.$ac_objext
7915 if { (eval echo "$as_me:7915: \"$ac_compile\"") >&5
7916   (eval $ac_compile) 2>&5
7917   ac_status=$?
7918   echo "$as_me:7918: \$? = $ac_status" >&5
7919   (exit $ac_status); } &&
7920          { ac_try='test -s conftest.$ac_objext'
7921   { (eval echo "$as_me:7921: \"$ac_try\"") >&5
7922   (eval $ac_try) 2>&5
7923   ac_status=$?
7924   echo "$as_me:7924: \$? = $ac_status" >&5
7925   (exit $ac_status); }; }; then
7926   :
7927 else
7928   echo "$as_me: failed program was:" >&5
7929 cat conftest.$ac_ext >&5
7930 cf_cv_posix_c_source=no
7931 fi
7932 rm -f conftest.$ac_objext conftest.$ac_ext
7933          CFLAGS="$cf_save_CFLAGS"
7934          CPPFLAGS="$cf_save_CPPFLAGS"
7935
7936 fi
7937 rm -f conftest.$ac_objext conftest.$ac_ext
7938
7939 fi
7940 echo "$as_me:7940: result: $cf_cv_posix_c_source" >&5
7941 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7942
7943 if test "$cf_cv_posix_c_source" != no ; then
7944         CFLAGS="$cf_trim_CFLAGS"
7945         CPPFLAGS="$cf_trim_CPPFLAGS"
7946
7947 cf_fix_cppflags=no
7948 cf_new_cflags=
7949 cf_new_cppflags=
7950 cf_new_extra_cppflags=
7951
7952 for cf_add_cflags in $cf_cv_posix_c_source
7953 do
7954 case $cf_fix_cppflags in
7955 no)
7956         case $cf_add_cflags in #(vi
7957         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7958                 case $cf_add_cflags in
7959                 -D*)
7960                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7961
7962                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7963                                 && test -z "${cf_tst_cflags}" \
7964                                 && cf_fix_cppflags=yes
7965
7966                         if test $cf_fix_cppflags = yes ; then
7967                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7968                                 continue
7969                         elif test "${cf_tst_cflags}" = "\"'" ; then
7970                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7971                                 continue
7972                         fi
7973                         ;;
7974                 esac
7975                 case "$CPPFLAGS" in
7976                 *$cf_add_cflags) #(vi
7977                         ;;
7978                 *) #(vi
7979                         case $cf_add_cflags in #(vi
7980                         -D*)
7981                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7982
7983 CPPFLAGS=`echo "$CPPFLAGS" | \
7984         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7985                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7986
7987                                 ;;
7988                         esac
7989                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7990                         ;;
7991                 esac
7992                 ;;
7993         *)
7994                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7995                 ;;
7996         esac
7997         ;;
7998 yes)
7999         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8000
8001         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8002
8003         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8004                 && test -z "${cf_tst_cflags}" \
8005                 && cf_fix_cppflags=no
8006         ;;
8007 esac
8008 done
8009
8010 if test -n "$cf_new_cflags" ; then
8011
8012         CFLAGS="$CFLAGS $cf_new_cflags"
8013 fi
8014
8015 if test -n "$cf_new_cppflags" ; then
8016
8017         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8018 fi
8019
8020 if test -n "$cf_new_extra_cppflags" ; then
8021
8022         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8023 fi
8024
8025 fi
8026
8027         ;;
8028 esac
8029
8030 if test -n "$cf_xopen_source" ; then
8031
8032 cf_fix_cppflags=no
8033 cf_new_cflags=
8034 cf_new_cppflags=
8035 cf_new_extra_cppflags=
8036
8037 for cf_add_cflags in $cf_xopen_source
8038 do
8039 case $cf_fix_cppflags in
8040 no)
8041         case $cf_add_cflags in #(vi
8042         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8043                 case $cf_add_cflags in
8044                 -D*)
8045                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8046
8047                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8048                                 && test -z "${cf_tst_cflags}" \
8049                                 && cf_fix_cppflags=yes
8050
8051                         if test $cf_fix_cppflags = yes ; then
8052                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8053                                 continue
8054                         elif test "${cf_tst_cflags}" = "\"'" ; then
8055                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8056                                 continue
8057                         fi
8058                         ;;
8059                 esac
8060                 case "$CPPFLAGS" in
8061                 *$cf_add_cflags) #(vi
8062                         ;;
8063                 *) #(vi
8064                         case $cf_add_cflags in #(vi
8065                         -D*)
8066                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8067
8068 CPPFLAGS=`echo "$CPPFLAGS" | \
8069         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8070                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8071
8072                                 ;;
8073                         esac
8074                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8075                         ;;
8076                 esac
8077                 ;;
8078         *)
8079                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8080                 ;;
8081         esac
8082         ;;
8083 yes)
8084         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8085
8086         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8087
8088         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8089                 && test -z "${cf_tst_cflags}" \
8090                 && cf_fix_cppflags=no
8091         ;;
8092 esac
8093 done
8094
8095 if test -n "$cf_new_cflags" ; then
8096
8097         CFLAGS="$CFLAGS $cf_new_cflags"
8098 fi
8099
8100 if test -n "$cf_new_cppflags" ; then
8101
8102         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8103 fi
8104
8105 if test -n "$cf_new_extra_cppflags" ; then
8106
8107         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8108 fi
8109
8110 fi
8111
8112 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8113         echo "$as_me:8113: checking if _XOPEN_SOURCE really is set" >&5
8114 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8115         cat >conftest.$ac_ext <<_ACEOF
8116 #line 8116 "configure"
8117 #include "confdefs.h"
8118 #include <stdlib.h>
8119 int
8120 main ()
8121 {
8122
8123 #ifndef _XOPEN_SOURCE
8124 make an error
8125 #endif
8126   ;
8127   return 0;
8128 }
8129 _ACEOF
8130 rm -f conftest.$ac_objext
8131 if { (eval echo "$as_me:8131: \"$ac_compile\"") >&5
8132   (eval $ac_compile) 2>&5
8133   ac_status=$?
8134   echo "$as_me:8134: \$? = $ac_status" >&5
8135   (exit $ac_status); } &&
8136          { ac_try='test -s conftest.$ac_objext'
8137   { (eval echo "$as_me:8137: \"$ac_try\"") >&5
8138   (eval $ac_try) 2>&5
8139   ac_status=$?
8140   echo "$as_me:8140: \$? = $ac_status" >&5
8141   (exit $ac_status); }; }; then
8142   cf_XOPEN_SOURCE_set=yes
8143 else
8144   echo "$as_me: failed program was:" >&5
8145 cat conftest.$ac_ext >&5
8146 cf_XOPEN_SOURCE_set=no
8147 fi
8148 rm -f conftest.$ac_objext conftest.$ac_ext
8149         echo "$as_me:8149: result: $cf_XOPEN_SOURCE_set" >&5
8150 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8151         if test $cf_XOPEN_SOURCE_set = yes
8152         then
8153                 cat >conftest.$ac_ext <<_ACEOF
8154 #line 8154 "configure"
8155 #include "confdefs.h"
8156 #include <stdlib.h>
8157 int
8158 main ()
8159 {
8160
8161 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8162 make an error
8163 #endif
8164   ;
8165   return 0;
8166 }
8167 _ACEOF
8168 rm -f conftest.$ac_objext
8169 if { (eval echo "$as_me:8169: \"$ac_compile\"") >&5
8170   (eval $ac_compile) 2>&5
8171   ac_status=$?
8172   echo "$as_me:8172: \$? = $ac_status" >&5
8173   (exit $ac_status); } &&
8174          { ac_try='test -s conftest.$ac_objext'
8175   { (eval echo "$as_me:8175: \"$ac_try\"") >&5
8176   (eval $ac_try) 2>&5
8177   ac_status=$?
8178   echo "$as_me:8178: \$? = $ac_status" >&5
8179   (exit $ac_status); }; }; then
8180   cf_XOPEN_SOURCE_set_ok=yes
8181 else
8182   echo "$as_me: failed program was:" >&5
8183 cat conftest.$ac_ext >&5
8184 cf_XOPEN_SOURCE_set_ok=no
8185 fi
8186 rm -f conftest.$ac_objext conftest.$ac_ext
8187                 if test $cf_XOPEN_SOURCE_set_ok = no
8188                 then
8189                         { echo "$as_me:8189: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8190 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8191                 fi
8192         else
8193
8194 echo "$as_me:8194: checking if we should define _XOPEN_SOURCE" >&5
8195 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8196 if test "${cf_cv_xopen_source+set}" = set; then
8197   echo $ECHO_N "(cached) $ECHO_C" >&6
8198 else
8199
8200         cat >conftest.$ac_ext <<_ACEOF
8201 #line 8201 "configure"
8202 #include "confdefs.h"
8203
8204 #include <stdlib.h>
8205 #include <string.h>
8206 #include <sys/types.h>
8207
8208 int
8209 main ()
8210 {
8211
8212 #ifndef _XOPEN_SOURCE
8213 make an error
8214 #endif
8215   ;
8216   return 0;
8217 }
8218 _ACEOF
8219 rm -f conftest.$ac_objext
8220 if { (eval echo "$as_me:8220: \"$ac_compile\"") >&5
8221   (eval $ac_compile) 2>&5
8222   ac_status=$?
8223   echo "$as_me:8223: \$? = $ac_status" >&5
8224   (exit $ac_status); } &&
8225          { ac_try='test -s conftest.$ac_objext'
8226   { (eval echo "$as_me:8226: \"$ac_try\"") >&5
8227   (eval $ac_try) 2>&5
8228   ac_status=$?
8229   echo "$as_me:8229: \$? = $ac_status" >&5
8230   (exit $ac_status); }; }; then
8231   cf_cv_xopen_source=no
8232 else
8233   echo "$as_me: failed program was:" >&5
8234 cat conftest.$ac_ext >&5
8235 cf_save="$CPPFLAGS"
8236          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8237          cat >conftest.$ac_ext <<_ACEOF
8238 #line 8238 "configure"
8239 #include "confdefs.h"
8240
8241 #include <stdlib.h>
8242 #include <string.h>
8243 #include <sys/types.h>
8244
8245 int
8246 main ()
8247 {
8248
8249 #ifdef _XOPEN_SOURCE
8250 make an error
8251 #endif
8252   ;
8253   return 0;
8254 }
8255 _ACEOF
8256 rm -f conftest.$ac_objext
8257 if { (eval echo "$as_me:8257: \"$ac_compile\"") >&5
8258   (eval $ac_compile) 2>&5
8259   ac_status=$?
8260   echo "$as_me:8260: \$? = $ac_status" >&5
8261   (exit $ac_status); } &&
8262          { ac_try='test -s conftest.$ac_objext'
8263   { (eval echo "$as_me:8263: \"$ac_try\"") >&5
8264   (eval $ac_try) 2>&5
8265   ac_status=$?
8266   echo "$as_me:8266: \$? = $ac_status" >&5
8267   (exit $ac_status); }; }; then
8268   cf_cv_xopen_source=no
8269 else
8270   echo "$as_me: failed program was:" >&5
8271 cat conftest.$ac_ext >&5
8272 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8273 fi
8274 rm -f conftest.$ac_objext conftest.$ac_ext
8275         CPPFLAGS="$cf_save"
8276
8277 fi
8278 rm -f conftest.$ac_objext conftest.$ac_ext
8279
8280 fi
8281 echo "$as_me:8281: result: $cf_cv_xopen_source" >&5
8282 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8283
8284 if test "$cf_cv_xopen_source" != no ; then
8285
8286 CFLAGS=`echo "$CFLAGS" | \
8287         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8288                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8289
8290 CPPFLAGS=`echo "$CPPFLAGS" | \
8291         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8292                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8293
8294         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8295
8296 cf_fix_cppflags=no
8297 cf_new_cflags=
8298 cf_new_cppflags=
8299 cf_new_extra_cppflags=
8300
8301 for cf_add_cflags in $cf_temp_xopen_source
8302 do
8303 case $cf_fix_cppflags in
8304 no)
8305         case $cf_add_cflags in #(vi
8306         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8307                 case $cf_add_cflags in
8308                 -D*)
8309                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8310
8311                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8312                                 && test -z "${cf_tst_cflags}" \
8313                                 && cf_fix_cppflags=yes
8314
8315                         if test $cf_fix_cppflags = yes ; then
8316                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8317                                 continue
8318                         elif test "${cf_tst_cflags}" = "\"'" ; then
8319                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8320                                 continue
8321                         fi
8322                         ;;
8323                 esac
8324                 case "$CPPFLAGS" in
8325                 *$cf_add_cflags) #(vi
8326                         ;;
8327                 *) #(vi
8328                         case $cf_add_cflags in #(vi
8329                         -D*)
8330                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8331
8332 CPPFLAGS=`echo "$CPPFLAGS" | \
8333         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8334                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8335
8336                                 ;;
8337                         esac
8338                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8339                         ;;
8340                 esac
8341                 ;;
8342         *)
8343                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8344                 ;;
8345         esac
8346         ;;
8347 yes)
8348         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8349
8350         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8351
8352         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8353                 && test -z "${cf_tst_cflags}" \
8354                 && cf_fix_cppflags=no
8355         ;;
8356 esac
8357 done
8358
8359 if test -n "$cf_new_cflags" ; then
8360
8361         CFLAGS="$CFLAGS $cf_new_cflags"
8362 fi
8363
8364 if test -n "$cf_new_cppflags" ; then
8365
8366         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8367 fi
8368
8369 if test -n "$cf_new_extra_cppflags" ; then
8370
8371         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8372 fi
8373
8374 fi
8375
8376         fi
8377 fi
8378
8379 # Work around breakage on OS X
8380
8381 echo "$as_me:8381: checking if SIGWINCH is defined" >&5
8382 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8383 if test "${cf_cv_define_sigwinch+set}" = set; then
8384   echo $ECHO_N "(cached) $ECHO_C" >&6
8385 else
8386
8387         cat >conftest.$ac_ext <<_ACEOF
8388 #line 8388 "configure"
8389 #include "confdefs.h"
8390
8391 #include <sys/types.h>
8392 #include <sys/signal.h>
8393
8394 int
8395 main ()
8396 {
8397 int x = SIGWINCH
8398   ;
8399   return 0;
8400 }
8401 _ACEOF
8402 rm -f conftest.$ac_objext
8403 if { (eval echo "$as_me:8403: \"$ac_compile\"") >&5
8404   (eval $ac_compile) 2>&5
8405   ac_status=$?
8406   echo "$as_me:8406: \$? = $ac_status" >&5
8407   (exit $ac_status); } &&
8408          { ac_try='test -s conftest.$ac_objext'
8409   { (eval echo "$as_me:8409: \"$ac_try\"") >&5
8410   (eval $ac_try) 2>&5
8411   ac_status=$?
8412   echo "$as_me:8412: \$? = $ac_status" >&5
8413   (exit $ac_status); }; }; then
8414   cf_cv_define_sigwinch=yes
8415 else
8416   echo "$as_me: failed program was:" >&5
8417 cat conftest.$ac_ext >&5
8418 cat >conftest.$ac_ext <<_ACEOF
8419 #line 8419 "configure"
8420 #include "confdefs.h"
8421
8422 #undef _XOPEN_SOURCE
8423 #undef _POSIX_SOURCE
8424 #undef _POSIX_C_SOURCE
8425 #include <sys/types.h>
8426 #include <sys/signal.h>
8427
8428 int
8429 main ()
8430 {
8431 int x = SIGWINCH
8432   ;
8433   return 0;
8434 }
8435 _ACEOF
8436 rm -f conftest.$ac_objext
8437 if { (eval echo "$as_me:8437: \"$ac_compile\"") >&5
8438   (eval $ac_compile) 2>&5
8439   ac_status=$?
8440   echo "$as_me:8440: \$? = $ac_status" >&5
8441   (exit $ac_status); } &&
8442          { ac_try='test -s conftest.$ac_objext'
8443   { (eval echo "$as_me:8443: \"$ac_try\"") >&5
8444   (eval $ac_try) 2>&5
8445   ac_status=$?
8446   echo "$as_me:8446: \$? = $ac_status" >&5
8447   (exit $ac_status); }; }; then
8448   cf_cv_define_sigwinch=maybe
8449 else
8450   echo "$as_me: failed program was:" >&5
8451 cat conftest.$ac_ext >&5
8452 cf_cv_define_sigwinch=no
8453 fi
8454 rm -f conftest.$ac_objext conftest.$ac_ext
8455
8456 fi
8457 rm -f conftest.$ac_objext conftest.$ac_ext
8458
8459 fi
8460 echo "$as_me:8460: result: $cf_cv_define_sigwinch" >&5
8461 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8462
8463 if test "$cf_cv_define_sigwinch" = maybe ; then
8464 echo "$as_me:8464: checking for actual SIGWINCH definition" >&5
8465 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8466 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8467   echo $ECHO_N "(cached) $ECHO_C" >&6
8468 else
8469
8470 cf_cv_fixup_sigwinch=unknown
8471 cf_sigwinch=32
8472 while test $cf_sigwinch != 1
8473 do
8474         cat >conftest.$ac_ext <<_ACEOF
8475 #line 8475 "configure"
8476 #include "confdefs.h"
8477
8478 #undef _XOPEN_SOURCE
8479 #undef _POSIX_SOURCE
8480 #undef _POSIX_C_SOURCE
8481 #include <sys/types.h>
8482 #include <sys/signal.h>
8483
8484 int
8485 main ()
8486 {
8487
8488 #if SIGWINCH != $cf_sigwinch
8489 make an error
8490 #endif
8491 int x = SIGWINCH
8492   ;
8493   return 0;
8494 }
8495 _ACEOF
8496 rm -f conftest.$ac_objext
8497 if { (eval echo "$as_me:8497: \"$ac_compile\"") >&5
8498   (eval $ac_compile) 2>&5
8499   ac_status=$?
8500   echo "$as_me:8500: \$? = $ac_status" >&5
8501   (exit $ac_status); } &&
8502          { ac_try='test -s conftest.$ac_objext'
8503   { (eval echo "$as_me:8503: \"$ac_try\"") >&5
8504   (eval $ac_try) 2>&5
8505   ac_status=$?
8506   echo "$as_me:8506: \$? = $ac_status" >&5
8507   (exit $ac_status); }; }; then
8508   cf_cv_fixup_sigwinch=$cf_sigwinch
8509          break
8510 else
8511   echo "$as_me: failed program was:" >&5
8512 cat conftest.$ac_ext >&5
8513 fi
8514 rm -f conftest.$ac_objext conftest.$ac_ext
8515
8516 cf_sigwinch=`expr $cf_sigwinch - 1`
8517 done
8518
8519 fi
8520 echo "$as_me:8520: result: $cf_cv_fixup_sigwinch" >&5
8521 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8522
8523         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8524                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8525         fi
8526 fi
8527
8528 # Checks for CODESET support.
8529
8530   echo "$as_me:8530: checking for nl_langinfo and CODESET" >&5
8531 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8532 if test "${am_cv_langinfo_codeset+set}" = set; then
8533   echo $ECHO_N "(cached) $ECHO_C" >&6
8534 else
8535   cat >conftest.$ac_ext <<_ACEOF
8536 #line 8536 "configure"
8537 #include "confdefs.h"
8538 #include <langinfo.h>
8539 int
8540 main ()
8541 {
8542 char* cs = nl_langinfo(CODESET);
8543   ;
8544   return 0;
8545 }
8546 _ACEOF
8547 rm -f conftest.$ac_objext conftest$ac_exeext
8548 if { (eval echo "$as_me:8548: \"$ac_link\"") >&5
8549   (eval $ac_link) 2>&5
8550   ac_status=$?
8551   echo "$as_me:8551: \$? = $ac_status" >&5
8552   (exit $ac_status); } &&
8553          { ac_try='test -s conftest$ac_exeext'
8554   { (eval echo "$as_me:8554: \"$ac_try\"") >&5
8555   (eval $ac_try) 2>&5
8556   ac_status=$?
8557   echo "$as_me:8557: \$? = $ac_status" >&5
8558   (exit $ac_status); }; }; then
8559   am_cv_langinfo_codeset=yes
8560 else
8561   echo "$as_me: failed program was:" >&5
8562 cat conftest.$ac_ext >&5
8563 am_cv_langinfo_codeset=no
8564 fi
8565 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8566
8567 fi
8568 echo "$as_me:8568: result: $am_cv_langinfo_codeset" >&5
8569 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8570   if test $am_cv_langinfo_codeset = yes; then
8571
8572 cat >>confdefs.h <<\EOF
8573 #define HAVE_LANGINFO_CODESET 1
8574 EOF
8575
8576   fi
8577
8578 # use these variables to work around a defect in gcc's fixincludes.
8579 NCURSES_OK_WCHAR_T=
8580 NCURSES_OK_WINT_T=
8581
8582 echo "$as_me:8582: checking if you want wide-character code" >&5
8583 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8584
8585 # Check whether --enable-widec or --disable-widec was given.
8586 if test "${enable_widec+set}" = set; then
8587   enableval="$enable_widec"
8588   with_widec=$enableval
8589 else
8590   with_widec=no
8591 fi;
8592 echo "$as_me:8592: result: $with_widec" >&5
8593 echo "${ECHO_T}$with_widec" >&6
8594 if test "x$with_widec" = xyes ; then
8595         LIB_SUFFIX="w${LIB_SUFFIX}"
8596
8597 cat >>confdefs.h <<\EOF
8598 #define USE_WIDEC_SUPPORT 1
8599 EOF
8600
8601 cat >>confdefs.h <<\EOF
8602 #define NCURSES_WIDECHAR 1
8603 EOF
8604
8605 echo "$as_me:8605: checking if wchar.h can be used as is" >&5
8606 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8607 if test "${cf_cv_wchar_h_okay+set}" = set; then
8608   echo $ECHO_N "(cached) $ECHO_C" >&6
8609 else
8610
8611 cat >conftest.$ac_ext <<_ACEOF
8612 #line 8612 "configure"
8613 #include "confdefs.h"
8614
8615 #include <stdlib.h>
8616 #include <wchar.h>
8617
8618 int
8619 main ()
8620 {
8621
8622         wint_t foo = 0;
8623         int bar = iswpunct(foo)
8624   ;
8625   return 0;
8626 }
8627 _ACEOF
8628 rm -f conftest.$ac_objext
8629 if { (eval echo "$as_me:8629: \"$ac_compile\"") >&5
8630   (eval $ac_compile) 2>&5
8631   ac_status=$?
8632   echo "$as_me:8632: \$? = $ac_status" >&5
8633   (exit $ac_status); } &&
8634          { ac_try='test -s conftest.$ac_objext'
8635   { (eval echo "$as_me:8635: \"$ac_try\"") >&5
8636   (eval $ac_try) 2>&5
8637   ac_status=$?
8638   echo "$as_me:8638: \$? = $ac_status" >&5
8639   (exit $ac_status); }; }; then
8640   cf_cv_wchar_h_okay=yes
8641 else
8642   echo "$as_me: failed program was:" >&5
8643 cat conftest.$ac_ext >&5
8644 cf_cv_wchar_h_okay=no
8645 fi
8646 rm -f conftest.$ac_objext conftest.$ac_ext
8647 fi
8648 echo "$as_me:8648: result: $cf_cv_wchar_h_okay" >&5
8649 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8650
8651 if test $cf_cv_wchar_h_okay = no
8652 then
8653
8654 echo "$as_me:8654: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8655 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8656 cat >conftest.$ac_ext <<_ACEOF
8657 #line 8657 "configure"
8658 #include "confdefs.h"
8659 #include <sys/types.h>
8660
8661 int
8662 main ()
8663 {
8664
8665 #ifndef _XOPEN_SOURCE_EXTENDED
8666 make an error
8667 #endif
8668   ;
8669   return 0;
8670 }
8671 _ACEOF
8672 rm -f conftest.$ac_objext
8673 if { (eval echo "$as_me:8673: \"$ac_compile\"") >&5
8674   (eval $ac_compile) 2>&5
8675   ac_status=$?
8676   echo "$as_me:8676: \$? = $ac_status" >&5
8677   (exit $ac_status); } &&
8678          { ac_try='test -s conftest.$ac_objext'
8679   { (eval echo "$as_me:8679: \"$ac_try\"") >&5
8680   (eval $ac_try) 2>&5
8681   ac_status=$?
8682   echo "$as_me:8682: \$? = $ac_status" >&5
8683   (exit $ac_status); }; }; then
8684   cf_result=no
8685 else
8686   echo "$as_me: failed program was:" >&5
8687 cat conftest.$ac_ext >&5
8688 cf_result=yes
8689 fi
8690 rm -f conftest.$ac_objext conftest.$ac_ext
8691 echo "$as_me:8691: result: $cf_result" >&5
8692 echo "${ECHO_T}$cf_result" >&6
8693
8694 if test "$cf_result" = yes ; then
8695         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8696 elif test "x" != "x" ; then
8697         echo "$as_me:8697: checking checking for compatible value versus " >&5
8698 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8699         cat >conftest.$ac_ext <<_ACEOF
8700 #line 8700 "configure"
8701 #include "confdefs.h"
8702 #include <sys/types.h>
8703
8704 int
8705 main ()
8706 {
8707
8708 #if _XOPEN_SOURCE_EXTENDED- < 0
8709 make an error
8710 #endif
8711   ;
8712   return 0;
8713 }
8714 _ACEOF
8715 rm -f conftest.$ac_objext
8716 if { (eval echo "$as_me:8716: \"$ac_compile\"") >&5
8717   (eval $ac_compile) 2>&5
8718   ac_status=$?
8719   echo "$as_me:8719: \$? = $ac_status" >&5
8720   (exit $ac_status); } &&
8721          { ac_try='test -s conftest.$ac_objext'
8722   { (eval echo "$as_me:8722: \"$ac_try\"") >&5
8723   (eval $ac_try) 2>&5
8724   ac_status=$?
8725   echo "$as_me:8725: \$? = $ac_status" >&5
8726   (exit $ac_status); }; }; then
8727   cf_result=yes
8728 else
8729   echo "$as_me: failed program was:" >&5
8730 cat conftest.$ac_ext >&5
8731 cf_result=no
8732 fi
8733 rm -f conftest.$ac_objext conftest.$ac_ext
8734         echo "$as_me:8734: result: $cf_result" >&5
8735 echo "${ECHO_T}$cf_result" >&6
8736         if test "$cf_result" = no ; then
8737                 # perhaps we can override it - try...
8738                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8739         fi
8740 fi
8741
8742 fi
8743
8744         # with_overwrite=no
8745         NCURSES_CH_T=cchar_t
8746
8747 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8748 do
8749 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8750 echo "$as_me:8750: checking for $ac_func" >&5
8751 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8752 if eval "test \"\${$as_ac_var+set}\" = set"; then
8753   echo $ECHO_N "(cached) $ECHO_C" >&6
8754 else
8755   cat >conftest.$ac_ext <<_ACEOF
8756 #line 8756 "configure"
8757 #include "confdefs.h"
8758 /* System header to define __stub macros and hopefully few prototypes,
8759     which can conflict with char $ac_func (); below.  */
8760 #include <assert.h>
8761 /* Override any gcc2 internal prototype to avoid an error.  */
8762 #ifdef __cplusplus
8763 extern "C"
8764 #endif
8765 /* We use char because int might match the return type of a gcc2
8766    builtin and then its argument prototype would still apply.  */
8767 char $ac_func ();
8768 char (*f) ();
8769
8770 int
8771 main ()
8772 {
8773 /* The GNU C library defines this for functions which it implements
8774     to always fail with ENOSYS.  Some functions are actually named
8775     something starting with __ and the normal name is an alias.  */
8776 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8777 choke me
8778 #else
8779 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8780 #endif
8781
8782   ;
8783   return 0;
8784 }
8785 _ACEOF
8786 rm -f conftest.$ac_objext conftest$ac_exeext
8787 if { (eval echo "$as_me:8787: \"$ac_link\"") >&5
8788   (eval $ac_link) 2>&5
8789   ac_status=$?
8790   echo "$as_me:8790: \$? = $ac_status" >&5
8791   (exit $ac_status); } &&
8792          { ac_try='test -s conftest$ac_exeext'
8793   { (eval echo "$as_me:8793: \"$ac_try\"") >&5
8794   (eval $ac_try) 2>&5
8795   ac_status=$?
8796   echo "$as_me:8796: \$? = $ac_status" >&5
8797   (exit $ac_status); }; }; then
8798   eval "$as_ac_var=yes"
8799 else
8800   echo "$as_me: failed program was:" >&5
8801 cat conftest.$ac_ext >&5
8802 eval "$as_ac_var=no"
8803 fi
8804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8805 fi
8806 echo "$as_me:8806: result: `eval echo '${'$as_ac_var'}'`" >&5
8807 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8808 if test `eval echo '${'$as_ac_var'}'` = yes; then
8809   cat >>confdefs.h <<EOF
8810 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8811 EOF
8812
8813 fi
8814 done
8815
8816         if test "x$ac_cv_func_putwc" != xyes ; then
8817
8818 echo "$as_me:8818: checking for multibyte character support" >&5
8819 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8820 if test "${cf_cv_utf8_lib+set}" = set; then
8821   echo $ECHO_N "(cached) $ECHO_C" >&6
8822 else
8823
8824         cf_save_LIBS="$LIBS"
8825         cat >conftest.$ac_ext <<_ACEOF
8826 #line 8826 "configure"
8827 #include "confdefs.h"
8828
8829 #include <stdlib.h>
8830 int
8831 main ()
8832 {
8833 putwc(0,0);
8834   ;
8835   return 0;
8836 }
8837 _ACEOF
8838 rm -f conftest.$ac_objext conftest$ac_exeext
8839 if { (eval echo "$as_me:8839: \"$ac_link\"") >&5
8840   (eval $ac_link) 2>&5
8841   ac_status=$?
8842   echo "$as_me:8842: \$? = $ac_status" >&5
8843   (exit $ac_status); } &&
8844          { ac_try='test -s conftest$ac_exeext'
8845   { (eval echo "$as_me:8845: \"$ac_try\"") >&5
8846   (eval $ac_try) 2>&5
8847   ac_status=$?
8848   echo "$as_me:8848: \$? = $ac_status" >&5
8849   (exit $ac_status); }; }; then
8850   cf_cv_utf8_lib=yes
8851 else
8852   echo "$as_me: failed program was:" >&5
8853 cat conftest.$ac_ext >&5
8854
8855 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8856 # will be set on completion of the AC_TRY_LINK below.
8857 cf_cv_header_path_utf8=
8858 cf_cv_library_path_utf8=
8859
8860 echo "${as_me:-configure}:8860: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8861
8862 cf_save_LIBS="$LIBS"
8863
8864 cat >conftest.$ac_ext <<_ACEOF
8865 #line 8865 "configure"
8866 #include "confdefs.h"
8867
8868 #include <libutf8.h>
8869 int
8870 main ()
8871 {
8872 putwc(0,0);
8873   ;
8874   return 0;
8875 }
8876 _ACEOF
8877 rm -f conftest.$ac_objext conftest$ac_exeext
8878 if { (eval echo "$as_me:8878: \"$ac_link\"") >&5
8879   (eval $ac_link) 2>&5
8880   ac_status=$?
8881   echo "$as_me:8881: \$? = $ac_status" >&5
8882   (exit $ac_status); } &&
8883          { ac_try='test -s conftest$ac_exeext'
8884   { (eval echo "$as_me:8884: \"$ac_try\"") >&5
8885   (eval $ac_try) 2>&5
8886   ac_status=$?
8887   echo "$as_me:8887: \$? = $ac_status" >&5
8888   (exit $ac_status); }; }; then
8889
8890         cf_cv_find_linkage_utf8=yes
8891         cf_cv_header_path_utf8=/usr/include
8892         cf_cv_library_path_utf8=/usr/lib
8893
8894 else
8895   echo "$as_me: failed program was:" >&5
8896 cat conftest.$ac_ext >&5
8897
8898 LIBS="-lutf8  $cf_save_LIBS"
8899
8900 cat >conftest.$ac_ext <<_ACEOF
8901 #line 8901 "configure"
8902 #include "confdefs.h"
8903
8904 #include <libutf8.h>
8905 int
8906 main ()
8907 {
8908 putwc(0,0);
8909   ;
8910   return 0;
8911 }
8912 _ACEOF
8913 rm -f conftest.$ac_objext conftest$ac_exeext
8914 if { (eval echo "$as_me:8914: \"$ac_link\"") >&5
8915   (eval $ac_link) 2>&5
8916   ac_status=$?
8917   echo "$as_me:8917: \$? = $ac_status" >&5
8918   (exit $ac_status); } &&
8919          { ac_try='test -s conftest$ac_exeext'
8920   { (eval echo "$as_me:8920: \"$ac_try\"") >&5
8921   (eval $ac_try) 2>&5
8922   ac_status=$?
8923   echo "$as_me:8923: \$? = $ac_status" >&5
8924   (exit $ac_status); }; }; then
8925
8926         cf_cv_find_linkage_utf8=yes
8927         cf_cv_header_path_utf8=/usr/include
8928         cf_cv_library_path_utf8=/usr/lib
8929         cf_cv_library_file_utf8="-lutf8"
8930
8931 else
8932   echo "$as_me: failed program was:" >&5
8933 cat conftest.$ac_ext >&5
8934
8935         cf_cv_find_linkage_utf8=no
8936         LIBS="$cf_save_LIBS"
8937
8938     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8939
8940 echo "${as_me:-configure}:8940: testing find linkage for utf8 library ..." 1>&5
8941
8942 echo "${as_me:-configure}:8942: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8943
8944     cf_save_CPPFLAGS="$CPPFLAGS"
8945     cf_test_CPPFLAGS="$CPPFLAGS"
8946
8947 cf_search=
8948
8949 # collect the current set of include-directories from compiler flags
8950 cf_header_path_list=""
8951 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8952         for cf_header_path in $CPPFLAGS $CFLAGS
8953         do
8954                 case $cf_header_path in #(vi
8955                 -I*)
8956                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8957
8958 test "x$cf_header_path" != "xNONE" && \
8959 test -d "$cf_header_path" && \
8960  {
8961         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8962         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8963         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8964         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8965         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8966         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8967 }
8968
8969                         cf_header_path_list="$cf_header_path_list $cf_search"
8970                         ;;
8971                 esac
8972         done
8973 fi
8974
8975 # add the variations for the package we are looking for
8976
8977 cf_search=
8978
8979 test "x/usr" != "x$prefix" && \
8980 test -d "/usr" && \
8981 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
8982         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8983         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8984         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8985         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8986         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8987         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8988 }
8989
8990 test "x$prefix" != "xNONE" && \
8991 test -d "$prefix" && \
8992  {
8993         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8994         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8995         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8996         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8997         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8998         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8999 }
9000
9001 test "x/usr/local" != "x$prefix" && \
9002 test -d "/usr/local" && \
9003 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9004         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
9005         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9006         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
9007         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
9008         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
9009         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
9010 }
9011
9012 test "x/opt" != "x$prefix" && \
9013 test -d "/opt" && \
9014 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9015         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
9016         test -d /opt/include &&          cf_search="$cf_search /opt/include"
9017         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
9018         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
9019         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9020         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9021 }
9022
9023 test "x$HOME" != "x$prefix" && \
9024 test -d "$HOME" && \
9025 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9026         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9027         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9028         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9029         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9030         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9031         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9032 }
9033
9034 test "$includedir" != NONE && \
9035 test "$includedir" != "/usr/include" && \
9036 test -d "$includedir" && {
9037         test -d $includedir &&    cf_search="$cf_search $includedir"
9038         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9039 }
9040
9041 test "$oldincludedir" != NONE && \
9042 test "$oldincludedir" != "/usr/include" && \
9043 test -d "$oldincludedir" && {
9044         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9045         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9046 }
9047
9048 cf_search="$cf_search $cf_header_path_list"
9049
9050     for cf_cv_header_path_utf8 in $cf_search
9051     do
9052       if test -d $cf_cv_header_path_utf8 ; then
9053         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9054
9055 echo "${as_me:-configure}:9055: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9056
9057         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9058         cat >conftest.$ac_ext <<_ACEOF
9059 #line 9059 "configure"
9060 #include "confdefs.h"
9061
9062 #include <libutf8.h>
9063 int
9064 main ()
9065 {
9066 putwc(0,0);
9067   ;
9068   return 0;
9069 }
9070 _ACEOF
9071 rm -f conftest.$ac_objext
9072 if { (eval echo "$as_me:9072: \"$ac_compile\"") >&5
9073   (eval $ac_compile) 2>&5
9074   ac_status=$?
9075   echo "$as_me:9075: \$? = $ac_status" >&5
9076   (exit $ac_status); } &&
9077          { ac_try='test -s conftest.$ac_objext'
9078   { (eval echo "$as_me:9078: \"$ac_try\"") >&5
9079   (eval $ac_try) 2>&5
9080   ac_status=$?
9081   echo "$as_me:9081: \$? = $ac_status" >&5
9082   (exit $ac_status); }; }; then
9083
9084             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9085
9086 echo "${as_me:-configure}:9086: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9087
9088             cf_cv_find_linkage_utf8=maybe
9089             cf_test_CPPFLAGS="$CPPFLAGS"
9090             break
9091 else
9092   echo "$as_me: failed program was:" >&5
9093 cat conftest.$ac_ext >&5
9094
9095             CPPFLAGS="$cf_save_CPPFLAGS"
9096
9097 fi
9098 rm -f conftest.$ac_objext conftest.$ac_ext
9099       fi
9100     done
9101
9102     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9103
9104 echo "${as_me:-configure}:9104: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9105
9106       cf_save_LIBS="$LIBS"
9107       cf_save_LDFLAGS="$LDFLAGS"
9108
9109       if test "$cf_cv_find_linkage_utf8" != yes ; then
9110
9111 cf_search=
9112 cf_library_path_list=""
9113 if test -n "${LDFLAGS}${LIBS}" ; then
9114         for cf_library_path in $LDFLAGS $LIBS
9115         do
9116                 case $cf_library_path in #(vi
9117                 -L*)
9118                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9119
9120 test "x$cf_library_path" != "xNONE" && \
9121 test -d "$cf_library_path" && \
9122  {
9123         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9124         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9125         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9126         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9127         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9128         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9129 }
9130
9131                         cf_library_path_list="$cf_library_path_list $cf_search"
9132                         ;;
9133                 esac
9134         done
9135 fi
9136
9137 cf_search=
9138
9139 test "x/usr" != "x$prefix" && \
9140 test -d "/usr" && \
9141 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9142         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9143         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9144         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9145         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9146         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9147         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9148 }
9149
9150 test "x$prefix" != "xNONE" && \
9151 test -d "$prefix" && \
9152  {
9153         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9154         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9155         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9156         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9157         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9158         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9159 }
9160
9161 test "x/usr/local" != "x$prefix" && \
9162 test -d "/usr/local" && \
9163 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9164         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9165         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9166         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9167         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9168         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9169         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9170 }
9171
9172 test "x/opt" != "x$prefix" && \
9173 test -d "/opt" && \
9174 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9175         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9176         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9177         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9178         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9179         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9180         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9181 }
9182
9183 test "x$HOME" != "x$prefix" && \
9184 test -d "$HOME" && \
9185 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9186         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9187         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9188         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9189         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9190         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9191         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9192 }
9193
9194 cf_search="$cf_library_path_list $cf_search"
9195
9196         for cf_cv_library_path_utf8 in $cf_search
9197         do
9198           if test -d $cf_cv_library_path_utf8 ; then
9199             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9200
9201 echo "${as_me:-configure}:9201: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9202
9203             CPPFLAGS="$cf_test_CPPFLAGS"
9204             LIBS="-lutf8  $cf_save_LIBS"
9205             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9206             cat >conftest.$ac_ext <<_ACEOF
9207 #line 9207 "configure"
9208 #include "confdefs.h"
9209
9210 #include <libutf8.h>
9211 int
9212 main ()
9213 {
9214 putwc(0,0);
9215   ;
9216   return 0;
9217 }
9218 _ACEOF
9219 rm -f conftest.$ac_objext conftest$ac_exeext
9220 if { (eval echo "$as_me:9220: \"$ac_link\"") >&5
9221   (eval $ac_link) 2>&5
9222   ac_status=$?
9223   echo "$as_me:9223: \$? = $ac_status" >&5
9224   (exit $ac_status); } &&
9225          { ac_try='test -s conftest$ac_exeext'
9226   { (eval echo "$as_me:9226: \"$ac_try\"") >&5
9227   (eval $ac_try) 2>&5
9228   ac_status=$?
9229   echo "$as_me:9229: \$? = $ac_status" >&5
9230   (exit $ac_status); }; }; then
9231
9232                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9233
9234 echo "${as_me:-configure}:9234: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9235
9236                 cf_cv_find_linkage_utf8=yes
9237                 cf_cv_library_file_utf8="-lutf8"
9238                 break
9239 else
9240   echo "$as_me: failed program was:" >&5
9241 cat conftest.$ac_ext >&5
9242
9243                 CPPFLAGS="$cf_save_CPPFLAGS"
9244                 LIBS="$cf_save_LIBS"
9245                 LDFLAGS="$cf_save_LDFLAGS"
9246
9247 fi
9248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9249           fi
9250         done
9251         CPPFLAGS="$cf_save_CPPFLAGS"
9252         LDFLAGS="$cf_save_LDFLAGS"
9253       fi
9254
9255     else
9256       cf_cv_find_linkage_utf8=no
9257     fi
9258
9259 fi
9260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9261
9262 fi
9263 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9264
9265 LIBS="$cf_save_LIBS"
9266
9267 if test "$cf_cv_find_linkage_utf8" = yes ; then
9268 cf_cv_utf8_lib=add-on
9269 else
9270 cf_cv_utf8_lib=no
9271 fi
9272
9273 fi
9274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9275 fi
9276 echo "$as_me:9276: result: $cf_cv_utf8_lib" >&5
9277 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9278
9279 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9280 # ncurses/ncursesw:
9281 if test "$cf_cv_utf8_lib" = "add-on" ; then
9282
9283 cat >>confdefs.h <<\EOF
9284 #define HAVE_LIBUTF8_H 1
9285 EOF
9286
9287 if test -n "$cf_cv_header_path_utf8" ; then
9288   for cf_add_incdir in $cf_cv_header_path_utf8
9289   do
9290         while test $cf_add_incdir != /usr/include
9291         do
9292           if test -d $cf_add_incdir
9293           then
9294                 cf_have_incdir=no
9295                 if test -n "$CFLAGS$CPPFLAGS" ; then
9296                   # a loop is needed to ensure we can add subdirs of existing dirs
9297                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9298                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9299                           cf_have_incdir=yes; break
9300                         fi
9301                   done
9302                 fi
9303
9304                 if test "$cf_have_incdir" = no ; then
9305                   if test "$cf_add_incdir" = /usr/local/include ; then
9306                         if test "$GCC" = yes
9307                         then
9308                           cf_save_CPPFLAGS=$CPPFLAGS
9309                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9310                           cat >conftest.$ac_ext <<_ACEOF
9311 #line 9311 "configure"
9312 #include "confdefs.h"
9313 #include <stdio.h>
9314 int
9315 main ()
9316 {
9317 printf("Hello")
9318   ;
9319   return 0;
9320 }
9321 _ACEOF
9322 rm -f conftest.$ac_objext
9323 if { (eval echo "$as_me:9323: \"$ac_compile\"") >&5
9324   (eval $ac_compile) 2>&5
9325   ac_status=$?
9326   echo "$as_me:9326: \$? = $ac_status" >&5
9327   (exit $ac_status); } &&
9328          { ac_try='test -s conftest.$ac_objext'
9329   { (eval echo "$as_me:9329: \"$ac_try\"") >&5
9330   (eval $ac_try) 2>&5
9331   ac_status=$?
9332   echo "$as_me:9332: \$? = $ac_status" >&5
9333   (exit $ac_status); }; }; then
9334   :
9335 else
9336   echo "$as_me: failed program was:" >&5
9337 cat conftest.$ac_ext >&5
9338 cf_have_incdir=yes
9339 fi
9340 rm -f conftest.$ac_objext conftest.$ac_ext
9341                           CPPFLAGS=$cf_save_CPPFLAGS
9342                         fi
9343                   fi
9344                 fi
9345
9346                 if test "$cf_have_incdir" = no ; then
9347                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9348
9349 echo "${as_me:-configure}:9349: testing adding $cf_add_incdir to include-path ..." 1>&5
9350
9351                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9352
9353                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9354                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9355                   cf_add_incdir="$cf_top_incdir"
9356                 else
9357                   break
9358                 fi
9359           fi
9360         done
9361   done
9362 fi
9363
9364 if test -n "$cf_cv_library_path_utf8" ; then
9365   for cf_add_libdir in $cf_cv_library_path_utf8
9366   do
9367     if test $cf_add_libdir = /usr/lib ; then
9368       :
9369     elif test -d $cf_add_libdir
9370     then
9371       cf_have_libdir=no
9372       if test -n "$LDFLAGS$LIBS" ; then
9373         # a loop is needed to ensure we can add subdirs of existing dirs
9374         for cf_test_libdir in $LDFLAGS $LIBS ; do
9375           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9376             cf_have_libdir=yes; break
9377           fi
9378         done
9379       fi
9380       if test "$cf_have_libdir" = no ; then
9381         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9382
9383 echo "${as_me:-configure}:9383: testing adding $cf_add_libdir to library-path ..." 1>&5
9384
9385         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9386       fi
9387     fi
9388   done
9389 fi
9390
9391         LIBS="$cf_cv_library_file_utf8 $LIBS"
9392 fi
9393
9394                 if test "$cf_cv_utf8_lib" != no ; then
9395                         NCURSES_LIBUTF8=1
9396                 fi
9397         fi
9398
9399 # This is needed on Tru64 5.0 to declare mbstate_t
9400 echo "$as_me:9400: checking if we must include wchar.h to declare mbstate_t" >&5
9401 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9402 if test "${cf_cv_mbstate_t+set}" = set; then
9403   echo $ECHO_N "(cached) $ECHO_C" >&6
9404 else
9405
9406 cat >conftest.$ac_ext <<_ACEOF
9407 #line 9407 "configure"
9408 #include "confdefs.h"
9409
9410 #include <stdlib.h>
9411 #include <stdarg.h>
9412 #include <stdio.h>
9413 #ifdef HAVE_LIBUTF8_H
9414 #include <libutf8.h>
9415 #endif
9416 int
9417 main ()
9418 {
9419 mbstate_t state
9420   ;
9421   return 0;
9422 }
9423 _ACEOF
9424 rm -f conftest.$ac_objext
9425 if { (eval echo "$as_me:9425: \"$ac_compile\"") >&5
9426   (eval $ac_compile) 2>&5
9427   ac_status=$?
9428   echo "$as_me:9428: \$? = $ac_status" >&5
9429   (exit $ac_status); } &&
9430          { ac_try='test -s conftest.$ac_objext'
9431   { (eval echo "$as_me:9431: \"$ac_try\"") >&5
9432   (eval $ac_try) 2>&5
9433   ac_status=$?
9434   echo "$as_me:9434: \$? = $ac_status" >&5
9435   (exit $ac_status); }; }; then
9436   cf_cv_mbstate_t=no
9437 else
9438   echo "$as_me: failed program was:" >&5
9439 cat conftest.$ac_ext >&5
9440 cat >conftest.$ac_ext <<_ACEOF
9441 #line 9441 "configure"
9442 #include "confdefs.h"
9443
9444 #include <stdlib.h>
9445 #include <stdarg.h>
9446 #include <stdio.h>
9447 #include <wchar.h>
9448 #ifdef HAVE_LIBUTF8_H
9449 #include <libutf8.h>
9450 #endif
9451 int
9452 main ()
9453 {
9454 mbstate_t value
9455   ;
9456   return 0;
9457 }
9458 _ACEOF
9459 rm -f conftest.$ac_objext
9460 if { (eval echo "$as_me:9460: \"$ac_compile\"") >&5
9461   (eval $ac_compile) 2>&5
9462   ac_status=$?
9463   echo "$as_me:9463: \$? = $ac_status" >&5
9464   (exit $ac_status); } &&
9465          { ac_try='test -s conftest.$ac_objext'
9466   { (eval echo "$as_me:9466: \"$ac_try\"") >&5
9467   (eval $ac_try) 2>&5
9468   ac_status=$?
9469   echo "$as_me:9469: \$? = $ac_status" >&5
9470   (exit $ac_status); }; }; then
9471   cf_cv_mbstate_t=yes
9472 else
9473   echo "$as_me: failed program was:" >&5
9474 cat conftest.$ac_ext >&5
9475 cf_cv_mbstate_t=unknown
9476 fi
9477 rm -f conftest.$ac_objext conftest.$ac_ext
9478 fi
9479 rm -f conftest.$ac_objext conftest.$ac_ext
9480 fi
9481 echo "$as_me:9481: result: $cf_cv_mbstate_t" >&5
9482 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9483
9484 if test "$cf_cv_mbstate_t" = yes ; then
9485
9486 cat >>confdefs.h <<\EOF
9487 #define NEED_WCHAR_H 1
9488 EOF
9489
9490         NEED_WCHAR_H=1
9491 fi
9492
9493 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9494 if test "$cf_cv_mbstate_t" = unknown ; then
9495         NCURSES_MBSTATE_T=1
9496 fi
9497
9498 # This is needed on Tru64 5.0 to declare wchar_t
9499 echo "$as_me:9499: checking if we must include wchar.h to declare wchar_t" >&5
9500 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9501 if test "${cf_cv_wchar_t+set}" = set; then
9502   echo $ECHO_N "(cached) $ECHO_C" >&6
9503 else
9504
9505 cat >conftest.$ac_ext <<_ACEOF
9506 #line 9506 "configure"
9507 #include "confdefs.h"
9508
9509 #include <stdlib.h>
9510 #include <stdarg.h>
9511 #include <stdio.h>
9512 #ifdef HAVE_LIBUTF8_H
9513 #include <libutf8.h>
9514 #endif
9515 int
9516 main ()
9517 {
9518 wchar_t state
9519   ;
9520   return 0;
9521 }
9522 _ACEOF
9523 rm -f conftest.$ac_objext
9524 if { (eval echo "$as_me:9524: \"$ac_compile\"") >&5
9525   (eval $ac_compile) 2>&5
9526   ac_status=$?
9527   echo "$as_me:9527: \$? = $ac_status" >&5
9528   (exit $ac_status); } &&
9529          { ac_try='test -s conftest.$ac_objext'
9530   { (eval echo "$as_me:9530: \"$ac_try\"") >&5
9531   (eval $ac_try) 2>&5
9532   ac_status=$?
9533   echo "$as_me:9533: \$? = $ac_status" >&5
9534   (exit $ac_status); }; }; then
9535   cf_cv_wchar_t=no
9536 else
9537   echo "$as_me: failed program was:" >&5
9538 cat conftest.$ac_ext >&5
9539 cat >conftest.$ac_ext <<_ACEOF
9540 #line 9540 "configure"
9541 #include "confdefs.h"
9542
9543 #include <stdlib.h>
9544 #include <stdarg.h>
9545 #include <stdio.h>
9546 #include <wchar.h>
9547 #ifdef HAVE_LIBUTF8_H
9548 #include <libutf8.h>
9549 #endif
9550 int
9551 main ()
9552 {
9553 wchar_t value
9554   ;
9555   return 0;
9556 }
9557 _ACEOF
9558 rm -f conftest.$ac_objext
9559 if { (eval echo "$as_me:9559: \"$ac_compile\"") >&5
9560   (eval $ac_compile) 2>&5
9561   ac_status=$?
9562   echo "$as_me:9562: \$? = $ac_status" >&5
9563   (exit $ac_status); } &&
9564          { ac_try='test -s conftest.$ac_objext'
9565   { (eval echo "$as_me:9565: \"$ac_try\"") >&5
9566   (eval $ac_try) 2>&5
9567   ac_status=$?
9568   echo "$as_me:9568: \$? = $ac_status" >&5
9569   (exit $ac_status); }; }; then
9570   cf_cv_wchar_t=yes
9571 else
9572   echo "$as_me: failed program was:" >&5
9573 cat conftest.$ac_ext >&5
9574 cf_cv_wchar_t=unknown
9575 fi
9576 rm -f conftest.$ac_objext conftest.$ac_ext
9577 fi
9578 rm -f conftest.$ac_objext conftest.$ac_ext
9579 fi
9580 echo "$as_me:9580: result: $cf_cv_wchar_t" >&5
9581 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9582
9583 if test "$cf_cv_wchar_t" = yes ; then
9584
9585 cat >>confdefs.h <<\EOF
9586 #define NEED_WCHAR_H 1
9587 EOF
9588
9589         NEED_WCHAR_H=1
9590 fi
9591
9592 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9593 if test "$cf_cv_wchar_t" = unknown ; then
9594         NCURSES_WCHAR_T=1
9595 fi
9596
9597 # if we find wchar_t in either place, use substitution to provide a fallback.
9598 if test "$cf_cv_wchar_t" != unknown ; then
9599         NCURSES_OK_WCHAR_T=1
9600 fi
9601
9602 # This is needed on Tru64 5.0 to declare wint_t
9603 echo "$as_me:9603: checking if we must include wchar.h to declare wint_t" >&5
9604 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9605 if test "${cf_cv_wint_t+set}" = set; then
9606   echo $ECHO_N "(cached) $ECHO_C" >&6
9607 else
9608
9609 cat >conftest.$ac_ext <<_ACEOF
9610 #line 9610 "configure"
9611 #include "confdefs.h"
9612
9613 #include <stdlib.h>
9614 #include <stdarg.h>
9615 #include <stdio.h>
9616 #ifdef HAVE_LIBUTF8_H
9617 #include <libutf8.h>
9618 #endif
9619 int
9620 main ()
9621 {
9622 wint_t state
9623   ;
9624   return 0;
9625 }
9626 _ACEOF
9627 rm -f conftest.$ac_objext
9628 if { (eval echo "$as_me:9628: \"$ac_compile\"") >&5
9629   (eval $ac_compile) 2>&5
9630   ac_status=$?
9631   echo "$as_me:9631: \$? = $ac_status" >&5
9632   (exit $ac_status); } &&
9633          { ac_try='test -s conftest.$ac_objext'
9634   { (eval echo "$as_me:9634: \"$ac_try\"") >&5
9635   (eval $ac_try) 2>&5
9636   ac_status=$?
9637   echo "$as_me:9637: \$? = $ac_status" >&5
9638   (exit $ac_status); }; }; then
9639   cf_cv_wint_t=no
9640 else
9641   echo "$as_me: failed program was:" >&5
9642 cat conftest.$ac_ext >&5
9643 cat >conftest.$ac_ext <<_ACEOF
9644 #line 9644 "configure"
9645 #include "confdefs.h"
9646
9647 #include <stdlib.h>
9648 #include <stdarg.h>
9649 #include <stdio.h>
9650 #include <wchar.h>
9651 #ifdef HAVE_LIBUTF8_H
9652 #include <libutf8.h>
9653 #endif
9654 int
9655 main ()
9656 {
9657 wint_t value
9658   ;
9659   return 0;
9660 }
9661 _ACEOF
9662 rm -f conftest.$ac_objext
9663 if { (eval echo "$as_me:9663: \"$ac_compile\"") >&5
9664   (eval $ac_compile) 2>&5
9665   ac_status=$?
9666   echo "$as_me:9666: \$? = $ac_status" >&5
9667   (exit $ac_status); } &&
9668          { ac_try='test -s conftest.$ac_objext'
9669   { (eval echo "$as_me:9669: \"$ac_try\"") >&5
9670   (eval $ac_try) 2>&5
9671   ac_status=$?
9672   echo "$as_me:9672: \$? = $ac_status" >&5
9673   (exit $ac_status); }; }; then
9674   cf_cv_wint_t=yes
9675 else
9676   echo "$as_me: failed program was:" >&5
9677 cat conftest.$ac_ext >&5
9678 cf_cv_wint_t=unknown
9679 fi
9680 rm -f conftest.$ac_objext conftest.$ac_ext
9681 fi
9682 rm -f conftest.$ac_objext conftest.$ac_ext
9683 fi
9684 echo "$as_me:9684: result: $cf_cv_wint_t" >&5
9685 echo "${ECHO_T}$cf_cv_wint_t" >&6
9686
9687 if test "$cf_cv_wint_t" = yes ; then
9688
9689 cat >>confdefs.h <<\EOF
9690 #define NEED_WCHAR_H 1
9691 EOF
9692
9693         NEED_WCHAR_H=1
9694 fi
9695
9696 # if we do not find wint_t in either place, use substitution to provide a fallback.
9697 if test "$cf_cv_wint_t" = unknown ; then
9698         NCURSES_WINT_T=1
9699 fi
9700
9701 # if we find wint_t in either place, use substitution to provide a fallback.
9702 if test "$cf_cv_wint_t" != unknown ; then
9703         NCURSES_OK_WINT_T=1
9704 fi
9705
9706         if test "$NCURSES_MBSTATE_T" != 0; then
9707
9708 cat >>confdefs.h <<\EOF
9709 #define NEED_MBSTATE_T_DEF 1
9710 EOF
9711
9712         fi
9713 fi
9714
9715 ###   use option --disable-lp64 to allow long chtype
9716 case $cf_cv_abi_version in
9717 [345]*)
9718         default_with_lp64=no
9719         ;;
9720 *)
9721         default_with_lp64=yes
9722         ;;
9723 esac
9724
9725 echo "$as_me:9725: checking whether to enable _LP64 definition in curses.h" >&5
9726 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9727
9728 # Check whether --enable-lp64 or --disable-lp64 was given.
9729 if test "${enable_lp64+set}" = set; then
9730   enableval="$enable_lp64"
9731   with_lp64=$enableval
9732 else
9733   with_lp64=$default_with_lp64
9734 fi;
9735 echo "$as_me:9735: result: $with_lp64" >&5
9736 echo "${ECHO_T}$with_lp64" >&6
9737
9738 if test "x$with_lp64" = xyes ; then
9739         cf_cv_enable_lp64=1
9740 else
9741         cf_cv_enable_lp64=0
9742 fi
9743
9744 # Check whether --enable-largefile or --disable-largefile was given.
9745 if test "${enable_largefile+set}" = set; then
9746   enableval="$enable_largefile"
9747
9748 fi;
9749 if test "$enable_largefile" != no; then
9750
9751   echo "$as_me:9751: checking for special C compiler options needed for large files" >&5
9752 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9753 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9754   echo $ECHO_N "(cached) $ECHO_C" >&6
9755 else
9756   ac_cv_sys_largefile_CC=no
9757      if test "$GCC" != yes; then
9758        ac_save_CC=$CC
9759        while :; do
9760          # IRIX 6.2 and later do not support large files by default,
9761          # so use the C compiler's -n32 option if that helps.
9762          cat >conftest.$ac_ext <<_ACEOF
9763 #line 9763 "configure"
9764 #include "confdefs.h"
9765 #include <sys/types.h>
9766  /* Check that off_t can represent 2**63 - 1 correctly.
9767     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9768     since some C++ compilers masquerading as C compilers
9769     incorrectly reject 9223372036854775807.  */
9770 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9771   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9772                        && LARGE_OFF_T % 2147483647 == 1)
9773                       ? 1 : -1];
9774 int
9775 main ()
9776 {
9777
9778   ;
9779   return 0;
9780 }
9781 _ACEOF
9782          rm -f conftest.$ac_objext
9783 if { (eval echo "$as_me:9783: \"$ac_compile\"") >&5
9784   (eval $ac_compile) 2>&5
9785   ac_status=$?
9786   echo "$as_me:9786: \$? = $ac_status" >&5
9787   (exit $ac_status); } &&
9788          { ac_try='test -s conftest.$ac_objext'
9789   { (eval echo "$as_me:9789: \"$ac_try\"") >&5
9790   (eval $ac_try) 2>&5
9791   ac_status=$?
9792   echo "$as_me:9792: \$? = $ac_status" >&5
9793   (exit $ac_status); }; }; then
9794   break
9795 else
9796   echo "$as_me: failed program was:" >&5
9797 cat conftest.$ac_ext >&5
9798 fi
9799 rm -f conftest.$ac_objext
9800          CC="$CC -n32"
9801          rm -f conftest.$ac_objext
9802 if { (eval echo "$as_me:9802: \"$ac_compile\"") >&5
9803   (eval $ac_compile) 2>&5
9804   ac_status=$?
9805   echo "$as_me:9805: \$? = $ac_status" >&5
9806   (exit $ac_status); } &&
9807          { ac_try='test -s conftest.$ac_objext'
9808   { (eval echo "$as_me:9808: \"$ac_try\"") >&5
9809   (eval $ac_try) 2>&5
9810   ac_status=$?
9811   echo "$as_me:9811: \$? = $ac_status" >&5
9812   (exit $ac_status); }; }; then
9813   ac_cv_sys_largefile_CC=' -n32'; break
9814 else
9815   echo "$as_me: failed program was:" >&5
9816 cat conftest.$ac_ext >&5
9817 fi
9818 rm -f conftest.$ac_objext
9819          break
9820        done
9821        CC=$ac_save_CC
9822        rm -f conftest.$ac_ext
9823     fi
9824 fi
9825 echo "$as_me:9825: result: $ac_cv_sys_largefile_CC" >&5
9826 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9827   if test "$ac_cv_sys_largefile_CC" != no; then
9828     CC=$CC$ac_cv_sys_largefile_CC
9829   fi
9830
9831   echo "$as_me:9831: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9832 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9833 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9834   echo $ECHO_N "(cached) $ECHO_C" >&6
9835 else
9836   while :; do
9837   ac_cv_sys_file_offset_bits=no
9838   cat >conftest.$ac_ext <<_ACEOF
9839 #line 9839 "configure"
9840 #include "confdefs.h"
9841 #include <sys/types.h>
9842  /* Check that off_t can represent 2**63 - 1 correctly.
9843     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9844     since some C++ compilers masquerading as C compilers
9845     incorrectly reject 9223372036854775807.  */
9846 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9847   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9848                        && LARGE_OFF_T % 2147483647 == 1)
9849                       ? 1 : -1];
9850 int
9851 main ()
9852 {
9853
9854   ;
9855   return 0;
9856 }
9857 _ACEOF
9858 rm -f conftest.$ac_objext
9859 if { (eval echo "$as_me:9859: \"$ac_compile\"") >&5
9860   (eval $ac_compile) 2>&5
9861   ac_status=$?
9862   echo "$as_me:9862: \$? = $ac_status" >&5
9863   (exit $ac_status); } &&
9864          { ac_try='test -s conftest.$ac_objext'
9865   { (eval echo "$as_me:9865: \"$ac_try\"") >&5
9866   (eval $ac_try) 2>&5
9867   ac_status=$?
9868   echo "$as_me:9868: \$? = $ac_status" >&5
9869   (exit $ac_status); }; }; then
9870   break
9871 else
9872   echo "$as_me: failed program was:" >&5
9873 cat conftest.$ac_ext >&5
9874 fi
9875 rm -f conftest.$ac_objext conftest.$ac_ext
9876   cat >conftest.$ac_ext <<_ACEOF
9877 #line 9877 "configure"
9878 #include "confdefs.h"
9879 #define _FILE_OFFSET_BITS 64
9880 #include <sys/types.h>
9881  /* Check that off_t can represent 2**63 - 1 correctly.
9882     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9883     since some C++ compilers masquerading as C compilers
9884     incorrectly reject 9223372036854775807.  */
9885 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9886   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9887                        && LARGE_OFF_T % 2147483647 == 1)
9888                       ? 1 : -1];
9889 int
9890 main ()
9891 {
9892
9893   ;
9894   return 0;
9895 }
9896 _ACEOF
9897 rm -f conftest.$ac_objext
9898 if { (eval echo "$as_me:9898: \"$ac_compile\"") >&5
9899   (eval $ac_compile) 2>&5
9900   ac_status=$?
9901   echo "$as_me:9901: \$? = $ac_status" >&5
9902   (exit $ac_status); } &&
9903          { ac_try='test -s conftest.$ac_objext'
9904   { (eval echo "$as_me:9904: \"$ac_try\"") >&5
9905   (eval $ac_try) 2>&5
9906   ac_status=$?
9907   echo "$as_me:9907: \$? = $ac_status" >&5
9908   (exit $ac_status); }; }; then
9909   ac_cv_sys_file_offset_bits=64; break
9910 else
9911   echo "$as_me: failed program was:" >&5
9912 cat conftest.$ac_ext >&5
9913 fi
9914 rm -f conftest.$ac_objext conftest.$ac_ext
9915   break
9916 done
9917 fi
9918 echo "$as_me:9918: result: $ac_cv_sys_file_offset_bits" >&5
9919 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9920 if test "$ac_cv_sys_file_offset_bits" != no; then
9921
9922 cat >>confdefs.h <<EOF
9923 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9924 EOF
9925
9926 fi
9927 rm -rf conftest*
9928   echo "$as_me:9928: checking for _LARGE_FILES value needed for large files" >&5
9929 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9930 if test "${ac_cv_sys_large_files+set}" = set; then
9931   echo $ECHO_N "(cached) $ECHO_C" >&6
9932 else
9933   while :; do
9934   ac_cv_sys_large_files=no
9935   cat >conftest.$ac_ext <<_ACEOF
9936 #line 9936 "configure"
9937 #include "confdefs.h"
9938 #include <sys/types.h>
9939  /* Check that off_t can represent 2**63 - 1 correctly.
9940     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9941     since some C++ compilers masquerading as C compilers
9942     incorrectly reject 9223372036854775807.  */
9943 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9944   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9945                        && LARGE_OFF_T % 2147483647 == 1)
9946                       ? 1 : -1];
9947 int
9948 main ()
9949 {
9950
9951   ;
9952   return 0;
9953 }
9954 _ACEOF
9955 rm -f conftest.$ac_objext
9956 if { (eval echo "$as_me:9956: \"$ac_compile\"") >&5
9957   (eval $ac_compile) 2>&5
9958   ac_status=$?
9959   echo "$as_me:9959: \$? = $ac_status" >&5
9960   (exit $ac_status); } &&
9961          { ac_try='test -s conftest.$ac_objext'
9962   { (eval echo "$as_me:9962: \"$ac_try\"") >&5
9963   (eval $ac_try) 2>&5
9964   ac_status=$?
9965   echo "$as_me:9965: \$? = $ac_status" >&5
9966   (exit $ac_status); }; }; then
9967   break
9968 else
9969   echo "$as_me: failed program was:" >&5
9970 cat conftest.$ac_ext >&5
9971 fi
9972 rm -f conftest.$ac_objext conftest.$ac_ext
9973   cat >conftest.$ac_ext <<_ACEOF
9974 #line 9974 "configure"
9975 #include "confdefs.h"
9976 #define _LARGE_FILES 1
9977 #include <sys/types.h>
9978  /* Check that off_t can represent 2**63 - 1 correctly.
9979     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9980     since some C++ compilers masquerading as C compilers
9981     incorrectly reject 9223372036854775807.  */
9982 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9983   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9984                        && LARGE_OFF_T % 2147483647 == 1)
9985                       ? 1 : -1];
9986 int
9987 main ()
9988 {
9989
9990   ;
9991   return 0;
9992 }
9993 _ACEOF
9994 rm -f conftest.$ac_objext
9995 if { (eval echo "$as_me:9995: \"$ac_compile\"") >&5
9996   (eval $ac_compile) 2>&5
9997   ac_status=$?
9998   echo "$as_me:9998: \$? = $ac_status" >&5
9999   (exit $ac_status); } &&
10000          { ac_try='test -s conftest.$ac_objext'
10001   { (eval echo "$as_me:10001: \"$ac_try\"") >&5
10002   (eval $ac_try) 2>&5
10003   ac_status=$?
10004   echo "$as_me:10004: \$? = $ac_status" >&5
10005   (exit $ac_status); }; }; then
10006   ac_cv_sys_large_files=1; break
10007 else
10008   echo "$as_me: failed program was:" >&5
10009 cat conftest.$ac_ext >&5
10010 fi
10011 rm -f conftest.$ac_objext conftest.$ac_ext
10012   break
10013 done
10014 fi
10015 echo "$as_me:10015: result: $ac_cv_sys_large_files" >&5
10016 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10017 if test "$ac_cv_sys_large_files" != no; then
10018
10019 cat >>confdefs.h <<EOF
10020 #define _LARGE_FILES $ac_cv_sys_large_files
10021 EOF
10022
10023 fi
10024 rm -rf conftest*
10025 fi
10026
10027     if test "$enable_largefile" != no ; then
10028         echo "$as_me:10028: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10029 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10030 if test "${ac_cv_sys_largefile_source+set}" = set; then
10031   echo $ECHO_N "(cached) $ECHO_C" >&6
10032 else
10033   while :; do
10034   ac_cv_sys_largefile_source=no
10035   cat >conftest.$ac_ext <<_ACEOF
10036 #line 10036 "configure"
10037 #include "confdefs.h"
10038 #include <stdio.h>
10039 int
10040 main ()
10041 {
10042 return !fseeko;
10043   ;
10044   return 0;
10045 }
10046 _ACEOF
10047 rm -f conftest.$ac_objext
10048 if { (eval echo "$as_me:10048: \"$ac_compile\"") >&5
10049   (eval $ac_compile) 2>&5
10050   ac_status=$?
10051   echo "$as_me:10051: \$? = $ac_status" >&5
10052   (exit $ac_status); } &&
10053          { ac_try='test -s conftest.$ac_objext'
10054   { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055   (eval $ac_try) 2>&5
10056   ac_status=$?
10057   echo "$as_me:10057: \$? = $ac_status" >&5
10058   (exit $ac_status); }; }; then
10059   break
10060 else
10061   echo "$as_me: failed program was:" >&5
10062 cat conftest.$ac_ext >&5
10063 fi
10064 rm -f conftest.$ac_objext conftest.$ac_ext
10065   cat >conftest.$ac_ext <<_ACEOF
10066 #line 10066 "configure"
10067 #include "confdefs.h"
10068 #define _LARGEFILE_SOURCE 1
10069 #include <stdio.h>
10070 int
10071 main ()
10072 {
10073 return !fseeko;
10074   ;
10075   return 0;
10076 }
10077 _ACEOF
10078 rm -f conftest.$ac_objext
10079 if { (eval echo "$as_me:10079: \"$ac_compile\"") >&5
10080   (eval $ac_compile) 2>&5
10081   ac_status=$?
10082   echo "$as_me:10082: \$? = $ac_status" >&5
10083   (exit $ac_status); } &&
10084          { ac_try='test -s conftest.$ac_objext'
10085   { (eval echo "$as_me:10085: \"$ac_try\"") >&5
10086   (eval $ac_try) 2>&5
10087   ac_status=$?
10088   echo "$as_me:10088: \$? = $ac_status" >&5
10089   (exit $ac_status); }; }; then
10090   ac_cv_sys_largefile_source=1; break
10091 else
10092   echo "$as_me: failed program was:" >&5
10093 cat conftest.$ac_ext >&5
10094 fi
10095 rm -f conftest.$ac_objext conftest.$ac_ext
10096   break
10097 done
10098 fi
10099 echo "$as_me:10099: result: $ac_cv_sys_largefile_source" >&5
10100 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10101 if test "$ac_cv_sys_largefile_source" != no; then
10102
10103 cat >>confdefs.h <<EOF
10104 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10105 EOF
10106
10107 fi
10108 rm -rf conftest*
10109
10110 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10111 # in glibc 2.1.3, but that breaks too many other things.
10112 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10113 echo "$as_me:10113: checking for fseeko" >&5
10114 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10115 if test "${ac_cv_func_fseeko+set}" = set; then
10116   echo $ECHO_N "(cached) $ECHO_C" >&6
10117 else
10118   cat >conftest.$ac_ext <<_ACEOF
10119 #line 10119 "configure"
10120 #include "confdefs.h"
10121 #include <stdio.h>
10122 int
10123 main ()
10124 {
10125 return fseeko && fseeko (stdin, 0, 0);
10126   ;
10127   return 0;
10128 }
10129 _ACEOF
10130 rm -f conftest.$ac_objext conftest$ac_exeext
10131 if { (eval echo "$as_me:10131: \"$ac_link\"") >&5
10132   (eval $ac_link) 2>&5
10133   ac_status=$?
10134   echo "$as_me:10134: \$? = $ac_status" >&5
10135   (exit $ac_status); } &&
10136          { ac_try='test -s conftest$ac_exeext'
10137   { (eval echo "$as_me:10137: \"$ac_try\"") >&5
10138   (eval $ac_try) 2>&5
10139   ac_status=$?
10140   echo "$as_me:10140: \$? = $ac_status" >&5
10141   (exit $ac_status); }; }; then
10142   ac_cv_func_fseeko=yes
10143 else
10144   echo "$as_me: failed program was:" >&5
10145 cat conftest.$ac_ext >&5
10146 ac_cv_func_fseeko=no
10147 fi
10148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10149 fi
10150 echo "$as_me:10150: result: $ac_cv_func_fseeko" >&5
10151 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10152 if test $ac_cv_func_fseeko = yes; then
10153
10154 cat >>confdefs.h <<\EOF
10155 #define HAVE_FSEEKO 1
10156 EOF
10157
10158 fi
10159
10160         # Normally we would collect these definitions in the config.h,
10161         # but (like _XOPEN_SOURCE), some environments rely on having these
10162         # defined before any of the system headers are included.  Another
10163         # case comes up with C++, e.g., on AIX the compiler compiles the
10164         # header files by themselves before looking at the body files it is
10165         # told to compile.  For ncurses, those header files do not include
10166         # the config.h
10167         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10168         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10169         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10170
10171         echo "$as_me:10171: checking whether to use struct dirent64" >&5
10172 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10173 if test "${cf_cv_struct_dirent64+set}" = set; then
10174   echo $ECHO_N "(cached) $ECHO_C" >&6
10175 else
10176
10177                 cat >conftest.$ac_ext <<_ACEOF
10178 #line 10178 "configure"
10179 #include "confdefs.h"
10180
10181 #include <sys/types.h>
10182 #include <dirent.h>
10183
10184 int
10185 main ()
10186 {
10187
10188                 /* if transitional largefile support is setup, this is true */
10189                 extern struct dirent64 * readdir(DIR *);
10190                 struct dirent64 *x = readdir((DIR *)0);
10191                 struct dirent *y = readdir((DIR *)0);
10192                 int z = x - y;
10193
10194   ;
10195   return 0;
10196 }
10197 _ACEOF
10198 rm -f conftest.$ac_objext
10199 if { (eval echo "$as_me:10199: \"$ac_compile\"") >&5
10200   (eval $ac_compile) 2>&5
10201   ac_status=$?
10202   echo "$as_me:10202: \$? = $ac_status" >&5
10203   (exit $ac_status); } &&
10204          { ac_try='test -s conftest.$ac_objext'
10205   { (eval echo "$as_me:10205: \"$ac_try\"") >&5
10206   (eval $ac_try) 2>&5
10207   ac_status=$?
10208   echo "$as_me:10208: \$? = $ac_status" >&5
10209   (exit $ac_status); }; }; then
10210   cf_cv_struct_dirent64=yes
10211 else
10212   echo "$as_me: failed program was:" >&5
10213 cat conftest.$ac_ext >&5
10214 cf_cv_struct_dirent64=no
10215 fi
10216 rm -f conftest.$ac_objext conftest.$ac_ext
10217
10218 fi
10219 echo "$as_me:10219: result: $cf_cv_struct_dirent64" >&5
10220 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10221         test "$cf_cv_struct_dirent64" = yes &&
10222 cat >>confdefs.h <<\EOF
10223 #define HAVE_STRUCT_DIRENT64 1
10224 EOF
10225
10226     fi
10227
10228 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10229 echo "$as_me:10229: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10230 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10231
10232 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10233 if test "${enable_tparm_varargs+set}" = set; then
10234   enableval="$enable_tparm_varargs"
10235   with_tparm_varargs=$enableval
10236 else
10237   with_tparm_varargs=yes
10238 fi;
10239 echo "$as_me:10239: result: $with_tparm_varargs" >&5
10240 echo "${ECHO_T}$with_tparm_varargs" >&6
10241 NCURSES_TPARM_VARARGS=0
10242 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10243
10244 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10245 if test "$with_ticlib" != no ; then
10246 echo "$as_me:10246: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10247 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10248
10249 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10250 if test "${enable_tic_depends+set}" = set; then
10251   enableval="$enable_tic_depends"
10252   with_tic_depends=$enableval
10253 else
10254   with_tic_depends=yes
10255 fi;
10256 echo "$as_me:10256: result: $with_tic_depends" >&5
10257 echo "${ECHO_T}$with_tic_depends" >&6
10258 else
10259         with_tic_depends=no
10260 fi
10261
10262 ###   use option --with-bool to override bool's type
10263 echo "$as_me:10263: checking for type of bool" >&5
10264 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10265
10266 # Check whether --with-bool or --without-bool was given.
10267 if test "${with_bool+set}" = set; then
10268   withval="$with_bool"
10269   NCURSES_BOOL="$withval"
10270 else
10271   NCURSES_BOOL=auto
10272 fi;
10273 echo "$as_me:10273: result: $NCURSES_BOOL" >&5
10274 echo "${ECHO_T}$NCURSES_BOOL" >&6
10275
10276 echo "$as_me:10276: checking for alternate terminal capabilities file" >&5
10277 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10278
10279 # Check whether --with-caps or --without-caps was given.
10280 if test "${with_caps+set}" = set; then
10281   withval="$with_caps"
10282   TERMINFO_CAPS=Caps.$withval
10283 else
10284   TERMINFO_CAPS=Caps
10285 fi;
10286 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10287 echo "$as_me:10287: result: $TERMINFO_CAPS" >&5
10288 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10289
10290 ###   use option --with-chtype to override chtype's type
10291 echo "$as_me:10291: checking for type of chtype" >&5
10292 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10293
10294 # Check whether --with-chtype or --without-chtype was given.
10295 if test "${with_chtype+set}" = set; then
10296   withval="$with_chtype"
10297   NCURSES_CHTYPE="$withval"
10298 else
10299   NCURSES_CHTYPE=auto
10300 fi;
10301 echo "$as_me:10301: result: $NCURSES_CHTYPE" >&5
10302 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10303
10304 ###   use option --with-ospeed to override ospeed's type
10305 echo "$as_me:10305: checking for type of ospeed" >&5
10306 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10307
10308 # Check whether --with-ospeed or --without-ospeed was given.
10309 if test "${with_ospeed+set}" = set; then
10310   withval="$with_ospeed"
10311   NCURSES_OSPEED="$withval"
10312 else
10313   NCURSES_OSPEED=short
10314 fi;
10315 echo "$as_me:10315: result: $NCURSES_OSPEED" >&5
10316 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10317
10318 ###   use option --with-mmask-t to override mmask_t's type
10319 echo "$as_me:10319: checking for type of mmask_t" >&5
10320 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10321
10322 # Check whether --with-mmask-t or --without-mmask-t was given.
10323 if test "${with_mmask_t+set}" = set; then
10324   withval="$with_mmask_t"
10325   NCURSES_MMASK_T="$withval"
10326 else
10327   NCURSES_MMASK_T=auto
10328 fi;
10329 echo "$as_me:10329: result: $NCURSES_MMASK_T" >&5
10330 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10331
10332 ###   use option --with-ccharw-max to override CCHARW_MAX size
10333 echo "$as_me:10333: checking for size CCHARW_MAX" >&5
10334 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10335
10336 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10337 if test "${with_ccharw_max+set}" = set; then
10338   withval="$with_ccharw_max"
10339   NCURSES_CCHARW_MAX="$withval"
10340 else
10341   NCURSES_CCHARW_MAX=5
10342 fi;
10343 echo "$as_me:10343: result: $NCURSES_CCHARW_MAX" >&5
10344 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10345
10346 ###   use option --with-tparm-arg to override tparm's argument type
10347 echo "$as_me:10347: checking for type of tparm args" >&5
10348 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10349
10350 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10351 if test "${with_tparm_arg+set}" = set; then
10352   withval="$with_tparm_arg"
10353   NCURSES_TPARM_ARG="$withval"
10354 else
10355   NCURSES_TPARM_ARG=long
10356 fi;
10357 echo "$as_me:10357: result: $NCURSES_TPARM_ARG" >&5
10358 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10359
10360 ### Enable compiling-in rcs id's
10361 echo "$as_me:10361: checking if RCS identifiers should be compiled-in" >&5
10362 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10363
10364 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10365 if test "${with_rcs_ids+set}" = set; then
10366   withval="$with_rcs_ids"
10367   with_rcs_ids=$withval
10368 else
10369   with_rcs_ids=no
10370 fi;
10371 echo "$as_me:10371: result: $with_rcs_ids" >&5
10372 echo "${ECHO_T}$with_rcs_ids" >&6
10373 test "x$with_rcs_ids" = xyes &&
10374 cat >>confdefs.h <<\EOF
10375 #define USE_RCS_IDS 1
10376 EOF
10377
10378 ###############################################################################
10379
10380 echo "$as_me:10380: checking format of man-pages" >&5
10381 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10382
10383 # Check whether --with-manpage-format or --without-manpage-format was given.
10384 if test "${with_manpage_format+set}" = set; then
10385   withval="$with_manpage_format"
10386   MANPAGE_FORMAT=$withval
10387 else
10388   MANPAGE_FORMAT=unknown
10389 fi;
10390
10391 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10392 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10393
10394 cf_unknown=
10395
10396 case $MANPAGE_FORMAT in
10397 unknown)
10398   if test -z "$MANPATH" ; then
10399     MANPATH="/usr/man:/usr/share/man"
10400   fi
10401
10402   # look for the 'date' man-page (it's most likely to be installed!)
10403   MANPAGE_FORMAT=
10404   cf_preform=no
10405   cf_catonly=yes
10406   cf_example=date
10407
10408   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10409   for cf_dir in $MANPATH; do
10410     test -z "$cf_dir" && cf_dir=/usr/man
10411     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
10412     do
10413       cf_test=`echo $cf_name | sed -e 's/*//'`
10414       if test "x$cf_test" = "x$cf_name" ; then
10415
10416         case "$cf_name" in
10417         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10418         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10419         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10420         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10421         esac
10422
10423         case "$cf_name" in
10424         $cf_dir/man*)
10425           cf_catonly=no
10426           ;;
10427         $cf_dir/cat*)
10428           cf_preform=yes
10429           ;;
10430         esac
10431         break
10432       fi
10433
10434       # if we found a match in either man* or cat*, stop looking
10435       if test -n "$MANPAGE_FORMAT" ; then
10436         cf_found=no
10437         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10438         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10439         case "$cf_name" in
10440         $cf_dir/cat*)
10441           cf_found=yes
10442           ;;
10443         esac
10444         test $cf_found=yes && break
10445       fi
10446     done
10447     # only check the first directory in $MANPATH where we find manpages
10448     if test -n "$MANPAGE_FORMAT" ; then
10449        break
10450     fi
10451   done
10452   # if we did not find the example, just assume it is normal
10453   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10454   IFS="$ac_save_ifs"
10455   ;;
10456 *)
10457   for cf_option in $MANPAGE_FORMAT; do
10458      case $cf_option in #(vi
10459      gzip|compress|BSDI|normal|formatted|catonly)
10460        ;;
10461      *)
10462        cf_unknown="$cf_unknown $cf_option"
10463        ;;
10464      esac
10465   done
10466   ;;
10467 esac
10468
10469 echo "$as_me:10469: result: $MANPAGE_FORMAT" >&5
10470 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10471 if test -n "$cf_unknown" ; then
10472   { echo "$as_me:10472: WARNING: Unexpected manpage-format $cf_unknown" >&5
10473 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10474 fi
10475
10476 echo "$as_me:10476: checking for manpage renaming" >&5
10477 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10478
10479 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10480 if test "${with_manpage_renames+set}" = set; then
10481   withval="$with_manpage_renames"
10482   MANPAGE_RENAMES=$withval
10483 else
10484   MANPAGE_RENAMES=yes
10485 fi;
10486
10487 case ".$MANPAGE_RENAMES" in #(vi
10488 .no) #(vi
10489   ;;
10490 .|.yes)
10491   # Debian 'man' program?
10492   if test -f /etc/debian_version ; then
10493     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10494   else
10495     MANPAGE_RENAMES=no
10496   fi
10497   ;;
10498 esac
10499
10500 if test "$MANPAGE_RENAMES" != no ; then
10501   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10502     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10503   elif test ! -f $MANPAGE_RENAMES ; then
10504     { { echo "$as_me:10504: error: not a filename: $MANPAGE_RENAMES" >&5
10505 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10506    { (exit 1); exit 1; }; }
10507   fi
10508
10509   test ! -d man && mkdir man
10510
10511   # Construct a sed-script to perform renaming within man-pages
10512   if test -n "$MANPAGE_RENAMES" ; then
10513     test ! -d man && mkdir man
10514     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10515   fi
10516 fi
10517
10518 echo "$as_me:10518: result: $MANPAGE_RENAMES" >&5
10519 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10520
10521 echo "$as_me:10521: checking if manpage aliases will be installed" >&5
10522 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10523
10524 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10525 if test "${with_manpage_aliases+set}" = set; then
10526   withval="$with_manpage_aliases"
10527   MANPAGE_ALIASES=$withval
10528 else
10529   MANPAGE_ALIASES=yes
10530 fi;
10531
10532 echo "$as_me:10532: result: $MANPAGE_ALIASES" >&5
10533 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10534
10535 case "x$LN_S" in #(vi
10536 xln*) #(vi
10537         cf_use_symlinks=yes
10538         ;;
10539 *)
10540         cf_use_symlinks=no
10541         ;;
10542 esac
10543
10544 MANPAGE_SYMLINKS=no
10545 if test "$MANPAGE_ALIASES" = yes ; then
10546 echo "$as_me:10546: checking if manpage symlinks should be used" >&5
10547 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10548
10549 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10550 if test "${with_manpage_symlinks+set}" = set; then
10551   withval="$with_manpage_symlinks"
10552   MANPAGE_SYMLINKS=$withval
10553 else
10554   MANPAGE_SYMLINKS=$cf_use_symlinks
10555 fi;
10556
10557 if test "$$cf_use_symlinks" = no; then
10558 if test "$MANPAGE_SYMLINKS" = yes ; then
10559         { echo "$as_me:10559: WARNING: cannot make symlinks" >&5
10560 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10561         MANPAGE_SYMLINKS=no
10562 fi
10563 fi
10564
10565 echo "$as_me:10565: result: $MANPAGE_SYMLINKS" >&5
10566 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10567 fi
10568
10569 echo "$as_me:10569: checking for manpage tbl" >&5
10570 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10571
10572 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10573 if test "${with_manpage_tbl+set}" = set; then
10574   withval="$with_manpage_tbl"
10575   MANPAGE_TBL=$withval
10576 else
10577   MANPAGE_TBL=no
10578 fi;
10579
10580 echo "$as_me:10580: result: $MANPAGE_TBL" >&5
10581 echo "${ECHO_T}$MANPAGE_TBL" >&6
10582
10583   if test "$prefix" = "NONE" ; then
10584      cf_prefix="$ac_default_prefix"
10585   else
10586      cf_prefix="$prefix"
10587   fi
10588
10589   case "$MANPAGE_FORMAT" in # (vi
10590   *catonly*) # (vi
10591     cf_format=yes
10592     cf_inboth=no
10593     ;;
10594   *formatted*) # (vi
10595     cf_format=yes
10596     cf_inboth=yes
10597     ;;
10598   *)
10599     cf_format=no
10600     cf_inboth=no
10601     ;;
10602   esac
10603
10604 test ! -d man && mkdir man
10605
10606 cf_so_strip=
10607 cf_compress=
10608 case "$MANPAGE_FORMAT" in #(vi
10609 *compress*) #(vi
10610         cf_so_strip="Z"
10611         cf_compress=compress
10612   ;;
10613 *gzip*)
10614         cf_so_strip="gz"
10615         cf_compress=gzip
10616   ;;
10617 esac
10618
10619 cf_edit_man=./edit_man.sh
10620 cf_man_alias=`pwd`/man_alias.sed
10621
10622 cat >$cf_edit_man <<CF_EOF
10623 #! /bin/sh
10624 # this script is generated by the configure-script CF_MAN_PAGES macro.
10625
10626 prefix="$cf_prefix"
10627 datarootdir="$datarootdir"
10628 datadir="$datadir"
10629
10630 NCURSES_MAJOR="$NCURSES_MAJOR"
10631 NCURSES_MINOR="$NCURSES_MINOR"
10632 NCURSES_PATCH="$NCURSES_PATCH"
10633
10634 NCURSES_OSPEED="$NCURSES_OSPEED"
10635 TERMINFO="$TERMINFO"
10636
10637 INSTALL="$INSTALL"
10638 INSTALL_DATA="$INSTALL_DATA"
10639
10640 transform="$program_transform_name"
10641
10642 TMP=\${TMPDIR:=/tmp}/man\$\$
10643 trap "rm -f \$TMP" 0 1 2 5 15
10644
10645 form=\$1
10646 shift || exit 1
10647
10648 verb=\$1
10649 shift || exit 1
10650
10651 mandir=\$1
10652 shift || exit 1
10653
10654 srcdir=\$1
10655 top_srcdir=\$srcdir/..
10656 shift || exit 1
10657
10658 if test "\$form" = normal ; then
10659         if test "$cf_format" = yes ; then
10660         if test "$cf_inboth" = no ; then
10661                 sh \$0 format \$verb \$mandir \$srcdir \$*
10662                 exit $?
10663         fi
10664         fi
10665         cf_subdir=\$mandir/man
10666         cf_tables=$MANPAGE_TBL
10667 else
10668         cf_subdir=\$mandir/cat
10669         cf_tables=yes
10670 fi
10671
10672 # process the list of source-files
10673 for i in \$* ; do
10674 case \$i in #(vi
10675 *.orig|*.rej) ;; #(vi
10676 *.[0-9]*)
10677         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10678         if test \$verb = installing ; then
10679         if test ! -d \$cf_subdir\${section} ; then
10680                 mkdir -p \$cf_subdir\$section
10681         fi
10682         fi
10683
10684         # replace variables in man page
10685         if test ! -f $cf_man_alias ; then
10686 cat >>$cf_man_alias <<-CF_EOF2
10687                 s,@DATADIR@,\$datadir,g
10688                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10689                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10690                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10691                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10692                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10693                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10694 CF_EOF
10695
10696         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10697         do
10698                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10699                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10700 cat >>$cf_edit_man <<-CF_EOF
10701                 s,@$cf_NAME@,$cf_name,g
10702 CF_EOF
10703         done
10704
10705 cat >>$cf_edit_man <<CF_EOF
10706 CF_EOF2
10707                 echo "...made $cf_man_alias"
10708         fi
10709
10710         aliases=
10711         cf_source=\`basename \$i\`
10712         inalias=\$cf_source
10713         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10714         if test ! -f \$inalias ; then
10715                 echo .. skipped \$cf_source
10716                 continue
10717         fi
10718 CF_EOF
10719
10720 if test "$MANPAGE_ALIASES" != no ; then
10721 cat >>$cf_edit_man <<CF_EOF
10722         nCurses=ignore.3x
10723         test $with_curses_h = yes && nCurses=ncurses.3x
10724         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10725 CF_EOF
10726 fi
10727
10728 if test "$MANPAGE_RENAMES" = no ; then
10729 cat >>$cf_edit_man <<CF_EOF
10730         # perform program transformations for section 1 man pages
10731         if test \$section = 1 ; then
10732                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10733         else
10734                 cf_target=\$cf_subdir\${section}/\$cf_source
10735         fi
10736 CF_EOF
10737 else
10738 cat >>$cf_edit_man <<CF_EOF
10739         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10740         if test -z "\$cf_target" ; then
10741                 echo '? missing rename for '\$cf_source
10742                 cf_target="\$cf_source"
10743         fi
10744         cf_target="\$cf_subdir\${section}/\${cf_target}"
10745
10746 CF_EOF
10747 fi
10748
10749 cat >>$cf_edit_man <<CF_EOF
10750         sed     -f $cf_man_alias \\
10751 CF_EOF
10752
10753 if test -f $MANPAGE_RENAMES ; then
10754 cat >>$cf_edit_man <<CF_EOF
10755                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10756 CF_EOF
10757 else
10758 cat >>$cf_edit_man <<CF_EOF
10759                 < \$i >\$TMP
10760 CF_EOF
10761 fi
10762
10763 cat >>$cf_edit_man <<CF_EOF
10764 if test \$cf_tables = yes ; then
10765         tbl \$TMP >\$TMP.out
10766         mv \$TMP.out \$TMP
10767 fi
10768 CF_EOF
10769
10770 if test $with_overwrite != yes ; then
10771 cat >>$cf_edit_man <<CF_EOF
10772         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10773         mv \$TMP.out \$TMP
10774 CF_EOF
10775 fi
10776
10777 if test $with_curses_h != yes ; then
10778 cat >>$cf_edit_man <<CF_EOF
10779         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10780         mv \$TMP.out \$TMP
10781 CF_EOF
10782 fi
10783
10784 cat >>$cf_edit_man <<CF_EOF
10785         if test \$form = format ; then
10786                 nroff -man \$TMP >\$TMP.out
10787                 mv \$TMP.out \$TMP
10788         fi
10789 CF_EOF
10790
10791 if test -n "$cf_compress" ; then
10792 cat >>$cf_edit_man <<CF_EOF
10793         if test \$verb = installing ; then
10794         if ( $cf_compress -f \$TMP )
10795         then
10796                 mv \$TMP.$cf_so_strip \$TMP
10797         fi
10798         fi
10799         cf_target="\$cf_target.$cf_so_strip"
10800 CF_EOF
10801 fi
10802
10803 case "$MANPAGE_FORMAT" in #(vi
10804 *BSDI*)
10805 cat >>$cf_edit_man <<CF_EOF
10806         if test \$form = format ; then
10807                 # BSDI installs only .0 suffixes in the cat directories
10808                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10809         fi
10810 CF_EOF
10811   ;;
10812 esac
10813
10814 cat >>$cf_edit_man <<CF_EOF
10815         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10816         if test \$verb = installing ; then
10817                 echo \$verb \$cf_target
10818                 \$INSTALL_DATA \$TMP \$cf_target
10819                 test -d \$cf_subdir\${section} &&
10820                 test -n "\$aliases" && (
10821                         cd \$cf_subdir\${section} && (
10822                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10823                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10824                                 cf_target=\`basename \$cf_target\`
10825                                 for cf_alias in \$aliases
10826                                 do
10827                                         if test \$section = 1 ; then
10828                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10829                                         fi
10830
10831                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10832                                                 if test -f \$cf_alias\${suffix} ; then
10833                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10834                                                         then
10835                                                                 continue
10836                                                         fi
10837                                                 fi
10838                                                 echo .. \$verb alias \$cf_alias\${suffix}
10839 CF_EOF
10840 case "x$LN_S" in #(vi
10841 *-f) #(vi
10842 cat >>$cf_edit_man <<CF_EOF
10843                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10844 CF_EOF
10845         ;;
10846 *)
10847 cat >>$cf_edit_man <<CF_EOF
10848                                                 rm -f \$cf_alias\${suffix}
10849                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10850 CF_EOF
10851         ;;
10852 esac
10853 cat >>$cf_edit_man <<CF_EOF
10854                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10855                                                 echo ".so \$cf_source" >\$TMP
10856 CF_EOF
10857 if test -n "$cf_compress" ; then
10858 cat >>$cf_edit_man <<CF_EOF
10859                                                 if test -n "$cf_so_strip" ; then
10860                                                         $cf_compress -f \$TMP
10861                                                         mv \$TMP.$cf_so_strip \$TMP
10862                                                 fi
10863 CF_EOF
10864 fi
10865 cat >>$cf_edit_man <<CF_EOF
10866                                                 echo .. \$verb alias \$cf_alias\${suffix}
10867                                                 rm -f \$cf_alias\${suffix}
10868                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10869                                         fi
10870                                 done
10871                         )
10872                 )
10873         elif test \$verb = removing ; then
10874                 test -f \$cf_target && (
10875                         echo \$verb \$cf_target
10876                         rm -f \$cf_target
10877                 )
10878                 test -d \$cf_subdir\${section} &&
10879                 test -n "\$aliases" && (
10880                         cd \$cf_subdir\${section} && (
10881                                 for cf_alias in \$aliases
10882                                 do
10883                                         if test \$section = 1 ; then
10884                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10885                                         fi
10886
10887                                         echo .. \$verb alias \$cf_alias\${suffix}
10888                                         rm -f \$cf_alias\${suffix}
10889                                 done
10890                         )
10891                 )
10892         else
10893 #               echo ".hy 0"
10894                 cat \$TMP
10895         fi
10896         ;;
10897 esac
10898 done
10899
10900 if test $cf_inboth = yes ; then
10901 if test \$form != format ; then
10902         sh \$0 format \$verb \$mandir \$srcdir \$*
10903 fi
10904 fi
10905
10906 exit 0
10907 CF_EOF
10908 chmod 755 $cf_edit_man
10909
10910 ###############################################################################
10911
10912 ### Note that some functions (such as const) are normally disabled anyway.
10913 echo "$as_me:10913: checking if you want to build with function extensions" >&5
10914 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10915
10916 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10917 if test "${enable_ext_funcs+set}" = set; then
10918   enableval="$enable_ext_funcs"
10919   with_ext_funcs=$enableval
10920 else
10921   with_ext_funcs=yes
10922 fi;
10923 echo "$as_me:10923: result: $with_ext_funcs" >&5
10924 echo "${ECHO_T}$with_ext_funcs" >&6
10925 if test "x$with_ext_funcs" = xyes ; then
10926         NCURSES_EXT_FUNCS=1
10927
10928 cat >>confdefs.h <<\EOF
10929 #define HAVE_ASSUME_DEFAULT_COLORS 1
10930 EOF
10931
10932 cat >>confdefs.h <<\EOF
10933 #define HAVE_CURSES_VERSION 1
10934 EOF
10935
10936 cat >>confdefs.h <<\EOF
10937 #define HAVE_HAS_KEY 1
10938 EOF
10939
10940 cat >>confdefs.h <<\EOF
10941 #define HAVE_RESIZETERM 1
10942 EOF
10943
10944 cat >>confdefs.h <<\EOF
10945 #define HAVE_RESIZE_TERM 1
10946 EOF
10947
10948 cat >>confdefs.h <<\EOF
10949 #define HAVE_TERM_ENTRY_H 1
10950 EOF
10951
10952 cat >>confdefs.h <<\EOF
10953 #define HAVE_USE_DEFAULT_COLORS 1
10954 EOF
10955
10956 cat >>confdefs.h <<\EOF
10957 #define HAVE_USE_SCREEN 1
10958 EOF
10959
10960 cat >>confdefs.h <<\EOF
10961 #define HAVE_USE_WINDOW 1
10962 EOF
10963
10964 cat >>confdefs.h <<\EOF
10965 #define HAVE_WRESIZE 1
10966 EOF
10967
10968 cat >>confdefs.h <<\EOF
10969 #define NCURSES_EXT_FUNCS 1
10970 EOF
10971
10972         GENERATED_EXT_FUNCS=generated
10973 else
10974         NCURSES_EXT_FUNCS=0
10975         GENERATED_EXT_FUNCS=
10976 fi
10977
10978 echo "$as_me:10978: checking if you want to build with experimental SCREEN extensions" >&5
10979 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10980
10981 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10982 if test "${enable_sp_funcs+set}" = set; then
10983   enableval="$enable_sp_funcs"
10984   with_sp_funcs=$enableval
10985 else
10986   with_sp_funcs=no
10987 fi;
10988 echo "$as_me:10988: result: $with_sp_funcs" >&5
10989 echo "${ECHO_T}$with_sp_funcs" >&6
10990 if test "x$with_sp_funcs" = xyes ; then
10991         NCURSES_SP_FUNCS=1
10992
10993 cat >>confdefs.h <<\EOF
10994 #define NCURSES_SP_FUNCS 1
10995 EOF
10996
10997         GENERATED_SP_FUNCS=generated
10998 else
10999         NCURSES_SP_FUNCS=0
11000         GENERATED_SP_FUNCS=
11001 fi
11002
11003 echo "$as_me:11003: checking if you want to build with experimental terminal-driver" >&5
11004 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11005
11006 # Check whether --enable-term-driver or --disable-term-driver was given.
11007 if test "${enable_term_driver+set}" = set; then
11008   enableval="$enable_term_driver"
11009   with_term_driver=$enableval
11010 else
11011   with_term_driver=no
11012 fi;
11013 echo "$as_me:11013: result: $with_term_driver" >&5
11014 echo "${ECHO_T}$with_term_driver" >&6
11015 if test "x$with_term_driver" = xyes ; then
11016
11017 cat >>confdefs.h <<\EOF
11018 #define USE_TERM_DRIVER 1
11019 EOF
11020
11021         if test "x$with_sp_funcs" != xyes ; then
11022                 { { echo "$as_me:11022: error: The term-driver option relies upon sp-funcs" >&5
11023 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11024    { (exit 1); exit 1; }; }
11025         fi
11026 fi
11027
11028 ###   use option --enable-const to turn on use of const beyond that in XSI.
11029 echo "$as_me:11029: checking for extended use of const keyword" >&5
11030 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11031
11032 # Check whether --enable-const or --disable-const was given.
11033 if test "${enable_const+set}" = set; then
11034   enableval="$enable_const"
11035   with_ext_const=$enableval
11036 else
11037   with_ext_const=no
11038 fi;
11039 echo "$as_me:11039: result: $with_ext_const" >&5
11040 echo "${ECHO_T}$with_ext_const" >&6
11041 NCURSES_CONST='/*nothing*/'
11042 if test "x$with_ext_const" = xyes ; then
11043         NCURSES_CONST=const
11044 fi
11045
11046 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11047 echo "$as_me:11047: checking if you want to use extended colors" >&5
11048 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11049
11050 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11051 if test "${enable_ext_colors+set}" = set; then
11052   enableval="$enable_ext_colors"
11053   with_ext_colors=$enableval
11054 else
11055   with_ext_colors=no
11056 fi;
11057 echo "$as_me:11057: result: $with_ext_colors" >&5
11058 echo "${ECHO_T}$with_ext_colors" >&6
11059 NCURSES_EXT_COLORS=0
11060 if test "x$with_ext_colors" = xyes ; then
11061         if test "x$with_widec" != xyes ; then
11062                 { { echo "$as_me:11062: error: This option applies only to wide-character library" >&5
11063 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11064    { (exit 1); exit 1; }; }
11065         else
11066                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11067
11068 if test "${with_abi_version+set}" != set; then
11069         case $cf_cv_rel_version in
11070         5.*)
11071                 cf_cv_rel_version=6.0
11072                 cf_cv_abi_version=6
11073                 { echo "$as_me:11073: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11074 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11075                 ;;
11076         esac
11077 fi
11078
11079         fi
11080         NCURSES_EXT_COLORS=1
11081
11082 cat >>confdefs.h <<\EOF
11083 #define NCURSES_EXT_COLORS 1
11084 EOF
11085
11086 fi
11087
11088 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11089 echo "$as_me:11089: checking if you want to use extended mouse encoding" >&5
11090 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11091
11092 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11093 if test "${enable_ext_mouse+set}" = set; then
11094   enableval="$enable_ext_mouse"
11095   with_ext_mouse=$enableval
11096 else
11097   with_ext_mouse=no
11098 fi;
11099 echo "$as_me:11099: result: $with_ext_mouse" >&5
11100 echo "${ECHO_T}$with_ext_mouse" >&6
11101 NCURSES_MOUSE_VERSION=1
11102 if test "x$with_ext_mouse" = xyes ; then
11103         NCURSES_MOUSE_VERSION=2
11104
11105 if test "${with_abi_version+set}" != set; then
11106         case $cf_cv_rel_version in
11107         5.*)
11108                 cf_cv_rel_version=6.0
11109                 cf_cv_abi_version=6
11110                 { echo "$as_me:11110: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11111 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11112                 ;;
11113         esac
11114 fi
11115
11116 fi
11117
11118 echo "$as_me:11118: checking if you want \$NCURSES_NO_PADDING code" >&5
11119 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11120
11121 # Check whether --enable-no-padding or --disable-no-padding was given.
11122 if test "${enable_no_padding+set}" = set; then
11123   enableval="$enable_no_padding"
11124   with_no_padding=$enableval
11125 else
11126   with_no_padding=$with_ext_funcs
11127 fi;
11128 echo "$as_me:11128: result: $with_no_padding" >&5
11129 echo "${ECHO_T}$with_no_padding" >&6
11130 test "x$with_no_padding" = xyes &&
11131 cat >>confdefs.h <<\EOF
11132 #define NCURSES_NO_PADDING 1
11133 EOF
11134
11135 echo "$as_me:11135: checking for ANSI C header files" >&5
11136 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11137 if test "${ac_cv_header_stdc+set}" = set; then
11138   echo $ECHO_N "(cached) $ECHO_C" >&6
11139 else
11140   cat >conftest.$ac_ext <<_ACEOF
11141 #line 11141 "configure"
11142 #include "confdefs.h"
11143 #include <stdlib.h>
11144 #include <stdarg.h>
11145 #include <string.h>
11146 #include <float.h>
11147
11148 _ACEOF
11149 if { (eval echo "$as_me:11149: \"$ac_cpp conftest.$ac_ext\"") >&5
11150   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11151   ac_status=$?
11152   egrep -v '^ *\+' conftest.er1 >conftest.err
11153   rm -f conftest.er1
11154   cat conftest.err >&5
11155   echo "$as_me:11155: \$? = $ac_status" >&5
11156   (exit $ac_status); } >/dev/null; then
11157   if test -s conftest.err; then
11158     ac_cpp_err=$ac_c_preproc_warn_flag
11159   else
11160     ac_cpp_err=
11161   fi
11162 else
11163   ac_cpp_err=yes
11164 fi
11165 if test -z "$ac_cpp_err"; then
11166   ac_cv_header_stdc=yes
11167 else
11168   echo "$as_me: failed program was:" >&5
11169   cat conftest.$ac_ext >&5
11170   ac_cv_header_stdc=no
11171 fi
11172 rm -f conftest.err conftest.$ac_ext
11173
11174 if test $ac_cv_header_stdc = yes; then
11175   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11176   cat >conftest.$ac_ext <<_ACEOF
11177 #line 11177 "configure"
11178 #include "confdefs.h"
11179 #include <string.h>
11180
11181 _ACEOF
11182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11183   egrep "memchr" >/dev/null 2>&1; then
11184   :
11185 else
11186   ac_cv_header_stdc=no
11187 fi
11188 rm -rf conftest*
11189
11190 fi
11191
11192 if test $ac_cv_header_stdc = yes; then
11193   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11194   cat >conftest.$ac_ext <<_ACEOF
11195 #line 11195 "configure"
11196 #include "confdefs.h"
11197 #include <stdlib.h>
11198
11199 _ACEOF
11200 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11201   egrep "free" >/dev/null 2>&1; then
11202   :
11203 else
11204   ac_cv_header_stdc=no
11205 fi
11206 rm -rf conftest*
11207
11208 fi
11209
11210 if test $ac_cv_header_stdc = yes; then
11211   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11212   if test "$cross_compiling" = yes; then
11213   :
11214 else
11215   cat >conftest.$ac_ext <<_ACEOF
11216 #line 11216 "configure"
11217 #include "confdefs.h"
11218 #include <ctype.h>
11219 #if ((' ' & 0x0FF) == 0x020)
11220 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11221 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11222 #else
11223 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11224                      || ('j' <= (c) && (c) <= 'r') \
11225                      || ('s' <= (c) && (c) <= 'z'))
11226 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11227 #endif
11228
11229 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11230 int
11231 main ()
11232 {
11233   int i;
11234   for (i = 0; i < 256; i++)
11235     if (XOR (islower (i), ISLOWER (i))
11236         || toupper (i) != TOUPPER (i))
11237       $ac_main_return(2);
11238   $ac_main_return (0);
11239 }
11240 _ACEOF
11241 rm -f conftest$ac_exeext
11242 if { (eval echo "$as_me:11242: \"$ac_link\"") >&5
11243   (eval $ac_link) 2>&5
11244   ac_status=$?
11245   echo "$as_me:11245: \$? = $ac_status" >&5
11246   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11247   { (eval echo "$as_me:11247: \"$ac_try\"") >&5
11248   (eval $ac_try) 2>&5
11249   ac_status=$?
11250   echo "$as_me:11250: \$? = $ac_status" >&5
11251   (exit $ac_status); }; }; then
11252   :
11253 else
11254   echo "$as_me: program exited with status $ac_status" >&5
11255 echo "$as_me: failed program was:" >&5
11256 cat conftest.$ac_ext >&5
11257 ac_cv_header_stdc=no
11258 fi
11259 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11260 fi
11261 fi
11262 fi
11263 echo "$as_me:11263: result: $ac_cv_header_stdc" >&5
11264 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11265 if test $ac_cv_header_stdc = yes; then
11266
11267 cat >>confdefs.h <<\EOF
11268 #define STDC_HEADERS 1
11269 EOF
11270
11271 fi
11272
11273 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11274
11275 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11276                   inttypes.h stdint.h unistd.h
11277 do
11278 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11279 echo "$as_me:11279: checking for $ac_header" >&5
11280 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11281 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11282   echo $ECHO_N "(cached) $ECHO_C" >&6
11283 else
11284   cat >conftest.$ac_ext <<_ACEOF
11285 #line 11285 "configure"
11286 #include "confdefs.h"
11287 $ac_includes_default
11288 #include <$ac_header>
11289 _ACEOF
11290 rm -f conftest.$ac_objext
11291 if { (eval echo "$as_me:11291: \"$ac_compile\"") >&5
11292   (eval $ac_compile) 2>&5
11293   ac_status=$?
11294   echo "$as_me:11294: \$? = $ac_status" >&5
11295   (exit $ac_status); } &&
11296          { ac_try='test -s conftest.$ac_objext'
11297   { (eval echo "$as_me:11297: \"$ac_try\"") >&5
11298   (eval $ac_try) 2>&5
11299   ac_status=$?
11300   echo "$as_me:11300: \$? = $ac_status" >&5
11301   (exit $ac_status); }; }; then
11302   eval "$as_ac_Header=yes"
11303 else
11304   echo "$as_me: failed program was:" >&5
11305 cat conftest.$ac_ext >&5
11306 eval "$as_ac_Header=no"
11307 fi
11308 rm -f conftest.$ac_objext conftest.$ac_ext
11309 fi
11310 echo "$as_me:11310: result: `eval echo '${'$as_ac_Header'}'`" >&5
11311 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11312 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11313   cat >>confdefs.h <<EOF
11314 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11315 EOF
11316
11317 fi
11318 done
11319
11320 echo "$as_me:11320: checking for signed char" >&5
11321 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11322 if test "${ac_cv_type_signed_char+set}" = set; then
11323   echo $ECHO_N "(cached) $ECHO_C" >&6
11324 else
11325   cat >conftest.$ac_ext <<_ACEOF
11326 #line 11326 "configure"
11327 #include "confdefs.h"
11328 $ac_includes_default
11329 int
11330 main ()
11331 {
11332 if ((signed char *) 0)
11333   return 0;
11334 if (sizeof (signed char))
11335   return 0;
11336   ;
11337   return 0;
11338 }
11339 _ACEOF
11340 rm -f conftest.$ac_objext
11341 if { (eval echo "$as_me:11341: \"$ac_compile\"") >&5
11342   (eval $ac_compile) 2>&5
11343   ac_status=$?
11344   echo "$as_me:11344: \$? = $ac_status" >&5
11345   (exit $ac_status); } &&
11346          { ac_try='test -s conftest.$ac_objext'
11347   { (eval echo "$as_me:11347: \"$ac_try\"") >&5
11348   (eval $ac_try) 2>&5
11349   ac_status=$?
11350   echo "$as_me:11350: \$? = $ac_status" >&5
11351   (exit $ac_status); }; }; then
11352   ac_cv_type_signed_char=yes
11353 else
11354   echo "$as_me: failed program was:" >&5
11355 cat conftest.$ac_ext >&5
11356 ac_cv_type_signed_char=no
11357 fi
11358 rm -f conftest.$ac_objext conftest.$ac_ext
11359 fi
11360 echo "$as_me:11360: result: $ac_cv_type_signed_char" >&5
11361 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11362
11363 echo "$as_me:11363: checking size of signed char" >&5
11364 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11365 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11366   echo $ECHO_N "(cached) $ECHO_C" >&6
11367 else
11368   if test "$ac_cv_type_signed_char" = yes; then
11369   if test "$cross_compiling" = yes; then
11370   # Depending upon the size, compute the lo and hi bounds.
11371 cat >conftest.$ac_ext <<_ACEOF
11372 #line 11372 "configure"
11373 #include "confdefs.h"
11374 $ac_includes_default
11375 int
11376 main ()
11377 {
11378 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11379   ;
11380   return 0;
11381 }
11382 _ACEOF
11383 rm -f conftest.$ac_objext
11384 if { (eval echo "$as_me:11384: \"$ac_compile\"") >&5
11385   (eval $ac_compile) 2>&5
11386   ac_status=$?
11387   echo "$as_me:11387: \$? = $ac_status" >&5
11388   (exit $ac_status); } &&
11389          { ac_try='test -s conftest.$ac_objext'
11390   { (eval echo "$as_me:11390: \"$ac_try\"") >&5
11391   (eval $ac_try) 2>&5
11392   ac_status=$?
11393   echo "$as_me:11393: \$? = $ac_status" >&5
11394   (exit $ac_status); }; }; then
11395   ac_lo=0 ac_mid=0
11396   while :; do
11397     cat >conftest.$ac_ext <<_ACEOF
11398 #line 11398 "configure"
11399 #include "confdefs.h"
11400 $ac_includes_default
11401 int
11402 main ()
11403 {
11404 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11405   ;
11406   return 0;
11407 }
11408 _ACEOF
11409 rm -f conftest.$ac_objext
11410 if { (eval echo "$as_me:11410: \"$ac_compile\"") >&5
11411   (eval $ac_compile) 2>&5
11412   ac_status=$?
11413   echo "$as_me:11413: \$? = $ac_status" >&5
11414   (exit $ac_status); } &&
11415          { ac_try='test -s conftest.$ac_objext'
11416   { (eval echo "$as_me:11416: \"$ac_try\"") >&5
11417   (eval $ac_try) 2>&5
11418   ac_status=$?
11419   echo "$as_me:11419: \$? = $ac_status" >&5
11420   (exit $ac_status); }; }; then
11421   ac_hi=$ac_mid; break
11422 else
11423   echo "$as_me: failed program was:" >&5
11424 cat conftest.$ac_ext >&5
11425 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11426 fi
11427 rm -f conftest.$ac_objext conftest.$ac_ext
11428   done
11429 else
11430   echo "$as_me: failed program was:" >&5
11431 cat conftest.$ac_ext >&5
11432 ac_hi=-1 ac_mid=-1
11433   while :; do
11434     cat >conftest.$ac_ext <<_ACEOF
11435 #line 11435 "configure"
11436 #include "confdefs.h"
11437 $ac_includes_default
11438 int
11439 main ()
11440 {
11441 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11442   ;
11443   return 0;
11444 }
11445 _ACEOF
11446 rm -f conftest.$ac_objext
11447 if { (eval echo "$as_me:11447: \"$ac_compile\"") >&5
11448   (eval $ac_compile) 2>&5
11449   ac_status=$?
11450   echo "$as_me:11450: \$? = $ac_status" >&5
11451   (exit $ac_status); } &&
11452          { ac_try='test -s conftest.$ac_objext'
11453   { (eval echo "$as_me:11453: \"$ac_try\"") >&5
11454   (eval $ac_try) 2>&5
11455   ac_status=$?
11456   echo "$as_me:11456: \$? = $ac_status" >&5
11457   (exit $ac_status); }; }; then
11458   ac_lo=$ac_mid; break
11459 else
11460   echo "$as_me: failed program was:" >&5
11461 cat conftest.$ac_ext >&5
11462 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11463 fi
11464 rm -f conftest.$ac_objext conftest.$ac_ext
11465   done
11466 fi
11467 rm -f conftest.$ac_objext conftest.$ac_ext
11468 # Binary search between lo and hi bounds.
11469 while test "x$ac_lo" != "x$ac_hi"; do
11470   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11471   cat >conftest.$ac_ext <<_ACEOF
11472 #line 11472 "configure"
11473 #include "confdefs.h"
11474 $ac_includes_default
11475 int
11476 main ()
11477 {
11478 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11479   ;
11480   return 0;
11481 }
11482 _ACEOF
11483 rm -f conftest.$ac_objext
11484 if { (eval echo "$as_me:11484: \"$ac_compile\"") >&5
11485   (eval $ac_compile) 2>&5
11486   ac_status=$?
11487   echo "$as_me:11487: \$? = $ac_status" >&5
11488   (exit $ac_status); } &&
11489          { ac_try='test -s conftest.$ac_objext'
11490   { (eval echo "$as_me:11490: \"$ac_try\"") >&5
11491   (eval $ac_try) 2>&5
11492   ac_status=$?
11493   echo "$as_me:11493: \$? = $ac_status" >&5
11494   (exit $ac_status); }; }; then
11495   ac_hi=$ac_mid
11496 else
11497   echo "$as_me: failed program was:" >&5
11498 cat conftest.$ac_ext >&5
11499 ac_lo=`expr $ac_mid + 1`
11500 fi
11501 rm -f conftest.$ac_objext conftest.$ac_ext
11502 done
11503 ac_cv_sizeof_signed_char=$ac_lo
11504 else
11505   if test "$cross_compiling" = yes; then
11506   { { echo "$as_me:11506: error: cannot run test program while cross compiling" >&5
11507 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11508    { (exit 1); exit 1; }; }
11509 else
11510   cat >conftest.$ac_ext <<_ACEOF
11511 #line 11511 "configure"
11512 #include "confdefs.h"
11513 $ac_includes_default
11514 int
11515 main ()
11516 {
11517 FILE *f = fopen ("conftest.val", "w");
11518 if (!f)
11519   $ac_main_return (1);
11520 fprintf (f, "%d", (sizeof (signed char)));
11521 fclose (f);
11522   ;
11523   return 0;
11524 }
11525 _ACEOF
11526 rm -f conftest$ac_exeext
11527 if { (eval echo "$as_me:11527: \"$ac_link\"") >&5
11528   (eval $ac_link) 2>&5
11529   ac_status=$?
11530   echo "$as_me:11530: \$? = $ac_status" >&5
11531   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11532   { (eval echo "$as_me:11532: \"$ac_try\"") >&5
11533   (eval $ac_try) 2>&5
11534   ac_status=$?
11535   echo "$as_me:11535: \$? = $ac_status" >&5
11536   (exit $ac_status); }; }; then
11537   ac_cv_sizeof_signed_char=`cat conftest.val`
11538 else
11539   echo "$as_me: program exited with status $ac_status" >&5
11540 echo "$as_me: failed program was:" >&5
11541 cat conftest.$ac_ext >&5
11542 fi
11543 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11544 fi
11545 fi
11546 rm -f conftest.val
11547 else
11548   ac_cv_sizeof_signed_char=0
11549 fi
11550 fi
11551 echo "$as_me:11551: result: $ac_cv_sizeof_signed_char" >&5
11552 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11553 cat >>confdefs.h <<EOF
11554 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11555 EOF
11556
11557 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11558         NCURSES_SBOOL="signed char"
11559 else
11560         NCURSES_SBOOL="char"
11561 fi
11562 echo "$as_me:11562: checking if you want to use signed Boolean array in term.h" >&5
11563 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11564
11565 # Check whether --enable-signed-char or --disable-signed-char was given.
11566 if test "${enable_signed_char+set}" = set; then
11567   enableval="$enable_signed_char"
11568   with_signed_char=$enableval
11569 else
11570   with_signed_char=no
11571 fi;
11572 echo "$as_me:11572: result: $with_signed_char" >&5
11573 echo "${ECHO_T}$with_signed_char" >&6
11574 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11575
11576 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11577 echo "$as_me:11577: checking if you want SIGWINCH handler" >&5
11578 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11579
11580 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11581 if test "${enable_sigwinch+set}" = set; then
11582   enableval="$enable_sigwinch"
11583   with_sigwinch=$enableval
11584 else
11585   with_sigwinch=$with_ext_funcs
11586 fi;
11587 echo "$as_me:11587: result: $with_sigwinch" >&5
11588 echo "${ECHO_T}$with_sigwinch" >&6
11589 test "x$with_sigwinch" = xyes &&
11590 cat >>confdefs.h <<\EOF
11591 #define USE_SIGWINCH 1
11592 EOF
11593
11594 ###   use option --enable-tcap-names to allow user to define new capabilities
11595 echo "$as_me:11595: checking if you want user-definable terminal capabilities like termcap" >&5
11596 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11597
11598 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11599 if test "${enable_tcap_names+set}" = set; then
11600   enableval="$enable_tcap_names"
11601   with_tcap_names=$enableval
11602 else
11603   with_tcap_names=$with_ext_funcs
11604 fi;
11605 echo "$as_me:11605: result: $with_tcap_names" >&5
11606 echo "${ECHO_T}$with_tcap_names" >&6
11607 NCURSES_XNAMES=0
11608 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11609
11610 ###############################################################################
11611 # These options are relatively safe to experiment with.
11612
11613 echo "$as_me:11613: checking if you want all development code" >&5
11614 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11615
11616 # Check whether --with-develop or --without-develop was given.
11617 if test "${with_develop+set}" = set; then
11618   withval="$with_develop"
11619   with_develop=$withval
11620 else
11621   with_develop=no
11622 fi;
11623 echo "$as_me:11623: result: $with_develop" >&5
11624 echo "${ECHO_T}$with_develop" >&6
11625
11626 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11627 echo "$as_me:11627: checking if you want hard-tabs code" >&5
11628 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11629
11630 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11631 if test "${enable_hard_tabs+set}" = set; then
11632   enableval="$enable_hard_tabs"
11633
11634 else
11635   enable_hard_tabs=$with_develop
11636 fi;
11637 echo "$as_me:11637: result: $enable_hard_tabs" >&5
11638 echo "${ECHO_T}$enable_hard_tabs" >&6
11639 test "x$enable_hard_tabs" = xyes &&
11640 cat >>confdefs.h <<\EOF
11641 #define USE_HARD_TABS 1
11642 EOF
11643
11644 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11645 echo "$as_me:11645: checking if you want limited support for xmc" >&5
11646 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11647
11648 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11649 if test "${enable_xmc_glitch+set}" = set; then
11650   enableval="$enable_xmc_glitch"
11651
11652 else
11653   enable_xmc_glitch=$with_develop
11654 fi;
11655 echo "$as_me:11655: result: $enable_xmc_glitch" >&5
11656 echo "${ECHO_T}$enable_xmc_glitch" >&6
11657 test "x$enable_xmc_glitch" = xyes &&
11658 cat >>confdefs.h <<\EOF
11659 #define USE_XMC_SUPPORT 1
11660 EOF
11661
11662 ###############################################################################
11663 # These are just experimental, probably should not be in a package:
11664
11665 echo "$as_me:11665: checking if you do not want to assume colors are white-on-black" >&5
11666 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11667
11668 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11669 if test "${enable_assumed_color+set}" = set; then
11670   enableval="$enable_assumed_color"
11671   with_assumed_color=$enableval
11672 else
11673   with_assumed_color=yes
11674 fi;
11675 echo "$as_me:11675: result: $with_assumed_color" >&5
11676 echo "${ECHO_T}$with_assumed_color" >&6
11677 test "x$with_assumed_color" = xyes &&
11678 cat >>confdefs.h <<\EOF
11679 #define USE_ASSUMED_COLOR 1
11680 EOF
11681
11682 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11683 echo "$as_me:11683: checking if you want hashmap scrolling-optimization code" >&5
11684 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11685
11686 # Check whether --enable-hashmap or --disable-hashmap was given.
11687 if test "${enable_hashmap+set}" = set; then
11688   enableval="$enable_hashmap"
11689   with_hashmap=$enableval
11690 else
11691   with_hashmap=yes
11692 fi;
11693 echo "$as_me:11693: result: $with_hashmap" >&5
11694 echo "${ECHO_T}$with_hashmap" >&6
11695 test "x$with_hashmap" = xyes &&
11696 cat >>confdefs.h <<\EOF
11697 #define USE_HASHMAP 1
11698 EOF
11699
11700 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11701 echo "$as_me:11701: checking if you want colorfgbg code" >&5
11702 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11703
11704 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11705 if test "${enable_colorfgbg+set}" = set; then
11706   enableval="$enable_colorfgbg"
11707   with_colorfgbg=$enableval
11708 else
11709   with_colorfgbg=no
11710 fi;
11711 echo "$as_me:11711: result: $with_colorfgbg" >&5
11712 echo "${ECHO_T}$with_colorfgbg" >&6
11713 test "x$with_colorfgbg" = xyes &&
11714 cat >>confdefs.h <<\EOF
11715 #define USE_COLORFGBG 1
11716 EOF
11717
11718 ###   use option --enable-interop to turn on use of bindings used for interop
11719 echo "$as_me:11719: checking if you want interop bindings" >&5
11720 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11721
11722 # Check whether --enable-interop or --disable-interop was given.
11723 if test "${enable_interop+set}" = set; then
11724   enableval="$enable_interop"
11725   with_exp_interop=$enableval
11726 else
11727   with_exp_interop=no
11728 fi;
11729 echo "$as_me:11729: result: $with_exp_interop" >&5
11730 echo "${ECHO_T}$with_exp_interop" >&6
11731
11732 NCURSES_INTEROP_FUNCS=0
11733 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11734
11735 # This is still experimental (20080329), but should ultimately be moved to
11736 # the script-block --with-normal, etc.
11737
11738 echo "$as_me:11738: checking if you want to link with the pthread library" >&5
11739 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11740
11741 # Check whether --with-pthread or --without-pthread was given.
11742 if test "${with_pthread+set}" = set; then
11743   withval="$with_pthread"
11744   with_pthread=$withval
11745 else
11746   with_pthread=no
11747 fi;
11748 echo "$as_me:11748: result: $with_pthread" >&5
11749 echo "${ECHO_T}$with_pthread" >&6
11750
11751 if test "$with_pthread" != no ; then
11752     echo "$as_me:11752: checking for pthread.h" >&5
11753 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11754 if test "${ac_cv_header_pthread_h+set}" = set; then
11755   echo $ECHO_N "(cached) $ECHO_C" >&6
11756 else
11757   cat >conftest.$ac_ext <<_ACEOF
11758 #line 11758 "configure"
11759 #include "confdefs.h"
11760 #include <pthread.h>
11761 _ACEOF
11762 if { (eval echo "$as_me:11762: \"$ac_cpp conftest.$ac_ext\"") >&5
11763   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11764   ac_status=$?
11765   egrep -v '^ *\+' conftest.er1 >conftest.err
11766   rm -f conftest.er1
11767   cat conftest.err >&5
11768   echo "$as_me:11768: \$? = $ac_status" >&5
11769   (exit $ac_status); } >/dev/null; then
11770   if test -s conftest.err; then
11771     ac_cpp_err=$ac_c_preproc_warn_flag
11772   else
11773     ac_cpp_err=
11774   fi
11775 else
11776   ac_cpp_err=yes
11777 fi
11778 if test -z "$ac_cpp_err"; then
11779   ac_cv_header_pthread_h=yes
11780 else
11781   echo "$as_me: failed program was:" >&5
11782   cat conftest.$ac_ext >&5
11783   ac_cv_header_pthread_h=no
11784 fi
11785 rm -f conftest.err conftest.$ac_ext
11786 fi
11787 echo "$as_me:11787: result: $ac_cv_header_pthread_h" >&5
11788 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11789 if test $ac_cv_header_pthread_h = yes; then
11790
11791 cat >>confdefs.h <<\EOF
11792 #define HAVE_PTHREADS_H 1
11793 EOF
11794
11795         for cf_lib_pthread in pthread c_r
11796         do
11797             echo "$as_me:11797: checking if we can link with the $cf_lib_pthread library" >&5
11798 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11799             cf_save_LIBS="$LIBS"
11800             LIBS="-l$cf_lib_pthread $LIBS"
11801             cat >conftest.$ac_ext <<_ACEOF
11802 #line 11802 "configure"
11803 #include "confdefs.h"
11804
11805 #include <pthread.h>
11806
11807 int
11808 main ()
11809 {
11810
11811                 int rc = pthread_create(0,0,0,0);
11812                 int r2 = pthread_mutexattr_settype(0, 0);
11813
11814   ;
11815   return 0;
11816 }
11817 _ACEOF
11818 rm -f conftest.$ac_objext conftest$ac_exeext
11819 if { (eval echo "$as_me:11819: \"$ac_link\"") >&5
11820   (eval $ac_link) 2>&5
11821   ac_status=$?
11822   echo "$as_me:11822: \$? = $ac_status" >&5
11823   (exit $ac_status); } &&
11824          { ac_try='test -s conftest$ac_exeext'
11825   { (eval echo "$as_me:11825: \"$ac_try\"") >&5
11826   (eval $ac_try) 2>&5
11827   ac_status=$?
11828   echo "$as_me:11828: \$? = $ac_status" >&5
11829   (exit $ac_status); }; }; then
11830   with_pthread=yes
11831 else
11832   echo "$as_me: failed program was:" >&5
11833 cat conftest.$ac_ext >&5
11834 with_pthread=no
11835 fi
11836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11837             LIBS="$cf_save_LIBS"
11838             echo "$as_me:11838: result: $with_pthread" >&5
11839 echo "${ECHO_T}$with_pthread" >&6
11840             test "$with_pthread" = yes && break
11841         done
11842
11843         if test "$with_pthread" = yes ; then
11844             LIBS="-l$cf_lib_pthread $LIBS"
11845
11846 cat >>confdefs.h <<\EOF
11847 #define HAVE_LIBPTHREADS 1
11848 EOF
11849
11850         else
11851             { { echo "$as_me:11851: error: Cannot link with pthread library" >&5
11852 echo "$as_me: error: Cannot link with pthread library" >&2;}
11853    { (exit 1); exit 1; }; }
11854         fi
11855
11856 fi
11857
11858 fi
11859
11860 if test "x$with_pthread" != xno; then
11861         echo "$as_me:11861: checking for pthread_kill" >&5
11862 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11863 if test "${ac_cv_func_pthread_kill+set}" = set; then
11864   echo $ECHO_N "(cached) $ECHO_C" >&6
11865 else
11866   cat >conftest.$ac_ext <<_ACEOF
11867 #line 11867 "configure"
11868 #include "confdefs.h"
11869 /* System header to define __stub macros and hopefully few prototypes,
11870     which can conflict with char pthread_kill (); below.  */
11871 #include <assert.h>
11872 /* Override any gcc2 internal prototype to avoid an error.  */
11873 #ifdef __cplusplus
11874 extern "C"
11875 #endif
11876 /* We use char because int might match the return type of a gcc2
11877    builtin and then its argument prototype would still apply.  */
11878 char pthread_kill ();
11879 char (*f) ();
11880
11881 int
11882 main ()
11883 {
11884 /* The GNU C library defines this for functions which it implements
11885     to always fail with ENOSYS.  Some functions are actually named
11886     something starting with __ and the normal name is an alias.  */
11887 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11888 choke me
11889 #else
11890 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11891 #endif
11892
11893   ;
11894   return 0;
11895 }
11896 _ACEOF
11897 rm -f conftest.$ac_objext conftest$ac_exeext
11898 if { (eval echo "$as_me:11898: \"$ac_link\"") >&5
11899   (eval $ac_link) 2>&5
11900   ac_status=$?
11901   echo "$as_me:11901: \$? = $ac_status" >&5
11902   (exit $ac_status); } &&
11903          { ac_try='test -s conftest$ac_exeext'
11904   { (eval echo "$as_me:11904: \"$ac_try\"") >&5
11905   (eval $ac_try) 2>&5
11906   ac_status=$?
11907   echo "$as_me:11907: \$? = $ac_status" >&5
11908   (exit $ac_status); }; }; then
11909   ac_cv_func_pthread_kill=yes
11910 else
11911   echo "$as_me: failed program was:" >&5
11912 cat conftest.$ac_ext >&5
11913 ac_cv_func_pthread_kill=no
11914 fi
11915 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11916 fi
11917 echo "$as_me:11917: result: $ac_cv_func_pthread_kill" >&5
11918 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11919 if test $ac_cv_func_pthread_kill = yes; then
11920
11921                 echo "$as_me:11921: checking if you want to allow EINTR in wgetch with pthreads" >&5
11922 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11923
11924 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11925 if test "${enable_pthreads_eintr+set}" = set; then
11926   enableval="$enable_pthreads_eintr"
11927   use_pthreads_eintr=$enableval
11928 else
11929   use_pthreads_eintr=no
11930 fi;
11931                 echo "$as_me:11931: result: $use_pthreads_eintr" >&5
11932 echo "${ECHO_T}$use_pthreads_eintr" >&6
11933                 if test "x$use_pthreads_eintr" = xyes ; then
11934
11935 cat >>confdefs.h <<\EOF
11936 #define USE_PTHREADS_EINTR 1
11937 EOF
11938
11939                 fi
11940 fi
11941
11942         echo "$as_me:11942: checking if you want to use weak-symbols for pthreads" >&5
11943 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11944
11945 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11946 if test "${enable_weak_symbols+set}" = set; then
11947   enableval="$enable_weak_symbols"
11948   use_weak_symbols=$enableval
11949 else
11950   use_weak_symbols=no
11951 fi;
11952         echo "$as_me:11952: result: $use_weak_symbols" >&5
11953 echo "${ECHO_T}$use_weak_symbols" >&6
11954         if test "x$use_weak_symbols" = xyes ; then
11955
11956 echo "$as_me:11956: checking if $CC supports weak symbols" >&5
11957 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11958 if test "${cf_cv_weak_symbols+set}" = set; then
11959   echo $ECHO_N "(cached) $ECHO_C" >&6
11960 else
11961
11962 cat >conftest.$ac_ext <<_ACEOF
11963 #line 11963 "configure"
11964 #include "confdefs.h"
11965
11966 #include <stdio.h>
11967 int
11968 main ()
11969 {
11970
11971 #if defined(__GNUC__)
11972 #  if defined __USE_ISOC99
11973 #    define _cat_pragma(exp)    _Pragma(#exp)
11974 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11975 #  else
11976 #    define _weak_pragma(exp)
11977 #  endif
11978 #  define _declare(name)        __extension__ extern __typeof__(name) name
11979 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11980 #endif
11981
11982 weak_symbol(fopen);
11983
11984   ;
11985   return 0;
11986 }
11987 _ACEOF
11988 rm -f conftest.$ac_objext
11989 if { (eval echo "$as_me:11989: \"$ac_compile\"") >&5
11990   (eval $ac_compile) 2>&5
11991   ac_status=$?
11992   echo "$as_me:11992: \$? = $ac_status" >&5
11993   (exit $ac_status); } &&
11994          { ac_try='test -s conftest.$ac_objext'
11995   { (eval echo "$as_me:11995: \"$ac_try\"") >&5
11996   (eval $ac_try) 2>&5
11997   ac_status=$?
11998   echo "$as_me:11998: \$? = $ac_status" >&5
11999   (exit $ac_status); }; }; then
12000   cf_cv_weak_symbols=yes
12001 else
12002   echo "$as_me: failed program was:" >&5
12003 cat conftest.$ac_ext >&5
12004 cf_cv_weak_symbols=no
12005 fi
12006 rm -f conftest.$ac_objext conftest.$ac_ext
12007
12008 fi
12009 echo "$as_me:12009: result: $cf_cv_weak_symbols" >&5
12010 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12011
12012         else
12013                 cf_cv_weak_symbols=no
12014         fi
12015
12016         if test "x$cf_cv_weak_symbols" = xyes ; then
12017
12018 cat >>confdefs.h <<\EOF
12019 #define USE_WEAK_SYMBOLS 1
12020 EOF
12021
12022         fi
12023 fi
12024
12025 PTHREAD=
12026 if test "x$with_pthread" = "xyes" ; then
12027
12028 cat >>confdefs.h <<\EOF
12029 #define USE_PTHREADS 1
12030 EOF
12031
12032     enable_reentrant=yes
12033     if test "x$cf_cv_weak_symbols" = xyes ; then
12034         PTHREAD=-lpthread
12035     fi
12036 fi
12037
12038 # Reentrant code has to be opaque; there's little advantage to making ncurses
12039 # opaque outside of that, so there is no --enable-opaque option.  We can use
12040 # this option without --with-pthreads, but this will be always set for
12041 # pthreads.
12042 echo "$as_me:12042: checking if you want experimental reentrant code" >&5
12043 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12044
12045 # Check whether --enable-reentrant or --disable-reentrant was given.
12046 if test "${enable_reentrant+set}" = set; then
12047   enableval="$enable_reentrant"
12048   with_reentrant=$enableval
12049 else
12050   with_reentrant=no
12051 fi;
12052 echo "$as_me:12052: result: $with_reentrant" >&5
12053 echo "${ECHO_T}$with_reentrant" >&6
12054 if test "x$with_reentrant" = xyes ; then
12055         cf_cv_enable_reentrant=1
12056         cf_cv_enable_opaque="NCURSES_INTERNALS"
12057         NCURSES_OPAQUE=1
12058         NCURSES_SIZE_T=int
12059         if test "x$cf_cv_weak_symbols" = xyes ; then
12060
12061 # remove pthread library from $LIBS
12062 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12063
12064                 TEST_LIBS="-lpthread $TEST_LIBS"
12065                 TEST_LIBS2="-lpthread $TEST_LIBS2"
12066         else
12067                 # when not using weak symbols but with_reentrant,
12068                 # add 't' to the library suffix on all platforms
12069                 # except cygwin, where we only do that if ALSO
12070                 # compiling with full thread support.
12071                 case "$host" in
12072                 *cygwin* | *msys*)
12073                         if test "$with_pthread" = "yes" ; then
12074                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12075                         fi ;;
12076                 * ) LIB_SUFFIX="t${LIB_SUFFIX}" ;;
12077                 esac
12078         fi
12079
12080 cat >>confdefs.h <<\EOF
12081 #define USE_REENTRANT 1
12082 EOF
12083
12084 if test "${with_abi_version+set}" != set; then
12085         case $cf_cv_rel_version in
12086         5.*)
12087                 cf_cv_rel_version=6.0
12088                 cf_cv_abi_version=6
12089                 { echo "$as_me:12089: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12090 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12091                 ;;
12092         esac
12093 fi
12094
12095 else
12096         cf_cv_enable_reentrant=0
12097         cf_cv_enable_opaque="NCURSES_OPAQUE"
12098         NCURSES_OPAQUE=0
12099         NCURSES_SIZE_T=short
12100 fi
12101
12102 ### Allow using a different wrap-prefix
12103 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12104         echo "$as_me:12104: checking for prefix used to wrap public variables" >&5
12105 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12106
12107 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12108 if test "${with_wrap_prefix+set}" = set; then
12109   withval="$with_wrap_prefix"
12110   NCURSES_WRAP_PREFIX=$withval
12111 else
12112   NCURSES_WRAP_PREFIX=_nc_
12113 fi;
12114         echo "$as_me:12114: result: $NCURSES_WRAP_PREFIX" >&5
12115 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12116 else
12117         NCURSES_WRAP_PREFIX=_nc_
12118 fi
12119
12120 cat >>confdefs.h <<EOF
12121 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12122 EOF
12123
12124 echo "$as_me:12124: checking if you want experimental safe-sprintf code" >&5
12125 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12126
12127 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12128 if test "${enable_safe_sprintf+set}" = set; then
12129   enableval="$enable_safe_sprintf"
12130   with_safe_sprintf=$enableval
12131 else
12132   with_safe_sprintf=no
12133 fi;
12134 echo "$as_me:12134: result: $with_safe_sprintf" >&5
12135 echo "${ECHO_T}$with_safe_sprintf" >&6
12136 test "x$with_safe_sprintf" = xyes &&
12137 cat >>confdefs.h <<\EOF
12138 #define USE_SAFE_SPRINTF 1
12139 EOF
12140
12141 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12142 # when hashmap is used scroll hints are useless
12143 if test "$with_hashmap" = no ; then
12144 echo "$as_me:12144: checking if you want to experiment without scrolling-hints code" >&5
12145 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12146
12147 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12148 if test "${enable_scroll_hints+set}" = set; then
12149   enableval="$enable_scroll_hints"
12150   with_scroll_hints=$enableval
12151 else
12152   with_scroll_hints=yes
12153 fi;
12154 echo "$as_me:12154: result: $with_scroll_hints" >&5
12155 echo "${ECHO_T}$with_scroll_hints" >&6
12156 test "x$with_scroll_hints" = xyes &&
12157 cat >>confdefs.h <<\EOF
12158 #define USE_SCROLL_HINTS 1
12159 EOF
12160
12161 fi
12162
12163 echo "$as_me:12163: checking if you want experimental wgetch-events code" >&5
12164 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12165
12166 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12167 if test "${enable_wgetch_events+set}" = set; then
12168   enableval="$enable_wgetch_events"
12169   with_wgetch_events=$enableval
12170 else
12171   with_wgetch_events=no
12172 fi;
12173 echo "$as_me:12173: result: $with_wgetch_events" >&5
12174 echo "${ECHO_T}$with_wgetch_events" >&6
12175 test "x$with_wgetch_events" = xyes &&
12176 cat >>confdefs.h <<\EOF
12177 #define NCURSES_WGETCH_EVENTS 1
12178 EOF
12179
12180 ###############################################################################
12181
12182 ###     use option --disable-echo to suppress full display compiling commands
12183
12184 echo "$as_me:12184: checking if you want to see long compiling messages" >&5
12185 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12186
12187 # Check whether --enable-echo or --disable-echo was given.
12188 if test "${enable_echo+set}" = set; then
12189   enableval="$enable_echo"
12190   test "$enableval" != no && enableval=yes
12191   if test "$enableval" != "yes" ; then
12192
12193     ECHO_LT='--silent'
12194     ECHO_LD='@echo linking $@;'
12195     RULE_CC='@echo compiling $<'
12196     SHOW_CC='@echo compiling $@'
12197     ECHO_CC='@'
12198
12199   else
12200
12201     ECHO_LT=''
12202     ECHO_LD=''
12203     RULE_CC=''
12204     SHOW_CC=''
12205     ECHO_CC=''
12206
12207   fi
12208 else
12209   enableval=yes
12210
12211     ECHO_LT=''
12212     ECHO_LD=''
12213     RULE_CC=''
12214     SHOW_CC=''
12215     ECHO_CC=''
12216
12217 fi;
12218 echo "$as_me:12218: result: $enableval" >&5
12219 echo "${ECHO_T}$enableval" >&6
12220
12221 if test "x$enable_echo" = xyes; then
12222         ECHO_LINK=
12223 else
12224         ECHO_LINK='@ echo linking $@ ... ;'
12225         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12226         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12227 fi
12228
12229 ###     use option --enable-warnings to turn on all gcc warnings
12230 echo "$as_me:12230: checking if you want to see compiler warnings" >&5
12231 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12232
12233 # Check whether --enable-warnings or --disable-warnings was given.
12234 if test "${enable_warnings+set}" = set; then
12235   enableval="$enable_warnings"
12236   with_warnings=$enableval
12237 fi;
12238 echo "$as_me:12238: result: $with_warnings" >&5
12239 echo "${ECHO_T}$with_warnings" >&6
12240
12241 if test "x$with_warnings" = "xyes"; then
12242
12243         ADAFLAGS="$ADAFLAGS -gnatg"
12244
12245 INTEL_COMPILER=no
12246
12247 if test "$GCC" = yes ; then
12248         case $host_os in
12249         linux*|gnu*)
12250                 echo "$as_me:12250: checking if this is really Intel C compiler" >&5
12251 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12252                 cf_save_CFLAGS="$CFLAGS"
12253                 CFLAGS="$CFLAGS -no-gcc"
12254                 cat >conftest.$ac_ext <<_ACEOF
12255 #line 12255 "configure"
12256 #include "confdefs.h"
12257
12258 int
12259 main ()
12260 {
12261
12262 #ifdef __INTEL_COMPILER
12263 #else
12264 make an error
12265 #endif
12266
12267   ;
12268   return 0;
12269 }
12270 _ACEOF
12271 rm -f conftest.$ac_objext
12272 if { (eval echo "$as_me:12272: \"$ac_compile\"") >&5
12273   (eval $ac_compile) 2>&5
12274   ac_status=$?
12275   echo "$as_me:12275: \$? = $ac_status" >&5
12276   (exit $ac_status); } &&
12277          { ac_try='test -s conftest.$ac_objext'
12278   { (eval echo "$as_me:12278: \"$ac_try\"") >&5
12279   (eval $ac_try) 2>&5
12280   ac_status=$?
12281   echo "$as_me:12281: \$? = $ac_status" >&5
12282   (exit $ac_status); }; }; then
12283   INTEL_COMPILER=yes
12284 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12285
12286 else
12287   echo "$as_me: failed program was:" >&5
12288 cat conftest.$ac_ext >&5
12289 fi
12290 rm -f conftest.$ac_objext conftest.$ac_ext
12291                 CFLAGS="$cf_save_CFLAGS"
12292                 echo "$as_me:12292: result: $INTEL_COMPILER" >&5
12293 echo "${ECHO_T}$INTEL_COMPILER" >&6
12294                 ;;
12295         esac
12296 fi
12297
12298 CLANG_COMPILER=no
12299
12300 if test "$GCC" = yes ; then
12301         echo "$as_me:12301: checking if this is really Clang C compiler" >&5
12302 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12303         cf_save_CFLAGS="$CFLAGS"
12304         CFLAGS="$CFLAGS -Qunused-arguments"
12305         cat >conftest.$ac_ext <<_ACEOF
12306 #line 12306 "configure"
12307 #include "confdefs.h"
12308
12309 int
12310 main ()
12311 {
12312
12313 #ifdef __clang__
12314 #else
12315 make an error
12316 #endif
12317
12318   ;
12319   return 0;
12320 }
12321 _ACEOF
12322 rm -f conftest.$ac_objext
12323 if { (eval echo "$as_me:12323: \"$ac_compile\"") >&5
12324   (eval $ac_compile) 2>&5
12325   ac_status=$?
12326   echo "$as_me:12326: \$? = $ac_status" >&5
12327   (exit $ac_status); } &&
12328          { ac_try='test -s conftest.$ac_objext'
12329   { (eval echo "$as_me:12329: \"$ac_try\"") >&5
12330   (eval $ac_try) 2>&5
12331   ac_status=$?
12332   echo "$as_me:12332: \$? = $ac_status" >&5
12333   (exit $ac_status); }; }; then
12334   CLANG_COMPILER=yes
12335 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12336
12337 else
12338   echo "$as_me: failed program was:" >&5
12339 cat conftest.$ac_ext >&5
12340 fi
12341 rm -f conftest.$ac_objext conftest.$ac_ext
12342         CFLAGS="$cf_save_CFLAGS"
12343         echo "$as_me:12343: result: $CLANG_COMPILER" >&5
12344 echo "${ECHO_T}$CLANG_COMPILER" >&6
12345 fi
12346
12347 cat > conftest.$ac_ext <<EOF
12348 #line 12348 "${as_me:-configure}"
12349 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12350 EOF
12351
12352 if test "$INTEL_COMPILER" = yes
12353 then
12354 # The "-wdXXX" options suppress warnings:
12355 # remark #1419: external declaration in primary source file
12356 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12357 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12358 # remark #193: zero used for undefined preprocessing identifier
12359 # remark #593: variable "curs_sb_left_arrow" was set but never used
12360 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12361 # remark #869: parameter "tw" was never referenced
12362 # remark #981: operands are evaluated in unspecified order
12363 # warning #279: controlling expression is constant
12364
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="-Wall"
12369         for cf_opt in \
12370                 wd1419 \
12371                 wd1683 \
12372                 wd1684 \
12373                 wd193 \
12374                 wd593 \
12375                 wd279 \
12376                 wd810 \
12377                 wd869 \
12378                 wd981
12379         do
12380                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12381                 if { (eval echo "$as_me:12381: \"$ac_compile\"") >&5
12382   (eval $ac_compile) 2>&5
12383   ac_status=$?
12384   echo "$as_me:12384: \$? = $ac_status" >&5
12385   (exit $ac_status); }; then
12386                         test -n "$verbose" && echo "$as_me:12386: result: ... -$cf_opt" >&5
12387 echo "${ECHO_T}... -$cf_opt" >&6
12388                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12389                 fi
12390         done
12391         CFLAGS="$cf_save_CFLAGS"
12392
12393 elif test "$GCC" = yes
12394 then
12395         { echo "$as_me:12395: checking for $CC warning options..." >&5
12396 echo "$as_me: checking for $CC warning options..." >&6;}
12397         cf_save_CFLAGS="$CFLAGS"
12398         EXTRA_CFLAGS=
12399         cf_warn_CONST=""
12400         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12401         for cf_opt in W Wall \
12402                 Wbad-function-cast \
12403                 Wcast-align \
12404                 Wcast-qual \
12405                 Winline \
12406                 Wmissing-declarations \
12407                 Wmissing-prototypes \
12408                 Wnested-externs \
12409                 Wpointer-arith \
12410                 Wshadow \
12411                 Wstrict-prototypes \
12412                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12413         do
12414                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12415                 if { (eval echo "$as_me:12415: \"$ac_compile\"") >&5
12416   (eval $ac_compile) 2>&5
12417   ac_status=$?
12418   echo "$as_me:12418: \$? = $ac_status" >&5
12419   (exit $ac_status); }; then
12420                         test -n "$verbose" && echo "$as_me:12420: result: ... -$cf_opt" >&5
12421 echo "${ECHO_T}... -$cf_opt" >&6
12422                         case $cf_opt in #(vi
12423                         Wcast-qual) #(vi
12424                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12425                                 ;;
12426                         Winline) #(vi
12427                                 case $GCC_VERSION in
12428                                 [34].*)
12429                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12430
12431 echo "${as_me:-configure}:12431: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12432
12433                                         continue;;
12434                                 esac
12435                                 ;;
12436                         Wpointer-arith) #(vi
12437                                 case $GCC_VERSION in
12438                                 [12].*)
12439                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12440
12441 echo "${as_me:-configure}:12441: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12442
12443                                         continue;;
12444                                 esac
12445                                 ;;
12446                         esac
12447                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12448                 fi
12449         done
12450         CFLAGS="$cf_save_CFLAGS"
12451 fi
12452 rm -rf conftest*
12453
12454         if test "x$cf_with_cxx" = xyes ; then
12455
12456 INTEL_CPLUSPLUS=no
12457
12458 if test "$GCC" = yes ; then
12459         case $host_os in
12460         linux*|gnu*)
12461                 echo "$as_me:12461: checking if this is really Intel C++ compiler" >&5
12462 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12463                 cf_save_CFLAGS="$CXXFLAGS"
12464                 CXXFLAGS="$CXXFLAGS -no-gcc"
12465                 cat >conftest.$ac_ext <<_ACEOF
12466 #line 12466 "configure"
12467 #include "confdefs.h"
12468
12469 int
12470 main ()
12471 {
12472
12473 #ifdef __INTEL_COMPILER
12474 #else
12475 make an error
12476 #endif
12477
12478   ;
12479   return 0;
12480 }
12481 _ACEOF
12482 rm -f conftest.$ac_objext
12483 if { (eval echo "$as_me:12483: \"$ac_compile\"") >&5
12484   (eval $ac_compile) 2>&5
12485   ac_status=$?
12486   echo "$as_me:12486: \$? = $ac_status" >&5
12487   (exit $ac_status); } &&
12488          { ac_try='test -s conftest.$ac_objext'
12489   { (eval echo "$as_me:12489: \"$ac_try\"") >&5
12490   (eval $ac_try) 2>&5
12491   ac_status=$?
12492   echo "$as_me:12492: \$? = $ac_status" >&5
12493   (exit $ac_status); }; }; then
12494   INTEL_CPLUSPLUS=yes
12495 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12496
12497 else
12498   echo "$as_me: failed program was:" >&5
12499 cat conftest.$ac_ext >&5
12500 fi
12501 rm -f conftest.$ac_objext conftest.$ac_ext
12502                 CXXFLAGS="$cf_save_CFLAGS"
12503                 echo "$as_me:12503: result: $INTEL_CPLUSPLUS" >&5
12504 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12505                 ;;
12506         esac
12507 fi
12508
12509 CLANG_CPLUSPLUS=no
12510
12511 if test "$GCC" = yes ; then
12512         echo "$as_me:12512: checking if this is really Clang C++ compiler" >&5
12513 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12514         cf_save_CFLAGS="$CXXFLAGS"
12515         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12516         cat >conftest.$ac_ext <<_ACEOF
12517 #line 12517 "configure"
12518 #include "confdefs.h"
12519
12520 int
12521 main ()
12522 {
12523
12524 #ifdef __clang__
12525 #else
12526 make an error
12527 #endif
12528
12529   ;
12530   return 0;
12531 }
12532 _ACEOF
12533 rm -f conftest.$ac_objext
12534 if { (eval echo "$as_me:12534: \"$ac_compile\"") >&5
12535   (eval $ac_compile) 2>&5
12536   ac_status=$?
12537   echo "$as_me:12537: \$? = $ac_status" >&5
12538   (exit $ac_status); } &&
12539          { ac_try='test -s conftest.$ac_objext'
12540   { (eval echo "$as_me:12540: \"$ac_try\"") >&5
12541   (eval $ac_try) 2>&5
12542   ac_status=$?
12543   echo "$as_me:12543: \$? = $ac_status" >&5
12544   (exit $ac_status); }; }; then
12545   CLANG_CPLUSPLUS=yes
12546 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12547
12548 else
12549   echo "$as_me: failed program was:" >&5
12550 cat conftest.$ac_ext >&5
12551 fi
12552 rm -f conftest.$ac_objext conftest.$ac_ext
12553         CXXFLAGS="$cf_save_CFLAGS"
12554         echo "$as_me:12554: result: $CLANG_CPLUSPLUS" >&5
12555 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12556 fi
12557
12558 ac_ext=cc
12559 ac_cpp='$CXXCPP $CPPFLAGS'
12560 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12561 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12562 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12563 ac_main_return=return
12564
12565 cat > conftest.$ac_ext <<EOF
12566 #line 12566 "configure"
12567 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12568 EOF
12569
12570 if test "$INTEL_CPLUSPLUS" = yes
12571 then
12572 # The "-wdXXX" options suppress warnings:
12573 # remark #1419: external declaration in primary source file
12574 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12575 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12576 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12577 # remark #193: zero used for undefined preprocessing identifier
12578 # remark #593: variable "curs_sb_left_arrow" was set but never used
12579 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12580 # remark #869: parameter "tw" was never referenced
12581 # remark #981: operands are evaluated in unspecified order
12582 # warning #269: invalid format string conversion
12583
12584         { echo "$as_me:12584: checking for $CC warning options..." >&5
12585 echo "$as_me: checking for $CC warning options..." >&6;}
12586         cf_save_CXXFLAGS="$CXXFLAGS"
12587         EXTRA_CXXFLAGS="-Wall"
12588         for cf_opt in \
12589                 wd1419 \
12590                 wd1682 \
12591                 wd1683 \
12592                 wd1684 \
12593                 wd193 \
12594                 wd279 \
12595                 wd593 \
12596                 wd810 \
12597                 wd869 \
12598                 wd981
12599         do
12600                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12601                 if { (eval echo "$as_me:12601: \"$ac_compile\"") >&5
12602   (eval $ac_compile) 2>&5
12603   ac_status=$?
12604   echo "$as_me:12604: \$? = $ac_status" >&5
12605   (exit $ac_status); }; then
12606                         test -n "$verbose" && echo "$as_me:12606: result: ... -$cf_opt" >&5
12607 echo "${ECHO_T}... -$cf_opt" >&6
12608                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12609                 fi
12610         done
12611         CXXFLAGS="$cf_save_CXXFLAGS"
12612
12613 elif test "$GXX" = yes
12614 then
12615         { echo "$as_me:12615: checking for $CXX warning options..." >&5
12616 echo "$as_me: checking for $CXX warning options..." >&6;}
12617         cf_save_CXXFLAGS="$CXXFLAGS"
12618         EXTRA_CXXFLAGS="-W -Wall"
12619         cf_gxx_extra_warnings=""
12620         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12621         case "$GCC_VERSION" in
12622         [1-2].*)
12623                 ;;
12624         *)
12625                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12626                 ;;
12627         esac
12628         for cf_opt in \
12629                 Wabi \
12630                 fabi-version=0 \
12631                 Woverloaded-virtual \
12632                 Wsign-promo \
12633                 Wsynth \
12634                 Wold-style-cast \
12635                 Wcast-align \
12636                 Wcast-qual \
12637                 Wmissing-prototypes \
12638                 Wpointer-arith \
12639                 Wshadow \
12640                 Wstrict-prototypes \
12641                 Wundef $cf_gxx_extra_warnings Wno-unused
12642         do
12643                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12644                 if { (eval echo "$as_me:12644: \"$ac_compile\"") >&5
12645   (eval $ac_compile) 2>&5
12646   ac_status=$?
12647   echo "$as_me:12647: \$? = $ac_status" >&5
12648   (exit $ac_status); }; then
12649                         test -n "$verbose" && echo "$as_me:12649: result: ... -$cf_opt" >&5
12650 echo "${ECHO_T}... -$cf_opt" >&6
12651                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12652                 else
12653                         test -n "$verbose" && echo "$as_me:12653: result: ... no -$cf_opt" >&5
12654 echo "${ECHO_T}... no -$cf_opt" >&6
12655                 fi
12656         done
12657         CXXFLAGS="$cf_save_CXXFLAGS"
12658 fi
12659
12660 rm -rf conftest*
12661 ac_ext=c
12662 ac_cpp='$CPP $CPPFLAGS'
12663 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12664 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12665 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12666 ac_main_return=return
12667
12668         fi
12669 fi
12670
12671 if test "$GCC" = yes
12672 then
12673 cat > conftest.i <<EOF
12674 #ifndef GCC_PRINTF
12675 #define GCC_PRINTF 0
12676 #endif
12677 #ifndef GCC_SCANF
12678 #define GCC_SCANF 0
12679 #endif
12680 #ifndef GCC_NORETURN
12681 #define GCC_NORETURN /* nothing */
12682 #endif
12683 #ifndef GCC_UNUSED
12684 #define GCC_UNUSED /* nothing */
12685 #endif
12686 EOF
12687 if test "$GCC" = yes
12688 then
12689         { echo "$as_me:12689: checking for $CC __attribute__ directives..." >&5
12690 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12691 cat > conftest.$ac_ext <<EOF
12692 #line 12692 "${as_me:-configure}"
12693 #include "confdefs.h"
12694 #include "conftest.h"
12695 #include "conftest.i"
12696 #if     GCC_PRINTF
12697 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12698 #else
12699 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12700 #endif
12701 #if     GCC_SCANF
12702 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12703 #else
12704 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12705 #endif
12706 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12707 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12708 extern void foo(void) GCC_NORETURN;
12709 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12710 EOF
12711         cf_printf_attribute=no
12712         cf_scanf_attribute=no
12713         for cf_attribute in scanf printf unused noreturn
12714         do
12715
12716 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12717
12718                 cf_directive="__attribute__(($cf_attribute))"
12719                 echo "checking for $CC $cf_directive" 1>&5
12720
12721                 case $cf_attribute in #(vi
12722                 printf) #(vi
12723                         cf_printf_attribute=yes
12724                         cat >conftest.h <<EOF
12725 #define GCC_$cf_ATTRIBUTE 1
12726 EOF
12727                         ;;
12728                 scanf) #(vi
12729                         cf_scanf_attribute=yes
12730                         cat >conftest.h <<EOF
12731 #define GCC_$cf_ATTRIBUTE 1
12732 EOF
12733                         ;;
12734                 *) #(vi
12735                         cat >conftest.h <<EOF
12736 #define GCC_$cf_ATTRIBUTE $cf_directive
12737 EOF
12738                         ;;
12739                 esac
12740
12741                 if { (eval echo "$as_me:12741: \"$ac_compile\"") >&5
12742   (eval $ac_compile) 2>&5
12743   ac_status=$?
12744   echo "$as_me:12744: \$? = $ac_status" >&5
12745   (exit $ac_status); }; then
12746                         test -n "$verbose" && echo "$as_me:12746: result: ... $cf_attribute" >&5
12747 echo "${ECHO_T}... $cf_attribute" >&6
12748                         cat conftest.h >>confdefs.h
12749                         case $cf_attribute in #(vi
12750                         noreturn) #(vi
12751
12752 cat >>confdefs.h <<EOF
12753 #define GCC_NORETURN $cf_directive
12754 EOF
12755
12756                                 ;;
12757                         printf) #(vi
12758                                 cf_value='/* nothing */'
12759                                 if test "$cf_printf_attribute" != no ; then
12760                                         cf_value='__attribute__((format(printf,fmt,var)))'
12761
12762 cat >>confdefs.h <<\EOF
12763 #define GCC_PRINTF 1
12764 EOF
12765
12766                                 fi
12767
12768 cat >>confdefs.h <<EOF
12769 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12770 EOF
12771
12772                                 ;;
12773                         scanf) #(vi
12774                                 cf_value='/* nothing */'
12775                                 if test "$cf_scanf_attribute" != no ; then
12776                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12777
12778 cat >>confdefs.h <<\EOF
12779 #define GCC_SCANF 1
12780 EOF
12781
12782                                 fi
12783
12784 cat >>confdefs.h <<EOF
12785 #define GCC_SCANFLIKE(fmt,var) $cf_value
12786 EOF
12787
12788                                 ;;
12789                         unused) #(vi
12790
12791 cat >>confdefs.h <<EOF
12792 #define GCC_UNUSED $cf_directive
12793 EOF
12794
12795                                 ;;
12796                         esac
12797                 fi
12798         done
12799 else
12800         fgrep define conftest.i >>confdefs.h
12801 fi
12802 rm -rf conftest*
12803 fi
12804
12805 echo "$as_me:12805: checking if you want to work around bogus compiler/loader warnings" >&5
12806 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12807
12808 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12809 if test "${enable_string_hacks+set}" = set; then
12810   enableval="$enable_string_hacks"
12811   with_string_hacks=$enableval
12812 else
12813   with_string_hacks=no
12814 fi;
12815 echo "$as_me:12815: result: $with_string_hacks" >&5
12816 echo "${ECHO_T}$with_string_hacks" >&6
12817
12818 if test "x$with_string_hacks" = "xyes"; then
12819
12820 cat >>confdefs.h <<\EOF
12821 #define USE_STRING_HACKS 1
12822 EOF
12823
12824         { echo "$as_me:12824: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12825 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12826
12827 for ac_func in strlcat strlcpy snprintf
12828 do
12829 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12830 echo "$as_me:12830: checking for $ac_func" >&5
12831 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12832 if eval "test \"\${$as_ac_var+set}\" = set"; then
12833   echo $ECHO_N "(cached) $ECHO_C" >&6
12834 else
12835   cat >conftest.$ac_ext <<_ACEOF
12836 #line 12836 "configure"
12837 #include "confdefs.h"
12838 /* System header to define __stub macros and hopefully few prototypes,
12839     which can conflict with char $ac_func (); below.  */
12840 #include <assert.h>
12841 /* Override any gcc2 internal prototype to avoid an error.  */
12842 #ifdef __cplusplus
12843 extern "C"
12844 #endif
12845 /* We use char because int might match the return type of a gcc2
12846    builtin and then its argument prototype would still apply.  */
12847 char $ac_func ();
12848 char (*f) ();
12849
12850 int
12851 main ()
12852 {
12853 /* The GNU C library defines this for functions which it implements
12854     to always fail with ENOSYS.  Some functions are actually named
12855     something starting with __ and the normal name is an alias.  */
12856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12857 choke me
12858 #else
12859 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12860 #endif
12861
12862   ;
12863   return 0;
12864 }
12865 _ACEOF
12866 rm -f conftest.$ac_objext conftest$ac_exeext
12867 if { (eval echo "$as_me:12867: \"$ac_link\"") >&5
12868   (eval $ac_link) 2>&5
12869   ac_status=$?
12870   echo "$as_me:12870: \$? = $ac_status" >&5
12871   (exit $ac_status); } &&
12872          { ac_try='test -s conftest$ac_exeext'
12873   { (eval echo "$as_me:12873: \"$ac_try\"") >&5
12874   (eval $ac_try) 2>&5
12875   ac_status=$?
12876   echo "$as_me:12876: \$? = $ac_status" >&5
12877   (exit $ac_status); }; }; then
12878   eval "$as_ac_var=yes"
12879 else
12880   echo "$as_me: failed program was:" >&5
12881 cat conftest.$ac_ext >&5
12882 eval "$as_ac_var=no"
12883 fi
12884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12885 fi
12886 echo "$as_me:12886: result: `eval echo '${'$as_ac_var'}'`" >&5
12887 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12888 if test `eval echo '${'$as_ac_var'}'` = yes; then
12889   cat >>confdefs.h <<EOF
12890 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12891 EOF
12892
12893 fi
12894 done
12895
12896 fi
12897
12898 ###     use option --enable-assertions to turn on generation of assertion code
12899 echo "$as_me:12899: checking if you want to enable runtime assertions" >&5
12900 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12901
12902 # Check whether --enable-assertions or --disable-assertions was given.
12903 if test "${enable_assertions+set}" = set; then
12904   enableval="$enable_assertions"
12905   with_assertions=$enableval
12906 else
12907   with_assertions=no
12908 fi;
12909 echo "$as_me:12909: result: $with_assertions" >&5
12910 echo "${ECHO_T}$with_assertions" >&6
12911 if test -n "$GCC"
12912 then
12913         if test "$with_assertions" = no
12914         then
12915                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12916         else
12917
12918         ADAFLAGS="$ADAFLAGS -gnata"
12919
12920         fi
12921 fi
12922
12923 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12924
12925 echo "$as_me:12925: checking if you want to use dmalloc for testing" >&5
12926 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12927
12928 # Check whether --with-dmalloc or --without-dmalloc was given.
12929 if test "${with_dmalloc+set}" = set; then
12930   withval="$with_dmalloc"
12931
12932 cat >>confdefs.h <<EOF
12933 #define USE_DMALLOC 1
12934 EOF
12935
12936         : ${with_cflags:=-g}
12937         : ${with_no_leaks:=yes}
12938          with_dmalloc=yes
12939 else
12940   with_dmalloc=
12941 fi;
12942 echo "$as_me:12942: result: ${with_dmalloc:-no}" >&5
12943 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12944
12945 case .$with_cflags in #(vi
12946 .*-g*)
12947         case .$CFLAGS in #(vi
12948         .*-g*) #(vi
12949                 ;;
12950         *)
12951
12952 cf_fix_cppflags=no
12953 cf_new_cflags=
12954 cf_new_cppflags=
12955 cf_new_extra_cppflags=
12956
12957 for cf_add_cflags in -g
12958 do
12959 case $cf_fix_cppflags in
12960 no)
12961         case $cf_add_cflags in #(vi
12962         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12963                 case $cf_add_cflags in
12964                 -D*)
12965                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12966
12967                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12968                                 && test -z "${cf_tst_cflags}" \
12969                                 && cf_fix_cppflags=yes
12970
12971                         if test $cf_fix_cppflags = yes ; then
12972                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12973                                 continue
12974                         elif test "${cf_tst_cflags}" = "\"'" ; then
12975                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12976                                 continue
12977                         fi
12978                         ;;
12979                 esac
12980                 case "$CPPFLAGS" in
12981                 *$cf_add_cflags) #(vi
12982                         ;;
12983                 *) #(vi
12984                         case $cf_add_cflags in #(vi
12985                         -D*)
12986                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12987
12988 CPPFLAGS=`echo "$CPPFLAGS" | \
12989         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12990                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12991
12992                                 ;;
12993                         esac
12994                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12995                         ;;
12996                 esac
12997                 ;;
12998         *)
12999                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13000                 ;;
13001         esac
13002         ;;
13003 yes)
13004         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13005
13006         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13007
13008         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13009                 && test -z "${cf_tst_cflags}" \
13010                 && cf_fix_cppflags=no
13011         ;;
13012 esac
13013 done
13014
13015 if test -n "$cf_new_cflags" ; then
13016
13017         CFLAGS="$CFLAGS $cf_new_cflags"
13018 fi
13019
13020 if test -n "$cf_new_cppflags" ; then
13021
13022         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13023 fi
13024
13025 if test -n "$cf_new_extra_cppflags" ; then
13026
13027         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13028 fi
13029
13030                 ;;
13031         esac
13032         ;;
13033 esac
13034
13035 if test "$with_dmalloc" = yes ; then
13036         echo "$as_me:13036: checking for dmalloc.h" >&5
13037 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13038 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13039   echo $ECHO_N "(cached) $ECHO_C" >&6
13040 else
13041   cat >conftest.$ac_ext <<_ACEOF
13042 #line 13042 "configure"
13043 #include "confdefs.h"
13044 #include <dmalloc.h>
13045 _ACEOF
13046 if { (eval echo "$as_me:13046: \"$ac_cpp conftest.$ac_ext\"") >&5
13047   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13048   ac_status=$?
13049   egrep -v '^ *\+' conftest.er1 >conftest.err
13050   rm -f conftest.er1
13051   cat conftest.err >&5
13052   echo "$as_me:13052: \$? = $ac_status" >&5
13053   (exit $ac_status); } >/dev/null; then
13054   if test -s conftest.err; then
13055     ac_cpp_err=$ac_c_preproc_warn_flag
13056   else
13057     ac_cpp_err=
13058   fi
13059 else
13060   ac_cpp_err=yes
13061 fi
13062 if test -z "$ac_cpp_err"; then
13063   ac_cv_header_dmalloc_h=yes
13064 else
13065   echo "$as_me: failed program was:" >&5
13066   cat conftest.$ac_ext >&5
13067   ac_cv_header_dmalloc_h=no
13068 fi
13069 rm -f conftest.err conftest.$ac_ext
13070 fi
13071 echo "$as_me:13071: result: $ac_cv_header_dmalloc_h" >&5
13072 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13073 if test $ac_cv_header_dmalloc_h = yes; then
13074
13075 echo "$as_me:13075: checking for dmalloc_debug in -ldmalloc" >&5
13076 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13077 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13078   echo $ECHO_N "(cached) $ECHO_C" >&6
13079 else
13080   ac_check_lib_save_LIBS=$LIBS
13081 LIBS="-ldmalloc  $LIBS"
13082 cat >conftest.$ac_ext <<_ACEOF
13083 #line 13083 "configure"
13084 #include "confdefs.h"
13085
13086 /* Override any gcc2 internal prototype to avoid an error.  */
13087 #ifdef __cplusplus
13088 extern "C"
13089 #endif
13090 /* We use char because int might match the return type of a gcc2
13091    builtin and then its argument prototype would still apply.  */
13092 char dmalloc_debug ();
13093 int
13094 main ()
13095 {
13096 dmalloc_debug ();
13097   ;
13098   return 0;
13099 }
13100 _ACEOF
13101 rm -f conftest.$ac_objext conftest$ac_exeext
13102 if { (eval echo "$as_me:13102: \"$ac_link\"") >&5
13103   (eval $ac_link) 2>&5
13104   ac_status=$?
13105   echo "$as_me:13105: \$? = $ac_status" >&5
13106   (exit $ac_status); } &&
13107          { ac_try='test -s conftest$ac_exeext'
13108   { (eval echo "$as_me:13108: \"$ac_try\"") >&5
13109   (eval $ac_try) 2>&5
13110   ac_status=$?
13111   echo "$as_me:13111: \$? = $ac_status" >&5
13112   (exit $ac_status); }; }; then
13113   ac_cv_lib_dmalloc_dmalloc_debug=yes
13114 else
13115   echo "$as_me: failed program was:" >&5
13116 cat conftest.$ac_ext >&5
13117 ac_cv_lib_dmalloc_dmalloc_debug=no
13118 fi
13119 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13120 LIBS=$ac_check_lib_save_LIBS
13121 fi
13122 echo "$as_me:13122: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13123 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13124 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13125   cat >>confdefs.h <<EOF
13126 #define HAVE_LIBDMALLOC 1
13127 EOF
13128
13129   LIBS="-ldmalloc $LIBS"
13130
13131 fi
13132
13133 fi
13134
13135 fi
13136
13137 echo "$as_me:13137: checking if you want to use dbmalloc for testing" >&5
13138 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13139
13140 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13141 if test "${with_dbmalloc+set}" = set; then
13142   withval="$with_dbmalloc"
13143
13144 cat >>confdefs.h <<EOF
13145 #define USE_DBMALLOC 1
13146 EOF
13147
13148         : ${with_cflags:=-g}
13149         : ${with_no_leaks:=yes}
13150          with_dbmalloc=yes
13151 else
13152   with_dbmalloc=
13153 fi;
13154 echo "$as_me:13154: result: ${with_dbmalloc:-no}" >&5
13155 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13156
13157 case .$with_cflags in #(vi
13158 .*-g*)
13159         case .$CFLAGS in #(vi
13160         .*-g*) #(vi
13161                 ;;
13162         *)
13163
13164 cf_fix_cppflags=no
13165 cf_new_cflags=
13166 cf_new_cppflags=
13167 cf_new_extra_cppflags=
13168
13169 for cf_add_cflags in -g
13170 do
13171 case $cf_fix_cppflags in
13172 no)
13173         case $cf_add_cflags in #(vi
13174         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13175                 case $cf_add_cflags in
13176                 -D*)
13177                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13178
13179                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13180                                 && test -z "${cf_tst_cflags}" \
13181                                 && cf_fix_cppflags=yes
13182
13183                         if test $cf_fix_cppflags = yes ; then
13184                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13185                                 continue
13186                         elif test "${cf_tst_cflags}" = "\"'" ; then
13187                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13188                                 continue
13189                         fi
13190                         ;;
13191                 esac
13192                 case "$CPPFLAGS" in
13193                 *$cf_add_cflags) #(vi
13194                         ;;
13195                 *) #(vi
13196                         case $cf_add_cflags in #(vi
13197                         -D*)
13198                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13199
13200 CPPFLAGS=`echo "$CPPFLAGS" | \
13201         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13202                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13203
13204                                 ;;
13205                         esac
13206                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13207                         ;;
13208                 esac
13209                 ;;
13210         *)
13211                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13212                 ;;
13213         esac
13214         ;;
13215 yes)
13216         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13217
13218         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13219
13220         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13221                 && test -z "${cf_tst_cflags}" \
13222                 && cf_fix_cppflags=no
13223         ;;
13224 esac
13225 done
13226
13227 if test -n "$cf_new_cflags" ; then
13228
13229         CFLAGS="$CFLAGS $cf_new_cflags"
13230 fi
13231
13232 if test -n "$cf_new_cppflags" ; then
13233
13234         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13235 fi
13236
13237 if test -n "$cf_new_extra_cppflags" ; then
13238
13239         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13240 fi
13241
13242                 ;;
13243         esac
13244         ;;
13245 esac
13246
13247 if test "$with_dbmalloc" = yes ; then
13248         echo "$as_me:13248: checking for dbmalloc.h" >&5
13249 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13250 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13251   echo $ECHO_N "(cached) $ECHO_C" >&6
13252 else
13253   cat >conftest.$ac_ext <<_ACEOF
13254 #line 13254 "configure"
13255 #include "confdefs.h"
13256 #include <dbmalloc.h>
13257 _ACEOF
13258 if { (eval echo "$as_me:13258: \"$ac_cpp conftest.$ac_ext\"") >&5
13259   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13260   ac_status=$?
13261   egrep -v '^ *\+' conftest.er1 >conftest.err
13262   rm -f conftest.er1
13263   cat conftest.err >&5
13264   echo "$as_me:13264: \$? = $ac_status" >&5
13265   (exit $ac_status); } >/dev/null; then
13266   if test -s conftest.err; then
13267     ac_cpp_err=$ac_c_preproc_warn_flag
13268   else
13269     ac_cpp_err=
13270   fi
13271 else
13272   ac_cpp_err=yes
13273 fi
13274 if test -z "$ac_cpp_err"; then
13275   ac_cv_header_dbmalloc_h=yes
13276 else
13277   echo "$as_me: failed program was:" >&5
13278   cat conftest.$ac_ext >&5
13279   ac_cv_header_dbmalloc_h=no
13280 fi
13281 rm -f conftest.err conftest.$ac_ext
13282 fi
13283 echo "$as_me:13283: result: $ac_cv_header_dbmalloc_h" >&5
13284 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13285 if test $ac_cv_header_dbmalloc_h = yes; then
13286
13287 echo "$as_me:13287: checking for debug_malloc in -ldbmalloc" >&5
13288 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13289 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13290   echo $ECHO_N "(cached) $ECHO_C" >&6
13291 else
13292   ac_check_lib_save_LIBS=$LIBS
13293 LIBS="-ldbmalloc  $LIBS"
13294 cat >conftest.$ac_ext <<_ACEOF
13295 #line 13295 "configure"
13296 #include "confdefs.h"
13297
13298 /* Override any gcc2 internal prototype to avoid an error.  */
13299 #ifdef __cplusplus
13300 extern "C"
13301 #endif
13302 /* We use char because int might match the return type of a gcc2
13303    builtin and then its argument prototype would still apply.  */
13304 char debug_malloc ();
13305 int
13306 main ()
13307 {
13308 debug_malloc ();
13309   ;
13310   return 0;
13311 }
13312 _ACEOF
13313 rm -f conftest.$ac_objext conftest$ac_exeext
13314 if { (eval echo "$as_me:13314: \"$ac_link\"") >&5
13315   (eval $ac_link) 2>&5
13316   ac_status=$?
13317   echo "$as_me:13317: \$? = $ac_status" >&5
13318   (exit $ac_status); } &&
13319          { ac_try='test -s conftest$ac_exeext'
13320   { (eval echo "$as_me:13320: \"$ac_try\"") >&5
13321   (eval $ac_try) 2>&5
13322   ac_status=$?
13323   echo "$as_me:13323: \$? = $ac_status" >&5
13324   (exit $ac_status); }; }; then
13325   ac_cv_lib_dbmalloc_debug_malloc=yes
13326 else
13327   echo "$as_me: failed program was:" >&5
13328 cat conftest.$ac_ext >&5
13329 ac_cv_lib_dbmalloc_debug_malloc=no
13330 fi
13331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13332 LIBS=$ac_check_lib_save_LIBS
13333 fi
13334 echo "$as_me:13334: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13335 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13336 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13337   cat >>confdefs.h <<EOF
13338 #define HAVE_LIBDBMALLOC 1
13339 EOF
13340
13341   LIBS="-ldbmalloc $LIBS"
13342
13343 fi
13344
13345 fi
13346
13347 fi
13348
13349 echo "$as_me:13349: checking if you want to use valgrind for testing" >&5
13350 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13351
13352 # Check whether --with-valgrind or --without-valgrind was given.
13353 if test "${with_valgrind+set}" = set; then
13354   withval="$with_valgrind"
13355
13356 cat >>confdefs.h <<EOF
13357 #define USE_VALGRIND 1
13358 EOF
13359
13360         : ${with_cflags:=-g}
13361         : ${with_no_leaks:=yes}
13362          with_valgrind=yes
13363 else
13364   with_valgrind=
13365 fi;
13366 echo "$as_me:13366: result: ${with_valgrind:-no}" >&5
13367 echo "${ECHO_T}${with_valgrind:-no}" >&6
13368
13369 case .$with_cflags in #(vi
13370 .*-g*)
13371         case .$CFLAGS in #(vi
13372         .*-g*) #(vi
13373                 ;;
13374         *)
13375
13376 cf_fix_cppflags=no
13377 cf_new_cflags=
13378 cf_new_cppflags=
13379 cf_new_extra_cppflags=
13380
13381 for cf_add_cflags in -g
13382 do
13383 case $cf_fix_cppflags in
13384 no)
13385         case $cf_add_cflags in #(vi
13386         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13387                 case $cf_add_cflags in
13388                 -D*)
13389                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13390
13391                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13392                                 && test -z "${cf_tst_cflags}" \
13393                                 && cf_fix_cppflags=yes
13394
13395                         if test $cf_fix_cppflags = yes ; then
13396                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13397                                 continue
13398                         elif test "${cf_tst_cflags}" = "\"'" ; then
13399                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13400                                 continue
13401                         fi
13402                         ;;
13403                 esac
13404                 case "$CPPFLAGS" in
13405                 *$cf_add_cflags) #(vi
13406                         ;;
13407                 *) #(vi
13408                         case $cf_add_cflags in #(vi
13409                         -D*)
13410                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13411
13412 CPPFLAGS=`echo "$CPPFLAGS" | \
13413         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13414                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13415
13416                                 ;;
13417                         esac
13418                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13419                         ;;
13420                 esac
13421                 ;;
13422         *)
13423                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13424                 ;;
13425         esac
13426         ;;
13427 yes)
13428         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13429
13430         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13431
13432         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13433                 && test -z "${cf_tst_cflags}" \
13434                 && cf_fix_cppflags=no
13435         ;;
13436 esac
13437 done
13438
13439 if test -n "$cf_new_cflags" ; then
13440
13441         CFLAGS="$CFLAGS $cf_new_cflags"
13442 fi
13443
13444 if test -n "$cf_new_cppflags" ; then
13445
13446         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13447 fi
13448
13449 if test -n "$cf_new_extra_cppflags" ; then
13450
13451         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13452 fi
13453
13454                 ;;
13455         esac
13456         ;;
13457 esac
13458
13459 echo "$as_me:13459: checking if you want to perform memory-leak testing" >&5
13460 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13461
13462 # Check whether --enable-leaks or --disable-leaks was given.
13463 if test "${enable_leaks+set}" = set; then
13464   enableval="$enable_leaks"
13465   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13466 else
13467   : ${with_no_leaks:=no}
13468 fi;
13469 echo "$as_me:13469: result: $with_no_leaks" >&5
13470 echo "${ECHO_T}$with_no_leaks" >&6
13471
13472 if test "$with_no_leaks" = yes ; then
13473
13474 cat >>confdefs.h <<\EOF
13475 #define NO_LEAKS 1
13476 EOF
13477
13478 cat >>confdefs.h <<\EOF
13479 #define YY_NO_LEAKS 1
13480 EOF
13481
13482 fi
13483
13484 cat >>confdefs.h <<\EOF
13485 #define HAVE_NC_ALLOC_H 1
13486 EOF
13487
13488 ###     use option --enable-expanded to generate certain macros as functions
13489
13490 # Check whether --enable-expanded or --disable-expanded was given.
13491 if test "${enable_expanded+set}" = set; then
13492   enableval="$enable_expanded"
13493   test "x$enableval" = xyes &&
13494 cat >>confdefs.h <<\EOF
13495 #define NCURSES_EXPANDED 1
13496 EOF
13497
13498 fi;
13499
13500 ###     use option --disable-macros to suppress macros in favor of functions
13501
13502 # Check whether --enable-macros or --disable-macros was given.
13503 if test "${enable_macros+set}" = set; then
13504   enableval="$enable_macros"
13505   test "$enableval" = no &&
13506 cat >>confdefs.h <<\EOF
13507 #define NCURSES_NOMACROS 1
13508 EOF
13509
13510 fi;
13511
13512 # Normally we only add trace() to the debug-library.  Allow this to be
13513 # extended to all models of the ncurses library:
13514 cf_all_traces=no
13515 case "$CFLAGS $CPPFLAGS" in
13516 *-DTRACE*)
13517         cf_all_traces=yes
13518         ;;
13519 esac
13520
13521 echo "$as_me:13521: checking whether to add trace feature to all models" >&5
13522 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13523
13524 # Check whether --with-trace or --without-trace was given.
13525 if test "${with_trace+set}" = set; then
13526   withval="$with_trace"
13527   cf_with_trace=$withval
13528 else
13529   cf_with_trace=$cf_all_traces
13530 fi;
13531 echo "$as_me:13531: result: $cf_with_trace" >&5
13532 echo "${ECHO_T}$cf_with_trace" >&6
13533
13534 if test "x$cf_with_trace" = xyes ; then
13535         LIB_TRACING=all
13536         ADA_TRACE=TRUE
13537
13538 cf_fix_cppflags=no
13539 cf_new_cflags=
13540 cf_new_cppflags=
13541 cf_new_extra_cppflags=
13542
13543 for cf_add_cflags in -DTRACE
13544 do
13545 case $cf_fix_cppflags in
13546 no)
13547         case $cf_add_cflags in #(vi
13548         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13549                 case $cf_add_cflags in
13550                 -D*)
13551                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13552
13553                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13554                                 && test -z "${cf_tst_cflags}" \
13555                                 && cf_fix_cppflags=yes
13556
13557                         if test $cf_fix_cppflags = yes ; then
13558                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13559                                 continue
13560                         elif test "${cf_tst_cflags}" = "\"'" ; then
13561                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13562                                 continue
13563                         fi
13564                         ;;
13565                 esac
13566                 case "$CPPFLAGS" in
13567                 *$cf_add_cflags) #(vi
13568                         ;;
13569                 *) #(vi
13570                         case $cf_add_cflags in #(vi
13571                         -D*)
13572                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13573
13574 CPPFLAGS=`echo "$CPPFLAGS" | \
13575         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13576                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13577
13578                                 ;;
13579                         esac
13580                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13581                         ;;
13582                 esac
13583                 ;;
13584         *)
13585                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13586                 ;;
13587         esac
13588         ;;
13589 yes)
13590         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13591
13592         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13593
13594         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13595                 && test -z "${cf_tst_cflags}" \
13596                 && cf_fix_cppflags=no
13597         ;;
13598 esac
13599 done
13600
13601 if test -n "$cf_new_cflags" ; then
13602
13603         CFLAGS="$CFLAGS $cf_new_cflags"
13604 fi
13605
13606 if test -n "$cf_new_cppflags" ; then
13607
13608         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13609 fi
13610
13611 if test -n "$cf_new_extra_cppflags" ; then
13612
13613         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13614 fi
13615
13616 else
13617         LIB_TRACING=DEBUG
13618         ADA_TRACE=FALSE
13619 fi
13620
13621 ###     Checks for libraries.
13622 case $cf_cv_system_name in #(vi
13623 *mingw32*) #(vi
13624         ;;
13625 *)
13626 echo "$as_me:13626: checking for gettimeofday" >&5
13627 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13628 if test "${ac_cv_func_gettimeofday+set}" = set; then
13629   echo $ECHO_N "(cached) $ECHO_C" >&6
13630 else
13631   cat >conftest.$ac_ext <<_ACEOF
13632 #line 13632 "configure"
13633 #include "confdefs.h"
13634 /* System header to define __stub macros and hopefully few prototypes,
13635     which can conflict with char gettimeofday (); below.  */
13636 #include <assert.h>
13637 /* Override any gcc2 internal prototype to avoid an error.  */
13638 #ifdef __cplusplus
13639 extern "C"
13640 #endif
13641 /* We use char because int might match the return type of a gcc2
13642    builtin and then its argument prototype would still apply.  */
13643 char gettimeofday ();
13644 char (*f) ();
13645
13646 int
13647 main ()
13648 {
13649 /* The GNU C library defines this for functions which it implements
13650     to always fail with ENOSYS.  Some functions are actually named
13651     something starting with __ and the normal name is an alias.  */
13652 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13653 choke me
13654 #else
13655 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13656 #endif
13657
13658   ;
13659   return 0;
13660 }
13661 _ACEOF
13662 rm -f conftest.$ac_objext conftest$ac_exeext
13663 if { (eval echo "$as_me:13663: \"$ac_link\"") >&5
13664   (eval $ac_link) 2>&5
13665   ac_status=$?
13666   echo "$as_me:13666: \$? = $ac_status" >&5
13667   (exit $ac_status); } &&
13668          { ac_try='test -s conftest$ac_exeext'
13669   { (eval echo "$as_me:13669: \"$ac_try\"") >&5
13670   (eval $ac_try) 2>&5
13671   ac_status=$?
13672   echo "$as_me:13672: \$? = $ac_status" >&5
13673   (exit $ac_status); }; }; then
13674   ac_cv_func_gettimeofday=yes
13675 else
13676   echo "$as_me: failed program was:" >&5
13677 cat conftest.$ac_ext >&5
13678 ac_cv_func_gettimeofday=no
13679 fi
13680 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13681 fi
13682 echo "$as_me:13682: result: $ac_cv_func_gettimeofday" >&5
13683 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13684 if test $ac_cv_func_gettimeofday = yes; then
13685
13686 cat >>confdefs.h <<\EOF
13687 #define HAVE_GETTIMEOFDAY 1
13688 EOF
13689
13690 else
13691
13692 echo "$as_me:13692: checking for gettimeofday in -lbsd" >&5
13693 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13694 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13695   echo $ECHO_N "(cached) $ECHO_C" >&6
13696 else
13697   ac_check_lib_save_LIBS=$LIBS
13698 LIBS="-lbsd  $LIBS"
13699 cat >conftest.$ac_ext <<_ACEOF
13700 #line 13700 "configure"
13701 #include "confdefs.h"
13702
13703 /* Override any gcc2 internal prototype to avoid an error.  */
13704 #ifdef __cplusplus
13705 extern "C"
13706 #endif
13707 /* We use char because int might match the return type of a gcc2
13708    builtin and then its argument prototype would still apply.  */
13709 char gettimeofday ();
13710 int
13711 main ()
13712 {
13713 gettimeofday ();
13714   ;
13715   return 0;
13716 }
13717 _ACEOF
13718 rm -f conftest.$ac_objext conftest$ac_exeext
13719 if { (eval echo "$as_me:13719: \"$ac_link\"") >&5
13720   (eval $ac_link) 2>&5
13721   ac_status=$?
13722   echo "$as_me:13722: \$? = $ac_status" >&5
13723   (exit $ac_status); } &&
13724          { ac_try='test -s conftest$ac_exeext'
13725   { (eval echo "$as_me:13725: \"$ac_try\"") >&5
13726   (eval $ac_try) 2>&5
13727   ac_status=$?
13728   echo "$as_me:13728: \$? = $ac_status" >&5
13729   (exit $ac_status); }; }; then
13730   ac_cv_lib_bsd_gettimeofday=yes
13731 else
13732   echo "$as_me: failed program was:" >&5
13733 cat conftest.$ac_ext >&5
13734 ac_cv_lib_bsd_gettimeofday=no
13735 fi
13736 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13737 LIBS=$ac_check_lib_save_LIBS
13738 fi
13739 echo "$as_me:13739: result: $ac_cv_lib_bsd_gettimeofday" >&5
13740 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13741 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13742
13743 cat >>confdefs.h <<\EOF
13744 #define HAVE_GETTIMEOFDAY 1
13745 EOF
13746
13747         LIBS="-lbsd $LIBS"
13748 fi
13749
13750 fi
13751         ;;
13752 esac
13753
13754 echo "$as_me:13754: checking if -lm needed for math functions" >&5
13755 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13756 if test "${cf_cv_need_libm+set}" = set; then
13757   echo $ECHO_N "(cached) $ECHO_C" >&6
13758 else
13759
13760         cat >conftest.$ac_ext <<_ACEOF
13761 #line 13761 "configure"
13762 #include "confdefs.h"
13763
13764         #include <stdio.h>
13765         #include <math.h>
13766
13767 int
13768 main ()
13769 {
13770 double x = rand(); printf("result = %g\n", pow(sin(x),x))
13771   ;
13772   return 0;
13773 }
13774 _ACEOF
13775 rm -f conftest.$ac_objext conftest$ac_exeext
13776 if { (eval echo "$as_me:13776: \"$ac_link\"") >&5
13777   (eval $ac_link) 2>&5
13778   ac_status=$?
13779   echo "$as_me:13779: \$? = $ac_status" >&5
13780   (exit $ac_status); } &&
13781          { ac_try='test -s conftest$ac_exeext'
13782   { (eval echo "$as_me:13782: \"$ac_try\"") >&5
13783   (eval $ac_try) 2>&5
13784   ac_status=$?
13785   echo "$as_me:13785: \$? = $ac_status" >&5
13786   (exit $ac_status); }; }; then
13787   cf_cv_need_libm=no
13788 else
13789   echo "$as_me: failed program was:" >&5
13790 cat conftest.$ac_ext >&5
13791 cf_cv_need_libm=yes
13792 fi
13793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13794 fi
13795 echo "$as_me:13795: result: $cf_cv_need_libm" >&5
13796 echo "${ECHO_T}$cf_cv_need_libm" >&6
13797 if test "$cf_cv_need_libm" = yes
13798 then
13799 MATH_LIB=-lm
13800 fi
13801
13802 ###     Checks for header files.
13803 echo "$as_me:13803: checking for ANSI C header files" >&5
13804 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13805 if test "${ac_cv_header_stdc+set}" = set; then
13806   echo $ECHO_N "(cached) $ECHO_C" >&6
13807 else
13808   cat >conftest.$ac_ext <<_ACEOF
13809 #line 13809 "configure"
13810 #include "confdefs.h"
13811 #include <stdlib.h>
13812 #include <stdarg.h>
13813 #include <string.h>
13814 #include <float.h>
13815
13816 _ACEOF
13817 if { (eval echo "$as_me:13817: \"$ac_cpp conftest.$ac_ext\"") >&5
13818   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13819   ac_status=$?
13820   egrep -v '^ *\+' conftest.er1 >conftest.err
13821   rm -f conftest.er1
13822   cat conftest.err >&5
13823   echo "$as_me:13823: \$? = $ac_status" >&5
13824   (exit $ac_status); } >/dev/null; then
13825   if test -s conftest.err; then
13826     ac_cpp_err=$ac_c_preproc_warn_flag
13827   else
13828     ac_cpp_err=
13829   fi
13830 else
13831   ac_cpp_err=yes
13832 fi
13833 if test -z "$ac_cpp_err"; then
13834   ac_cv_header_stdc=yes
13835 else
13836   echo "$as_me: failed program was:" >&5
13837   cat conftest.$ac_ext >&5
13838   ac_cv_header_stdc=no
13839 fi
13840 rm -f conftest.err conftest.$ac_ext
13841
13842 if test $ac_cv_header_stdc = yes; then
13843   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13844   cat >conftest.$ac_ext <<_ACEOF
13845 #line 13845 "configure"
13846 #include "confdefs.h"
13847 #include <string.h>
13848
13849 _ACEOF
13850 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13851   egrep "memchr" >/dev/null 2>&1; then
13852   :
13853 else
13854   ac_cv_header_stdc=no
13855 fi
13856 rm -rf conftest*
13857
13858 fi
13859
13860 if test $ac_cv_header_stdc = yes; then
13861   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13862   cat >conftest.$ac_ext <<_ACEOF
13863 #line 13863 "configure"
13864 #include "confdefs.h"
13865 #include <stdlib.h>
13866
13867 _ACEOF
13868 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13869   egrep "free" >/dev/null 2>&1; then
13870   :
13871 else
13872   ac_cv_header_stdc=no
13873 fi
13874 rm -rf conftest*
13875
13876 fi
13877
13878 if test $ac_cv_header_stdc = yes; then
13879   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13880   if test "$cross_compiling" = yes; then
13881   :
13882 else
13883   cat >conftest.$ac_ext <<_ACEOF
13884 #line 13884 "configure"
13885 #include "confdefs.h"
13886 #include <ctype.h>
13887 #if ((' ' & 0x0FF) == 0x020)
13888 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13889 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13890 #else
13891 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13892                      || ('j' <= (c) && (c) <= 'r') \
13893                      || ('s' <= (c) && (c) <= 'z'))
13894 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13895 #endif
13896
13897 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13898 int
13899 main ()
13900 {
13901   int i;
13902   for (i = 0; i < 256; i++)
13903     if (XOR (islower (i), ISLOWER (i))
13904         || toupper (i) != TOUPPER (i))
13905       $ac_main_return(2);
13906   $ac_main_return (0);
13907 }
13908 _ACEOF
13909 rm -f conftest$ac_exeext
13910 if { (eval echo "$as_me:13910: \"$ac_link\"") >&5
13911   (eval $ac_link) 2>&5
13912   ac_status=$?
13913   echo "$as_me:13913: \$? = $ac_status" >&5
13914   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13915   { (eval echo "$as_me:13915: \"$ac_try\"") >&5
13916   (eval $ac_try) 2>&5
13917   ac_status=$?
13918   echo "$as_me:13918: \$? = $ac_status" >&5
13919   (exit $ac_status); }; }; then
13920   :
13921 else
13922   echo "$as_me: program exited with status $ac_status" >&5
13923 echo "$as_me: failed program was:" >&5
13924 cat conftest.$ac_ext >&5
13925 ac_cv_header_stdc=no
13926 fi
13927 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13928 fi
13929 fi
13930 fi
13931 echo "$as_me:13931: result: $ac_cv_header_stdc" >&5
13932 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13933 if test $ac_cv_header_stdc = yes; then
13934
13935 cat >>confdefs.h <<\EOF
13936 #define STDC_HEADERS 1
13937 EOF
13938
13939 fi
13940
13941 ac_header_dirent=no
13942 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13943   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13944 echo "$as_me:13944: checking for $ac_hdr that defines DIR" >&5
13945 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13946 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13947   echo $ECHO_N "(cached) $ECHO_C" >&6
13948 else
13949   cat >conftest.$ac_ext <<_ACEOF
13950 #line 13950 "configure"
13951 #include "confdefs.h"
13952 #include <sys/types.h>
13953 #include <$ac_hdr>
13954
13955 int
13956 main ()
13957 {
13958 if ((DIR *) 0)
13959 return 0;
13960   ;
13961   return 0;
13962 }
13963 _ACEOF
13964 rm -f conftest.$ac_objext
13965 if { (eval echo "$as_me:13965: \"$ac_compile\"") >&5
13966   (eval $ac_compile) 2>&5
13967   ac_status=$?
13968   echo "$as_me:13968: \$? = $ac_status" >&5
13969   (exit $ac_status); } &&
13970          { ac_try='test -s conftest.$ac_objext'
13971   { (eval echo "$as_me:13971: \"$ac_try\"") >&5
13972   (eval $ac_try) 2>&5
13973   ac_status=$?
13974   echo "$as_me:13974: \$? = $ac_status" >&5
13975   (exit $ac_status); }; }; then
13976   eval "$as_ac_Header=yes"
13977 else
13978   echo "$as_me: failed program was:" >&5
13979 cat conftest.$ac_ext >&5
13980 eval "$as_ac_Header=no"
13981 fi
13982 rm -f conftest.$ac_objext conftest.$ac_ext
13983 fi
13984 echo "$as_me:13984: result: `eval echo '${'$as_ac_Header'}'`" >&5
13985 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13986 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13987   cat >>confdefs.h <<EOF
13988 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13989 EOF
13990
13991 ac_header_dirent=$ac_hdr; break
13992 fi
13993
13994 done
13995 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13996 if test $ac_header_dirent = dirent.h; then
13997   echo "$as_me:13997: checking for opendir in -ldir" >&5
13998 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13999 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14000   echo $ECHO_N "(cached) $ECHO_C" >&6
14001 else
14002   ac_check_lib_save_LIBS=$LIBS
14003 LIBS="-ldir  $LIBS"
14004 cat >conftest.$ac_ext <<_ACEOF
14005 #line 14005 "configure"
14006 #include "confdefs.h"
14007
14008 /* Override any gcc2 internal prototype to avoid an error.  */
14009 #ifdef __cplusplus
14010 extern "C"
14011 #endif
14012 /* We use char because int might match the return type of a gcc2
14013    builtin and then its argument prototype would still apply.  */
14014 char opendir ();
14015 int
14016 main ()
14017 {
14018 opendir ();
14019   ;
14020   return 0;
14021 }
14022 _ACEOF
14023 rm -f conftest.$ac_objext conftest$ac_exeext
14024 if { (eval echo "$as_me:14024: \"$ac_link\"") >&5
14025   (eval $ac_link) 2>&5
14026   ac_status=$?
14027   echo "$as_me:14027: \$? = $ac_status" >&5
14028   (exit $ac_status); } &&
14029          { ac_try='test -s conftest$ac_exeext'
14030   { (eval echo "$as_me:14030: \"$ac_try\"") >&5
14031   (eval $ac_try) 2>&5
14032   ac_status=$?
14033   echo "$as_me:14033: \$? = $ac_status" >&5
14034   (exit $ac_status); }; }; then
14035   ac_cv_lib_dir_opendir=yes
14036 else
14037   echo "$as_me: failed program was:" >&5
14038 cat conftest.$ac_ext >&5
14039 ac_cv_lib_dir_opendir=no
14040 fi
14041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14042 LIBS=$ac_check_lib_save_LIBS
14043 fi
14044 echo "$as_me:14044: result: $ac_cv_lib_dir_opendir" >&5
14045 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14046 if test $ac_cv_lib_dir_opendir = yes; then
14047   LIBS="$LIBS -ldir"
14048 fi
14049
14050 else
14051   echo "$as_me:14051: checking for opendir in -lx" >&5
14052 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14053 if test "${ac_cv_lib_x_opendir+set}" = set; then
14054   echo $ECHO_N "(cached) $ECHO_C" >&6
14055 else
14056   ac_check_lib_save_LIBS=$LIBS
14057 LIBS="-lx  $LIBS"
14058 cat >conftest.$ac_ext <<_ACEOF
14059 #line 14059 "configure"
14060 #include "confdefs.h"
14061
14062 /* Override any gcc2 internal prototype to avoid an error.  */
14063 #ifdef __cplusplus
14064 extern "C"
14065 #endif
14066 /* We use char because int might match the return type of a gcc2
14067    builtin and then its argument prototype would still apply.  */
14068 char opendir ();
14069 int
14070 main ()
14071 {
14072 opendir ();
14073   ;
14074   return 0;
14075 }
14076 _ACEOF
14077 rm -f conftest.$ac_objext conftest$ac_exeext
14078 if { (eval echo "$as_me:14078: \"$ac_link\"") >&5
14079   (eval $ac_link) 2>&5
14080   ac_status=$?
14081   echo "$as_me:14081: \$? = $ac_status" >&5
14082   (exit $ac_status); } &&
14083          { ac_try='test -s conftest$ac_exeext'
14084   { (eval echo "$as_me:14084: \"$ac_try\"") >&5
14085   (eval $ac_try) 2>&5
14086   ac_status=$?
14087   echo "$as_me:14087: \$? = $ac_status" >&5
14088   (exit $ac_status); }; }; then
14089   ac_cv_lib_x_opendir=yes
14090 else
14091   echo "$as_me: failed program was:" >&5
14092 cat conftest.$ac_ext >&5
14093 ac_cv_lib_x_opendir=no
14094 fi
14095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14096 LIBS=$ac_check_lib_save_LIBS
14097 fi
14098 echo "$as_me:14098: result: $ac_cv_lib_x_opendir" >&5
14099 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14100 if test $ac_cv_lib_x_opendir = yes; then
14101   LIBS="$LIBS -lx"
14102 fi
14103
14104 fi
14105
14106 echo "$as_me:14106: checking whether time.h and sys/time.h may both be included" >&5
14107 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14108 if test "${ac_cv_header_time+set}" = set; then
14109   echo $ECHO_N "(cached) $ECHO_C" >&6
14110 else
14111   cat >conftest.$ac_ext <<_ACEOF
14112 #line 14112 "configure"
14113 #include "confdefs.h"
14114 #include <sys/types.h>
14115 #include <sys/time.h>
14116 #include <time.h>
14117
14118 int
14119 main ()
14120 {
14121 if ((struct tm *) 0)
14122 return 0;
14123   ;
14124   return 0;
14125 }
14126 _ACEOF
14127 rm -f conftest.$ac_objext
14128 if { (eval echo "$as_me:14128: \"$ac_compile\"") >&5
14129   (eval $ac_compile) 2>&5
14130   ac_status=$?
14131   echo "$as_me:14131: \$? = $ac_status" >&5
14132   (exit $ac_status); } &&
14133          { ac_try='test -s conftest.$ac_objext'
14134   { (eval echo "$as_me:14134: \"$ac_try\"") >&5
14135   (eval $ac_try) 2>&5
14136   ac_status=$?
14137   echo "$as_me:14137: \$? = $ac_status" >&5
14138   (exit $ac_status); }; }; then
14139   ac_cv_header_time=yes
14140 else
14141   echo "$as_me: failed program was:" >&5
14142 cat conftest.$ac_ext >&5
14143 ac_cv_header_time=no
14144 fi
14145 rm -f conftest.$ac_objext conftest.$ac_ext
14146 fi
14147 echo "$as_me:14147: result: $ac_cv_header_time" >&5
14148 echo "${ECHO_T}$ac_cv_header_time" >&6
14149 if test $ac_cv_header_time = yes; then
14150
14151 cat >>confdefs.h <<\EOF
14152 #define TIME_WITH_SYS_TIME 1
14153 EOF
14154
14155 fi
14156
14157 cf_regex_func=no
14158
14159 cf_regex_libs="regex re"
14160 case $host_os in #(vi
14161 mingw*)
14162         cf_regex_libs="gnurx $cf_regex_libs"
14163         ;;
14164 esac
14165
14166 echo "$as_me:14166: checking for regcomp" >&5
14167 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14168 if test "${ac_cv_func_regcomp+set}" = set; then
14169   echo $ECHO_N "(cached) $ECHO_C" >&6
14170 else
14171   cat >conftest.$ac_ext <<_ACEOF
14172 #line 14172 "configure"
14173 #include "confdefs.h"
14174 /* System header to define __stub macros and hopefully few prototypes,
14175     which can conflict with char regcomp (); below.  */
14176 #include <assert.h>
14177 /* Override any gcc2 internal prototype to avoid an error.  */
14178 #ifdef __cplusplus
14179 extern "C"
14180 #endif
14181 /* We use char because int might match the return type of a gcc2
14182    builtin and then its argument prototype would still apply.  */
14183 char regcomp ();
14184 char (*f) ();
14185
14186 int
14187 main ()
14188 {
14189 /* The GNU C library defines this for functions which it implements
14190     to always fail with ENOSYS.  Some functions are actually named
14191     something starting with __ and the normal name is an alias.  */
14192 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14193 choke me
14194 #else
14195 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14196 #endif
14197
14198   ;
14199   return 0;
14200 }
14201 _ACEOF
14202 rm -f conftest.$ac_objext conftest$ac_exeext
14203 if { (eval echo "$as_me:14203: \"$ac_link\"") >&5
14204   (eval $ac_link) 2>&5
14205   ac_status=$?
14206   echo "$as_me:14206: \$? = $ac_status" >&5
14207   (exit $ac_status); } &&
14208          { ac_try='test -s conftest$ac_exeext'
14209   { (eval echo "$as_me:14209: \"$ac_try\"") >&5
14210   (eval $ac_try) 2>&5
14211   ac_status=$?
14212   echo "$as_me:14212: \$? = $ac_status" >&5
14213   (exit $ac_status); }; }; then
14214   ac_cv_func_regcomp=yes
14215 else
14216   echo "$as_me: failed program was:" >&5
14217 cat conftest.$ac_ext >&5
14218 ac_cv_func_regcomp=no
14219 fi
14220 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14221 fi
14222 echo "$as_me:14222: result: $ac_cv_func_regcomp" >&5
14223 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14224 if test $ac_cv_func_regcomp = yes; then
14225   cf_regex_func=regcomp
14226 else
14227
14228         for cf_regex_lib in $cf_regex_libs
14229         do
14230                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14231 echo "$as_me:14231: checking for regcomp in -l$cf_regex_lib" >&5
14232 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14233 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14234   echo $ECHO_N "(cached) $ECHO_C" >&6
14235 else
14236   ac_check_lib_save_LIBS=$LIBS
14237 LIBS="-l$cf_regex_lib  $LIBS"
14238 cat >conftest.$ac_ext <<_ACEOF
14239 #line 14239 "configure"
14240 #include "confdefs.h"
14241
14242 /* Override any gcc2 internal prototype to avoid an error.  */
14243 #ifdef __cplusplus
14244 extern "C"
14245 #endif
14246 /* We use char because int might match the return type of a gcc2
14247    builtin and then its argument prototype would still apply.  */
14248 char regcomp ();
14249 int
14250 main ()
14251 {
14252 regcomp ();
14253   ;
14254   return 0;
14255 }
14256 _ACEOF
14257 rm -f conftest.$ac_objext conftest$ac_exeext
14258 if { (eval echo "$as_me:14258: \"$ac_link\"") >&5
14259   (eval $ac_link) 2>&5
14260   ac_status=$?
14261   echo "$as_me:14261: \$? = $ac_status" >&5
14262   (exit $ac_status); } &&
14263          { ac_try='test -s conftest$ac_exeext'
14264   { (eval echo "$as_me:14264: \"$ac_try\"") >&5
14265   (eval $ac_try) 2>&5
14266   ac_status=$?
14267   echo "$as_me:14267: \$? = $ac_status" >&5
14268   (exit $ac_status); }; }; then
14269   eval "$as_ac_Lib=yes"
14270 else
14271   echo "$as_me: failed program was:" >&5
14272 cat conftest.$ac_ext >&5
14273 eval "$as_ac_Lib=no"
14274 fi
14275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14276 LIBS=$ac_check_lib_save_LIBS
14277 fi
14278 echo "$as_me:14278: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14279 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14280 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14281
14282                                 LIBS="-l$cf_regex_lib $LIBS"
14283                                 cf_regex_func=regcomp
14284                                 break
14285 fi
14286
14287         done
14288
14289 fi
14290
14291 if test "$cf_regex_func" = no ; then
14292         echo "$as_me:14292: checking for compile" >&5
14293 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14294 if test "${ac_cv_func_compile+set}" = set; then
14295   echo $ECHO_N "(cached) $ECHO_C" >&6
14296 else
14297   cat >conftest.$ac_ext <<_ACEOF
14298 #line 14298 "configure"
14299 #include "confdefs.h"
14300 /* System header to define __stub macros and hopefully few prototypes,
14301     which can conflict with char compile (); below.  */
14302 #include <assert.h>
14303 /* Override any gcc2 internal prototype to avoid an error.  */
14304 #ifdef __cplusplus
14305 extern "C"
14306 #endif
14307 /* We use char because int might match the return type of a gcc2
14308    builtin and then its argument prototype would still apply.  */
14309 char compile ();
14310 char (*f) ();
14311
14312 int
14313 main ()
14314 {
14315 /* The GNU C library defines this for functions which it implements
14316     to always fail with ENOSYS.  Some functions are actually named
14317     something starting with __ and the normal name is an alias.  */
14318 #if defined (__stub_compile) || defined (__stub___compile)
14319 choke me
14320 #else
14321 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14322 #endif
14323
14324   ;
14325   return 0;
14326 }
14327 _ACEOF
14328 rm -f conftest.$ac_objext conftest$ac_exeext
14329 if { (eval echo "$as_me:14329: \"$ac_link\"") >&5
14330   (eval $ac_link) 2>&5
14331   ac_status=$?
14332   echo "$as_me:14332: \$? = $ac_status" >&5
14333   (exit $ac_status); } &&
14334          { ac_try='test -s conftest$ac_exeext'
14335   { (eval echo "$as_me:14335: \"$ac_try\"") >&5
14336   (eval $ac_try) 2>&5
14337   ac_status=$?
14338   echo "$as_me:14338: \$? = $ac_status" >&5
14339   (exit $ac_status); }; }; then
14340   ac_cv_func_compile=yes
14341 else
14342   echo "$as_me: failed program was:" >&5
14343 cat conftest.$ac_ext >&5
14344 ac_cv_func_compile=no
14345 fi
14346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14347 fi
14348 echo "$as_me:14348: result: $ac_cv_func_compile" >&5
14349 echo "${ECHO_T}$ac_cv_func_compile" >&6
14350 if test $ac_cv_func_compile = yes; then
14351   cf_regex_func=compile
14352 else
14353
14354                 echo "$as_me:14354: checking for compile in -lgen" >&5
14355 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14356 if test "${ac_cv_lib_gen_compile+set}" = set; then
14357   echo $ECHO_N "(cached) $ECHO_C" >&6
14358 else
14359   ac_check_lib_save_LIBS=$LIBS
14360 LIBS="-lgen  $LIBS"
14361 cat >conftest.$ac_ext <<_ACEOF
14362 #line 14362 "configure"
14363 #include "confdefs.h"
14364
14365 /* Override any gcc2 internal prototype to avoid an error.  */
14366 #ifdef __cplusplus
14367 extern "C"
14368 #endif
14369 /* We use char because int might match the return type of a gcc2
14370    builtin and then its argument prototype would still apply.  */
14371 char compile ();
14372 int
14373 main ()
14374 {
14375 compile ();
14376   ;
14377   return 0;
14378 }
14379 _ACEOF
14380 rm -f conftest.$ac_objext conftest$ac_exeext
14381 if { (eval echo "$as_me:14381: \"$ac_link\"") >&5
14382   (eval $ac_link) 2>&5
14383   ac_status=$?
14384   echo "$as_me:14384: \$? = $ac_status" >&5
14385   (exit $ac_status); } &&
14386          { ac_try='test -s conftest$ac_exeext'
14387   { (eval echo "$as_me:14387: \"$ac_try\"") >&5
14388   (eval $ac_try) 2>&5
14389   ac_status=$?
14390   echo "$as_me:14390: \$? = $ac_status" >&5
14391   (exit $ac_status); }; }; then
14392   ac_cv_lib_gen_compile=yes
14393 else
14394   echo "$as_me: failed program was:" >&5
14395 cat conftest.$ac_ext >&5
14396 ac_cv_lib_gen_compile=no
14397 fi
14398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14399 LIBS=$ac_check_lib_save_LIBS
14400 fi
14401 echo "$as_me:14401: result: $ac_cv_lib_gen_compile" >&5
14402 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14403 if test $ac_cv_lib_gen_compile = yes; then
14404
14405                                 LIBS="-lgen $LIBS"
14406                                 cf_regex_func=compile
14407 fi
14408
14409 fi
14410
14411 fi
14412
14413 if test "$cf_regex_func" = no ; then
14414         { echo "$as_me:14414: WARNING: cannot find regular expression library" >&5
14415 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14416 fi
14417
14418 echo "$as_me:14418: checking for regular-expression headers" >&5
14419 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14420 if test "${cf_cv_regex_hdrs+set}" = set; then
14421   echo $ECHO_N "(cached) $ECHO_C" >&6
14422 else
14423
14424 cf_cv_regex_hdrs=no
14425 case $cf_regex_func in #(vi
14426 compile) #(vi
14427         for cf_regex_hdr in regexp.h regexpr.h
14428         do
14429                 cat >conftest.$ac_ext <<_ACEOF
14430 #line 14430 "configure"
14431 #include "confdefs.h"
14432 #include <$cf_regex_hdr>
14433 int
14434 main ()
14435 {
14436
14437                         char *p = compile("", "", "", 0);
14438                         int x = step("", "");
14439
14440   ;
14441   return 0;
14442 }
14443 _ACEOF
14444 rm -f conftest.$ac_objext conftest$ac_exeext
14445 if { (eval echo "$as_me:14445: \"$ac_link\"") >&5
14446   (eval $ac_link) 2>&5
14447   ac_status=$?
14448   echo "$as_me:14448: \$? = $ac_status" >&5
14449   (exit $ac_status); } &&
14450          { ac_try='test -s conftest$ac_exeext'
14451   { (eval echo "$as_me:14451: \"$ac_try\"") >&5
14452   (eval $ac_try) 2>&5
14453   ac_status=$?
14454   echo "$as_me:14454: \$? = $ac_status" >&5
14455   (exit $ac_status); }; }; then
14456
14457                         cf_cv_regex_hdrs=$cf_regex_hdr
14458                         break
14459
14460 else
14461   echo "$as_me: failed program was:" >&5
14462 cat conftest.$ac_ext >&5
14463 fi
14464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14465         done
14466         ;;
14467 *)
14468         for cf_regex_hdr in regex.h
14469         do
14470                 cat >conftest.$ac_ext <<_ACEOF
14471 #line 14471 "configure"
14472 #include "confdefs.h"
14473 #include <sys/types.h>
14474 #include <$cf_regex_hdr>
14475 int
14476 main ()
14477 {
14478
14479                         regex_t *p;
14480                         int x = regcomp(p, "", 0);
14481                         int y = regexec(p, "", 0, 0, 0);
14482                         regfree(p);
14483
14484   ;
14485   return 0;
14486 }
14487 _ACEOF
14488 rm -f conftest.$ac_objext conftest$ac_exeext
14489 if { (eval echo "$as_me:14489: \"$ac_link\"") >&5
14490   (eval $ac_link) 2>&5
14491   ac_status=$?
14492   echo "$as_me:14492: \$? = $ac_status" >&5
14493   (exit $ac_status); } &&
14494          { ac_try='test -s conftest$ac_exeext'
14495   { (eval echo "$as_me:14495: \"$ac_try\"") >&5
14496   (eval $ac_try) 2>&5
14497   ac_status=$?
14498   echo "$as_me:14498: \$? = $ac_status" >&5
14499   (exit $ac_status); }; }; then
14500
14501                         cf_cv_regex_hdrs=$cf_regex_hdr
14502                         break
14503
14504 else
14505   echo "$as_me: failed program was:" >&5
14506 cat conftest.$ac_ext >&5
14507 fi
14508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14509         done
14510         ;;
14511 esac
14512
14513 fi
14514 echo "$as_me:14514: result: $cf_cv_regex_hdrs" >&5
14515 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14516
14517 case $cf_cv_regex_hdrs in #(vi
14518     no)        { echo "$as_me:14518: WARNING: no regular expression header found" >&5
14519 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14520     regex.h)
14521 cat >>confdefs.h <<\EOF
14522 #define HAVE_REGEX_H_FUNCS 1
14523 EOF
14524  ;; #(vi
14525     regexp.h)
14526 cat >>confdefs.h <<\EOF
14527 #define HAVE_REGEXP_H_FUNCS 1
14528 EOF
14529  ;; #(vi
14530     regexpr.h)
14531 cat >>confdefs.h <<\EOF
14532 #define HAVE_REGEXPR_H_FUNCS 1
14533 EOF
14534  ;;
14535 esac
14536
14537 for ac_header in \
14538 fcntl.h \
14539 getopt.h \
14540 limits.h \
14541 locale.h \
14542 math.h \
14543 poll.h \
14544 sys/bsdtypes.h \
14545 sys/ioctl.h \
14546 sys/param.h \
14547 sys/poll.h \
14548 sys/select.h \
14549 sys/time.h \
14550 sys/times.h \
14551 ttyent.h \
14552 unistd.h \
14553 wctype.h \
14554
14555 do
14556 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14557 echo "$as_me:14557: checking for $ac_header" >&5
14558 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14559 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14560   echo $ECHO_N "(cached) $ECHO_C" >&6
14561 else
14562   cat >conftest.$ac_ext <<_ACEOF
14563 #line 14563 "configure"
14564 #include "confdefs.h"
14565 #include <$ac_header>
14566 _ACEOF
14567 if { (eval echo "$as_me:14567: \"$ac_cpp conftest.$ac_ext\"") >&5
14568   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14569   ac_status=$?
14570   egrep -v '^ *\+' conftest.er1 >conftest.err
14571   rm -f conftest.er1
14572   cat conftest.err >&5
14573   echo "$as_me:14573: \$? = $ac_status" >&5
14574   (exit $ac_status); } >/dev/null; then
14575   if test -s conftest.err; then
14576     ac_cpp_err=$ac_c_preproc_warn_flag
14577   else
14578     ac_cpp_err=
14579   fi
14580 else
14581   ac_cpp_err=yes
14582 fi
14583 if test -z "$ac_cpp_err"; then
14584   eval "$as_ac_Header=yes"
14585 else
14586   echo "$as_me: failed program was:" >&5
14587   cat conftest.$ac_ext >&5
14588   eval "$as_ac_Header=no"
14589 fi
14590 rm -f conftest.err conftest.$ac_ext
14591 fi
14592 echo "$as_me:14592: result: `eval echo '${'$as_ac_Header'}'`" >&5
14593 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14594 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14595   cat >>confdefs.h <<EOF
14596 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14597 EOF
14598
14599 fi
14600 done
14601
14602 for ac_header in unistd.h getopt.h
14603 do
14604 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14605 echo "$as_me:14605: checking for $ac_header" >&5
14606 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14607 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14608   echo $ECHO_N "(cached) $ECHO_C" >&6
14609 else
14610   cat >conftest.$ac_ext <<_ACEOF
14611 #line 14611 "configure"
14612 #include "confdefs.h"
14613 #include <$ac_header>
14614 _ACEOF
14615 if { (eval echo "$as_me:14615: \"$ac_cpp conftest.$ac_ext\"") >&5
14616   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14617   ac_status=$?
14618   egrep -v '^ *\+' conftest.er1 >conftest.err
14619   rm -f conftest.er1
14620   cat conftest.err >&5
14621   echo "$as_me:14621: \$? = $ac_status" >&5
14622   (exit $ac_status); } >/dev/null; then
14623   if test -s conftest.err; then
14624     ac_cpp_err=$ac_c_preproc_warn_flag
14625   else
14626     ac_cpp_err=
14627   fi
14628 else
14629   ac_cpp_err=yes
14630 fi
14631 if test -z "$ac_cpp_err"; then
14632   eval "$as_ac_Header=yes"
14633 else
14634   echo "$as_me: failed program was:" >&5
14635   cat conftest.$ac_ext >&5
14636   eval "$as_ac_Header=no"
14637 fi
14638 rm -f conftest.err conftest.$ac_ext
14639 fi
14640 echo "$as_me:14640: result: `eval echo '${'$as_ac_Header'}'`" >&5
14641 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14642 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14643   cat >>confdefs.h <<EOF
14644 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14645 EOF
14646
14647 fi
14648 done
14649
14650 echo "$as_me:14650: checking for header declaring getopt variables" >&5
14651 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14652 if test "${cf_cv_getopt_header+set}" = set; then
14653   echo $ECHO_N "(cached) $ECHO_C" >&6
14654 else
14655
14656 cf_cv_getopt_header=none
14657 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14658 do
14659 cat >conftest.$ac_ext <<_ACEOF
14660 #line 14660 "configure"
14661 #include "confdefs.h"
14662
14663 #include <$cf_header>
14664 int
14665 main ()
14666 {
14667 int x = optind; char *y = optarg
14668   ;
14669   return 0;
14670 }
14671 _ACEOF
14672 rm -f conftest.$ac_objext
14673 if { (eval echo "$as_me:14673: \"$ac_compile\"") >&5
14674   (eval $ac_compile) 2>&5
14675   ac_status=$?
14676   echo "$as_me:14676: \$? = $ac_status" >&5
14677   (exit $ac_status); } &&
14678          { ac_try='test -s conftest.$ac_objext'
14679   { (eval echo "$as_me:14679: \"$ac_try\"") >&5
14680   (eval $ac_try) 2>&5
14681   ac_status=$?
14682   echo "$as_me:14682: \$? = $ac_status" >&5
14683   (exit $ac_status); }; }; then
14684   cf_cv_getopt_header=$cf_header
14685  break
14686 else
14687   echo "$as_me: failed program was:" >&5
14688 cat conftest.$ac_ext >&5
14689 fi
14690 rm -f conftest.$ac_objext conftest.$ac_ext
14691 done
14692
14693 fi
14694 echo "$as_me:14694: result: $cf_cv_getopt_header" >&5
14695 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14696 if test $cf_cv_getopt_header != none ; then
14697
14698 cat >>confdefs.h <<\EOF
14699 #define HAVE_GETOPT_HEADER 1
14700 EOF
14701
14702 fi
14703
14704 # check for ISC (this may also define _POSIX_SOURCE)
14705 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14706 if test "x$ISC" = xyes ; then
14707
14708 echo "$as_me:14708: checking for main in -lcposix" >&5
14709 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14710 if test "${ac_cv_lib_cposix_main+set}" = set; then
14711   echo $ECHO_N "(cached) $ECHO_C" >&6
14712 else
14713   ac_check_lib_save_LIBS=$LIBS
14714 LIBS="-lcposix  $LIBS"
14715 cat >conftest.$ac_ext <<_ACEOF
14716 #line 14716 "configure"
14717 #include "confdefs.h"
14718
14719 int
14720 main ()
14721 {
14722 main ();
14723   ;
14724   return 0;
14725 }
14726 _ACEOF
14727 rm -f conftest.$ac_objext conftest$ac_exeext
14728 if { (eval echo "$as_me:14728: \"$ac_link\"") >&5
14729   (eval $ac_link) 2>&5
14730   ac_status=$?
14731   echo "$as_me:14731: \$? = $ac_status" >&5
14732   (exit $ac_status); } &&
14733          { ac_try='test -s conftest$ac_exeext'
14734   { (eval echo "$as_me:14734: \"$ac_try\"") >&5
14735   (eval $ac_try) 2>&5
14736   ac_status=$?
14737   echo "$as_me:14737: \$? = $ac_status" >&5
14738   (exit $ac_status); }; }; then
14739   ac_cv_lib_cposix_main=yes
14740 else
14741   echo "$as_me: failed program was:" >&5
14742 cat conftest.$ac_ext >&5
14743 ac_cv_lib_cposix_main=no
14744 fi
14745 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14746 LIBS=$ac_check_lib_save_LIBS
14747 fi
14748 echo "$as_me:14748: result: $ac_cv_lib_cposix_main" >&5
14749 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14750 if test $ac_cv_lib_cposix_main = yes; then
14751   cat >>confdefs.h <<EOF
14752 #define HAVE_LIBCPOSIX 1
14753 EOF
14754
14755   LIBS="-lcposix $LIBS"
14756
14757 fi
14758
14759         echo "$as_me:14759: checking for bzero in -linet" >&5
14760 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14761 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14762   echo $ECHO_N "(cached) $ECHO_C" >&6
14763 else
14764   ac_check_lib_save_LIBS=$LIBS
14765 LIBS="-linet  $LIBS"
14766 cat >conftest.$ac_ext <<_ACEOF
14767 #line 14767 "configure"
14768 #include "confdefs.h"
14769
14770 /* Override any gcc2 internal prototype to avoid an error.  */
14771 #ifdef __cplusplus
14772 extern "C"
14773 #endif
14774 /* We use char because int might match the return type of a gcc2
14775    builtin and then its argument prototype would still apply.  */
14776 char bzero ();
14777 int
14778 main ()
14779 {
14780 bzero ();
14781   ;
14782   return 0;
14783 }
14784 _ACEOF
14785 rm -f conftest.$ac_objext conftest$ac_exeext
14786 if { (eval echo "$as_me:14786: \"$ac_link\"") >&5
14787   (eval $ac_link) 2>&5
14788   ac_status=$?
14789   echo "$as_me:14789: \$? = $ac_status" >&5
14790   (exit $ac_status); } &&
14791          { ac_try='test -s conftest$ac_exeext'
14792   { (eval echo "$as_me:14792: \"$ac_try\"") >&5
14793   (eval $ac_try) 2>&5
14794   ac_status=$?
14795   echo "$as_me:14795: \$? = $ac_status" >&5
14796   (exit $ac_status); }; }; then
14797   ac_cv_lib_inet_bzero=yes
14798 else
14799   echo "$as_me: failed program was:" >&5
14800 cat conftest.$ac_ext >&5
14801 ac_cv_lib_inet_bzero=no
14802 fi
14803 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14804 LIBS=$ac_check_lib_save_LIBS
14805 fi
14806 echo "$as_me:14806: result: $ac_cv_lib_inet_bzero" >&5
14807 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14808 if test $ac_cv_lib_inet_bzero = yes; then
14809   LIBS="-linet $LIBS"
14810 fi
14811 fi
14812
14813 echo "$as_me:14813: checking if sys/time.h works with sys/select.h" >&5
14814 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14815 if test "${cf_cv_sys_time_select+set}" = set; then
14816   echo $ECHO_N "(cached) $ECHO_C" >&6
14817 else
14818
14819 cat >conftest.$ac_ext <<_ACEOF
14820 #line 14820 "configure"
14821 #include "confdefs.h"
14822
14823 #include <sys/types.h>
14824 #ifdef HAVE_SYS_TIME_H
14825 #include <sys/time.h>
14826 #endif
14827 #ifdef HAVE_SYS_SELECT_H
14828 #include <sys/select.h>
14829 #endif
14830
14831 int
14832 main ()
14833 {
14834
14835   ;
14836   return 0;
14837 }
14838 _ACEOF
14839 rm -f conftest.$ac_objext
14840 if { (eval echo "$as_me:14840: \"$ac_compile\"") >&5
14841   (eval $ac_compile) 2>&5
14842   ac_status=$?
14843   echo "$as_me:14843: \$? = $ac_status" >&5
14844   (exit $ac_status); } &&
14845          { ac_try='test -s conftest.$ac_objext'
14846   { (eval echo "$as_me:14846: \"$ac_try\"") >&5
14847   (eval $ac_try) 2>&5
14848   ac_status=$?
14849   echo "$as_me:14849: \$? = $ac_status" >&5
14850   (exit $ac_status); }; }; then
14851   cf_cv_sys_time_select=yes
14852 else
14853   echo "$as_me: failed program was:" >&5
14854 cat conftest.$ac_ext >&5
14855 cf_cv_sys_time_select=no
14856 fi
14857 rm -f conftest.$ac_objext conftest.$ac_ext
14858
14859 fi
14860
14861 echo "$as_me:14861: result: $cf_cv_sys_time_select" >&5
14862 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14863 test "$cf_cv_sys_time_select" = yes &&
14864 cat >>confdefs.h <<\EOF
14865 #define HAVE_SYS_TIME_SELECT 1
14866 EOF
14867
14868 ###     checks for compiler characteristics
14869 ac_ext=c
14870 ac_cpp='$CPP $CPPFLAGS'
14871 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14872 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14873 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14874 ac_main_return=return
14875
14876 echo "$as_me:14876: checking for an ANSI C-conforming const" >&5
14877 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14878 if test "${ac_cv_c_const+set}" = set; then
14879   echo $ECHO_N "(cached) $ECHO_C" >&6
14880 else
14881   cat >conftest.$ac_ext <<_ACEOF
14882 #line 14882 "configure"
14883 #include "confdefs.h"
14884
14885 int
14886 main ()
14887 {
14888 /* FIXME: Include the comments suggested by Paul. */
14889 #ifndef __cplusplus
14890   /* Ultrix mips cc rejects this.  */
14891   typedef int charset[2];
14892   const charset x;
14893   /* SunOS 4.1.1 cc rejects this.  */
14894   char const *const *ccp;
14895   char **p;
14896   /* NEC SVR4.0.2 mips cc rejects this.  */
14897   struct point {int x, y;};
14898   static struct point const zero = {0,0};
14899   /* AIX XL C 1.02.0.0 rejects this.
14900      It does not let you subtract one const X* pointer from another in
14901      an arm of an if-expression whose if-part is not a constant
14902      expression */
14903   const char *g = "string";
14904   ccp = &g + (g ? g-g : 0);
14905   /* HPUX 7.0 cc rejects these. */
14906   ++ccp;
14907   p = (char**) ccp;
14908   ccp = (char const *const *) p;
14909   { /* SCO 3.2v4 cc rejects this.  */
14910     char *t;
14911     char const *s = 0 ? (char *) 0 : (char const *) 0;
14912
14913     *t++ = 0;
14914   }
14915   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14916     int x[] = {25, 17};
14917     const int *foo = &x[0];
14918     ++foo;
14919   }
14920   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14921     typedef const int *iptr;
14922     iptr p = 0;
14923     ++p;
14924   }
14925   { /* AIX XL C 1.02.0.0 rejects this saying
14926        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14927     struct s { int j; const int *ap[3]; };
14928     struct s *b; b->j = 5;
14929   }
14930   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14931     const int foo = 10;
14932   }
14933 #endif
14934
14935   ;
14936   return 0;
14937 }
14938 _ACEOF
14939 rm -f conftest.$ac_objext
14940 if { (eval echo "$as_me:14940: \"$ac_compile\"") >&5
14941   (eval $ac_compile) 2>&5
14942   ac_status=$?
14943   echo "$as_me:14943: \$? = $ac_status" >&5
14944   (exit $ac_status); } &&
14945          { ac_try='test -s conftest.$ac_objext'
14946   { (eval echo "$as_me:14946: \"$ac_try\"") >&5
14947   (eval $ac_try) 2>&5
14948   ac_status=$?
14949   echo "$as_me:14949: \$? = $ac_status" >&5
14950   (exit $ac_status); }; }; then
14951   ac_cv_c_const=yes
14952 else
14953   echo "$as_me: failed program was:" >&5
14954 cat conftest.$ac_ext >&5
14955 ac_cv_c_const=no
14956 fi
14957 rm -f conftest.$ac_objext conftest.$ac_ext
14958 fi
14959 echo "$as_me:14959: result: $ac_cv_c_const" >&5
14960 echo "${ECHO_T}$ac_cv_c_const" >&6
14961 if test $ac_cv_c_const = no; then
14962
14963 cat >>confdefs.h <<\EOF
14964 #define const
14965 EOF
14966
14967 fi
14968
14969 echo "$as_me:14969: checking for inline" >&5
14970 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14971 if test "${ac_cv_c_inline+set}" = set; then
14972   echo $ECHO_N "(cached) $ECHO_C" >&6
14973 else
14974   ac_cv_c_inline=no
14975 for ac_kw in inline __inline__ __inline; do
14976   cat >conftest.$ac_ext <<_ACEOF
14977 #line 14977 "configure"
14978 #include "confdefs.h"
14979 #ifndef __cplusplus
14980 static $ac_kw int static_foo () {return 0; }
14981 $ac_kw int foo () {return 0; }
14982 #endif
14983
14984 _ACEOF
14985 rm -f conftest.$ac_objext
14986 if { (eval echo "$as_me:14986: \"$ac_compile\"") >&5
14987   (eval $ac_compile) 2>&5
14988   ac_status=$?
14989   echo "$as_me:14989: \$? = $ac_status" >&5
14990   (exit $ac_status); } &&
14991          { ac_try='test -s conftest.$ac_objext'
14992   { (eval echo "$as_me:14992: \"$ac_try\"") >&5
14993   (eval $ac_try) 2>&5
14994   ac_status=$?
14995   echo "$as_me:14995: \$? = $ac_status" >&5
14996   (exit $ac_status); }; }; then
14997   ac_cv_c_inline=$ac_kw; break
14998 else
14999   echo "$as_me: failed program was:" >&5
15000 cat conftest.$ac_ext >&5
15001 fi
15002 rm -f conftest.$ac_objext conftest.$ac_ext
15003 done
15004
15005 fi
15006 echo "$as_me:15006: result: $ac_cv_c_inline" >&5
15007 echo "${ECHO_T}$ac_cv_c_inline" >&6
15008 case $ac_cv_c_inline in
15009   inline | yes) ;;
15010   no)
15011 cat >>confdefs.h <<\EOF
15012 #define inline
15013 EOF
15014  ;;
15015   *)  cat >>confdefs.h <<EOF
15016 #define inline $ac_cv_c_inline
15017 EOF
15018  ;;
15019 esac
15020
15021 NCURSES_INLINE=
15022 if test "$ac_cv_c_inline" != no ; then
15023   NCURSES_INLINE=inline
15024   if test "$INTEL_COMPILER" = yes
15025   then
15026     :
15027   elif test "$CLANG_COMPILER" = yes
15028   then
15029     :
15030   elif test "$GCC" = yes
15031   then
15032     echo "$as_me:15032: checking if $CC supports options to tune inlining" >&5
15033 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15034 if test "${cf_cv_gcc_inline+set}" = set; then
15035   echo $ECHO_N "(cached) $ECHO_C" >&6
15036 else
15037
15038       cf_save_CFLAGS=$CFLAGS
15039       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15040       cat >conftest.$ac_ext <<_ACEOF
15041 #line 15041 "configure"
15042 #include "confdefs.h"
15043 inline int foo(void) { return 1; }
15044 int
15045 main ()
15046 {
15047 ${cf_cv_main_return:-return} foo()
15048   ;
15049   return 0;
15050 }
15051 _ACEOF
15052 rm -f conftest.$ac_objext
15053 if { (eval echo "$as_me:15053: \"$ac_compile\"") >&5
15054   (eval $ac_compile) 2>&5
15055   ac_status=$?
15056   echo "$as_me:15056: \$? = $ac_status" >&5
15057   (exit $ac_status); } &&
15058          { ac_try='test -s conftest.$ac_objext'
15059   { (eval echo "$as_me:15059: \"$ac_try\"") >&5
15060   (eval $ac_try) 2>&5
15061   ac_status=$?
15062   echo "$as_me:15062: \$? = $ac_status" >&5
15063   (exit $ac_status); }; }; then
15064   cf_cv_gcc_inline=yes
15065 else
15066   echo "$as_me: failed program was:" >&5
15067 cat conftest.$ac_ext >&5
15068 cf_cv_gcc_inline=no
15069 fi
15070 rm -f conftest.$ac_objext conftest.$ac_ext
15071       CFLAGS=$cf_save_CFLAGS
15072
15073 fi
15074 echo "$as_me:15074: result: $cf_cv_gcc_inline" >&5
15075 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15076     if test "$cf_cv_gcc_inline" = yes ; then
15077
15078 cf_fix_cppflags=no
15079 cf_new_cflags=
15080 cf_new_cppflags=
15081 cf_new_extra_cppflags=
15082
15083 for cf_add_cflags in --param max-inline-insns-single=1200
15084 do
15085 case $cf_fix_cppflags in
15086 no)
15087         case $cf_add_cflags in #(vi
15088         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15089                 case $cf_add_cflags in
15090                 -D*)
15091                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15092
15093                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15094                                 && test -z "${cf_tst_cflags}" \
15095                                 && cf_fix_cppflags=yes
15096
15097                         if test $cf_fix_cppflags = yes ; then
15098                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15099                                 continue
15100                         elif test "${cf_tst_cflags}" = "\"'" ; then
15101                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15102                                 continue
15103                         fi
15104                         ;;
15105                 esac
15106                 case "$CPPFLAGS" in
15107                 *$cf_add_cflags) #(vi
15108                         ;;
15109                 *) #(vi
15110                         case $cf_add_cflags in #(vi
15111                         -D*)
15112                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15113
15114 CPPFLAGS=`echo "$CPPFLAGS" | \
15115         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15116                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15117
15118                                 ;;
15119                         esac
15120                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15121                         ;;
15122                 esac
15123                 ;;
15124         *)
15125                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15126                 ;;
15127         esac
15128         ;;
15129 yes)
15130         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15131
15132         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15133
15134         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15135                 && test -z "${cf_tst_cflags}" \
15136                 && cf_fix_cppflags=no
15137         ;;
15138 esac
15139 done
15140
15141 if test -n "$cf_new_cflags" ; then
15142
15143         CFLAGS="$CFLAGS $cf_new_cflags"
15144 fi
15145
15146 if test -n "$cf_new_cppflags" ; then
15147
15148         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15149 fi
15150
15151 if test -n "$cf_new_extra_cppflags" ; then
15152
15153         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15154 fi
15155
15156     fi
15157   fi
15158 fi
15159
15160 echo "$as_me:15160: checking for signal global datatype" >&5
15161 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15162 if test "${cf_cv_sig_atomic_t+set}" = set; then
15163   echo $ECHO_N "(cached) $ECHO_C" >&6
15164 else
15165
15166         for cf_type in \
15167                 "volatile sig_atomic_t" \
15168                 "sig_atomic_t" \
15169                 "int"
15170         do
15171         cat >conftest.$ac_ext <<_ACEOF
15172 #line 15172 "configure"
15173 #include "confdefs.h"
15174
15175 #include <sys/types.h>
15176 #include <signal.h>
15177 #include <stdio.h>
15178
15179 extern $cf_type x;
15180 $cf_type x;
15181 static void handler(int sig)
15182 {
15183         x = 5;
15184 }
15185 int
15186 main ()
15187 {
15188 signal(SIGINT, handler);
15189                  x = 1
15190   ;
15191   return 0;
15192 }
15193 _ACEOF
15194 rm -f conftest.$ac_objext
15195 if { (eval echo "$as_me:15195: \"$ac_compile\"") >&5
15196   (eval $ac_compile) 2>&5
15197   ac_status=$?
15198   echo "$as_me:15198: \$? = $ac_status" >&5
15199   (exit $ac_status); } &&
15200          { ac_try='test -s conftest.$ac_objext'
15201   { (eval echo "$as_me:15201: \"$ac_try\"") >&5
15202   (eval $ac_try) 2>&5
15203   ac_status=$?
15204   echo "$as_me:15204: \$? = $ac_status" >&5
15205   (exit $ac_status); }; }; then
15206   cf_cv_sig_atomic_t=$cf_type
15207 else
15208   echo "$as_me: failed program was:" >&5
15209 cat conftest.$ac_ext >&5
15210 cf_cv_sig_atomic_t=no
15211 fi
15212 rm -f conftest.$ac_objext conftest.$ac_ext
15213                 test "$cf_cv_sig_atomic_t" != no && break
15214         done
15215
15216 fi
15217
15218 echo "$as_me:15218: result: $cf_cv_sig_atomic_t" >&5
15219 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15220 test "$cf_cv_sig_atomic_t" != no &&
15221 cat >>confdefs.h <<EOF
15222 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15223 EOF
15224
15225 if test $NCURSES_CHTYPE = auto ; then
15226
15227 echo "$as_me:15227: checking for type of chtype" >&5
15228 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15229 if test "${cf_cv_typeof_chtype+set}" = set; then
15230   echo $ECHO_N "(cached) $ECHO_C" >&6
15231 else
15232
15233                 if test "$cross_compiling" = yes; then
15234   cf_cv_typeof_chtype=long
15235 else
15236   cat >conftest.$ac_ext <<_ACEOF
15237 #line 15237 "configure"
15238 #include "confdefs.h"
15239
15240 #define WANT_BITS 31
15241 #include <stdio.h>
15242 int main()
15243 {
15244         FILE *fp = fopen("cf_test.out", "w");
15245         if (fp != 0) {
15246                 char *result = "long";
15247                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15248                         int n;
15249                         unsigned int x, y;
15250                         for (n = 0; n < WANT_BITS; n++) {
15251                                 x = (1 << n);
15252                                 y = (x >> n);
15253                                 if (y != 1 || x == 0) {
15254                                         x = 0;
15255                                         break;
15256                                 }
15257                         }
15258                         /*
15259                          * If x is nonzero, an int is big enough for the bits
15260                          * that we want.
15261                          */
15262                         result = (x != 0) ? "int" : "long";
15263                 }
15264                 fputs(result, fp);
15265                 fclose(fp);
15266         }
15267         ${cf_cv_main_return:-return}(0);
15268 }
15269
15270 _ACEOF
15271 rm -f conftest$ac_exeext
15272 if { (eval echo "$as_me:15272: \"$ac_link\"") >&5
15273   (eval $ac_link) 2>&5
15274   ac_status=$?
15275   echo "$as_me:15275: \$? = $ac_status" >&5
15276   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15277   { (eval echo "$as_me:15277: \"$ac_try\"") >&5
15278   (eval $ac_try) 2>&5
15279   ac_status=$?
15280   echo "$as_me:15280: \$? = $ac_status" >&5
15281   (exit $ac_status); }; }; then
15282   cf_cv_typeof_chtype=`cat cf_test.out`
15283 else
15284   echo "$as_me: program exited with status $ac_status" >&5
15285 echo "$as_me: failed program was:" >&5
15286 cat conftest.$ac_ext >&5
15287 cf_cv_typeof_chtype=long
15288 fi
15289 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15290 fi
15291                 rm -f cf_test.out
15292
15293 fi
15294
15295 echo "$as_me:15295: result: $cf_cv_typeof_chtype" >&5
15296 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15297
15298 cat >>confdefs.h <<EOF
15299 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15300 EOF
15301
15302 else
15303         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15304 fi
15305 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15306
15307 echo "$as_me:15307: checking if unsigned literals are legal" >&5
15308 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15309 if test "${cf_cv_unsigned_literals+set}" = set; then
15310   echo $ECHO_N "(cached) $ECHO_C" >&6
15311 else
15312
15313         cat >conftest.$ac_ext <<_ACEOF
15314 #line 15314 "configure"
15315 #include "confdefs.h"
15316
15317 int
15318 main ()
15319 {
15320 long x = 1L + 1UL + 1U + 1
15321   ;
15322   return 0;
15323 }
15324 _ACEOF
15325 rm -f conftest.$ac_objext
15326 if { (eval echo "$as_me:15326: \"$ac_compile\"") >&5
15327   (eval $ac_compile) 2>&5
15328   ac_status=$?
15329   echo "$as_me:15329: \$? = $ac_status" >&5
15330   (exit $ac_status); } &&
15331          { ac_try='test -s conftest.$ac_objext'
15332   { (eval echo "$as_me:15332: \"$ac_try\"") >&5
15333   (eval $ac_try) 2>&5
15334   ac_status=$?
15335   echo "$as_me:15335: \$? = $ac_status" >&5
15336   (exit $ac_status); }; }; then
15337   cf_cv_unsigned_literals=yes
15338 else
15339   echo "$as_me: failed program was:" >&5
15340 cat conftest.$ac_ext >&5
15341 cf_cv_unsigned_literals=no
15342 fi
15343 rm -f conftest.$ac_objext conftest.$ac_ext
15344
15345 fi
15346
15347 echo "$as_me:15347: result: $cf_cv_unsigned_literals" >&5
15348 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15349
15350 cf_cv_1UL="1"
15351 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15352 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15353
15354 if test $NCURSES_MMASK_T = auto ; then
15355         cf_cv_typeof_mmask_t=long
15356 else
15357         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15358 fi
15359 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15360
15361 ###     Checks for external-data
15362
15363 echo "$as_me:15363: checking if external errno is declared" >&5
15364 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15365 if test "${cf_cv_dcl_errno+set}" = set; then
15366   echo $ECHO_N "(cached) $ECHO_C" >&6
15367 else
15368
15369     cat >conftest.$ac_ext <<_ACEOF
15370 #line 15370 "configure"
15371 #include "confdefs.h"
15372
15373 #ifdef HAVE_STDLIB_H
15374 #include <stdlib.h>
15375 #endif
15376 #include <stdio.h>
15377 #include <sys/types.h>
15378 #include <errno.h>
15379 int
15380 main ()
15381 {
15382 int x = (int) errno
15383   ;
15384   return 0;
15385 }
15386 _ACEOF
15387 rm -f conftest.$ac_objext
15388 if { (eval echo "$as_me:15388: \"$ac_compile\"") >&5
15389   (eval $ac_compile) 2>&5
15390   ac_status=$?
15391   echo "$as_me:15391: \$? = $ac_status" >&5
15392   (exit $ac_status); } &&
15393          { ac_try='test -s conftest.$ac_objext'
15394   { (eval echo "$as_me:15394: \"$ac_try\"") >&5
15395   (eval $ac_try) 2>&5
15396   ac_status=$?
15397   echo "$as_me:15397: \$? = $ac_status" >&5
15398   (exit $ac_status); }; }; then
15399   cf_cv_dcl_errno=yes
15400 else
15401   echo "$as_me: failed program was:" >&5
15402 cat conftest.$ac_ext >&5
15403 cf_cv_dcl_errno=no
15404 fi
15405 rm -f conftest.$ac_objext conftest.$ac_ext
15406
15407 fi
15408 echo "$as_me:15408: result: $cf_cv_dcl_errno" >&5
15409 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15410
15411 if test "$cf_cv_dcl_errno" = no ; then
15412
15413 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15414
15415     cat >>confdefs.h <<EOF
15416 #define $cf_result 1
15417 EOF
15418
15419 fi
15420
15421 # It's possible (for near-UNIX clones) that the data doesn't exist
15422
15423 echo "$as_me:15423: checking if external errno exists" >&5
15424 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15425 if test "${cf_cv_have_errno+set}" = set; then
15426   echo $ECHO_N "(cached) $ECHO_C" >&6
15427 else
15428
15429     cat >conftest.$ac_ext <<_ACEOF
15430 #line 15430 "configure"
15431 #include "confdefs.h"
15432
15433 #undef errno
15434 extern int errno;
15435
15436 int
15437 main ()
15438 {
15439 errno = 2
15440   ;
15441   return 0;
15442 }
15443 _ACEOF
15444 rm -f conftest.$ac_objext conftest$ac_exeext
15445 if { (eval echo "$as_me:15445: \"$ac_link\"") >&5
15446   (eval $ac_link) 2>&5
15447   ac_status=$?
15448   echo "$as_me:15448: \$? = $ac_status" >&5
15449   (exit $ac_status); } &&
15450          { ac_try='test -s conftest$ac_exeext'
15451   { (eval echo "$as_me:15451: \"$ac_try\"") >&5
15452   (eval $ac_try) 2>&5
15453   ac_status=$?
15454   echo "$as_me:15454: \$? = $ac_status" >&5
15455   (exit $ac_status); }; }; then
15456   cf_cv_have_errno=yes
15457 else
15458   echo "$as_me: failed program was:" >&5
15459 cat conftest.$ac_ext >&5
15460 cf_cv_have_errno=no
15461 fi
15462 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15463
15464 fi
15465 echo "$as_me:15465: result: $cf_cv_have_errno" >&5
15466 echo "${ECHO_T}$cf_cv_have_errno" >&6
15467
15468 if test "$cf_cv_have_errno" = yes ; then
15469
15470 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15471
15472     cat >>confdefs.h <<EOF
15473 #define $cf_result 1
15474 EOF
15475
15476 fi
15477
15478 echo "$as_me:15478: checking if data-only library module links" >&5
15479 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15480 if test "${cf_cv_link_dataonly+set}" = set; then
15481   echo $ECHO_N "(cached) $ECHO_C" >&6
15482 else
15483
15484         rm -f conftest.a
15485         cat >conftest.$ac_ext <<EOF
15486 #line 15486 "configure"
15487 int     testdata[3] = { 123, 456, 789 };
15488 EOF
15489         if { (eval echo "$as_me:15489: \"$ac_compile\"") >&5
15490   (eval $ac_compile) 2>&5
15491   ac_status=$?
15492   echo "$as_me:15492: \$? = $ac_status" >&5
15493   (exit $ac_status); } ; then
15494                 mv conftest.o data.o && \
15495                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15496         fi
15497         rm -f conftest.$ac_ext data.o
15498         cat >conftest.$ac_ext <<EOF
15499 #line 15499 "configure"
15500 int     testfunc()
15501 {
15502 #if defined(NeXT)
15503         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15504 #else
15505         extern int testdata[3];
15506         return testdata[0] == 123
15507            &&  testdata[1] == 456
15508            &&  testdata[2] == 789;
15509 #endif
15510 }
15511 EOF
15512         if { (eval echo "$as_me:15512: \"$ac_compile\"") >&5
15513   (eval $ac_compile) 2>&5
15514   ac_status=$?
15515   echo "$as_me:15515: \$? = $ac_status" >&5
15516   (exit $ac_status); }; then
15517                 mv conftest.o func.o && \
15518                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15519         fi
15520         rm -f conftest.$ac_ext func.o
15521         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15522         cf_saveLIBS="$LIBS"
15523         LIBS="conftest.a $LIBS"
15524         if test "$cross_compiling" = yes; then
15525   cf_cv_link_dataonly=unknown
15526 else
15527   cat >conftest.$ac_ext <<_ACEOF
15528 #line 15528 "configure"
15529 #include "confdefs.h"
15530
15531         int main()
15532         {
15533                 extern int testfunc();
15534                 ${cf_cv_main_return:-return} (!testfunc());
15535         }
15536
15537 _ACEOF
15538 rm -f conftest$ac_exeext
15539 if { (eval echo "$as_me:15539: \"$ac_link\"") >&5
15540   (eval $ac_link) 2>&5
15541   ac_status=$?
15542   echo "$as_me:15542: \$? = $ac_status" >&5
15543   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15544   { (eval echo "$as_me:15544: \"$ac_try\"") >&5
15545   (eval $ac_try) 2>&5
15546   ac_status=$?
15547   echo "$as_me:15547: \$? = $ac_status" >&5
15548   (exit $ac_status); }; }; then
15549   cf_cv_link_dataonly=yes
15550 else
15551   echo "$as_me: program exited with status $ac_status" >&5
15552 echo "$as_me: failed program was:" >&5
15553 cat conftest.$ac_ext >&5
15554 cf_cv_link_dataonly=no
15555 fi
15556 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15557 fi
15558         LIBS="$cf_saveLIBS"
15559
15560 fi
15561
15562 echo "$as_me:15562: result: $cf_cv_link_dataonly" >&5
15563 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15564
15565 if test "$cf_cv_link_dataonly" = no ; then
15566
15567 cat >>confdefs.h <<\EOF
15568 #define BROKEN_LINKER 1
15569 EOF
15570
15571         BROKEN_LINKER=1
15572 fi
15573
15574 ###     Checks for library functions.
15575
15576 for ac_func in \
15577 getcwd \
15578 getegid \
15579 geteuid \
15580 getttynam \
15581 issetugid \
15582 poll \
15583 putenv \
15584 remove \
15585 select \
15586 setbuf \
15587 setbuffer \
15588 setenv \
15589 setvbuf \
15590 sigaction \
15591 sigvec \
15592 strdup \
15593 strstr \
15594 tcgetpgrp \
15595 times \
15596 vsnprintf \
15597
15598 do
15599 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15600 echo "$as_me:15600: checking for $ac_func" >&5
15601 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15602 if eval "test \"\${$as_ac_var+set}\" = set"; then
15603   echo $ECHO_N "(cached) $ECHO_C" >&6
15604 else
15605   cat >conftest.$ac_ext <<_ACEOF
15606 #line 15606 "configure"
15607 #include "confdefs.h"
15608 /* System header to define __stub macros and hopefully few prototypes,
15609     which can conflict with char $ac_func (); below.  */
15610 #include <assert.h>
15611 /* Override any gcc2 internal prototype to avoid an error.  */
15612 #ifdef __cplusplus
15613 extern "C"
15614 #endif
15615 /* We use char because int might match the return type of a gcc2
15616    builtin and then its argument prototype would still apply.  */
15617 char $ac_func ();
15618 char (*f) ();
15619
15620 int
15621 main ()
15622 {
15623 /* The GNU C library defines this for functions which it implements
15624     to always fail with ENOSYS.  Some functions are actually named
15625     something starting with __ and the normal name is an alias.  */
15626 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15627 choke me
15628 #else
15629 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15630 #endif
15631
15632   ;
15633   return 0;
15634 }
15635 _ACEOF
15636 rm -f conftest.$ac_objext conftest$ac_exeext
15637 if { (eval echo "$as_me:15637: \"$ac_link\"") >&5
15638   (eval $ac_link) 2>&5
15639   ac_status=$?
15640   echo "$as_me:15640: \$? = $ac_status" >&5
15641   (exit $ac_status); } &&
15642          { ac_try='test -s conftest$ac_exeext'
15643   { (eval echo "$as_me:15643: \"$ac_try\"") >&5
15644   (eval $ac_try) 2>&5
15645   ac_status=$?
15646   echo "$as_me:15646: \$? = $ac_status" >&5
15647   (exit $ac_status); }; }; then
15648   eval "$as_ac_var=yes"
15649 else
15650   echo "$as_me: failed program was:" >&5
15651 cat conftest.$ac_ext >&5
15652 eval "$as_ac_var=no"
15653 fi
15654 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15655 fi
15656 echo "$as_me:15656: result: `eval echo '${'$as_ac_var'}'`" >&5
15657 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15658 if test `eval echo '${'$as_ac_var'}'` = yes; then
15659   cat >>confdefs.h <<EOF
15660 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15661 EOF
15662
15663 fi
15664 done
15665
15666 if test "x$with_getcap" = "xyes" ; then
15667
15668 echo "$as_me:15668: checking for terminal-capability database functions" >&5
15669 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15670 if test "${cf_cv_cgetent+set}" = set; then
15671   echo $ECHO_N "(cached) $ECHO_C" >&6
15672 else
15673
15674 cat >conftest.$ac_ext <<_ACEOF
15675 #line 15675 "configure"
15676 #include "confdefs.h"
15677
15678 #include <stdlib.h>
15679 int
15680 main ()
15681 {
15682
15683         char temp[128];
15684         char *buf = temp;
15685         char *db_array = temp;
15686         cgetent(&buf, &db_array, "vt100");
15687         cgetcap(buf, "tc", '=');
15688         cgetmatch(buf, "tc");
15689
15690   ;
15691   return 0;
15692 }
15693 _ACEOF
15694 rm -f conftest.$ac_objext conftest$ac_exeext
15695 if { (eval echo "$as_me:15695: \"$ac_link\"") >&5
15696   (eval $ac_link) 2>&5
15697   ac_status=$?
15698   echo "$as_me:15698: \$? = $ac_status" >&5
15699   (exit $ac_status); } &&
15700          { ac_try='test -s conftest$ac_exeext'
15701   { (eval echo "$as_me:15701: \"$ac_try\"") >&5
15702   (eval $ac_try) 2>&5
15703   ac_status=$?
15704   echo "$as_me:15704: \$? = $ac_status" >&5
15705   (exit $ac_status); }; }; then
15706   cf_cv_cgetent=yes
15707 else
15708   echo "$as_me: failed program was:" >&5
15709 cat conftest.$ac_ext >&5
15710 cf_cv_cgetent=no
15711 fi
15712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15713
15714 fi
15715 echo "$as_me:15715: result: $cf_cv_cgetent" >&5
15716 echo "${ECHO_T}$cf_cv_cgetent" >&6
15717
15718 if test "$cf_cv_cgetent" = yes
15719 then
15720
15721 cat >>confdefs.h <<\EOF
15722 #define HAVE_BSD_CGETENT 1
15723 EOF
15724
15725 echo "$as_me:15725: checking if cgetent uses const parameter" >&5
15726 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15727 if test "${cf_cv_cgetent_const+set}" = set; then
15728   echo $ECHO_N "(cached) $ECHO_C" >&6
15729 else
15730
15731 cat >conftest.$ac_ext <<_ACEOF
15732 #line 15732 "configure"
15733 #include "confdefs.h"
15734
15735 #include <stdlib.h>
15736 int
15737 main ()
15738 {
15739
15740         char temp[128];
15741         char *buf = temp;
15742 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15743         const char *db_array = temp;
15744         cgetent(&buf, &db_array, "vt100");
15745 #endif
15746         cgetcap(buf, "tc", '=');
15747         cgetmatch(buf, "tc");
15748
15749   ;
15750   return 0;
15751 }
15752 _ACEOF
15753 rm -f conftest.$ac_objext conftest$ac_exeext
15754 if { (eval echo "$as_me:15754: \"$ac_link\"") >&5
15755   (eval $ac_link) 2>&5
15756   ac_status=$?
15757   echo "$as_me:15757: \$? = $ac_status" >&5
15758   (exit $ac_status); } &&
15759          { ac_try='test -s conftest$ac_exeext'
15760   { (eval echo "$as_me:15760: \"$ac_try\"") >&5
15761   (eval $ac_try) 2>&5
15762   ac_status=$?
15763   echo "$as_me:15763: \$? = $ac_status" >&5
15764   (exit $ac_status); }; }; then
15765   cf_cv_cgetent_const=yes
15766 else
15767   echo "$as_me: failed program was:" >&5
15768 cat conftest.$ac_ext >&5
15769 cf_cv_cgetent_const=no
15770 fi
15771 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15772
15773 fi
15774 echo "$as_me:15774: result: $cf_cv_cgetent_const" >&5
15775 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15776         if test "$cf_cv_cgetent_const" = yes
15777         then
15778
15779 cat >>confdefs.h <<EOF
15780 #define CGETENT_CONST const
15781 EOF
15782
15783         fi
15784 fi
15785
15786 fi
15787
15788 echo "$as_me:15788: checking for isascii" >&5
15789 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15790 if test "${cf_cv_have_isascii+set}" = set; then
15791   echo $ECHO_N "(cached) $ECHO_C" >&6
15792 else
15793
15794         cat >conftest.$ac_ext <<_ACEOF
15795 #line 15795 "configure"
15796 #include "confdefs.h"
15797 #include <ctype.h>
15798 int
15799 main ()
15800 {
15801 int x = isascii(' ')
15802   ;
15803   return 0;
15804 }
15805 _ACEOF
15806 rm -f conftest.$ac_objext conftest$ac_exeext
15807 if { (eval echo "$as_me:15807: \"$ac_link\"") >&5
15808   (eval $ac_link) 2>&5
15809   ac_status=$?
15810   echo "$as_me:15810: \$? = $ac_status" >&5
15811   (exit $ac_status); } &&
15812          { ac_try='test -s conftest$ac_exeext'
15813   { (eval echo "$as_me:15813: \"$ac_try\"") >&5
15814   (eval $ac_try) 2>&5
15815   ac_status=$?
15816   echo "$as_me:15816: \$? = $ac_status" >&5
15817   (exit $ac_status); }; }; then
15818   cf_cv_have_isascii=yes
15819 else
15820   echo "$as_me: failed program was:" >&5
15821 cat conftest.$ac_ext >&5
15822 cf_cv_have_isascii=no
15823 fi
15824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15825
15826 fi
15827 echo "$as_me:15827: result: $cf_cv_have_isascii" >&5
15828 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15829 test "$cf_cv_have_isascii" = yes &&
15830 cat >>confdefs.h <<\EOF
15831 #define HAVE_ISASCII 1
15832 EOF
15833
15834 if test "$ac_cv_func_sigaction" = yes; then
15835 echo "$as_me:15835: checking whether sigaction needs _POSIX_SOURCE" >&5
15836 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15837 cat >conftest.$ac_ext <<_ACEOF
15838 #line 15838 "configure"
15839 #include "confdefs.h"
15840
15841 #include <sys/types.h>
15842 #include <signal.h>
15843 int
15844 main ()
15845 {
15846 struct sigaction act
15847   ;
15848   return 0;
15849 }
15850 _ACEOF
15851 rm -f conftest.$ac_objext
15852 if { (eval echo "$as_me:15852: \"$ac_compile\"") >&5
15853   (eval $ac_compile) 2>&5
15854   ac_status=$?
15855   echo "$as_me:15855: \$? = $ac_status" >&5
15856   (exit $ac_status); } &&
15857          { ac_try='test -s conftest.$ac_objext'
15858   { (eval echo "$as_me:15858: \"$ac_try\"") >&5
15859   (eval $ac_try) 2>&5
15860   ac_status=$?
15861   echo "$as_me:15861: \$? = $ac_status" >&5
15862   (exit $ac_status); }; }; then
15863   sigact_bad=no
15864 else
15865   echo "$as_me: failed program was:" >&5
15866 cat conftest.$ac_ext >&5
15867
15868 cat >conftest.$ac_ext <<_ACEOF
15869 #line 15869 "configure"
15870 #include "confdefs.h"
15871
15872 #define _POSIX_SOURCE
15873 #include <sys/types.h>
15874 #include <signal.h>
15875 int
15876 main ()
15877 {
15878 struct sigaction act
15879   ;
15880   return 0;
15881 }
15882 _ACEOF
15883 rm -f conftest.$ac_objext
15884 if { (eval echo "$as_me:15884: \"$ac_compile\"") >&5
15885   (eval $ac_compile) 2>&5
15886   ac_status=$?
15887   echo "$as_me:15887: \$? = $ac_status" >&5
15888   (exit $ac_status); } &&
15889          { ac_try='test -s conftest.$ac_objext'
15890   { (eval echo "$as_me:15890: \"$ac_try\"") >&5
15891   (eval $ac_try) 2>&5
15892   ac_status=$?
15893   echo "$as_me:15893: \$? = $ac_status" >&5
15894   (exit $ac_status); }; }; then
15895   sigact_bad=yes
15896
15897 cat >>confdefs.h <<\EOF
15898 #define _POSIX_SOURCE 1
15899 EOF
15900
15901 else
15902   echo "$as_me: failed program was:" >&5
15903 cat conftest.$ac_ext >&5
15904 sigact_bad=unknown
15905 fi
15906 rm -f conftest.$ac_objext conftest.$ac_ext
15907 fi
15908 rm -f conftest.$ac_objext conftest.$ac_ext
15909 echo "$as_me:15909: result: $sigact_bad" >&5
15910 echo "${ECHO_T}$sigact_bad" >&6
15911 fi
15912
15913 echo "$as_me:15913: checking if nanosleep really works" >&5
15914 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15915 if test "${cf_cv_func_nanosleep+set}" = set; then
15916   echo $ECHO_N "(cached) $ECHO_C" >&6
15917 else
15918
15919 if test "$cross_compiling" = yes; then
15920   cf_cv_func_nanosleep=unknown
15921 else
15922   cat >conftest.$ac_ext <<_ACEOF
15923 #line 15923 "configure"
15924 #include "confdefs.h"
15925
15926 #include <stdio.h>
15927 #include <errno.h>
15928 #include <time.h>
15929
15930 #ifdef HAVE_SYS_TIME_H
15931 #include <sys/time.h>
15932 #endif
15933
15934 int main() {
15935         struct timespec ts1, ts2;
15936         int code;
15937         ts1.tv_sec  = 0;
15938         ts1.tv_nsec = 750000000;
15939         ts2.tv_sec  = 0;
15940         ts2.tv_nsec = 0;
15941         errno = 0;
15942         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15943         ${cf_cv_main_return:-return}(code != 0);
15944 }
15945
15946 _ACEOF
15947 rm -f conftest$ac_exeext
15948 if { (eval echo "$as_me:15948: \"$ac_link\"") >&5
15949   (eval $ac_link) 2>&5
15950   ac_status=$?
15951   echo "$as_me:15951: \$? = $ac_status" >&5
15952   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15953   { (eval echo "$as_me:15953: \"$ac_try\"") >&5
15954   (eval $ac_try) 2>&5
15955   ac_status=$?
15956   echo "$as_me:15956: \$? = $ac_status" >&5
15957   (exit $ac_status); }; }; then
15958   cf_cv_func_nanosleep=yes
15959 else
15960   echo "$as_me: program exited with status $ac_status" >&5
15961 echo "$as_me: failed program was:" >&5
15962 cat conftest.$ac_ext >&5
15963 cf_cv_func_nanosleep=no
15964 fi
15965 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15966 fi
15967 fi
15968 echo "$as_me:15968: result: $cf_cv_func_nanosleep" >&5
15969 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15970
15971 test "$cf_cv_func_nanosleep" = "yes" &&
15972 cat >>confdefs.h <<\EOF
15973 #define HAVE_NANOSLEEP 1
15974 EOF
15975
15976 for ac_header in \
15977 termio.h \
15978 termios.h \
15979 unistd.h \
15980
15981 do
15982 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15983 echo "$as_me:15983: checking for $ac_header" >&5
15984 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15985 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15986   echo $ECHO_N "(cached) $ECHO_C" >&6
15987 else
15988   cat >conftest.$ac_ext <<_ACEOF
15989 #line 15989 "configure"
15990 #include "confdefs.h"
15991 #include <$ac_header>
15992 _ACEOF
15993 if { (eval echo "$as_me:15993: \"$ac_cpp conftest.$ac_ext\"") >&5
15994   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15995   ac_status=$?
15996   egrep -v '^ *\+' conftest.er1 >conftest.err
15997   rm -f conftest.er1
15998   cat conftest.err >&5
15999   echo "$as_me:15999: \$? = $ac_status" >&5
16000   (exit $ac_status); } >/dev/null; then
16001   if test -s conftest.err; then
16002     ac_cpp_err=$ac_c_preproc_warn_flag
16003   else
16004     ac_cpp_err=
16005   fi
16006 else
16007   ac_cpp_err=yes
16008 fi
16009 if test -z "$ac_cpp_err"; then
16010   eval "$as_ac_Header=yes"
16011 else
16012   echo "$as_me: failed program was:" >&5
16013   cat conftest.$ac_ext >&5
16014   eval "$as_ac_Header=no"
16015 fi
16016 rm -f conftest.err conftest.$ac_ext
16017 fi
16018 echo "$as_me:16018: result: `eval echo '${'$as_ac_Header'}'`" >&5
16019 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16020 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16021   cat >>confdefs.h <<EOF
16022 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16023 EOF
16024
16025 fi
16026 done
16027
16028 if test "$ISC" = yes ; then
16029
16030 for ac_header in sys/termio.h
16031 do
16032 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16033 echo "$as_me:16033: checking for $ac_header" >&5
16034 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16035 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16036   echo $ECHO_N "(cached) $ECHO_C" >&6
16037 else
16038   cat >conftest.$ac_ext <<_ACEOF
16039 #line 16039 "configure"
16040 #include "confdefs.h"
16041 #include <$ac_header>
16042 _ACEOF
16043 if { (eval echo "$as_me:16043: \"$ac_cpp conftest.$ac_ext\"") >&5
16044   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16045   ac_status=$?
16046   egrep -v '^ *\+' conftest.er1 >conftest.err
16047   rm -f conftest.er1
16048   cat conftest.err >&5
16049   echo "$as_me:16049: \$? = $ac_status" >&5
16050   (exit $ac_status); } >/dev/null; then
16051   if test -s conftest.err; then
16052     ac_cpp_err=$ac_c_preproc_warn_flag
16053   else
16054     ac_cpp_err=
16055   fi
16056 else
16057   ac_cpp_err=yes
16058 fi
16059 if test -z "$ac_cpp_err"; then
16060   eval "$as_ac_Header=yes"
16061 else
16062   echo "$as_me: failed program was:" >&5
16063   cat conftest.$ac_ext >&5
16064   eval "$as_ac_Header=no"
16065 fi
16066 rm -f conftest.err conftest.$ac_ext
16067 fi
16068 echo "$as_me:16068: result: `eval echo '${'$as_ac_Header'}'`" >&5
16069 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16070 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16071   cat >>confdefs.h <<EOF
16072 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16073 EOF
16074
16075 fi
16076 done
16077
16078 fi
16079 if test "$ac_cv_header_termios_h" = yes ; then
16080         case "$CFLAGS $CPPFLAGS" in
16081         *-D_POSIX_SOURCE*)
16082                 termios_bad=dunno ;;
16083         *)      termios_bad=maybe ;;
16084         esac
16085         if test "$termios_bad" = maybe ; then
16086         echo "$as_me:16086: checking whether termios.h needs _POSIX_SOURCE" >&5
16087 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16088         cat >conftest.$ac_ext <<_ACEOF
16089 #line 16089 "configure"
16090 #include "confdefs.h"
16091 #include <termios.h>
16092 int
16093 main ()
16094 {
16095 struct termios foo; int x = foo.c_iflag
16096   ;
16097   return 0;
16098 }
16099 _ACEOF
16100 rm -f conftest.$ac_objext
16101 if { (eval echo "$as_me:16101: \"$ac_compile\"") >&5
16102   (eval $ac_compile) 2>&5
16103   ac_status=$?
16104   echo "$as_me:16104: \$? = $ac_status" >&5
16105   (exit $ac_status); } &&
16106          { ac_try='test -s conftest.$ac_objext'
16107   { (eval echo "$as_me:16107: \"$ac_try\"") >&5
16108   (eval $ac_try) 2>&5
16109   ac_status=$?
16110   echo "$as_me:16110: \$? = $ac_status" >&5
16111   (exit $ac_status); }; }; then
16112   termios_bad=no
16113 else
16114   echo "$as_me: failed program was:" >&5
16115 cat conftest.$ac_ext >&5
16116
16117                 cat >conftest.$ac_ext <<_ACEOF
16118 #line 16118 "configure"
16119 #include "confdefs.h"
16120
16121 #define _POSIX_SOURCE
16122 #include <termios.h>
16123 int
16124 main ()
16125 {
16126 struct termios foo; int x = foo.c_iflag
16127   ;
16128   return 0;
16129 }
16130 _ACEOF
16131 rm -f conftest.$ac_objext
16132 if { (eval echo "$as_me:16132: \"$ac_compile\"") >&5
16133   (eval $ac_compile) 2>&5
16134   ac_status=$?
16135   echo "$as_me:16135: \$? = $ac_status" >&5
16136   (exit $ac_status); } &&
16137          { ac_try='test -s conftest.$ac_objext'
16138   { (eval echo "$as_me:16138: \"$ac_try\"") >&5
16139   (eval $ac_try) 2>&5
16140   ac_status=$?
16141   echo "$as_me:16141: \$? = $ac_status" >&5
16142   (exit $ac_status); }; }; then
16143   termios_bad=unknown
16144 else
16145   echo "$as_me: failed program was:" >&5
16146 cat conftest.$ac_ext >&5
16147 termios_bad=yes
16148 cat >>confdefs.h <<\EOF
16149 #define _POSIX_SOURCE 1
16150 EOF
16151
16152 fi
16153 rm -f conftest.$ac_objext conftest.$ac_ext
16154
16155 fi
16156 rm -f conftest.$ac_objext conftest.$ac_ext
16157         echo "$as_me:16157: result: $termios_bad" >&5
16158 echo "${ECHO_T}$termios_bad" >&6
16159         fi
16160 fi
16161
16162 echo "$as_me:16162: checking for tcgetattr" >&5
16163 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16164 if test "${cf_cv_have_tcgetattr+set}" = set; then
16165   echo $ECHO_N "(cached) $ECHO_C" >&6
16166 else
16167
16168 cat >conftest.$ac_ext <<_ACEOF
16169 #line 16169 "configure"
16170 #include "confdefs.h"
16171
16172 #include <sys/types.h>
16173 #ifdef HAVE_UNISTD_H
16174 #include <unistd.h>
16175 #endif
16176 #ifdef HAVE_TERMIOS_H
16177 #include <termios.h>
16178 #define TTY struct termios
16179 #else
16180 #ifdef HAVE_TERMIO_H
16181 #include <termio.h>
16182 #define TTY struct termio
16183 #endif
16184 #endif
16185
16186 int
16187 main ()
16188 {
16189
16190 TTY foo;
16191 tcgetattr(1, &foo);
16192   ;
16193   return 0;
16194 }
16195 _ACEOF
16196 rm -f conftest.$ac_objext conftest$ac_exeext
16197 if { (eval echo "$as_me:16197: \"$ac_link\"") >&5
16198   (eval $ac_link) 2>&5
16199   ac_status=$?
16200   echo "$as_me:16200: \$? = $ac_status" >&5
16201   (exit $ac_status); } &&
16202          { ac_try='test -s conftest$ac_exeext'
16203   { (eval echo "$as_me:16203: \"$ac_try\"") >&5
16204   (eval $ac_try) 2>&5
16205   ac_status=$?
16206   echo "$as_me:16206: \$? = $ac_status" >&5
16207   (exit $ac_status); }; }; then
16208   cf_cv_have_tcgetattr=yes
16209 else
16210   echo "$as_me: failed program was:" >&5
16211 cat conftest.$ac_ext >&5
16212 cf_cv_have_tcgetattr=no
16213 fi
16214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16215 fi
16216 echo "$as_me:16216: result: $cf_cv_have_tcgetattr" >&5
16217 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16218 test "$cf_cv_have_tcgetattr" = yes &&
16219 cat >>confdefs.h <<\EOF
16220 #define HAVE_TCGETATTR 1
16221 EOF
16222
16223 echo "$as_me:16223: checking for vsscanf function or workaround" >&5
16224 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16225 if test "${cf_cv_func_vsscanf+set}" = set; then
16226   echo $ECHO_N "(cached) $ECHO_C" >&6
16227 else
16228
16229 cat >conftest.$ac_ext <<_ACEOF
16230 #line 16230 "configure"
16231 #include "confdefs.h"
16232
16233 #include <stdarg.h>
16234 #include <stdio.h>
16235 int
16236 main ()
16237 {
16238
16239         va_list ap;
16240         vsscanf("from", "%d", ap)
16241   ;
16242   return 0;
16243 }
16244 _ACEOF
16245 rm -f conftest.$ac_objext conftest$ac_exeext
16246 if { (eval echo "$as_me:16246: \"$ac_link\"") >&5
16247   (eval $ac_link) 2>&5
16248   ac_status=$?
16249   echo "$as_me:16249: \$? = $ac_status" >&5
16250   (exit $ac_status); } &&
16251          { ac_try='test -s conftest$ac_exeext'
16252   { (eval echo "$as_me:16252: \"$ac_try\"") >&5
16253   (eval $ac_try) 2>&5
16254   ac_status=$?
16255   echo "$as_me:16255: \$? = $ac_status" >&5
16256   (exit $ac_status); }; }; then
16257   cf_cv_func_vsscanf=vsscanf
16258 else
16259   echo "$as_me: failed program was:" >&5
16260 cat conftest.$ac_ext >&5
16261
16262 cat >conftest.$ac_ext <<_ACEOF
16263 #line 16263 "configure"
16264 #include "confdefs.h"
16265
16266 #include <stdarg.h>
16267 #include <stdio.h>
16268 int
16269 main ()
16270 {
16271
16272     FILE strbuf;
16273     char *str = "from";
16274
16275     strbuf._flag = _IOREAD;
16276     strbuf._ptr = strbuf._base = (unsigned char *) str;
16277     strbuf._cnt = strlen(str);
16278     strbuf._file = _NFILE;
16279     return (vfscanf(&strbuf, "%d", ap))
16280   ;
16281   return 0;
16282 }
16283 _ACEOF
16284 rm -f conftest.$ac_objext conftest$ac_exeext
16285 if { (eval echo "$as_me:16285: \"$ac_link\"") >&5
16286   (eval $ac_link) 2>&5
16287   ac_status=$?
16288   echo "$as_me:16288: \$? = $ac_status" >&5
16289   (exit $ac_status); } &&
16290          { ac_try='test -s conftest$ac_exeext'
16291   { (eval echo "$as_me:16291: \"$ac_try\"") >&5
16292   (eval $ac_try) 2>&5
16293   ac_status=$?
16294   echo "$as_me:16294: \$? = $ac_status" >&5
16295   (exit $ac_status); }; }; then
16296   cf_cv_func_vsscanf=vfscanf
16297 else
16298   echo "$as_me: failed program was:" >&5
16299 cat conftest.$ac_ext >&5
16300
16301 cat >conftest.$ac_ext <<_ACEOF
16302 #line 16302 "configure"
16303 #include "confdefs.h"
16304
16305 #include <stdarg.h>
16306 #include <stdio.h>
16307 int
16308 main ()
16309 {
16310
16311     FILE strbuf;
16312     char *str = "from";
16313
16314     strbuf._flag = _IOREAD;
16315     strbuf._ptr = strbuf._base = (unsigned char *) str;
16316     strbuf._cnt = strlen(str);
16317     strbuf._file = _NFILE;
16318     return (_doscan(&strbuf, "%d", ap))
16319   ;
16320   return 0;
16321 }
16322 _ACEOF
16323 rm -f conftest.$ac_objext conftest$ac_exeext
16324 if { (eval echo "$as_me:16324: \"$ac_link\"") >&5
16325   (eval $ac_link) 2>&5
16326   ac_status=$?
16327   echo "$as_me:16327: \$? = $ac_status" >&5
16328   (exit $ac_status); } &&
16329          { ac_try='test -s conftest$ac_exeext'
16330   { (eval echo "$as_me:16330: \"$ac_try\"") >&5
16331   (eval $ac_try) 2>&5
16332   ac_status=$?
16333   echo "$as_me:16333: \$? = $ac_status" >&5
16334   (exit $ac_status); }; }; then
16335   cf_cv_func_vsscanf=_doscan
16336 else
16337   echo "$as_me: failed program was:" >&5
16338 cat conftest.$ac_ext >&5
16339
16340 cf_cv_func_vsscanf=no
16341 fi
16342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16343 fi
16344 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16345 fi
16346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16347 fi
16348 echo "$as_me:16348: result: $cf_cv_func_vsscanf" >&5
16349 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16350
16351 case $cf_cv_func_vsscanf in #(vi
16352 vsscanf)
16353 cat >>confdefs.h <<\EOF
16354 #define HAVE_VSSCANF 1
16355 EOF
16356 ;; #(vi
16357 vfscanf)
16358 cat >>confdefs.h <<\EOF
16359 #define HAVE_VFSCANF 1
16360 EOF
16361 ;; #(vi
16362 _doscan)
16363 cat >>confdefs.h <<\EOF
16364 #define HAVE__DOSCAN 1
16365 EOF
16366 ;;
16367 esac
16368
16369 echo "$as_me:16369: checking for working mkstemp" >&5
16370 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16371 if test "${cf_cv_func_mkstemp+set}" = set; then
16372   echo $ECHO_N "(cached) $ECHO_C" >&6
16373 else
16374
16375 rm -rf conftest*
16376 if test "$cross_compiling" = yes; then
16377   cf_cv_func_mkstemp=maybe
16378 else
16379   cat >conftest.$ac_ext <<_ACEOF
16380 #line 16380 "configure"
16381 #include "confdefs.h"
16382
16383 #include <sys/types.h>
16384 #include <stdlib.h>
16385 #include <stdio.h>
16386 #include <string.h>
16387 #include <sys/stat.h>
16388 int main()
16389 {
16390         char *tmpl = "conftestXXXXXX";
16391         char name[2][80];
16392         int n;
16393         int result = 0;
16394         int fd;
16395         struct stat sb;
16396
16397         umask(077);
16398         for (n = 0; n < 2; ++n) {
16399                 strcpy(name[n], tmpl);
16400                 if ((fd = mkstemp(name[n])) >= 0) {
16401                         if (!strcmp(name[n], tmpl)
16402                          || stat(name[n], &sb) != 0
16403                          || (sb.st_mode & S_IFMT) != S_IFREG
16404                          || (sb.st_mode & 077) != 0) {
16405                                 result = 1;
16406                         }
16407                         close(fd);
16408                 }
16409         }
16410         if (result == 0
16411          && !strcmp(name[0], name[1]))
16412                 result = 1;
16413         ${cf_cv_main_return:-return}(result);
16414 }
16415
16416 _ACEOF
16417 rm -f conftest$ac_exeext
16418 if { (eval echo "$as_me:16418: \"$ac_link\"") >&5
16419   (eval $ac_link) 2>&5
16420   ac_status=$?
16421   echo "$as_me:16421: \$? = $ac_status" >&5
16422   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16423   { (eval echo "$as_me:16423: \"$ac_try\"") >&5
16424   (eval $ac_try) 2>&5
16425   ac_status=$?
16426   echo "$as_me:16426: \$? = $ac_status" >&5
16427   (exit $ac_status); }; }; then
16428   cf_cv_func_mkstemp=yes
16429
16430 else
16431   echo "$as_me: program exited with status $ac_status" >&5
16432 echo "$as_me: failed program was:" >&5
16433 cat conftest.$ac_ext >&5
16434 cf_cv_func_mkstemp=no
16435
16436 fi
16437 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16438 fi
16439
16440 fi
16441 echo "$as_me:16441: result: $cf_cv_func_mkstemp" >&5
16442 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16443 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16444         echo "$as_me:16444: checking for mkstemp" >&5
16445 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16446 if test "${ac_cv_func_mkstemp+set}" = set; then
16447   echo $ECHO_N "(cached) $ECHO_C" >&6
16448 else
16449   cat >conftest.$ac_ext <<_ACEOF
16450 #line 16450 "configure"
16451 #include "confdefs.h"
16452 /* System header to define __stub macros and hopefully few prototypes,
16453     which can conflict with char mkstemp (); below.  */
16454 #include <assert.h>
16455 /* Override any gcc2 internal prototype to avoid an error.  */
16456 #ifdef __cplusplus
16457 extern "C"
16458 #endif
16459 /* We use char because int might match the return type of a gcc2
16460    builtin and then its argument prototype would still apply.  */
16461 char mkstemp ();
16462 char (*f) ();
16463
16464 int
16465 main ()
16466 {
16467 /* The GNU C library defines this for functions which it implements
16468     to always fail with ENOSYS.  Some functions are actually named
16469     something starting with __ and the normal name is an alias.  */
16470 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16471 choke me
16472 #else
16473 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16474 #endif
16475
16476   ;
16477   return 0;
16478 }
16479 _ACEOF
16480 rm -f conftest.$ac_objext conftest$ac_exeext
16481 if { (eval echo "$as_me:16481: \"$ac_link\"") >&5
16482   (eval $ac_link) 2>&5
16483   ac_status=$?
16484   echo "$as_me:16484: \$? = $ac_status" >&5
16485   (exit $ac_status); } &&
16486          { ac_try='test -s conftest$ac_exeext'
16487   { (eval echo "$as_me:16487: \"$ac_try\"") >&5
16488   (eval $ac_try) 2>&5
16489   ac_status=$?
16490   echo "$as_me:16490: \$? = $ac_status" >&5
16491   (exit $ac_status); }; }; then
16492   ac_cv_func_mkstemp=yes
16493 else
16494   echo "$as_me: failed program was:" >&5
16495 cat conftest.$ac_ext >&5
16496 ac_cv_func_mkstemp=no
16497 fi
16498 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16499 fi
16500 echo "$as_me:16500: result: $ac_cv_func_mkstemp" >&5
16501 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16502
16503 fi
16504 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16505
16506 cat >>confdefs.h <<\EOF
16507 #define HAVE_MKSTEMP 1
16508 EOF
16509
16510 fi
16511
16512 # setup for prototype of fallback for vsscanf()
16513
16514 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16515         HAVE_VSSCANF=1
16516 else
16517         HAVE_VSSCANF=0
16518 fi
16519
16520 if test "x$cross_compiling" = xyes ; then
16521         { echo "$as_me:16521: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16522 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16523 else
16524         echo "$as_me:16524: checking whether setvbuf arguments are reversed" >&5
16525 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16526 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16527   echo $ECHO_N "(cached) $ECHO_C" >&6
16528 else
16529   if test "$cross_compiling" = yes; then
16530   { { echo "$as_me:16530: error: cannot run test program while cross compiling" >&5
16531 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16532    { (exit 1); exit 1; }; }
16533 else
16534   cat >conftest.$ac_ext <<_ACEOF
16535 #line 16535 "configure"
16536 #include "confdefs.h"
16537 #include <stdio.h>
16538 /* If setvbuf has the reversed format, exit 0. */
16539 int
16540 main ()
16541 {
16542   /* This call has the arguments reversed.
16543      A reversed system may check and see that the address of main
16544      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16545   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16546     $ac_main_return(1);
16547   putc('\r', stdout);
16548   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16549 }
16550 _ACEOF
16551 rm -f conftest$ac_exeext
16552 if { (eval echo "$as_me:16552: \"$ac_link\"") >&5
16553   (eval $ac_link) 2>&5
16554   ac_status=$?
16555   echo "$as_me:16555: \$? = $ac_status" >&5
16556   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16557   { (eval echo "$as_me:16557: \"$ac_try\"") >&5
16558   (eval $ac_try) 2>&5
16559   ac_status=$?
16560   echo "$as_me:16560: \$? = $ac_status" >&5
16561   (exit $ac_status); }; }; then
16562   ac_cv_func_setvbuf_reversed=yes
16563 else
16564   echo "$as_me: program exited with status $ac_status" >&5
16565 echo "$as_me: failed program was:" >&5
16566 cat conftest.$ac_ext >&5
16567 ac_cv_func_setvbuf_reversed=no
16568 fi
16569 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16570 fi
16571 rm -f core core.* *.core
16572 fi
16573 echo "$as_me:16573: result: $ac_cv_func_setvbuf_reversed" >&5
16574 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16575 if test $ac_cv_func_setvbuf_reversed = yes; then
16576
16577 cat >>confdefs.h <<\EOF
16578 #define SETVBUF_REVERSED 1
16579 EOF
16580
16581 fi
16582
16583 fi
16584 echo "$as_me:16584: checking for intptr_t" >&5
16585 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16586 if test "${ac_cv_type_intptr_t+set}" = set; then
16587   echo $ECHO_N "(cached) $ECHO_C" >&6
16588 else
16589   cat >conftest.$ac_ext <<_ACEOF
16590 #line 16590 "configure"
16591 #include "confdefs.h"
16592 $ac_includes_default
16593 int
16594 main ()
16595 {
16596 if ((intptr_t *) 0)
16597   return 0;
16598 if (sizeof (intptr_t))
16599   return 0;
16600   ;
16601   return 0;
16602 }
16603 _ACEOF
16604 rm -f conftest.$ac_objext
16605 if { (eval echo "$as_me:16605: \"$ac_compile\"") >&5
16606   (eval $ac_compile) 2>&5
16607   ac_status=$?
16608   echo "$as_me:16608: \$? = $ac_status" >&5
16609   (exit $ac_status); } &&
16610          { ac_try='test -s conftest.$ac_objext'
16611   { (eval echo "$as_me:16611: \"$ac_try\"") >&5
16612   (eval $ac_try) 2>&5
16613   ac_status=$?
16614   echo "$as_me:16614: \$? = $ac_status" >&5
16615   (exit $ac_status); }; }; then
16616   ac_cv_type_intptr_t=yes
16617 else
16618   echo "$as_me: failed program was:" >&5
16619 cat conftest.$ac_ext >&5
16620 ac_cv_type_intptr_t=no
16621 fi
16622 rm -f conftest.$ac_objext conftest.$ac_ext
16623 fi
16624 echo "$as_me:16624: result: $ac_cv_type_intptr_t" >&5
16625 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16626 if test $ac_cv_type_intptr_t = yes; then
16627   :
16628 else
16629
16630 cat >>confdefs.h <<EOF
16631 #define intptr_t long
16632 EOF
16633
16634 fi
16635
16636 echo "$as_me:16636: checking for type sigaction_t" >&5
16637 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16638 if test "${cf_cv_type_sigaction+set}" = set; then
16639   echo $ECHO_N "(cached) $ECHO_C" >&6
16640 else
16641
16642         cat >conftest.$ac_ext <<_ACEOF
16643 #line 16643 "configure"
16644 #include "confdefs.h"
16645
16646 #include <signal.h>
16647 int
16648 main ()
16649 {
16650 sigaction_t x
16651   ;
16652   return 0;
16653 }
16654 _ACEOF
16655 rm -f conftest.$ac_objext
16656 if { (eval echo "$as_me:16656: \"$ac_compile\"") >&5
16657   (eval $ac_compile) 2>&5
16658   ac_status=$?
16659   echo "$as_me:16659: \$? = $ac_status" >&5
16660   (exit $ac_status); } &&
16661          { ac_try='test -s conftest.$ac_objext'
16662   { (eval echo "$as_me:16662: \"$ac_try\"") >&5
16663   (eval $ac_try) 2>&5
16664   ac_status=$?
16665   echo "$as_me:16665: \$? = $ac_status" >&5
16666   (exit $ac_status); }; }; then
16667   cf_cv_type_sigaction=yes
16668 else
16669   echo "$as_me: failed program was:" >&5
16670 cat conftest.$ac_ext >&5
16671 cf_cv_type_sigaction=no
16672 fi
16673 rm -f conftest.$ac_objext conftest.$ac_ext
16674 fi
16675
16676 echo "$as_me:16676: result: $cf_cv_type_sigaction" >&5
16677 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16678 test "$cf_cv_type_sigaction" = yes &&
16679 cat >>confdefs.h <<\EOF
16680 #define HAVE_TYPE_SIGACTION 1
16681 EOF
16682
16683 echo "$as_me:16683: checking declaration of size-change" >&5
16684 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16685 if test "${cf_cv_sizechange+set}" = set; then
16686   echo $ECHO_N "(cached) $ECHO_C" >&6
16687 else
16688
16689     cf_cv_sizechange=unknown
16690     cf_save_CPPFLAGS="$CPPFLAGS"
16691
16692 for cf_opts in "" "NEED_PTEM_H"
16693 do
16694
16695     CPPFLAGS="$cf_save_CPPFLAGS"
16696     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16697     cat >conftest.$ac_ext <<_ACEOF
16698 #line 16698 "configure"
16699 #include "confdefs.h"
16700 #include <sys/types.h>
16701 #ifdef HAVE_TERMIOS_H
16702 #include <termios.h>
16703 #else
16704 #ifdef HAVE_TERMIO_H
16705 #include <termio.h>
16706 #endif
16707 #endif
16708 #ifdef NEED_PTEM_H
16709 /* This is a workaround for SCO:  they neglected to define struct winsize in
16710  * termios.h -- it's only in termio.h and ptem.h
16711  */
16712 #include        <sys/stream.h>
16713 #include        <sys/ptem.h>
16714 #endif
16715 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16716 #include <sys/ioctl.h>
16717 #endif
16718
16719 int
16720 main ()
16721 {
16722
16723 #ifdef TIOCGSIZE
16724         struct ttysize win;     /* FIXME: what system is this? */
16725         int y = win.ts_lines;
16726         int x = win.ts_cols;
16727 #else
16728 #ifdef TIOCGWINSZ
16729         struct winsize win;
16730         int y = win.ws_row;
16731         int x = win.ws_col;
16732 #else
16733         no TIOCGSIZE or TIOCGWINSZ
16734 #endif /* TIOCGWINSZ */
16735 #endif /* TIOCGSIZE */
16736
16737   ;
16738   return 0;
16739 }
16740 _ACEOF
16741 rm -f conftest.$ac_objext
16742 if { (eval echo "$as_me:16742: \"$ac_compile\"") >&5
16743   (eval $ac_compile) 2>&5
16744   ac_status=$?
16745   echo "$as_me:16745: \$? = $ac_status" >&5
16746   (exit $ac_status); } &&
16747          { ac_try='test -s conftest.$ac_objext'
16748   { (eval echo "$as_me:16748: \"$ac_try\"") >&5
16749   (eval $ac_try) 2>&5
16750   ac_status=$?
16751   echo "$as_me:16751: \$? = $ac_status" >&5
16752   (exit $ac_status); }; }; then
16753   cf_cv_sizechange=yes
16754 else
16755   echo "$as_me: failed program was:" >&5
16756 cat conftest.$ac_ext >&5
16757 cf_cv_sizechange=no
16758 fi
16759 rm -f conftest.$ac_objext conftest.$ac_ext
16760
16761         CPPFLAGS="$cf_save_CPPFLAGS"
16762         if test "$cf_cv_sizechange" = yes ; then
16763                 echo "size-change succeeded ($cf_opts)" >&5
16764                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16765                 break
16766         fi
16767 done
16768
16769 fi
16770 echo "$as_me:16770: result: $cf_cv_sizechange" >&5
16771 echo "${ECHO_T}$cf_cv_sizechange" >&6
16772 if test "$cf_cv_sizechange" != no ; then
16773
16774 cat >>confdefs.h <<\EOF
16775 #define HAVE_SIZECHANGE 1
16776 EOF
16777
16778         case $cf_cv_sizechange in #(vi
16779         NEED*)
16780                 cat >>confdefs.h <<EOF
16781 #define $cf_cv_sizechange  1
16782 EOF
16783
16784                 ;;
16785         esac
16786 fi
16787
16788 echo "$as_me:16788: checking for memmove" >&5
16789 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16790 if test "${ac_cv_func_memmove+set}" = set; then
16791   echo $ECHO_N "(cached) $ECHO_C" >&6
16792 else
16793   cat >conftest.$ac_ext <<_ACEOF
16794 #line 16794 "configure"
16795 #include "confdefs.h"
16796 /* System header to define __stub macros and hopefully few prototypes,
16797     which can conflict with char memmove (); below.  */
16798 #include <assert.h>
16799 /* Override any gcc2 internal prototype to avoid an error.  */
16800 #ifdef __cplusplus
16801 extern "C"
16802 #endif
16803 /* We use char because int might match the return type of a gcc2
16804    builtin and then its argument prototype would still apply.  */
16805 char memmove ();
16806 char (*f) ();
16807
16808 int
16809 main ()
16810 {
16811 /* The GNU C library defines this for functions which it implements
16812     to always fail with ENOSYS.  Some functions are actually named
16813     something starting with __ and the normal name is an alias.  */
16814 #if defined (__stub_memmove) || defined (__stub___memmove)
16815 choke me
16816 #else
16817 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16818 #endif
16819
16820   ;
16821   return 0;
16822 }
16823 _ACEOF
16824 rm -f conftest.$ac_objext conftest$ac_exeext
16825 if { (eval echo "$as_me:16825: \"$ac_link\"") >&5
16826   (eval $ac_link) 2>&5
16827   ac_status=$?
16828   echo "$as_me:16828: \$? = $ac_status" >&5
16829   (exit $ac_status); } &&
16830          { ac_try='test -s conftest$ac_exeext'
16831   { (eval echo "$as_me:16831: \"$ac_try\"") >&5
16832   (eval $ac_try) 2>&5
16833   ac_status=$?
16834   echo "$as_me:16834: \$? = $ac_status" >&5
16835   (exit $ac_status); }; }; then
16836   ac_cv_func_memmove=yes
16837 else
16838   echo "$as_me: failed program was:" >&5
16839 cat conftest.$ac_ext >&5
16840 ac_cv_func_memmove=no
16841 fi
16842 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16843 fi
16844 echo "$as_me:16844: result: $ac_cv_func_memmove" >&5
16845 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16846 if test $ac_cv_func_memmove = yes; then
16847   :
16848 else
16849
16850 echo "$as_me:16850: checking for bcopy" >&5
16851 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16852 if test "${ac_cv_func_bcopy+set}" = set; then
16853   echo $ECHO_N "(cached) $ECHO_C" >&6
16854 else
16855   cat >conftest.$ac_ext <<_ACEOF
16856 #line 16856 "configure"
16857 #include "confdefs.h"
16858 /* System header to define __stub macros and hopefully few prototypes,
16859     which can conflict with char bcopy (); below.  */
16860 #include <assert.h>
16861 /* Override any gcc2 internal prototype to avoid an error.  */
16862 #ifdef __cplusplus
16863 extern "C"
16864 #endif
16865 /* We use char because int might match the return type of a gcc2
16866    builtin and then its argument prototype would still apply.  */
16867 char bcopy ();
16868 char (*f) ();
16869
16870 int
16871 main ()
16872 {
16873 /* The GNU C library defines this for functions which it implements
16874     to always fail with ENOSYS.  Some functions are actually named
16875     something starting with __ and the normal name is an alias.  */
16876 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16877 choke me
16878 #else
16879 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16880 #endif
16881
16882   ;
16883   return 0;
16884 }
16885 _ACEOF
16886 rm -f conftest.$ac_objext conftest$ac_exeext
16887 if { (eval echo "$as_me:16887: \"$ac_link\"") >&5
16888   (eval $ac_link) 2>&5
16889   ac_status=$?
16890   echo "$as_me:16890: \$? = $ac_status" >&5
16891   (exit $ac_status); } &&
16892          { ac_try='test -s conftest$ac_exeext'
16893   { (eval echo "$as_me:16893: \"$ac_try\"") >&5
16894   (eval $ac_try) 2>&5
16895   ac_status=$?
16896   echo "$as_me:16896: \$? = $ac_status" >&5
16897   (exit $ac_status); }; }; then
16898   ac_cv_func_bcopy=yes
16899 else
16900   echo "$as_me: failed program was:" >&5
16901 cat conftest.$ac_ext >&5
16902 ac_cv_func_bcopy=no
16903 fi
16904 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16905 fi
16906 echo "$as_me:16906: result: $ac_cv_func_bcopy" >&5
16907 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16908 if test $ac_cv_func_bcopy = yes; then
16909
16910         echo "$as_me:16910: checking if bcopy does overlapping moves" >&5
16911 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16912 if test "${cf_cv_good_bcopy+set}" = set; then
16913   echo $ECHO_N "(cached) $ECHO_C" >&6
16914 else
16915
16916                 if test "$cross_compiling" = yes; then
16917   cf_cv_good_bcopy=unknown
16918 else
16919   cat >conftest.$ac_ext <<_ACEOF
16920 #line 16920 "configure"
16921 #include "confdefs.h"
16922
16923 int main() {
16924         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16925         char temp[40];
16926         bcopy(data, temp, sizeof(data));
16927         bcopy(temp+10, temp, 15);
16928         bcopy(temp+5, temp+15, 10);
16929         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16930 }
16931
16932 _ACEOF
16933 rm -f conftest$ac_exeext
16934 if { (eval echo "$as_me:16934: \"$ac_link\"") >&5
16935   (eval $ac_link) 2>&5
16936   ac_status=$?
16937   echo "$as_me:16937: \$? = $ac_status" >&5
16938   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16939   { (eval echo "$as_me:16939: \"$ac_try\"") >&5
16940   (eval $ac_try) 2>&5
16941   ac_status=$?
16942   echo "$as_me:16942: \$? = $ac_status" >&5
16943   (exit $ac_status); }; }; then
16944   cf_cv_good_bcopy=yes
16945 else
16946   echo "$as_me: program exited with status $ac_status" >&5
16947 echo "$as_me: failed program was:" >&5
16948 cat conftest.$ac_ext >&5
16949 cf_cv_good_bcopy=no
16950 fi
16951 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16952 fi
16953
16954 fi
16955 echo "$as_me:16955: result: $cf_cv_good_bcopy" >&5
16956 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16957
16958 else
16959   cf_cv_good_bcopy=no
16960 fi
16961
16962         if test "$cf_cv_good_bcopy" = yes ; then
16963
16964 cat >>confdefs.h <<\EOF
16965 #define USE_OK_BCOPY 1
16966 EOF
16967
16968         else
16969
16970 cat >>confdefs.h <<\EOF
16971 #define USE_MY_MEMMOVE 1
16972 EOF
16973
16974         fi
16975
16976 fi
16977
16978 echo "$as_me:16978: checking if poll really works" >&5
16979 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16980 if test "${cf_cv_working_poll+set}" = set; then
16981   echo $ECHO_N "(cached) $ECHO_C" >&6
16982 else
16983
16984 if test "$cross_compiling" = yes; then
16985   cf_cv_working_poll=unknown
16986 else
16987   cat >conftest.$ac_ext <<_ACEOF
16988 #line 16988 "configure"
16989 #include "confdefs.h"
16990
16991 #include <stdlib.h>
16992 #include <stdio.h>
16993 #include <unistd.h>
16994 #include <fcntl.h>
16995 #ifdef HAVE_POLL_H
16996 #include <poll.h>
16997 #else
16998 #include <sys/poll.h>
16999 #endif
17000 int main() {
17001         struct pollfd myfds;
17002         int ret;
17003
17004         /* check for Darwin bug with respect to "devices" */
17005         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17006         if (myfds.fd < 0)
17007                 myfds.fd = 0;
17008         myfds.events = POLLIN;
17009         myfds.revents = 0;
17010
17011         ret = poll(&myfds, 1, 100);
17012
17013         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17014                 ret = -1;
17015         } else {
17016                 int fd = 0;
17017                 if (!isatty(fd)) {
17018                         fd = open("/dev/tty", 2);       /* O_RDWR */
17019                 }
17020
17021                 if (fd >= 0) {
17022                         /* also check with standard input */
17023                         myfds.fd = fd;
17024                         myfds.events = POLLIN;
17025                         myfds.revents = 0;
17026                         ret = poll(&myfds, 1, 100);
17027                 } else {
17028                         ret = -1;
17029                 }
17030         }
17031         ${cf_cv_main_return:-return}(ret < 0);
17032 }
17033 _ACEOF
17034 rm -f conftest$ac_exeext
17035 if { (eval echo "$as_me:17035: \"$ac_link\"") >&5
17036   (eval $ac_link) 2>&5
17037   ac_status=$?
17038   echo "$as_me:17038: \$? = $ac_status" >&5
17039   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17040   { (eval echo "$as_me:17040: \"$ac_try\"") >&5
17041   (eval $ac_try) 2>&5
17042   ac_status=$?
17043   echo "$as_me:17043: \$? = $ac_status" >&5
17044   (exit $ac_status); }; }; then
17045   cf_cv_working_poll=yes
17046 else
17047   echo "$as_me: program exited with status $ac_status" >&5
17048 echo "$as_me: failed program was:" >&5
17049 cat conftest.$ac_ext >&5
17050 cf_cv_working_poll=no
17051 fi
17052 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17053 fi
17054 fi
17055 echo "$as_me:17055: result: $cf_cv_working_poll" >&5
17056 echo "${ECHO_T}$cf_cv_working_poll" >&6
17057 test "$cf_cv_working_poll" = "yes" &&
17058 cat >>confdefs.h <<\EOF
17059 #define HAVE_WORKING_POLL 1
17060 EOF
17061
17062 echo "$as_me:17062: checking for va_copy" >&5
17063 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17064 if test "${cf_cv_have_va_copy+set}" = set; then
17065   echo $ECHO_N "(cached) $ECHO_C" >&6
17066 else
17067
17068 cat >conftest.$ac_ext <<_ACEOF
17069 #line 17069 "configure"
17070 #include "confdefs.h"
17071
17072 #include <stdarg.h>
17073
17074 int
17075 main ()
17076 {
17077
17078         static va_list dst;
17079         static va_list src;
17080         va_copy(dst, src)
17081   ;
17082   return 0;
17083 }
17084 _ACEOF
17085 rm -f conftest.$ac_objext conftest$ac_exeext
17086 if { (eval echo "$as_me:17086: \"$ac_link\"") >&5
17087   (eval $ac_link) 2>&5
17088   ac_status=$?
17089   echo "$as_me:17089: \$? = $ac_status" >&5
17090   (exit $ac_status); } &&
17091          { ac_try='test -s conftest$ac_exeext'
17092   { (eval echo "$as_me:17092: \"$ac_try\"") >&5
17093   (eval $ac_try) 2>&5
17094   ac_status=$?
17095   echo "$as_me:17095: \$? = $ac_status" >&5
17096   (exit $ac_status); }; }; then
17097   cf_cv_have_va_copy=yes
17098 else
17099   echo "$as_me: failed program was:" >&5
17100 cat conftest.$ac_ext >&5
17101 cf_cv_have_va_copy=no
17102 fi
17103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17104 fi
17105 echo "$as_me:17105: result: $cf_cv_have_va_copy" >&5
17106 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17107
17108 test "$cf_cv_have_va_copy" = yes &&
17109 cat >>confdefs.h <<\EOF
17110 #define HAVE_VA_COPY 1
17111 EOF
17112
17113 echo "$as_me:17113: checking for __va_copy" >&5
17114 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17115 if test "${cf_cv_have___va_copy+set}" = set; then
17116   echo $ECHO_N "(cached) $ECHO_C" >&6
17117 else
17118
17119 cat >conftest.$ac_ext <<_ACEOF
17120 #line 17120 "configure"
17121 #include "confdefs.h"
17122
17123 #include <stdarg.h>
17124
17125 int
17126 main ()
17127 {
17128
17129         static va_list dst;
17130         static va_list src;
17131         __va_copy(dst, src)
17132   ;
17133   return 0;
17134 }
17135 _ACEOF
17136 rm -f conftest.$ac_objext conftest$ac_exeext
17137 if { (eval echo "$as_me:17137: \"$ac_link\"") >&5
17138   (eval $ac_link) 2>&5
17139   ac_status=$?
17140   echo "$as_me:17140: \$? = $ac_status" >&5
17141   (exit $ac_status); } &&
17142          { ac_try='test -s conftest$ac_exeext'
17143   { (eval echo "$as_me:17143: \"$ac_try\"") >&5
17144   (eval $ac_try) 2>&5
17145   ac_status=$?
17146   echo "$as_me:17146: \$? = $ac_status" >&5
17147   (exit $ac_status); }; }; then
17148   cf_cv_have___va_copy=yes
17149 else
17150   echo "$as_me: failed program was:" >&5
17151 cat conftest.$ac_ext >&5
17152 cf_cv_have___va_copy=no
17153 fi
17154 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17155 fi
17156 echo "$as_me:17156: result: $cf_cv_have___va_copy" >&5
17157 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17158
17159 test "$cf_cv_have___va_copy" = yes &&
17160 cat >>confdefs.h <<\EOF
17161 #define HAVE___VA_COPY 1
17162 EOF
17163
17164 echo "$as_me:17164: checking for pid_t" >&5
17165 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17166 if test "${ac_cv_type_pid_t+set}" = set; then
17167   echo $ECHO_N "(cached) $ECHO_C" >&6
17168 else
17169   cat >conftest.$ac_ext <<_ACEOF
17170 #line 17170 "configure"
17171 #include "confdefs.h"
17172 $ac_includes_default
17173 int
17174 main ()
17175 {
17176 if ((pid_t *) 0)
17177   return 0;
17178 if (sizeof (pid_t))
17179   return 0;
17180   ;
17181   return 0;
17182 }
17183 _ACEOF
17184 rm -f conftest.$ac_objext
17185 if { (eval echo "$as_me:17185: \"$ac_compile\"") >&5
17186   (eval $ac_compile) 2>&5
17187   ac_status=$?
17188   echo "$as_me:17188: \$? = $ac_status" >&5
17189   (exit $ac_status); } &&
17190          { ac_try='test -s conftest.$ac_objext'
17191   { (eval echo "$as_me:17191: \"$ac_try\"") >&5
17192   (eval $ac_try) 2>&5
17193   ac_status=$?
17194   echo "$as_me:17194: \$? = $ac_status" >&5
17195   (exit $ac_status); }; }; then
17196   ac_cv_type_pid_t=yes
17197 else
17198   echo "$as_me: failed program was:" >&5
17199 cat conftest.$ac_ext >&5
17200 ac_cv_type_pid_t=no
17201 fi
17202 rm -f conftest.$ac_objext conftest.$ac_ext
17203 fi
17204 echo "$as_me:17204: result: $ac_cv_type_pid_t" >&5
17205 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17206 if test $ac_cv_type_pid_t = yes; then
17207   :
17208 else
17209
17210 cat >>confdefs.h <<EOF
17211 #define pid_t int
17212 EOF
17213
17214 fi
17215
17216 for ac_header in unistd.h vfork.h
17217 do
17218 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17219 echo "$as_me:17219: checking for $ac_header" >&5
17220 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17221 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17222   echo $ECHO_N "(cached) $ECHO_C" >&6
17223 else
17224   cat >conftest.$ac_ext <<_ACEOF
17225 #line 17225 "configure"
17226 #include "confdefs.h"
17227 #include <$ac_header>
17228 _ACEOF
17229 if { (eval echo "$as_me:17229: \"$ac_cpp conftest.$ac_ext\"") >&5
17230   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17231   ac_status=$?
17232   egrep -v '^ *\+' conftest.er1 >conftest.err
17233   rm -f conftest.er1
17234   cat conftest.err >&5
17235   echo "$as_me:17235: \$? = $ac_status" >&5
17236   (exit $ac_status); } >/dev/null; then
17237   if test -s conftest.err; then
17238     ac_cpp_err=$ac_c_preproc_warn_flag
17239   else
17240     ac_cpp_err=
17241   fi
17242 else
17243   ac_cpp_err=yes
17244 fi
17245 if test -z "$ac_cpp_err"; then
17246   eval "$as_ac_Header=yes"
17247 else
17248   echo "$as_me: failed program was:" >&5
17249   cat conftest.$ac_ext >&5
17250   eval "$as_ac_Header=no"
17251 fi
17252 rm -f conftest.err conftest.$ac_ext
17253 fi
17254 echo "$as_me:17254: result: `eval echo '${'$as_ac_Header'}'`" >&5
17255 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17256 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17257   cat >>confdefs.h <<EOF
17258 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17259 EOF
17260
17261 fi
17262 done
17263
17264 for ac_func in fork vfork
17265 do
17266 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17267 echo "$as_me:17267: checking for $ac_func" >&5
17268 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17269 if eval "test \"\${$as_ac_var+set}\" = set"; then
17270   echo $ECHO_N "(cached) $ECHO_C" >&6
17271 else
17272   cat >conftest.$ac_ext <<_ACEOF
17273 #line 17273 "configure"
17274 #include "confdefs.h"
17275 /* System header to define __stub macros and hopefully few prototypes,
17276     which can conflict with char $ac_func (); below.  */
17277 #include <assert.h>
17278 /* Override any gcc2 internal prototype to avoid an error.  */
17279 #ifdef __cplusplus
17280 extern "C"
17281 #endif
17282 /* We use char because int might match the return type of a gcc2
17283    builtin and then its argument prototype would still apply.  */
17284 char $ac_func ();
17285 char (*f) ();
17286
17287 int
17288 main ()
17289 {
17290 /* The GNU C library defines this for functions which it implements
17291     to always fail with ENOSYS.  Some functions are actually named
17292     something starting with __ and the normal name is an alias.  */
17293 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17294 choke me
17295 #else
17296 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17297 #endif
17298
17299   ;
17300   return 0;
17301 }
17302 _ACEOF
17303 rm -f conftest.$ac_objext conftest$ac_exeext
17304 if { (eval echo "$as_me:17304: \"$ac_link\"") >&5
17305   (eval $ac_link) 2>&5
17306   ac_status=$?
17307   echo "$as_me:17307: \$? = $ac_status" >&5
17308   (exit $ac_status); } &&
17309          { ac_try='test -s conftest$ac_exeext'
17310   { (eval echo "$as_me:17310: \"$ac_try\"") >&5
17311   (eval $ac_try) 2>&5
17312   ac_status=$?
17313   echo "$as_me:17313: \$? = $ac_status" >&5
17314   (exit $ac_status); }; }; then
17315   eval "$as_ac_var=yes"
17316 else
17317   echo "$as_me: failed program was:" >&5
17318 cat conftest.$ac_ext >&5
17319 eval "$as_ac_var=no"
17320 fi
17321 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17322 fi
17323 echo "$as_me:17323: result: `eval echo '${'$as_ac_var'}'`" >&5
17324 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17325 if test `eval echo '${'$as_ac_var'}'` = yes; then
17326   cat >>confdefs.h <<EOF
17327 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17328 EOF
17329
17330 fi
17331 done
17332
17333 ac_cv_func_fork_works=$ac_cv_func_fork
17334 if test "x$ac_cv_func_fork" = xyes; then
17335   echo "$as_me:17335: checking for working fork" >&5
17336 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17337 if test "${ac_cv_func_fork_works+set}" = set; then
17338   echo $ECHO_N "(cached) $ECHO_C" >&6
17339 else
17340   if test "$cross_compiling" = yes; then
17341   ac_cv_func_fork_works=cross
17342 else
17343   cat >conftest.$ac_ext <<_ACEOF
17344 /* By Rüdiger Kuhlmann. */
17345       #include <sys/types.h>
17346       #if HAVE_UNISTD_H
17347       # include <unistd.h>
17348       #endif
17349       /* Some systems only have a dummy stub for fork() */
17350       int main ()
17351       {
17352         if (fork() < 0)
17353           $ac_main_return (1);
17354         $ac_main_return (0);
17355       }
17356 _ACEOF
17357 rm -f conftest$ac_exeext
17358 if { (eval echo "$as_me:17358: \"$ac_link\"") >&5
17359   (eval $ac_link) 2>&5
17360   ac_status=$?
17361   echo "$as_me:17361: \$? = $ac_status" >&5
17362   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17363   { (eval echo "$as_me:17363: \"$ac_try\"") >&5
17364   (eval $ac_try) 2>&5
17365   ac_status=$?
17366   echo "$as_me:17366: \$? = $ac_status" >&5
17367   (exit $ac_status); }; }; then
17368   ac_cv_func_fork_works=yes
17369 else
17370   echo "$as_me: program exited with status $ac_status" >&5
17371 echo "$as_me: failed program was:" >&5
17372 cat conftest.$ac_ext >&5
17373 ac_cv_func_fork_works=no
17374 fi
17375 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17376 fi
17377 fi
17378 echo "$as_me:17378: result: $ac_cv_func_fork_works" >&5
17379 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17380
17381 fi
17382 if test "x$ac_cv_func_fork_works" = xcross; then
17383   case $host in
17384     *-*-amigaos* | *-*-msdosdjgpp*)
17385       # Override, as these systems have only a dummy fork() stub
17386       ac_cv_func_fork_works=no
17387       ;;
17388     *)
17389       ac_cv_func_fork_works=yes
17390       ;;
17391   esac
17392   { echo "$as_me:17392: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17393 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17394 fi
17395 ac_cv_func_vfork_works=$ac_cv_func_vfork
17396 if test "x$ac_cv_func_vfork" = xyes; then
17397   echo "$as_me:17397: checking for working vfork" >&5
17398 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17399 if test "${ac_cv_func_vfork_works+set}" = set; then
17400   echo $ECHO_N "(cached) $ECHO_C" >&6
17401 else
17402   if test "$cross_compiling" = yes; then
17403   ac_cv_func_vfork_works=cross
17404 else
17405   cat >conftest.$ac_ext <<_ACEOF
17406 #line 17406 "configure"
17407 #include "confdefs.h"
17408 /* Thanks to Paul Eggert for this test.  */
17409 #include <stdio.h>
17410 #include <sys/types.h>
17411 #include <sys/stat.h>
17412 #if HAVE_UNISTD_H
17413 # include <unistd.h>
17414 #endif
17415 #if HAVE_VFORK_H
17416 # include <vfork.h>
17417 #endif
17418 /* On some sparc systems, changes by the child to local and incoming
17419    argument registers are propagated back to the parent.  The compiler
17420    is told about this with #include <vfork.h>, but some compilers
17421    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17422    static variable whose address is put into a register that is
17423    clobbered by the vfork.  */
17424 static
17425 #ifdef __cplusplus
17426 sparc_address_test (int arg)
17427 # else
17428 sparc_address_test (arg) int arg;
17429 #endif
17430 {
17431   static pid_t child;
17432   if (!child) {
17433     child = vfork ();
17434     if (child < 0) {
17435       perror ("vfork");
17436       _exit(2);
17437     }
17438     if (!child) {
17439       arg = getpid();
17440       write(-1, "", 0);
17441       _exit (arg);
17442     }
17443   }
17444 }
17445
17446 int
17447 main ()
17448 {
17449   pid_t parent = getpid ();
17450   pid_t child;
17451
17452   sparc_address_test ();
17453
17454   child = vfork ();
17455
17456   if (child == 0) {
17457     /* Here is another test for sparc vfork register problems.  This
17458        test uses lots of local variables, at least as many local
17459        variables as main has allocated so far including compiler
17460        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17461        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17462        reuse the register of parent for one of the local variables,
17463        since it will think that parent can't possibly be used any more
17464        in this routine.  Assigning to the local variable will thus
17465        munge parent in the parent process.  */
17466     pid_t
17467       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17468       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17469     /* Convince the compiler that p..p7 are live; otherwise, it might
17470        use the same hardware register for all 8 local variables.  */
17471     if (p != p1 || p != p2 || p != p3 || p != p4
17472         || p != p5 || p != p6 || p != p7)
17473       _exit(1);
17474
17475     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17476        from child file descriptors.  If the child closes a descriptor
17477        before it execs or exits, this munges the parent's descriptor
17478        as well.  Test for this by closing stdout in the child.  */
17479     _exit(close(fileno(stdout)) != 0);
17480   } else {
17481     int status;
17482     struct stat st;
17483
17484     while (wait(&status) != child)
17485       ;
17486     $ac_main_return(
17487          /* Was there some problem with vforking?  */
17488          child < 0
17489
17490          /* Did the child fail?  (This shouldn't happen.)  */
17491          || status
17492
17493          /* Did the vfork/compiler bug occur?  */
17494          || parent != getpid()
17495
17496          /* Did the file descriptor bug occur?  */
17497          || fstat(fileno(stdout), &st) != 0
17498          );
17499   }
17500 }
17501 _ACEOF
17502 rm -f conftest$ac_exeext
17503 if { (eval echo "$as_me:17503: \"$ac_link\"") >&5
17504   (eval $ac_link) 2>&5
17505   ac_status=$?
17506   echo "$as_me:17506: \$? = $ac_status" >&5
17507   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17508   { (eval echo "$as_me:17508: \"$ac_try\"") >&5
17509   (eval $ac_try) 2>&5
17510   ac_status=$?
17511   echo "$as_me:17511: \$? = $ac_status" >&5
17512   (exit $ac_status); }; }; then
17513   ac_cv_func_vfork_works=yes
17514 else
17515   echo "$as_me: program exited with status $ac_status" >&5
17516 echo "$as_me: failed program was:" >&5
17517 cat conftest.$ac_ext >&5
17518 ac_cv_func_vfork_works=no
17519 fi
17520 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17521 fi
17522 fi
17523 echo "$as_me:17523: result: $ac_cv_func_vfork_works" >&5
17524 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17525
17526 fi;
17527 if test "x$ac_cv_func_fork_works" = xcross; then
17528   ac_cv_func_vfork_works=ac_cv_func_vfork
17529   { echo "$as_me:17529: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17530 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17531 fi
17532
17533 if test "x$ac_cv_func_vfork_works" = xyes; then
17534
17535 cat >>confdefs.h <<\EOF
17536 #define HAVE_WORKING_VFORK 1
17537 EOF
17538
17539 else
17540
17541 cat >>confdefs.h <<\EOF
17542 #define vfork fork
17543 EOF
17544
17545 fi
17546 if test "x$ac_cv_func_fork_works" = xyes; then
17547
17548 cat >>confdefs.h <<\EOF
17549 #define HAVE_WORKING_FORK 1
17550 EOF
17551
17552 fi
17553
17554 # special check for test/ditto.c
17555
17556 echo "$as_me:17556: checking for openpty in -lutil" >&5
17557 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17558 if test "${ac_cv_lib_util_openpty+set}" = set; then
17559   echo $ECHO_N "(cached) $ECHO_C" >&6
17560 else
17561   ac_check_lib_save_LIBS=$LIBS
17562 LIBS="-lutil  $LIBS"
17563 cat >conftest.$ac_ext <<_ACEOF
17564 #line 17564 "configure"
17565 #include "confdefs.h"
17566
17567 /* Override any gcc2 internal prototype to avoid an error.  */
17568 #ifdef __cplusplus
17569 extern "C"
17570 #endif
17571 /* We use char because int might match the return type of a gcc2
17572    builtin and then its argument prototype would still apply.  */
17573 char openpty ();
17574 int
17575 main ()
17576 {
17577 openpty ();
17578   ;
17579   return 0;
17580 }
17581 _ACEOF
17582 rm -f conftest.$ac_objext conftest$ac_exeext
17583 if { (eval echo "$as_me:17583: \"$ac_link\"") >&5
17584   (eval $ac_link) 2>&5
17585   ac_status=$?
17586   echo "$as_me:17586: \$? = $ac_status" >&5
17587   (exit $ac_status); } &&
17588          { ac_try='test -s conftest$ac_exeext'
17589   { (eval echo "$as_me:17589: \"$ac_try\"") >&5
17590   (eval $ac_try) 2>&5
17591   ac_status=$?
17592   echo "$as_me:17592: \$? = $ac_status" >&5
17593   (exit $ac_status); }; }; then
17594   ac_cv_lib_util_openpty=yes
17595 else
17596   echo "$as_me: failed program was:" >&5
17597 cat conftest.$ac_ext >&5
17598 ac_cv_lib_util_openpty=no
17599 fi
17600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17601 LIBS=$ac_check_lib_save_LIBS
17602 fi
17603 echo "$as_me:17603: result: $ac_cv_lib_util_openpty" >&5
17604 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17605 if test $ac_cv_lib_util_openpty = yes; then
17606   cf_cv_lib_util=yes
17607 else
17608   cf_cv_lib_util=no
17609 fi
17610
17611 echo "$as_me:17611: checking for openpty header" >&5
17612 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17613 if test "${cf_cv_func_openpty+set}" = set; then
17614   echo $ECHO_N "(cached) $ECHO_C" >&6
17615 else
17616
17617     cf_save_LIBS="$LIBS"
17618     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17619     for cf_header in pty.h libutil.h util.h
17620     do
17621     cat >conftest.$ac_ext <<_ACEOF
17622 #line 17622 "configure"
17623 #include "confdefs.h"
17624
17625 #include <$cf_header>
17626
17627 int
17628 main ()
17629 {
17630
17631     int x = openpty((int *)0, (int *)0, (char *)0,
17632                    (struct termios *)0, (struct winsize *)0);
17633
17634   ;
17635   return 0;
17636 }
17637 _ACEOF
17638 rm -f conftest.$ac_objext conftest$ac_exeext
17639 if { (eval echo "$as_me:17639: \"$ac_link\"") >&5
17640   (eval $ac_link) 2>&5
17641   ac_status=$?
17642   echo "$as_me:17642: \$? = $ac_status" >&5
17643   (exit $ac_status); } &&
17644          { ac_try='test -s conftest$ac_exeext'
17645   { (eval echo "$as_me:17645: \"$ac_try\"") >&5
17646   (eval $ac_try) 2>&5
17647   ac_status=$?
17648   echo "$as_me:17648: \$? = $ac_status" >&5
17649   (exit $ac_status); }; }; then
17650
17651         cf_cv_func_openpty=$cf_header
17652         break
17653
17654 else
17655   echo "$as_me: failed program was:" >&5
17656 cat conftest.$ac_ext >&5
17657
17658         cf_cv_func_openpty=no
17659
17660 fi
17661 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17662     done
17663     LIBS="$cf_save_LIBS"
17664
17665 fi
17666 echo "$as_me:17666: result: $cf_cv_func_openpty" >&5
17667 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17668
17669 if test "$cf_cv_func_openpty" != no ; then
17670
17671 cat >>confdefs.h <<EOF
17672 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17673 EOF
17674
17675 cat >>confdefs.h <<\EOF
17676 #define USE_XTERM_PTY 1
17677 EOF
17678
17679     if test "x$cf_cv_lib_util" = xyes ; then
17680         TEST_LIBS="-lutil $TEST_LIBS"
17681     fi
17682 fi
17683
17684 if test "$with_hashed_db" != no ; then
17685
17686 cat >>confdefs.h <<\EOF
17687 #define USE_HASHED_DB 1
17688 EOF
17689
17690 case $with_hashed_db in #(vi
17691 yes|*able*) #(vi
17692     ;;
17693 *)
17694     if test -d "$with_hashed_db" ; then
17695
17696 if test -n "$with_hashed_db/include" ; then
17697   for cf_add_incdir in $with_hashed_db/include
17698   do
17699         while test $cf_add_incdir != /usr/include
17700         do
17701           if test -d $cf_add_incdir
17702           then
17703                 cf_have_incdir=no
17704                 if test -n "$CFLAGS$CPPFLAGS" ; then
17705                   # a loop is needed to ensure we can add subdirs of existing dirs
17706                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17707                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17708                           cf_have_incdir=yes; break
17709                         fi
17710                   done
17711                 fi
17712
17713                 if test "$cf_have_incdir" = no ; then
17714                   if test "$cf_add_incdir" = /usr/local/include ; then
17715                         if test "$GCC" = yes
17716                         then
17717                           cf_save_CPPFLAGS=$CPPFLAGS
17718                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17719                           cat >conftest.$ac_ext <<_ACEOF
17720 #line 17720 "configure"
17721 #include "confdefs.h"
17722 #include <stdio.h>
17723 int
17724 main ()
17725 {
17726 printf("Hello")
17727   ;
17728   return 0;
17729 }
17730 _ACEOF
17731 rm -f conftest.$ac_objext
17732 if { (eval echo "$as_me:17732: \"$ac_compile\"") >&5
17733   (eval $ac_compile) 2>&5
17734   ac_status=$?
17735   echo "$as_me:17735: \$? = $ac_status" >&5
17736   (exit $ac_status); } &&
17737          { ac_try='test -s conftest.$ac_objext'
17738   { (eval echo "$as_me:17738: \"$ac_try\"") >&5
17739   (eval $ac_try) 2>&5
17740   ac_status=$?
17741   echo "$as_me:17741: \$? = $ac_status" >&5
17742   (exit $ac_status); }; }; then
17743   :
17744 else
17745   echo "$as_me: failed program was:" >&5
17746 cat conftest.$ac_ext >&5
17747 cf_have_incdir=yes
17748 fi
17749 rm -f conftest.$ac_objext conftest.$ac_ext
17750                           CPPFLAGS=$cf_save_CPPFLAGS
17751                         fi
17752                   fi
17753                 fi
17754
17755                 if test "$cf_have_incdir" = no ; then
17756                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17757
17758 echo "${as_me:-configure}:17758: testing adding $cf_add_incdir to include-path ..." 1>&5
17759
17760                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17761
17762                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17763                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17764                   cf_add_incdir="$cf_top_incdir"
17765                 else
17766                   break
17767                 fi
17768           fi
17769         done
17770   done
17771 fi
17772
17773 if test -n "$with_hashed_db/lib" ; then
17774   for cf_add_libdir in $with_hashed_db/lib
17775   do
17776     if test $cf_add_libdir = /usr/lib ; then
17777       :
17778     elif test -d $cf_add_libdir
17779     then
17780       cf_have_libdir=no
17781       if test -n "$LDFLAGS$LIBS" ; then
17782         # a loop is needed to ensure we can add subdirs of existing dirs
17783         for cf_test_libdir in $LDFLAGS $LIBS ; do
17784           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17785             cf_have_libdir=yes; break
17786           fi
17787         done
17788       fi
17789       if test "$cf_have_libdir" = no ; then
17790         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17791
17792 echo "${as_me:-configure}:17792: testing adding $cf_add_libdir to library-path ..." 1>&5
17793
17794         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17795       fi
17796     fi
17797   done
17798 fi
17799
17800     fi
17801 esac
17802
17803 echo "$as_me:17803: checking for db.h" >&5
17804 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17805 if test "${ac_cv_header_db_h+set}" = set; then
17806   echo $ECHO_N "(cached) $ECHO_C" >&6
17807 else
17808   cat >conftest.$ac_ext <<_ACEOF
17809 #line 17809 "configure"
17810 #include "confdefs.h"
17811 #include <db.h>
17812 _ACEOF
17813 if { (eval echo "$as_me:17813: \"$ac_cpp conftest.$ac_ext\"") >&5
17814   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17815   ac_status=$?
17816   egrep -v '^ *\+' conftest.er1 >conftest.err
17817   rm -f conftest.er1
17818   cat conftest.err >&5
17819   echo "$as_me:17819: \$? = $ac_status" >&5
17820   (exit $ac_status); } >/dev/null; then
17821   if test -s conftest.err; then
17822     ac_cpp_err=$ac_c_preproc_warn_flag
17823   else
17824     ac_cpp_err=
17825   fi
17826 else
17827   ac_cpp_err=yes
17828 fi
17829 if test -z "$ac_cpp_err"; then
17830   ac_cv_header_db_h=yes
17831 else
17832   echo "$as_me: failed program was:" >&5
17833   cat conftest.$ac_ext >&5
17834   ac_cv_header_db_h=no
17835 fi
17836 rm -f conftest.err conftest.$ac_ext
17837 fi
17838 echo "$as_me:17838: result: $ac_cv_header_db_h" >&5
17839 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17840 if test $ac_cv_header_db_h = yes; then
17841
17842 echo "$as_me:17842: checking for version of db" >&5
17843 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17844 if test "${cf_cv_hashed_db_version+set}" = set; then
17845   echo $ECHO_N "(cached) $ECHO_C" >&6
17846 else
17847
17848 cf_cv_hashed_db_version=unknown
17849
17850 for cf_db_version in 1 2 3 4 5
17851 do
17852
17853 echo "${as_me:-configure}:17853: testing checking for db version $cf_db_version ..." 1>&5
17854
17855         cat >conftest.$ac_ext <<_ACEOF
17856 #line 17856 "configure"
17857 #include "confdefs.h"
17858
17859 $ac_includes_default
17860 #include <db.h>
17861
17862 #ifdef DB_VERSION_MAJOR
17863         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17864 #if $cf_db_version == DB_VERSION_MAJOR
17865         /* ok */
17866 #else
17867         make an error
17868 #endif
17869 #else
17870 #if $cf_db_version == 1
17871         /* ok: assuming this is DB 1.8.5 */
17872 #else
17873         make an error
17874 #endif
17875 #endif
17876
17877 int
17878 main ()
17879 {
17880 DBT *foo = 0
17881   ;
17882   return 0;
17883 }
17884 _ACEOF
17885 rm -f conftest.$ac_objext
17886 if { (eval echo "$as_me:17886: \"$ac_compile\"") >&5
17887   (eval $ac_compile) 2>&5
17888   ac_status=$?
17889   echo "$as_me:17889: \$? = $ac_status" >&5
17890   (exit $ac_status); } &&
17891          { ac_try='test -s conftest.$ac_objext'
17892   { (eval echo "$as_me:17892: \"$ac_try\"") >&5
17893   (eval $ac_try) 2>&5
17894   ac_status=$?
17895   echo "$as_me:17895: \$? = $ac_status" >&5
17896   (exit $ac_status); }; }; then
17897
17898         cf_cv_hashed_db_version=$cf_db_version
17899         break
17900
17901 else
17902   echo "$as_me: failed program was:" >&5
17903 cat conftest.$ac_ext >&5
17904 fi
17905 rm -f conftest.$ac_objext conftest.$ac_ext
17906 done
17907
17908 fi
17909 echo "$as_me:17909: result: $cf_cv_hashed_db_version" >&5
17910 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17911
17912 if test "$cf_cv_hashed_db_version" = unknown ; then
17913         { { echo "$as_me:17913: error: Cannot determine version of db" >&5
17914 echo "$as_me: error: Cannot determine version of db" >&2;}
17915    { (exit 1); exit 1; }; }
17916 else
17917
17918 echo "$as_me:17918: checking for db libraries" >&5
17919 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17920 if test "${cf_cv_hashed_db_libs+set}" = set; then
17921   echo $ECHO_N "(cached) $ECHO_C" >&6
17922 else
17923
17924 cf_cv_hashed_db_libs=unknown
17925 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17926 do
17927         cf_save_libs="$LIBS"
17928         if test -n "$cf_db_libs"; then
17929                 LIBS="-l$cf_db_libs $LIBS"
17930         fi
17931
17932 echo "${as_me:-configure}:17932: testing checking for library "$cf_db_libs" ..." 1>&5
17933
17934         cat >conftest.$ac_ext <<_ACEOF
17935 #line 17935 "configure"
17936 #include "confdefs.h"
17937
17938 $ac_includes_default
17939 #include <db.h>
17940
17941 int
17942 main ()
17943 {
17944
17945         char *path = "/tmp/foo";
17946 #ifdef DB_VERSION_MAJOR
17947 #if DB_VERSION_MAJOR >= 4
17948         DB *result = 0;
17949         db_create(&result, NULL, 0);
17950         result->open(result,
17951                 NULL,
17952                 path,
17953                 path,
17954                 DB_HASH,
17955                 DB_CREATE,
17956                 0644);
17957 #elif DB_VERSION_MAJOR >= 3
17958         DB *result = 0;
17959         db_create(&result, NULL, 0);
17960         result->open(result,
17961                 path,
17962                 path,
17963                 DB_HASH,
17964                 DB_CREATE,
17965                 0644);
17966 #elif DB_VERSION_MAJOR >= 2
17967         DB *result = 0;
17968         db_open(path,
17969                 DB_HASH,
17970                 DB_CREATE,
17971                 0644,
17972                 (DB_ENV *) 0,
17973                 (DB_INFO *) 0,
17974                 &result);
17975 #endif /* DB_VERSION_MAJOR */
17976 #else
17977         DB *result = dbopen(path,
17978                      2,
17979                      0644,
17980                      DB_HASH,
17981                      0);
17982 #endif
17983         ${cf_cv_main_return:-return}(result != 0)
17984
17985   ;
17986   return 0;
17987 }
17988 _ACEOF
17989 rm -f conftest.$ac_objext conftest$ac_exeext
17990 if { (eval echo "$as_me:17990: \"$ac_link\"") >&5
17991   (eval $ac_link) 2>&5
17992   ac_status=$?
17993   echo "$as_me:17993: \$? = $ac_status" >&5
17994   (exit $ac_status); } &&
17995          { ac_try='test -s conftest$ac_exeext'
17996   { (eval echo "$as_me:17996: \"$ac_try\"") >&5
17997   (eval $ac_try) 2>&5
17998   ac_status=$?
17999   echo "$as_me:17999: \$? = $ac_status" >&5
18000   (exit $ac_status); }; }; then
18001
18002         if test -n "$cf_db_libs" ; then
18003                 cf_cv_hashed_db_libs=$cf_db_libs
18004         else
18005                 cf_cv_hashed_db_libs=default
18006         fi
18007         LIBS="$cf_save_libs"
18008         break
18009
18010 else
18011   echo "$as_me: failed program was:" >&5
18012 cat conftest.$ac_ext >&5
18013 fi
18014 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18015         LIBS="$cf_save_libs"
18016 done
18017
18018 fi
18019 echo "$as_me:18019: result: $cf_cv_hashed_db_libs" >&5
18020 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18021
18022         if test "$cf_cv_hashed_db_libs" = unknown ; then
18023                 { { echo "$as_me:18023: error: Cannot determine library for db" >&5
18024 echo "$as_me: error: Cannot determine library for db" >&2;}
18025    { (exit 1); exit 1; }; }
18026         elif test "$cf_cv_hashed_db_libs" != default ; then
18027                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
18028         fi
18029 fi
18030
18031 else
18032
18033         { { echo "$as_me:18033: error: Cannot find db.h" >&5
18034 echo "$as_me: error: Cannot find db.h" >&2;}
18035    { (exit 1); exit 1; }; }
18036
18037 fi
18038
18039 fi
18040
18041 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18042         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18043         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18044 fi
18045
18046 # Just in case, check if the C compiler has a bool type.
18047
18048 echo "$as_me:18048: checking if we should include stdbool.h" >&5
18049 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18050
18051 if test "${cf_cv_header_stdbool_h+set}" = set; then
18052   echo $ECHO_N "(cached) $ECHO_C" >&6
18053 else
18054
18055         cat >conftest.$ac_ext <<_ACEOF
18056 #line 18056 "configure"
18057 #include "confdefs.h"
18058
18059 int
18060 main ()
18061 {
18062 bool foo = false
18063   ;
18064   return 0;
18065 }
18066 _ACEOF
18067 rm -f conftest.$ac_objext
18068 if { (eval echo "$as_me:18068: \"$ac_compile\"") >&5
18069   (eval $ac_compile) 2>&5
18070   ac_status=$?
18071   echo "$as_me:18071: \$? = $ac_status" >&5
18072   (exit $ac_status); } &&
18073          { ac_try='test -s conftest.$ac_objext'
18074   { (eval echo "$as_me:18074: \"$ac_try\"") >&5
18075   (eval $ac_try) 2>&5
18076   ac_status=$?
18077   echo "$as_me:18077: \$? = $ac_status" >&5
18078   (exit $ac_status); }; }; then
18079   cf_cv_header_stdbool_h=0
18080 else
18081   echo "$as_me: failed program was:" >&5
18082 cat conftest.$ac_ext >&5
18083 cat >conftest.$ac_ext <<_ACEOF
18084 #line 18084 "configure"
18085 #include "confdefs.h"
18086
18087 #ifndef __BEOS__
18088 #include <stdbool.h>
18089 #endif
18090
18091 int
18092 main ()
18093 {
18094 bool foo = false
18095   ;
18096   return 0;
18097 }
18098 _ACEOF
18099 rm -f conftest.$ac_objext
18100 if { (eval echo "$as_me:18100: \"$ac_compile\"") >&5
18101   (eval $ac_compile) 2>&5
18102   ac_status=$?
18103   echo "$as_me:18103: \$? = $ac_status" >&5
18104   (exit $ac_status); } &&
18105          { ac_try='test -s conftest.$ac_objext'
18106   { (eval echo "$as_me:18106: \"$ac_try\"") >&5
18107   (eval $ac_try) 2>&5
18108   ac_status=$?
18109   echo "$as_me:18109: \$? = $ac_status" >&5
18110   (exit $ac_status); }; }; then
18111   cf_cv_header_stdbool_h=1
18112 else
18113   echo "$as_me: failed program was:" >&5
18114 cat conftest.$ac_ext >&5
18115 cf_cv_header_stdbool_h=0
18116 fi
18117 rm -f conftest.$ac_objext conftest.$ac_ext
18118 fi
18119 rm -f conftest.$ac_objext conftest.$ac_ext
18120 fi
18121
18122 if test "$cf_cv_header_stdbool_h" = 1
18123 then    echo "$as_me:18123: result: yes" >&5
18124 echo "${ECHO_T}yes" >&6
18125 else    echo "$as_me:18125: result: no" >&5
18126 echo "${ECHO_T}no" >&6
18127 fi
18128
18129 echo "$as_me:18129: checking for builtin bool type" >&5
18130 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18131
18132 if test "${cf_cv_cc_bool_type+set}" = set; then
18133   echo $ECHO_N "(cached) $ECHO_C" >&6
18134 else
18135
18136         cat >conftest.$ac_ext <<_ACEOF
18137 #line 18137 "configure"
18138 #include "confdefs.h"
18139
18140 #include <stdio.h>
18141 #include <sys/types.h>
18142
18143 int
18144 main ()
18145 {
18146 bool x = false
18147   ;
18148   return 0;
18149 }
18150 _ACEOF
18151 rm -f conftest.$ac_objext
18152 if { (eval echo "$as_me:18152: \"$ac_compile\"") >&5
18153   (eval $ac_compile) 2>&5
18154   ac_status=$?
18155   echo "$as_me:18155: \$? = $ac_status" >&5
18156   (exit $ac_status); } &&
18157          { ac_try='test -s conftest.$ac_objext'
18158   { (eval echo "$as_me:18158: \"$ac_try\"") >&5
18159   (eval $ac_try) 2>&5
18160   ac_status=$?
18161   echo "$as_me:18161: \$? = $ac_status" >&5
18162   (exit $ac_status); }; }; then
18163   cf_cv_cc_bool_type=1
18164 else
18165   echo "$as_me: failed program was:" >&5
18166 cat conftest.$ac_ext >&5
18167 cf_cv_cc_bool_type=0
18168 fi
18169 rm -f conftest.$ac_objext conftest.$ac_ext
18170
18171 fi
18172
18173 if test "$cf_cv_cc_bool_type" = 1
18174 then    echo "$as_me:18174: result: yes" >&5
18175 echo "${ECHO_T}yes" >&6
18176 else    echo "$as_me:18176: result: no" >&5
18177 echo "${ECHO_T}no" >&6
18178 fi
18179
18180 # Check for C++ compiler characteristics (and ensure that it's there!)
18181 if test -n "$CXX" ; then
18182         ac_ext=cc
18183 ac_cpp='$CXXCPP $CPPFLAGS'
18184 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18185 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18186 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18187 ac_main_return=return
18188
18189 if test -n "$GXX" ; then
18190 case $cf_cv_system_name in #(vi
18191 os2*) #(vi
18192         cf_stdcpp_libname=stdcpp
18193         ;;
18194 *)
18195         cf_stdcpp_libname=stdc++
18196         ;;
18197 esac
18198 echo "$as_me:18198: checking for library $cf_stdcpp_libname" >&5
18199 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18200 if test "${cf_cv_libstdcpp+set}" = set; then
18201   echo $ECHO_N "(cached) $ECHO_C" >&6
18202 else
18203
18204         cf_save="$LIBS"
18205         LIBS="-l$cf_stdcpp_libname $LIBS"
18206 cat >conftest.$ac_ext <<_ACEOF
18207 #line 18207 "configure"
18208 #include "confdefs.h"
18209
18210 #include <strstream.h>
18211 int
18212 main ()
18213 {
18214
18215 char buf[80];
18216 strstreambuf foo(buf, sizeof(buf))
18217
18218   ;
18219   return 0;
18220 }
18221 _ACEOF
18222 rm -f conftest.$ac_objext conftest$ac_exeext
18223 if { (eval echo "$as_me:18223: \"$ac_link\"") >&5
18224   (eval $ac_link) 2>&5
18225   ac_status=$?
18226   echo "$as_me:18226: \$? = $ac_status" >&5
18227   (exit $ac_status); } &&
18228          { ac_try='test -s conftest$ac_exeext'
18229   { (eval echo "$as_me:18229: \"$ac_try\"") >&5
18230   (eval $ac_try) 2>&5
18231   ac_status=$?
18232   echo "$as_me:18232: \$? = $ac_status" >&5
18233   (exit $ac_status); }; }; then
18234   cf_cv_libstdcpp=yes
18235 else
18236   echo "$as_me: failed program was:" >&5
18237 cat conftest.$ac_ext >&5
18238 cf_cv_libstdcpp=no
18239 fi
18240 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18241         LIBS="$cf_save"
18242
18243 fi
18244 echo "$as_me:18244: result: $cf_cv_libstdcpp" >&5
18245 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18246 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
18247 fi
18248
18249         echo "$as_me:18249: checking whether $CXX understands -c and -o together" >&5
18250 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18251 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18252   echo $ECHO_N "(cached) $ECHO_C" >&6
18253 else
18254
18255 cat > conftest.$ac_ext <<CF_EOF
18256 #include <stdio.h>
18257 int main()
18258 {
18259         ${cf_cv_main_return:-return}(0);
18260 }
18261 CF_EOF
18262 # We do the test twice because some compilers refuse to overwrite an
18263 # existing .o file with -o, though they will create one.
18264 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18265 if { (eval echo "$as_me:18265: \"$ac_try\"") >&5
18266   (eval $ac_try) 2>&5
18267   ac_status=$?
18268   echo "$as_me:18268: \$? = $ac_status" >&5
18269   (exit $ac_status); } &&
18270   test -f conftest2.$ac_objext && { (eval echo "$as_me:18270: \"$ac_try\"") >&5
18271   (eval $ac_try) 2>&5
18272   ac_status=$?
18273   echo "$as_me:18273: \$? = $ac_status" >&5
18274   (exit $ac_status); };
18275 then
18276   eval cf_cv_prog_CXX_c_o=yes
18277 else
18278   eval cf_cv_prog_CXX_c_o=no
18279 fi
18280 rm -rf conftest*
18281
18282 fi
18283 if test $cf_cv_prog_CXX_c_o = yes; then
18284   echo "$as_me:18284: result: yes" >&5
18285 echo "${ECHO_T}yes" >&6
18286 else
18287   echo "$as_me:18287: result: no" >&5
18288 echo "${ECHO_T}no" >&6
18289 fi
18290
18291         case $GXX_VERSION in
18292         1*|2.0-6*)
18293                 cf_cxx_library=yes
18294                 ;;
18295         *-2.7*|2.7*)
18296
18297 cf_cxx_library=unknown
18298 case $cf_cv_system_name in #(vi
18299 os2*) #(vi
18300         cf_gpp_libname=gpp
18301         ;;
18302 *)
18303         cf_gpp_libname=g++
18304         ;;
18305 esac
18306 if test "$GXX" = yes; then
18307         echo "$as_me:18307: checking for lib$cf_gpp_libname" >&5
18308 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18309         cf_save="$LIBS"
18310         LIBS="-l$cf_gpp_libname $LIBS"
18311         cat >conftest.$ac_ext <<_ACEOF
18312 #line 18312 "configure"
18313 #include "confdefs.h"
18314
18315 #include <$cf_gpp_libname/builtin.h>
18316
18317 int
18318 main ()
18319 {
18320 two_arg_error_handler_t foo2 = lib_error_handler
18321   ;
18322   return 0;
18323 }
18324 _ACEOF
18325 rm -f conftest.$ac_objext conftest$ac_exeext
18326 if { (eval echo "$as_me:18326: \"$ac_link\"") >&5
18327   (eval $ac_link) 2>&5
18328   ac_status=$?
18329   echo "$as_me:18329: \$? = $ac_status" >&5
18330   (exit $ac_status); } &&
18331          { ac_try='test -s conftest$ac_exeext'
18332   { (eval echo "$as_me:18332: \"$ac_try\"") >&5
18333   (eval $ac_try) 2>&5
18334   ac_status=$?
18335   echo "$as_me:18335: \$? = $ac_status" >&5
18336   (exit $ac_status); }; }; then
18337   cf_cxx_library=yes
18338          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18339          if test "$cf_gpp_libname" = cpp ; then
18340
18341 cat >>confdefs.h <<\EOF
18342 #define HAVE_GPP_BUILTIN_H 1
18343 EOF
18344
18345          else
18346
18347 cat >>confdefs.h <<\EOF
18348 #define HAVE_GXX_BUILTIN_H 1
18349 EOF
18350
18351          fi
18352 else
18353   echo "$as_me: failed program was:" >&5
18354 cat conftest.$ac_ext >&5
18355 cat >conftest.$ac_ext <<_ACEOF
18356 #line 18356 "configure"
18357 #include "confdefs.h"
18358
18359 #include <builtin.h>
18360
18361 int
18362 main ()
18363 {
18364 two_arg_error_handler_t foo2 = lib_error_handler
18365   ;
18366   return 0;
18367 }
18368 _ACEOF
18369 rm -f conftest.$ac_objext conftest$ac_exeext
18370 if { (eval echo "$as_me:18370: \"$ac_link\"") >&5
18371   (eval $ac_link) 2>&5
18372   ac_status=$?
18373   echo "$as_me:18373: \$? = $ac_status" >&5
18374   (exit $ac_status); } &&
18375          { ac_try='test -s conftest$ac_exeext'
18376   { (eval echo "$as_me:18376: \"$ac_try\"") >&5
18377   (eval $ac_try) 2>&5
18378   ac_status=$?
18379   echo "$as_me:18379: \$? = $ac_status" >&5
18380   (exit $ac_status); }; }; then
18381   cf_cxx_library=yes
18382          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18383
18384 cat >>confdefs.h <<\EOF
18385 #define HAVE_BUILTIN_H 1
18386 EOF
18387
18388 else
18389   echo "$as_me: failed program was:" >&5
18390 cat conftest.$ac_ext >&5
18391 cf_cxx_library=no
18392 fi
18393 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18394 fi
18395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18396         LIBS="$cf_save"
18397         echo "$as_me:18397: result: $cf_cxx_library" >&5
18398 echo "${ECHO_T}$cf_cxx_library" >&6
18399 fi
18400
18401                 ;;
18402         *)
18403                 cf_cxx_library=no
18404                 ;;
18405         esac
18406
18407         ac_ext=cc
18408 ac_cpp='$CXXCPP $CPPFLAGS'
18409 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18410 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18411 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18412 ac_main_return=return
18413 echo "$as_me:18413: checking how to run the C++ preprocessor" >&5
18414 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18415 if test -z "$CXXCPP"; then
18416   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18417   echo $ECHO_N "(cached) $ECHO_C" >&6
18418 else
18419       # Double quotes because CXXCPP needs to be expanded
18420     for CXXCPP in "$CXX -E" "/lib/cpp"
18421     do
18422       ac_preproc_ok=false
18423 for ac_cxx_preproc_warn_flag in '' yes
18424 do
18425   # Use a header file that comes with gcc, so configuring glibc
18426   # with a fresh cross-compiler works.
18427   # On the NeXT, cc -E runs the code through the compiler's parser,
18428   # not just through cpp. "Syntax error" is here to catch this case.
18429   cat >conftest.$ac_ext <<_ACEOF
18430 #line 18430 "configure"
18431 #include "confdefs.h"
18432 #include <assert.h>
18433                      Syntax error
18434 _ACEOF
18435 if { (eval echo "$as_me:18435: \"$ac_cpp conftest.$ac_ext\"") >&5
18436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18437   ac_status=$?
18438   egrep -v '^ *\+' conftest.er1 >conftest.err
18439   rm -f conftest.er1
18440   cat conftest.err >&5
18441   echo "$as_me:18441: \$? = $ac_status" >&5
18442   (exit $ac_status); } >/dev/null; then
18443   if test -s conftest.err; then
18444     ac_cpp_err=$ac_cxx_preproc_warn_flag
18445   else
18446     ac_cpp_err=
18447   fi
18448 else
18449   ac_cpp_err=yes
18450 fi
18451 if test -z "$ac_cpp_err"; then
18452   :
18453 else
18454   echo "$as_me: failed program was:" >&5
18455   cat conftest.$ac_ext >&5
18456   # Broken: fails on valid input.
18457 continue
18458 fi
18459 rm -f conftest.err conftest.$ac_ext
18460
18461   # OK, works on sane cases.  Now check whether non-existent headers
18462   # can be detected and how.
18463   cat >conftest.$ac_ext <<_ACEOF
18464 #line 18464 "configure"
18465 #include "confdefs.h"
18466 #include <ac_nonexistent.h>
18467 _ACEOF
18468 if { (eval echo "$as_me:18468: \"$ac_cpp conftest.$ac_ext\"") >&5
18469   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18470   ac_status=$?
18471   egrep -v '^ *\+' conftest.er1 >conftest.err
18472   rm -f conftest.er1
18473   cat conftest.err >&5
18474   echo "$as_me:18474: \$? = $ac_status" >&5
18475   (exit $ac_status); } >/dev/null; then
18476   if test -s conftest.err; then
18477     ac_cpp_err=$ac_cxx_preproc_warn_flag
18478   else
18479     ac_cpp_err=
18480   fi
18481 else
18482   ac_cpp_err=yes
18483 fi
18484 if test -z "$ac_cpp_err"; then
18485   # Broken: success on invalid input.
18486 continue
18487 else
18488   echo "$as_me: failed program was:" >&5
18489   cat conftest.$ac_ext >&5
18490   # Passes both tests.
18491 ac_preproc_ok=:
18492 break
18493 fi
18494 rm -f conftest.err conftest.$ac_ext
18495
18496 done
18497 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18498 rm -f conftest.err conftest.$ac_ext
18499 if $ac_preproc_ok; then
18500   break
18501 fi
18502
18503     done
18504     ac_cv_prog_CXXCPP=$CXXCPP
18505
18506 fi
18507   CXXCPP=$ac_cv_prog_CXXCPP
18508 else
18509   ac_cv_prog_CXXCPP=$CXXCPP
18510 fi
18511 echo "$as_me:18511: result: $CXXCPP" >&5
18512 echo "${ECHO_T}$CXXCPP" >&6
18513 ac_preproc_ok=false
18514 for ac_cxx_preproc_warn_flag in '' yes
18515 do
18516   # Use a header file that comes with gcc, so configuring glibc
18517   # with a fresh cross-compiler works.
18518   # On the NeXT, cc -E runs the code through the compiler's parser,
18519   # not just through cpp. "Syntax error" is here to catch this case.
18520   cat >conftest.$ac_ext <<_ACEOF
18521 #line 18521 "configure"
18522 #include "confdefs.h"
18523 #include <assert.h>
18524                      Syntax error
18525 _ACEOF
18526 if { (eval echo "$as_me:18526: \"$ac_cpp conftest.$ac_ext\"") >&5
18527   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18528   ac_status=$?
18529   egrep -v '^ *\+' conftest.er1 >conftest.err
18530   rm -f conftest.er1
18531   cat conftest.err >&5
18532   echo "$as_me:18532: \$? = $ac_status" >&5
18533   (exit $ac_status); } >/dev/null; then
18534   if test -s conftest.err; then
18535     ac_cpp_err=$ac_cxx_preproc_warn_flag
18536   else
18537     ac_cpp_err=
18538   fi
18539 else
18540   ac_cpp_err=yes
18541 fi
18542 if test -z "$ac_cpp_err"; then
18543   :
18544 else
18545   echo "$as_me: failed program was:" >&5
18546   cat conftest.$ac_ext >&5
18547   # Broken: fails on valid input.
18548 continue
18549 fi
18550 rm -f conftest.err conftest.$ac_ext
18551
18552   # OK, works on sane cases.  Now check whether non-existent headers
18553   # can be detected and how.
18554   cat >conftest.$ac_ext <<_ACEOF
18555 #line 18555 "configure"
18556 #include "confdefs.h"
18557 #include <ac_nonexistent.h>
18558 _ACEOF
18559 if { (eval echo "$as_me:18559: \"$ac_cpp conftest.$ac_ext\"") >&5
18560   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18561   ac_status=$?
18562   egrep -v '^ *\+' conftest.er1 >conftest.err
18563   rm -f conftest.er1
18564   cat conftest.err >&5
18565   echo "$as_me:18565: \$? = $ac_status" >&5
18566   (exit $ac_status); } >/dev/null; then
18567   if test -s conftest.err; then
18568     ac_cpp_err=$ac_cxx_preproc_warn_flag
18569   else
18570     ac_cpp_err=
18571   fi
18572 else
18573   ac_cpp_err=yes
18574 fi
18575 if test -z "$ac_cpp_err"; then
18576   # Broken: success on invalid input.
18577 continue
18578 else
18579   echo "$as_me: failed program was:" >&5
18580   cat conftest.$ac_ext >&5
18581   # Passes both tests.
18582 ac_preproc_ok=:
18583 break
18584 fi
18585 rm -f conftest.err conftest.$ac_ext
18586
18587 done
18588 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18589 rm -f conftest.err conftest.$ac_ext
18590 if $ac_preproc_ok; then
18591   :
18592 else
18593   { { echo "$as_me:18593: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18594 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18595    { (exit 1); exit 1; }; }
18596 fi
18597
18598 ac_ext=cc
18599 ac_cpp='$CXXCPP $CPPFLAGS'
18600 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18601 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18602 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18603 ac_main_return=return
18604
18605 for ac_header in typeinfo
18606 do
18607 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18608 echo "$as_me:18608: checking for $ac_header" >&5
18609 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18610 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18611   echo $ECHO_N "(cached) $ECHO_C" >&6
18612 else
18613   cat >conftest.$ac_ext <<_ACEOF
18614 #line 18614 "configure"
18615 #include "confdefs.h"
18616 #include <$ac_header>
18617 _ACEOF
18618 if { (eval echo "$as_me:18618: \"$ac_cpp conftest.$ac_ext\"") >&5
18619   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18620   ac_status=$?
18621   egrep -v '^ *\+' conftest.er1 >conftest.err
18622   rm -f conftest.er1
18623   cat conftest.err >&5
18624   echo "$as_me:18624: \$? = $ac_status" >&5
18625   (exit $ac_status); } >/dev/null; then
18626   if test -s conftest.err; then
18627     ac_cpp_err=$ac_cxx_preproc_warn_flag
18628   else
18629     ac_cpp_err=
18630   fi
18631 else
18632   ac_cpp_err=yes
18633 fi
18634 if test -z "$ac_cpp_err"; then
18635   eval "$as_ac_Header=yes"
18636 else
18637   echo "$as_me: failed program was:" >&5
18638   cat conftest.$ac_ext >&5
18639   eval "$as_ac_Header=no"
18640 fi
18641 rm -f conftest.err conftest.$ac_ext
18642 fi
18643 echo "$as_me:18643: result: `eval echo '${'$as_ac_Header'}'`" >&5
18644 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18645 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18646   cat >>confdefs.h <<EOF
18647 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18648 EOF
18649
18650 fi
18651 done
18652
18653 for ac_header in iostream
18654 do
18655 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18656 echo "$as_me:18656: checking for $ac_header" >&5
18657 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18658 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18659   echo $ECHO_N "(cached) $ECHO_C" >&6
18660 else
18661   cat >conftest.$ac_ext <<_ACEOF
18662 #line 18662 "configure"
18663 #include "confdefs.h"
18664 #include <$ac_header>
18665 _ACEOF
18666 if { (eval echo "$as_me:18666: \"$ac_cpp conftest.$ac_ext\"") >&5
18667   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18668   ac_status=$?
18669   egrep -v '^ *\+' conftest.er1 >conftest.err
18670   rm -f conftest.er1
18671   cat conftest.err >&5
18672   echo "$as_me:18672: \$? = $ac_status" >&5
18673   (exit $ac_status); } >/dev/null; then
18674   if test -s conftest.err; then
18675     ac_cpp_err=$ac_cxx_preproc_warn_flag
18676   else
18677     ac_cpp_err=
18678   fi
18679 else
18680   ac_cpp_err=yes
18681 fi
18682 if test -z "$ac_cpp_err"; then
18683   eval "$as_ac_Header=yes"
18684 else
18685   echo "$as_me: failed program was:" >&5
18686   cat conftest.$ac_ext >&5
18687   eval "$as_ac_Header=no"
18688 fi
18689 rm -f conftest.err conftest.$ac_ext
18690 fi
18691 echo "$as_me:18691: result: `eval echo '${'$as_ac_Header'}'`" >&5
18692 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18693 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18694   cat >>confdefs.h <<EOF
18695 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18696 EOF
18697
18698 fi
18699 done
18700
18701 if test x"$ac_cv_header_iostream" = xyes ; then
18702         echo "$as_me:18702: checking if iostream uses std-namespace" >&5
18703 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18704         cat >conftest.$ac_ext <<_ACEOF
18705 #line 18705 "configure"
18706 #include "confdefs.h"
18707
18708 #include <iostream>
18709 using std::endl;
18710 using std::cerr;
18711 int
18712 main ()
18713 {
18714
18715 cerr << "testing" << endl;
18716
18717   ;
18718   return 0;
18719 }
18720 _ACEOF
18721 rm -f conftest.$ac_objext
18722 if { (eval echo "$as_me:18722: \"$ac_compile\"") >&5
18723   (eval $ac_compile) 2>&5
18724   ac_status=$?
18725   echo "$as_me:18725: \$? = $ac_status" >&5
18726   (exit $ac_status); } &&
18727          { ac_try='test -s conftest.$ac_objext'
18728   { (eval echo "$as_me:18728: \"$ac_try\"") >&5
18729   (eval $ac_try) 2>&5
18730   ac_status=$?
18731   echo "$as_me:18731: \$? = $ac_status" >&5
18732   (exit $ac_status); }; }; then
18733   cf_iostream_namespace=yes
18734 else
18735   echo "$as_me: failed program was:" >&5
18736 cat conftest.$ac_ext >&5
18737 cf_iostream_namespace=no
18738 fi
18739 rm -f conftest.$ac_objext conftest.$ac_ext
18740         echo "$as_me:18740: result: $cf_iostream_namespace" >&5
18741 echo "${ECHO_T}$cf_iostream_namespace" >&6
18742         if test "$cf_iostream_namespace" = yes ; then
18743
18744 cat >>confdefs.h <<\EOF
18745 #define IOSTREAM_NAMESPACE 1
18746 EOF
18747
18748         fi
18749 fi
18750
18751 echo "$as_me:18751: checking if we should include stdbool.h" >&5
18752 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18753
18754 if test "${cf_cv_header_stdbool_h+set}" = set; then
18755   echo $ECHO_N "(cached) $ECHO_C" >&6
18756 else
18757
18758         cat >conftest.$ac_ext <<_ACEOF
18759 #line 18759 "configure"
18760 #include "confdefs.h"
18761
18762 int
18763 main ()
18764 {
18765 bool foo = false
18766   ;
18767   return 0;
18768 }
18769 _ACEOF
18770 rm -f conftest.$ac_objext
18771 if { (eval echo "$as_me:18771: \"$ac_compile\"") >&5
18772   (eval $ac_compile) 2>&5
18773   ac_status=$?
18774   echo "$as_me:18774: \$? = $ac_status" >&5
18775   (exit $ac_status); } &&
18776          { ac_try='test -s conftest.$ac_objext'
18777   { (eval echo "$as_me:18777: \"$ac_try\"") >&5
18778   (eval $ac_try) 2>&5
18779   ac_status=$?
18780   echo "$as_me:18780: \$? = $ac_status" >&5
18781   (exit $ac_status); }; }; then
18782   cf_cv_header_stdbool_h=0
18783 else
18784   echo "$as_me: failed program was:" >&5
18785 cat conftest.$ac_ext >&5
18786 cat >conftest.$ac_ext <<_ACEOF
18787 #line 18787 "configure"
18788 #include "confdefs.h"
18789
18790 #ifndef __BEOS__
18791 #include <stdbool.h>
18792 #endif
18793
18794 int
18795 main ()
18796 {
18797 bool foo = false
18798   ;
18799   return 0;
18800 }
18801 _ACEOF
18802 rm -f conftest.$ac_objext
18803 if { (eval echo "$as_me:18803: \"$ac_compile\"") >&5
18804   (eval $ac_compile) 2>&5
18805   ac_status=$?
18806   echo "$as_me:18806: \$? = $ac_status" >&5
18807   (exit $ac_status); } &&
18808          { ac_try='test -s conftest.$ac_objext'
18809   { (eval echo "$as_me:18809: \"$ac_try\"") >&5
18810   (eval $ac_try) 2>&5
18811   ac_status=$?
18812   echo "$as_me:18812: \$? = $ac_status" >&5
18813   (exit $ac_status); }; }; then
18814   cf_cv_header_stdbool_h=1
18815 else
18816   echo "$as_me: failed program was:" >&5
18817 cat conftest.$ac_ext >&5
18818 cf_cv_header_stdbool_h=0
18819 fi
18820 rm -f conftest.$ac_objext conftest.$ac_ext
18821 fi
18822 rm -f conftest.$ac_objext conftest.$ac_ext
18823 fi
18824
18825 if test "$cf_cv_header_stdbool_h" = 1
18826 then    echo "$as_me:18826: result: yes" >&5
18827 echo "${ECHO_T}yes" >&6
18828 else    echo "$as_me:18828: result: no" >&5
18829 echo "${ECHO_T}no" >&6
18830 fi
18831
18832 echo "$as_me:18832: checking for builtin bool type" >&5
18833 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18834
18835 if test "${cf_cv_builtin_bool+set}" = set; then
18836   echo $ECHO_N "(cached) $ECHO_C" >&6
18837 else
18838
18839         cat >conftest.$ac_ext <<_ACEOF
18840 #line 18840 "configure"
18841 #include "confdefs.h"
18842
18843 #include <stdio.h>
18844 #include <sys/types.h>
18845
18846 int
18847 main ()
18848 {
18849 bool x = false
18850   ;
18851   return 0;
18852 }
18853 _ACEOF
18854 rm -f conftest.$ac_objext
18855 if { (eval echo "$as_me:18855: \"$ac_compile\"") >&5
18856   (eval $ac_compile) 2>&5
18857   ac_status=$?
18858   echo "$as_me:18858: \$? = $ac_status" >&5
18859   (exit $ac_status); } &&
18860          { ac_try='test -s conftest.$ac_objext'
18861   { (eval echo "$as_me:18861: \"$ac_try\"") >&5
18862   (eval $ac_try) 2>&5
18863   ac_status=$?
18864   echo "$as_me:18864: \$? = $ac_status" >&5
18865   (exit $ac_status); }; }; then
18866   cf_cv_builtin_bool=1
18867 else
18868   echo "$as_me: failed program was:" >&5
18869 cat conftest.$ac_ext >&5
18870 cf_cv_builtin_bool=0
18871 fi
18872 rm -f conftest.$ac_objext conftest.$ac_ext
18873
18874 fi
18875
18876 if test "$cf_cv_builtin_bool" = 1
18877 then    echo "$as_me:18877: result: yes" >&5
18878 echo "${ECHO_T}yes" >&6
18879 else    echo "$as_me:18879: result: no" >&5
18880 echo "${ECHO_T}no" >&6
18881 fi
18882
18883 echo "$as_me:18883: checking for size of bool" >&5
18884 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18885 if test "${cf_cv_type_of_bool+set}" = set; then
18886   echo $ECHO_N "(cached) $ECHO_C" >&6
18887 else
18888
18889         rm -f cf_test.out
18890         if test "$cross_compiling" = yes; then
18891   cf_cv_type_of_bool=unknown
18892 else
18893   cat >conftest.$ac_ext <<_ACEOF
18894 #line 18894 "configure"
18895 #include "confdefs.h"
18896
18897 #include <stdlib.h>
18898 #include <stdio.h>
18899
18900 #if defined(__cplusplus)
18901
18902 #ifdef HAVE_GXX_BUILTIN_H
18903 #include <g++/builtin.h>
18904 #elif HAVE_GPP_BUILTIN_H
18905 #include <gpp/builtin.h>
18906 #elif HAVE_BUILTIN_H
18907 #include <builtin.h>
18908 #endif
18909
18910 #else
18911
18912 #if $cf_cv_header_stdbool_h
18913 #include <stdbool.h>
18914 #endif
18915
18916 #endif
18917
18918 int main()
18919 {
18920         FILE *fp = fopen("cf_test.out", "w");
18921         if (fp != 0) {
18922                 bool x = true;
18923                 if ((bool)(-x) >= 0)
18924                         fputs("unsigned ", fp);
18925                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18926                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18927                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18928                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18929                 fclose(fp);
18930         }
18931         ${cf_cv_main_return:-return}(0);
18932 }
18933
18934 _ACEOF
18935 rm -f conftest$ac_exeext
18936 if { (eval echo "$as_me:18936: \"$ac_link\"") >&5
18937   (eval $ac_link) 2>&5
18938   ac_status=$?
18939   echo "$as_me:18939: \$? = $ac_status" >&5
18940   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18941   { (eval echo "$as_me:18941: \"$ac_try\"") >&5
18942   (eval $ac_try) 2>&5
18943   ac_status=$?
18944   echo "$as_me:18944: \$? = $ac_status" >&5
18945   (exit $ac_status); }; }; then
18946   cf_cv_type_of_bool=`cat cf_test.out`
18947                  if test -z "$cf_cv_type_of_bool"; then
18948                    cf_cv_type_of_bool=unknown
18949                  fi
18950 else
18951   echo "$as_me: program exited with status $ac_status" >&5
18952 echo "$as_me: failed program was:" >&5
18953 cat conftest.$ac_ext >&5
18954 cf_cv_type_of_bool=unknown
18955 fi
18956 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18957 fi
18958
18959 fi
18960
18961         rm -f cf_test.out
18962 echo "$as_me:18962: result: $cf_cv_type_of_bool" >&5
18963 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18964 if test "$cf_cv_type_of_bool" = unknown ; then
18965         case .$NCURSES_BOOL in #(vi
18966         .auto|.) NCURSES_BOOL=unsigned;;
18967         esac
18968         { echo "$as_me:18968: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18969 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18970         cf_cv_type_of_bool=$NCURSES_BOOL
18971 fi
18972
18973 echo "$as_me:18973: checking for special defines needed for etip.h" >&5
18974 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18975 cf_save_CXXFLAGS="$CXXFLAGS"
18976 cf_result="none"
18977
18978 # etip.h includes ncurses.h which includes ncurses_dll.h
18979 # But ncurses_dll.h is generated - fix here.
18980 test -d include || mkdir include
18981 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
18982
18983 for cf_math in "" MATH_H
18984 do
18985 for cf_excp in "" MATH_EXCEPTION
18986 do
18987         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18988         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18989         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18990 cat >conftest.$ac_ext <<_ACEOF
18991 #line 18991 "configure"
18992 #include "confdefs.h"
18993
18994 #include <etip.h.in>
18995
18996 int
18997 main ()
18998 {
18999
19000   ;
19001   return 0;
19002 }
19003 _ACEOF
19004 rm -f conftest.$ac_objext
19005 if { (eval echo "$as_me:19005: \"$ac_compile\"") >&5
19006   (eval $ac_compile) 2>&5
19007   ac_status=$?
19008   echo "$as_me:19008: \$? = $ac_status" >&5
19009   (exit $ac_status); } &&
19010          { ac_try='test -s conftest.$ac_objext'
19011   { (eval echo "$as_me:19011: \"$ac_try\"") >&5
19012   (eval $ac_try) 2>&5
19013   ac_status=$?
19014   echo "$as_me:19014: \$? = $ac_status" >&5
19015   (exit $ac_status); }; }; then
19016
19017         test -n "$cf_math" && cat >>confdefs.h <<EOF
19018 #define ETIP_NEEDS_${cf_math} 1
19019 EOF
19020
19021         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19022 #define ETIP_NEEDS_${cf_excp} 1
19023 EOF
19024
19025         cf_result="$cf_math $cf_excp"
19026         break 2
19027
19028 else
19029   echo "$as_me: failed program was:" >&5
19030 cat conftest.$ac_ext >&5
19031 fi
19032 rm -f conftest.$ac_objext conftest.$ac_ext
19033 done
19034 done
19035 echo "$as_me:19035: result: $cf_result" >&5
19036 echo "${ECHO_T}$cf_result" >&6
19037 CXXFLAGS="$cf_save_CXXFLAGS"
19038
19039 if test -n "$CXX"; then
19040 echo "$as_me:19040: checking if $CXX accepts parameter initialization" >&5
19041 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19042 if test "${cf_cv_cpp_param_init+set}" = set; then
19043   echo $ECHO_N "(cached) $ECHO_C" >&6
19044 else
19045
19046         ac_ext=cc
19047 ac_cpp='$CXXCPP $CPPFLAGS'
19048 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19049 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19050 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19051 ac_main_return=return
19052
19053         if test "$cross_compiling" = yes; then
19054   cf_cv_cpp_param_init=unknown
19055 else
19056   cat >conftest.$ac_ext <<_ACEOF
19057 #line 19057 "configure"
19058 #include "confdefs.h"
19059
19060 class TEST {
19061 private:
19062         int value;
19063 public:
19064         TEST(int x = 1);
19065         ~TEST();
19066 };
19067
19068 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19069 {
19070         value = x;
19071 }
19072 int main() { }
19073
19074 _ACEOF
19075 rm -f conftest$ac_exeext
19076 if { (eval echo "$as_me:19076: \"$ac_link\"") >&5
19077   (eval $ac_link) 2>&5
19078   ac_status=$?
19079   echo "$as_me:19079: \$? = $ac_status" >&5
19080   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19081   { (eval echo "$as_me:19081: \"$ac_try\"") >&5
19082   (eval $ac_try) 2>&5
19083   ac_status=$?
19084   echo "$as_me:19084: \$? = $ac_status" >&5
19085   (exit $ac_status); }; }; then
19086   cf_cv_cpp_param_init=yes
19087 else
19088   echo "$as_me: program exited with status $ac_status" >&5
19089 echo "$as_me: failed program was:" >&5
19090 cat conftest.$ac_ext >&5
19091 cf_cv_cpp_param_init=no
19092 fi
19093 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19094 fi
19095         ac_ext=cc
19096 ac_cpp='$CXXCPP $CPPFLAGS'
19097 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19098 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19099 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19100 ac_main_return=return
19101
19102 fi
19103 echo "$as_me:19103: result: $cf_cv_cpp_param_init" >&5
19104 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19105 fi
19106 test "$cf_cv_cpp_param_init" = yes &&
19107 cat >>confdefs.h <<\EOF
19108 #define CPP_HAS_PARAM_INIT 1
19109 EOF
19110
19111 if test -n "$CXX"; then
19112
19113 echo "$as_me:19113: checking if $CXX accepts static_cast" >&5
19114 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19115 if test "${cf_cv_cpp_static_cast+set}" = set; then
19116   echo $ECHO_N "(cached) $ECHO_C" >&6
19117 else
19118
19119         ac_ext=cc
19120 ac_cpp='$CXXCPP $CPPFLAGS'
19121 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19122 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19123 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19124 ac_main_return=return
19125
19126         cat >conftest.$ac_ext <<_ACEOF
19127 #line 19127 "configure"
19128 #include "confdefs.h"
19129
19130 class NCursesPanel
19131 {
19132 public:
19133   NCursesPanel(int nlines,
19134                int ncols,
19135                int begin_y = 0,
19136                int begin_x = 0)
19137   {
19138   }
19139   NCursesPanel();
19140   ~NCursesPanel();
19141 };
19142
19143 template<class T> class NCursesUserPanel : public NCursesPanel
19144 {
19145 public:
19146   NCursesUserPanel (int nlines,
19147                     int ncols,
19148                     int begin_y = 0,
19149                     int begin_x = 0,
19150                     const T* p_UserData = static_cast<T*>(0))
19151     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19152   {
19153   };
19154   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19155   {
19156   };
19157
19158   virtual ~NCursesUserPanel() {};
19159 };
19160
19161 int
19162 main ()
19163 {
19164
19165         const char* p_UserData = static_cast<char*>(0)
19166   ;
19167   return 0;
19168 }
19169 _ACEOF
19170 rm -f conftest.$ac_objext
19171 if { (eval echo "$as_me:19171: \"$ac_compile\"") >&5
19172   (eval $ac_compile) 2>&5
19173   ac_status=$?
19174   echo "$as_me:19174: \$? = $ac_status" >&5
19175   (exit $ac_status); } &&
19176          { ac_try='test -s conftest.$ac_objext'
19177   { (eval echo "$as_me:19177: \"$ac_try\"") >&5
19178   (eval $ac_try) 2>&5
19179   ac_status=$?
19180   echo "$as_me:19180: \$? = $ac_status" >&5
19181   (exit $ac_status); }; }; then
19182   cf_cv_cpp_static_cast=yes
19183 else
19184   echo "$as_me: failed program was:" >&5
19185 cat conftest.$ac_ext >&5
19186 cf_cv_cpp_static_cast=no
19187 fi
19188 rm -f conftest.$ac_objext conftest.$ac_ext
19189
19190         ac_ext=cc
19191 ac_cpp='$CXXCPP $CPPFLAGS'
19192 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19193 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19194 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19195 ac_main_return=return
19196
19197 fi
19198 echo "$as_me:19198: result: $cf_cv_cpp_static_cast" >&5
19199 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19200
19201 fi
19202
19203 test "$cf_cv_cpp_static_cast" = yes &&
19204 cat >>confdefs.h <<\EOF
19205 #define CPP_HAS_STATIC_CAST 1
19206 EOF
19207
19208         CXX_AR='$(AR)'
19209         CXX_ARFLAGS='$(ARFLAGS)'
19210         case $cf_cv_system_name in #(vi
19211         irix*) #(vi
19212             if test "$GXX" != yes ; then
19213                 CXX_AR='$(CXX)'
19214                 CXX_ARFLAGS='-ar -o'
19215             fi
19216             ;;
19217         sco3.2v5*) #(vi
19218             CXXLDFLAGS="-u main"
19219             ;;
19220         solaris2*)
19221             if test "$GXX" != yes ; then
19222                 CXX_AR='$(CXX)'
19223                 CXX_ARFLAGS='-xar -o'
19224             fi
19225             ;;
19226         esac
19227
19228 else
19229         cf_cxx_library=no
19230         cf_cv_builtin_bool=1
19231
19232         # Just because we are not configuring against C++ right now does not
19233         # mean that a user will not want to use C++.  Some distributors disable
19234         # the C++ portion of this configuration as a shortcut (or just to avoid
19235         # compiling the demo in the c++ directory).  So we need a reasonable
19236         # default for the 'bool' type.
19237         #
19238         # Caveat: since the storage of the bool type is not standardized, it
19239         # may change.
19240
19241         if test "$NCURSES_BOOL" != auto ; then
19242                 cf_cv_type_of_bool=$NCURSES_BOOL
19243                 cf_cv_header_stdbool_h=0
19244         else
19245                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19246
19247 echo "$as_me:19247: checking for size of bool" >&5
19248 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19249 if test "${cf_cv_type_of_bool+set}" = set; then
19250   echo $ECHO_N "(cached) $ECHO_C" >&6
19251 else
19252
19253         rm -f cf_test.out
19254         if test "$cross_compiling" = yes; then
19255   cf_cv_type_of_bool=unknown
19256 else
19257   cat >conftest.$ac_ext <<_ACEOF
19258 #line 19258 "configure"
19259 #include "confdefs.h"
19260
19261 #include <stdlib.h>
19262 #include <stdio.h>
19263
19264 #if defined(__cplusplus)
19265
19266 #ifdef HAVE_GXX_BUILTIN_H
19267 #include <g++/builtin.h>
19268 #elif HAVE_GPP_BUILTIN_H
19269 #include <gpp/builtin.h>
19270 #elif HAVE_BUILTIN_H
19271 #include <builtin.h>
19272 #endif
19273
19274 #else
19275
19276 #if $cf_cv_header_stdbool_h
19277 #include <stdbool.h>
19278 #endif
19279
19280 #endif
19281
19282 int main()
19283 {
19284         FILE *fp = fopen("cf_test.out", "w");
19285         if (fp != 0) {
19286                 bool x = true;
19287                 if ((bool)(-x) >= 0)
19288                         fputs("unsigned ", fp);
19289                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19290                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19291                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19292                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19293                 fclose(fp);
19294         }
19295         ${cf_cv_main_return:-return}(0);
19296 }
19297
19298 _ACEOF
19299 rm -f conftest$ac_exeext
19300 if { (eval echo "$as_me:19300: \"$ac_link\"") >&5
19301   (eval $ac_link) 2>&5
19302   ac_status=$?
19303   echo "$as_me:19303: \$? = $ac_status" >&5
19304   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19305   { (eval echo "$as_me:19305: \"$ac_try\"") >&5
19306   (eval $ac_try) 2>&5
19307   ac_status=$?
19308   echo "$as_me:19308: \$? = $ac_status" >&5
19309   (exit $ac_status); }; }; then
19310   cf_cv_type_of_bool=`cat cf_test.out`
19311                  if test -z "$cf_cv_type_of_bool"; then
19312                    cf_cv_type_of_bool=unknown
19313                  fi
19314 else
19315   echo "$as_me: program exited with status $ac_status" >&5
19316 echo "$as_me: failed program was:" >&5
19317 cat conftest.$ac_ext >&5
19318 cf_cv_type_of_bool=unknown
19319 fi
19320 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19321 fi
19322
19323 fi
19324
19325         rm -f cf_test.out
19326 echo "$as_me:19326: result: $cf_cv_type_of_bool" >&5
19327 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19328 if test "$cf_cv_type_of_bool" = unknown ; then
19329         case .$NCURSES_BOOL in #(vi
19330         .auto|.) NCURSES_BOOL=unsigned;;
19331         esac
19332         { echo "$as_me:19332: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19333 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19334         cf_cv_type_of_bool=$NCURSES_BOOL
19335 fi
19336
19337                 else
19338                         echo "$as_me:19338: checking for fallback type of bool" >&5
19339 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19340                         case "$host_cpu" in #(vi
19341                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19342                         *)      cf_cv_type_of_bool=int  ;;
19343                         esac
19344                         echo "$as_me:19344: result: $cf_cv_type_of_bool" >&5
19345 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19346                 fi
19347         fi
19348 fi
19349
19350 # If the C compiler did not declare bool, and we did not determine that the C++
19351 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19352 # ncurses library use the same type as C++ bool.  Note that this allows one to
19353 # specify the type of bool in a configure-script option and postpone
19354 # integration with the C++ compiler provided that the types are compatible.
19355 USE_CXX_BOOL=1
19356 if test $cf_cv_cc_bool_type = 1
19357 then
19358         # oops: C has a bool.  Unlikely, but C++ could differ.
19359         USE_CXX_BOOL=0
19360 elif test $cf_cv_builtin_bool = 0
19361 then
19362         # C++ has no bool
19363         USE_CXX_BOOL=0
19364 else
19365         # this is the normal case
19366         USE_CXX_BOOL='defined(__cplusplus)'
19367 fi
19368
19369 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19370
19371         if test "$cf_with_ada" != "no" ; then
19372                 if test "$with_libtool" != "no"; then
19373                         { echo "$as_me:19373: WARNING: libtool does not support Ada - disabling feature" >&5
19374 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19375                         cf_with_ada=no
19376                 fi
19377         fi
19378
19379         if test "$cf_with_ada" != "no" ; then
19380
19381 cf_ada_make=gnatmake
19382 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19383 set dummy $cf_ada_make; ac_word=$2
19384 echo "$as_me:19384: checking for $ac_word" >&5
19385 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19386 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19387   echo $ECHO_N "(cached) $ECHO_C" >&6
19388 else
19389   if test -n "$gnat_exists"; then
19390   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19391 else
19392   ac_save_IFS=$IFS; IFS=$ac_path_separator
19393 ac_dummy="$PATH"
19394 for ac_dir in $ac_dummy; do
19395   IFS=$ac_save_IFS
19396   test -z "$ac_dir" && ac_dir=.
19397   $as_executable_p "$ac_dir/$ac_word" || continue
19398 ac_cv_prog_gnat_exists="yes"
19399 echo "$as_me:19399: found $ac_dir/$ac_word" >&5
19400 break
19401 done
19402
19403   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19404 fi
19405 fi
19406 gnat_exists=$ac_cv_prog_gnat_exists
19407 if test -n "$gnat_exists"; then
19408   echo "$as_me:19408: result: $gnat_exists" >&5
19409 echo "${ECHO_T}$gnat_exists" >&6
19410 else
19411   echo "$as_me:19411: result: no" >&5
19412 echo "${ECHO_T}no" >&6
19413 fi
19414
19415 if test "$ac_cv_prog_gnat_exists" = no; then
19416    cf_ada_make=
19417    cf_cv_prog_gnat_correct=no
19418 else
19419
19420 echo "$as_me:19420: checking for gnat version" >&5
19421 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19422 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19423         grep '[0-9].[0-9][0-9]*' |\
19424     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19425 echo "$as_me:19425: result: $cf_gnat_version" >&5
19426 echo "${ECHO_T}$cf_gnat_version" >&6
19427
19428 case $cf_gnat_version in #(vi
19429 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19430         cf_cv_prog_gnat_correct=yes
19431         ;;
19432 *)
19433         { echo "$as_me:19433: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19434 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19435         cf_cv_prog_gnat_correct=no
19436         ;;
19437 esac
19438
19439    # Extract the first word of "m4", so it can be a program name with args.
19440 set dummy m4; ac_word=$2
19441 echo "$as_me:19441: checking for $ac_word" >&5
19442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19443 if test "${ac_cv_prog_M4_exists+set}" = set; then
19444   echo $ECHO_N "(cached) $ECHO_C" >&6
19445 else
19446   if test -n "$M4_exists"; then
19447   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19448 else
19449   ac_save_IFS=$IFS; IFS=$ac_path_separator
19450 ac_dummy="$PATH"
19451 for ac_dir in $ac_dummy; do
19452   IFS=$ac_save_IFS
19453   test -z "$ac_dir" && ac_dir=.
19454   $as_executable_p "$ac_dir/$ac_word" || continue
19455 ac_cv_prog_M4_exists="yes"
19456 echo "$as_me:19456: found $ac_dir/$ac_word" >&5
19457 break
19458 done
19459
19460   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19461 fi
19462 fi
19463 M4_exists=$ac_cv_prog_M4_exists
19464 if test -n "$M4_exists"; then
19465   echo "$as_me:19465: result: $M4_exists" >&5
19466 echo "${ECHO_T}$M4_exists" >&6
19467 else
19468   echo "$as_me:19468: result: no" >&5
19469 echo "${ECHO_T}no" >&6
19470 fi
19471
19472    if test "$ac_cv_prog_M4_exists" = no; then
19473       cf_cv_prog_gnat_correct=no
19474       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19475    fi
19476    if test "$cf_cv_prog_gnat_correct" = yes; then
19477       echo "$as_me:19477: checking if GNAT works" >&5
19478 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19479
19480 rm -rf conftest* *~conftest*
19481 cat >>conftest.ads <<CF_EOF
19482 procedure conftest;
19483 CF_EOF
19484 cat >>conftest.adb <<CF_EOF
19485 with Text_IO;
19486 with GNAT.OS_Lib;
19487 procedure conftest is
19488 begin
19489    Text_IO.Put ("Hello World");
19490    Text_IO.New_Line;
19491    GNAT.OS_Lib.OS_Exit (0);
19492 end conftest;
19493 CF_EOF
19494 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19495    if ( ./conftest 1>&5 2>&1 ) ; then
19496       cf_cv_prog_gnat_correct=yes
19497    else
19498       cf_cv_prog_gnat_correct=no
19499    fi
19500 else
19501    cf_cv_prog_gnat_correct=no
19502 fi
19503 rm -rf conftest* *~conftest*
19504
19505       echo "$as_me:19505: result: $cf_cv_prog_gnat_correct" >&5
19506 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19507    fi
19508 fi
19509
19510                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19511
19512         ADAFLAGS="$ADAFLAGS -gnatpn"
19513
19514         echo "$as_me:19514: checking optimization options for ADAFLAGS" >&5
19515 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19516         case "$CFLAGS" in
19517         *-g*)
19518
19519         ADAFLAGS="$ADAFLAGS -g"
19520
19521                 ;;
19522         esac
19523         case "$CFLAGS" in
19524         *-O*)
19525                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19526
19527         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19528
19529                 ;;
19530         esac
19531         echo "$as_me:19531: result: $ADAFLAGS" >&5
19532 echo "${ECHO_T}$ADAFLAGS" >&6
19533
19534 echo "$as_me:19534: checking if GNAT supports generics" >&5
19535 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19536 case $cf_gnat_version in #(vi
19537 3.[1-9]*|[4-9].*) #(vi
19538         cf_gnat_generics=yes
19539         ;;
19540 *)
19541         cf_gnat_generics=no
19542         ;;
19543 esac
19544 echo "$as_me:19544: result: $cf_gnat_generics" >&5
19545 echo "${ECHO_T}$cf_gnat_generics" >&6
19546
19547 if test "$cf_gnat_generics" = yes
19548 then
19549         cf_compile_generics=generics
19550         cf_generic_objects="\${GENOBJS}"
19551 else
19552         cf_compile_generics=
19553         cf_generic_objects=
19554 fi
19555
19556 echo "$as_me:19556: checking if GNAT supports SIGINT" >&5
19557 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19558 if test "${cf_cv_gnat_sigint+set}" = set; then
19559   echo $ECHO_N "(cached) $ECHO_C" >&6
19560 else
19561
19562 rm -rf conftest* *~conftest*
19563 cat >>conftest.ads <<CF_EOF
19564 with Ada.Interrupts.Names;
19565
19566 package ConfTest is
19567
19568    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19569    pragma Unreserve_All_Interrupts;
19570    pragma Warnings (On);
19571
19572    protected Process is
19573       procedure Stop;
19574       function Continue return Boolean;
19575       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19576    private
19577       Done : Boolean := False;
19578    end Process;
19579
19580 end ConfTest;
19581 CF_EOF
19582 cat >>conftest.adb <<CF_EOF
19583 package body ConfTest is
19584    protected body Process is
19585       procedure Stop is
19586       begin
19587          Done := True;
19588       end Stop;
19589       function Continue return Boolean is
19590       begin
19591          return not Done;
19592       end Continue;
19593    end Process;
19594 end ConfTest;
19595 CF_EOF
19596 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19597       cf_cv_gnat_sigint=yes
19598 else
19599    cf_cv_gnat_sigint=no
19600 fi
19601 rm -rf conftest* *~conftest*
19602
19603 fi
19604 echo "$as_me:19604: result: $cf_cv_gnat_sigint" >&5
19605 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19606
19607 if test $cf_cv_gnat_sigint = yes ; then
19608         USE_GNAT_SIGINT=""
19609 else
19610         USE_GNAT_SIGINT="#"
19611 fi
19612
19613 echo "$as_me:19613: checking if GNAT pragma Unreferenced works" >&5
19614 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19615 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19616   echo $ECHO_N "(cached) $ECHO_C" >&6
19617 else
19618
19619 rm -rf conftest* *~conftest*
19620 cat >>conftest.ads <<CF_EOF
19621 procedure conftest;
19622 CF_EOF
19623 cat >>conftest.adb <<CF_EOF
19624 with Text_IO;
19625 with GNAT.OS_Lib;
19626 procedure conftest is
19627    test : Integer;
19628    pragma Unreferenced (test);
19629 begin
19630    test := 1;
19631    Text_IO.Put ("Hello World");
19632    Text_IO.New_Line;
19633    GNAT.OS_Lib.OS_Exit (0);
19634 end conftest;
19635 CF_EOF
19636 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19637       cf_cv_pragma_unreferenced=yes
19638 else
19639    cf_cv_pragma_unreferenced=no
19640 fi
19641 rm -rf conftest* *~conftest*
19642
19643 fi
19644 echo "$as_me:19644: result: $cf_cv_pragma_unreferenced" >&5
19645 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19646
19647 # if the pragma is supported, use it (needed in the Trace code).
19648 if test $cf_cv_pragma_unreferenced = yes ; then
19649         PRAGMA_UNREF=TRUE
19650 else
19651         PRAGMA_UNREF=FALSE
19652 fi
19653
19654 cf_gnat_libraries=no
19655 cf_gnat_projects=no
19656
19657 echo "$as_me:19657: checking if GNAT supports project files" >&5
19658 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19659 case $cf_gnat_version in #(vi
19660 3.[0-9]*) #(vi
19661         ;;
19662 *)
19663         case $cf_cv_system_name in #(vi
19664         cygwin*|msys*) #(vi
19665                 ;;
19666         *)
19667                 mkdir conftest.src conftest.bin conftest.lib
19668                 cd conftest.src
19669                 rm -rf conftest* *~conftest*
19670                 cat >>library.gpr <<CF_EOF
19671 project Library is
19672   Kind := External ("LIB_KIND");
19673   for Library_Name use "ConfTest";
19674   for Object_Dir use ".";
19675   for Library_ALI_Dir use External("LIBRARY_DIR");
19676   for Library_Version use External ("SONAME");
19677   for Library_Kind use Kind;
19678   for Library_Dir use External("BUILD_DIR");
19679   Source_Dir := External ("SOURCE_DIR");
19680   for Source_Dirs use (Source_Dir);
19681   package Compiler is
19682      for Default_Switches ("Ada") use
19683        ("-g",
19684         "-O2",
19685         "-gnatafno",
19686         "-gnatVa",   -- All validity checks
19687         "-gnatwa");  -- Activate all optional errors
19688   end Compiler;
19689 end Library;
19690 CF_EOF
19691                 cat >>confpackage.ads <<CF_EOF
19692 package ConfPackage is
19693    procedure conftest;
19694 end ConfPackage;
19695 CF_EOF
19696                 cat >>confpackage.adb <<CF_EOF
19697 with Text_IO;
19698 package body ConfPackage is
19699    procedure conftest is
19700    begin
19701       Text_IO.Put ("Hello World");
19702       Text_IO.New_Line;
19703    end conftest;
19704 end ConfPackage;
19705 CF_EOF
19706                 if ( $cf_ada_make $ADAFLAGS \
19707                                 -Plibrary.gpr \
19708                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19709                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19710                                 -XSOURCE_DIR=`pwd` \
19711                                 -XSONAME=libConfTest.so.1 \
19712                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19713                         cf_gnat_projects=yes
19714                 fi
19715                 cd ..
19716                 if test -f conftest.lib/confpackage.ali
19717                 then
19718                         cf_gnat_libraries=yes
19719                 fi
19720                 rm -rf conftest* *~conftest*
19721                 ;;
19722         esac
19723         ;;
19724 esac
19725 echo "$as_me:19725: result: $cf_gnat_projects" >&5
19726 echo "${ECHO_T}$cf_gnat_projects" >&6
19727
19728 if test $cf_gnat_projects = yes
19729 then
19730         echo "$as_me:19730: checking if GNAT supports libraries" >&5
19731 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19732         echo "$as_me:19732: result: $cf_gnat_libraries" >&5
19733 echo "${ECHO_T}$cf_gnat_libraries" >&6
19734 fi
19735
19736 if test "$cf_gnat_projects" = yes
19737 then
19738         USE_OLD_MAKERULES="#"
19739         USE_GNAT_PROJECTS=""
19740 else
19741         USE_OLD_MAKERULES=""
19742         USE_GNAT_PROJECTS="#"
19743 fi
19744
19745 if test "$cf_gnat_libraries" = yes
19746 then
19747         USE_GNAT_LIBRARIES=""
19748 else
19749         USE_GNAT_LIBRARIES="#"
19750 fi
19751
19752 echo "$as_me:19752: checking for ada-compiler" >&5
19753 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19754
19755 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19756 if test "${with_ada_compiler+set}" = set; then
19757   withval="$with_ada_compiler"
19758   cf_ada_compiler=$withval
19759 else
19760   cf_ada_compiler=gnatmake
19761 fi;
19762
19763 echo "$as_me:19763: result: $cf_ada_compiler" >&5
19764 echo "${ECHO_T}$cf_ada_compiler" >&6
19765
19766                         cf_ada_package=terminal_interface
19767
19768 echo "$as_me:19768: checking for ada-include" >&5
19769 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19770
19771 # Check whether --with-ada-include or --without-ada-include was given.
19772 if test "${with_ada_include+set}" = set; then
19773   withval="$with_ada_include"
19774
19775 else
19776   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19777 fi; if test -n "$prefix/share/ada/adainclude" ; then
19778
19779 if test "x$prefix" != xNONE; then
19780   cf_path_syntax="$prefix"
19781 else
19782   cf_path_syntax="$ac_default_prefix"
19783 fi
19784
19785 case ".$withval" in #(vi
19786 .\$\(*\)*|.\'*\'*) #(vi
19787   ;;
19788 ..|./*|.\\*) #(vi
19789   ;;
19790 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19791   ;;
19792 .\${*prefix}*|.\${*dir}*) #(vi
19793   eval withval="$withval"
19794   case ".$withval" in #(vi
19795   .NONE/*)
19796     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19797     ;;
19798   esac
19799   ;; #(vi
19800 .no|.NONE/*)
19801   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19802   ;;
19803 *)
19804   { { echo "$as_me:19804: error: expected a pathname, not \"$withval\"" >&5
19805 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19806    { (exit 1); exit 1; }; }
19807   ;;
19808 esac
19809
19810 fi
19811 eval ADA_INCLUDE="$withval"
19812
19813 echo "$as_me:19813: result: $ADA_INCLUDE" >&5
19814 echo "${ECHO_T}$ADA_INCLUDE" >&6
19815
19816 echo "$as_me:19816: checking for ada-objects" >&5
19817 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19818
19819 # Check whether --with-ada-objects or --without-ada-objects was given.
19820 if test "${with_ada_objects+set}" = set; then
19821   withval="$with_ada_objects"
19822
19823 else
19824   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19825 fi; if test -n "$prefix/lib/ada/adalib" ; then
19826
19827 if test "x$prefix" != xNONE; then
19828   cf_path_syntax="$prefix"
19829 else
19830   cf_path_syntax="$ac_default_prefix"
19831 fi
19832
19833 case ".$withval" in #(vi
19834 .\$\(*\)*|.\'*\'*) #(vi
19835   ;;
19836 ..|./*|.\\*) #(vi
19837   ;;
19838 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19839   ;;
19840 .\${*prefix}*|.\${*dir}*) #(vi
19841   eval withval="$withval"
19842   case ".$withval" in #(vi
19843   .NONE/*)
19844     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19845     ;;
19846   esac
19847   ;; #(vi
19848 .no|.NONE/*)
19849   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19850   ;;
19851 *)
19852   { { echo "$as_me:19852: error: expected a pathname, not \"$withval\"" >&5
19853 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19854    { (exit 1); exit 1; }; }
19855   ;;
19856 esac
19857
19858 fi
19859 eval ADA_OBJECTS="$withval"
19860
19861 echo "$as_me:19861: result: $ADA_OBJECTS" >&5
19862 echo "${ECHO_T}$ADA_OBJECTS" >&6
19863
19864 echo "$as_me:19864: checking if an Ada95 shared-library should be built" >&5
19865 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19866
19867 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19868 if test "${with_ada_sharedlib+set}" = set; then
19869   withval="$with_ada_sharedlib"
19870   with_ada_sharedlib=$withval
19871 else
19872   with_ada_sharedlib=no
19873 fi;
19874 echo "$as_me:19874: result: $with_ada_sharedlib" >&5
19875 echo "${ECHO_T}$with_ada_sharedlib" >&6
19876
19877 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19878 MAKE_ADA_SHAREDLIB="#"
19879
19880 if test "x$with_ada_sharedlib" != xno
19881 then
19882         MAKE_ADA_SHAREDLIB=
19883         if test "x$with_ada_sharedlib" != xyes
19884         then
19885                 ADA_SHAREDLIB="$with_ada_sharedlib"
19886         fi
19887 fi
19888
19889                 fi
19890         fi
19891 else
19892         cf_with_ada=no
19893 fi
19894
19895 # do this "late" to avoid conflict with header-checks
19896 if test "x$with_widec" = xyes ; then
19897         echo "$as_me:19897: checking for wchar_t" >&5
19898 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
19899 if test "${ac_cv_type_wchar_t+set}" = set; then
19900   echo $ECHO_N "(cached) $ECHO_C" >&6
19901 else
19902   cat >conftest.$ac_ext <<_ACEOF
19903 #line 19903 "configure"
19904 #include "confdefs.h"
19905 $ac_includes_default
19906 int
19907 main ()
19908 {
19909 if ((wchar_t *) 0)
19910   return 0;
19911 if (sizeof (wchar_t))
19912   return 0;
19913   ;
19914   return 0;
19915 }
19916 _ACEOF
19917 rm -f conftest.$ac_objext
19918 if { (eval echo "$as_me:19918: \"$ac_compile\"") >&5
19919   (eval $ac_compile) 2>&5
19920   ac_status=$?
19921   echo "$as_me:19921: \$? = $ac_status" >&5
19922   (exit $ac_status); } &&
19923          { ac_try='test -s conftest.$ac_objext'
19924   { (eval echo "$as_me:19924: \"$ac_try\"") >&5
19925   (eval $ac_try) 2>&5
19926   ac_status=$?
19927   echo "$as_me:19927: \$? = $ac_status" >&5
19928   (exit $ac_status); }; }; then
19929   ac_cv_type_wchar_t=yes
19930 else
19931   echo "$as_me: failed program was:" >&5
19932 cat conftest.$ac_ext >&5
19933 ac_cv_type_wchar_t=no
19934 fi
19935 rm -f conftest.$ac_objext conftest.$ac_ext
19936 fi
19937 echo "$as_me:19937: result: $ac_cv_type_wchar_t" >&5
19938 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
19939
19940 echo "$as_me:19940: checking size of wchar_t" >&5
19941 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
19942 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
19943   echo $ECHO_N "(cached) $ECHO_C" >&6
19944 else
19945   if test "$ac_cv_type_wchar_t" = yes; then
19946   if test "$cross_compiling" = yes; then
19947   # Depending upon the size, compute the lo and hi bounds.
19948 cat >conftest.$ac_ext <<_ACEOF
19949 #line 19949 "configure"
19950 #include "confdefs.h"
19951 $ac_includes_default
19952 int
19953 main ()
19954 {
19955 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
19956   ;
19957   return 0;
19958 }
19959 _ACEOF
19960 rm -f conftest.$ac_objext
19961 if { (eval echo "$as_me:19961: \"$ac_compile\"") >&5
19962   (eval $ac_compile) 2>&5
19963   ac_status=$?
19964   echo "$as_me:19964: \$? = $ac_status" >&5
19965   (exit $ac_status); } &&
19966          { ac_try='test -s conftest.$ac_objext'
19967   { (eval echo "$as_me:19967: \"$ac_try\"") >&5
19968   (eval $ac_try) 2>&5
19969   ac_status=$?
19970   echo "$as_me:19970: \$? = $ac_status" >&5
19971   (exit $ac_status); }; }; then
19972   ac_lo=0 ac_mid=0
19973   while :; do
19974     cat >conftest.$ac_ext <<_ACEOF
19975 #line 19975 "configure"
19976 #include "confdefs.h"
19977 $ac_includes_default
19978 int
19979 main ()
19980 {
19981 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
19982   ;
19983   return 0;
19984 }
19985 _ACEOF
19986 rm -f conftest.$ac_objext
19987 if { (eval echo "$as_me:19987: \"$ac_compile\"") >&5
19988   (eval $ac_compile) 2>&5
19989   ac_status=$?
19990   echo "$as_me:19990: \$? = $ac_status" >&5
19991   (exit $ac_status); } &&
19992          { ac_try='test -s conftest.$ac_objext'
19993   { (eval echo "$as_me:19993: \"$ac_try\"") >&5
19994   (eval $ac_try) 2>&5
19995   ac_status=$?
19996   echo "$as_me:19996: \$? = $ac_status" >&5
19997   (exit $ac_status); }; }; then
19998   ac_hi=$ac_mid; break
19999 else
20000   echo "$as_me: failed program was:" >&5
20001 cat conftest.$ac_ext >&5
20002 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20003 fi
20004 rm -f conftest.$ac_objext conftest.$ac_ext
20005   done
20006 else
20007   echo "$as_me: failed program was:" >&5
20008 cat conftest.$ac_ext >&5
20009 ac_hi=-1 ac_mid=-1
20010   while :; do
20011     cat >conftest.$ac_ext <<_ACEOF
20012 #line 20012 "configure"
20013 #include "confdefs.h"
20014 $ac_includes_default
20015 int
20016 main ()
20017 {
20018 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20019   ;
20020   return 0;
20021 }
20022 _ACEOF
20023 rm -f conftest.$ac_objext
20024 if { (eval echo "$as_me:20024: \"$ac_compile\"") >&5
20025   (eval $ac_compile) 2>&5
20026   ac_status=$?
20027   echo "$as_me:20027: \$? = $ac_status" >&5
20028   (exit $ac_status); } &&
20029          { ac_try='test -s conftest.$ac_objext'
20030   { (eval echo "$as_me:20030: \"$ac_try\"") >&5
20031   (eval $ac_try) 2>&5
20032   ac_status=$?
20033   echo "$as_me:20033: \$? = $ac_status" >&5
20034   (exit $ac_status); }; }; then
20035   ac_lo=$ac_mid; break
20036 else
20037   echo "$as_me: failed program was:" >&5
20038 cat conftest.$ac_ext >&5
20039 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20040 fi
20041 rm -f conftest.$ac_objext conftest.$ac_ext
20042   done
20043 fi
20044 rm -f conftest.$ac_objext conftest.$ac_ext
20045 # Binary search between lo and hi bounds.
20046 while test "x$ac_lo" != "x$ac_hi"; do
20047   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20048   cat >conftest.$ac_ext <<_ACEOF
20049 #line 20049 "configure"
20050 #include "confdefs.h"
20051 $ac_includes_default
20052 int
20053 main ()
20054 {
20055 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20056   ;
20057   return 0;
20058 }
20059 _ACEOF
20060 rm -f conftest.$ac_objext
20061 if { (eval echo "$as_me:20061: \"$ac_compile\"") >&5
20062   (eval $ac_compile) 2>&5
20063   ac_status=$?
20064   echo "$as_me:20064: \$? = $ac_status" >&5
20065   (exit $ac_status); } &&
20066          { ac_try='test -s conftest.$ac_objext'
20067   { (eval echo "$as_me:20067: \"$ac_try\"") >&5
20068   (eval $ac_try) 2>&5
20069   ac_status=$?
20070   echo "$as_me:20070: \$? = $ac_status" >&5
20071   (exit $ac_status); }; }; then
20072   ac_hi=$ac_mid
20073 else
20074   echo "$as_me: failed program was:" >&5
20075 cat conftest.$ac_ext >&5
20076 ac_lo=`expr $ac_mid + 1`
20077 fi
20078 rm -f conftest.$ac_objext conftest.$ac_ext
20079 done
20080 ac_cv_sizeof_wchar_t=$ac_lo
20081 else
20082   if test "$cross_compiling" = yes; then
20083   { { echo "$as_me:20083: error: cannot run test program while cross compiling" >&5
20084 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20085    { (exit 1); exit 1; }; }
20086 else
20087   cat >conftest.$ac_ext <<_ACEOF
20088 #line 20088 "configure"
20089 #include "confdefs.h"
20090 $ac_includes_default
20091 int
20092 main ()
20093 {
20094 FILE *f = fopen ("conftest.val", "w");
20095 if (!f)
20096   $ac_main_return (1);
20097 fprintf (f, "%d", (sizeof (wchar_t)));
20098 fclose (f);
20099   ;
20100   return 0;
20101 }
20102 _ACEOF
20103 rm -f conftest$ac_exeext
20104 if { (eval echo "$as_me:20104: \"$ac_link\"") >&5
20105   (eval $ac_link) 2>&5
20106   ac_status=$?
20107   echo "$as_me:20107: \$? = $ac_status" >&5
20108   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20109   { (eval echo "$as_me:20109: \"$ac_try\"") >&5
20110   (eval $ac_try) 2>&5
20111   ac_status=$?
20112   echo "$as_me:20112: \$? = $ac_status" >&5
20113   (exit $ac_status); }; }; then
20114   ac_cv_sizeof_wchar_t=`cat conftest.val`
20115 else
20116   echo "$as_me: program exited with status $ac_status" >&5
20117 echo "$as_me: failed program was:" >&5
20118 cat conftest.$ac_ext >&5
20119 fi
20120 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20121 fi
20122 fi
20123 rm -f conftest.val
20124 else
20125   ac_cv_sizeof_wchar_t=0
20126 fi
20127 fi
20128 echo "$as_me:20128: result: $ac_cv_sizeof_wchar_t" >&5
20129 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20130 cat >>confdefs.h <<EOF
20131 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20132 EOF
20133
20134 fi
20135
20136 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20137 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20138 ###
20139 ### ticlib modules may be a separate library, otherwise contained in termlib.
20140 ### termlib modules may be a separate library, otherwise contained in ncurses.
20141 ###
20142 ### The of "+" or " " between the tokens controls the way the script
20143 ### chooses to split module lists into libraries.
20144 ###
20145 ### (see CF_LIB_RULES).
20146 echo "$as_me:20146: checking for library subsets" >&5
20147 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20148 LIB_SUBSETS=
20149
20150 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20151         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20152         if test "$with_ticlib" != no ; then
20153                 LIB_SUBSETS="${LIB_SUBSETS} "
20154         else
20155                 LIB_SUBSETS="${LIB_SUBSETS}+"
20156         fi
20157 fi
20158
20159 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20160 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20161
20162 if test "$with_termlib" != no ; then
20163         LIB_SUBSETS="${LIB_SUBSETS} "
20164 else
20165         LIB_SUBSETS="${LIB_SUBSETS}+"
20166 fi
20167
20168 LIB_SUBSETS="${LIB_SUBSETS}base"
20169
20170 # Most term-driver calls are to tinfo, but some like init_pair are to the
20171 # base library (so it resides in base).
20172 if test "$with_term_driver" != no ; then
20173         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20174         case $cf_cv_system_name in #(vi
20175         *mingw32*) #(vi
20176                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20177                 ;;
20178         *) #(vi
20179                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20180                 ;;
20181         esac
20182 fi
20183
20184 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20185 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20186
20187 echo "$as_me:20187: result: $LIB_SUBSETS" >&5
20188 echo "${ECHO_T}$LIB_SUBSETS" >&6
20189
20190 ### Construct the list of include-directories to be generated
20191
20192 if test "$GCC" != yes; then
20193         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20194 elif test "$includedir" != "/usr/include"; then
20195         if test "$includedir" = '${prefix}/include' ; then
20196                 if test x$prefix != x/usr ; then
20197                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20198                 fi
20199         else
20200                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
20201         fi
20202 fi
20203 if test "$srcdir" != "."; then
20204         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20205 fi
20206 CPPFLAGS="-I. -I../include $CPPFLAGS"
20207
20208 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20209 if test "$srcdir" != "."; then
20210         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20211 fi
20212 if test "$GCC" != yes; then
20213         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20214 elif test "$includedir" != "/usr/include"; then
20215         if test "$includedir" = '${prefix}/include' ; then
20216                 if test x$prefix != x/usr ; then
20217                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20218                 fi
20219         else
20220                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20221         fi
20222 fi
20223
20224 ### Build up pieces for makefile rules
20225 echo "$as_me:20225: checking default library suffix" >&5
20226 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20227
20228         case $DFT_LWR_MODEL in
20229         libtool) DFT_ARG_SUFFIX=''   ;;
20230         normal)  DFT_ARG_SUFFIX=''   ;;
20231         debug)   DFT_ARG_SUFFIX='_g' ;;
20232         profile) DFT_ARG_SUFFIX='_p' ;;
20233         shared)  DFT_ARG_SUFFIX=''   ;;
20234         esac
20235         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20236 echo "$as_me:20236: result: $DFT_ARG_SUFFIX" >&5
20237 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20238
20239 echo "$as_me:20239: checking default library-dependency suffix" >&5
20240 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20241
20242         case X$DFT_LWR_MODEL in #(vi
20243         Xlibtool) #(vi
20244                 DFT_LIB_SUFFIX='.la'
20245                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20246                 ;;
20247         Xdebug) #(vi
20248                 DFT_LIB_SUFFIX='_g.a'
20249                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20250                 ;;
20251         Xprofile) #(vi
20252                 DFT_LIB_SUFFIX='_p.a'
20253                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20254                 ;;
20255         Xshared) #(vi
20256                 case $cf_cv_system_name in
20257                 aix[5-7]*) #(vi
20258                         DFT_LIB_SUFFIX='.a'
20259                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20260                         ;;
20261                 cygwin*|msys*|mingw*) #(vi
20262                         DFT_LIB_SUFFIX='.dll'
20263                         DFT_DEP_SUFFIX='.dll.a'
20264                         ;;
20265                 darwin*) #(vi
20266                         DFT_LIB_SUFFIX='.dylib'
20267                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20268                         ;;
20269                 hpux*) #(vi
20270                         case $target in
20271                         ia64*) #(vi
20272                                 DFT_LIB_SUFFIX='.so'
20273                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20274                                 ;;
20275                         *) #(vi
20276                                 DFT_LIB_SUFFIX='.sl'
20277                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20278                                 ;;
20279                         esac
20280                         ;;
20281                 *) #(vi
20282                         DFT_LIB_SUFFIX='.so'
20283                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20284                         ;;
20285                 esac
20286                 ;;
20287         *)
20288                 DFT_LIB_SUFFIX='.a'
20289                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20290                 ;;
20291         esac
20292         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
20293         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
20294 echo "$as_me:20294: result: $DFT_DEP_SUFFIX" >&5
20295 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
20296
20297 echo "$as_me:20297: checking default object directory" >&5
20298 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
20299
20300         case $DFT_LWR_MODEL in
20301         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
20302         normal)  DFT_OBJ_SUBDIR='objects' ;;
20303         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
20304         profile) DFT_OBJ_SUBDIR='obj_p' ;;
20305         shared)
20306                 case $cf_cv_system_name in #(vi
20307                 cygwin|msys) #(vi
20308                         DFT_OBJ_SUBDIR='objects' ;;
20309                 *)
20310                         DFT_OBJ_SUBDIR='obj_s' ;;
20311                 esac
20312         esac
20313 echo "$as_me:20313: result: $DFT_OBJ_SUBDIR" >&5
20314 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
20315
20316 if test "x$cf_with_cxx" = xyes ; then
20317 echo "$as_me:20317: checking c++ library-dependency suffix" >&5
20318 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
20319 if test "$with_libtool" != "no"; then
20320         # libtool thinks it can make c++ shared libraries (perhaps only g++)
20321         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20322 elif test "$with_shared_cxx" != "no"; then
20323         # also for g++ users...
20324         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20325 else
20326         # we normally make a static library because C/C++ library rules differ
20327
20328         case Xnormal in #(vi
20329         Xlibtool) #(vi
20330                 CXX_LIB_SUFFIX='.la'
20331                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20332                 ;;
20333         Xdebug) #(vi
20334                 CXX_LIB_SUFFIX='_g.a'
20335                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20336                 ;;
20337         Xprofile) #(vi
20338                 CXX_LIB_SUFFIX='_p.a'
20339                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20340                 ;;
20341         Xshared) #(vi
20342                 case $cf_cv_system_name in
20343                 aix[5-7]*) #(vi
20344                         CXX_LIB_SUFFIX='.a'
20345                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20346                         ;;
20347                 cygwin*|msys*|mingw*) #(vi
20348                         CXX_LIB_SUFFIX='.dll'
20349                         CXX_DEP_SUFFIX='.dll.a'
20350                         ;;
20351                 darwin*) #(vi
20352                         CXX_LIB_SUFFIX='.dylib'
20353                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20354                         ;;
20355                 hpux*) #(vi
20356                         case $target in
20357                         ia64*) #(vi
20358                                 CXX_LIB_SUFFIX='.so'
20359                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20360                                 ;;
20361                         *) #(vi
20362                                 CXX_LIB_SUFFIX='.sl'
20363                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20364                                 ;;
20365                         esac
20366                         ;;
20367                 *) #(vi
20368                         CXX_LIB_SUFFIX='.so'
20369                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20370                         ;;
20371                 esac
20372                 ;;
20373         *)
20374                 CXX_LIB_SUFFIX='.a'
20375                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20376                 ;;
20377         esac
20378         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
20379         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
20380
20381 fi
20382 echo "$as_me:20382: result: $CXX_LIB_SUFFIX" >&5
20383 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
20384
20385 fi
20386
20387 # do not want -ldl in build except as needed for -lncurses dependency
20388 if test "x$with_dlsym" = xyes ; then
20389 if test $DFT_LWR_MODEL = shared || \
20390    test $DFT_LWR_MODEL = libtool ; then
20391
20392 # remove dl library from $LIBS
20393 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
20394
20395 fi
20396 fi
20397 ### Set up low-level terminfo dependencies for makefiles.
20398
20399 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
20400 # do not need libdl
20401 TICS_LIST=
20402 if test "x$with_dlsym" = xyes ; then
20403
20404 # remove dl library from $SHLIB_LIST
20405 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
20406
20407 fi
20408
20409 if test "$with_ticlib" != no ; then
20410
20411         if test "x$with_ticlib" != xyes ; then
20412                 TICS_NAME=$with_ticlib
20413                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20414                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20415                 TICS_LIB_SUFFIX="${with_ticlib}"
20416         else
20417                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
20418                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
20419                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
20420         fi
20421         TICS_LDFLAGS="-L${LIB_DIR}"
20422         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
20423 else
20424         TICS_LDFLAGS="-L${LIB_DIR}"
20425         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20426 fi
20427
20428 if test "$with_termlib" != no ; then
20429
20430         if test "x$with_termlib" != xyes ; then
20431                 TINFO_NAME=$with_termlib
20432                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20433                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20434                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
20435                 TINFO_LIB_SUFFIX="${with_termlib}"
20436         else
20437                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20438                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
20439                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
20440                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
20441         fi
20442
20443         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20444         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
20445         if test "$DFT_LWR_MODEL" = "libtool"; then
20446                 TEST_ARGS="${TEST_DEPS}"
20447                 TEST_ARG2="${TEST_DEP2}"
20448                 TINFO_LDFLAGS="-L${LIB_DIR}"
20449                 TINFO_LIBS="$TEST_ARGS"
20450                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
20451                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
20452         else
20453                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
20454                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
20455                 if test "x$with_term_driver" != xno ; then
20456                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20457                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20458                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20459                 else
20460                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20461                         TINFO_LIBS="$TEST_ARGS"
20462                 fi
20463                 TINFO_LDFLAGS="-L${LIB_DIR}"
20464                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
20465         fi
20466 else
20467         # the next lines are needed for linking libtic over libncurses
20468         TINFO_NAME=${LIB_NAME}
20469         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
20470         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
20471         if test "x$with_tic_depends" = xyes ; then
20472                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
20473         else
20474                 TICS_LIST="$SHLIB_LIST"
20475         fi
20476
20477         TINFO_LDFLAGS="-L${LIB_DIR}"
20478         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
20479 fi
20480
20481 if test "$DFT_LWR_MODEL" = shared ; then
20482         case $cf_cv_system_name in #(vi
20483         cygwin*|msys*)
20484                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
20485                 TINFO_SUFFIX=.dll
20486                 ;;
20487         esac
20488 fi
20489
20490 if test "x$with_dlsym" = xyes ; then
20491
20492 # remove dl library from $TICS_LIST
20493 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
20494
20495 fi
20496
20497 if test "$DFT_LWR_MODEL" = "libtool"; then
20498     OBJEXT=lo
20499 fi
20500
20501 # needed for Ada95
20502 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20503
20504 case $DFT_LWR_MODEL in
20505 normal|debug|profile)
20506
20507 if test "$GCC" = yes ; then
20508         case $cf_cv_system_name in #(
20509         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20510                 LDFLAGS_STATIC=
20511                 LDFLAGS_SHARED=
20512                 ;;
20513     *)  #( normally, except when broken
20514         LDFLAGS_STATIC=-static
20515         LDFLAGS_SHARED=-dynamic
20516         ;;
20517     esac
20518 else
20519         case $cf_cv_system_name in #(
20520         aix[4-7]*)      #( from ld manpage
20521                 LDFLAGS_STATIC=-bstatic
20522                 LDFLAGS_SHARED=-bdynamic
20523                 ;;
20524         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20525                 # We could also use just "archive" and "shared".
20526                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20527                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20528                 ;;
20529         irix*)          #( from ld manpage IRIX64
20530                 LDFLAGS_STATIC=-Bstatic
20531                 LDFLAGS_SHARED=-Bdynamic
20532                 ;;
20533         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20534                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20535                 LDFLAGS_STATIC=-noso
20536                 LDFLAGS_SHARED=-so_archive
20537                 ;;
20538         solaris2*)
20539                 LDFLAGS_STATIC=-Bstatic
20540                 LDFLAGS_SHARED=-Bdynamic
20541                 ;;
20542         esac
20543 fi
20544
20545 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20546 then
20547         echo "$as_me:20547: checking if linker supports switching between static/dynamic" >&5
20548 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20549
20550         rm -f libconftest.a
20551         cat >conftest.$ac_ext <<EOF
20552 #line 20552 "configure"
20553 #include <stdio.h>
20554 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20555 EOF
20556         if { (eval echo "$as_me:20556: \"$ac_compile\"") >&5
20557   (eval $ac_compile) 2>&5
20558   ac_status=$?
20559   echo "$as_me:20559: \$? = $ac_status" >&5
20560   (exit $ac_status); } ; then
20561                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20562                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20563         fi
20564         rm -f conftest.*
20565
20566         cf_save_LIBS="$LIBS"
20567
20568         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20569         cat >conftest.$ac_ext <<_ACEOF
20570 #line 20570 "configure"
20571 #include "confdefs.h"
20572
20573 #line 20573 "configure"
20574 #include <stdio.h>
20575 int cf_ldflags_static(FILE *fp);
20576
20577 int
20578 main ()
20579 {
20580
20581         return cf_ldflags_static(stdin);
20582
20583   ;
20584   return 0;
20585 }
20586 _ACEOF
20587 rm -f conftest.$ac_objext conftest$ac_exeext
20588 if { (eval echo "$as_me:20588: \"$ac_link\"") >&5
20589   (eval $ac_link) 2>&5
20590   ac_status=$?
20591   echo "$as_me:20591: \$? = $ac_status" >&5
20592   (exit $ac_status); } &&
20593          { ac_try='test -s conftest$ac_exeext'
20594   { (eval echo "$as_me:20594: \"$ac_try\"") >&5
20595   (eval $ac_try) 2>&5
20596   ac_status=$?
20597   echo "$as_me:20597: \$? = $ac_status" >&5
20598   (exit $ac_status); }; }; then
20599
20600         # some linkers simply ignore the -dynamic
20601         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20602         *static*) # (vi
20603                 cf_ldflags_static=no
20604                 ;;
20605         *)
20606                 cf_ldflags_static=yes
20607                 ;;
20608         esac
20609
20610 else
20611   echo "$as_me: failed program was:" >&5
20612 cat conftest.$ac_ext >&5
20613 cf_ldflags_static=no
20614 fi
20615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20616
20617         rm -f libconftest.*
20618         LIBS="$cf_save_LIBS"
20619
20620         echo "$as_me:20620: result: $cf_ldflags_static" >&5
20621 echo "${ECHO_T}$cf_ldflags_static" >&6
20622
20623         if test $cf_ldflags_static != yes
20624         then
20625                 LDFLAGS_STATIC=
20626                 LDFLAGS_SHARED=
20627         fi
20628 else
20629         LDFLAGS_STATIC=
20630         LDFLAGS_SHARED=
20631 fi
20632
20633         ;;
20634 esac
20635
20636 echo "$as_me:20636: checking where we will install curses.h" >&5
20637 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20638
20639 includesubdir=
20640 if test "$with_overwrite" = no && \
20641  ( test "x$includedir" = 'x${prefix}/include' || \
20642    test "x$includedir" = "x${prefix}/include" )
20643 then
20644         includesubdir="/ncurses${LIB_SUFFIX}"
20645 fi
20646 echo "$as_me:20646: result: ${includedir}${includesubdir}" >&5
20647 echo "${ECHO_T}${includedir}${includesubdir}" >&6
20648
20649 ### Resolve a conflict between normal and wide-curses by forcing applications
20650 ### that will need libutf8 to add it to their configure script.
20651 if test "$with_overwrite" != no ; then
20652 if test "$NCURSES_LIBUTF8" = 1 ; then
20653         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20654         { echo "$as_me:20654: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20655 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20656 fi
20657 fi
20658 WITH_OVERWRITE=$with_overwrite
20659
20660 # used to separate tack out of the tree
20661 NCURSES_TREE=
20662
20663 ### predefined stuff for the test programs
20664
20665 cat >>confdefs.h <<\EOF
20666 #define HAVE_SLK_COLOR 1
20667 EOF
20668
20669 ### Construct the list of subdirectories for which we'll customize makefiles
20670 ### with the appropriate compile-rules.
20671
20672 echo "$as_me:20672: checking for src modules" >&5
20673 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20674
20675 # dependencies and linker-arguments for test-programs
20676 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20677 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20678 if test "$DFT_LWR_MODEL" = "libtool"; then
20679         TEST_ARGS="${TEST_DEPS}"
20680         TEST_ARG2="${TEST_DEP2}"
20681 else
20682         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20683         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20684 fi
20685
20686 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20687 cf_cv_src_modules=
20688 for cf_dir in $modules_to_build
20689 do
20690         if test -f $srcdir/$cf_dir/modules; then
20691
20692                 # We may/may not have tack in the distribution, though the
20693                 # makefile is.
20694                 if test $cf_dir = tack ; then
20695                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20696                                 continue
20697                         fi
20698                 fi
20699
20700                 if test -z "$cf_cv_src_modules"; then
20701                         cf_cv_src_modules=$cf_dir
20702                 else
20703                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20704                 fi
20705
20706                 # Make the ncurses_cfg.h file record the library interface files as
20707                 # well.  These are header files that are the same name as their
20708                 # directory.  Ncurses is the only library that does not follow
20709                 # that pattern.
20710                 if test $cf_dir = tack ; then
20711                         continue
20712                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20713
20714 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20715
20716                         cat >>confdefs.h <<EOF
20717 #define HAVE_${cf_have_include}_H 1
20718 EOF
20719
20720                         cat >>confdefs.h <<EOF
20721 #define HAVE_LIB${cf_have_include} 1
20722 EOF
20723
20724                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20725                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20726                         if test "$DFT_LWR_MODEL" = "libtool"; then
20727                                 TEST_ARGS="${TEST_DEPS}"
20728                                 TEST_ARG2="${TEST_DEP2}"
20729                         else
20730                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20731                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20732                         fi
20733                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20734                 fi
20735         fi
20736 done
20737 echo "$as_me:20737: result: $cf_cv_src_modules" >&5
20738 echo "${ECHO_T}$cf_cv_src_modules" >&6
20739
20740 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20741 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20742
20743 SRC_SUBDIRS=
20744 if test "x$cf_with_manpages" != xno ; then
20745         SRC_SUBDIRS="$SRC_SUBDIRS man"
20746 fi
20747 SRC_SUBDIRS="$SRC_SUBDIRS include"
20748 for cf_dir in $cf_cv_src_modules
20749 do
20750         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20751 done
20752 if test "x$cf_with_tests" != "xno" ; then
20753         SRC_SUBDIRS="$SRC_SUBDIRS test"
20754 fi
20755 if test "x$cf_with_db_install" = xyes; then
20756         test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20757 fi
20758 if test "$cf_with_cxx_binding" != no; then
20759         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20760         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20761 fi
20762
20763 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20764 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20765
20766 ADA_SUBDIRS=
20767 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20768         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20769         ADA_SUBDIRS="gen src"
20770         if test "x$cf_with_tests" != "xno" ; then
20771                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20772         fi
20773 fi
20774
20775 SUB_MAKEFILES=
20776 for cf_dir in $SRC_SUBDIRS
20777 do
20778         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20779 done
20780
20781 if test -n "$ADA_SUBDIRS"; then
20782         for cf_dir in $ADA_SUBDIRS
20783         do
20784                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20785         done
20786
20787 fi
20788
20789 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20790    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20791    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20792 fi
20793
20794 DIRS_TO_MAKE="lib"
20795 for cf_item in $cf_list_models
20796 do
20797
20798         case $cf_item in
20799         libtool) cf_subdir='obj_lo'  ;;
20800         normal)  cf_subdir='objects' ;;
20801         debug)   cf_subdir='obj_g' ;;
20802         profile) cf_subdir='obj_p' ;;
20803         shared)
20804                 case $cf_cv_system_name in #(vi
20805                 cygwin|msys) #(vi
20806                         cf_subdir='objects' ;;
20807                 *)
20808                         cf_subdir='obj_s' ;;
20809                 esac
20810         esac
20811
20812         for cf_item2 in $DIRS_TO_MAKE
20813         do
20814                 test $cf_item2 = $cf_subdir && break
20815         done
20816         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20817 done
20818 for cf_dir in $DIRS_TO_MAKE
20819 do
20820         test ! -d $cf_dir && mkdir $cf_dir
20821 done
20822
20823 # symbols that differ when compiling Ada95 by itself.
20824 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20825
20826 # values to use as strings
20827
20828 cat >>confdefs.h <<EOF
20829 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20830 EOF
20831
20832 cat >>confdefs.h <<EOF
20833 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20834 EOF
20835
20836 ### Now that we're done running tests, add the compiler-warnings, if any
20837
20838 cf_fix_cppflags=no
20839 cf_new_cflags=
20840 cf_new_cppflags=
20841 cf_new_extra_cppflags=
20842
20843 for cf_add_cflags in $EXTRA_CFLAGS
20844 do
20845 case $cf_fix_cppflags in
20846 no)
20847         case $cf_add_cflags in #(vi
20848         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20849                 case $cf_add_cflags in
20850                 -D*)
20851                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20852
20853                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20854                                 && test -z "${cf_tst_cflags}" \
20855                                 && cf_fix_cppflags=yes
20856
20857                         if test $cf_fix_cppflags = yes ; then
20858                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20859                                 continue
20860                         elif test "${cf_tst_cflags}" = "\"'" ; then
20861                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20862                                 continue
20863                         fi
20864                         ;;
20865                 esac
20866                 case "$CPPFLAGS" in
20867                 *$cf_add_cflags) #(vi
20868                         ;;
20869                 *) #(vi
20870                         case $cf_add_cflags in #(vi
20871                         -D*)
20872                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20873
20874 CPPFLAGS=`echo "$CPPFLAGS" | \
20875         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20876                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20877
20878                                 ;;
20879                         esac
20880                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20881                         ;;
20882                 esac
20883                 ;;
20884         *)
20885                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20886                 ;;
20887         esac
20888         ;;
20889 yes)
20890         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20891
20892         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20893
20894         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20895                 && test -z "${cf_tst_cflags}" \
20896                 && cf_fix_cppflags=no
20897         ;;
20898 esac
20899 done
20900
20901 if test -n "$cf_new_cflags" ; then
20902
20903         CFLAGS="$CFLAGS $cf_new_cflags"
20904 fi
20905
20906 if test -n "$cf_new_cppflags" ; then
20907
20908         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20909 fi
20910
20911 if test -n "$cf_new_extra_cppflags" ; then
20912
20913         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20914 fi
20915
20916 ### Define substitutions for header files to avoid name-pollution
20917
20918 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20919         HAVE_TCGETATTR=1
20920 else
20921         HAVE_TCGETATTR=0
20922 fi
20923
20924 if test "x$ac_cv_header_termio_h" = xyes ; then
20925         HAVE_TERMIO_H=1
20926 else
20927         HAVE_TERMIO_H=0
20928 fi
20929
20930 if test "x$ac_cv_header_termios_h" = xyes ; then
20931         HAVE_TERMIOS_H=1
20932 else
20933         HAVE_TERMIOS_H=0
20934 fi
20935
20936 ################################################################################
20937 test "x$use_database" = xyes && \
20938 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20939
20940 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20941 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20942
20943 if test "x$enable_pc_files" = xyes ; then \
20944 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20945 MAKE_PC_FILES=
20946 else
20947 MAKE_PC_FILES="#"
20948 fi
20949
20950 # Extract the first word of "tic", so it can be a program name with args.
20951 set dummy tic; ac_word=$2
20952 echo "$as_me:20952: checking for $ac_word" >&5
20953 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20954 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20955   echo $ECHO_N "(cached) $ECHO_C" >&6
20956 else
20957   case $TIC_PATH in
20958   [\\/]* | ?:[\\/]*)
20959   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20960   ;;
20961   *)
20962   ac_save_IFS=$IFS; IFS=$ac_path_separator
20963 ac_dummy="$PATH:/usr/local/ncurses/bin"
20964 for ac_dir in $ac_dummy; do
20965   IFS=$ac_save_IFS
20966   test -z "$ac_dir" && ac_dir=.
20967   if $as_executable_p "$ac_dir/$ac_word"; then
20968    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20969    echo "$as_me:20969: found $ac_dir/$ac_word" >&5
20970    break
20971 fi
20972 done
20973
20974   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20975   ;;
20976 esac
20977 fi
20978 TIC_PATH=$ac_cv_path_TIC_PATH
20979
20980 if test -n "$TIC_PATH"; then
20981   echo "$as_me:20981: result: $TIC_PATH" >&5
20982 echo "${ECHO_T}$TIC_PATH" >&6
20983 else
20984   echo "$as_me:20984: result: no" >&5
20985 echo "${ECHO_T}no" >&6
20986 fi
20987
20988 if test -n "$FALLBACK_LIST"
20989 then
20990         if test "$TIC_PATH" = unknown
20991         then
20992                 { echo "$as_me:20992: WARNING: no tic program found for fallbacks" >&5
20993 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20994         fi
20995 fi
20996
20997 if test "x$cf_with_tests" != xno ; then
20998         MAKE_TESTS=
20999 else
21000         MAKE_TESTS="#"
21001 fi
21002
21003 ADAHTML_DIR=../../doc/html/ada
21004
21005 # these could be configurable, but are not currently
21006 PANEL_NAME=panel
21007 MENU_NAME=menu
21008 FORM_NAME=form
21009 CXX_NAME=ncurses++
21010
21011 SUB_SCRIPTS=
21012
21013 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"
21014 ac_config_commands="$ac_config_commands default"
21015 cat >confcache <<\_ACEOF
21016 # This file is a shell script that caches the results of configure
21017 # tests run on this system so they can be shared between configure
21018 # scripts and configure runs, see configure's option --config-cache.
21019 # It is not useful on other systems.  If it contains results you don't
21020 # want to keep, you may remove or edit it.
21021 #
21022 # config.status only pays attention to the cache file if you give it
21023 # the --recheck option to rerun configure.
21024 #
21025 # `ac_cv_env_foo' variables (set or unset) will be overriden when
21026 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21027 # following values.
21028
21029 _ACEOF
21030
21031 # The following way of writing the cache mishandles newlines in values,
21032 # but we know of no workaround that is simple, portable, and efficient.
21033 # So, don't put newlines in cache variables' values.
21034 # Ultrix sh set writes to stderr and can't be redirected directly,
21035 # and sets the high bit in the cache file unless we assign to the vars.
21036 {
21037   (set) 2>&1 |
21038     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21039     *ac_space=\ *)
21040       # `set' does not quote correctly, so add quotes (double-quote
21041       # substitution turns \\\\ into \\, and sed turns \\ into \).
21042       sed -n \
21043         "s/'/'\\\\''/g;
21044           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21045       ;;
21046     *)
21047       # `set' quotes correctly as required by POSIX, so do not add quotes.
21048       sed -n \
21049         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21050       ;;
21051     esac;
21052 } |
21053   sed '
21054      t clear
21055      : clear
21056      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21057      t end
21058      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21059      : end' >>confcache
21060 if cmp -s $cache_file confcache; then :; else
21061   if test -w $cache_file; then
21062     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21063     cat confcache >$cache_file
21064   else
21065     echo "not updating unwritable cache $cache_file"
21066   fi
21067 fi
21068 rm -f confcache
21069
21070 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21071 # Let make expand exec_prefix.
21072 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21073
21074 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21075 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21076 # trailing colons and then remove the whole line if VPATH becomes empty
21077 # (actually we leave an empty line to preserve line numbers).
21078 if test "x$srcdir" = x.; then
21079   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21080 s/:*\$(srcdir):*/:/;
21081 s/:*\${srcdir}:*/:/;
21082 s/:*@srcdir@:*/:/;
21083 s/^\([^=]*=[    ]*\):*/\1/;
21084 s/:*$//;
21085 s/^[^=]*=[      ]*$//;
21086 }'
21087 fi
21088
21089 DEFS=-DHAVE_CONFIG_H
21090
21091 : ${CONFIG_STATUS=./config.status}
21092 ac_clean_files_save=$ac_clean_files
21093 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21094 { echo "$as_me:21094: creating $CONFIG_STATUS" >&5
21095 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21096 cat >$CONFIG_STATUS <<_ACEOF
21097 #! $SHELL
21098 # Generated automatically by configure.
21099 # Run this file to recreate the current configuration.
21100 # Compiler output produced by configure, useful for debugging
21101 # configure, is in config.log if it exists.
21102
21103 debug=false
21104 SHELL=\${CONFIG_SHELL-$SHELL}
21105 ac_cs_invocation="\$0 \$@"
21106
21107 _ACEOF
21108
21109 cat >>$CONFIG_STATUS <<\_ACEOF
21110 # Be Bourne compatible
21111 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21112   emulate sh
21113   NULLCMD=:
21114 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21115   set -o posix
21116 fi
21117
21118 # Name of the executable.
21119 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21120
21121 if expr a : '\(a\)' >/dev/null 2>&1; then
21122   as_expr=expr
21123 else
21124   as_expr=false
21125 fi
21126
21127 rm -f conf$$ conf$$.exe conf$$.file
21128 echo >conf$$.file
21129 if ln -s conf$$.file conf$$ 2>/dev/null; then
21130   # We could just check for DJGPP; but this test a) works b) is more generic
21131   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21132   if test -f conf$$.exe; then
21133     # Don't use ln at all; we don't have any links
21134     as_ln_s='cp -p'
21135   else
21136     as_ln_s='ln -s'
21137   fi
21138 elif ln conf$$.file conf$$ 2>/dev/null; then
21139   as_ln_s=ln
21140 else
21141   as_ln_s='cp -p'
21142 fi
21143 rm -f conf$$ conf$$.exe conf$$.file
21144
21145 as_executable_p="test -f"
21146
21147 # Support unset when possible.
21148 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21149   as_unset=unset
21150 else
21151   as_unset=false
21152 fi
21153
21154 # NLS nuisances.
21155 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21156 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21157 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21158 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21159 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21160 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21161 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21162 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21163
21164 # IFS
21165 # We need space, tab and new line, in precisely that order.
21166 as_nl='
21167 '
21168 IFS="   $as_nl"
21169
21170 # CDPATH.
21171 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21172
21173 exec 6>&1
21174
21175 _ACEOF
21176
21177 # Files that config.status was made for.
21178 if test -n "$ac_config_files"; then
21179   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21180 fi
21181
21182 if test -n "$ac_config_headers"; then
21183   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21184 fi
21185
21186 if test -n "$ac_config_links"; then
21187   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21188 fi
21189
21190 if test -n "$ac_config_commands"; then
21191   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21192 fi
21193
21194 cat >>$CONFIG_STATUS <<\EOF
21195
21196 ac_cs_usage="\
21197 \`$as_me' instantiates files from templates according to the
21198 current configuration.
21199
21200 Usage: $0 [OPTIONS] [FILE]...
21201
21202   -h, --help       print this help, then exit
21203   -V, --version    print version number, then exit
21204   -d, --debug      don't remove temporary files
21205       --recheck    update $as_me by reconfiguring in the same conditions
21206   --file=FILE[:TEMPLATE]
21207                    instantiate the configuration file FILE
21208   --header=FILE[:TEMPLATE]
21209                    instantiate the configuration header FILE
21210
21211 Configuration files:
21212 $config_files
21213
21214 Configuration headers:
21215 $config_headers
21216
21217 Configuration commands:
21218 $config_commands
21219
21220 Report bugs to <dickey@invisible-island.net>."
21221 EOF
21222
21223 cat >>$CONFIG_STATUS <<EOF
21224 ac_cs_version="\\
21225 config.status
21226 configured by $0, generated by GNU Autoconf 2.52.20121002,
21227   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21228
21229 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21230 Free Software Foundation, Inc.
21231 This config.status script is free software; the Free Software Foundation
21232 gives unlimited permission to copy, distribute and modify it."
21233 srcdir=$srcdir
21234 INSTALL="$INSTALL"
21235 EOF
21236
21237 cat >>$CONFIG_STATUS <<\EOF
21238 # If no file are specified by the user, then we need to provide default
21239 # value.  By we need to know if files were specified by the user.
21240 ac_need_defaults=:
21241 while test $# != 0
21242 do
21243   case $1 in
21244   --*=*)
21245     ac_option=`expr "x$1" : 'x\([^=]*\)='`
21246     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21247     shift
21248     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21249     shift
21250     ;;
21251   -*);;
21252   *) # This is not an option, so the user has probably given explicit
21253      # arguments.
21254      ac_need_defaults=false;;
21255   esac
21256
21257   case $1 in
21258   # Handling of the options.
21259 EOF
21260 cat >>$CONFIG_STATUS <<EOF
21261   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21262     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21263     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21264 EOF
21265 cat >>$CONFIG_STATUS <<\EOF
21266   --version | --vers* | -V )
21267     echo "$ac_cs_version"; exit 0 ;;
21268   --he | --h)
21269     # Conflict between --help and --header
21270     { { echo "$as_me:21270: error: ambiguous option: $1
21271 Try \`$0 --help' for more information." >&5
21272 echo "$as_me: error: ambiguous option: $1
21273 Try \`$0 --help' for more information." >&2;}
21274    { (exit 1); exit 1; }; };;
21275   --help | --hel | -h )
21276     echo "$ac_cs_usage"; exit 0 ;;
21277   --debug | --d* | -d )
21278     debug=: ;;
21279   --file | --fil | --fi | --f )
21280     shift
21281     CONFIG_FILES="$CONFIG_FILES $1"
21282     ac_need_defaults=false;;
21283   --header | --heade | --head | --hea )
21284     shift
21285     CONFIG_HEADERS="$CONFIG_HEADERS $1"
21286     ac_need_defaults=false;;
21287
21288   # This is an error.
21289   -*) { { echo "$as_me:21289: error: unrecognized option: $1
21290 Try \`$0 --help' for more information." >&5
21291 echo "$as_me: error: unrecognized option: $1
21292 Try \`$0 --help' for more information." >&2;}
21293    { (exit 1); exit 1; }; } ;;
21294
21295   *) ac_config_targets="$ac_config_targets $1" ;;
21296
21297   esac
21298   shift
21299 done
21300
21301 exec 5>>config.log
21302 cat >&5 << _ACEOF
21303
21304 ## ----------------------- ##
21305 ## Running config.status.  ##
21306 ## ----------------------- ##
21307
21308 This file was extended by $as_me 2.52.20121002, executed with
21309   CONFIG_FILES    = $CONFIG_FILES
21310   CONFIG_HEADERS  = $CONFIG_HEADERS
21311   CONFIG_LINKS    = $CONFIG_LINKS
21312   CONFIG_COMMANDS = $CONFIG_COMMANDS
21313   > $ac_cs_invocation
21314 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21315
21316 _ACEOF
21317 EOF
21318
21319 cat >>$CONFIG_STATUS <<EOF
21320 #
21321 # INIT-COMMANDS section.
21322 #
21323
21324 ### Special initialization commands, used to pass information from the
21325 ### configuration-run into config.status
21326
21327 AWK="$AWK"
21328 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
21329 DFT_LWR_MODEL="$DFT_LWR_MODEL"
21330 ECHO_LD="$ECHO_LD"
21331 LDCONFIG="$LDCONFIG"
21332 LIBTOOL_VERSION="$LIBTOOL_VERSION"
21333 LIB_NAME="$LIB_NAME"
21334 LIB_PREFIX="$LIB_PREFIX"
21335 LIB_SUBSETS="$LIB_SUBSETS"
21336 LIB_SUFFIX="$LIB_SUFFIX"
21337 LIB_TRACING="$LIB_TRACING"
21338 LN_S="$LN_S"
21339 MAKE_TERMINFO="$MAKE_TERMINFO"
21340 NCURSES_MAJOR="$NCURSES_MAJOR"
21341 NCURSES_MINOR="$NCURSES_MINOR"
21342 NCURSES_OSPEED="$NCURSES_OSPEED"
21343 NCURSES_PATCH="$NCURSES_PATCH"
21344 SRC_SUBDIRS="$SRC_SUBDIRS"
21345 TERMINFO="$TERMINFO"
21346 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
21347 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
21348 TICS_NAME="$TICS_NAME"
21349 TIC_PATH="$TIC_PATH"
21350 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
21351 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
21352 TINFO_NAME="$TINFO_NAME"
21353 TINFO_SUFFIX="$TINFO_SUFFIX"
21354 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
21355 WITH_CURSES_H="$with_curses_h"
21356 WITH_ECHO="${enable_echo:=yes}"
21357 WITH_OVERWRITE="$with_overwrite"
21358 cf_LIST_MODELS="$cf_list_models"
21359 cf_cv_abi_version="$cf_cv_abi_version"
21360 cf_cv_do_relink="$cf_cv_do_relink"
21361 cf_cv_do_symlinks="$cf_cv_do_symlinks"
21362 cf_cv_enable_lp64="$cf_cv_enable_lp64"
21363 cf_cv_enable_opaque="$cf_cv_enable_opaque"
21364 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
21365 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
21366 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
21367 cf_cv_rel_version="$cf_cv_rel_version"
21368 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
21369 cf_cv_shared_soname='$cf_cv_shared_soname'
21370 cf_cv_shlib_version="$cf_cv_shlib_version"
21371 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
21372 cf_cv_system_name="$cf_cv_system_name"
21373 cf_cv_term_driver="$with_term_driver"
21374 cf_with_ada="$cf_with_ada"
21375 cf_with_cxx_binding="$cf_with_cxx_binding"
21376 cf_with_db_install="$cf_with_db_install"
21377 cf_with_manpages="$cf_with_manpages"
21378 cf_with_tests="$cf_with_tests"
21379 with_shared_cxx="$with_shared_cxx"
21380 host="$host"
21381 target="$target"
21382
21383 EOF
21384
21385 cat >>$CONFIG_STATUS <<\EOF
21386 for ac_config_target in $ac_config_targets
21387 do
21388   case "$ac_config_target" in
21389   # Handling of arguments.
21390   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
21391   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
21392   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
21393   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
21394   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
21395   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
21396   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
21397   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21398   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
21399   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
21400   *) { { echo "$as_me:21400: error: invalid argument: $ac_config_target" >&5
21401 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21402    { (exit 1); exit 1; }; };;
21403   esac
21404 done
21405
21406 # If the user did not use the arguments to specify the items to instantiate,
21407 # then the envvar interface is used.  Set only those that are not.
21408 # We use the long form for the default assignment because of an extremely
21409 # bizarre bug on SunOS 4.1.3.
21410 if $ac_need_defaults; then
21411   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21412   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21413   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21414 fi
21415
21416 # Create a temporary directory, and hook for its removal unless debugging.
21417 $debug ||
21418 {
21419   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21420   trap '{ (exit 1); exit 1; }' 1 2 13 15
21421 }
21422
21423 # Create a (secure) tmp directory for tmp files.
21424 : ${TMPDIR=/tmp}
21425 {
21426   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21427   test -n "$tmp" && test -d "$tmp"
21428 }  ||
21429 {
21430   tmp=$TMPDIR/cs$$-$RANDOM
21431   (umask 077 && mkdir $tmp)
21432 } ||
21433 {
21434    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21435    { (exit 1); exit 1; }
21436 }
21437
21438 EOF
21439
21440 cat >>$CONFIG_STATUS <<EOF
21441
21442 #
21443 # CONFIG_FILES section.
21444 #
21445
21446 # No need to generate the scripts if there are no CONFIG_FILES.
21447 # This happens for instance when ./config.status config.h
21448 if test -n "\$CONFIG_FILES"; then
21449   # Protect against being on the right side of a sed subst in config.status.
21450   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21451    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21452 s,@SHELL@,$SHELL,;t t
21453 s,@exec_prefix@,$exec_prefix,;t t
21454 s,@prefix@,$prefix,;t t
21455 s,@program_transform_name@,$program_transform_name,;t t
21456 s,@bindir@,$bindir,;t t
21457 s,@sbindir@,$sbindir,;t t
21458 s,@libexecdir@,$libexecdir,;t t
21459 s,@datarootdir@,$datarootdir,;t t
21460 s,@datadir@,$datadir,;t t
21461 s,@sysconfdir@,$sysconfdir,;t t
21462 s,@sharedstatedir@,$sharedstatedir,;t t
21463 s,@localstatedir@,$localstatedir,;t t
21464 s,@libdir@,$libdir,;t t
21465 s,@includedir@,$includedir,;t t
21466 s,@oldincludedir@,$oldincludedir,;t t
21467 s,@infodir@,$infodir,;t t
21468 s,@mandir@,$mandir,;t t
21469 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21470 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21471 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21472 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21473 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21474 s,@build_alias@,$build_alias,;t t
21475 s,@host_alias@,$host_alias,;t t
21476 s,@target_alias@,$target_alias,;t t
21477 s,@ECHO_C@,$ECHO_C,;t t
21478 s,@ECHO_N@,$ECHO_N,;t t
21479 s,@ECHO_T@,$ECHO_T,;t t
21480 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21481 s,@DEFS@,$DEFS,;t t
21482 s,@LIBS@,$LIBS,;t t
21483 s,@top_builddir@,$top_builddir,;t t
21484 s,@EGREP@,$EGREP,;t t
21485 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
21486 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
21487 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
21488 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
21489 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
21490 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
21491 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
21492 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
21493 s,@build@,$build,;t t
21494 s,@build_cpu@,$build_cpu,;t t
21495 s,@build_vendor@,$build_vendor,;t t
21496 s,@build_os@,$build_os,;t t
21497 s,@host@,$host,;t t
21498 s,@host_cpu@,$host_cpu,;t t
21499 s,@host_vendor@,$host_vendor,;t t
21500 s,@host_os@,$host_os,;t t
21501 s,@target@,$target,;t t
21502 s,@target_cpu@,$target_cpu,;t t
21503 s,@target_vendor@,$target_vendor,;t t
21504 s,@target_os@,$target_os,;t t
21505 s,@CC@,$CC,;t t
21506 s,@CFLAGS@,$CFLAGS,;t t
21507 s,@LDFLAGS@,$LDFLAGS,;t t
21508 s,@CPPFLAGS@,$CPPFLAGS,;t t
21509 s,@ac_ct_CC@,$ac_ct_CC,;t t
21510 s,@EXEEXT@,$EXEEXT,;t t
21511 s,@OBJEXT@,$OBJEXT,;t t
21512 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21513 s,@CPP@,$CPP,;t t
21514 s,@LDCONFIG@,$LDCONFIG,;t t
21515 s,@CXX@,$CXX,;t t
21516 s,@CXXFLAGS@,$CXXFLAGS,;t t
21517 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21518 s,@AWK@,$AWK,;t t
21519 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21520 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21521 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21522 s,@LINT@,$LINT,;t t
21523 s,@LINT_OPTS@,$LINT_OPTS,;t t
21524 s,@LN_S@,$LN_S,;t t
21525 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21526 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21527 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21528 s,@SET_MAKE@,$SET_MAKE,;t t
21529 s,@CTAGS@,$CTAGS,;t t
21530 s,@ETAGS@,$ETAGS,;t t
21531 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21532 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21533 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21534 s,@RANLIB@,$RANLIB,;t t
21535 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21536 s,@LD@,$LD,;t t
21537 s,@ac_ct_LD@,$ac_ct_LD,;t t
21538 s,@AR@,$AR,;t t
21539 s,@ac_ct_AR@,$ac_ct_AR,;t t
21540 s,@NM@,$NM,;t t
21541 s,@ac_ct_NM@,$ac_ct_NM,;t t
21542 s,@ARFLAGS@,$ARFLAGS,;t t
21543 s,@DESTDIR@,$DESTDIR,;t t
21544 s,@BUILD_CC@,$BUILD_CC,;t t
21545 s,@BUILD_CPP@,$BUILD_CPP,;t t
21546 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21547 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21548 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21549 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21550 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21551 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21552 s,@cf_list_models@,$cf_list_models,;t t
21553 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21554 s,@LIBTOOL@,$LIBTOOL,;t t
21555 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
21556 s,@LT_UNDEF@,$LT_UNDEF,;t t
21557 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21558 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21559 s,@LIB_CREATE@,$LIB_CREATE,;t t
21560 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21561 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21562 s,@LIB_PREP@,$LIB_PREP,;t t
21563 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21564 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21565 s,@LIB_LINK@,$LIB_LINK,;t t
21566 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21567 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21568 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21569 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21570 s,@TICS_NAME@,$TICS_NAME,;t t
21571 s,@TINFO_NAME@,$TINFO_NAME,;t t
21572 s,@LIB_NAME@,$LIB_NAME,;t t
21573 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21574 s,@CC_G_OPT@,$CC_G_OPT,;t t
21575 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21576 s,@LD_MODEL@,$LD_MODEL,;t t
21577 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21578 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21579 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21580 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21581 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
21582 s,@LINK_PROGS@,$LINK_PROGS,;t t
21583 s,@LINK_TESTS@,$LINK_TESTS,;t t
21584 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21585 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21586 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21587 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21588 s,@RPATH_LIST@,$RPATH_LIST,;t t
21589 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21590 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21591 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
21592 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21593 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21594 s,@XTERM_KBS@,$XTERM_KBS,;t t
21595 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21596 s,@TERMINFO@,$TERMINFO,;t t
21597 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21598 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21599 s,@TERMPATH@,$TERMPATH,;t t
21600 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
21601 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21602 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21603 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21604 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21605 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21606 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21607 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21608 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21609 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21610 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21611 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21612 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21613 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21614 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21615 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21616 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21617 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21618 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21619 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21620 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21621 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21622 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21623 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21624 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21625 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21626 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21627 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21628 s,@PTHREAD@,$PTHREAD,;t t
21629 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21630 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21631 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21632 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21633 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21634 s,@ECHO_LT@,$ECHO_LT,;t t
21635 s,@ECHO_LD@,$ECHO_LD,;t t
21636 s,@RULE_CC@,$RULE_CC,;t t
21637 s,@SHOW_CC@,$SHOW_CC,;t t
21638 s,@ECHO_CC@,$ECHO_CC,;t t
21639 s,@ECHO_LINK@,$ECHO_LINK,;t t
21640 s,@ADAFLAGS@,$ADAFLAGS,;t t
21641 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21642 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21643 s,@ADA_TRACE@,$ADA_TRACE,;t t
21644 s,@MATH_LIB@,$MATH_LIB,;t t
21645 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21646 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21647 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21648 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21649 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21650 s,@TEST_LIBS@,$TEST_LIBS,;t t
21651 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21652 s,@CXXCPP@,$CXXCPP,;t t
21653 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21654 s,@CXX_AR@,$CXX_AR,;t t
21655 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21656 s,@CXXLIBS@,$CXXLIBS,;t t
21657 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21658 s,@gnat_exists@,$gnat_exists,;t t
21659 s,@M4_exists@,$M4_exists,;t t
21660 s,@cf_ada_make@,$cf_ada_make,;t t
21661 s,@cf_compile_generics@,$cf_compile_generics,;t t
21662 s,@cf_generic_objects@,$cf_generic_objects,;t t
21663 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21664 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21665 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21666 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21667 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21668 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21669 s,@cf_ada_package@,$cf_ada_package,;t t
21670 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21671 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21672 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21673 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21674 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21675 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21676 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21677 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21678 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21679 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21680 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21681 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21682 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21683 s,@TICS_LIBS@,$TICS_LIBS,;t t
21684 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21685 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21686 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21687 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21688 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21689 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21690 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21691 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21692 s,@includesubdir@,$includesubdir,;t t
21693 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21694 s,@TICS_LIST@,$TICS_LIST,;t t
21695 s,@TINFO_LIST@,$TINFO_LIST,;t t
21696 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21697 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21698 s,@TEST_ARGS@,$TEST_ARGS,;t t
21699 s,@TEST_DEPS@,$TEST_DEPS,;t t
21700 s,@TEST_ARG2@,$TEST_ARG2,;t t
21701 s,@TEST_DEP2@,$TEST_DEP2,;t t
21702 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21703 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21704 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21705 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21706 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21707 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21708 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21709 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21710 s,@cross_compiling@,$cross_compiling,;t t
21711 s,@TIC_PATH@,$TIC_PATH,;t t
21712 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21713 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21714 s,@PANEL_NAME@,$PANEL_NAME,;t t
21715 s,@MENU_NAME@,$MENU_NAME,;t t
21716 s,@FORM_NAME@,$FORM_NAME,;t t
21717 s,@CXX_NAME@,$CXX_NAME,;t t
21718 CEOF
21719
21720 EOF
21721
21722   cat >>$CONFIG_STATUS <<\EOF
21723   # Split the substitutions into bite-sized pieces for seds with
21724   # small command number limits, like on Digital OSF/1 and HP-UX.
21725   ac_max_sed_lines=48
21726   ac_sed_frag=1 # Number of current file.
21727   ac_beg=1 # First line for current file.
21728   ac_end=$ac_max_sed_lines # Line after last line for current file.
21729   ac_more_lines=:
21730   ac_sed_cmds=
21731   while $ac_more_lines; do
21732     if test $ac_beg -gt 1; then
21733       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21734     else
21735       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21736     fi
21737     if test ! -s $tmp/subs.frag; then
21738       ac_more_lines=false
21739     else
21740       # The purpose of the label and of the branching condition is to
21741       # speed up the sed processing (if there are no `@' at all, there
21742       # is no need to browse any of the substitutions).
21743       # These are the two extra sed commands mentioned above.
21744       (echo ':t
21745   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21746       if test -z "$ac_sed_cmds"; then
21747         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21748       else
21749         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21750       fi
21751       ac_sed_frag=`expr $ac_sed_frag + 1`
21752       ac_beg=$ac_end
21753       ac_end=`expr $ac_end + $ac_max_sed_lines`
21754     fi
21755   done
21756   if test -z "$ac_sed_cmds"; then
21757     ac_sed_cmds=cat
21758   fi
21759 fi # test -n "$CONFIG_FILES"
21760
21761 EOF
21762 cat >>$CONFIG_STATUS <<\EOF
21763 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21764   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21765   case $ac_file in
21766   - | *:- | *:-:* ) # input from stdin
21767         cat >$tmp/stdin
21768         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21769         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21770   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21771         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21772   * )   ac_file_in=$ac_file.in ;;
21773   esac
21774
21775   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21776   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21777          X"$ac_file" : 'X\(//\)[^/]' \| \
21778          X"$ac_file" : 'X\(//\)$' \| \
21779          X"$ac_file" : 'X\(/\)' \| \
21780          .     : '\(.\)' 2>/dev/null ||
21781 echo X"$ac_file" |
21782     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21783           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21784           /^X\(\/\/\)$/{ s//\1/; q; }
21785           /^X\(\/\).*/{ s//\1/; q; }
21786           s/.*/./; q'`
21787   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21788     { case "$ac_dir" in
21789   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21790   *)                      as_incr_dir=.;;
21791 esac
21792 as_dummy="$ac_dir"
21793 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21794   case $as_mkdir_dir in
21795     # Skip DOS drivespec
21796     ?:) as_incr_dir=$as_mkdir_dir ;;
21797     *)
21798       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21799       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21800     ;;
21801   esac
21802 done; }
21803
21804     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21805     # A "../" for each directory in $ac_dir_suffix.
21806     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21807   else
21808     ac_dir_suffix= ac_dots=
21809   fi
21810
21811   case $srcdir in
21812   .)  ac_srcdir=.
21813       if test -z "$ac_dots"; then
21814          ac_top_srcdir=.
21815       else
21816          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21817       fi ;;
21818   [\\/]* | ?:[\\/]* )
21819       ac_srcdir=$srcdir$ac_dir_suffix;
21820       ac_top_srcdir=$srcdir ;;
21821   *) # Relative path.
21822     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21823     ac_top_srcdir=$ac_dots$srcdir ;;
21824   esac
21825
21826   case $INSTALL in
21827   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21828   *) ac_INSTALL=$ac_dots$INSTALL ;;
21829   esac
21830
21831   if test x"$ac_file" != x-; then
21832     { echo "$as_me:21832: creating $ac_file" >&5
21833 echo "$as_me: creating $ac_file" >&6;}
21834     rm -f "$ac_file"
21835   fi
21836   # Let's still pretend it is `configure' which instantiates (i.e., don't
21837   # use $as_me), people would be surprised to read:
21838   #    /* config.h.  Generated automatically by config.status.  */
21839   configure_input="Generated automatically from `echo $ac_file_in |
21840                                                  sed 's,.*/,,'` by configure."
21841
21842   # First look for the input files in the build tree, otherwise in the
21843   # src tree.
21844   ac_file_inputs=`IFS=:
21845     for f in $ac_file_in; do
21846       case $f in
21847       -) echo $tmp/stdin ;;
21848       [\\/$]*)
21849          # Absolute (can't be DOS-style, as IFS=:)
21850          test -f "$f" || { { echo "$as_me:21850: error: cannot find input file: $f" >&5
21851 echo "$as_me: error: cannot find input file: $f" >&2;}
21852    { (exit 1); exit 1; }; }
21853          echo $f;;
21854       *) # Relative
21855          if test -f "$f"; then
21856            # Build tree
21857            echo $f
21858          elif test -f "$srcdir/$f"; then
21859            # Source tree
21860            echo $srcdir/$f
21861          else
21862            # /dev/null tree
21863            { { echo "$as_me:21863: error: cannot find input file: $f" >&5
21864 echo "$as_me: error: cannot find input file: $f" >&2;}
21865    { (exit 1); exit 1; }; }
21866          fi;;
21867       esac
21868     done` || { (exit 1); exit 1; }
21869 EOF
21870 cat >>$CONFIG_STATUS <<\EOF
21871   ac_warn_datarootdir=no
21872   if test x"$ac_file" != x-; then
21873     for ac_item in $ac_file_inputs
21874     do
21875       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21876       if test -n "$ac_seen"; then
21877         ac_used=`grep '@datarootdir@' $ac_item`
21878         if test -z "$ac_used"; then
21879           { echo "$as_me:21879: WARNING: datarootdir was used implicitly but not set:
21880 $ac_seen" >&5
21881 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21882 $ac_seen" >&2;}
21883           ac_warn_datarootdir=yes
21884         fi
21885       fi
21886       ac_seen=`grep '${datarootdir}' $ac_item`
21887       if test -n "$ac_seen"; then
21888         { echo "$as_me:21888: WARNING: datarootdir was used explicitly but not set:
21889 $ac_seen" >&5
21890 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21891 $ac_seen" >&2;}
21892         ac_warn_datarootdir=yes
21893       fi
21894     done
21895   fi
21896
21897 if test "x$ac_warn_datarootdir" = xyes; then
21898   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21899 fi
21900
21901 EOF
21902 cat >>$CONFIG_STATUS <<EOF
21903   sed "$ac_vpsub
21904 $extrasub
21905 EOF
21906 cat >>$CONFIG_STATUS <<\EOF
21907 :t
21908 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21909 s,@configure_input@,$configure_input,;t t
21910 s,@srcdir@,$ac_srcdir,;t t
21911 s,@top_srcdir@,$ac_top_srcdir,;t t
21912 s,@INSTALL@,$ac_INSTALL,;t t
21913 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21914   rm -f $tmp/stdin
21915   if test x"$ac_file" != x-; then
21916     cp $tmp/out $ac_file
21917
21918     for ac_name in prefix exec_prefix datarootdir
21919     do
21920         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21921         if test -n "$ac_seen"; then
21922             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21923             if test -z "$ac_init"; then
21924               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21925               { echo "$as_me:21925: WARNING: Variable $ac_name is used but was not set:
21926 $ac_seen" >&5
21927 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21928 $ac_seen" >&2;}
21929             fi
21930         fi
21931     done
21932     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21933     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21934     if test -s $tmp/out; then
21935       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21936       { echo "$as_me:21936: WARNING: Some variables may not be substituted:
21937 $ac_seen" >&5
21938 echo "$as_me: WARNING: Some variables may not be substituted:
21939 $ac_seen" >&2;}
21940     fi
21941   else
21942     cat $tmp/out
21943   fi
21944   rm -f $tmp/out
21945
21946 done
21947 EOF
21948 cat >>$CONFIG_STATUS <<\EOF
21949
21950 #
21951 # CONFIG_HEADER section.
21952 #
21953
21954 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21955 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21956 #
21957 # ac_d sets the value in "#define NAME VALUE" lines.
21958 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21959 ac_dB='[        ].*$,\1#\2'
21960 ac_dC=' '
21961 ac_dD=',;t'
21962 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21963 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21964 ac_iB='\([      ]\),\1#\2define\3'
21965 ac_iC=' '
21966 ac_iD='\4,;t'
21967 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21968 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21969 ac_uB='$,\1#\2define\3'
21970 ac_uC=' '
21971 ac_uD=',;t'
21972
21973 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21974   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21975   case $ac_file in
21976   - | *:- | *:-:* ) # input from stdin
21977         cat >$tmp/stdin
21978         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21979         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21980   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21981         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21982   * )   ac_file_in=$ac_file.in ;;
21983   esac
21984
21985   test x"$ac_file" != x- && { echo "$as_me:21985: creating $ac_file" >&5
21986 echo "$as_me: creating $ac_file" >&6;}
21987
21988   # First look for the input files in the build tree, otherwise in the
21989   # src tree.
21990   ac_file_inputs=`IFS=:
21991     for f in $ac_file_in; do
21992       case $f in
21993       -) echo $tmp/stdin ;;
21994       [\\/$]*)
21995          # Absolute (can't be DOS-style, as IFS=:)
21996          test -f "$f" || { { echo "$as_me:21996: error: cannot find input file: $f" >&5
21997 echo "$as_me: error: cannot find input file: $f" >&2;}
21998    { (exit 1); exit 1; }; }
21999          echo $f;;
22000       *) # Relative
22001          if test -f "$f"; then
22002            # Build tree
22003            echo $f
22004          elif test -f "$srcdir/$f"; then
22005            # Source tree
22006            echo $srcdir/$f
22007          else
22008            # /dev/null tree
22009            { { echo "$as_me:22009: error: cannot find input file: $f" >&5
22010 echo "$as_me: error: cannot find input file: $f" >&2;}
22011    { (exit 1); exit 1; }; }
22012          fi;;
22013       esac
22014     done` || { (exit 1); exit 1; }
22015   # Remove the trailing spaces.
22016   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
22017
22018 EOF
22019
22020 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
22021 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
22022 # be either 'cat' or 'sort'.
22023 cat confdefs.h | uniq >conftest.vals
22024
22025 # Break up conftest.vals because some shells have a limit on
22026 # the size of here documents, and old seds have small limits too.
22027
22028 rm -f conftest.tail
22029 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
22030 while grep . conftest.vals >/dev/null
22031 do
22032   # Write chunks of a limited-size here document to conftest.frag.
22033   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22034   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22035   echo 'CEOF' >> $CONFIG_STATUS
22036   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22037   rm -f conftest.vals
22038   mv conftest.tail conftest.vals
22039 done
22040 rm -f conftest.vals
22041
22042 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
22043 # marker @DEFS@.
22044 echo '  cat >> conftest.edit <<CEOF
22045 /@DEFS@/r conftest.frag
22046 /@DEFS@/d
22047 CEOF
22048 sed -f conftest.edit $tmp/in > $tmp/out
22049 rm -f $tmp/in
22050 mv $tmp/out $tmp/in
22051 rm -f conftest.edit conftest.frag
22052 ' >> $CONFIG_STATUS
22053
22054 cat >>$CONFIG_STATUS <<\EOF
22055   # Let's still pretend it is `configure' which instantiates (i.e., don't
22056   # use $as_me), people would be surprised to read:
22057   #    /* config.h.  Generated automatically by config.status.  */
22058   if test x"$ac_file" = x-; then
22059     echo "/* Generated automatically by configure.  */" >$tmp/config.h
22060   else
22061     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22062   fi
22063   cat $tmp/in >>$tmp/config.h
22064   rm -f $tmp/in
22065   if test x"$ac_file" != x-; then
22066     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22067       { echo "$as_me:22067: $ac_file is unchanged" >&5
22068 echo "$as_me: $ac_file is unchanged" >&6;}
22069     else
22070       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22071          X"$ac_file" : 'X\(//\)[^/]' \| \
22072          X"$ac_file" : 'X\(//\)$' \| \
22073          X"$ac_file" : 'X\(/\)' \| \
22074          .     : '\(.\)' 2>/dev/null ||
22075 echo X"$ac_file" |
22076     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22077           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22078           /^X\(\/\/\)$/{ s//\1/; q; }
22079           /^X\(\/\).*/{ s//\1/; q; }
22080           s/.*/./; q'`
22081       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22082         { case "$ac_dir" in
22083   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22084   *)                      as_incr_dir=.;;
22085 esac
22086 as_dummy="$ac_dir"
22087 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22088   case $as_mkdir_dir in
22089     # Skip DOS drivespec
22090     ?:) as_incr_dir=$as_mkdir_dir ;;
22091     *)
22092       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22093       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22094     ;;
22095   esac
22096 done; }
22097
22098       fi
22099       rm -f $ac_file
22100       mv $tmp/config.h $ac_file
22101     fi
22102   else
22103     cat $tmp/config.h
22104     rm -f $tmp/config.h
22105   fi
22106 done
22107 EOF
22108 cat >>$CONFIG_STATUS <<\EOF
22109 #
22110 # CONFIG_COMMANDS section.
22111 #
22112 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22113   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22114   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22115
22116   case $ac_dest in
22117     default )
22118 if test "x$cf_with_tests" != xno ; then
22119
22120 for cf_dir in test
22121 do
22122         if test ! -d $srcdir/$cf_dir; then
22123                 continue
22124         elif test -f $srcdir/$cf_dir/programs; then
22125                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22126         fi
22127 done
22128
22129 fi
22130
22131 cf_prefix=$LIB_PREFIX
22132
22133 case $cf_cv_shlib_version in #(vi
22134 cygdll|msysdll|mingw)
22135         TINFO_NAME=$TINFO_ARG_SUFFIX
22136         TINFO_SUFFIX=.dll
22137         ;;
22138 esac
22139
22140 if test -n "$TINFO_SUFFIX" ; then
22141         case $TINFO_SUFFIX in
22142         tw*)
22143                 TINFO_NAME="${TINFO_NAME}tw"
22144                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22145                 ;;
22146         t*)
22147                 TINFO_NAME="${TINFO_NAME}t"
22148                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22149                 ;;
22150         w*)
22151                 TINFO_NAME="${TINFO_NAME}w"
22152                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22153                 ;;
22154         esac
22155 fi
22156
22157 for cf_dir in $SRC_SUBDIRS
22158 do
22159         if test ! -d $srcdir/$cf_dir ; then
22160                 continue
22161         elif test -f $srcdir/$cf_dir/modules; then
22162
22163                 SHARED_LIB=
22164                 Libs_To_Make=
22165                 for cf_item in $cf_LIST_MODELS
22166                 do
22167
22168         case X$cf_item in #(vi
22169         Xlibtool) #(vi
22170                 cf_suffix='.la'
22171                 cf_depsuf=$cf_suffix
22172                 ;;
22173         Xdebug) #(vi
22174                 cf_suffix='_g.a'
22175                 cf_depsuf=$cf_suffix
22176                 ;;
22177         Xprofile) #(vi
22178                 cf_suffix='_p.a'
22179                 cf_depsuf=$cf_suffix
22180                 ;;
22181         Xshared) #(vi
22182                 case $cf_cv_system_name in
22183                 aix[5-7]*) #(vi
22184                         cf_suffix='.a'
22185                         cf_depsuf=$cf_suffix
22186                         ;;
22187                 cygwin*|msys*|mingw*) #(vi
22188                         cf_suffix='.dll'
22189                         cf_depsuf='.dll.a'
22190                         ;;
22191                 darwin*) #(vi
22192                         cf_suffix='.dylib'
22193                         cf_depsuf=$cf_suffix
22194                         ;;
22195                 hpux*) #(vi
22196                         case $target in
22197                         ia64*) #(vi
22198                                 cf_suffix='.so'
22199                                 cf_depsuf=$cf_suffix
22200                                 ;;
22201                         *) #(vi
22202                                 cf_suffix='.sl'
22203                                 cf_depsuf=$cf_suffix
22204                                 ;;
22205                         esac
22206                         ;;
22207                 *) #(vi
22208                         cf_suffix='.so'
22209                         cf_depsuf=$cf_suffix
22210                         ;;
22211                 esac
22212                 ;;
22213         *)
22214                 cf_suffix='.a'
22215                 cf_depsuf=$cf_suffix
22216                 ;;
22217         esac
22218         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22219         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22220
22221                         cf_libname=$cf_dir
22222                         test "$cf_dir" = c++ && cf_libname=ncurses++
22223                         if test $cf_item = shared ; then
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                                 if test "$cf_cv_do_symlinks" = yes ; then
22231                                         cf_version_name=
22232
22233                                         case "$cf_cv_shlib_version" in #(vi
22234                                         rel) #(vi
22235                                                 cf_version_name=REL_VERSION
22236                                                 ;;
22237                                         abi)
22238                                                 cf_version_name=ABI_VERSION
22239                                                 ;;
22240                                         esac
22241
22242                                         if test -n "$cf_version_name"
22243                                         then
22244                                                 case "$cf_cv_system_name" in #(vi
22245                                                 darwin*)
22246                                                         # "w", etc?
22247                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
22248                                                         ;; #(vi
22249                                                 *)
22250                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
22251                                                         ;;
22252                                                 esac
22253                                         fi
22254                                         if test -n "${LIB_SUFFIX}"
22255                                         then
22256                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22257                                         else
22258                                                 cf_shared_suffix="$cf_suffix"
22259                                         fi
22260                                 fi
22261                                 # cygwin needs import library, and has unique naming convention
22262                                 # use autodetected ${cf_prefix} for import lib and static lib, but
22263                                 # use 'cyg' prefix for shared lib.
22264                                 case $cf_cv_shlib_version in #(vi
22265                                 cygdll) #(vi
22266                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22267                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
22268                                         continue
22269                                         ;;
22270                                 msysdll) #(vi
22271                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22272                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
22273                                         continue
22274                                         ;;
22275                                 mingw)
22276                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22277                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
22278                                         continue
22279                                         ;;
22280                                 esac
22281                         fi
22282                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
22283                 done
22284
22285                 if test $cf_dir = ncurses ; then
22286                         cf_subsets="$LIB_SUBSETS"
22287                         cf_r_parts="$cf_subsets"
22288                         cf_liblist="$Libs_To_Make"
22289
22290                         while test -n "$cf_r_parts"
22291                         do
22292                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
22293                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
22294                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
22295                                         cf_item=
22296                                         case $cf_l_parts in #(vi
22297                                         *termlib*) #(vi
22298                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
22299                                                 ;;
22300                                         *ticlib*)
22301                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
22302                                                 ;;
22303                                         *)
22304                                                 break
22305                                                 ;;
22306                                         esac
22307                                         if test -n "$cf_item"; then
22308                                                 Libs_To_Make="$cf_item $Libs_To_Make"
22309                                         fi
22310                                 else
22311                                         break
22312                                 fi
22313                         done
22314                 else
22315                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
22316                 fi
22317
22318                 if test $cf_dir = c++; then
22319                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
22320                                 cf_list=
22321                                 for cf_item in $Libs_To_Make
22322                                 do
22323                                         case $cf_item in
22324                                         *.a)
22325                                                 ;;
22326                                         *)
22327                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
22328                                                 ;;
22329                                         esac
22330                                         for cf_test in $cf_list
22331                                         do
22332                                                 if test "$cf_test" = "$cf_item"
22333                                                 then
22334                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
22335                                                         cf_item=
22336                                                         break
22337                                                 fi
22338                                         done
22339                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
22340                                 done
22341                                 Libs_To_Make="$cf_list"
22342                         fi
22343                 fi
22344
22345                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
22346                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
22347                         $cf_dir/Makefile >$cf_dir/Makefile.out
22348                 mv $cf_dir/Makefile.out $cf_dir/Makefile
22349
22350                 $AWK -f $srcdir/mk-0th.awk \
22351                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
22352                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22353
22354                 for cf_subset in $cf_subsets
22355                 do
22356                         cf_subdirs=
22357                         for cf_item in $cf_LIST_MODELS
22358                         do
22359
22360                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
22361
22362 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22363
22364                         CXX_MODEL=$cf_ITEM
22365                         if test "$CXX_MODEL" = SHARED; then
22366                                 case $cf_cv_shlib_version in #(vi
22367                                 cygdll|msysdll|mingw) #(vi
22368                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
22369
22370 echo "${as_me:-configure}:22370: testing overriding CXX_MODEL to SHARED ..." 1>&5
22371
22372                                         with_shared_cxx=yes
22373                                         ;;
22374                                 *)
22375                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
22376                                         ;;
22377                                 esac
22378                         fi
22379
22380         case X$cf_item in #(vi
22381         Xlibtool) #(vi
22382                 cf_suffix='.la'
22383                 cf_depsuf=$cf_suffix
22384                 ;;
22385         Xdebug) #(vi
22386                 cf_suffix='_g.a'
22387                 cf_depsuf=$cf_suffix
22388                 ;;
22389         Xprofile) #(vi
22390                 cf_suffix='_p.a'
22391                 cf_depsuf=$cf_suffix
22392                 ;;
22393         Xshared) #(vi
22394                 case $cf_cv_system_name in
22395                 aix[5-7]*) #(vi
22396                         cf_suffix='.a'
22397                         cf_depsuf=$cf_suffix
22398                         ;;
22399                 cygwin*|msys*|mingw*) #(vi
22400                         cf_suffix='.dll'
22401                         cf_depsuf='.dll.a'
22402                         ;;
22403                 darwin*) #(vi
22404                         cf_suffix='.dylib'
22405                         cf_depsuf=$cf_suffix
22406                         ;;
22407                 hpux*) #(vi
22408                         case $target in
22409                         ia64*) #(vi
22410                                 cf_suffix='.so'
22411                                 cf_depsuf=$cf_suffix
22412                                 ;;
22413                         *) #(vi
22414                                 cf_suffix='.sl'
22415                                 cf_depsuf=$cf_suffix
22416                                 ;;
22417                         esac
22418                         ;;
22419                 *) #(vi
22420                         cf_suffix='.so'
22421                         cf_depsuf=$cf_suffix
22422                         ;;
22423                 esac
22424                 ;;
22425         *)
22426                 cf_suffix='.a'
22427                 cf_depsuf=$cf_suffix
22428                 ;;
22429         esac
22430         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22431         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22432
22433         case $cf_item in
22434         libtool) cf_subdir='obj_lo'  ;;
22435         normal)  cf_subdir='objects' ;;
22436         debug)   cf_subdir='obj_g' ;;
22437         profile) cf_subdir='obj_p' ;;
22438         shared)
22439                 case $cf_cv_system_name in #(vi
22440                 cygwin|msys) #(vi
22441                         cf_subdir='objects' ;;
22442                 *)
22443                         cf_subdir='obj_s' ;;
22444                 esac
22445         esac
22446
22447                         # Test for case where we build libtinfo with a different name.
22448                         cf_libname=$cf_dir
22449                         if test $cf_dir = ncurses ; then
22450                                 case $cf_subset in
22451                                 *base*)
22452                                         cf_libname=${cf_libname}$LIB_SUFFIX
22453                                         ;;
22454                                 *termlib*)
22455                                         cf_libname=$TINFO_LIB_SUFFIX
22456                                         ;;
22457                                 ticlib*)
22458                                         cf_libname=$TICS_LIB_SUFFIX
22459                                         ;;
22460                                 esac
22461                         elif test $cf_dir = c++ ; then
22462                                 cf_libname=ncurses++$LIB_SUFFIX
22463                         else
22464                                 cf_libname=${cf_libname}$LIB_SUFFIX
22465                         fi
22466                         if test -n "${DFT_ARG_SUFFIX}" ; then
22467                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
22468                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
22469                         fi
22470
22471                         # These dependencies really are for development, not
22472                         # builds, but they are useful in porting, too.
22473                         cf_depend="../include/ncurses_cfg.h"
22474                         if test "$srcdir" = "."; then
22475                                 cf_reldir="."
22476                         else
22477                                 cf_reldir="\${srcdir}"
22478                         fi
22479
22480                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
22481                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
22482                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
22483                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
22484                         fi
22485
22486                         cf_dir_suffix=
22487                         old_cf_suffix="$cf_suffix"
22488                         if test "$cf_cv_shlib_version_infix" = yes ; then
22489                         if test -n "$LIB_SUFFIX" ; then
22490                                 case $LIB_SUFFIX in
22491                                 tw*)
22492                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
22493                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
22494                                         cf_dir_suffix=tw
22495                                         ;;
22496                                 t*)
22497                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
22498                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
22499                                         cf_dir_suffix=t
22500                                         ;;
22501                                 w*)
22502                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
22503                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
22504                                         cf_dir_suffix=w
22505                                         ;;
22506                                 esac
22507                         fi
22508                         fi
22509
22510                         $AWK -f $srcdir/mk-1st.awk \
22511                                 name=${cf_libname}${cf_dir_suffix} \
22512                                 traces=$LIB_TRACING \
22513                                 MODEL=$cf_ITEM \
22514                                 CXX_MODEL=$CXX_MODEL \
22515                                 model=$cf_subdir \
22516                                 prefix=$cf_prefix \
22517                                 suffix=$cf_suffix \
22518                                 subset=$cf_subset \
22519                                 driver=$cf_cv_term_driver \
22520                                 SymLink="$LN_S" \
22521                                 TermlibRoot=$TINFO_NAME \
22522                                 TermlibSuffix=$TINFO_SUFFIX \
22523                                 ShlibVer=$cf_cv_shlib_version \
22524                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
22525                                 ReLink=${cf_cv_do_relink:-no} \
22526                                 DoLinks=$cf_cv_do_symlinks \
22527                                 rmSoLocs=$cf_cv_rm_so_locs \
22528                                 ldconfig="$LDCONFIG" \
22529                                 overwrite=$WITH_OVERWRITE \
22530                                 depend="$cf_depend" \
22531                                 host="$host" \
22532                                 libtool_version="$LIBTOOL_VERSION" \
22533                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22534
22535                         cf_suffix="$old_cf_suffix"
22536
22537                         for cf_subdir2 in $cf_subdirs lib
22538                         do
22539                                 test $cf_subdir = $cf_subdir2 && break
22540                         done
22541                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
22542                         $AWK -f $srcdir/mk-2nd.awk \
22543                                 name=$cf_dir \
22544                                 traces=$LIB_TRACING \
22545                                 MODEL=$cf_ITEM \
22546                                 model=$cf_subdir \
22547                                 subset=$cf_subset \
22548                                 srcdir=$srcdir \
22549                                 echo=$WITH_ECHO \
22550                                 crenames=$cf_cv_prog_CC_c_o \
22551                                 cxxrenames=$cf_cv_prog_CXX_c_o \
22552                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
22553                         cf_subdirs="$cf_subdirs $cf_subdir"
22554                         done
22555                 done
22556         fi
22557
22558         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
22559 done
22560
22561 for cf_dir in $SRC_SUBDIRS
22562 do
22563         if test ! -d $srcdir/$cf_dir ; then
22564                 continue
22565         fi
22566
22567         if test -f $cf_dir/Makefile ; then
22568                 case "$cf_dir" in
22569                 Ada95) #(vi
22570                         echo 'libs \' >> Makefile
22571                         echo 'install.libs \' >> Makefile
22572                         echo 'uninstall.libs ::' >> Makefile
22573                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22574                         ;;
22575                 esac
22576         fi
22577
22578         if test -f $srcdir/$cf_dir/modules; then
22579                 echo >> Makefile
22580                 if test -f $srcdir/$cf_dir/headers; then
22581 cat >> Makefile <<CF_EOF
22582 install.includes \\
22583 uninstall.includes \\
22584 CF_EOF
22585                 fi
22586 if test "$cf_dir" != "c++" ; then
22587 echo 'lint \' >> Makefile
22588 fi
22589 cat >> Makefile <<CF_EOF
22590 libs \\
22591 lintlib \\
22592 install.libs \\
22593 uninstall.libs \\
22594 install.$cf_dir \\
22595 uninstall.$cf_dir ::
22596         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22597 CF_EOF
22598         elif test -f $srcdir/$cf_dir/headers; then
22599 cat >> Makefile <<CF_EOF
22600
22601 libs \\
22602 install.libs \\
22603 uninstall.libs \\
22604 install.includes \\
22605 uninstall.includes ::
22606         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22607 CF_EOF
22608 fi
22609 done
22610
22611 if test "x$cf_with_db_install" = xyes; then
22612 cat >> Makefile <<CF_EOF
22613
22614 install.libs uninstall.libs \\
22615 install.data uninstall.data ::
22616 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22617 CF_EOF
22618 fi
22619
22620 if test "x$cf_with_manpages" = xyes; then
22621 cat >> Makefile <<CF_EOF
22622
22623 install.man \\
22624 uninstall.man ::
22625         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22626 CF_EOF
22627 fi
22628
22629 cat >> Makefile <<CF_EOF
22630
22631 distclean ::
22632         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22633         rm -f headers.sh headers.sed mk_shared_lib.sh
22634         rm -f edit_man.* man_alias.*
22635         rm -rf \${DIRS_TO_MAKE}
22636 CF_EOF
22637
22638 # Special case: tack's manpage lives in its own directory.
22639 if test "x$cf_with_manpages" = xyes; then
22640 if test -d tack ; then
22641 if test -f $srcdir/$tack.h; then
22642 cat >> Makefile <<CF_EOF
22643
22644 install.man \\
22645 uninstall.man ::
22646         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22647 CF_EOF
22648 fi
22649 fi
22650 fi
22651
22652 rm -f headers.sed headers.sh
22653
22654 echo creating headers.sh
22655 cat >headers.sh <<CF_EOF
22656 #! /bin/sh
22657 # This shell script is generated by the 'configure' script.  It is invoked in a
22658 # subdirectory of the build tree.  It generates a sed-script in the parent
22659 # directory that is used to adjust includes for header files that reside in a
22660 # subdirectory of /usr/include, etc.
22661 PRG=""
22662 while test \$# != 3
22663 do
22664 PRG="\$PRG \$1"; shift
22665 done
22666 DST=\$1
22667 REF=\$2
22668 SRC=\$3
22669 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22670 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22671 echo installing \$SRC in \$DST
22672 CF_EOF
22673
22674 if test $WITH_CURSES_H = yes; then
22675         cat >>headers.sh <<CF_EOF
22676 case \$DST in
22677 /*/include/*)
22678         END=\`basename \$DST\`
22679         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22680         do
22681                 NAME=\`basename \$i\`
22682                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22683         done
22684         ;;
22685 *)
22686         echo "" >> \$TMPSED
22687         ;;
22688 esac
22689 CF_EOF
22690
22691 else
22692         cat >>headers.sh <<CF_EOF
22693 case \$DST in
22694 /*/include/*)
22695         END=\`basename \$DST\`
22696         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22697         do
22698                 NAME=\`basename \$i\`
22699                 if test "\$NAME" = "curses.h"
22700                 then
22701                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22702                         NAME=ncurses.h
22703                 fi
22704                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22705         done
22706         ;;
22707 *)
22708         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22709         ;;
22710 esac
22711 CF_EOF
22712 fi
22713 cat >>headers.sh <<CF_EOF
22714 rm -f \$TMPSRC
22715 sed -f \$TMPSED \$SRC > \$TMPSRC
22716 NAME=\`basename \$SRC\`
22717 CF_EOF
22718 if test $WITH_CURSES_H != yes; then
22719         cat >>headers.sh <<CF_EOF
22720 test "\$NAME" = "curses.h" && NAME=ncurses.h
22721 CF_EOF
22722 fi
22723 cat >>headers.sh <<CF_EOF
22724 # Just in case someone gzip'd manpages, remove the conflicting copy.
22725 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22726
22727 eval \$PRG \$TMPSRC \$DST/\$NAME
22728 rm -f \$TMPSRC \$TMPSED
22729 CF_EOF
22730
22731 chmod 0755 headers.sh
22732
22733 for cf_dir in $SRC_SUBDIRS
22734 do
22735         if test ! -d $srcdir/$cf_dir ; then
22736                 continue
22737         fi
22738
22739         if test -f $srcdir/$cf_dir/headers; then
22740                 $AWK -f $srcdir/mk-hdr.awk \
22741                         subset="$LIB_SUBSETS" \
22742                         compat="$WITH_CURSES_H" \
22743                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22744         fi
22745
22746         if test -f $srcdir/$cf_dir/modules; then
22747                 if test "$cf_dir" != "c++" ; then
22748                         cat >>$cf_dir/Makefile <<"CF_EOF"
22749 depend : ${AUTO_SRC}
22750         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22751
22752 # DO NOT DELETE THIS LINE -- make depend depends on it.
22753 CF_EOF
22754                 fi
22755         fi
22756 done
22757
22758 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22759 if test -z "$USE_OLD_MAKERULES" ; then
22760         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22761 fi
22762 fi
22763  ;;
22764   esac
22765 done
22766 EOF
22767
22768 cat >>$CONFIG_STATUS <<\EOF
22769
22770 { (exit 0); exit 0; }
22771 EOF
22772 chmod +x $CONFIG_STATUS
22773 ac_clean_files=$ac_clean_files_save
22774
22775 # configure is writing to config.log, and then calls config.status.
22776 # config.status does its own redirection, appending to config.log.
22777 # Unfortunately, on DOS this fails, as config.log is still kept open
22778 # by configure, so config.status won't be able to write to it; its
22779 # output is simply discarded.  So we exec the FD to /dev/null,
22780 # effectively closing config.log, so it can be properly (re)opened and
22781 # appended to by config.status.  When coming back to configure, we
22782 # need to make the FD available again.
22783 if test "$no_create" != yes; then
22784   ac_cs_success=:
22785   exec 5>/dev/null
22786   $SHELL $CONFIG_STATUS || ac_cs_success=false
22787   exec 5>>config.log
22788   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22789   # would make configure fail if this is the last instruction.
22790   $ac_cs_success || { (exit 1); exit 1; }
22791 fi
22792 ${MAKE:-make} preinstall