]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20140809
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.583 .
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-lib-suffixes  disable library suffixes
744   --disable-rpath-hack    don't add rpath options for additional libraries
745 Fine-Tuning Your Configuration:
746   --disable-overwrite     leave out the link to -lcurses
747   --disable-database      do not use terminfo, only fallbacks/termcap
748   --with-database=XXX     specify terminfo source to install
749   --with-hashed-db        specify hashed-database library
750   --with-fallbacks=XXX    specify list of fallback terminal descriptions
751   --without-xterm-new     specify if xterm terminfo should be old version
752   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
753   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
754   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
755   --disable-big-core      assume machine has little memory
756   --disable-big-strings   assume compiler has only standard-size strings
757   --enable-termcap        compile in termcap fallback support
758   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
759   --enable-getcap         fast termcap load, no xrefs to terminfo
760   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
761   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
762   --disable-root-environ  restrict environment when running as root
763   --enable-symlinks       make tic use symbolic links not hard links
764   --enable-broken_linker  compile with broken-linker support code
765   --enable-bsdpad         recognize BSD-style prefix padding
766   --enable-widec          compile with wide-char/UTF-8 code
767   --disable-lp64          allow chtype to be long (ignore _LP64)
768   --disable-largefile     omit support for large files
769   --disable-tparm-varargs compile tparm() without varargs interface
770   --disable-tic-depends   link tic library without explicit dependency on ncurses library
771   --with-bool=TYPE        override fallback type of bool variable
772   --with-caps=alt         compile with alternate Caps file
773   --with-chtype=TYPE      override type of chtype
774   --with-ospeed=TYPE      override type of ospeed variable
775   --with-mmask-t=TYPE     override type of mmask_t
776   --with-ccharw-max=XXX   override size CCHARW_MAX
777   --with-tparm-arg=TYPE   override parameter type of tparm
778   --with-rcs-ids          compile-in RCS identifiers
779 Options to Specify How Manpages are Installed:
780   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
781                           optionally formatted/catonly, e.g., gzip,formatted
782   --with-manpage-renames  specify manpage-renaming
783   --with-manpage-aliases  specify manpage-aliases using .so
784   --with-manpage-symlinks specify manpage-aliases using symlinks
785   --with-manpage-tbl      specify manpage processing with tbl
786 Extensions:
787   --disable-ext-funcs     disable function-extensions
788   --enable-sp-funcs       enable experimental SCREEN-extensions
789   --enable-term-driver    enable experimental terminal-driver
790   --enable-const          compile with extra/non-standard const
791   --enable-ext-colors     compile for 256-color support
792   --enable-ext-mouse      compile for extended mouse-encoding
793   --enable-no-padding     compile with $NCURSES_NO_PADDING code
794   --enable-signed-char    compile using signed Boolean's in term.h
795   --enable-sigwinch       compile with SIGWINCH handler
796   --enable-tcap-names     compile with user-definable terminal capabilities
797 Development Code:
798   --without-develop       disable development options
799   --enable-hard-tabs      compile with hard-tabs code
800   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
801 Experimental Code:
802   --disable-assumed-color do not assume anything about default-colors
803   --disable-hashmap       compile without hashmap scrolling-optimization
804   --enable-colorfgbg      compile-in experimental $COLORFGBG code
805   --enable-interop        compile-in experimental interop bindings
806   --with-pthread          use POSIX thread library
807   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
808   --enable-weak-symbols   enable weak-symbols for pthreads
809   --enable-reentrant      compile with experimental reentrant code
810   --with-wrap-prefix=XXX  override prefix used for public variables
811   --enable-safe-sprintf   compile with experimental safe-sprintf code
812   --disable-scroll-hints  compile without scroll-hints code
813   --enable-wgetch-events  compile with experimental wgetch-events code
814 Testing/development Options:
815   --disable-echo          do not display "compiling" commands
816   --enable-warnings       build: turn on GCC compiler warnings
817   --enable-string-hacks   work around bogus compiler/loader warnings
818   --enable-assertions     test: turn on generation of assertion code
819   --with-dmalloc          test: use Gray Watson's dmalloc library
820   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
821   --with-valgrind         test: use valgrind
822   --disable-leaks         test: free permanent memory, analyze leaks
823   --enable-expanded       test: generate functions for certain macros
824   --disable-macros        test: use functions rather than macros
825   --with-trace            test: add trace() function to all models of ncurses
826   --disable-gnat-projects test: disable GNAT projects even if usable
827 Ada95 Binding Options:
828   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
829   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
830   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
831   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
832
833 Some influential environment variables:
834   CC          C compiler command
835   CFLAGS      C compiler flags
836   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
837               nonstandard directory <lib dir>
838   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
839               headers in a nonstandard directory <include dir>
840   CPP         C preprocessor
841   CXX         C++ compiler command
842   CXXFLAGS    C++ compiler flags
843   CXXCPP      C++ preprocessor
844
845 Use these variables to override the choices made by `configure' or to help
846 it to find libraries and programs with nonstandard names/locations.
847
848 EOF
849 fi
850
851 if test "$ac_init_help" = "recursive"; then
852   # If there are subdirs, report their specific --help.
853   ac_popdir=`pwd`
854   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
855     cd $ac_subdir
856     # A "../" for each directory in /$ac_subdir.
857     ac_dots=`echo $ac_subdir |
858              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
859
860     case $srcdir in
861     .) # No --srcdir option.  We are building in place.
862       ac_sub_srcdir=$srcdir ;;
863     [\\/]* | ?:[\\/]* ) # Absolute path.
864       ac_sub_srcdir=$srcdir/$ac_subdir ;;
865     *) # Relative path.
866       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
867     esac
868
869     # Check for guested configure; otherwise get Cygnus style configure.
870     if test -f $ac_sub_srcdir/configure.gnu; then
871       echo
872       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
873     elif test -f $ac_sub_srcdir/configure; then
874       echo
875       $SHELL $ac_sub_srcdir/configure  --help=recursive
876     elif test -f $ac_sub_srcdir/configure.ac ||
877            test -f $ac_sub_srcdir/configure.in; then
878       echo
879       $ac_configure --help
880     else
881       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
882     fi
883     cd $ac_popdir
884   done
885 fi
886
887 test -n "$ac_init_help" && exit 0
888 if $ac_init_version; then
889   cat <<\EOF
890
891 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
892 Free Software Foundation, Inc.
893 This configure script is free software; the Free Software Foundation
894 gives unlimited permission to copy, distribute and modify it.
895 EOF
896   exit 0
897 fi
898 exec 5>config.log
899 cat >&5 <<EOF
900 This file contains any messages produced by compilers while
901 running configure, to aid debugging if configure makes a mistake.
902
903 It was created by $as_me, which was
904 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
905
906   $ $0 $@
907
908 EOF
909 {
910 cat <<_ASUNAME
911 ## ---------- ##
912 ## Platform.  ##
913 ## ---------- ##
914
915 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
916 uname -m = `(uname -m) 2>/dev/null || echo unknown`
917 uname -r = `(uname -r) 2>/dev/null || echo unknown`
918 uname -s = `(uname -s) 2>/dev/null || echo unknown`
919 uname -v = `(uname -v) 2>/dev/null || echo unknown`
920
921 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
922 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
923
924 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
925 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
926 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
927 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
928 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
929 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
930 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
931
932 PATH = $PATH
933
934 _ASUNAME
935 } >&5
936
937 cat >&5 <<EOF
938 ## ------------ ##
939 ## Core tests.  ##
940 ## ------------ ##
941
942 EOF
943
944 # Keep a trace of the command line.
945 # Strip out --no-create and --no-recursion so they do not pile up.
946 # Also quote any args containing shell meta-characters.
947 ac_configure_args=
948 ac_sep=
949 for ac_arg
950 do
951   case $ac_arg in
952   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
953   | --no-cr | --no-c) ;;
954   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
955   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
956   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
957     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
958     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
959     ac_sep=" " ;;
960   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
961      ac_sep=" " ;;
962   esac
963   # Get rid of the leading space.
964 done
965
966 # When interrupted or exit'd, cleanup temporary files, and complete
967 # config.log.  We remove comments because anyway the quotes in there
968 # would cause problems or look ugly.
969 trap 'exit_status=$?
970   # Save into config.log some information that might help in debugging.
971   echo >&5
972   echo "## ----------------- ##" >&5
973   echo "## Cache variables.  ##" >&5
974   echo "## ----------------- ##" >&5
975   echo >&5
976   # The following way of writing the cache mishandles newlines in values,
977 {
978   (set) 2>&1 |
979     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
980     *ac_space=\ *)
981       sed -n \
982         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
983           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
984       ;;
985     *)
986       sed -n \
987         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
988       ;;
989     esac;
990 } >&5
991   sed "/^$/d" confdefs.h >conftest.log
992   if test -s conftest.log; then
993     echo >&5
994     echo "## ------------ ##" >&5
995     echo "## confdefs.h.  ##" >&5
996     echo "## ------------ ##" >&5
997     echo >&5
998     cat conftest.log >&5
999   fi
1000   (echo; echo) >&5
1001   test "$ac_signal" != 0 &&
1002     echo "$as_me: caught signal $ac_signal" >&5
1003   echo "$as_me: exit $exit_status" >&5
1004   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1005     exit $exit_status
1006      ' 0
1007 for ac_signal in 1 2 13 15; do
1008   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1009 done
1010 ac_signal=0
1011
1012 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1013 rm -rf conftest* confdefs.h
1014 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1015 echo >confdefs.h
1016
1017 # Let the site file select an alternate cache file if it wants to.
1018 # Prefer explicitly selected file to automatically selected ones.
1019 if test -z "$CONFIG_SITE"; then
1020   if test "x$prefix" != xNONE; then
1021     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1022   else
1023     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1024   fi
1025 fi
1026 for ac_site_file in $CONFIG_SITE; do
1027   if test -r "$ac_site_file"; then
1028     { echo "$as_me:1028: loading site script $ac_site_file" >&5
1029 echo "$as_me: loading site script $ac_site_file" >&6;}
1030     cat "$ac_site_file" >&5
1031     . "$ac_site_file"
1032   fi
1033 done
1034
1035 if test -r "$cache_file"; then
1036   # Some versions of bash will fail to source /dev/null (special
1037   # files actually), so we avoid doing that.
1038   if test -f "$cache_file"; then
1039     { echo "$as_me:1039: loading cache $cache_file" >&5
1040 echo "$as_me: loading cache $cache_file" >&6;}
1041     case $cache_file in
1042       [\\/]* | ?:[\\/]* ) . $cache_file;;
1043       *)                      . ./$cache_file;;
1044     esac
1045   fi
1046 else
1047   { echo "$as_me:1047: creating cache $cache_file" >&5
1048 echo "$as_me: creating cache $cache_file" >&6;}
1049   >$cache_file
1050 fi
1051
1052 # Check that the precious variables saved in the cache have kept the same
1053 # value.
1054 ac_cache_corrupted=false
1055 for ac_var in `(set) 2>&1 |
1056                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1057   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1058   eval ac_new_set=\$ac_env_${ac_var}_set
1059   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1060   eval ac_new_val="\$ac_env_${ac_var}_value"
1061   case $ac_old_set,$ac_new_set in
1062     set,)
1063       { echo "$as_me:1063: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1064 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1065       ac_cache_corrupted=: ;;
1066     ,set)
1067       { echo "$as_me:1067: error: \`$ac_var' was not set in the previous run" >&5
1068 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1069       ac_cache_corrupted=: ;;
1070     ,);;
1071     *)
1072       if test "x$ac_old_val" != "x$ac_new_val"; then
1073         { echo "$as_me:1073: error: \`$ac_var' has changed since the previous run:" >&5
1074 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1075         { echo "$as_me:1075:   former value:  $ac_old_val" >&5
1076 echo "$as_me:   former value:  $ac_old_val" >&2;}
1077         { echo "$as_me:1077:   current value: $ac_new_val" >&5
1078 echo "$as_me:   current value: $ac_new_val" >&2;}
1079         ac_cache_corrupted=:
1080       fi;;
1081   esac
1082   # Pass precious variables to config.status.  It doesn't matter if
1083   # we pass some twice (in addition to the command line arguments).
1084   if test "$ac_new_set" = set; then
1085     case $ac_new_val in
1086     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1087       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1088       ac_configure_args="$ac_configure_args '$ac_arg'"
1089       ;;
1090     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1091        ;;
1092     esac
1093   fi
1094 done
1095 if $ac_cache_corrupted; then
1096   { echo "$as_me:1096: error: changes in the environment can compromise the build" >&5
1097 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1098   { { echo "$as_me:1098: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1099 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1100    { (exit 1); exit 1; }; }
1101 fi
1102
1103 ac_ext=c
1104 ac_cpp='$CPP $CPPFLAGS'
1105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1108 ac_main_return=return
1109
1110 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1111   *c*,-n*) ECHO_N= ECHO_C='
1112 ' ECHO_T='      ' ;;
1113   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1114   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1115 esac
1116 echo "#! $SHELL" >conftest.sh
1117 echo  "exit 0"   >>conftest.sh
1118 chmod +x conftest.sh
1119 if { (echo "$as_me:1119: PATH=\".;.\"; conftest.sh") >&5
1120   (PATH=".;."; conftest.sh) 2>&5
1121   ac_status=$?
1122   echo "$as_me:1122: \$? = $ac_status" >&5
1123   (exit $ac_status); }; then
1124   ac_path_separator=';'
1125 else
1126   ac_path_separator=:
1127 fi
1128 PATH_SEPARATOR="$ac_path_separator"
1129 rm -f conftest.sh
1130
1131 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1132
1133 top_builddir=`pwd`
1134
1135 echo "$as_me:1135: checking for egrep" >&5
1136 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1137 if test "${ac_cv_prog_egrep+set}" = set; then
1138   echo $ECHO_N "(cached) $ECHO_C" >&6
1139 else
1140   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1141     then ac_cv_prog_egrep='grep -E'
1142     else ac_cv_prog_egrep='egrep'
1143     fi
1144 fi
1145 echo "$as_me:1145: result: $ac_cv_prog_egrep" >&5
1146 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1147  EGREP=$ac_cv_prog_egrep
1148
1149 test -z "$EGREP" && { { echo "$as_me:1149: error: No egrep program found" >&5
1150 echo "$as_me: error: No egrep program found" >&2;}
1151    { (exit 1); exit 1; }; }
1152
1153 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1154 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1155 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1156 cf_cv_abi_version=${NCURSES_MAJOR}
1157 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1158 cf_cv_timestamp=`date`
1159 echo "$as_me:1159: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1160 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1161
1162 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1163
1164 # Check whether --with-rel-version or --without-rel-version was given.
1165 if test "${with_rel_version+set}" = set; then
1166   withval="$with_rel_version"
1167   { echo "$as_me:1167: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1168 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1169  cf_cv_rel_version=$withval
1170 fi;
1171
1172  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1173  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1174
1175 if test -n "$NCURSES_MAJOR" ; then
1176   case $NCURSES_MAJOR in #(vi
1177   [0-9]*) #(vi
1178         ;;
1179   *)
1180         { { echo "$as_me:1180: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1181 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1182    { (exit 1); exit 1; }; }
1183         ;;
1184   esac
1185 else
1186   { { echo "$as_me:1186: error: Release major-version value is empty" >&5
1187 echo "$as_me: error: Release major-version value is empty" >&2;}
1188    { (exit 1); exit 1; }; }
1189 fi
1190
1191 if test -n "$NCURSES_MINOR" ; then
1192   case $NCURSES_MINOR in #(vi
1193   [0-9]*) #(vi
1194         ;;
1195   *)
1196         { { echo "$as_me:1196: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1197 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1198    { (exit 1); exit 1; }; }
1199         ;;
1200   esac
1201 else
1202   { { echo "$as_me:1202: error: Release minor-version value is empty" >&5
1203 echo "$as_me: error: Release minor-version value is empty" >&2;}
1204    { (exit 1); exit 1; }; }
1205 fi
1206
1207 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1208
1209 # Check whether --with-abi-version or --without-abi-version was given.
1210 if test "${with_abi_version+set}" = set; then
1211   withval="$with_abi_version"
1212   { echo "$as_me:1212: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1213 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1214  cf_cv_abi_version=$withval
1215 fi;
1216
1217 if test -n "$cf_cv_abi_version" ; then
1218   case $cf_cv_abi_version in #(vi
1219   [0-9]*) #(vi
1220         ;;
1221   *)
1222         { { echo "$as_me:1222: error: ABI version is not a number: $cf_cv_abi_version" >&5
1223 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1224    { (exit 1); exit 1; }; }
1225         ;;
1226   esac
1227 else
1228   { { echo "$as_me:1228: error: ABI version value is empty" >&5
1229 echo "$as_me: error: ABI version value is empty" >&2;}
1230    { (exit 1); exit 1; }; }
1231 fi
1232
1233 ac_aux_dir=
1234 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1235   if test -f $ac_dir/install-sh; then
1236     ac_aux_dir=$ac_dir
1237     ac_install_sh="$ac_aux_dir/install-sh -c"
1238     break
1239   elif test -f $ac_dir/install.sh; then
1240     ac_aux_dir=$ac_dir
1241     ac_install_sh="$ac_aux_dir/install.sh -c"
1242     break
1243   elif test -f $ac_dir/shtool; then
1244     ac_aux_dir=$ac_dir
1245     ac_install_sh="$ac_aux_dir/shtool install -c"
1246     break
1247   fi
1248 done
1249 if test -z "$ac_aux_dir"; then
1250   { { echo "$as_me:1250: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1251 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1252    { (exit 1); exit 1; }; }
1253 fi
1254 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1255 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1256 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1257
1258 # Make sure we can run config.sub.
1259 $ac_config_sub sun4 >/dev/null 2>&1 ||
1260   { { echo "$as_me:1260: error: cannot run $ac_config_sub" >&5
1261 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1262    { (exit 1); exit 1; }; }
1263
1264 echo "$as_me:1264: checking build system type" >&5
1265 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1266 if test "${ac_cv_build+set}" = set; then
1267   echo $ECHO_N "(cached) $ECHO_C" >&6
1268 else
1269   ac_cv_build_alias=$build_alias
1270 test -z "$ac_cv_build_alias" &&
1271   ac_cv_build_alias=`$ac_config_guess`
1272 test -z "$ac_cv_build_alias" &&
1273   { { echo "$as_me:1273: error: cannot guess build type; you must specify one" >&5
1274 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1275    { (exit 1); exit 1; }; }
1276 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1277   { { echo "$as_me:1277: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1278 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1279    { (exit 1); exit 1; }; }
1280
1281 fi
1282 echo "$as_me:1282: result: $ac_cv_build" >&5
1283 echo "${ECHO_T}$ac_cv_build" >&6
1284 build=$ac_cv_build
1285 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1286 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1287 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1288
1289 echo "$as_me:1289: checking host system type" >&5
1290 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1291 if test "${ac_cv_host+set}" = set; then
1292   echo $ECHO_N "(cached) $ECHO_C" >&6
1293 else
1294   ac_cv_host_alias=$host_alias
1295 test -z "$ac_cv_host_alias" &&
1296   ac_cv_host_alias=$ac_cv_build_alias
1297 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1298   { { echo "$as_me:1298: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1299 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1300    { (exit 1); exit 1; }; }
1301
1302 fi
1303 echo "$as_me:1303: result: $ac_cv_host" >&5
1304 echo "${ECHO_T}$ac_cv_host" >&6
1305 host=$ac_cv_host
1306 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1307 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1308 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1309
1310 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1311         echo "$as_me:1311: checking target system type" >&5
1312 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1313 if test "${ac_cv_target+set}" = set; then
1314   echo $ECHO_N "(cached) $ECHO_C" >&6
1315 else
1316   ac_cv_target_alias=$target_alias
1317 test "x$ac_cv_target_alias" = "x" &&
1318   ac_cv_target_alias=$ac_cv_host_alias
1319 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1320   { { echo "$as_me:1320: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1321 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1322    { (exit 1); exit 1; }; }
1323
1324 fi
1325 echo "$as_me:1325: result: $ac_cv_target" >&5
1326 echo "${ECHO_T}$ac_cv_target" >&6
1327 target=$ac_cv_target
1328 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1329 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1330 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1331
1332 # The aliases save the names the user supplied, while $host etc.
1333 # will get canonicalized.
1334 test -n "$target_alias" &&
1335   test "$program_prefix$program_suffix$program_transform_name" = \
1336     NONENONEs,x,x, &&
1337   program_prefix=${target_alias}-
1338         system_name="$host_os"
1339 else
1340         system_name="`(uname -s -r) 2>/dev/null`"
1341         if test -z "$system_name" ; then
1342                 system_name="`(hostname) 2>/dev/null`"
1343         fi
1344 fi
1345 test -n "$system_name" &&
1346 cat >>confdefs.h <<EOF
1347 #define SYSTEM_NAME "$system_name"
1348 EOF
1349
1350 if test "${cf_cv_system_name+set}" = set; then
1351   echo $ECHO_N "(cached) $ECHO_C" >&6
1352 else
1353   cf_cv_system_name="$system_name"
1354 fi
1355
1356 test -z "$system_name" && system_name="$cf_cv_system_name"
1357 test -n "$cf_cv_system_name" && echo "$as_me:1357: result: Configuring for $cf_cv_system_name" >&5
1358 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1359
1360 if test ".$system_name" != ".$cf_cv_system_name" ; then
1361         echo "$as_me:1361: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1362 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1363         { { echo "$as_me:1363: error: \"Please remove config.cache and try again.\"" >&5
1364 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1365    { (exit 1); exit 1; }; }
1366 fi
1367
1368 # Check whether --with-system-type or --without-system-type was given.
1369 if test "${with_system_type+set}" = set; then
1370   withval="$with_system_type"
1371   { echo "$as_me:1371: WARNING: overriding system type to $withval" >&5
1372 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1373         cf_cv_system_name=$withval
1374         host_os=$withval
1375
1376 fi;
1377
1378 ###     Save the given $CFLAGS to allow user-override.
1379 cf_user_CFLAGS="$CFLAGS"
1380
1381 ###     Default install-location
1382
1383 echo "$as_me:1383: checking for prefix" >&5
1384 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1385 if test "x$prefix" = "xNONE" ; then
1386         case "$cf_cv_system_name" in
1387                 # non-vendor systems don't have a conflict
1388         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1389                 prefix=/usr
1390                 ;;
1391         *)      prefix=$ac_default_prefix
1392                 ;;
1393         esac
1394 fi
1395 echo "$as_me:1395: result: $prefix" >&5
1396 echo "${ECHO_T}$prefix" >&6
1397
1398 if test "x$prefix" = "xNONE" ; then
1399 echo "$as_me:1399: checking for default include-directory" >&5
1400 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1401 test -n "$verbose" && echo 1>&6
1402 for cf_symbol in \
1403         $includedir \
1404         $includedir/ncurses \
1405         $prefix/include \
1406         $prefix/include/ncurses \
1407         /usr/local/include \
1408         /usr/local/include/ncurses \
1409         /usr/include \
1410         /usr/include/ncurses
1411 do
1412         cf_dir=`eval echo $cf_symbol`
1413         if test -f $cf_dir/curses.h ; then
1414         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1415                 includedir="$cf_symbol"
1416                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1417                 break
1418         fi
1419         fi
1420         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1421 done
1422 echo "$as_me:1422: result: $includedir" >&5
1423 echo "${ECHO_T}$includedir" >&6
1424 fi
1425
1426 ###     Checks for programs.
1427
1428 # Check whether --with-ada or --without-ada was given.
1429 if test "${with_ada+set}" = set; then
1430   withval="$with_ada"
1431   cf_with_ada=$withval
1432 else
1433   cf_with_ada=yes
1434 fi;
1435 if test "x$cf_with_ada" = xyes
1436 then
1437         cf_PROG_CC="gnatgcc gcc cc"
1438 else
1439         cf_PROG_CC="gcc cc"
1440 fi
1441
1442 ac_ext=c
1443 ac_cpp='$CPP $CPPFLAGS'
1444 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1445 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1446 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1447 ac_main_return=return
1448 if test -n "$ac_tool_prefix"; then
1449   for ac_prog in $cf_PROG_CC
1450   do
1451     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1452 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1453 echo "$as_me:1453: checking for $ac_word" >&5
1454 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1455 if test "${ac_cv_prog_CC+set}" = set; then
1456   echo $ECHO_N "(cached) $ECHO_C" >&6
1457 else
1458   if test -n "$CC"; then
1459   ac_cv_prog_CC="$CC" # Let the user override the test.
1460 else
1461   ac_save_IFS=$IFS; IFS=$ac_path_separator
1462 ac_dummy="$PATH"
1463 for ac_dir in $ac_dummy; do
1464   IFS=$ac_save_IFS
1465   test -z "$ac_dir" && ac_dir=.
1466   $as_executable_p "$ac_dir/$ac_word" || continue
1467 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1468 echo "$as_me:1468: found $ac_dir/$ac_word" >&5
1469 break
1470 done
1471
1472 fi
1473 fi
1474 CC=$ac_cv_prog_CC
1475 if test -n "$CC"; then
1476   echo "$as_me:1476: result: $CC" >&5
1477 echo "${ECHO_T}$CC" >&6
1478 else
1479   echo "$as_me:1479: result: no" >&5
1480 echo "${ECHO_T}no" >&6
1481 fi
1482
1483     test -n "$CC" && break
1484   done
1485 fi
1486 if test -z "$CC"; then
1487   ac_ct_CC=$CC
1488   for ac_prog in $cf_PROG_CC
1489 do
1490   # Extract the first word of "$ac_prog", so it can be a program name with args.
1491 set dummy $ac_prog; ac_word=$2
1492 echo "$as_me:1492: checking for $ac_word" >&5
1493 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1494 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1495   echo $ECHO_N "(cached) $ECHO_C" >&6
1496 else
1497   if test -n "$ac_ct_CC"; then
1498   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1499 else
1500   ac_save_IFS=$IFS; IFS=$ac_path_separator
1501 ac_dummy="$PATH"
1502 for ac_dir in $ac_dummy; do
1503   IFS=$ac_save_IFS
1504   test -z "$ac_dir" && ac_dir=.
1505   $as_executable_p "$ac_dir/$ac_word" || continue
1506 ac_cv_prog_ac_ct_CC="$ac_prog"
1507 echo "$as_me:1507: found $ac_dir/$ac_word" >&5
1508 break
1509 done
1510
1511 fi
1512 fi
1513 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1514 if test -n "$ac_ct_CC"; then
1515   echo "$as_me:1515: result: $ac_ct_CC" >&5
1516 echo "${ECHO_T}$ac_ct_CC" >&6
1517 else
1518   echo "$as_me:1518: result: no" >&5
1519 echo "${ECHO_T}no" >&6
1520 fi
1521
1522   test -n "$ac_ct_CC" && break
1523 done
1524
1525   CC=$ac_ct_CC
1526 fi
1527
1528 test -z "$CC" && { { echo "$as_me:1528: error: no acceptable cc found in \$PATH" >&5
1529 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1530    { (exit 1); exit 1; }; }
1531
1532 # Provide some information about the compiler.
1533 echo "$as_me:1533:" \
1534      "checking for C compiler version" >&5
1535 ac_compiler=`set X $ac_compile; echo $2`
1536 { (eval echo "$as_me:1536: \"$ac_compiler --version </dev/null >&5\"") >&5
1537   (eval $ac_compiler --version </dev/null >&5) 2>&5
1538   ac_status=$?
1539   echo "$as_me:1539: \$? = $ac_status" >&5
1540   (exit $ac_status); }
1541 { (eval echo "$as_me:1541: \"$ac_compiler -v </dev/null >&5\"") >&5
1542   (eval $ac_compiler -v </dev/null >&5) 2>&5
1543   ac_status=$?
1544   echo "$as_me:1544: \$? = $ac_status" >&5
1545   (exit $ac_status); }
1546 { (eval echo "$as_me:1546: \"$ac_compiler -V </dev/null >&5\"") >&5
1547   (eval $ac_compiler -V </dev/null >&5) 2>&5
1548   ac_status=$?
1549   echo "$as_me:1549: \$? = $ac_status" >&5
1550   (exit $ac_status); }
1551
1552 cat >conftest.$ac_ext <<_ACEOF
1553 #line 1553 "configure"
1554 #include "confdefs.h"
1555
1556 int
1557 main ()
1558 {
1559
1560   ;
1561   return 0;
1562 }
1563 _ACEOF
1564 ac_clean_files_save=$ac_clean_files
1565 ac_clean_files="$ac_clean_files a.out a.exe"
1566 # Try to create an executable without -o first, disregard a.out.
1567 # It will help us diagnose broken compilers, and finding out an intuition
1568 # of exeext.
1569 echo "$as_me:1569: checking for C compiler default output" >&5
1570 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1571 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1572 if { (eval echo "$as_me:1572: \"$ac_link_default\"") >&5
1573   (eval $ac_link_default) 2>&5
1574   ac_status=$?
1575   echo "$as_me:1575: \$? = $ac_status" >&5
1576   (exit $ac_status); }; then
1577   # Find the output, starting from the most likely.  This scheme is
1578 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1579 # resort.
1580 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1581                 ls a.out conftest 2>/dev/null;
1582                 ls a.* conftest.* 2>/dev/null`; do
1583   case $ac_file in
1584     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1585     a.out ) # We found the default executable, but exeext='' is most
1586             # certainly right.
1587             break;;
1588     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1589           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1590           export ac_cv_exeext
1591           break;;
1592     * ) break;;
1593   esac
1594 done
1595 else
1596   echo "$as_me: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 { { echo "$as_me:1598: error: C compiler cannot create executables" >&5
1599 echo "$as_me: error: C compiler cannot create executables" >&2;}
1600    { (exit 77); exit 77; }; }
1601 fi
1602
1603 ac_exeext=$ac_cv_exeext
1604 echo "$as_me:1604: result: $ac_file" >&5
1605 echo "${ECHO_T}$ac_file" >&6
1606
1607 # Check the compiler produces executables we can run.  If not, either
1608 # the compiler is broken, or we cross compile.
1609 echo "$as_me:1609: checking whether the C compiler works" >&5
1610 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1611 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1612 # If not cross compiling, check that we can run a simple program.
1613 if test "$cross_compiling" != yes; then
1614   if { ac_try='./$ac_file'
1615   { (eval echo "$as_me:1615: \"$ac_try\"") >&5
1616   (eval $ac_try) 2>&5
1617   ac_status=$?
1618   echo "$as_me:1618: \$? = $ac_status" >&5
1619   (exit $ac_status); }; }; then
1620     cross_compiling=no
1621   else
1622     if test "$cross_compiling" = maybe; then
1623         cross_compiling=yes
1624     else
1625         { { echo "$as_me:1625: error: cannot run C compiled programs.
1626 If you meant to cross compile, use \`--host'." >&5
1627 echo "$as_me: error: cannot run C compiled programs.
1628 If you meant to cross compile, use \`--host'." >&2;}
1629    { (exit 1); exit 1; }; }
1630     fi
1631   fi
1632 fi
1633 echo "$as_me:1633: result: yes" >&5
1634 echo "${ECHO_T}yes" >&6
1635
1636 rm -f a.out a.exe conftest$ac_cv_exeext
1637 ac_clean_files=$ac_clean_files_save
1638 # Check the compiler produces executables we can run.  If not, either
1639 # the compiler is broken, or we cross compile.
1640 echo "$as_me:1640: checking whether we are cross compiling" >&5
1641 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1642 echo "$as_me:1642: result: $cross_compiling" >&5
1643 echo "${ECHO_T}$cross_compiling" >&6
1644
1645 echo "$as_me:1645: checking for executable suffix" >&5
1646 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1647 if { (eval echo "$as_me:1647: \"$ac_link\"") >&5
1648   (eval $ac_link) 2>&5
1649   ac_status=$?
1650   echo "$as_me:1650: \$? = $ac_status" >&5
1651   (exit $ac_status); }; then
1652   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1653 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1654 # work properly (i.e., refer to `conftest.exe'), while it won't with
1655 # `rm'.
1656 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1657   case $ac_file in
1658     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1659     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1660           export ac_cv_exeext
1661           break;;
1662     * ) break;;
1663   esac
1664 done
1665 else
1666   { { echo "$as_me:1666: error: cannot compute EXEEXT: cannot compile and link" >&5
1667 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1668    { (exit 1); exit 1; }; }
1669 fi
1670
1671 rm -f conftest$ac_cv_exeext
1672 echo "$as_me:1672: result: $ac_cv_exeext" >&5
1673 echo "${ECHO_T}$ac_cv_exeext" >&6
1674
1675 rm -f conftest.$ac_ext
1676 EXEEXT=$ac_cv_exeext
1677 ac_exeext=$EXEEXT
1678 echo "$as_me:1678: checking for object suffix" >&5
1679 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1680 if test "${ac_cv_objext+set}" = set; then
1681   echo $ECHO_N "(cached) $ECHO_C" >&6
1682 else
1683   cat >conftest.$ac_ext <<_ACEOF
1684 #line 1684 "configure"
1685 #include "confdefs.h"
1686
1687 int
1688 main ()
1689 {
1690
1691   ;
1692   return 0;
1693 }
1694 _ACEOF
1695 rm -f conftest.o conftest.obj
1696 if { (eval echo "$as_me:1696: \"$ac_compile\"") >&5
1697   (eval $ac_compile) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }; then
1701   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1702   case $ac_file in
1703     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1704     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1705        break;;
1706   esac
1707 done
1708 else
1709   echo "$as_me: failed program was:" >&5
1710 cat conftest.$ac_ext >&5
1711 { { echo "$as_me:1711: error: cannot compute OBJEXT: cannot compile" >&5
1712 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1713    { (exit 1); exit 1; }; }
1714 fi
1715
1716 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1717 fi
1718 echo "$as_me:1718: result: $ac_cv_objext" >&5
1719 echo "${ECHO_T}$ac_cv_objext" >&6
1720 OBJEXT=$ac_cv_objext
1721 ac_objext=$OBJEXT
1722 echo "$as_me:1722: checking whether we are using the GNU C compiler" >&5
1723 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1724 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1725   echo $ECHO_N "(cached) $ECHO_C" >&6
1726 else
1727   cat >conftest.$ac_ext <<_ACEOF
1728 #line 1728 "configure"
1729 #include "confdefs.h"
1730
1731 int
1732 main ()
1733 {
1734 #ifndef __GNUC__
1735        choke me
1736 #endif
1737
1738   ;
1739   return 0;
1740 }
1741 _ACEOF
1742 rm -f conftest.$ac_objext
1743 if { (eval echo "$as_me:1743: \"$ac_compile\"") >&5
1744   (eval $ac_compile) 2>&5
1745   ac_status=$?
1746   echo "$as_me:1746: \$? = $ac_status" >&5
1747   (exit $ac_status); } &&
1748          { ac_try='test -s conftest.$ac_objext'
1749   { (eval echo "$as_me:1749: \"$ac_try\"") >&5
1750   (eval $ac_try) 2>&5
1751   ac_status=$?
1752   echo "$as_me:1752: \$? = $ac_status" >&5
1753   (exit $ac_status); }; }; then
1754   ac_compiler_gnu=yes
1755 else
1756   echo "$as_me: failed program was:" >&5
1757 cat conftest.$ac_ext >&5
1758 ac_compiler_gnu=no
1759 fi
1760 rm -f conftest.$ac_objext conftest.$ac_ext
1761 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1762
1763 fi
1764 echo "$as_me:1764: result: $ac_cv_c_compiler_gnu" >&5
1765 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1766 GCC=`test $ac_compiler_gnu = yes && echo yes`
1767 ac_test_CFLAGS=${CFLAGS+set}
1768 ac_save_CFLAGS=$CFLAGS
1769 CFLAGS="-g"
1770 echo "$as_me:1770: checking whether $CC accepts -g" >&5
1771 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1772 if test "${ac_cv_prog_cc_g+set}" = set; then
1773   echo $ECHO_N "(cached) $ECHO_C" >&6
1774 else
1775   cat >conftest.$ac_ext <<_ACEOF
1776 #line 1776 "configure"
1777 #include "confdefs.h"
1778
1779 int
1780 main ()
1781 {
1782
1783   ;
1784   return 0;
1785 }
1786 _ACEOF
1787 rm -f conftest.$ac_objext
1788 if { (eval echo "$as_me:1788: \"$ac_compile\"") >&5
1789   (eval $ac_compile) 2>&5
1790   ac_status=$?
1791   echo "$as_me:1791: \$? = $ac_status" >&5
1792   (exit $ac_status); } &&
1793          { ac_try='test -s conftest.$ac_objext'
1794   { (eval echo "$as_me:1794: \"$ac_try\"") >&5
1795   (eval $ac_try) 2>&5
1796   ac_status=$?
1797   echo "$as_me:1797: \$? = $ac_status" >&5
1798   (exit $ac_status); }; }; then
1799   ac_cv_prog_cc_g=yes
1800 else
1801   echo "$as_me: failed program was:" >&5
1802 cat conftest.$ac_ext >&5
1803 ac_cv_prog_cc_g=no
1804 fi
1805 rm -f conftest.$ac_objext conftest.$ac_ext
1806 fi
1807 echo "$as_me:1807: result: $ac_cv_prog_cc_g" >&5
1808 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1809 if test "$ac_test_CFLAGS" = set; then
1810   CFLAGS=$ac_save_CFLAGS
1811 elif test $ac_cv_prog_cc_g = yes; then
1812   if test "$GCC" = yes; then
1813     CFLAGS="-g -O2"
1814   else
1815     CFLAGS="-g"
1816   fi
1817 else
1818   if test "$GCC" = yes; then
1819     CFLAGS="-O2"
1820   else
1821     CFLAGS=
1822   fi
1823 fi
1824 # Some people use a C++ compiler to compile C.  Since we use `exit',
1825 # in C++ we need to declare it.  In case someone uses the same compiler
1826 # for both compiling C and C++ we need to have the C++ compiler decide
1827 # the declaration of exit, since it's the most demanding environment.
1828 cat >conftest.$ac_ext <<_ACEOF
1829 #ifndef __cplusplus
1830   choke me
1831 #endif
1832 _ACEOF
1833 rm -f conftest.$ac_objext
1834 if { (eval echo "$as_me:1834: \"$ac_compile\"") >&5
1835   (eval $ac_compile) 2>&5
1836   ac_status=$?
1837   echo "$as_me:1837: \$? = $ac_status" >&5
1838   (exit $ac_status); } &&
1839          { ac_try='test -s conftest.$ac_objext'
1840   { (eval echo "$as_me:1840: \"$ac_try\"") >&5
1841   (eval $ac_try) 2>&5
1842   ac_status=$?
1843   echo "$as_me:1843: \$? = $ac_status" >&5
1844   (exit $ac_status); }; }; then
1845   for ac_declaration in \
1846    ''\
1847    '#include <stdlib.h>' \
1848    'extern "C" void std::exit (int) throw (); using std::exit;' \
1849    'extern "C" void std::exit (int); using std::exit;' \
1850    'extern "C" void exit (int) throw ();' \
1851    'extern "C" void exit (int);' \
1852    'void exit (int);'
1853 do
1854   cat >conftest.$ac_ext <<_ACEOF
1855 #line 1855 "configure"
1856 #include "confdefs.h"
1857 #include <stdlib.h>
1858 $ac_declaration
1859 int
1860 main ()
1861 {
1862 exit (42);
1863   ;
1864   return 0;
1865 }
1866 _ACEOF
1867 rm -f conftest.$ac_objext
1868 if { (eval echo "$as_me:1868: \"$ac_compile\"") >&5
1869   (eval $ac_compile) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit $ac_status); } &&
1873          { ac_try='test -s conftest.$ac_objext'
1874   { (eval echo "$as_me:1874: \"$ac_try\"") >&5
1875   (eval $ac_try) 2>&5
1876   ac_status=$?
1877   echo "$as_me:1877: \$? = $ac_status" >&5
1878   (exit $ac_status); }; }; then
1879   :
1880 else
1881   echo "$as_me: failed program was:" >&5
1882 cat conftest.$ac_ext >&5
1883 continue
1884 fi
1885 rm -f conftest.$ac_objext conftest.$ac_ext
1886   cat >conftest.$ac_ext <<_ACEOF
1887 #line 1887 "configure"
1888 #include "confdefs.h"
1889 $ac_declaration
1890 int
1891 main ()
1892 {
1893 exit (42);
1894   ;
1895   return 0;
1896 }
1897 _ACEOF
1898 rm -f conftest.$ac_objext
1899 if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900   (eval $ac_compile) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); } &&
1904          { ac_try='test -s conftest.$ac_objext'
1905   { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1906   (eval $ac_try) 2>&5
1907   ac_status=$?
1908   echo "$as_me:1908: \$? = $ac_status" >&5
1909   (exit $ac_status); }; }; then
1910   break
1911 else
1912   echo "$as_me: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1914 fi
1915 rm -f conftest.$ac_objext conftest.$ac_ext
1916 done
1917 rm -rf conftest*
1918 if test -n "$ac_declaration"; then
1919   echo '#ifdef __cplusplus' >>confdefs.h
1920   echo $ac_declaration      >>confdefs.h
1921   echo '#endif'             >>confdefs.h
1922 fi
1923
1924 else
1925   echo "$as_me: failed program was:" >&5
1926 cat conftest.$ac_ext >&5
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_ext=c
1930 ac_cpp='$CPP $CPPFLAGS'
1931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1934 ac_main_return=return
1935
1936 GCC_VERSION=none
1937 if test "$GCC" = yes ; then
1938         echo "$as_me:1938: checking version of $CC" >&5
1939 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1940         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.].*//'`"
1941         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1942         echo "$as_me:1942: result: $GCC_VERSION" >&5
1943 echo "${ECHO_T}$GCC_VERSION" >&6
1944 fi
1945
1946 echo "$as_me:1946: checking for $CC option to accept ANSI C" >&5
1947 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1948 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1949   echo $ECHO_N "(cached) $ECHO_C" >&6
1950 else
1951   ac_cv_prog_cc_stdc=no
1952 ac_save_CC=$CC
1953 cat >conftest.$ac_ext <<_ACEOF
1954 #line 1954 "configure"
1955 #include "confdefs.h"
1956 #include <stdarg.h>
1957 #include <stdio.h>
1958 #include <sys/types.h>
1959 #include <sys/stat.h>
1960 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1961 struct buf { int x; };
1962 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1963 static char *e (p, i)
1964      char **p;
1965      int i;
1966 {
1967   return p[i];
1968 }
1969 static char *f (char * (*g) (char **, int), char **p, ...)
1970 {
1971   char *s;
1972   va_list v;
1973   va_start (v,p);
1974   s = g (p, va_arg (v,int));
1975   va_end (v);
1976   return s;
1977 }
1978 int test (int i, double x);
1979 struct s1 {int (*f) (int a);};
1980 struct s2 {int (*f) (double a);};
1981 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1982 int argc;
1983 char **argv;
1984 int
1985 main ()
1986 {
1987 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1988   ;
1989   return 0;
1990 }
1991 _ACEOF
1992 # Don't try gcc -ansi; that turns off useful extensions and
1993 # breaks some systems' header files.
1994 # AIX                   -qlanglvl=ansi
1995 # Ultrix and OSF/1      -std1
1996 # HP-UX 10.20 and later -Ae
1997 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1998 # SVR4                  -Xc -D__EXTENSIONS__
1999 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2000 do
2001   CC="$ac_save_CC $ac_arg"
2002   rm -f conftest.$ac_objext
2003 if { (eval echo "$as_me:2003: \"$ac_compile\"") >&5
2004   (eval $ac_compile) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); } &&
2008          { ac_try='test -s conftest.$ac_objext'
2009   { (eval echo "$as_me:2009: \"$ac_try\"") >&5
2010   (eval $ac_try) 2>&5
2011   ac_status=$?
2012   echo "$as_me:2012: \$? = $ac_status" >&5
2013   (exit $ac_status); }; }; then
2014   ac_cv_prog_cc_stdc=$ac_arg
2015 break
2016 else
2017   echo "$as_me: failed program was:" >&5
2018 cat conftest.$ac_ext >&5
2019 fi
2020 rm -f conftest.$ac_objext
2021 done
2022 rm -f conftest.$ac_ext conftest.$ac_objext
2023 CC=$ac_save_CC
2024
2025 fi
2026
2027 case "x$ac_cv_prog_cc_stdc" in
2028   x|xno)
2029     echo "$as_me:2029: result: none needed" >&5
2030 echo "${ECHO_T}none needed" >&6 ;;
2031   *)
2032     echo "$as_me:2032: result: $ac_cv_prog_cc_stdc" >&5
2033 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2034     CC="$CC $ac_cv_prog_cc_stdc" ;;
2035 esac
2036
2037 # This should have been defined by AC_PROG_CC
2038 : ${CC:=cc}
2039
2040 echo "$as_me:2040: checking \$CC variable" >&5
2041 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2042 case "$CC" in #(vi
2043 *[\ \   ]-[IUD]*)
2044         echo "$as_me:2044: result: broken" >&5
2045 echo "${ECHO_T}broken" >&6
2046         { echo "$as_me:2046: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2047 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2048         # humor him...
2049         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2050         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2051
2052 cf_fix_cppflags=no
2053 cf_new_cflags=
2054 cf_new_cppflags=
2055 cf_new_extra_cppflags=
2056
2057 for cf_add_cflags in $cf_flags
2058 do
2059 case $cf_fix_cppflags in
2060 no)
2061         case $cf_add_cflags in #(vi
2062         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2063                 case $cf_add_cflags in
2064                 -D*)
2065                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2066
2067                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2068                                 && test -z "${cf_tst_cflags}" \
2069                                 && cf_fix_cppflags=yes
2070
2071                         if test $cf_fix_cppflags = yes ; then
2072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2073                                 continue
2074                         elif test "${cf_tst_cflags}" = "\"'" ; then
2075                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2076                                 continue
2077                         fi
2078                         ;;
2079                 esac
2080                 case "$CPPFLAGS" in
2081                 *$cf_add_cflags) #(vi
2082                         ;;
2083                 *) #(vi
2084                         case $cf_add_cflags in #(vi
2085                         -D*)
2086                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2087
2088 CPPFLAGS=`echo "$CPPFLAGS" | \
2089         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2090                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2091
2092                                 ;;
2093                         esac
2094                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2095                         ;;
2096                 esac
2097                 ;;
2098         *)
2099                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2100                 ;;
2101         esac
2102         ;;
2103 yes)
2104         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2105
2106         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2107
2108         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2109                 && test -z "${cf_tst_cflags}" \
2110                 && cf_fix_cppflags=no
2111         ;;
2112 esac
2113 done
2114
2115 if test -n "$cf_new_cflags" ; then
2116
2117         CFLAGS="$CFLAGS $cf_new_cflags"
2118 fi
2119
2120 if test -n "$cf_new_cppflags" ; then
2121
2122         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2123 fi
2124
2125 if test -n "$cf_new_extra_cppflags" ; then
2126
2127         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2128 fi
2129
2130         ;;
2131 *)
2132         echo "$as_me:2132: result: ok" >&5
2133 echo "${ECHO_T}ok" >&6
2134         ;;
2135 esac
2136
2137 ac_ext=c
2138 ac_cpp='$CPP $CPPFLAGS'
2139 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2140 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2141 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2142 ac_main_return=return
2143 echo "$as_me:2143: checking how to run the C preprocessor" >&5
2144 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2145 # On Suns, sometimes $CPP names a directory.
2146 if test -n "$CPP" && test -d "$CPP"; then
2147   CPP=
2148 fi
2149 if test -z "$CPP"; then
2150   if test "${ac_cv_prog_CPP+set}" = set; then
2151   echo $ECHO_N "(cached) $ECHO_C" >&6
2152 else
2153       # Double quotes because CPP needs to be expanded
2154     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2155     do
2156       ac_preproc_ok=false
2157 for ac_c_preproc_warn_flag in '' yes
2158 do
2159   # Use a header file that comes with gcc, so configuring glibc
2160   # with a fresh cross-compiler works.
2161   # On the NeXT, cc -E runs the code through the compiler's parser,
2162   # not just through cpp. "Syntax error" is here to catch this case.
2163   cat >conftest.$ac_ext <<_ACEOF
2164 #line 2164 "configure"
2165 #include "confdefs.h"
2166 #include <assert.h>
2167                      Syntax error
2168 _ACEOF
2169 if { (eval echo "$as_me:2169: \"$ac_cpp conftest.$ac_ext\"") >&5
2170   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2171   ac_status=$?
2172   egrep -v '^ *\+' conftest.er1 >conftest.err
2173   rm -f conftest.er1
2174   cat conftest.err >&5
2175   echo "$as_me:2175: \$? = $ac_status" >&5
2176   (exit $ac_status); } >/dev/null; then
2177   if test -s conftest.err; then
2178     ac_cpp_err=$ac_c_preproc_warn_flag
2179   else
2180     ac_cpp_err=
2181   fi
2182 else
2183   ac_cpp_err=yes
2184 fi
2185 if test -z "$ac_cpp_err"; then
2186   :
2187 else
2188   echo "$as_me: failed program was:" >&5
2189   cat conftest.$ac_ext >&5
2190   # Broken: fails on valid input.
2191 continue
2192 fi
2193 rm -f conftest.err conftest.$ac_ext
2194
2195   # OK, works on sane cases.  Now check whether non-existent headers
2196   # can be detected and how.
2197   cat >conftest.$ac_ext <<_ACEOF
2198 #line 2198 "configure"
2199 #include "confdefs.h"
2200 #include <ac_nonexistent.h>
2201 _ACEOF
2202 if { (eval echo "$as_me:2202: \"$ac_cpp conftest.$ac_ext\"") >&5
2203   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2204   ac_status=$?
2205   egrep -v '^ *\+' conftest.er1 >conftest.err
2206   rm -f conftest.er1
2207   cat conftest.err >&5
2208   echo "$as_me:2208: \$? = $ac_status" >&5
2209   (exit $ac_status); } >/dev/null; then
2210   if test -s conftest.err; then
2211     ac_cpp_err=$ac_c_preproc_warn_flag
2212   else
2213     ac_cpp_err=
2214   fi
2215 else
2216   ac_cpp_err=yes
2217 fi
2218 if test -z "$ac_cpp_err"; then
2219   # Broken: success on invalid input.
2220 continue
2221 else
2222   echo "$as_me: failed program was:" >&5
2223   cat conftest.$ac_ext >&5
2224   # Passes both tests.
2225 ac_preproc_ok=:
2226 break
2227 fi
2228 rm -f conftest.err conftest.$ac_ext
2229
2230 done
2231 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2232 rm -f conftest.err conftest.$ac_ext
2233 if $ac_preproc_ok; then
2234   break
2235 fi
2236
2237     done
2238     ac_cv_prog_CPP=$CPP
2239
2240 fi
2241   CPP=$ac_cv_prog_CPP
2242 else
2243   ac_cv_prog_CPP=$CPP
2244 fi
2245 echo "$as_me:2245: result: $CPP" >&5
2246 echo "${ECHO_T}$CPP" >&6
2247 ac_preproc_ok=false
2248 for ac_c_preproc_warn_flag in '' yes
2249 do
2250   # Use a header file that comes with gcc, so configuring glibc
2251   # with a fresh cross-compiler works.
2252   # On the NeXT, cc -E runs the code through the compiler's parser,
2253   # not just through cpp. "Syntax error" is here to catch this case.
2254   cat >conftest.$ac_ext <<_ACEOF
2255 #line 2255 "configure"
2256 #include "confdefs.h"
2257 #include <assert.h>
2258                      Syntax error
2259 _ACEOF
2260 if { (eval echo "$as_me:2260: \"$ac_cpp conftest.$ac_ext\"") >&5
2261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2262   ac_status=$?
2263   egrep -v '^ *\+' conftest.er1 >conftest.err
2264   rm -f conftest.er1
2265   cat conftest.err >&5
2266   echo "$as_me:2266: \$? = $ac_status" >&5
2267   (exit $ac_status); } >/dev/null; then
2268   if test -s conftest.err; then
2269     ac_cpp_err=$ac_c_preproc_warn_flag
2270   else
2271     ac_cpp_err=
2272   fi
2273 else
2274   ac_cpp_err=yes
2275 fi
2276 if test -z "$ac_cpp_err"; then
2277   :
2278 else
2279   echo "$as_me: failed program was:" >&5
2280   cat conftest.$ac_ext >&5
2281   # Broken: fails on valid input.
2282 continue
2283 fi
2284 rm -f conftest.err conftest.$ac_ext
2285
2286   # OK, works on sane cases.  Now check whether non-existent headers
2287   # can be detected and how.
2288   cat >conftest.$ac_ext <<_ACEOF
2289 #line 2289 "configure"
2290 #include "confdefs.h"
2291 #include <ac_nonexistent.h>
2292 _ACEOF
2293 if { (eval echo "$as_me:2293: \"$ac_cpp conftest.$ac_ext\"") >&5
2294   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2295   ac_status=$?
2296   egrep -v '^ *\+' conftest.er1 >conftest.err
2297   rm -f conftest.er1
2298   cat conftest.err >&5
2299   echo "$as_me:2299: \$? = $ac_status" >&5
2300   (exit $ac_status); } >/dev/null; then
2301   if test -s conftest.err; then
2302     ac_cpp_err=$ac_c_preproc_warn_flag
2303   else
2304     ac_cpp_err=
2305   fi
2306 else
2307   ac_cpp_err=yes
2308 fi
2309 if test -z "$ac_cpp_err"; then
2310   # Broken: success on invalid input.
2311 continue
2312 else
2313   echo "$as_me: failed program was:" >&5
2314   cat conftest.$ac_ext >&5
2315   # Passes both tests.
2316 ac_preproc_ok=:
2317 break
2318 fi
2319 rm -f conftest.err conftest.$ac_ext
2320
2321 done
2322 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2323 rm -f conftest.err conftest.$ac_ext
2324 if $ac_preproc_ok; then
2325   :
2326 else
2327   { { echo "$as_me:2327: error: C preprocessor \"$CPP\" fails sanity check" >&5
2328 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2329    { (exit 1); exit 1; }; }
2330 fi
2331
2332 ac_ext=c
2333 ac_cpp='$CPP $CPPFLAGS'
2334 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2335 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2336 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2337 ac_main_return=return
2338
2339 if test $ac_cv_c_compiler_gnu = yes; then
2340     echo "$as_me:2340: checking whether $CC needs -traditional" >&5
2341 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2342 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2343   echo $ECHO_N "(cached) $ECHO_C" >&6
2344 else
2345     ac_pattern="Autoconf.*'x'"
2346   cat >conftest.$ac_ext <<_ACEOF
2347 #line 2347 "configure"
2348 #include "confdefs.h"
2349 #include <sgtty.h>
2350 int Autoconf = TIOCGETP;
2351 _ACEOF
2352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2353   egrep "$ac_pattern" >/dev/null 2>&1; then
2354   ac_cv_prog_gcc_traditional=yes
2355 else
2356   ac_cv_prog_gcc_traditional=no
2357 fi
2358 rm -rf conftest*
2359
2360   if test $ac_cv_prog_gcc_traditional = no; then
2361     cat >conftest.$ac_ext <<_ACEOF
2362 #line 2362 "configure"
2363 #include "confdefs.h"
2364 #include <termio.h>
2365 int Autoconf = TCGETA;
2366 _ACEOF
2367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2368   egrep "$ac_pattern" >/dev/null 2>&1; then
2369   ac_cv_prog_gcc_traditional=yes
2370 fi
2371 rm -rf conftest*
2372
2373   fi
2374 fi
2375 echo "$as_me:2375: result: $ac_cv_prog_gcc_traditional" >&5
2376 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2377   if test $ac_cv_prog_gcc_traditional = yes; then
2378     CC="$CC -traditional"
2379   fi
2380 fi
2381
2382 echo "$as_me:2382: checking whether $CC understands -c and -o together" >&5
2383 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2384 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2385   echo $ECHO_N "(cached) $ECHO_C" >&6
2386 else
2387
2388 cat > conftest.$ac_ext <<CF_EOF
2389 #include <stdio.h>
2390 int main()
2391 {
2392         ${cf_cv_main_return:-return}(0);
2393 }
2394 CF_EOF
2395 # We do the test twice because some compilers refuse to overwrite an
2396 # existing .o file with -o, though they will create one.
2397 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2398 if { (eval echo "$as_me:2398: \"$ac_try\"") >&5
2399   (eval $ac_try) 2>&5
2400   ac_status=$?
2401   echo "$as_me:2401: \$? = $ac_status" >&5
2402   (exit $ac_status); } &&
2403   test -f conftest2.$ac_objext && { (eval echo "$as_me:2403: \"$ac_try\"") >&5
2404   (eval $ac_try) 2>&5
2405   ac_status=$?
2406   echo "$as_me:2406: \$? = $ac_status" >&5
2407   (exit $ac_status); };
2408 then
2409   eval cf_cv_prog_CC_c_o=yes
2410 else
2411   eval cf_cv_prog_CC_c_o=no
2412 fi
2413 rm -rf conftest*
2414
2415 fi
2416 if test $cf_cv_prog_CC_c_o = yes; then
2417   echo "$as_me:2417: result: yes" >&5
2418 echo "${ECHO_T}yes" >&6
2419 else
2420   echo "$as_me:2420: result: no" >&5
2421 echo "${ECHO_T}no" >&6
2422 fi
2423
2424 if test "$cross_compiling" = yes ; then
2425   LDCONFIG=:
2426 else
2427 case "$cf_cv_system_name" in #(vi
2428 dragonfly*|mirbsd*|freebsd*) #(vi
2429   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2430   ;;
2431 *) LDPATH=$PATH:/sbin:/usr/sbin
2432   # Extract the first word of "ldconfig", so it can be a program name with args.
2433 set dummy ldconfig; ac_word=$2
2434 echo "$as_me:2434: checking for $ac_word" >&5
2435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2436 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2437   echo $ECHO_N "(cached) $ECHO_C" >&6
2438 else
2439   case $LDCONFIG in
2440   [\\/]* | ?:[\\/]*)
2441   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2442   ;;
2443   *)
2444   ac_save_IFS=$IFS; IFS=$ac_path_separator
2445 ac_dummy="$LDPATH"
2446 for ac_dir in $ac_dummy; do
2447   IFS=$ac_save_IFS
2448   test -z "$ac_dir" && ac_dir=.
2449   if $as_executable_p "$ac_dir/$ac_word"; then
2450    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2451    echo "$as_me:2451: found $ac_dir/$ac_word" >&5
2452    break
2453 fi
2454 done
2455
2456   ;;
2457 esac
2458 fi
2459 LDCONFIG=$ac_cv_path_LDCONFIG
2460
2461 if test -n "$LDCONFIG"; then
2462   echo "$as_me:2462: result: $LDCONFIG" >&5
2463 echo "${ECHO_T}$LDCONFIG" >&6
2464 else
2465   echo "$as_me:2465: result: no" >&5
2466 echo "${ECHO_T}no" >&6
2467 fi
2468
2469   ;;
2470 esac
2471 fi
2472
2473 echo "$as_me:2473: checking if you want to ensure bool is consistent with C++" >&5
2474 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2475
2476 # Check whether --with-cxx or --without-cxx was given.
2477 if test "${with_cxx+set}" = set; then
2478   withval="$with_cxx"
2479   cf_with_cxx=$withval
2480 else
2481   cf_with_cxx=yes
2482 fi;
2483 echo "$as_me:2483: result: $cf_with_cxx" >&5
2484 echo "${ECHO_T}$cf_with_cxx" >&6
2485 if test "X$cf_with_cxx" = Xno ; then
2486         CXX=""
2487         GXX=""
2488 else
2489         # with autoconf 2.13, we can change the error to a warning:
2490                 ac_ext=cc
2491 ac_cpp='$CXXCPP $CPPFLAGS'
2492 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2493 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2494 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2495 ac_main_return=return
2496 if test -n "$ac_tool_prefix"; then
2497   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2498   do
2499     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2500 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2501 echo "$as_me:2501: checking for $ac_word" >&5
2502 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2503 if test "${ac_cv_prog_CXX+set}" = set; then
2504   echo $ECHO_N "(cached) $ECHO_C" >&6
2505 else
2506   if test -n "$CXX"; then
2507   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2508 else
2509   ac_save_IFS=$IFS; IFS=$ac_path_separator
2510 ac_dummy="$PATH"
2511 for ac_dir in $ac_dummy; do
2512   IFS=$ac_save_IFS
2513   test -z "$ac_dir" && ac_dir=.
2514   $as_executable_p "$ac_dir/$ac_word" || continue
2515 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2516 echo "$as_me:2516: found $ac_dir/$ac_word" >&5
2517 break
2518 done
2519
2520 fi
2521 fi
2522 CXX=$ac_cv_prog_CXX
2523 if test -n "$CXX"; then
2524   echo "$as_me:2524: result: $CXX" >&5
2525 echo "${ECHO_T}$CXX" >&6
2526 else
2527   echo "$as_me:2527: result: no" >&5
2528 echo "${ECHO_T}no" >&6
2529 fi
2530
2531     test -n "$CXX" && break
2532   done
2533 fi
2534 if test -z "$CXX"; then
2535   ac_ct_CXX=$CXX
2536   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2537 do
2538   # Extract the first word of "$ac_prog", so it can be a program name with args.
2539 set dummy $ac_prog; ac_word=$2
2540 echo "$as_me:2540: checking for $ac_word" >&5
2541 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2542 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2543   echo $ECHO_N "(cached) $ECHO_C" >&6
2544 else
2545   if test -n "$ac_ct_CXX"; then
2546   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2547 else
2548   ac_save_IFS=$IFS; IFS=$ac_path_separator
2549 ac_dummy="$PATH"
2550 for ac_dir in $ac_dummy; do
2551   IFS=$ac_save_IFS
2552   test -z "$ac_dir" && ac_dir=.
2553   $as_executable_p "$ac_dir/$ac_word" || continue
2554 ac_cv_prog_ac_ct_CXX="$ac_prog"
2555 echo "$as_me:2555: found $ac_dir/$ac_word" >&5
2556 break
2557 done
2558
2559 fi
2560 fi
2561 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2562 if test -n "$ac_ct_CXX"; then
2563   echo "$as_me:2563: result: $ac_ct_CXX" >&5
2564 echo "${ECHO_T}$ac_ct_CXX" >&6
2565 else
2566   echo "$as_me:2566: result: no" >&5
2567 echo "${ECHO_T}no" >&6
2568 fi
2569
2570   test -n "$ac_ct_CXX" && break
2571 done
2572 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2573
2574   CXX=$ac_ct_CXX
2575 fi
2576
2577 # Provide some information about the compiler.
2578 echo "$as_me:2578:" \
2579      "checking for C++ compiler version" >&5
2580 ac_compiler=`set X $ac_compile; echo $2`
2581 { (eval echo "$as_me:2581: \"$ac_compiler --version </dev/null >&5\"") >&5
2582   (eval $ac_compiler --version </dev/null >&5) 2>&5
2583   ac_status=$?
2584   echo "$as_me:2584: \$? = $ac_status" >&5
2585   (exit $ac_status); }
2586 { (eval echo "$as_me:2586: \"$ac_compiler -v </dev/null >&5\"") >&5
2587   (eval $ac_compiler -v </dev/null >&5) 2>&5
2588   ac_status=$?
2589   echo "$as_me:2589: \$? = $ac_status" >&5
2590   (exit $ac_status); }
2591 { (eval echo "$as_me:2591: \"$ac_compiler -V </dev/null >&5\"") >&5
2592   (eval $ac_compiler -V </dev/null >&5) 2>&5
2593   ac_status=$?
2594   echo "$as_me:2594: \$? = $ac_status" >&5
2595   (exit $ac_status); }
2596
2597 echo "$as_me:2597: checking whether we are using the GNU C++ compiler" >&5
2598 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2599 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2600   echo $ECHO_N "(cached) $ECHO_C" >&6
2601 else
2602   cat >conftest.$ac_ext <<_ACEOF
2603 #line 2603 "configure"
2604 #include "confdefs.h"
2605
2606 int
2607 main ()
2608 {
2609 #ifndef __GNUC__
2610        choke me
2611 #endif
2612
2613   ;
2614   return 0;
2615 }
2616 _ACEOF
2617 rm -f conftest.$ac_objext
2618 if { (eval echo "$as_me:2618: \"$ac_compile\"") >&5
2619   (eval $ac_compile) 2>&5
2620   ac_status=$?
2621   echo "$as_me:2621: \$? = $ac_status" >&5
2622   (exit $ac_status); } &&
2623          { ac_try='test -s conftest.$ac_objext'
2624   { (eval echo "$as_me:2624: \"$ac_try\"") >&5
2625   (eval $ac_try) 2>&5
2626   ac_status=$?
2627   echo "$as_me:2627: \$? = $ac_status" >&5
2628   (exit $ac_status); }; }; then
2629   ac_compiler_gnu=yes
2630 else
2631   echo "$as_me: failed program was:" >&5
2632 cat conftest.$ac_ext >&5
2633 ac_compiler_gnu=no
2634 fi
2635 rm -f conftest.$ac_objext conftest.$ac_ext
2636 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2637
2638 fi
2639 echo "$as_me:2639: result: $ac_cv_cxx_compiler_gnu" >&5
2640 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2641 GXX=`test $ac_compiler_gnu = yes && echo yes`
2642 ac_test_CXXFLAGS=${CXXFLAGS+set}
2643 ac_save_CXXFLAGS=$CXXFLAGS
2644 CXXFLAGS="-g"
2645 echo "$as_me:2645: checking whether $CXX accepts -g" >&5
2646 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2647 if test "${ac_cv_prog_cxx_g+set}" = set; then
2648   echo $ECHO_N "(cached) $ECHO_C" >&6
2649 else
2650   cat >conftest.$ac_ext <<_ACEOF
2651 #line 2651 "configure"
2652 #include "confdefs.h"
2653
2654 int
2655 main ()
2656 {
2657
2658   ;
2659   return 0;
2660 }
2661 _ACEOF
2662 rm -f conftest.$ac_objext
2663 if { (eval echo "$as_me:2663: \"$ac_compile\"") >&5
2664   (eval $ac_compile) 2>&5
2665   ac_status=$?
2666   echo "$as_me:2666: \$? = $ac_status" >&5
2667   (exit $ac_status); } &&
2668          { ac_try='test -s conftest.$ac_objext'
2669   { (eval echo "$as_me:2669: \"$ac_try\"") >&5
2670   (eval $ac_try) 2>&5
2671   ac_status=$?
2672   echo "$as_me:2672: \$? = $ac_status" >&5
2673   (exit $ac_status); }; }; then
2674   ac_cv_prog_cxx_g=yes
2675 else
2676   echo "$as_me: failed program was:" >&5
2677 cat conftest.$ac_ext >&5
2678 ac_cv_prog_cxx_g=no
2679 fi
2680 rm -f conftest.$ac_objext conftest.$ac_ext
2681 fi
2682 echo "$as_me:2682: result: $ac_cv_prog_cxx_g" >&5
2683 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2684 if test "$ac_test_CXXFLAGS" = set; then
2685   CXXFLAGS=$ac_save_CXXFLAGS
2686 elif test $ac_cv_prog_cxx_g = yes; then
2687   if test "$GXX" = yes; then
2688     CXXFLAGS="-g -O2"
2689   else
2690     CXXFLAGS="-g"
2691   fi
2692 else
2693   if test "$GXX" = yes; then
2694     CXXFLAGS="-O2"
2695   else
2696     CXXFLAGS=
2697   fi
2698 fi
2699 for ac_declaration in \
2700    ''\
2701    '#include <stdlib.h>' \
2702    'extern "C" void std::exit (int) throw (); using std::exit;' \
2703    'extern "C" void std::exit (int); using std::exit;' \
2704    'extern "C" void exit (int) throw ();' \
2705    'extern "C" void exit (int);' \
2706    'void exit (int);'
2707 do
2708   cat >conftest.$ac_ext <<_ACEOF
2709 #line 2709 "configure"
2710 #include "confdefs.h"
2711 #include <stdlib.h>
2712 $ac_declaration
2713 int
2714 main ()
2715 {
2716 exit (42);
2717   ;
2718   return 0;
2719 }
2720 _ACEOF
2721 rm -f conftest.$ac_objext
2722 if { (eval echo "$as_me:2722: \"$ac_compile\"") >&5
2723   (eval $ac_compile) 2>&5
2724   ac_status=$?
2725   echo "$as_me:2725: \$? = $ac_status" >&5
2726   (exit $ac_status); } &&
2727          { ac_try='test -s conftest.$ac_objext'
2728   { (eval echo "$as_me:2728: \"$ac_try\"") >&5
2729   (eval $ac_try) 2>&5
2730   ac_status=$?
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); }; }; then
2733   :
2734 else
2735   echo "$as_me: failed program was:" >&5
2736 cat conftest.$ac_ext >&5
2737 continue
2738 fi
2739 rm -f conftest.$ac_objext conftest.$ac_ext
2740   cat >conftest.$ac_ext <<_ACEOF
2741 #line 2741 "configure"
2742 #include "confdefs.h"
2743 $ac_declaration
2744 int
2745 main ()
2746 {
2747 exit (42);
2748   ;
2749   return 0;
2750 }
2751 _ACEOF
2752 rm -f conftest.$ac_objext
2753 if { (eval echo "$as_me:2753: \"$ac_compile\"") >&5
2754   (eval $ac_compile) 2>&5
2755   ac_status=$?
2756   echo "$as_me:2756: \$? = $ac_status" >&5
2757   (exit $ac_status); } &&
2758          { ac_try='test -s conftest.$ac_objext'
2759   { (eval echo "$as_me:2759: \"$ac_try\"") >&5
2760   (eval $ac_try) 2>&5
2761   ac_status=$?
2762   echo "$as_me:2762: \$? = $ac_status" >&5
2763   (exit $ac_status); }; }; then
2764   break
2765 else
2766   echo "$as_me: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2768 fi
2769 rm -f conftest.$ac_objext conftest.$ac_ext
2770 done
2771 rm -rf conftest*
2772 if test -n "$ac_declaration"; then
2773   echo '#ifdef __cplusplus' >>confdefs.h
2774   echo $ac_declaration      >>confdefs.h
2775   echo '#endif'             >>confdefs.h
2776 fi
2777
2778 ac_ext=c
2779 ac_cpp='$CPP $CPPFLAGS'
2780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2783 ac_main_return=return
2784
2785                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2786         if test "$CXX" = "g++" ; then
2787                 # Extract the first word of "g++", so it can be a program name with args.
2788 set dummy g++; ac_word=$2
2789 echo "$as_me:2789: checking for $ac_word" >&5
2790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2791 if test "${ac_cv_path_CXX+set}" = set; then
2792   echo $ECHO_N "(cached) $ECHO_C" >&6
2793 else
2794   case $CXX in
2795   [\\/]* | ?:[\\/]*)
2796   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2797   ;;
2798   *)
2799   ac_save_IFS=$IFS; IFS=$ac_path_separator
2800 ac_dummy="$PATH"
2801 for ac_dir in $ac_dummy; do
2802   IFS=$ac_save_IFS
2803   test -z "$ac_dir" && ac_dir=.
2804   if $as_executable_p "$ac_dir/$ac_word"; then
2805    ac_cv_path_CXX="$ac_dir/$ac_word"
2806    echo "$as_me:2806: found $ac_dir/$ac_word" >&5
2807    break
2808 fi
2809 done
2810
2811   ;;
2812 esac
2813 fi
2814 CXX=$ac_cv_path_CXX
2815
2816 if test -n "$CXX"; then
2817   echo "$as_me:2817: result: $CXX" >&5
2818 echo "${ECHO_T}$CXX" >&6
2819 else
2820   echo "$as_me:2820: result: no" >&5
2821 echo "${ECHO_T}no" >&6
2822 fi
2823
2824         fi
2825         case "x$CXX" in #(vi
2826         x|xg++)
2827                 { echo "$as_me:2827: WARNING: You don't have any C++ compiler, too bad" >&5
2828 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2829                 cf_with_cxx=no; CXX=""; GXX="";
2830                 ;;
2831         esac
2832 fi
2833
2834 GXX_VERSION=none
2835 if test "$GXX" = yes; then
2836         echo "$as_me:2836: checking version of ${CXX:-g++}" >&5
2837 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2838         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2839         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2840         echo "$as_me:2840: result: $GXX_VERSION" >&5
2841 echo "${ECHO_T}$GXX_VERSION" >&6
2842 fi
2843
2844 case $GXX_VERSION in
2845 1*|2.[0-6]*)
2846         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2847         # cf_cxx_library=no
2848         { echo "$as_me:2848: WARNING: templates do not work" >&5
2849 echo "$as_me: WARNING: templates do not work" >&2;}
2850         ;;
2851 esac
2852
2853 echo "$as_me:2853: checking if you want to build C++ binding and demo" >&5
2854 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2855
2856 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2857 if test "${with_cxx_binding+set}" = set; then
2858   withval="$with_cxx_binding"
2859   cf_with_cxx_binding=$withval
2860 else
2861   cf_with_cxx_binding=$cf_with_cxx
2862 fi;
2863 echo "$as_me:2863: result: $cf_with_cxx_binding" >&5
2864 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2865
2866 echo "$as_me:2866: checking if you want to build with Ada95" >&5
2867 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2868 echo "$as_me:2868: result: $cf_with_ada" >&5
2869 echo "${ECHO_T}$cf_with_ada" >&6
2870
2871 echo "$as_me:2871: checking if you want to install terminal database" >&5
2872 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
2873
2874 # Check whether --enable-db-install or --disable-db-install was given.
2875 if test "${enable_db_install+set}" = set; then
2876   enableval="$enable_db_install"
2877   cf_with_db_install=$enableval
2878 else
2879   cf_with_db_install=yes
2880 fi;
2881 echo "$as_me:2881: result: $cf_with_db_install" >&5
2882 echo "${ECHO_T}$cf_with_db_install" >&6
2883
2884 echo "$as_me:2884: checking if you want to install manpages" >&5
2885 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2886
2887 # Check whether --with-manpages or --without-manpages was given.
2888 if test "${with_manpages+set}" = set; then
2889   withval="$with_manpages"
2890   cf_with_manpages=$withval
2891 else
2892   cf_with_manpages=yes
2893 fi;
2894 echo "$as_me:2894: result: $cf_with_manpages" >&5
2895 echo "${ECHO_T}$cf_with_manpages" >&6
2896
2897 echo "$as_me:2897: checking if you want to build programs such as tic" >&5
2898 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2899
2900 # Check whether --with-progs or --without-progs was given.
2901 if test "${with_progs+set}" = set; then
2902   withval="$with_progs"
2903   cf_with_progs=$withval
2904 else
2905   cf_with_progs=yes
2906 fi;
2907 echo "$as_me:2907: result: $cf_with_progs" >&5
2908 echo "${ECHO_T}$cf_with_progs" >&6
2909
2910 echo "$as_me:2910: checking if you want to build test-programs" >&5
2911 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2912
2913 # Check whether --with-tests or --without-tests was given.
2914 if test "${with_tests+set}" = set; then
2915   withval="$with_tests"
2916   cf_with_tests=$withval
2917 else
2918   cf_with_tests=yes
2919 fi;
2920 echo "$as_me:2920: result: $cf_with_tests" >&5
2921 echo "${ECHO_T}$cf_with_tests" >&6
2922
2923 echo "$as_me:2923: checking if you wish to install curses.h" >&5
2924 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2925
2926 # Check whether --with-curses-h or --without-curses-h was given.
2927 if test "${with_curses_h+set}" = set; then
2928   withval="$with_curses_h"
2929   with_curses_h=$withval
2930 else
2931   with_curses_h=yes
2932 fi;
2933 echo "$as_me:2933: result: $with_curses_h" >&5
2934 echo "${ECHO_T}$with_curses_h" >&6
2935
2936 modules_to_build="ncurses"
2937 if test "X$cf_with_progs" != Xno ; then
2938 modules_to_build="$modules_to_build progs tack"
2939 fi
2940 modules_to_build="$modules_to_build panel menu form"
2941
2942 test "$program_prefix" != NONE &&
2943   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2944 # Use a double $ so make ignores it.
2945 test "$program_suffix" != NONE &&
2946   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2947 # Double any \ or $.  echo might interpret backslashes.
2948 # By default was `s,x,x', remove it if useless.
2949 cat <<\_ACEOF >conftest.sed
2950 s/[\\$]/&&/g;s/;s,x,x,$//
2951 _ACEOF
2952 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2953 rm conftest.sed
2954
2955 for ac_prog in mawk gawk nawk awk
2956 do
2957   # Extract the first word of "$ac_prog", so it can be a program name with args.
2958 set dummy $ac_prog; ac_word=$2
2959 echo "$as_me:2959: checking for $ac_word" >&5
2960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2961 if test "${ac_cv_prog_AWK+set}" = set; then
2962   echo $ECHO_N "(cached) $ECHO_C" >&6
2963 else
2964   if test -n "$AWK"; then
2965   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2966 else
2967   ac_save_IFS=$IFS; IFS=$ac_path_separator
2968 ac_dummy="$PATH"
2969 for ac_dir in $ac_dummy; do
2970   IFS=$ac_save_IFS
2971   test -z "$ac_dir" && ac_dir=.
2972   $as_executable_p "$ac_dir/$ac_word" || continue
2973 ac_cv_prog_AWK="$ac_prog"
2974 echo "$as_me:2974: found $ac_dir/$ac_word" >&5
2975 break
2976 done
2977
2978 fi
2979 fi
2980 AWK=$ac_cv_prog_AWK
2981 if test -n "$AWK"; then
2982   echo "$as_me:2982: result: $AWK" >&5
2983 echo "${ECHO_T}$AWK" >&6
2984 else
2985   echo "$as_me:2985: result: no" >&5
2986 echo "${ECHO_T}no" >&6
2987 fi
2988
2989   test -n "$AWK" && break
2990 done
2991
2992 test -z "$AWK" && { { echo "$as_me:2992: error: No awk program found" >&5
2993 echo "$as_me: error: No awk program found" >&2;}
2994    { (exit 1); exit 1; }; }
2995
2996 echo "$as_me:2996: checking for egrep" >&5
2997 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2998 if test "${ac_cv_prog_egrep+set}" = set; then
2999   echo $ECHO_N "(cached) $ECHO_C" >&6
3000 else
3001   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3002     then ac_cv_prog_egrep='grep -E'
3003     else ac_cv_prog_egrep='egrep'
3004     fi
3005 fi
3006 echo "$as_me:3006: result: $ac_cv_prog_egrep" >&5
3007 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3008  EGREP=$ac_cv_prog_egrep
3009
3010 test -z "$EGREP" && { { echo "$as_me:3010: error: No egrep program found" >&5
3011 echo "$as_me: error: No egrep program found" >&2;}
3012    { (exit 1); exit 1; }; }
3013
3014 # Find a good install program.  We prefer a C program (faster),
3015 # so one script is as good as another.  But avoid the broken or
3016 # incompatible versions:
3017 # SysV /etc/install, /usr/sbin/install
3018 # SunOS /usr/etc/install
3019 # IRIX /sbin/install
3020 # AIX /bin/install
3021 # AmigaOS /C/install, which installs bootblocks on floppy discs
3022 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3023 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3024 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3025 # ./install, which can be erroneously created by make from ./install.sh.
3026 echo "$as_me:3026: checking for a BSD compatible install" >&5
3027 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3028 if test -z "$INSTALL"; then
3029 if test "${ac_cv_path_install+set}" = set; then
3030   echo $ECHO_N "(cached) $ECHO_C" >&6
3031 else
3032     ac_save_IFS=$IFS; IFS=$ac_path_separator
3033   for ac_dir in $PATH; do
3034     IFS=$ac_save_IFS
3035     # Account for people who put trailing slashes in PATH elements.
3036     case $ac_dir/ in
3037     / | ./ | .// | /cC/* \
3038     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3039     | /usr/ucb/* ) ;;
3040     *)
3041       # OSF1 and SCO ODT 3.0 have their own names for install.
3042       # Don't use installbsd from OSF since it installs stuff as root
3043       # by default.
3044       for ac_prog in ginstall scoinst install; do
3045         if $as_executable_p "$ac_dir/$ac_prog"; then
3046           if test $ac_prog = install &&
3047             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3048             # AIX install.  It has an incompatible calling convention.
3049             :
3050           elif test $ac_prog = install &&
3051             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3052             # program-specific install script used by HP pwplus--don't use.
3053             :
3054           else
3055             ac_cv_path_install="$ac_dir/$ac_prog -c"
3056             break 2
3057           fi
3058         fi
3059       done
3060       ;;
3061     esac
3062   done
3063
3064 fi
3065   if test "${ac_cv_path_install+set}" = set; then
3066     INSTALL=$ac_cv_path_install
3067   else
3068     # As a last resort, use the slow shell script.  We don't cache a
3069     # path for INSTALL within a source directory, because that will
3070     # break other packages using the cache if that directory is
3071     # removed, or if the path is relative.
3072     INSTALL=$ac_install_sh
3073   fi
3074 fi
3075 echo "$as_me:3075: result: $INSTALL" >&5
3076 echo "${ECHO_T}$INSTALL" >&6
3077
3078 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3079 # It thinks the first close brace ends the variable substitution.
3080 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3081
3082 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3083
3084 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3085
3086 case $INSTALL in
3087 /*)
3088   ;;
3089 *)
3090   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3091   test -z "$cf_dir" && cf_dir=.
3092   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3093   ;;
3094 esac
3095
3096 for ac_prog in tdlint lint alint splint lclint
3097 do
3098   # Extract the first word of "$ac_prog", so it can be a program name with args.
3099 set dummy $ac_prog; ac_word=$2
3100 echo "$as_me:3100: checking for $ac_word" >&5
3101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3102 if test "${ac_cv_prog_LINT+set}" = set; then
3103   echo $ECHO_N "(cached) $ECHO_C" >&6
3104 else
3105   if test -n "$LINT"; then
3106   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3107 else
3108   ac_save_IFS=$IFS; IFS=$ac_path_separator
3109 ac_dummy="$PATH"
3110 for ac_dir in $ac_dummy; do
3111   IFS=$ac_save_IFS
3112   test -z "$ac_dir" && ac_dir=.
3113   $as_executable_p "$ac_dir/$ac_word" || continue
3114 ac_cv_prog_LINT="$ac_prog"
3115 echo "$as_me:3115: found $ac_dir/$ac_word" >&5
3116 break
3117 done
3118
3119 fi
3120 fi
3121 LINT=$ac_cv_prog_LINT
3122 if test -n "$LINT"; then
3123   echo "$as_me:3123: result: $LINT" >&5
3124 echo "${ECHO_T}$LINT" >&6
3125 else
3126   echo "$as_me:3126: result: no" >&5
3127 echo "${ECHO_T}no" >&6
3128 fi
3129
3130   test -n "$LINT" && break
3131 done
3132
3133 echo "$as_me:3133: checking whether ln -s works" >&5
3134 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3135 LN_S=$as_ln_s
3136 if test "$LN_S" = "ln -s"; then
3137   echo "$as_me:3137: result: yes" >&5
3138 echo "${ECHO_T}yes" >&6
3139 else
3140   echo "$as_me:3140: result: no, using $LN_S" >&5
3141 echo "${ECHO_T}no, using $LN_S" >&6
3142 fi
3143
3144 echo "$as_me:3144: checking if $LN_S -f options work" >&5
3145 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3146
3147 rm -f conf$$.src conf$$dst
3148 echo >conf$$.dst
3149 echo first >conf$$.src
3150 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3151         cf_prog_ln_sf=yes
3152 else
3153         cf_prog_ln_sf=no
3154 fi
3155 rm -f conf$$.dst conf$$src
3156 echo "$as_me:3156: result: $cf_prog_ln_sf" >&5
3157 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3158
3159 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3160
3161 echo "$as_me:3161: checking for long file names" >&5
3162 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3163 if test "${ac_cv_sys_long_file_names+set}" = set; then
3164   echo $ECHO_N "(cached) $ECHO_C" >&6
3165 else
3166   ac_cv_sys_long_file_names=yes
3167 # Test for long file names in all the places we know might matter:
3168 #      .                the current directory, where building will happen
3169 #      $prefix/lib      where we will be installing things
3170 #      $exec_prefix/lib likewise
3171 # eval it to expand exec_prefix.
3172 #      $TMPDIR          if set, where it might want to write temporary files
3173 # if $TMPDIR is not set:
3174 #      /tmp             where it might want to write temporary files
3175 #      /var/tmp         likewise
3176 #      /usr/tmp         likewise
3177 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3178   ac_tmpdirs=$TMPDIR
3179 else
3180   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3181 fi
3182 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3183   test -d $ac_dir || continue
3184   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3185   ac_xdir=$ac_dir/cf$$
3186   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3187   ac_tf1=$ac_xdir/conftest9012345
3188   ac_tf2=$ac_xdir/conftest9012346
3189   (echo 1 >$ac_tf1) 2>/dev/null
3190   (echo 2 >$ac_tf2) 2>/dev/null
3191   ac_val=`cat $ac_tf1 2>/dev/null`
3192   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3193     ac_cv_sys_long_file_names=no
3194     rm -rf $ac_xdir 2>/dev/null
3195     break
3196   fi
3197   rm -rf $ac_xdir 2>/dev/null
3198 done
3199 fi
3200 echo "$as_me:3200: result: $ac_cv_sys_long_file_names" >&5
3201 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3202 if test $ac_cv_sys_long_file_names = yes; then
3203
3204 cat >>confdefs.h <<\EOF
3205 #define HAVE_LONG_FILE_NAMES 1
3206 EOF
3207
3208 fi
3209
3210 # if we find pkg-config, check if we should install the ".pc" files.
3211
3212 echo "$as_me:3212: checking if you want to use pkg-config" >&5
3213 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3214
3215 # Check whether --with-pkg-config or --without-pkg-config was given.
3216 if test "${with_pkg_config+set}" = set; then
3217   withval="$with_pkg_config"
3218   cf_pkg_config=$withval
3219 else
3220   cf_pkg_config=yes
3221 fi;
3222 echo "$as_me:3222: result: $cf_pkg_config" >&5
3223 echo "${ECHO_T}$cf_pkg_config" >&6
3224
3225 case $cf_pkg_config in #(vi
3226 no) #(vi
3227         PKG_CONFIG=none
3228         ;;
3229 yes) #(vi
3230
3231 if test -n "$ac_tool_prefix"; then
3232   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3233 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3234 echo "$as_me:3234: checking for $ac_word" >&5
3235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3236 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3237   echo $ECHO_N "(cached) $ECHO_C" >&6
3238 else
3239   case $PKG_CONFIG in
3240   [\\/]* | ?:[\\/]*)
3241   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3242   ;;
3243   *)
3244   ac_save_IFS=$IFS; IFS=$ac_path_separator
3245 ac_dummy="$PATH"
3246 for ac_dir in $ac_dummy; do
3247   IFS=$ac_save_IFS
3248   test -z "$ac_dir" && ac_dir=.
3249   if $as_executable_p "$ac_dir/$ac_word"; then
3250    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3251    echo "$as_me:3251: found $ac_dir/$ac_word" >&5
3252    break
3253 fi
3254 done
3255
3256   ;;
3257 esac
3258 fi
3259 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3260
3261 if test -n "$PKG_CONFIG"; then
3262   echo "$as_me:3262: result: $PKG_CONFIG" >&5
3263 echo "${ECHO_T}$PKG_CONFIG" >&6
3264 else
3265   echo "$as_me:3265: result: no" >&5
3266 echo "${ECHO_T}no" >&6
3267 fi
3268
3269 fi
3270 if test -z "$ac_cv_path_PKG_CONFIG"; then
3271   ac_pt_PKG_CONFIG=$PKG_CONFIG
3272   # Extract the first word of "pkg-config", so it can be a program name with args.
3273 set dummy pkg-config; ac_word=$2
3274 echo "$as_me:3274: checking for $ac_word" >&5
3275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3276 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3277   echo $ECHO_N "(cached) $ECHO_C" >&6
3278 else
3279   case $ac_pt_PKG_CONFIG in
3280   [\\/]* | ?:[\\/]*)
3281   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3282   ;;
3283   *)
3284   ac_save_IFS=$IFS; IFS=$ac_path_separator
3285 ac_dummy="$PATH"
3286 for ac_dir in $ac_dummy; do
3287   IFS=$ac_save_IFS
3288   test -z "$ac_dir" && ac_dir=.
3289   if $as_executable_p "$ac_dir/$ac_word"; then
3290    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3291    echo "$as_me:3291: found $ac_dir/$ac_word" >&5
3292    break
3293 fi
3294 done
3295
3296   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3297   ;;
3298 esac
3299 fi
3300 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3301
3302 if test -n "$ac_pt_PKG_CONFIG"; then
3303   echo "$as_me:3303: result: $ac_pt_PKG_CONFIG" >&5
3304 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3305 else
3306   echo "$as_me:3306: result: no" >&5
3307 echo "${ECHO_T}no" >&6
3308 fi
3309
3310   PKG_CONFIG=$ac_pt_PKG_CONFIG
3311 else
3312   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3313 fi
3314
3315         ;;
3316 *)
3317         PKG_CONFIG=$withval
3318         ;;
3319 esac
3320
3321 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3322 if test "$PKG_CONFIG" != none ; then
3323
3324 if test "x$prefix" != xNONE; then
3325   cf_path_syntax="$prefix"
3326 else
3327   cf_path_syntax="$ac_default_prefix"
3328 fi
3329
3330 case ".$PKG_CONFIG" in #(vi
3331 .\$\(*\)*|.\'*\'*) #(vi
3332   ;;
3333 ..|./*|.\\*) #(vi
3334   ;;
3335 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3336   ;;
3337 .\${*prefix}*|.\${*dir}*) #(vi
3338   eval PKG_CONFIG="$PKG_CONFIG"
3339   case ".$PKG_CONFIG" in #(vi
3340   .NONE/*)
3341     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3342     ;;
3343   esac
3344   ;; #(vi
3345 .no|.NONE/*)
3346   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3347   ;;
3348 *)
3349   { { echo "$as_me:3349: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3350 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3351    { (exit 1); exit 1; }; }
3352   ;;
3353 esac
3354
3355 fi
3356
3357 if test "$PKG_CONFIG" != none ; then
3358         echo "$as_me:3358: checking for $PKG_CONFIG library directory" >&5
3359 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3360
3361 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3362 if test "${with_pkg_config_libdir+set}" = set; then
3363   withval="$with_pkg_config_libdir"
3364   PKG_CONFIG_LIBDIR=$withval
3365 else
3366   PKG_CONFIG_LIBDIR=yes
3367 fi;
3368
3369         case x$PKG_CONFIG_LIBDIR in #(vi
3370         x/*) #(vi
3371                 ;;
3372         xyes) #(vi
3373                 # look for the library directory using the same prefix as the executable
3374                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3375                 case x`(arch) 2>/dev/null` in #(vi
3376                 *64) #(vi
3377                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3378                         do
3379                                 if test -d $cf_config/pkgconfig
3380                                 then
3381                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3382                                         break
3383                                 fi
3384                         done
3385                         ;;
3386                 *)
3387                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3388                         ;;
3389                 esac
3390                 ;;
3391         *)
3392                 ;;
3393         esac
3394
3395         echo "$as_me:3395: result: $PKG_CONFIG_LIBDIR" >&5
3396 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3397 fi
3398
3399 if test "$PKG_CONFIG" != none ; then
3400         echo "$as_me:3400: checking if we should install .pc files for $PKG_CONFIG" >&5
3401 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3402
3403 # Check whether --enable-pc-files or --disable-pc-files was given.
3404 if test "${enable_pc_files+set}" = set; then
3405   enableval="$enable_pc_files"
3406   enable_pc_files=$enableval
3407 else
3408   enable_pc_files=no
3409 fi;
3410         echo "$as_me:3410: result: $enable_pc_files" >&5
3411 echo "${ECHO_T}$enable_pc_files" >&6
3412         if test "$enable_pc_files" != no
3413         then
3414
3415 if test "x$prefix" != xNONE; then
3416   cf_path_syntax="$prefix"
3417 else
3418   cf_path_syntax="$ac_default_prefix"
3419 fi
3420
3421 case ".$PKG_CONFIG_LIBDIR" in #(vi
3422 .\$\(*\)*|.\'*\'*) #(vi
3423   ;;
3424 ..|./*|.\\*) #(vi
3425   ;;
3426 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3427   ;;
3428 .\${*prefix}*|.\${*dir}*) #(vi
3429   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3430   case ".$PKG_CONFIG_LIBDIR" in #(vi
3431   .NONE/*)
3432     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3433     ;;
3434   esac
3435   ;; #(vi
3436 .no|.NONE/*)
3437   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3438   ;;
3439 *)
3440   { { echo "$as_me:3440: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3441 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3442    { (exit 1); exit 1; }; }
3443   ;;
3444 esac
3445
3446         fi
3447 else
3448         enable_pc_files=no
3449 fi
3450
3451 echo "$as_me:3451: checking if we should assume mixed-case filenames" >&5
3452 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3453
3454 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3455 if test "${enable_mixed_case+set}" = set; then
3456   enableval="$enable_mixed_case"
3457   enable_mixedcase=$enableval
3458 else
3459   enable_mixedcase=auto
3460 fi;
3461 echo "$as_me:3461: result: $enable_mixedcase" >&5
3462 echo "${ECHO_T}$enable_mixedcase" >&6
3463 if test "$enable_mixedcase" = "auto" ; then
3464
3465 echo "$as_me:3465: checking if filesystem supports mixed-case filenames" >&5
3466 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3467 if test "${cf_cv_mixedcase+set}" = set; then
3468   echo $ECHO_N "(cached) $ECHO_C" >&6
3469 else
3470
3471 if test "$cross_compiling" = yes ; then
3472         case $target_alias in #(vi
3473         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3474                 cf_cv_mixedcase=no
3475                 ;;
3476         *)
3477                 cf_cv_mixedcase=yes
3478                 ;;
3479         esac
3480 else
3481         rm -f conftest CONFTEST
3482         echo test >conftest
3483         if test -f CONFTEST ; then
3484                 cf_cv_mixedcase=no
3485         else
3486                 cf_cv_mixedcase=yes
3487         fi
3488         rm -f conftest CONFTEST
3489 fi
3490
3491 fi
3492 echo "$as_me:3492: result: $cf_cv_mixedcase" >&5
3493 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3494 test "$cf_cv_mixedcase" = yes &&
3495 cat >>confdefs.h <<\EOF
3496 #define MIXEDCASE_FILENAMES 1
3497 EOF
3498
3499 else
3500     cf_cv_mixedcase=$enable_mixedcase
3501     if test "x$enable_mixedcase" = "xyes" ; then
3502
3503 cat >>confdefs.h <<\EOF
3504 #define MIXEDCASE_FILENAMES 1
3505 EOF
3506
3507     fi
3508 fi
3509
3510 # do this after mixed-case option (tags/TAGS is not as important as tic).
3511 echo "$as_me:3511: checking whether ${MAKE-make} sets \${MAKE}" >&5
3512 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3513 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3514 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3515   echo $ECHO_N "(cached) $ECHO_C" >&6
3516 else
3517   cat >conftest.make <<\EOF
3518 all:
3519         @echo 'ac_maketemp="${MAKE}"'
3520 EOF
3521 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3522 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3523 if test -n "$ac_maketemp"; then
3524   eval ac_cv_prog_make_${ac_make}_set=yes
3525 else
3526   eval ac_cv_prog_make_${ac_make}_set=no
3527 fi
3528 rm -f conftest.make
3529 fi
3530 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3531   echo "$as_me:3531: result: yes" >&5
3532 echo "${ECHO_T}yes" >&6
3533   SET_MAKE=
3534 else
3535   echo "$as_me:3535: result: no" >&5
3536 echo "${ECHO_T}no" >&6
3537   SET_MAKE="MAKE=${MAKE-make}"
3538 fi
3539
3540 for ac_prog in exctags ctags
3541 do
3542   # Extract the first word of "$ac_prog", so it can be a program name with args.
3543 set dummy $ac_prog; ac_word=$2
3544 echo "$as_me:3544: checking for $ac_word" >&5
3545 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3546 if test "${ac_cv_prog_CTAGS+set}" = set; then
3547   echo $ECHO_N "(cached) $ECHO_C" >&6
3548 else
3549   if test -n "$CTAGS"; then
3550   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3551 else
3552   ac_save_IFS=$IFS; IFS=$ac_path_separator
3553 ac_dummy="$PATH"
3554 for ac_dir in $ac_dummy; do
3555   IFS=$ac_save_IFS
3556   test -z "$ac_dir" && ac_dir=.
3557   $as_executable_p "$ac_dir/$ac_word" || continue
3558 ac_cv_prog_CTAGS="$ac_prog"
3559 echo "$as_me:3559: found $ac_dir/$ac_word" >&5
3560 break
3561 done
3562
3563 fi
3564 fi
3565 CTAGS=$ac_cv_prog_CTAGS
3566 if test -n "$CTAGS"; then
3567   echo "$as_me:3567: result: $CTAGS" >&5
3568 echo "${ECHO_T}$CTAGS" >&6
3569 else
3570   echo "$as_me:3570: result: no" >&5
3571 echo "${ECHO_T}no" >&6
3572 fi
3573
3574   test -n "$CTAGS" && break
3575 done
3576
3577 for ac_prog in exetags etags
3578 do
3579   # Extract the first word of "$ac_prog", so it can be a program name with args.
3580 set dummy $ac_prog; ac_word=$2
3581 echo "$as_me:3581: checking for $ac_word" >&5
3582 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3583 if test "${ac_cv_prog_ETAGS+set}" = set; then
3584   echo $ECHO_N "(cached) $ECHO_C" >&6
3585 else
3586   if test -n "$ETAGS"; then
3587   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3588 else
3589   ac_save_IFS=$IFS; IFS=$ac_path_separator
3590 ac_dummy="$PATH"
3591 for ac_dir in $ac_dummy; do
3592   IFS=$ac_save_IFS
3593   test -z "$ac_dir" && ac_dir=.
3594   $as_executable_p "$ac_dir/$ac_word" || continue
3595 ac_cv_prog_ETAGS="$ac_prog"
3596 echo "$as_me:3596: found $ac_dir/$ac_word" >&5
3597 break
3598 done
3599
3600 fi
3601 fi
3602 ETAGS=$ac_cv_prog_ETAGS
3603 if test -n "$ETAGS"; then
3604   echo "$as_me:3604: result: $ETAGS" >&5
3605 echo "${ECHO_T}$ETAGS" >&6
3606 else
3607   echo "$as_me:3607: result: no" >&5
3608 echo "${ECHO_T}no" >&6
3609 fi
3610
3611   test -n "$ETAGS" && break
3612 done
3613
3614 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3615 set dummy ${CTAGS:-ctags}; ac_word=$2
3616 echo "$as_me:3616: checking for $ac_word" >&5
3617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3618 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3619   echo $ECHO_N "(cached) $ECHO_C" >&6
3620 else
3621   if test -n "$MAKE_LOWER_TAGS"; then
3622   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3623 else
3624   ac_save_IFS=$IFS; IFS=$ac_path_separator
3625 ac_dummy="$PATH"
3626 for ac_dir in $ac_dummy; do
3627   IFS=$ac_save_IFS
3628   test -z "$ac_dir" && ac_dir=.
3629   $as_executable_p "$ac_dir/$ac_word" || continue
3630 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3631 echo "$as_me:3631: found $ac_dir/$ac_word" >&5
3632 break
3633 done
3634
3635   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3636 fi
3637 fi
3638 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3639 if test -n "$MAKE_LOWER_TAGS"; then
3640   echo "$as_me:3640: result: $MAKE_LOWER_TAGS" >&5
3641 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3642 else
3643   echo "$as_me:3643: result: no" >&5
3644 echo "${ECHO_T}no" >&6
3645 fi
3646
3647 if test "$cf_cv_mixedcase" = yes ; then
3648         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3649 set dummy ${ETAGS:-etags}; ac_word=$2
3650 echo "$as_me:3650: checking for $ac_word" >&5
3651 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3652 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3653   echo $ECHO_N "(cached) $ECHO_C" >&6
3654 else
3655   if test -n "$MAKE_UPPER_TAGS"; then
3656   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3657 else
3658   ac_save_IFS=$IFS; IFS=$ac_path_separator
3659 ac_dummy="$PATH"
3660 for ac_dir in $ac_dummy; do
3661   IFS=$ac_save_IFS
3662   test -z "$ac_dir" && ac_dir=.
3663   $as_executable_p "$ac_dir/$ac_word" || continue
3664 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3665 echo "$as_me:3665: found $ac_dir/$ac_word" >&5
3666 break
3667 done
3668
3669   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3670 fi
3671 fi
3672 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3673 if test -n "$MAKE_UPPER_TAGS"; then
3674   echo "$as_me:3674: result: $MAKE_UPPER_TAGS" >&5
3675 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3676 else
3677   echo "$as_me:3677: result: no" >&5
3678 echo "${ECHO_T}no" >&6
3679 fi
3680
3681 else
3682         MAKE_UPPER_TAGS=no
3683 fi
3684
3685 if test "$MAKE_UPPER_TAGS" = yes ; then
3686         MAKE_UPPER_TAGS=
3687 else
3688         MAKE_UPPER_TAGS="#"
3689 fi
3690
3691 if test "$MAKE_LOWER_TAGS" = yes ; then
3692         MAKE_LOWER_TAGS=
3693 else
3694         MAKE_LOWER_TAGS="#"
3695 fi
3696
3697 echo "$as_me:3697: checking for makeflags variable" >&5
3698 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3699 if test "${cf_cv_makeflags+set}" = set; then
3700   echo $ECHO_N "(cached) $ECHO_C" >&6
3701 else
3702
3703         cf_cv_makeflags=''
3704         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3705         do
3706                 cat >cf_makeflags.tmp <<CF_EOF
3707 SHELL = /bin/sh
3708 all :
3709         @ echo '.$cf_option'
3710 CF_EOF
3711                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3712                 case "$cf_result" in
3713                 .*k|.*kw)
3714                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3715                         case "$cf_result" in
3716                         .*CC=*) cf_cv_makeflags=
3717                                 ;;
3718                         *)      cf_cv_makeflags=$cf_option
3719                                 ;;
3720                         esac
3721                         break
3722                         ;;
3723                 .-)     ;;
3724                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3725                         ;;
3726                 esac
3727         done
3728         rm -f cf_makeflags.tmp
3729
3730 fi
3731 echo "$as_me:3731: result: $cf_cv_makeflags" >&5
3732 echo "${ECHO_T}$cf_cv_makeflags" >&6
3733
3734 if test -n "$ac_tool_prefix"; then
3735   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3736 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3737 echo "$as_me:3737: checking for $ac_word" >&5
3738 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3739 if test "${ac_cv_prog_RANLIB+set}" = set; then
3740   echo $ECHO_N "(cached) $ECHO_C" >&6
3741 else
3742   if test -n "$RANLIB"; then
3743   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3744 else
3745   ac_save_IFS=$IFS; IFS=$ac_path_separator
3746 ac_dummy="$PATH"
3747 for ac_dir in $ac_dummy; do
3748   IFS=$ac_save_IFS
3749   test -z "$ac_dir" && ac_dir=.
3750   $as_executable_p "$ac_dir/$ac_word" || continue
3751 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3752 echo "$as_me:3752: found $ac_dir/$ac_word" >&5
3753 break
3754 done
3755
3756 fi
3757 fi
3758 RANLIB=$ac_cv_prog_RANLIB
3759 if test -n "$RANLIB"; then
3760   echo "$as_me:3760: result: $RANLIB" >&5
3761 echo "${ECHO_T}$RANLIB" >&6
3762 else
3763   echo "$as_me:3763: result: no" >&5
3764 echo "${ECHO_T}no" >&6
3765 fi
3766
3767 fi
3768 if test -z "$ac_cv_prog_RANLIB"; then
3769   ac_ct_RANLIB=$RANLIB
3770   # Extract the first word of "ranlib", so it can be a program name with args.
3771 set dummy ranlib; ac_word=$2
3772 echo "$as_me:3772: checking for $ac_word" >&5
3773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3774 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3775   echo $ECHO_N "(cached) $ECHO_C" >&6
3776 else
3777   if test -n "$ac_ct_RANLIB"; then
3778   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3779 else
3780   ac_save_IFS=$IFS; IFS=$ac_path_separator
3781 ac_dummy="$PATH"
3782 for ac_dir in $ac_dummy; do
3783   IFS=$ac_save_IFS
3784   test -z "$ac_dir" && ac_dir=.
3785   $as_executable_p "$ac_dir/$ac_word" || continue
3786 ac_cv_prog_ac_ct_RANLIB="ranlib"
3787 echo "$as_me:3787: found $ac_dir/$ac_word" >&5
3788 break
3789 done
3790
3791   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3792 fi
3793 fi
3794 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3795 if test -n "$ac_ct_RANLIB"; then
3796   echo "$as_me:3796: result: $ac_ct_RANLIB" >&5
3797 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3798 else
3799   echo "$as_me:3799: result: no" >&5
3800 echo "${ECHO_T}no" >&6
3801 fi
3802
3803   RANLIB=$ac_ct_RANLIB
3804 else
3805   RANLIB="$ac_cv_prog_RANLIB"
3806 fi
3807
3808 if test -n "$ac_tool_prefix"; then
3809   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3810 set dummy ${ac_tool_prefix}ld; ac_word=$2
3811 echo "$as_me:3811: checking for $ac_word" >&5
3812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3813 if test "${ac_cv_prog_LD+set}" = set; then
3814   echo $ECHO_N "(cached) $ECHO_C" >&6
3815 else
3816   if test -n "$LD"; then
3817   ac_cv_prog_LD="$LD" # Let the user override the test.
3818 else
3819   ac_save_IFS=$IFS; IFS=$ac_path_separator
3820 ac_dummy="$PATH"
3821 for ac_dir in $ac_dummy; do
3822   IFS=$ac_save_IFS
3823   test -z "$ac_dir" && ac_dir=.
3824   $as_executable_p "$ac_dir/$ac_word" || continue
3825 ac_cv_prog_LD="${ac_tool_prefix}ld"
3826 echo "$as_me:3826: found $ac_dir/$ac_word" >&5
3827 break
3828 done
3829
3830 fi
3831 fi
3832 LD=$ac_cv_prog_LD
3833 if test -n "$LD"; then
3834   echo "$as_me:3834: result: $LD" >&5
3835 echo "${ECHO_T}$LD" >&6
3836 else
3837   echo "$as_me:3837: result: no" >&5
3838 echo "${ECHO_T}no" >&6
3839 fi
3840
3841 fi
3842 if test -z "$ac_cv_prog_LD"; then
3843   ac_ct_LD=$LD
3844   # Extract the first word of "ld", so it can be a program name with args.
3845 set dummy ld; ac_word=$2
3846 echo "$as_me:3846: checking for $ac_word" >&5
3847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3848 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3849   echo $ECHO_N "(cached) $ECHO_C" >&6
3850 else
3851   if test -n "$ac_ct_LD"; then
3852   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3853 else
3854   ac_save_IFS=$IFS; IFS=$ac_path_separator
3855 ac_dummy="$PATH"
3856 for ac_dir in $ac_dummy; do
3857   IFS=$ac_save_IFS
3858   test -z "$ac_dir" && ac_dir=.
3859   $as_executable_p "$ac_dir/$ac_word" || continue
3860 ac_cv_prog_ac_ct_LD="ld"
3861 echo "$as_me:3861: found $ac_dir/$ac_word" >&5
3862 break
3863 done
3864
3865   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3866 fi
3867 fi
3868 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3869 if test -n "$ac_ct_LD"; then
3870   echo "$as_me:3870: result: $ac_ct_LD" >&5
3871 echo "${ECHO_T}$ac_ct_LD" >&6
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875 fi
3876
3877   LD=$ac_ct_LD
3878 else
3879   LD="$ac_cv_prog_LD"
3880 fi
3881
3882 if test -n "$ac_tool_prefix"; then
3883   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3884 set dummy ${ac_tool_prefix}ar; ac_word=$2
3885 echo "$as_me:3885: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_AR+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890   if test -n "$AR"; then
3891   ac_cv_prog_AR="$AR" # Let the user override the test.
3892 else
3893   ac_save_IFS=$IFS; IFS=$ac_path_separator
3894 ac_dummy="$PATH"
3895 for ac_dir in $ac_dummy; do
3896   IFS=$ac_save_IFS
3897   test -z "$ac_dir" && ac_dir=.
3898   $as_executable_p "$ac_dir/$ac_word" || continue
3899 ac_cv_prog_AR="${ac_tool_prefix}ar"
3900 echo "$as_me:3900: found $ac_dir/$ac_word" >&5
3901 break
3902 done
3903
3904 fi
3905 fi
3906 AR=$ac_cv_prog_AR
3907 if test -n "$AR"; then
3908   echo "$as_me:3908: result: $AR" >&5
3909 echo "${ECHO_T}$AR" >&6
3910 else
3911   echo "$as_me:3911: result: no" >&5
3912 echo "${ECHO_T}no" >&6
3913 fi
3914
3915 fi
3916 if test -z "$ac_cv_prog_AR"; then
3917   ac_ct_AR=$AR
3918   # Extract the first word of "ar", so it can be a program name with args.
3919 set dummy ar; ac_word=$2
3920 echo "$as_me:3920: checking for $ac_word" >&5
3921 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3922 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3923   echo $ECHO_N "(cached) $ECHO_C" >&6
3924 else
3925   if test -n "$ac_ct_AR"; then
3926   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3927 else
3928   ac_save_IFS=$IFS; IFS=$ac_path_separator
3929 ac_dummy="$PATH"
3930 for ac_dir in $ac_dummy; do
3931   IFS=$ac_save_IFS
3932   test -z "$ac_dir" && ac_dir=.
3933   $as_executable_p "$ac_dir/$ac_word" || continue
3934 ac_cv_prog_ac_ct_AR="ar"
3935 echo "$as_me:3935: found $ac_dir/$ac_word" >&5
3936 break
3937 done
3938
3939   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3940 fi
3941 fi
3942 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3943 if test -n "$ac_ct_AR"; then
3944   echo "$as_me:3944: result: $ac_ct_AR" >&5
3945 echo "${ECHO_T}$ac_ct_AR" >&6
3946 else
3947   echo "$as_me:3947: result: no" >&5
3948 echo "${ECHO_T}no" >&6
3949 fi
3950
3951   AR=$ac_ct_AR
3952 else
3953   AR="$ac_cv_prog_AR"
3954 fi
3955
3956 if test -n "$ac_tool_prefix"; then
3957   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
3958 set dummy ${ac_tool_prefix}nm; ac_word=$2
3959 echo "$as_me:3959: checking for $ac_word" >&5
3960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3961 if test "${ac_cv_prog_NM+set}" = set; then
3962   echo $ECHO_N "(cached) $ECHO_C" >&6
3963 else
3964   if test -n "$NM"; then
3965   ac_cv_prog_NM="$NM" # Let the user override the test.
3966 else
3967   ac_save_IFS=$IFS; IFS=$ac_path_separator
3968 ac_dummy="$PATH"
3969 for ac_dir in $ac_dummy; do
3970   IFS=$ac_save_IFS
3971   test -z "$ac_dir" && ac_dir=.
3972   $as_executable_p "$ac_dir/$ac_word" || continue
3973 ac_cv_prog_NM="${ac_tool_prefix}nm"
3974 echo "$as_me:3974: found $ac_dir/$ac_word" >&5
3975 break
3976 done
3977
3978 fi
3979 fi
3980 NM=$ac_cv_prog_NM
3981 if test -n "$NM"; then
3982   echo "$as_me:3982: result: $NM" >&5
3983 echo "${ECHO_T}$NM" >&6
3984 else
3985   echo "$as_me:3985: result: no" >&5
3986 echo "${ECHO_T}no" >&6
3987 fi
3988
3989 fi
3990 if test -z "$ac_cv_prog_NM"; then
3991   ac_ct_NM=$NM
3992   # Extract the first word of "nm", so it can be a program name with args.
3993 set dummy nm; ac_word=$2
3994 echo "$as_me:3994: checking for $ac_word" >&5
3995 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3996 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
3997   echo $ECHO_N "(cached) $ECHO_C" >&6
3998 else
3999   if test -n "$ac_ct_NM"; then
4000   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4001 else
4002   ac_save_IFS=$IFS; IFS=$ac_path_separator
4003 ac_dummy="$PATH"
4004 for ac_dir in $ac_dummy; do
4005   IFS=$ac_save_IFS
4006   test -z "$ac_dir" && ac_dir=.
4007   $as_executable_p "$ac_dir/$ac_word" || continue
4008 ac_cv_prog_ac_ct_NM="nm"
4009 echo "$as_me:4009: found $ac_dir/$ac_word" >&5
4010 break
4011 done
4012
4013   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4014 fi
4015 fi
4016 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4017 if test -n "$ac_ct_NM"; then
4018   echo "$as_me:4018: result: $ac_ct_NM" >&5
4019 echo "${ECHO_T}$ac_ct_NM" >&6
4020 else
4021   echo "$as_me:4021: result: no" >&5
4022 echo "${ECHO_T}no" >&6
4023 fi
4024
4025   NM=$ac_ct_NM
4026 else
4027   NM="$ac_cv_prog_NM"
4028 fi
4029
4030 if test -n "$ac_tool_prefix"; then
4031   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4032 set dummy ${ac_tool_prefix}ar; ac_word=$2
4033 echo "$as_me:4033: checking for $ac_word" >&5
4034 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4035 if test "${ac_cv_prog_AR+set}" = set; then
4036   echo $ECHO_N "(cached) $ECHO_C" >&6
4037 else
4038   if test -n "$AR"; then
4039   ac_cv_prog_AR="$AR" # Let the user override the test.
4040 else
4041   ac_save_IFS=$IFS; IFS=$ac_path_separator
4042 ac_dummy="$PATH"
4043 for ac_dir in $ac_dummy; do
4044   IFS=$ac_save_IFS
4045   test -z "$ac_dir" && ac_dir=.
4046   $as_executable_p "$ac_dir/$ac_word" || continue
4047 ac_cv_prog_AR="${ac_tool_prefix}ar"
4048 echo "$as_me:4048: found $ac_dir/$ac_word" >&5
4049 break
4050 done
4051
4052 fi
4053 fi
4054 AR=$ac_cv_prog_AR
4055 if test -n "$AR"; then
4056   echo "$as_me:4056: result: $AR" >&5
4057 echo "${ECHO_T}$AR" >&6
4058 else
4059   echo "$as_me:4059: result: no" >&5
4060 echo "${ECHO_T}no" >&6
4061 fi
4062
4063 fi
4064 if test -z "$ac_cv_prog_AR"; then
4065   ac_ct_AR=$AR
4066   # Extract the first word of "ar", so it can be a program name with args.
4067 set dummy ar; ac_word=$2
4068 echo "$as_me:4068: checking for $ac_word" >&5
4069 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4070 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4071   echo $ECHO_N "(cached) $ECHO_C" >&6
4072 else
4073   if test -n "$ac_ct_AR"; then
4074   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4075 else
4076   ac_save_IFS=$IFS; IFS=$ac_path_separator
4077 ac_dummy="$PATH"
4078 for ac_dir in $ac_dummy; do
4079   IFS=$ac_save_IFS
4080   test -z "$ac_dir" && ac_dir=.
4081   $as_executable_p "$ac_dir/$ac_word" || continue
4082 ac_cv_prog_ac_ct_AR="ar"
4083 echo "$as_me:4083: found $ac_dir/$ac_word" >&5
4084 break
4085 done
4086
4087   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4088 fi
4089 fi
4090 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4091 if test -n "$ac_ct_AR"; then
4092   echo "$as_me:4092: result: $ac_ct_AR" >&5
4093 echo "${ECHO_T}$ac_ct_AR" >&6
4094 else
4095   echo "$as_me:4095: result: no" >&5
4096 echo "${ECHO_T}no" >&6
4097 fi
4098
4099   AR=$ac_ct_AR
4100 else
4101   AR="$ac_cv_prog_AR"
4102 fi
4103
4104 echo "$as_me:4104: checking for options to update archives" >&5
4105 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4106 if test "${cf_cv_ar_flags+set}" = set; then
4107   echo $ECHO_N "(cached) $ECHO_C" >&6
4108 else
4109
4110         cf_cv_ar_flags=unknown
4111         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4112         do
4113
4114                 # check if $ARFLAGS already contains this choice
4115                 if test "x$ARFLAGS" != "x" ; then
4116                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4117                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4118                                 cf_cv_ar_flags=
4119                                 break
4120                         fi
4121                 fi
4122
4123                 rm -f conftest.$ac_cv_objext
4124                 rm -f conftest.a
4125
4126                 cat >conftest.$ac_ext <<EOF
4127 #line 4127 "configure"
4128 int     testdata[3] = { 123, 456, 789 };
4129 EOF
4130                 if { (eval echo "$as_me:4130: \"$ac_compile\"") >&5
4131   (eval $ac_compile) 2>&5
4132   ac_status=$?
4133   echo "$as_me:4133: \$? = $ac_status" >&5
4134   (exit $ac_status); } ; then
4135                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4136                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4137                         if test -f conftest.a ; then
4138                                 cf_cv_ar_flags=$cf_ar_flags
4139                                 break
4140                         fi
4141                 else
4142                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4143
4144 echo "${as_me:-configure}:4144: testing cannot compile test-program ..." 1>&5
4145
4146                         break
4147                 fi
4148         done
4149         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4150
4151 fi
4152 echo "$as_me:4152: result: $cf_cv_ar_flags" >&5
4153 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4154
4155 if test -n "$ARFLAGS" ; then
4156         if test -n "$cf_cv_ar_flags" ; then
4157                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4158         fi
4159 else
4160         ARFLAGS=$cf_cv_ar_flags
4161 fi
4162
4163 echo "$as_me:4163: checking if you have specified an install-prefix" >&5
4164 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4165
4166 # Check whether --with-install-prefix or --without-install-prefix was given.
4167 if test "${with_install_prefix+set}" = set; then
4168   withval="$with_install_prefix"
4169   case "x$withval" in #(vi
4170         xyes|xno) #(vi
4171                 ;;
4172         *)      DESTDIR="$withval"
4173                 ;;
4174         esac
4175 fi;
4176 echo "$as_me:4176: result: $DESTDIR" >&5
4177 echo "${ECHO_T}$DESTDIR" >&6
4178
4179 ###############################################################################
4180
4181 # If we're cross-compiling, allow the user to override the tools and their
4182 # options.  The configure script is oriented toward identifying the host
4183 # compiler, etc., but we need a build compiler to generate parts of the source.
4184
4185 if test "$cross_compiling" = yes ; then
4186
4187         # defaults that we might want to override
4188         : ${BUILD_CFLAGS:=''}
4189         : ${BUILD_CPPFLAGS:=''}
4190         : ${BUILD_LDFLAGS:=''}
4191         : ${BUILD_LIBS:=''}
4192         : ${BUILD_EXEEXT:='$x'}
4193         : ${BUILD_OBJEXT:='o'}
4194
4195 # Check whether --with-build-cc or --without-build-cc was given.
4196 if test "${with_build_cc+set}" = set; then
4197   withval="$with_build_cc"
4198   BUILD_CC="$withval"
4199 else
4200   for ac_prog in gcc cc cl
4201 do
4202   # Extract the first word of "$ac_prog", so it can be a program name with args.
4203 set dummy $ac_prog; ac_word=$2
4204 echo "$as_me:4204: checking for $ac_word" >&5
4205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4206 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4207   echo $ECHO_N "(cached) $ECHO_C" >&6
4208 else
4209   if test -n "$BUILD_CC"; then
4210   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4211 else
4212   ac_save_IFS=$IFS; IFS=$ac_path_separator
4213 ac_dummy="$PATH"
4214 for ac_dir in $ac_dummy; do
4215   IFS=$ac_save_IFS
4216   test -z "$ac_dir" && ac_dir=.
4217   $as_executable_p "$ac_dir/$ac_word" || continue
4218 ac_cv_prog_BUILD_CC="$ac_prog"
4219 echo "$as_me:4219: found $ac_dir/$ac_word" >&5
4220 break
4221 done
4222
4223 fi
4224 fi
4225 BUILD_CC=$ac_cv_prog_BUILD_CC
4226 if test -n "$BUILD_CC"; then
4227   echo "$as_me:4227: result: $BUILD_CC" >&5
4228 echo "${ECHO_T}$BUILD_CC" >&6
4229 else
4230   echo "$as_me:4230: result: no" >&5
4231 echo "${ECHO_T}no" >&6
4232 fi
4233
4234   test -n "$BUILD_CC" && break
4235 done
4236
4237 fi;
4238         echo "$as_me:4238: checking for native build C compiler" >&5
4239 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4240         echo "$as_me:4240: result: $BUILD_CC" >&5
4241 echo "${ECHO_T}$BUILD_CC" >&6
4242
4243         echo "$as_me:4243: checking for native build C preprocessor" >&5
4244 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4245
4246 # Check whether --with-build-cpp or --without-build-cpp was given.
4247 if test "${with_build_cpp+set}" = set; then
4248   withval="$with_build_cpp"
4249   BUILD_CPP="$withval"
4250 else
4251   BUILD_CPP='${BUILD_CC} -E'
4252 fi;
4253         echo "$as_me:4253: result: $BUILD_CPP" >&5
4254 echo "${ECHO_T}$BUILD_CPP" >&6
4255
4256         echo "$as_me:4256: checking for native build C flags" >&5
4257 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4258
4259 # Check whether --with-build-cflags or --without-build-cflags was given.
4260 if test "${with_build_cflags+set}" = set; then
4261   withval="$with_build_cflags"
4262   BUILD_CFLAGS="$withval"
4263 fi;
4264         echo "$as_me:4264: result: $BUILD_CFLAGS" >&5
4265 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4266
4267         echo "$as_me:4267: checking for native build C preprocessor-flags" >&5
4268 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4269
4270 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4271 if test "${with_build_cppflags+set}" = set; then
4272   withval="$with_build_cppflags"
4273   BUILD_CPPFLAGS="$withval"
4274 fi;
4275         echo "$as_me:4275: result: $BUILD_CPPFLAGS" >&5
4276 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4277
4278         echo "$as_me:4278: checking for native build linker-flags" >&5
4279 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4280
4281 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4282 if test "${with_build_ldflags+set}" = set; then
4283   withval="$with_build_ldflags"
4284   BUILD_LDFLAGS="$withval"
4285 fi;
4286         echo "$as_me:4286: result: $BUILD_LDFLAGS" >&5
4287 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4288
4289         echo "$as_me:4289: checking for native build linker-libraries" >&5
4290 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4291
4292 # Check whether --with-build-libs or --without-build-libs was given.
4293 if test "${with_build_libs+set}" = set; then
4294   withval="$with_build_libs"
4295   BUILD_LIBS="$withval"
4296 fi;
4297         echo "$as_me:4297: result: $BUILD_LIBS" >&5
4298 echo "${ECHO_T}$BUILD_LIBS" >&6
4299
4300         # this assumes we're on Unix.
4301         BUILD_EXEEXT=
4302         BUILD_OBJEXT=o
4303
4304         : ${BUILD_CC:='${CC}'}
4305
4306         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4307                 { { echo "$as_me:4307: error: Cross-build requires two compilers.
4308 Use --with-build-cc to specify the native compiler." >&5
4309 echo "$as_me: error: Cross-build requires two compilers.
4310 Use --with-build-cc to specify the native compiler." >&2;}
4311    { (exit 1); exit 1; }; }
4312         fi
4313
4314 else
4315         : ${BUILD_CC:='${CC}'}
4316         : ${BUILD_CPP:='${CPP}'}
4317         : ${BUILD_CFLAGS:='${CFLAGS}'}
4318         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4319         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4320         : ${BUILD_LIBS:='${LIBS}'}
4321         : ${BUILD_EXEEXT:='$x'}
4322         : ${BUILD_OBJEXT:='o'}
4323 fi
4324
4325 ###############################################################################
4326
4327 ### Options to allow the user to specify the set of libraries which are used.
4328 ### Use "--without-normal --with-shared" to allow the default model to be
4329 ### shared, for example.
4330 cf_list_models=""
4331
4332 echo "$as_me:4332: checking if libtool -version-number should be used" >&5
4333 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4334
4335 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4336 if test "${enable_libtool_version+set}" = set; then
4337   enableval="$enable_libtool_version"
4338   test "$enableval" != no && enableval=yes
4339   if test "$enableval" != "yes" ; then
4340     cf_libtool_version=no
4341   else
4342     cf_libtool_version=yes
4343   fi
4344 else
4345   enableval=yes
4346   cf_libtool_version=yes
4347
4348 fi;
4349 echo "$as_me:4349: result: $cf_libtool_version" >&5
4350 echo "${ECHO_T}$cf_libtool_version" >&6
4351
4352 if test "$cf_libtool_version" = yes ; then
4353         LIBTOOL_VERSION="-version-number"
4354 else
4355         LIBTOOL_VERSION="-version-info"
4356 fi
4357
4358 LIBTOOL=
4359
4360 # common library maintenance symbols that are convenient for libtool scripts:
4361 LIB_CREATE='${AR} -cr'
4362 LIB_OBJECT='${OBJECTS}'
4363 LIB_SUFFIX=.a
4364 LIB_PREP="$RANLIB"
4365
4366 # symbols used to prop libtool up to enable it to determine what it should be
4367 # doing:
4368 LIB_CLEAN=
4369 LIB_COMPILE=
4370 LIB_LINK='${CC}'
4371 LIB_INSTALL=
4372 LIB_UNINSTALL=
4373
4374 echo "$as_me:4374: checking if you want to build libraries with libtool" >&5
4375 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4376
4377 # Check whether --with-libtool or --without-libtool was given.
4378 if test "${with_libtool+set}" = set; then
4379   withval="$with_libtool"
4380   with_libtool=$withval
4381 else
4382   with_libtool=no
4383 fi;
4384 echo "$as_me:4384: result: $with_libtool" >&5
4385 echo "${ECHO_T}$with_libtool" >&6
4386 if test "$with_libtool" != "no"; then
4387
4388         if test "$with_libtool" != "yes" ; then
4389
4390 if test "x$prefix" != xNONE; then
4391   cf_path_syntax="$prefix"
4392 else
4393   cf_path_syntax="$ac_default_prefix"
4394 fi
4395
4396 case ".$with_libtool" in #(vi
4397 .\$\(*\)*|.\'*\'*) #(vi
4398   ;;
4399 ..|./*|.\\*) #(vi
4400   ;;
4401 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4402   ;;
4403 .\${*prefix}*|.\${*dir}*) #(vi
4404   eval with_libtool="$with_libtool"
4405   case ".$with_libtool" in #(vi
4406   .NONE/*)
4407     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4408     ;;
4409   esac
4410   ;; #(vi
4411 .no|.NONE/*)
4412   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4413   ;;
4414 *)
4415   { { echo "$as_me:4415: error: expected a pathname, not \"$with_libtool\"" >&5
4416 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4417    { (exit 1); exit 1; }; }
4418   ;;
4419 esac
4420
4421                 LIBTOOL=$with_libtool
4422         else
4423                 if test -n "$ac_tool_prefix"; then
4424   for ac_prog in libtool glibtool
4425   do
4426     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4427 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4428 echo "$as_me:4428: checking for $ac_word" >&5
4429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4430 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4431   echo $ECHO_N "(cached) $ECHO_C" >&6
4432 else
4433   if test -n "$LIBTOOL"; then
4434   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4435 else
4436   ac_save_IFS=$IFS; IFS=$ac_path_separator
4437 ac_dummy="$PATH"
4438 for ac_dir in $ac_dummy; do
4439   IFS=$ac_save_IFS
4440   test -z "$ac_dir" && ac_dir=.
4441   $as_executable_p "$ac_dir/$ac_word" || continue
4442 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4443 echo "$as_me:4443: found $ac_dir/$ac_word" >&5
4444 break
4445 done
4446
4447 fi
4448 fi
4449 LIBTOOL=$ac_cv_prog_LIBTOOL
4450 if test -n "$LIBTOOL"; then
4451   echo "$as_me:4451: result: $LIBTOOL" >&5
4452 echo "${ECHO_T}$LIBTOOL" >&6
4453 else
4454   echo "$as_me:4454: result: no" >&5
4455 echo "${ECHO_T}no" >&6
4456 fi
4457
4458     test -n "$LIBTOOL" && break
4459   done
4460 fi
4461 if test -z "$LIBTOOL"; then
4462   ac_ct_LIBTOOL=$LIBTOOL
4463   for ac_prog in libtool glibtool
4464 do
4465   # Extract the first word of "$ac_prog", so it can be a program name with args.
4466 set dummy $ac_prog; ac_word=$2
4467 echo "$as_me:4467: checking for $ac_word" >&5
4468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4469 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4470   echo $ECHO_N "(cached) $ECHO_C" >&6
4471 else
4472   if test -n "$ac_ct_LIBTOOL"; then
4473   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4474 else
4475   ac_save_IFS=$IFS; IFS=$ac_path_separator
4476 ac_dummy="$PATH"
4477 for ac_dir in $ac_dummy; do
4478   IFS=$ac_save_IFS
4479   test -z "$ac_dir" && ac_dir=.
4480   $as_executable_p "$ac_dir/$ac_word" || continue
4481 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4482 echo "$as_me:4482: found $ac_dir/$ac_word" >&5
4483 break
4484 done
4485
4486 fi
4487 fi
4488 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4489 if test -n "$ac_ct_LIBTOOL"; then
4490   echo "$as_me:4490: result: $ac_ct_LIBTOOL" >&5
4491 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4492 else
4493   echo "$as_me:4493: result: no" >&5
4494 echo "${ECHO_T}no" >&6
4495 fi
4496
4497   test -n "$ac_ct_LIBTOOL" && break
4498 done
4499 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4500
4501   LIBTOOL=$ac_ct_LIBTOOL
4502 fi
4503
4504 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4505 then
4506         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.].*//'`
4507 else
4508         cf_cv_libtool_version=
4509 fi
4510 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4511
4512                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4513                 then
4514
4515 unset ac_cv_prog_ac_ct_LIBTOOL
4516 unset ac_ct_LIBTOOL
4517 unset LIBTOOL
4518
4519                         if test -n "$ac_tool_prefix"; then
4520   for ac_prog in glibtool
4521   do
4522     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4523 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4524 echo "$as_me:4524: checking for $ac_word" >&5
4525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4526 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4527   echo $ECHO_N "(cached) $ECHO_C" >&6
4528 else
4529   if test -n "$LIBTOOL"; then
4530   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4531 else
4532   ac_save_IFS=$IFS; IFS=$ac_path_separator
4533 ac_dummy="$PATH"
4534 for ac_dir in $ac_dummy; do
4535   IFS=$ac_save_IFS
4536   test -z "$ac_dir" && ac_dir=.
4537   $as_executable_p "$ac_dir/$ac_word" || continue
4538 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4539 echo "$as_me:4539: found $ac_dir/$ac_word" >&5
4540 break
4541 done
4542
4543 fi
4544 fi
4545 LIBTOOL=$ac_cv_prog_LIBTOOL
4546 if test -n "$LIBTOOL"; then
4547   echo "$as_me:4547: result: $LIBTOOL" >&5
4548 echo "${ECHO_T}$LIBTOOL" >&6
4549 else
4550   echo "$as_me:4550: result: no" >&5
4551 echo "${ECHO_T}no" >&6
4552 fi
4553
4554     test -n "$LIBTOOL" && break
4555   done
4556 fi
4557 if test -z "$LIBTOOL"; then
4558   ac_ct_LIBTOOL=$LIBTOOL
4559   for ac_prog in glibtool
4560 do
4561   # Extract the first word of "$ac_prog", so it can be a program name with args.
4562 set dummy $ac_prog; ac_word=$2
4563 echo "$as_me:4563: checking for $ac_word" >&5
4564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4565 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4566   echo $ECHO_N "(cached) $ECHO_C" >&6
4567 else
4568   if test -n "$ac_ct_LIBTOOL"; then
4569   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4570 else
4571   ac_save_IFS=$IFS; IFS=$ac_path_separator
4572 ac_dummy="$PATH"
4573 for ac_dir in $ac_dummy; do
4574   IFS=$ac_save_IFS
4575   test -z "$ac_dir" && ac_dir=.
4576   $as_executable_p "$ac_dir/$ac_word" || continue
4577 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4578 echo "$as_me:4578: found $ac_dir/$ac_word" >&5
4579 break
4580 done
4581
4582 fi
4583 fi
4584 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4585 if test -n "$ac_ct_LIBTOOL"; then
4586   echo "$as_me:4586: result: $ac_ct_LIBTOOL" >&5
4587 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4588 else
4589   echo "$as_me:4589: result: no" >&5
4590 echo "${ECHO_T}no" >&6
4591 fi
4592
4593   test -n "$ac_ct_LIBTOOL" && break
4594 done
4595 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4596
4597   LIBTOOL=$ac_ct_LIBTOOL
4598 fi
4599
4600 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4601 then
4602         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.].*//'`
4603 else
4604         cf_cv_libtool_version=
4605 fi
4606 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4607
4608                 fi
4609         fi
4610         if test -z "$LIBTOOL" ; then
4611                 { { echo "$as_me:4611: error: Cannot find libtool" >&5
4612 echo "$as_me: error: Cannot find libtool" >&2;}
4613    { (exit 1); exit 1; }; }
4614         fi
4615         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4616         LIB_OBJECT='${OBJECTS:.o=.lo}'
4617         LIB_SUFFIX=.la
4618         LIB_CLEAN='${LIBTOOL} --mode=clean'
4619         LIB_COMPILE='${LIBTOOL} --mode=compile'
4620         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4621         LIB_INSTALL='${LIBTOOL} --mode=install'
4622         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4623         LIB_PREP=:
4624
4625 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4626 then
4627         echo "$as_me:4627: checking version of $LIBTOOL" >&5
4628 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4629
4630 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4631 then
4632         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.].*//'`
4633 else
4634         cf_cv_libtool_version=
4635 fi
4636 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4637
4638         echo "$as_me:4638: result: $cf_cv_libtool_version" >&5
4639 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4640         if test -z "$cf_cv_libtool_version" ; then
4641                 { { echo "$as_me:4641: error: This is not GNU libtool" >&5
4642 echo "$as_me: error: This is not GNU libtool" >&2;}
4643    { (exit 1); exit 1; }; }
4644         fi
4645 else
4646         { { echo "$as_me:4646: error: GNU libtool has not been found" >&5
4647 echo "$as_me: error: GNU libtool has not been found" >&2;}
4648    { (exit 1); exit 1; }; }
4649 fi
4650
4651         # special hack to add -no-undefined (which libtool should do for itself)
4652         LT_UNDEF=
4653         case "$cf_cv_system_name" in #(vi
4654         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4655                 LT_UNDEF=-no-undefined
4656                 ;;
4657         esac
4658
4659         # special hack to add --tag option for C++ compiler
4660         case $cf_cv_libtool_version in #(vi
4661         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4662                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4663                 LIBTOOL="$LIBTOOL --tag=CC"
4664                 ;;
4665         *)
4666                 LIBTOOL_CXX="$LIBTOOL"
4667                 ;;
4668         esac
4669 else
4670         LIBTOOL=""
4671         LIBTOOL_CXX=""
4672 fi
4673
4674 test -z "$LIBTOOL" && ECHO_LT=
4675
4676 if test "$with_libtool" != "no" ; then
4677
4678 cf_list_models="$cf_list_models libtool"
4679
4680 else
4681
4682 echo "$as_me:4682: checking if you want to build shared libraries" >&5
4683 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4684
4685 # Check whether --with-shared or --without-shared was given.
4686 if test "${with_shared+set}" = set; then
4687   withval="$with_shared"
4688   with_shared=$withval
4689 else
4690   with_shared=no
4691 fi;
4692 echo "$as_me:4692: result: $with_shared" >&5
4693 echo "${ECHO_T}$with_shared" >&6
4694 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4695
4696 echo "$as_me:4696: checking if you want to build static libraries" >&5
4697 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4698
4699 # Check whether --with-normal or --without-normal was given.
4700 if test "${with_normal+set}" = set; then
4701   withval="$with_normal"
4702   with_normal=$withval
4703 else
4704   with_normal=yes
4705 fi;
4706 echo "$as_me:4706: result: $with_normal" >&5
4707 echo "${ECHO_T}$with_normal" >&6
4708 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4709
4710 echo "$as_me:4710: checking if you want to build debug libraries" >&5
4711 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4712
4713 # Check whether --with-debug or --without-debug was given.
4714 if test "${with_debug+set}" = set; then
4715   withval="$with_debug"
4716   with_debug=$withval
4717 else
4718   with_debug=yes
4719 fi;
4720 echo "$as_me:4720: result: $with_debug" >&5
4721 echo "${ECHO_T}$with_debug" >&6
4722 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4723
4724 echo "$as_me:4724: checking if you want to build profiling libraries" >&5
4725 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4726
4727 # Check whether --with-profile or --without-profile was given.
4728 if test "${with_profile+set}" = set; then
4729   withval="$with_profile"
4730   with_profile=$withval
4731 else
4732   with_profile=no
4733 fi;
4734 echo "$as_me:4734: result: $with_profile" >&5
4735 echo "${ECHO_T}$with_profile" >&6
4736 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4737
4738 fi
4739
4740 if test "X$cf_with_cxx_binding" != Xno; then
4741 if test "x$with_shared" = "xyes"; then
4742 echo "$as_me:4742: checking if you want to build C++ shared libraries" >&5
4743 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4744
4745 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4746 if test "${with_cxx_shared+set}" = set; then
4747   withval="$with_cxx_shared"
4748   with_shared_cxx=$withval
4749 else
4750   with_shared_cxx=no
4751 fi;
4752 echo "$as_me:4752: result: $with_shared_cxx" >&5
4753 echo "${ECHO_T}$with_shared_cxx" >&6
4754 fi
4755 fi
4756
4757 ###############################################################################
4758
4759 echo "$as_me:4759: checking for specified models" >&5
4760 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4761 test -z "$cf_list_models" && cf_list_models=normal
4762 test "$with_libtool" != "no" && cf_list_models=libtool
4763 echo "$as_me:4763: result: $cf_list_models" >&5
4764 echo "${ECHO_T}$cf_list_models" >&6
4765
4766 ### Use the first model as the default, and save its suffix for use in building
4767 ### up test-applications.
4768 echo "$as_me:4768: checking for default model" >&5
4769 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4770 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4771 echo "$as_me:4771: result: $DFT_LWR_MODEL" >&5
4772 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4773
4774 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4775
4776 TICS_NAME=tic
4777
4778 TINFO_NAME=tinfo
4779
4780 LIB_NAME=ncurses
4781
4782 LIB_DIR=../lib
4783 LIB_2ND=../../lib
4784
4785 echo "$as_me:4785: checking if you want to have a library-prefix" >&5
4786 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4787
4788 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4789 if test "${with_lib_prefix+set}" = set; then
4790   withval="$with_lib_prefix"
4791   with_lib_prefix=$withval
4792 else
4793   with_lib_prefix=auto
4794 fi;
4795 echo "$as_me:4795: result: $with_lib_prefix" >&5
4796 echo "${ECHO_T}$with_lib_prefix" >&6
4797
4798 if test $with_lib_prefix = auto
4799 then
4800
4801         case $cf_cv_system_name in #(vi
4802         OS/2*|os2*) #(vi
4803         LIB_PREFIX=''
4804         ;;
4805         *)      LIB_PREFIX='lib'
4806         ;;
4807         esac
4808 cf_prefix=$LIB_PREFIX
4809
4810 elif test $with_lib_prefix = no
4811 then
4812         LIB_PREFIX=
4813 else
4814         LIB_PREFIX=$with_lib_prefix
4815 fi
4816
4817 LIB_SUFFIX=
4818
4819         echo "$as_me:4819: checking for PATH separator" >&5
4820 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4821         case $cf_cv_system_name in
4822         os2*)   PATH_SEPARATOR=';'  ;;
4823         *)      ${PATH_SEPARATOR:=':'}  ;;
4824         esac
4825
4826         echo "$as_me:4826: result: $PATH_SEPARATOR" >&5
4827 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4828
4829 ###############################################################################
4830
4831 echo "$as_me:4831: checking if you want to build a separate terminfo library" >&5
4832 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4833
4834 # Check whether --with-termlib or --without-termlib was given.
4835 if test "${with_termlib+set}" = set; then
4836   withval="$with_termlib"
4837   with_termlib=$withval
4838 else
4839   with_termlib=no
4840 fi;
4841 echo "$as_me:4841: result: $with_termlib" >&5
4842 echo "${ECHO_T}$with_termlib" >&6
4843
4844 echo "$as_me:4844: checking if you want to build a separate tic library" >&5
4845 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4846
4847 # Check whether --with-ticlib or --without-ticlib was given.
4848 if test "${with_ticlib+set}" = set; then
4849   withval="$with_ticlib"
4850   with_ticlib=$withval
4851 else
4852   with_ticlib=no
4853 fi;
4854 echo "$as_me:4854: result: $with_ticlib" >&5
4855 echo "${ECHO_T}$with_ticlib" >&6
4856
4857 ### Checks for special libraries, must be done up-front.
4858 SHLIB_LIST=""
4859
4860 echo "$as_me:4860: checking if you want to link with the GPM mouse library" >&5
4861 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4862
4863 # Check whether --with-gpm or --without-gpm was given.
4864 if test "${with_gpm+set}" = set; then
4865   withval="$with_gpm"
4866   with_gpm=$withval
4867 else
4868   with_gpm=maybe
4869 fi;
4870 echo "$as_me:4870: result: $with_gpm" >&5
4871 echo "${ECHO_T}$with_gpm" >&6
4872
4873 if test "$with_gpm" != no ; then
4874         echo "$as_me:4874: checking for gpm.h" >&5
4875 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4876 if test "${ac_cv_header_gpm_h+set}" = set; then
4877   echo $ECHO_N "(cached) $ECHO_C" >&6
4878 else
4879   cat >conftest.$ac_ext <<_ACEOF
4880 #line 4880 "configure"
4881 #include "confdefs.h"
4882 #include <gpm.h>
4883 _ACEOF
4884 if { (eval echo "$as_me:4884: \"$ac_cpp conftest.$ac_ext\"") >&5
4885   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4886   ac_status=$?
4887   egrep -v '^ *\+' conftest.er1 >conftest.err
4888   rm -f conftest.er1
4889   cat conftest.err >&5
4890   echo "$as_me:4890: \$? = $ac_status" >&5
4891   (exit $ac_status); } >/dev/null; then
4892   if test -s conftest.err; then
4893     ac_cpp_err=$ac_c_preproc_warn_flag
4894   else
4895     ac_cpp_err=
4896   fi
4897 else
4898   ac_cpp_err=yes
4899 fi
4900 if test -z "$ac_cpp_err"; then
4901   ac_cv_header_gpm_h=yes
4902 else
4903   echo "$as_me: failed program was:" >&5
4904   cat conftest.$ac_ext >&5
4905   ac_cv_header_gpm_h=no
4906 fi
4907 rm -f conftest.err conftest.$ac_ext
4908 fi
4909 echo "$as_me:4909: result: $ac_cv_header_gpm_h" >&5
4910 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4911 if test $ac_cv_header_gpm_h = yes; then
4912
4913 cat >>confdefs.h <<\EOF
4914 #define HAVE_GPM_H 1
4915 EOF
4916
4917                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4918                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4919
4920 echo "${as_me:-configure}:4920: testing assuming we really have GPM library ..." 1>&5
4921
4922 cat >>confdefs.h <<\EOF
4923 #define HAVE_LIBGPM 1
4924 EOF
4925
4926                 else
4927                         echo "$as_me:4927: checking for Gpm_Open in -lgpm" >&5
4928 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4929 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4930   echo $ECHO_N "(cached) $ECHO_C" >&6
4931 else
4932   ac_check_lib_save_LIBS=$LIBS
4933 LIBS="-lgpm  $LIBS"
4934 cat >conftest.$ac_ext <<_ACEOF
4935 #line 4935 "configure"
4936 #include "confdefs.h"
4937
4938 /* Override any gcc2 internal prototype to avoid an error.  */
4939 #ifdef __cplusplus
4940 extern "C"
4941 #endif
4942 /* We use char because int might match the return type of a gcc2
4943    builtin and then its argument prototype would still apply.  */
4944 char Gpm_Open ();
4945 int
4946 main ()
4947 {
4948 Gpm_Open ();
4949   ;
4950   return 0;
4951 }
4952 _ACEOF
4953 rm -f conftest.$ac_objext conftest$ac_exeext
4954 if { (eval echo "$as_me:4954: \"$ac_link\"") >&5
4955   (eval $ac_link) 2>&5
4956   ac_status=$?
4957   echo "$as_me:4957: \$? = $ac_status" >&5
4958   (exit $ac_status); } &&
4959          { ac_try='test -s conftest$ac_exeext'
4960   { (eval echo "$as_me:4960: \"$ac_try\"") >&5
4961   (eval $ac_try) 2>&5
4962   ac_status=$?
4963   echo "$as_me:4963: \$? = $ac_status" >&5
4964   (exit $ac_status); }; }; then
4965   ac_cv_lib_gpm_Gpm_Open=yes
4966 else
4967   echo "$as_me: failed program was:" >&5
4968 cat conftest.$ac_ext >&5
4969 ac_cv_lib_gpm_Gpm_Open=no
4970 fi
4971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4972 LIBS=$ac_check_lib_save_LIBS
4973 fi
4974 echo "$as_me:4974: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4975 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4976 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4977   :
4978 else
4979
4980                                 { { echo "$as_me:4980: error: Cannot link with GPM library" >&5
4981 echo "$as_me: error: Cannot link with GPM library" >&2;}
4982    { (exit 1); exit 1; }; }
4983                 fi
4984                 with_gpm=yes
4985
4986 fi
4987
4988 else
4989
4990                 test "$with_gpm" != maybe && { echo "$as_me:4990: WARNING: Cannot find GPM header" >&5
4991 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4992                 with_gpm=no
4993
4994 fi
4995
4996 fi
4997
4998 if test "$with_gpm" != no ; then
4999         echo "$as_me:4999: checking if you want to load GPM dynamically" >&5
5000 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5001
5002 # Check whether --with-dlsym or --without-dlsym was given.
5003 if test "${with_dlsym+set}" = set; then
5004   withval="$with_dlsym"
5005   with_dlsym=$withval
5006 else
5007   with_dlsym=yes
5008 fi;
5009         echo "$as_me:5009: result: $with_dlsym" >&5
5010 echo "${ECHO_T}$with_dlsym" >&6
5011         if test "x$with_dlsym" = xyes ; then
5012
5013 cf_have_dlsym=no
5014 echo "$as_me:5014: checking for dlsym" >&5
5015 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5016 if test "${ac_cv_func_dlsym+set}" = set; then
5017   echo $ECHO_N "(cached) $ECHO_C" >&6
5018 else
5019   cat >conftest.$ac_ext <<_ACEOF
5020 #line 5020 "configure"
5021 #include "confdefs.h"
5022 /* System header to define __stub macros and hopefully few prototypes,
5023     which can conflict with char dlsym (); below.  */
5024 #include <assert.h>
5025 /* Override any gcc2 internal prototype to avoid an error.  */
5026 #ifdef __cplusplus
5027 extern "C"
5028 #endif
5029 /* We use char because int might match the return type of a gcc2
5030    builtin and then its argument prototype would still apply.  */
5031 char dlsym ();
5032 char (*f) ();
5033
5034 int
5035 main ()
5036 {
5037 /* The GNU C library defines this for functions which it implements
5038     to always fail with ENOSYS.  Some functions are actually named
5039     something starting with __ and the normal name is an alias.  */
5040 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5041 choke me
5042 #else
5043 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5044 #endif
5045
5046   ;
5047   return 0;
5048 }
5049 _ACEOF
5050 rm -f conftest.$ac_objext conftest$ac_exeext
5051 if { (eval echo "$as_me:5051: \"$ac_link\"") >&5
5052   (eval $ac_link) 2>&5
5053   ac_status=$?
5054   echo "$as_me:5054: \$? = $ac_status" >&5
5055   (exit $ac_status); } &&
5056          { ac_try='test -s conftest$ac_exeext'
5057   { (eval echo "$as_me:5057: \"$ac_try\"") >&5
5058   (eval $ac_try) 2>&5
5059   ac_status=$?
5060   echo "$as_me:5060: \$? = $ac_status" >&5
5061   (exit $ac_status); }; }; then
5062   ac_cv_func_dlsym=yes
5063 else
5064   echo "$as_me: failed program was:" >&5
5065 cat conftest.$ac_ext >&5
5066 ac_cv_func_dlsym=no
5067 fi
5068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5069 fi
5070 echo "$as_me:5070: result: $ac_cv_func_dlsym" >&5
5071 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5072 if test $ac_cv_func_dlsym = yes; then
5073   cf_have_dlsym=yes
5074 else
5075
5076 cf_have_libdl=no
5077 echo "$as_me:5077: checking for dlsym in -ldl" >&5
5078 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5079 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5080   echo $ECHO_N "(cached) $ECHO_C" >&6
5081 else
5082   ac_check_lib_save_LIBS=$LIBS
5083 LIBS="-ldl  $LIBS"
5084 cat >conftest.$ac_ext <<_ACEOF
5085 #line 5085 "configure"
5086 #include "confdefs.h"
5087
5088 /* Override any gcc2 internal prototype to avoid an error.  */
5089 #ifdef __cplusplus
5090 extern "C"
5091 #endif
5092 /* We use char because int might match the return type of a gcc2
5093    builtin and then its argument prototype would still apply.  */
5094 char dlsym ();
5095 int
5096 main ()
5097 {
5098 dlsym ();
5099   ;
5100   return 0;
5101 }
5102 _ACEOF
5103 rm -f conftest.$ac_objext conftest$ac_exeext
5104 if { (eval echo "$as_me:5104: \"$ac_link\"") >&5
5105   (eval $ac_link) 2>&5
5106   ac_status=$?
5107   echo "$as_me:5107: \$? = $ac_status" >&5
5108   (exit $ac_status); } &&
5109          { ac_try='test -s conftest$ac_exeext'
5110   { (eval echo "$as_me:5110: \"$ac_try\"") >&5
5111   (eval $ac_try) 2>&5
5112   ac_status=$?
5113   echo "$as_me:5113: \$? = $ac_status" >&5
5114   (exit $ac_status); }; }; then
5115   ac_cv_lib_dl_dlsym=yes
5116 else
5117   echo "$as_me: failed program was:" >&5
5118 cat conftest.$ac_ext >&5
5119 ac_cv_lib_dl_dlsym=no
5120 fi
5121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5122 LIBS=$ac_check_lib_save_LIBS
5123 fi
5124 echo "$as_me:5124: result: $ac_cv_lib_dl_dlsym" >&5
5125 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5126 if test $ac_cv_lib_dl_dlsym = yes; then
5127
5128         cf_have_dlsym=yes
5129         cf_have_libdl=yes
5130 fi
5131
5132 fi
5133
5134 if test "$cf_have_dlsym" = yes ; then
5135         test "$cf_have_libdl" = yes &&
5136 cf_add_libs="-ldl"
5137 # Filter out duplicates - this happens with badly-designed ".pc" files...
5138 for cf_add_1lib in $LIBS
5139 do
5140         for cf_add_2lib in $cf_add_libs
5141         do
5142                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5143                 then
5144                         cf_add_1lib=
5145                         break
5146                 fi
5147         done
5148         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5149 done
5150 LIBS="$cf_add_libs"
5151
5152         echo "$as_me:5152: checking whether able to link to dl*() functions" >&5
5153 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5154         cat >conftest.$ac_ext <<_ACEOF
5155 #line 5155 "configure"
5156 #include "confdefs.h"
5157 #include <dlfcn.h>
5158 int
5159 main ()
5160 {
5161
5162                 void *obj;
5163                 if ((obj = dlopen("filename", 0)) != 0) {
5164                         if (dlsym(obj, "symbolname") == 0) {
5165                         dlclose(obj);
5166                         }
5167                 }
5168   ;
5169   return 0;
5170 }
5171 _ACEOF
5172 rm -f conftest.$ac_objext conftest$ac_exeext
5173 if { (eval echo "$as_me:5173: \"$ac_link\"") >&5
5174   (eval $ac_link) 2>&5
5175   ac_status=$?
5176   echo "$as_me:5176: \$? = $ac_status" >&5
5177   (exit $ac_status); } &&
5178          { ac_try='test -s conftest$ac_exeext'
5179   { (eval echo "$as_me:5179: \"$ac_try\"") >&5
5180   (eval $ac_try) 2>&5
5181   ac_status=$?
5182   echo "$as_me:5182: \$? = $ac_status" >&5
5183   (exit $ac_status); }; }; then
5184
5185 cat >>confdefs.h <<\EOF
5186 #define HAVE_LIBDL 1
5187 EOF
5188
5189 else
5190   echo "$as_me: failed program was:" >&5
5191 cat conftest.$ac_ext >&5
5192
5193                 { { echo "$as_me:5193: error: Cannot link test program for libdl" >&5
5194 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5195    { (exit 1); exit 1; }; }
5196 fi
5197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5198         echo "$as_me:5198: result: ok" >&5
5199 echo "${ECHO_T}ok" >&6
5200 else
5201         { { echo "$as_me:5201: error: Cannot find dlsym function" >&5
5202 echo "$as_me: error: Cannot find dlsym function" >&2;}
5203    { (exit 1); exit 1; }; }
5204 fi
5205
5206                 if test "x$with_gpm" != xyes ; then
5207                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5208
5209 echo "${as_me:-configure}:5209: testing assuming soname for gpm is $with_gpm ..." 1>&5
5210
5211                         cf_cv_gpm_soname="$with_gpm"
5212                 else
5213
5214 echo "$as_me:5214: checking for soname of gpm library" >&5
5215 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5216 if test "${cf_cv_gpm_soname+set}" = set; then
5217   echo $ECHO_N "(cached) $ECHO_C" >&6
5218 else
5219
5220 cf_cv_gpm_soname=unknown
5221 if test "$cross_compiling" != yes ; then
5222 cat >conftest.$ac_ext <<CF_EOF
5223 #include <gpm.h>
5224 int main()
5225 {
5226 if (Gpm_Open(0,0)) Gpm_Close();
5227         ${cf_cv_main_return:-return}(0);
5228 }
5229 CF_EOF
5230 cf_save_LIBS="$LIBS"
5231
5232 cf_add_libs="-lgpm"
5233 # Filter out duplicates - this happens with badly-designed ".pc" files...
5234 for cf_add_1lib in $LIBS
5235 do
5236         for cf_add_2lib in $cf_add_libs
5237         do
5238                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5239                 then
5240                         cf_add_1lib=
5241                         break
5242                 fi
5243         done
5244         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5245 done
5246 LIBS="$cf_add_libs"
5247
5248         if { (eval echo "$as_me:5248: \"$ac_compile\"") >&5
5249   (eval $ac_compile) 2>&5
5250   ac_status=$?
5251   echo "$as_me:5251: \$? = $ac_status" >&5
5252   (exit $ac_status); } ; then
5253                 if { (eval echo "$as_me:5253: \"$ac_link\"") >&5
5254   (eval $ac_link) 2>&5
5255   ac_status=$?
5256   echo "$as_me:5256: \$? = $ac_status" >&5
5257   (exit $ac_status); } ; then
5258                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5259                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5260                 fi
5261         fi
5262 rm -rf conftest*
5263 LIBS="$cf_save_LIBS"
5264 fi
5265
5266 fi
5267 echo "$as_me:5267: result: $cf_cv_gpm_soname" >&5
5268 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5269
5270                 fi
5271                 test "$cf_cv_gpm_soname" != "unknown" &&
5272 cat >>confdefs.h <<EOF
5273 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5274 EOF
5275
5276                 SHLIB_LIST="-ldl $SHLIB_LIST"
5277         else
5278                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5279
5280 cf_add_libs="-lgpm"
5281 # Filter out duplicates - this happens with badly-designed ".pc" files...
5282 for cf_add_1lib in $TEST_LIBS
5283 do
5284         for cf_add_2lib in $cf_add_libs
5285         do
5286                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5287                 then
5288                         cf_add_1lib=
5289                         break
5290                 fi
5291         done
5292         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5293 done
5294 TEST_LIBS="$cf_add_libs"
5295
5296         fi
5297
5298 cat >>confdefs.h <<\EOF
5299 #define HAVE_LIBGPM 1
5300 EOF
5301
5302 echo "$as_me:5302: checking for Gpm_Wgetch in -lgpm" >&5
5303 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5304 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5305   echo $ECHO_N "(cached) $ECHO_C" >&6
5306 else
5307   ac_check_lib_save_LIBS=$LIBS
5308 LIBS="-lgpm  $LIBS"
5309 cat >conftest.$ac_ext <<_ACEOF
5310 #line 5310 "configure"
5311 #include "confdefs.h"
5312
5313 /* Override any gcc2 internal prototype to avoid an error.  */
5314 #ifdef __cplusplus
5315 extern "C"
5316 #endif
5317 /* We use char because int might match the return type of a gcc2
5318    builtin and then its argument prototype would still apply.  */
5319 char Gpm_Wgetch ();
5320 int
5321 main ()
5322 {
5323 Gpm_Wgetch ();
5324   ;
5325   return 0;
5326 }
5327 _ACEOF
5328 rm -f conftest.$ac_objext conftest$ac_exeext
5329 if { (eval echo "$as_me:5329: \"$ac_link\"") >&5
5330   (eval $ac_link) 2>&5
5331   ac_status=$?
5332   echo "$as_me:5332: \$? = $ac_status" >&5
5333   (exit $ac_status); } &&
5334          { ac_try='test -s conftest$ac_exeext'
5335   { (eval echo "$as_me:5335: \"$ac_try\"") >&5
5336   (eval $ac_try) 2>&5
5337   ac_status=$?
5338   echo "$as_me:5338: \$? = $ac_status" >&5
5339   (exit $ac_status); }; }; then
5340   ac_cv_lib_gpm_Gpm_Wgetch=yes
5341 else
5342   echo "$as_me: failed program was:" >&5
5343 cat conftest.$ac_ext >&5
5344 ac_cv_lib_gpm_Gpm_Wgetch=no
5345 fi
5346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5347 LIBS=$ac_check_lib_save_LIBS
5348 fi
5349 echo "$as_me:5349: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5350 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5351 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5352
5353 echo "$as_me:5353: checking if GPM is weakly bound to curses library" >&5
5354 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5355 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5356   echo $ECHO_N "(cached) $ECHO_C" >&6
5357 else
5358
5359 cf_cv_check_gpm_wgetch=unknown
5360 if test "$cross_compiling" != yes ; then
5361
5362 cat >conftest.$ac_ext <<CF_EOF
5363 #include <gpm.h>
5364 int main()
5365 {
5366         Gpm_Wgetch();
5367         ${cf_cv_main_return:-return}(0);
5368 }
5369 CF_EOF
5370
5371         cf_save_LIBS="$LIBS"
5372         # This only works if we can look at the symbol table.  If a shared
5373         # library is stripped for install, we cannot use that.  So we're forced
5374         # to rely on the static library, noting that some packagers may not
5375         # include it.
5376         LIBS="-static -lgpm -dynamic $LIBS"
5377         if { (eval echo "$as_me:5377: \"$ac_compile\"") >&5
5378   (eval $ac_compile) 2>&5
5379   ac_status=$?
5380   echo "$as_me:5380: \$? = $ac_status" >&5
5381   (exit $ac_status); } ; then
5382                 if { (eval echo "$as_me:5382: \"$ac_link\"") >&5
5383   (eval $ac_link) 2>&5
5384   ac_status=$?
5385   echo "$as_me:5385: \$? = $ac_status" >&5
5386   (exit $ac_status); } ; then
5387                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5388                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5389                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5390                 fi
5391         fi
5392         rm -rf conftest*
5393         LIBS="$cf_save_LIBS"
5394 fi
5395
5396 fi
5397 echo "$as_me:5397: result: $cf_cv_check_gpm_wgetch" >&5
5398 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5399
5400 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5401         { echo "$as_me:5401: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5402 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5403 fi
5404
5405 fi
5406
5407 fi
5408
5409 # not everyone has "test -c"
5410 if test -c /dev/sysmouse 2>/dev/null ; then
5411 echo "$as_me:5411: checking if you want to use sysmouse" >&5
5412 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5413
5414 # Check whether --with-sysmouse or --without-sysmouse was given.
5415 if test "${with_sysmouse+set}" = set; then
5416   withval="$with_sysmouse"
5417   cf_with_sysmouse=$withval
5418 else
5419   cf_with_sysmouse=maybe
5420 fi;
5421         if test "$cf_with_sysmouse" != no ; then
5422         cat >conftest.$ac_ext <<_ACEOF
5423 #line 5423 "configure"
5424 #include "confdefs.h"
5425
5426 #include <osreldate.h>
5427 #if (__FreeBSD_version >= 400017)
5428 #include <sys/consio.h>
5429 #include <sys/fbio.h>
5430 #else
5431 #include <machine/console.h>
5432 #endif
5433
5434 int
5435 main ()
5436 {
5437
5438         struct mouse_info the_mouse;
5439         ioctl(0, CONS_MOUSECTL, &the_mouse);
5440
5441   ;
5442   return 0;
5443 }
5444 _ACEOF
5445 rm -f conftest.$ac_objext
5446 if { (eval echo "$as_me:5446: \"$ac_compile\"") >&5
5447   (eval $ac_compile) 2>&5
5448   ac_status=$?
5449   echo "$as_me:5449: \$? = $ac_status" >&5
5450   (exit $ac_status); } &&
5451          { ac_try='test -s conftest.$ac_objext'
5452   { (eval echo "$as_me:5452: \"$ac_try\"") >&5
5453   (eval $ac_try) 2>&5
5454   ac_status=$?
5455   echo "$as_me:5455: \$? = $ac_status" >&5
5456   (exit $ac_status); }; }; then
5457   cf_with_sysmouse=yes
5458 else
5459   echo "$as_me: failed program was:" >&5
5460 cat conftest.$ac_ext >&5
5461 cf_with_sysmouse=no
5462 fi
5463 rm -f conftest.$ac_objext conftest.$ac_ext
5464         fi
5465 echo "$as_me:5465: result: $cf_with_sysmouse" >&5
5466 echo "${ECHO_T}$cf_with_sysmouse" >&6
5467 test "$cf_with_sysmouse" = yes &&
5468 cat >>confdefs.h <<\EOF
5469 #define USE_SYSMOUSE 1
5470 EOF
5471
5472 fi
5473
5474 if test X"$CC_G_OPT" = X"" ; then
5475         CC_G_OPT='-g'
5476         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5477 fi
5478
5479 if test X"$CXX_G_OPT" = X"" ; then
5480         CXX_G_OPT='-g'
5481         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5482 fi
5483
5484 echo "$as_me:5484: checking for default loader flags" >&5
5485 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5486 case $DFT_LWR_MODEL in
5487 libtool) LD_MODEL=''   ;;
5488 normal)  LD_MODEL=''   ;;
5489 debug)   LD_MODEL=$CC_G_OPT ;;
5490 profile) LD_MODEL='-pg';;
5491 shared)  LD_MODEL=''   ;;
5492 esac
5493 echo "$as_me:5493: result: $LD_MODEL" >&5
5494 echo "${ECHO_T}$LD_MODEL" >&6
5495
5496 case $DFT_LWR_MODEL in
5497 shared)
5498
5499 echo "$as_me:5499: checking if rpath option should be used" >&5
5500 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5501
5502 # Check whether --enable-rpath or --disable-rpath was given.
5503 if test "${enable_rpath+set}" = set; then
5504   enableval="$enable_rpath"
5505   cf_cv_enable_rpath=$enableval
5506 else
5507   cf_cv_enable_rpath=no
5508 fi;
5509 echo "$as_me:5509: result: $cf_cv_enable_rpath" >&5
5510 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5511
5512 echo "$as_me:5512: checking if shared libraries should be relinked during install" >&5
5513 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5514
5515 # Check whether --enable-relink or --disable-relink was given.
5516 if test "${enable_relink+set}" = set; then
5517   enableval="$enable_relink"
5518   cf_cv_do_relink=$enableval
5519 else
5520   cf_cv_do_relink=yes
5521 fi;
5522 echo "$as_me:5522: result: $cf_cv_do_relink" >&5
5523 echo "${ECHO_T}$cf_cv_do_relink" >&6
5524         ;;
5525 esac
5526
5527 # we will build libraries one-level down.
5528 rel_builddir=..
5529
5530 LD_RPATH_OPT=
5531 echo "$as_me:5531: checking for an rpath option" >&5
5532 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5533 case $cf_cv_system_name in #(vi
5534 irix*) #(vi
5535         if test "$GCC" = yes; then
5536                 LD_RPATH_OPT="-Wl,-rpath,"
5537         else
5538                 LD_RPATH_OPT="-rpath "
5539         fi
5540         ;;
5541 linux*|gnu*|k*bsd*-gnu) #(vi
5542         LD_RPATH_OPT="-Wl,-rpath,"
5543         ;;
5544 openbsd[2-9].*|mirbsd*) #(vi
5545         LD_RPATH_OPT="-Wl,-rpath,"
5546         ;;
5547 dragonfly*|freebsd*) #(vi
5548         LD_RPATH_OPT="-rpath "
5549         ;;
5550 netbsd*) #(vi
5551         LD_RPATH_OPT="-Wl,-rpath,"
5552         ;;
5553 osf*|mls+*) #(vi
5554         LD_RPATH_OPT="-rpath "
5555         ;;
5556 solaris2*) #(vi
5557         LD_RPATH_OPT="-R"
5558         ;;
5559 *)
5560         ;;
5561 esac
5562 echo "$as_me:5562: result: $LD_RPATH_OPT" >&5
5563 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5564
5565 case "x$LD_RPATH_OPT" in #(vi
5566 x-R*)
5567         echo "$as_me:5567: checking if we need a space after rpath option" >&5
5568 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5569         cf_save_LIBS="$LIBS"
5570
5571 cf_add_libs="${LD_RPATH_OPT}$libdir"
5572 # Filter out duplicates - this happens with badly-designed ".pc" files...
5573 for cf_add_1lib in $LIBS
5574 do
5575         for cf_add_2lib in $cf_add_libs
5576         do
5577                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5578                 then
5579                         cf_add_1lib=
5580                         break
5581                 fi
5582         done
5583         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5584 done
5585 LIBS="$cf_add_libs"
5586
5587         cat >conftest.$ac_ext <<_ACEOF
5588 #line 5588 "configure"
5589 #include "confdefs.h"
5590
5591 int
5592 main ()
5593 {
5594
5595   ;
5596   return 0;
5597 }
5598 _ACEOF
5599 rm -f conftest.$ac_objext conftest$ac_exeext
5600 if { (eval echo "$as_me:5600: \"$ac_link\"") >&5
5601   (eval $ac_link) 2>&5
5602   ac_status=$?
5603   echo "$as_me:5603: \$? = $ac_status" >&5
5604   (exit $ac_status); } &&
5605          { ac_try='test -s conftest$ac_exeext'
5606   { (eval echo "$as_me:5606: \"$ac_try\"") >&5
5607   (eval $ac_try) 2>&5
5608   ac_status=$?
5609   echo "$as_me:5609: \$? = $ac_status" >&5
5610   (exit $ac_status); }; }; then
5611   cf_rpath_space=no
5612 else
5613   echo "$as_me: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
5615 cf_rpath_space=yes
5616 fi
5617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5618         LIBS="$cf_save_LIBS"
5619         echo "$as_me:5619: result: $cf_rpath_space" >&5
5620 echo "${ECHO_T}$cf_rpath_space" >&6
5621         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5622         ;;
5623 esac
5624
5625         RM_SHARED_OPTS=
5626         LOCAL_LDFLAGS=
5627         LOCAL_LDFLAGS2=
5628         LD_SHARED_OPTS=
5629         INSTALL_LIB="-m 644"
5630         : ${rel_builddir:=.}
5631
5632         shlibdir=$libdir
5633
5634         MAKE_DLLS="#"
5635
5636         cf_cv_do_symlinks=no
5637         cf_ld_rpath_opt=
5638         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5639
5640         echo "$as_me:5640: checking if release/abi version should be used for shared libs" >&5
5641 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5642
5643 # Check whether --with-shlib-version or --without-shlib-version was given.
5644 if test "${with_shlib_version+set}" = set; then
5645   withval="$with_shlib_version"
5646   test -z "$withval" && withval=auto
5647         case $withval in #(vi
5648         yes) #(vi
5649                 cf_cv_shlib_version=auto
5650                 ;;
5651         rel|abi|auto|no) #(vi
5652                 cf_cv_shlib_version=$withval
5653                 ;;
5654         *)
5655                 { { echo "$as_me:5655: error: option value must be one of: rel, abi, auto or no" >&5
5656 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5657    { (exit 1); exit 1; }; }
5658                 ;;
5659         esac
5660
5661 else
5662   cf_cv_shlib_version=auto
5663 fi;
5664         echo "$as_me:5664: result: $cf_cv_shlib_version" >&5
5665 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5666
5667         cf_cv_rm_so_locs=no
5668         cf_try_cflags=
5669
5670         # Some less-capable ports of gcc support only -fpic
5671         CC_SHARED_OPTS=
5672         if test "$GCC" = yes
5673         then
5674                 echo "$as_me:5674: checking which $CC option to use" >&5
5675 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5676                 cf_save_CFLAGS="$CFLAGS"
5677                 for CC_SHARED_OPTS in -fPIC -fpic ''
5678                 do
5679                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5680                         cat >conftest.$ac_ext <<_ACEOF
5681 #line 5681 "configure"
5682 #include "confdefs.h"
5683 #include <stdio.h>
5684 int
5685 main ()
5686 {
5687 int x = 1
5688   ;
5689   return 0;
5690 }
5691 _ACEOF
5692 rm -f conftest.$ac_objext
5693 if { (eval echo "$as_me:5693: \"$ac_compile\"") >&5
5694   (eval $ac_compile) 2>&5
5695   ac_status=$?
5696   echo "$as_me:5696: \$? = $ac_status" >&5
5697   (exit $ac_status); } &&
5698          { ac_try='test -s conftest.$ac_objext'
5699   { (eval echo "$as_me:5699: \"$ac_try\"") >&5
5700   (eval $ac_try) 2>&5
5701   ac_status=$?
5702   echo "$as_me:5702: \$? = $ac_status" >&5
5703   (exit $ac_status); }; }; then
5704   break
5705 else
5706   echo "$as_me: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5708 fi
5709 rm -f conftest.$ac_objext conftest.$ac_ext
5710                 done
5711                 echo "$as_me:5711: result: $CC_SHARED_OPTS" >&5
5712 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5713                 CFLAGS="$cf_save_CFLAGS"
5714         fi
5715
5716         cf_cv_shlib_version_infix=no
5717
5718         case $cf_cv_system_name in #(vi
5719         aix4.3-9*|aix[5-7]*) #(vi
5720                 if test "$GCC" = yes; then
5721                         CC_SHARED_OPTS=
5722                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5723                 else
5724                         # CC_SHARED_OPTS='-qpic=large -G'
5725                         # perhaps "-bM:SRE -bnoentry -bexpall"
5726                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5727                 fi
5728                 ;;
5729         beos*) #(vi
5730                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5731                 ;;
5732         cygwin*) #(vi
5733                 CC_SHARED_OPTS=
5734                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5735                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5736                 cf_cv_shlib_version=cygdll
5737                 cf_cv_shlib_version_infix=cygdll
5738                 shlibdir=$bindir
5739                 MAKE_DLLS=
5740                 cat >mk_shared_lib.sh <<-CF_EOF
5741                 #!/bin/sh
5742                 SHARED_LIB=\$1
5743                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5744                 shift
5745                 cat <<-EOF
5746                 Linking shared library
5747                 ** SHARED_LIB \$SHARED_LIB
5748                 ** IMPORT_LIB \$IMPORT_LIB
5749 EOF
5750                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5751 CF_EOF
5752                 chmod +x mk_shared_lib.sh
5753                 ;;
5754         msys*) #(vi
5755                 CC_SHARED_OPTS=
5756                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5757                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5758                 cf_cv_shlib_version=msysdll
5759                 cf_cv_shlib_version_infix=msysdll
5760                 shlibdir=$bindir
5761                 MAKE_DLLS=
5762                 cat >mk_shared_lib.sh <<-CF_EOF
5763                 #!/bin/sh
5764                 SHARED_LIB=\$1
5765                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5766                 shift
5767                 cat <<-EOF
5768                 Linking shared library
5769                 ** SHARED_LIB \$SHARED_LIB
5770                 ** IMPORT_LIB \$IMPORT_LIB
5771 EOF
5772                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5773 CF_EOF
5774                 chmod +x mk_shared_lib.sh
5775                 ;;
5776         darwin*) #(vi
5777                 cf_try_cflags="no-cpp-precomp"
5778                 CC_SHARED_OPTS="-dynamic"
5779                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5780                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5781                 cf_cv_shlib_version_infix=yes
5782                 echo "$as_me:5782: checking if ld -search_paths_first works" >&5
5783 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5784 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5785   echo $ECHO_N "(cached) $ECHO_C" >&6
5786 else
5787
5788                         cf_save_LDFLAGS=$LDFLAGS
5789                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5790                         cat >conftest.$ac_ext <<_ACEOF
5791 #line 5791 "configure"
5792 #include "confdefs.h"
5793
5794 int
5795 main ()
5796 {
5797 int i;
5798   ;
5799   return 0;
5800 }
5801 _ACEOF
5802 rm -f conftest.$ac_objext conftest$ac_exeext
5803 if { (eval echo "$as_me:5803: \"$ac_link\"") >&5
5804   (eval $ac_link) 2>&5
5805   ac_status=$?
5806   echo "$as_me:5806: \$? = $ac_status" >&5
5807   (exit $ac_status); } &&
5808          { ac_try='test -s conftest$ac_exeext'
5809   { (eval echo "$as_me:5809: \"$ac_try\"") >&5
5810   (eval $ac_try) 2>&5
5811   ac_status=$?
5812   echo "$as_me:5812: \$? = $ac_status" >&5
5813   (exit $ac_status); }; }; then
5814   cf_cv_ldflags_search_paths_first=yes
5815 else
5816   echo "$as_me: failed program was:" >&5
5817 cat conftest.$ac_ext >&5
5818 cf_cv_ldflags_search_paths_first=no
5819 fi
5820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5821                                 LDFLAGS=$cf_save_LDFLAGS
5822 fi
5823 echo "$as_me:5823: result: $cf_cv_ldflags_search_paths_first" >&5
5824 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5825                 if test $cf_cv_ldflags_search_paths_first = yes; then
5826                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5827                 fi
5828                 ;;
5829         hpux[7-8]*) #(vi
5830                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5831                 if test "$GCC" != yes; then
5832                         CC_SHARED_OPTS='+Z'
5833                 fi
5834                 MK_SHARED_LIB='${LD} -b -o $@'
5835                 INSTALL_LIB="-m 555"
5836                 ;;
5837         hpux*) #(vi
5838                 # (tested with gcc 2.7.2 -- I don't have c89)
5839                 if test "$GCC" = yes; then
5840                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5841                 else
5842                         CC_SHARED_OPTS='+Z'
5843                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5844                 fi
5845                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5846                 # HP-UX shared libraries must be executable, and should be
5847                 # readonly to exploit a quirk in the memory manager.
5848                 INSTALL_LIB="-m 555"
5849                 ;;
5850         interix*)
5851                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5852                 if test "$cf_cv_shlib_version" = rel; then
5853                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5854                 else
5855                         cf_shared_soname='`basename `'
5856                 fi
5857                 CC_SHARED_OPTS=
5858                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5859                 ;;
5860         irix*) #(vi
5861                 if test "$cf_cv_enable_rpath" = yes ; then
5862                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5863                 fi
5864                 # tested with IRIX 5.2 and 'cc'.
5865                 if test "$GCC" != yes; then
5866                         CC_SHARED_OPTS='-KPIC'
5867                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5868                 else
5869                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5870                 fi
5871                 cf_cv_rm_so_locs=yes
5872                 ;;
5873         linux*|gnu*|k*bsd*-gnu) #(vi
5874                 if test "$DFT_LWR_MODEL" = "shared" ; then
5875                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5876                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5877                 fi
5878                 if test "$cf_cv_enable_rpath" = yes ; then
5879                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5880                 fi
5881
5882         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5883         if test "$cf_cv_shlib_version" = rel; then
5884                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5885         else
5886                 cf_cv_shared_soname='`basename $@`'
5887         fi
5888
5889                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5890                 ;;
5891         mingw*) #(vi
5892                 cf_cv_shlib_version=mingw
5893                 cf_cv_shlib_version_infix=mingw
5894                 shlibdir=$bindir
5895                 MAKE_DLLS=
5896                 if test "$DFT_LWR_MODEL" = "shared" ; then
5897                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5898                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5899                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5900                 fi
5901                 CC_SHARED_OPTS=
5902                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5903                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5904                 cat >mk_shared_lib.sh <<-CF_EOF
5905                 #!/bin/sh
5906                 SHARED_LIB=\$1
5907                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5908                 shift
5909                 cat <<-EOF
5910                 Linking shared library
5911                 ** SHARED_LIB \$SHARED_LIB
5912                 ** IMPORT_LIB \$IMPORT_LIB
5913 EOF
5914                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5915 CF_EOF
5916                 chmod +x mk_shared_lib.sh
5917                 ;;
5918         openbsd[2-9].*|mirbsd*) #(vi
5919                 if test "$DFT_LWR_MODEL" = "shared" ; then
5920                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5921                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5922                 fi
5923                 if test "$cf_cv_enable_rpath" = yes ; then
5924                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5925                 fi
5926                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5927
5928         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5929         if test "$cf_cv_shlib_version" = rel; then
5930                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5931         else
5932                 cf_cv_shared_soname='`basename $@`'
5933         fi
5934
5935                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5936                 ;;
5937         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5938                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5939                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5940                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5941                 ;;
5942         dragonfly*|freebsd*) #(vi
5943                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5944                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5945                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5946                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5947                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5948                 fi
5949
5950         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5951         if test "$cf_cv_shlib_version" = rel; then
5952                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5953         else
5954                 cf_cv_shared_soname='`basename $@`'
5955         fi
5956
5957                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5958                 ;;
5959         netbsd*) #(vi
5960                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5961                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5962                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5963                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5964                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5965                         if test "$cf_cv_shlib_version" = auto; then
5966                         if test -f /usr/libexec/ld.elf_so; then
5967                                 cf_cv_shlib_version=abi
5968                         else
5969                                 cf_cv_shlib_version=rel
5970                         fi
5971                         fi
5972
5973         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5974         if test "$cf_cv_shlib_version" = rel; then
5975                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5976         else
5977                 cf_cv_shared_soname='`basename $@`'
5978         fi
5979
5980                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5981                 else
5982                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
5983                 fi
5984                 ;;
5985         osf*|mls+*) #(vi
5986                 # tested with OSF/1 V3.2 and 'cc'
5987                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5988                 # link with shared libs).
5989                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5990                 case $host_os in #(vi
5991                 osf4*)
5992                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5993                         ;;
5994                 esac
5995                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5996                 if test "$DFT_LWR_MODEL" = "shared" ; then
5997                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5998                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5999                 fi
6000                 cf_cv_rm_so_locs=yes
6001                 ;;
6002         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
6003                 # tested with osr5.0.5
6004                 if test "$GCC" != yes; then
6005                         CC_SHARED_OPTS='-belf -KPIC'
6006                 fi
6007                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6008                 if test "$cf_cv_enable_rpath" = yes ; then
6009                         # only way is to set LD_RUN_PATH but no switch for it
6010                         RUN_PATH=$libdir
6011                 fi
6012                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6013                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6014                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6015                 ;;
6016         sunos4*) #(vi
6017                 # tested with SunOS 4.1.1 and gcc 2.7.0
6018                 if test "$GCC" != yes; then
6019                         CC_SHARED_OPTS='-KPIC'
6020                 fi
6021                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6022                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6023                 ;;
6024         solaris2*) #(vi
6025                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6026                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6027                 if test "$DFT_LWR_MODEL" = "shared" ; then
6028                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6029                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6030                 fi
6031                 if test "$cf_cv_enable_rpath" = yes ; then
6032                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6033                 fi
6034
6035         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6036         if test "$cf_cv_shlib_version" = rel; then
6037                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6038         else
6039                 cf_cv_shared_soname='`basename $@`'
6040         fi
6041
6042                 if test "$GCC" != yes; then
6043                         cf_save_CFLAGS="$CFLAGS"
6044                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6045                         do
6046                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6047                                 cat >conftest.$ac_ext <<_ACEOF
6048 #line 6048 "configure"
6049 #include "confdefs.h"
6050 #include <stdio.h>
6051 int
6052 main ()
6053 {
6054 printf("Hello\n");
6055   ;
6056   return 0;
6057 }
6058 _ACEOF
6059 rm -f conftest.$ac_objext
6060 if { (eval echo "$as_me:6060: \"$ac_compile\"") >&5
6061   (eval $ac_compile) 2>&5
6062   ac_status=$?
6063   echo "$as_me:6063: \$? = $ac_status" >&5
6064   (exit $ac_status); } &&
6065          { ac_try='test -s conftest.$ac_objext'
6066   { (eval echo "$as_me:6066: \"$ac_try\"") >&5
6067   (eval $ac_try) 2>&5
6068   ac_status=$?
6069   echo "$as_me:6069: \$? = $ac_status" >&5
6070   (exit $ac_status); }; }; then
6071   break
6072 else
6073   echo "$as_me: failed program was:" >&5
6074 cat conftest.$ac_ext >&5
6075 fi
6076 rm -f conftest.$ac_objext conftest.$ac_ext
6077                         done
6078                         CFLAGS="$cf_save_CFLAGS"
6079                         CC_SHARED_OPTS=$cf_shared_opts
6080                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6081                 else
6082                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6083                 fi
6084                 ;;
6085         sysv5uw7*|unix_sv*) #(vi
6086                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6087                 if test "$GCC" != yes; then
6088                         CC_SHARED_OPTS='-KPIC'
6089                 fi
6090                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6091                 ;;
6092         *)
6093                 CC_SHARED_OPTS='unknown'
6094                 MK_SHARED_LIB='echo unknown'
6095                 ;;
6096         esac
6097
6098         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6099         case "$cf_cv_shlib_version" in #(vi
6100         rel|abi)
6101                 case "$MK_SHARED_LIB" in #(vi
6102                 *'-o $@') #(vi
6103                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6104                         ;;
6105                 *)
6106                         { echo "$as_me:6106: WARNING: ignored --with-shlib-version" >&5
6107 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6108                         ;;
6109                 esac
6110                 ;;
6111         esac
6112
6113         if test -n "$cf_try_cflags"
6114         then
6115 cat > conftest.$ac_ext <<EOF
6116 #line 6116 "${as_me:-configure}"
6117 #include <stdio.h>
6118 int main(int argc, char *argv[])
6119 {
6120         printf("hello\n");
6121         return (argv[argc-1] == 0) ;
6122 }
6123 EOF
6124                 cf_save_CFLAGS="$CFLAGS"
6125                 for cf_opt in $cf_try_cflags
6126                 do
6127                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6128                         echo "$as_me:6128: checking if CFLAGS option -$cf_opt works" >&5
6129 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6130                         if { (eval echo "$as_me:6130: \"$ac_compile\"") >&5
6131   (eval $ac_compile) 2>&5
6132   ac_status=$?
6133   echo "$as_me:6133: \$? = $ac_status" >&5
6134   (exit $ac_status); }; then
6135                                 echo "$as_me:6135: result: yes" >&5
6136 echo "${ECHO_T}yes" >&6
6137                                 cf_save_CFLAGS="$CFLAGS"
6138                         else
6139                                 echo "$as_me:6139: result: no" >&5
6140 echo "${ECHO_T}no" >&6
6141                         fi
6142                 done
6143                 CFLAGS="$cf_save_CFLAGS"
6144         fi
6145
6146         # RPATH_LIST is a colon-separated list of directories
6147         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6148         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6149
6150         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6151
6152         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6153
6154 echo "${as_me:-configure}:6154: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6155
6156         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6157
6158 echo "${as_me:-configure}:6158: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6159
6160 if test "$CC_SHARED_OPTS" = "unknown"; then
6161         for model in $cf_list_models; do
6162                 if test "$model" = "shared"; then
6163                         { { echo "$as_me:6163: error: Shared libraries are not supported in this version" >&5
6164 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6165    { (exit 1); exit 1; }; }
6166                 fi
6167         done
6168 fi
6169
6170 # pretend that ncurses==ncursesw==ncursest
6171 echo "$as_me:6171: checking if you want to disable library suffixes" >&5
6172 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6173
6174 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6175 if test "${enable_lib_suffixes+set}" = set; then
6176   enableval="$enable_lib_suffixes"
6177   disable_lib_suffixes=$enableval
6178 else
6179   disable_lib_suffixes=no
6180 fi;
6181 echo "$as_me:6181: result: $disable_lib_suffixes" >&5
6182 echo "${ECHO_T}$disable_lib_suffixes" >&6
6183
6184 ### If we're building with rpath, try to link non-standard libs that way too.
6185 if test "$DFT_LWR_MODEL" = "shared"; then
6186
6187 echo "$as_me:6187: checking if rpath-hack should be disabled" >&5
6188 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6189
6190 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6191 if test "${enable_rpath_hack+set}" = set; then
6192   enableval="$enable_rpath_hack"
6193   test "$enableval" != no && enableval=yes
6194   if test "$enableval" != "yes" ; then
6195     cf_disable_rpath_hack=yes
6196   else
6197     cf_disable_rpath_hack=no
6198   fi
6199 else
6200   enableval=yes
6201   cf_disable_rpath_hack=no
6202
6203 fi;
6204 echo "$as_me:6204: result: $cf_disable_rpath_hack" >&5
6205 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6206 if test "$cf_disable_rpath_hack" = no ; then
6207
6208 echo "$as_me:6208: checking for updated LDFLAGS" >&5
6209 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6210 if test -n "$LD_RPATH_OPT" ; then
6211         echo "$as_me:6211: result: maybe" >&5
6212 echo "${ECHO_T}maybe" >&6
6213
6214         for ac_prog in ldd
6215 do
6216   # Extract the first word of "$ac_prog", so it can be a program name with args.
6217 set dummy $ac_prog; ac_word=$2
6218 echo "$as_me:6218: checking for $ac_word" >&5
6219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6220 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6221   echo $ECHO_N "(cached) $ECHO_C" >&6
6222 else
6223   if test -n "$cf_ldd_prog"; then
6224   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6225 else
6226   ac_save_IFS=$IFS; IFS=$ac_path_separator
6227 ac_dummy="$PATH"
6228 for ac_dir in $ac_dummy; do
6229   IFS=$ac_save_IFS
6230   test -z "$ac_dir" && ac_dir=.
6231   $as_executable_p "$ac_dir/$ac_word" || continue
6232 ac_cv_prog_cf_ldd_prog="$ac_prog"
6233 echo "$as_me:6233: found $ac_dir/$ac_word" >&5
6234 break
6235 done
6236
6237 fi
6238 fi
6239 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6240 if test -n "$cf_ldd_prog"; then
6241   echo "$as_me:6241: result: $cf_ldd_prog" >&5
6242 echo "${ECHO_T}$cf_ldd_prog" >&6
6243 else
6244   echo "$as_me:6244: result: no" >&5
6245 echo "${ECHO_T}no" >&6
6246 fi
6247
6248   test -n "$cf_ldd_prog" && break
6249 done
6250 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6251
6252         cf_rpath_list="/usr/lib /lib"
6253         if test "$cf_ldd_prog" != no
6254         then
6255                 cf_rpath_oops=
6256
6257 cat >conftest.$ac_ext <<_ACEOF
6258 #line 6258 "configure"
6259 #include "confdefs.h"
6260 #include <stdio.h>
6261 int
6262 main ()
6263 {
6264 printf("Hello");
6265   ;
6266   return 0;
6267 }
6268 _ACEOF
6269 rm -f conftest.$ac_objext conftest$ac_exeext
6270 if { (eval echo "$as_me:6270: \"$ac_link\"") >&5
6271   (eval $ac_link) 2>&5
6272   ac_status=$?
6273   echo "$as_me:6273: \$? = $ac_status" >&5
6274   (exit $ac_status); } &&
6275          { ac_try='test -s conftest$ac_exeext'
6276   { (eval echo "$as_me:6276: \"$ac_try\"") >&5
6277   (eval $ac_try) 2>&5
6278   ac_status=$?
6279   echo "$as_me:6279: \$? = $ac_status" >&5
6280   (exit $ac_status); }; }; then
6281   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6282                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6283 else
6284   echo "$as_me: failed program was:" >&5
6285 cat conftest.$ac_ext >&5
6286 fi
6287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6288
6289                 # If we passed the link-test, but get a "not found" on a given library,
6290                 # this could be due to inept reconfiguration of gcc to make it only
6291                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6292                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6293                 # /usr/local libraries.
6294                 if test -n "$cf_rpath_oops"
6295                 then
6296                         for cf_rpath_src in $cf_rpath_oops
6297                         do
6298                                 for cf_rpath_dir in \
6299                                         /usr/local \
6300                                         /usr/pkg \
6301                                         /opt/sfw
6302                                 do
6303                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6304                                         then
6305                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6306
6307 echo "${as_me:-configure}:6307: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6308
6309                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6310                                                 break
6311                                         fi
6312                                 done
6313                         done
6314                 fi
6315         fi
6316
6317         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6318
6319 echo "${as_me:-configure}:6319: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6320
6321 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6322
6323 echo "${as_me:-configure}:6323: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6324
6325 cf_rpath_dst=
6326 for cf_rpath_src in $LDFLAGS
6327 do
6328         case $cf_rpath_src in #(vi
6329         -L*) #(vi
6330
6331                 # check if this refers to a directory which we will ignore
6332                 cf_rpath_skip=no
6333                 if test -n "$cf_rpath_list"
6334                 then
6335                         for cf_rpath_item in $cf_rpath_list
6336                         do
6337                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6338                                 then
6339                                         cf_rpath_skip=yes
6340                                         break
6341                                 fi
6342                         done
6343                 fi
6344
6345                 if test "$cf_rpath_skip" = no
6346                 then
6347                         # transform the option
6348                         if test "$LD_RPATH_OPT" = "-R " ; then
6349                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6350                         else
6351                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6352                         fi
6353
6354                         # if we have not already added this, add it now
6355                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6356                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6357                         then
6358                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6359
6360 echo "${as_me:-configure}:6360: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6361
6362                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6363                         fi
6364                 fi
6365                 ;;
6366         esac
6367         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6368 done
6369 LDFLAGS=$cf_rpath_dst
6370
6371 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6372
6373 echo "${as_me:-configure}:6373: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6374
6375 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6376
6377 echo "${as_me:-configure}:6377: testing ...checking LIBS $LIBS ..." 1>&5
6378
6379 cf_rpath_dst=
6380 for cf_rpath_src in $LIBS
6381 do
6382         case $cf_rpath_src in #(vi
6383         -L*) #(vi
6384
6385                 # check if this refers to a directory which we will ignore
6386                 cf_rpath_skip=no
6387                 if test -n "$cf_rpath_list"
6388                 then
6389                         for cf_rpath_item in $cf_rpath_list
6390                         do
6391                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6392                                 then
6393                                         cf_rpath_skip=yes
6394                                         break
6395                                 fi
6396                         done
6397                 fi
6398
6399                 if test "$cf_rpath_skip" = no
6400                 then
6401                         # transform the option
6402                         if test "$LD_RPATH_OPT" = "-R " ; then
6403                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6404                         else
6405                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6406                         fi
6407
6408                         # if we have not already added this, add it now
6409                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6410                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6411                         then
6412                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6413
6414 echo "${as_me:-configure}:6414: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6415
6416                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6417                         fi
6418                 fi
6419                 ;;
6420         esac
6421         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6422 done
6423 LIBS=$cf_rpath_dst
6424
6425 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6426
6427 echo "${as_me:-configure}:6427: testing ...checked LIBS $LIBS ..." 1>&5
6428
6429         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6430
6431 echo "${as_me:-configure}:6431: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6432
6433 else
6434         echo "$as_me:6434: result: no" >&5
6435 echo "${ECHO_T}no" >&6
6436 fi
6437
6438 fi
6439
6440 fi
6441
6442 ###############################################################################
6443
6444 ###     use option --disable-overwrite to leave out the link to -lcurses
6445 echo "$as_me:6445: checking if you wish to install ncurses overwriting curses" >&5
6446 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6447
6448 # Check whether --enable-overwrite or --disable-overwrite was given.
6449 if test "${enable_overwrite+set}" = set; then
6450   enableval="$enable_overwrite"
6451   with_overwrite=$enableval
6452 else
6453   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6454 fi;
6455 echo "$as_me:6455: result: $with_overwrite" >&5
6456 echo "${ECHO_T}$with_overwrite" >&6
6457
6458 echo "$as_me:6458: checking if external terminfo-database is used" >&5
6459 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6460
6461 # Check whether --enable-database or --disable-database was given.
6462 if test "${enable_database+set}" = set; then
6463   enableval="$enable_database"
6464   use_database=$enableval
6465 else
6466   use_database=yes
6467 fi;
6468 echo "$as_me:6468: result: $use_database" >&5
6469 echo "${ECHO_T}$use_database" >&6
6470
6471 case $host_os in #(vi
6472 os2*) #(vi
6473         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6474         ;;
6475 *) #(vi
6476         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6477         ;;
6478 esac
6479
6480 NCURSES_USE_DATABASE=0
6481 if test "$use_database" != no ; then
6482         NCURSES_USE_DATABASE=1
6483
6484         echo "$as_me:6484: checking which terminfo source-file will be installed" >&5
6485 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6486
6487 # Check whether --with-database or --without-database was given.
6488 if test "${with_database+set}" = set; then
6489   withval="$with_database"
6490   TERMINFO_SRC=$withval
6491 fi;
6492         echo "$as_me:6492: result: $TERMINFO_SRC" >&5
6493 echo "${ECHO_T}$TERMINFO_SRC" >&6
6494
6495         echo "$as_me:6495: checking whether to use hashed database instead of directory/tree" >&5
6496 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6497
6498 # Check whether --with-hashed-db or --without-hashed-db was given.
6499 if test "${with_hashed_db+set}" = set; then
6500   withval="$with_hashed_db"
6501
6502 else
6503   with_hashed_db=no
6504 fi;
6505         echo "$as_me:6505: result: $with_hashed_db" >&5
6506 echo "${ECHO_T}$with_hashed_db" >&6
6507 else
6508         with_hashed_db=no
6509 fi
6510
6511 echo "$as_me:6511: checking for list of fallback descriptions" >&5
6512 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6513
6514 # Check whether --with-fallbacks or --without-fallbacks was given.
6515 if test "${with_fallbacks+set}" = set; then
6516   withval="$with_fallbacks"
6517   with_fallback=$withval
6518 else
6519   with_fallback=
6520 fi;
6521 echo "$as_me:6521: result: $with_fallback" >&5
6522 echo "${ECHO_T}$with_fallback" >&6
6523 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6524
6525 echo "$as_me:6525: checking if you want modern xterm or antique" >&5
6526 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6527
6528 # Check whether --with-xterm-new or --without-xterm-new was given.
6529 if test "${with_xterm_new+set}" = set; then
6530   withval="$with_xterm_new"
6531   with_xterm_new=$withval
6532 else
6533   with_xterm_new=yes
6534 fi;
6535 case $with_xterm_new in
6536 no)     with_xterm_new=xterm-old;;
6537 *)      with_xterm_new=xterm-new;;
6538 esac
6539 echo "$as_me:6539: result: $with_xterm_new" >&5
6540 echo "${ECHO_T}$with_xterm_new" >&6
6541 WHICH_XTERM=$with_xterm_new
6542
6543 echo "$as_me:6543: checking if xterm backspace sends BS or DEL" >&5
6544 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6545
6546 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6547 if test "${with_xterm_kbs+set}" = set; then
6548   withval="$with_xterm_kbs"
6549   with_xterm_kbs=$withval
6550 else
6551   with_xterm_kbs=BS
6552 fi;
6553 case x$with_xterm_kbs in
6554 xyes|xno|xBS|xbs|x8)
6555         with_xterm_kbs=BS
6556         ;;
6557 xDEL|xdel|x127)
6558         with_xterm_kbs=DEL
6559         ;;
6560 *)
6561         with_xterm_kbs=$withval
6562         ;;
6563 esac
6564 echo "$as_me:6564: result: $with_xterm_kbs" >&5
6565 echo "${ECHO_T}$with_xterm_kbs" >&6
6566 XTERM_KBS=$with_xterm_kbs
6567
6568 MAKE_TERMINFO=
6569 if test "$use_database" = no ; then
6570         TERMINFO="${datadir}/terminfo"
6571         MAKE_TERMINFO="#"
6572 else
6573
6574 echo "$as_me:6574: checking for list of terminfo directories" >&5
6575 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6576
6577 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6578 if test "${with_terminfo_dirs+set}" = set; then
6579   withval="$with_terminfo_dirs"
6580
6581 else
6582   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6583 fi;
6584 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6585 cf_dst_path=
6586 for cf_src_path in $withval
6587 do
6588
6589 if test "x$prefix" != xNONE; then
6590   cf_path_syntax="$prefix"
6591 else
6592   cf_path_syntax="$ac_default_prefix"
6593 fi
6594
6595 case ".$cf_src_path" in #(vi
6596 .\$\(*\)*|.\'*\'*) #(vi
6597   ;;
6598 ..|./*|.\\*) #(vi
6599   ;;
6600 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6601   ;;
6602 .\${*prefix}*|.\${*dir}*) #(vi
6603   eval cf_src_path="$cf_src_path"
6604   case ".$cf_src_path" in #(vi
6605   .NONE/*)
6606     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6607     ;;
6608   esac
6609   ;; #(vi
6610 .no|.NONE/*)
6611   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6612   ;;
6613 *)
6614   { { echo "$as_me:6614: error: expected a pathname, not \"$cf_src_path\"" >&5
6615 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6616    { (exit 1); exit 1; }; }
6617   ;;
6618 esac
6619
6620   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6621   cf_dst_path="${cf_dst_path}${cf_src_path}"
6622 done
6623 IFS="$ac_save_ifs"
6624
6625 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6626 # so we have to check/work around.  We do prefer the result of "eval"...
6627 eval cf_dst_eval="$cf_dst_path"
6628 case "x$cf_dst_eval" in #(vi
6629 xNONE*) #(vi
6630         TERMINFO_DIRS=$cf_dst_path
6631         ;;
6632 *)
6633         TERMINFO_DIRS="$cf_dst_eval"
6634         ;;
6635 esac
6636
6637 echo "$as_me:6637: result: $TERMINFO_DIRS" >&5
6638 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6639 test -n "$TERMINFO_DIRS" &&
6640 cat >>confdefs.h <<EOF
6641 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6642 EOF
6643
6644 echo "$as_me:6644: checking for default terminfo directory" >&5
6645 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6646
6647 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6648 if test "${with_default_terminfo_dir+set}" = set; then
6649   withval="$with_default_terminfo_dir"
6650
6651 else
6652   withval="${TERMINFO:-${datadir}/terminfo}"
6653 fi; if test -n "${datadir}/terminfo" ; then
6654
6655 if test "x$prefix" != xNONE; then
6656   cf_path_syntax="$prefix"
6657 else
6658   cf_path_syntax="$ac_default_prefix"
6659 fi
6660
6661 case ".$withval" in #(vi
6662 .\$\(*\)*|.\'*\'*) #(vi
6663   ;;
6664 ..|./*|.\\*) #(vi
6665   ;;
6666 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6667   ;;
6668 .\${*prefix}*|.\${*dir}*) #(vi
6669   eval withval="$withval"
6670   case ".$withval" in #(vi
6671   .NONE/*)
6672     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6673     ;;
6674   esac
6675   ;; #(vi
6676 .no|.NONE/*)
6677   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6678   ;;
6679 *)
6680   { { echo "$as_me:6680: error: expected a pathname, not \"$withval\"" >&5
6681 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6682    { (exit 1); exit 1; }; }
6683   ;;
6684 esac
6685
6686 fi
6687 eval TERMINFO="$withval"
6688
6689 echo "$as_me:6689: result: $TERMINFO" >&5
6690 echo "${ECHO_T}$TERMINFO" >&6
6691
6692 cat >>confdefs.h <<EOF
6693 #define TERMINFO "$TERMINFO"
6694 EOF
6695
6696 fi
6697
6698 ###     use option --disable-big-core to make tic run on small machines
6699 ###     We need 4Mb, check if we can allocate 50% more than that.
6700 echo "$as_me:6700: checking if big-core option selected" >&5
6701 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6702
6703 # Check whether --enable-big-core or --disable-big-core was given.
6704 if test "${enable_big_core+set}" = set; then
6705   enableval="$enable_big_core"
6706   with_big_core=$enableval
6707 else
6708   if test "$cross_compiling" = yes; then
6709   with_big_core=no
6710 else
6711   cat >conftest.$ac_ext <<_ACEOF
6712 #line 6712 "configure"
6713 #include "confdefs.h"
6714
6715 #include <stdlib.h>
6716 #include <string.h>
6717 int main() {
6718         unsigned long n = 6000000L;
6719         char *s = malloc(n);
6720         if (s != 0)
6721                 s[0] = s[n-1] = 0;
6722         ${cf_cv_main_return:-return}(s == 0);
6723 }
6724 _ACEOF
6725 rm -f conftest$ac_exeext
6726 if { (eval echo "$as_me:6726: \"$ac_link\"") >&5
6727   (eval $ac_link) 2>&5
6728   ac_status=$?
6729   echo "$as_me:6729: \$? = $ac_status" >&5
6730   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6731   { (eval echo "$as_me:6731: \"$ac_try\"") >&5
6732   (eval $ac_try) 2>&5
6733   ac_status=$?
6734   echo "$as_me:6734: \$? = $ac_status" >&5
6735   (exit $ac_status); }; }; then
6736   with_big_core=yes
6737 else
6738   echo "$as_me: program exited with status $ac_status" >&5
6739 echo "$as_me: failed program was:" >&5
6740 cat conftest.$ac_ext >&5
6741 with_big_core=no
6742 fi
6743 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6744 fi
6745 fi;
6746 echo "$as_me:6746: result: $with_big_core" >&5
6747 echo "${ECHO_T}$with_big_core" >&6
6748 test "x$with_big_core" = "xyes" &&
6749 cat >>confdefs.h <<\EOF
6750 #define HAVE_BIG_CORE 1
6751 EOF
6752
6753 ### ISO C only guarantees 512-char strings, we have tables which load faster
6754 ### when constructed using "big" strings.  More than the C compiler, the awk
6755 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6756 echo "$as_me:6756: checking if big-strings option selected" >&5
6757 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6758
6759 # Check whether --enable-big-strings or --disable-big-strings was given.
6760 if test "${enable_big_strings+set}" = set; then
6761   enableval="$enable_big_strings"
6762   with_big_strings=$enableval
6763 else
6764
6765         case x$AWK in #(vi
6766         x)
6767                 eval with_big_strings=no
6768                 ;;
6769         *) #(vi
6770                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6771                         | $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
6772                         eval with_big_strings=yes
6773                 else
6774                         eval with_big_strings=no
6775                 fi
6776                 ;;
6777         esac
6778
6779 fi;
6780 echo "$as_me:6780: result: $with_big_strings" >&5
6781 echo "${ECHO_T}$with_big_strings" >&6
6782
6783 USE_BIG_STRINGS=0
6784 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6785
6786 ###     use option --enable-termcap to compile in the termcap fallback support
6787 echo "$as_me:6787: checking if you want termcap-fallback support" >&5
6788 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6789
6790 # Check whether --enable-termcap or --disable-termcap was given.
6791 if test "${enable_termcap+set}" = set; then
6792   enableval="$enable_termcap"
6793   with_termcap=$enableval
6794 else
6795   with_termcap=no
6796 fi;
6797 echo "$as_me:6797: result: $with_termcap" >&5
6798 echo "${ECHO_T}$with_termcap" >&6
6799
6800 NCURSES_USE_TERMCAP=0
6801 if test "x$with_termcap" != "xyes" ; then
6802         if test "$use_database" = no ; then
6803                 if test -z "$with_fallback" ; then
6804                         { { echo "$as_me:6804: error: You have disabled the database w/o specifying fallbacks" >&5
6805 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6806    { (exit 1); exit 1; }; }
6807                 fi
6808         fi
6809
6810 cat >>confdefs.h <<\EOF
6811 #define PURE_TERMINFO 1
6812 EOF
6813
6814 else
6815
6816         if test "$with_ticlib" != no ; then
6817                 { { echo "$as_me:6817: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6818 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6819    { (exit 1); exit 1; }; }
6820         fi
6821
6822         NCURSES_USE_TERMCAP=1
6823         echo "$as_me:6823: checking for list of termcap files" >&5
6824 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6825
6826 # Check whether --with-termpath or --without-termpath was given.
6827 if test "${with_termpath+set}" = set; then
6828   withval="$with_termpath"
6829
6830 else
6831   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6832 fi;
6833 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6834 cf_dst_path=
6835 for cf_src_path in $withval
6836 do
6837
6838 if test "x$prefix" != xNONE; then
6839   cf_path_syntax="$prefix"
6840 else
6841   cf_path_syntax="$ac_default_prefix"
6842 fi
6843
6844 case ".$cf_src_path" in #(vi
6845 .\$\(*\)*|.\'*\'*) #(vi
6846   ;;
6847 ..|./*|.\\*) #(vi
6848   ;;
6849 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6850   ;;
6851 .\${*prefix}*|.\${*dir}*) #(vi
6852   eval cf_src_path="$cf_src_path"
6853   case ".$cf_src_path" in #(vi
6854   .NONE/*)
6855     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6856     ;;
6857   esac
6858   ;; #(vi
6859 .no|.NONE/*)
6860   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6861   ;;
6862 *)
6863   { { echo "$as_me:6863: error: expected a pathname, not \"$cf_src_path\"" >&5
6864 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6865    { (exit 1); exit 1; }; }
6866   ;;
6867 esac
6868
6869   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6870   cf_dst_path="${cf_dst_path}${cf_src_path}"
6871 done
6872 IFS="$ac_save_ifs"
6873
6874 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6875 # so we have to check/work around.  We do prefer the result of "eval"...
6876 eval cf_dst_eval="$cf_dst_path"
6877 case "x$cf_dst_eval" in #(vi
6878 xNONE*) #(vi
6879         TERMPATH=$cf_dst_path
6880         ;;
6881 *)
6882         TERMPATH="$cf_dst_eval"
6883         ;;
6884 esac
6885
6886         echo "$as_me:6886: result: $TERMPATH" >&5
6887 echo "${ECHO_T}$TERMPATH" >&6
6888         test -n "$TERMPATH" &&
6889 cat >>confdefs.h <<EOF
6890 #define TERMPATH "$TERMPATH"
6891 EOF
6892
6893         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6894         echo "$as_me:6894: checking if fast termcap-loader is needed" >&5
6895 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6896
6897 # Check whether --enable-getcap or --disable-getcap was given.
6898 if test "${enable_getcap+set}" = set; then
6899   enableval="$enable_getcap"
6900   with_getcap=$enableval
6901 else
6902   with_getcap=no
6903 fi;
6904         echo "$as_me:6904: result: $with_getcap" >&5
6905 echo "${ECHO_T}$with_getcap" >&6
6906         test "x$with_getcap" = "xyes" &&
6907 cat >>confdefs.h <<\EOF
6908 #define USE_GETCAP 1
6909 EOF
6910
6911         echo "$as_me:6911: checking if translated termcaps will be cached in ~/.terminfo" >&5
6912 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6913
6914 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6915 if test "${enable_getcap_cache+set}" = set; then
6916   enableval="$enable_getcap_cache"
6917   with_getcap_cache=$enableval
6918 else
6919   with_getcap_cache=no
6920 fi;
6921         echo "$as_me:6921: result: $with_getcap_cache" >&5
6922 echo "${ECHO_T}$with_getcap_cache" >&6
6923         test "x$with_getcap_cache" = "xyes" &&
6924 cat >>confdefs.h <<\EOF
6925 #define USE_GETCAP_CACHE 1
6926 EOF
6927
6928 fi
6929
6930 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6931 echo "$as_me:6931: checking if ~/.terminfo is wanted" >&5
6932 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6933
6934 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6935 if test "${enable_home_terminfo+set}" = set; then
6936   enableval="$enable_home_terminfo"
6937   with_home_terminfo=$enableval
6938 else
6939   with_home_terminfo=yes
6940 fi;
6941 echo "$as_me:6941: result: $with_home_terminfo" >&5
6942 echo "${ECHO_T}$with_home_terminfo" >&6
6943 test "x$with_home_terminfo" = "xyes" &&
6944 cat >>confdefs.h <<\EOF
6945 #define USE_HOME_TERMINFO 1
6946 EOF
6947
6948 echo "$as_me:6948: checking if you want to use restricted environment when running as root" >&5
6949 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6950
6951 # Check whether --enable-root-environ or --disable-root-environ was given.
6952 if test "${enable_root_environ+set}" = set; then
6953   enableval="$enable_root_environ"
6954   with_root_environ=$enableval
6955 else
6956   with_root_environ=yes
6957 fi;
6958 echo "$as_me:6958: result: $with_root_environ" >&5
6959 echo "${ECHO_T}$with_root_environ" >&6
6960 test "x$with_root_environ" = xyes &&
6961 cat >>confdefs.h <<\EOF
6962 #define USE_ROOT_ENVIRON 1
6963 EOF
6964
6965 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6966 ###   to reduce storage requirements for the terminfo database.
6967
6968 for ac_func in \
6969         remove \
6970         unlink
6971 do
6972 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6973 echo "$as_me:6973: checking for $ac_func" >&5
6974 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6975 if eval "test \"\${$as_ac_var+set}\" = set"; then
6976   echo $ECHO_N "(cached) $ECHO_C" >&6
6977 else
6978   cat >conftest.$ac_ext <<_ACEOF
6979 #line 6979 "configure"
6980 #include "confdefs.h"
6981 /* System header to define __stub macros and hopefully few prototypes,
6982     which can conflict with char $ac_func (); below.  */
6983 #include <assert.h>
6984 /* Override any gcc2 internal prototype to avoid an error.  */
6985 #ifdef __cplusplus
6986 extern "C"
6987 #endif
6988 /* We use char because int might match the return type of a gcc2
6989    builtin and then its argument prototype would still apply.  */
6990 char $ac_func ();
6991 char (*f) ();
6992
6993 int
6994 main ()
6995 {
6996 /* The GNU C library defines this for functions which it implements
6997     to always fail with ENOSYS.  Some functions are actually named
6998     something starting with __ and the normal name is an alias.  */
6999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7000 choke me
7001 #else
7002 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7003 #endif
7004
7005   ;
7006   return 0;
7007 }
7008 _ACEOF
7009 rm -f conftest.$ac_objext conftest$ac_exeext
7010 if { (eval echo "$as_me:7010: \"$ac_link\"") >&5
7011   (eval $ac_link) 2>&5
7012   ac_status=$?
7013   echo "$as_me:7013: \$? = $ac_status" >&5
7014   (exit $ac_status); } &&
7015          { ac_try='test -s conftest$ac_exeext'
7016   { (eval echo "$as_me:7016: \"$ac_try\"") >&5
7017   (eval $ac_try) 2>&5
7018   ac_status=$?
7019   echo "$as_me:7019: \$? = $ac_status" >&5
7020   (exit $ac_status); }; }; then
7021   eval "$as_ac_var=yes"
7022 else
7023   echo "$as_me: failed program was:" >&5
7024 cat conftest.$ac_ext >&5
7025 eval "$as_ac_var=no"
7026 fi
7027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7028 fi
7029 echo "$as_me:7029: result: `eval echo '${'$as_ac_var'}'`" >&5
7030 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7031 if test `eval echo '${'$as_ac_var'}'` = yes; then
7032   cat >>confdefs.h <<EOF
7033 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7034 EOF
7035
7036 fi
7037 done
7038
7039 if test "$cross_compiling" = yes ; then
7040
7041 for ac_func in \
7042                 link \
7043                 symlink
7044 do
7045 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7046 echo "$as_me:7046: checking for $ac_func" >&5
7047 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7048 if eval "test \"\${$as_ac_var+set}\" = set"; then
7049   echo $ECHO_N "(cached) $ECHO_C" >&6
7050 else
7051   cat >conftest.$ac_ext <<_ACEOF
7052 #line 7052 "configure"
7053 #include "confdefs.h"
7054 /* System header to define __stub macros and hopefully few prototypes,
7055     which can conflict with char $ac_func (); below.  */
7056 #include <assert.h>
7057 /* Override any gcc2 internal prototype to avoid an error.  */
7058 #ifdef __cplusplus
7059 extern "C"
7060 #endif
7061 /* We use char because int might match the return type of a gcc2
7062    builtin and then its argument prototype would still apply.  */
7063 char $ac_func ();
7064 char (*f) ();
7065
7066 int
7067 main ()
7068 {
7069 /* The GNU C library defines this for functions which it implements
7070     to always fail with ENOSYS.  Some functions are actually named
7071     something starting with __ and the normal name is an alias.  */
7072 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7073 choke me
7074 #else
7075 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7076 #endif
7077
7078   ;
7079   return 0;
7080 }
7081 _ACEOF
7082 rm -f conftest.$ac_objext conftest$ac_exeext
7083 if { (eval echo "$as_me:7083: \"$ac_link\"") >&5
7084   (eval $ac_link) 2>&5
7085   ac_status=$?
7086   echo "$as_me:7086: \$? = $ac_status" >&5
7087   (exit $ac_status); } &&
7088          { ac_try='test -s conftest$ac_exeext'
7089   { (eval echo "$as_me:7089: \"$ac_try\"") >&5
7090   (eval $ac_try) 2>&5
7091   ac_status=$?
7092   echo "$as_me:7092: \$? = $ac_status" >&5
7093   (exit $ac_status); }; }; then
7094   eval "$as_ac_var=yes"
7095 else
7096   echo "$as_me: failed program was:" >&5
7097 cat conftest.$ac_ext >&5
7098 eval "$as_ac_var=no"
7099 fi
7100 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7101 fi
7102 echo "$as_me:7102: result: `eval echo '${'$as_ac_var'}'`" >&5
7103 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7104 if test `eval echo '${'$as_ac_var'}'` = yes; then
7105   cat >>confdefs.h <<EOF
7106 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7107 EOF
7108
7109 fi
7110 done
7111
7112 else
7113         echo "$as_me:7113: checking if link/symlink functions work" >&5
7114 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7115 if test "${cf_cv_link_funcs+set}" = set; then
7116   echo $ECHO_N "(cached) $ECHO_C" >&6
7117 else
7118
7119                 cf_cv_link_funcs=
7120                 for cf_func in link symlink ; do
7121                         if test "$cross_compiling" = yes; then
7122
7123                         eval 'ac_cv_func_'$cf_func'=error'
7124 else
7125   cat >conftest.$ac_ext <<_ACEOF
7126 #line 7126 "configure"
7127 #include "confdefs.h"
7128
7129 #include <sys/types.h>
7130 #include <sys/stat.h>
7131 #ifdef HAVE_UNISTD_H
7132 #include <unistd.h>
7133 #endif
7134 int main()
7135 {
7136         int fail = 0;
7137         char *src = "config.log";
7138         char *dst = "conftest.chk";
7139         struct stat src_sb;
7140         struct stat dst_sb;
7141
7142         stat(src, &src_sb);
7143         fail = ($cf_func("config.log", "conftest.chk") < 0)
7144             || (stat(dst, &dst_sb) < 0)
7145             || (dst_sb.st_mtime != src_sb.st_mtime);
7146 #ifdef HAVE_UNLINK
7147         unlink(dst);
7148 #else
7149         remove(dst);
7150 #endif
7151         ${cf_cv_main_return:-return} (fail);
7152 }
7153
7154 _ACEOF
7155 rm -f conftest$ac_exeext
7156 if { (eval echo "$as_me:7156: \"$ac_link\"") >&5
7157   (eval $ac_link) 2>&5
7158   ac_status=$?
7159   echo "$as_me:7159: \$? = $ac_status" >&5
7160   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7161   { (eval echo "$as_me:7161: \"$ac_try\"") >&5
7162   (eval $ac_try) 2>&5
7163   ac_status=$?
7164   echo "$as_me:7164: \$? = $ac_status" >&5
7165   (exit $ac_status); }; }; then
7166
7167                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7168                         eval 'ac_cv_func_'$cf_func'=yes'
7169 else
7170   echo "$as_me: program exited with status $ac_status" >&5
7171 echo "$as_me: failed program was:" >&5
7172 cat conftest.$ac_ext >&5
7173
7174                         eval 'ac_cv_func_'$cf_func'=no'
7175 fi
7176 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7177 fi
7178                 done
7179                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7180
7181 fi
7182 echo "$as_me:7182: result: $cf_cv_link_funcs" >&5
7183 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7184         test "$ac_cv_func_link"    = yes &&
7185 cat >>confdefs.h <<\EOF
7186 #define HAVE_LINK 1
7187 EOF
7188
7189         test "$ac_cv_func_symlink" = yes &&
7190 cat >>confdefs.h <<\EOF
7191 #define HAVE_SYMLINK 1
7192 EOF
7193
7194 fi
7195
7196 with_links=no
7197 with_symlinks=no
7198
7199 # soft links (symbolic links) are useful for some systems where hard links do
7200 # not work, or to make it simpler to copy terminfo trees around.
7201 if test "x$ac_cv_func_symlink" = xyes ; then
7202     echo "$as_me:7202: checking if tic should use symbolic links" >&5
7203 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7204
7205 # Check whether --enable-symlinks or --disable-symlinks was given.
7206 if test "${enable_symlinks+set}" = set; then
7207   enableval="$enable_symlinks"
7208   with_symlinks=$enableval
7209 else
7210   with_symlinks=no
7211 fi;
7212     echo "$as_me:7212: result: $with_symlinks" >&5
7213 echo "${ECHO_T}$with_symlinks" >&6
7214 fi
7215
7216 # If we have hard links and did not choose to use soft links instead, there is
7217 # no reason to make this choice optional - use the hard links.
7218 if test "$with_symlinks" = no ; then
7219     echo "$as_me:7219: checking if tic should use hard links" >&5
7220 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7221     if test "x$ac_cv_func_link" = xyes ; then
7222         with_links=yes
7223     else
7224         with_links=no
7225     fi
7226     echo "$as_me:7226: result: $with_links" >&5
7227 echo "${ECHO_T}$with_links" >&6
7228 fi
7229
7230 test "x$with_links" = xyes &&
7231 cat >>confdefs.h <<\EOF
7232 #define USE_LINKS 1
7233 EOF
7234
7235 test "x$with_symlinks" = xyes &&
7236 cat >>confdefs.h <<\EOF
7237 #define USE_SYMLINKS 1
7238 EOF
7239
7240 ###   use option --enable-broken-linker to force on use of broken-linker support
7241 echo "$as_me:7241: checking if you want broken-linker support code" >&5
7242 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7243
7244 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7245 if test "${enable_broken_linker+set}" = set; then
7246   enableval="$enable_broken_linker"
7247   with_broken_linker=$enableval
7248 else
7249   with_broken_linker=${BROKEN_LINKER:-no}
7250 fi;
7251 echo "$as_me:7251: result: $with_broken_linker" >&5
7252 echo "${ECHO_T}$with_broken_linker" >&6
7253
7254 BROKEN_LINKER=0
7255 if test "x$with_broken_linker" = xyes ; then
7256
7257 cat >>confdefs.h <<\EOF
7258 #define BROKEN_LINKER 1
7259 EOF
7260
7261         BROKEN_LINKER=1
7262 elif test "$DFT_LWR_MODEL" = shared ; then
7263         case $cf_cv_system_name in #(vi
7264         cygwin*)
7265
7266 cat >>confdefs.h <<\EOF
7267 #define BROKEN_LINKER 1
7268 EOF
7269
7270                 BROKEN_LINKER=1
7271                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7272
7273 echo "${as_me:-configure}:7273: testing cygwin linker is broken anyway ..." 1>&5
7274
7275                 ;;
7276         esac
7277 fi
7278
7279 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7280 echo "$as_me:7280: checking if tputs should process BSD-style prefix padding" >&5
7281 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7282
7283 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7284 if test "${enable_bsdpad+set}" = set; then
7285   enableval="$enable_bsdpad"
7286   with_bsdpad=$enableval
7287 else
7288   with_bsdpad=no
7289 fi;
7290 echo "$as_me:7290: result: $with_bsdpad" >&5
7291 echo "${ECHO_T}$with_bsdpad" >&6
7292 test "x$with_bsdpad" = xyes &&
7293 cat >>confdefs.h <<\EOF
7294 #define BSD_TPUTS 1
7295 EOF
7296
7297 ###   use option --enable-widec to turn on use of wide-character support
7298 NCURSES_CH_T=chtype
7299 NCURSES_LIBUTF8=0
7300
7301 NEED_WCHAR_H=0
7302 NCURSES_MBSTATE_T=0
7303 NCURSES_WCHAR_T=0
7304 NCURSES_WINT_T=0
7305
7306 # Check to define _XOPEN_SOURCE "automatically"
7307
7308 cf_XOPEN_SOURCE=500
7309 cf_POSIX_C_SOURCE=199506L
7310 cf_xopen_source=
7311
7312 case $host_os in #(vi
7313 aix[4-7]*) #(vi
7314         cf_xopen_source="-D_ALL_SOURCE"
7315         ;;
7316 cygwin|msys) #(vi
7317         cf_XOPEN_SOURCE=600
7318         ;;
7319 darwin[0-8].*) #(vi
7320         cf_xopen_source="-D_APPLE_C_SOURCE"
7321         ;;
7322 darwin*) #(vi
7323         cf_xopen_source="-D_DARWIN_C_SOURCE"
7324         cf_XOPEN_SOURCE=
7325         ;;
7326 freebsd*|dragonfly*) #(vi
7327         # 5.x headers associate
7328         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7329         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7330         cf_POSIX_C_SOURCE=200112L
7331         cf_XOPEN_SOURCE=600
7332         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7333         ;;
7334 hpux11*) #(vi
7335         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7336         ;;
7337 hpux*) #(vi
7338         cf_xopen_source="-D_HPUX_SOURCE"
7339         ;;
7340 irix[56].*) #(vi
7341         cf_xopen_source="-D_SGI_SOURCE"
7342         cf_XOPEN_SOURCE=
7343         ;;
7344 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7345
7346 echo "$as_me:7346: checking if we must define _GNU_SOURCE" >&5
7347 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7348 if test "${cf_cv_gnu_source+set}" = set; then
7349   echo $ECHO_N "(cached) $ECHO_C" >&6
7350 else
7351
7352 cat >conftest.$ac_ext <<_ACEOF
7353 #line 7353 "configure"
7354 #include "confdefs.h"
7355 #include <sys/types.h>
7356 int
7357 main ()
7358 {
7359
7360 #ifndef _XOPEN_SOURCE
7361 make an error
7362 #endif
7363   ;
7364   return 0;
7365 }
7366 _ACEOF
7367 rm -f conftest.$ac_objext
7368 if { (eval echo "$as_me:7368: \"$ac_compile\"") >&5
7369   (eval $ac_compile) 2>&5
7370   ac_status=$?
7371   echo "$as_me:7371: \$? = $ac_status" >&5
7372   (exit $ac_status); } &&
7373          { ac_try='test -s conftest.$ac_objext'
7374   { (eval echo "$as_me:7374: \"$ac_try\"") >&5
7375   (eval $ac_try) 2>&5
7376   ac_status=$?
7377   echo "$as_me:7377: \$? = $ac_status" >&5
7378   (exit $ac_status); }; }; then
7379   cf_cv_gnu_source=no
7380 else
7381   echo "$as_me: failed program was:" >&5
7382 cat conftest.$ac_ext >&5
7383 cf_save="$CPPFLAGS"
7384          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7385          cat >conftest.$ac_ext <<_ACEOF
7386 #line 7386 "configure"
7387 #include "confdefs.h"
7388 #include <sys/types.h>
7389 int
7390 main ()
7391 {
7392
7393 #ifdef _XOPEN_SOURCE
7394 make an error
7395 #endif
7396   ;
7397   return 0;
7398 }
7399 _ACEOF
7400 rm -f conftest.$ac_objext
7401 if { (eval echo "$as_me:7401: \"$ac_compile\"") >&5
7402   (eval $ac_compile) 2>&5
7403   ac_status=$?
7404   echo "$as_me:7404: \$? = $ac_status" >&5
7405   (exit $ac_status); } &&
7406          { ac_try='test -s conftest.$ac_objext'
7407   { (eval echo "$as_me:7407: \"$ac_try\"") >&5
7408   (eval $ac_try) 2>&5
7409   ac_status=$?
7410   echo "$as_me:7410: \$? = $ac_status" >&5
7411   (exit $ac_status); }; }; then
7412   cf_cv_gnu_source=no
7413 else
7414   echo "$as_me: failed program was:" >&5
7415 cat conftest.$ac_ext >&5
7416 cf_cv_gnu_source=yes
7417 fi
7418 rm -f conftest.$ac_objext conftest.$ac_ext
7419         CPPFLAGS="$cf_save"
7420
7421 fi
7422 rm -f conftest.$ac_objext conftest.$ac_ext
7423
7424 fi
7425 echo "$as_me:7425: result: $cf_cv_gnu_source" >&5
7426 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7427 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7428
7429         ;;
7430 minix*) #(vi
7431         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7432         ;;
7433 mirbsd*) #(vi
7434         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7435         cf_XOPEN_SOURCE=
7436
7437 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7438
7439 cf_save_CFLAGS="$CFLAGS"
7440 cf_save_CPPFLAGS="$CPPFLAGS"
7441
7442 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7443         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7444                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7445
7446 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7447         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7448                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7449
7450 echo "$as_me:7450: checking if we should define _POSIX_C_SOURCE" >&5
7451 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7452 if test "${cf_cv_posix_c_source+set}" = set; then
7453   echo $ECHO_N "(cached) $ECHO_C" >&6
7454 else
7455
7456 echo "${as_me:-configure}:7456: testing if the symbol is already defined go no further ..." 1>&5
7457
7458         cat >conftest.$ac_ext <<_ACEOF
7459 #line 7459 "configure"
7460 #include "confdefs.h"
7461 #include <sys/types.h>
7462 int
7463 main ()
7464 {
7465
7466 #ifndef _POSIX_C_SOURCE
7467 make an error
7468 #endif
7469   ;
7470   return 0;
7471 }
7472 _ACEOF
7473 rm -f conftest.$ac_objext
7474 if { (eval echo "$as_me:7474: \"$ac_compile\"") >&5
7475   (eval $ac_compile) 2>&5
7476   ac_status=$?
7477   echo "$as_me:7477: \$? = $ac_status" >&5
7478   (exit $ac_status); } &&
7479          { ac_try='test -s conftest.$ac_objext'
7480   { (eval echo "$as_me:7480: \"$ac_try\"") >&5
7481   (eval $ac_try) 2>&5
7482   ac_status=$?
7483   echo "$as_me:7483: \$? = $ac_status" >&5
7484   (exit $ac_status); }; }; then
7485   cf_cv_posix_c_source=no
7486 else
7487   echo "$as_me: failed program was:" >&5
7488 cat conftest.$ac_ext >&5
7489 cf_want_posix_source=no
7490          case .$cf_POSIX_C_SOURCE in #(vi
7491          .[12]??*) #(vi
7492                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7493                 ;;
7494          .2) #(vi
7495                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7496                 cf_want_posix_source=yes
7497                 ;;
7498          .*)
7499                 cf_want_posix_source=yes
7500                 ;;
7501          esac
7502          if test "$cf_want_posix_source" = yes ; then
7503                 cat >conftest.$ac_ext <<_ACEOF
7504 #line 7504 "configure"
7505 #include "confdefs.h"
7506 #include <sys/types.h>
7507 int
7508 main ()
7509 {
7510
7511 #ifdef _POSIX_SOURCE
7512 make an error
7513 #endif
7514   ;
7515   return 0;
7516 }
7517 _ACEOF
7518 rm -f conftest.$ac_objext
7519 if { (eval echo "$as_me:7519: \"$ac_compile\"") >&5
7520   (eval $ac_compile) 2>&5
7521   ac_status=$?
7522   echo "$as_me:7522: \$? = $ac_status" >&5
7523   (exit $ac_status); } &&
7524          { ac_try='test -s conftest.$ac_objext'
7525   { (eval echo "$as_me:7525: \"$ac_try\"") >&5
7526   (eval $ac_try) 2>&5
7527   ac_status=$?
7528   echo "$as_me:7528: \$? = $ac_status" >&5
7529   (exit $ac_status); }; }; then
7530   :
7531 else
7532   echo "$as_me: failed program was:" >&5
7533 cat conftest.$ac_ext >&5
7534 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7535 fi
7536 rm -f conftest.$ac_objext conftest.$ac_ext
7537          fi
7538
7539 echo "${as_me:-configure}:7539: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7540
7541          CFLAGS="$cf_trim_CFLAGS"
7542          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7543
7544 echo "${as_me:-configure}:7544: testing if the second compile does not leave our definition intact error ..." 1>&5
7545
7546          cat >conftest.$ac_ext <<_ACEOF
7547 #line 7547 "configure"
7548 #include "confdefs.h"
7549 #include <sys/types.h>
7550 int
7551 main ()
7552 {
7553
7554 #ifndef _POSIX_C_SOURCE
7555 make an error
7556 #endif
7557   ;
7558   return 0;
7559 }
7560 _ACEOF
7561 rm -f conftest.$ac_objext
7562 if { (eval echo "$as_me:7562: \"$ac_compile\"") >&5
7563   (eval $ac_compile) 2>&5
7564   ac_status=$?
7565   echo "$as_me:7565: \$? = $ac_status" >&5
7566   (exit $ac_status); } &&
7567          { ac_try='test -s conftest.$ac_objext'
7568   { (eval echo "$as_me:7568: \"$ac_try\"") >&5
7569   (eval $ac_try) 2>&5
7570   ac_status=$?
7571   echo "$as_me:7571: \$? = $ac_status" >&5
7572   (exit $ac_status); }; }; then
7573   :
7574 else
7575   echo "$as_me: failed program was:" >&5
7576 cat conftest.$ac_ext >&5
7577 cf_cv_posix_c_source=no
7578 fi
7579 rm -f conftest.$ac_objext conftest.$ac_ext
7580          CFLAGS="$cf_save_CFLAGS"
7581          CPPFLAGS="$cf_save_CPPFLAGS"
7582
7583 fi
7584 rm -f conftest.$ac_objext conftest.$ac_ext
7585
7586 fi
7587 echo "$as_me:7587: result: $cf_cv_posix_c_source" >&5
7588 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7589
7590 if test "$cf_cv_posix_c_source" != no ; then
7591         CFLAGS="$cf_trim_CFLAGS"
7592         CPPFLAGS="$cf_trim_CPPFLAGS"
7593
7594 cf_fix_cppflags=no
7595 cf_new_cflags=
7596 cf_new_cppflags=
7597 cf_new_extra_cppflags=
7598
7599 for cf_add_cflags in $cf_cv_posix_c_source
7600 do
7601 case $cf_fix_cppflags in
7602 no)
7603         case $cf_add_cflags in #(vi
7604         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7605                 case $cf_add_cflags in
7606                 -D*)
7607                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7608
7609                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7610                                 && test -z "${cf_tst_cflags}" \
7611                                 && cf_fix_cppflags=yes
7612
7613                         if test $cf_fix_cppflags = yes ; then
7614                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7615                                 continue
7616                         elif test "${cf_tst_cflags}" = "\"'" ; then
7617                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7618                                 continue
7619                         fi
7620                         ;;
7621                 esac
7622                 case "$CPPFLAGS" in
7623                 *$cf_add_cflags) #(vi
7624                         ;;
7625                 *) #(vi
7626                         case $cf_add_cflags in #(vi
7627                         -D*)
7628                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7629
7630 CPPFLAGS=`echo "$CPPFLAGS" | \
7631         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7632                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7633
7634                                 ;;
7635                         esac
7636                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7637                         ;;
7638                 esac
7639                 ;;
7640         *)
7641                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7642                 ;;
7643         esac
7644         ;;
7645 yes)
7646         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7647
7648         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7649
7650         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7651                 && test -z "${cf_tst_cflags}" \
7652                 && cf_fix_cppflags=no
7653         ;;
7654 esac
7655 done
7656
7657 if test -n "$cf_new_cflags" ; then
7658
7659         CFLAGS="$CFLAGS $cf_new_cflags"
7660 fi
7661
7662 if test -n "$cf_new_cppflags" ; then
7663
7664         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7665 fi
7666
7667 if test -n "$cf_new_extra_cppflags" ; then
7668
7669         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7670 fi
7671
7672 fi
7673
7674         ;;
7675 netbsd*) #(vi
7676         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7677         ;;
7678 openbsd[4-9]*) #(vi
7679         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7680         cf_xopen_source="-D_BSD_SOURCE"
7681         cf_XOPEN_SOURCE=600
7682         ;;
7683 openbsd*) #(vi
7684         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7685         ;;
7686 osf[45]*) #(vi
7687         cf_xopen_source="-D_OSF_SOURCE"
7688         ;;
7689 nto-qnx*) #(vi
7690         cf_xopen_source="-D_QNX_SOURCE"
7691         ;;
7692 sco*) #(vi
7693         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7694         ;;
7695 solaris2.*) #(vi
7696         cf_xopen_source="-D__EXTENSIONS__"
7697         cf_cv_xopen_source=broken
7698         ;;
7699 *)
7700
7701 echo "$as_me:7701: checking if we should define _XOPEN_SOURCE" >&5
7702 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7703 if test "${cf_cv_xopen_source+set}" = set; then
7704   echo $ECHO_N "(cached) $ECHO_C" >&6
7705 else
7706
7707         cat >conftest.$ac_ext <<_ACEOF
7708 #line 7708 "configure"
7709 #include "confdefs.h"
7710
7711 #include <stdlib.h>
7712 #include <string.h>
7713 #include <sys/types.h>
7714
7715 int
7716 main ()
7717 {
7718
7719 #ifndef _XOPEN_SOURCE
7720 make an error
7721 #endif
7722   ;
7723   return 0;
7724 }
7725 _ACEOF
7726 rm -f conftest.$ac_objext
7727 if { (eval echo "$as_me:7727: \"$ac_compile\"") >&5
7728   (eval $ac_compile) 2>&5
7729   ac_status=$?
7730   echo "$as_me:7730: \$? = $ac_status" >&5
7731   (exit $ac_status); } &&
7732          { ac_try='test -s conftest.$ac_objext'
7733   { (eval echo "$as_me:7733: \"$ac_try\"") >&5
7734   (eval $ac_try) 2>&5
7735   ac_status=$?
7736   echo "$as_me:7736: \$? = $ac_status" >&5
7737   (exit $ac_status); }; }; then
7738   cf_cv_xopen_source=no
7739 else
7740   echo "$as_me: failed program was:" >&5
7741 cat conftest.$ac_ext >&5
7742 cf_save="$CPPFLAGS"
7743          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7744          cat >conftest.$ac_ext <<_ACEOF
7745 #line 7745 "configure"
7746 #include "confdefs.h"
7747
7748 #include <stdlib.h>
7749 #include <string.h>
7750 #include <sys/types.h>
7751
7752 int
7753 main ()
7754 {
7755
7756 #ifdef _XOPEN_SOURCE
7757 make an error
7758 #endif
7759   ;
7760   return 0;
7761 }
7762 _ACEOF
7763 rm -f conftest.$ac_objext
7764 if { (eval echo "$as_me:7764: \"$ac_compile\"") >&5
7765   (eval $ac_compile) 2>&5
7766   ac_status=$?
7767   echo "$as_me:7767: \$? = $ac_status" >&5
7768   (exit $ac_status); } &&
7769          { ac_try='test -s conftest.$ac_objext'
7770   { (eval echo "$as_me:7770: \"$ac_try\"") >&5
7771   (eval $ac_try) 2>&5
7772   ac_status=$?
7773   echo "$as_me:7773: \$? = $ac_status" >&5
7774   (exit $ac_status); }; }; then
7775   cf_cv_xopen_source=no
7776 else
7777   echo "$as_me: failed program was:" >&5
7778 cat conftest.$ac_ext >&5
7779 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7780 fi
7781 rm -f conftest.$ac_objext conftest.$ac_ext
7782         CPPFLAGS="$cf_save"
7783
7784 fi
7785 rm -f conftest.$ac_objext conftest.$ac_ext
7786
7787 fi
7788 echo "$as_me:7788: result: $cf_cv_xopen_source" >&5
7789 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7790
7791 if test "$cf_cv_xopen_source" != no ; then
7792
7793 CFLAGS=`echo "$CFLAGS" | \
7794         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7795                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7796
7797 CPPFLAGS=`echo "$CPPFLAGS" | \
7798         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7799                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7800
7801         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7802
7803 cf_fix_cppflags=no
7804 cf_new_cflags=
7805 cf_new_cppflags=
7806 cf_new_extra_cppflags=
7807
7808 for cf_add_cflags in $cf_temp_xopen_source
7809 do
7810 case $cf_fix_cppflags in
7811 no)
7812         case $cf_add_cflags in #(vi
7813         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7814                 case $cf_add_cflags in
7815                 -D*)
7816                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7817
7818                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7819                                 && test -z "${cf_tst_cflags}" \
7820                                 && cf_fix_cppflags=yes
7821
7822                         if test $cf_fix_cppflags = yes ; then
7823                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7824                                 continue
7825                         elif test "${cf_tst_cflags}" = "\"'" ; then
7826                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7827                                 continue
7828                         fi
7829                         ;;
7830                 esac
7831                 case "$CPPFLAGS" in
7832                 *$cf_add_cflags) #(vi
7833                         ;;
7834                 *) #(vi
7835                         case $cf_add_cflags in #(vi
7836                         -D*)
7837                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7838
7839 CPPFLAGS=`echo "$CPPFLAGS" | \
7840         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7841                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7842
7843                                 ;;
7844                         esac
7845                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7846                         ;;
7847                 esac
7848                 ;;
7849         *)
7850                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7851                 ;;
7852         esac
7853         ;;
7854 yes)
7855         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7856
7857         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7858
7859         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7860                 && test -z "${cf_tst_cflags}" \
7861                 && cf_fix_cppflags=no
7862         ;;
7863 esac
7864 done
7865
7866 if test -n "$cf_new_cflags" ; then
7867
7868         CFLAGS="$CFLAGS $cf_new_cflags"
7869 fi
7870
7871 if test -n "$cf_new_cppflags" ; then
7872
7873         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7874 fi
7875
7876 if test -n "$cf_new_extra_cppflags" ; then
7877
7878         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7879 fi
7880
7881 fi
7882
7883 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7884
7885 cf_save_CFLAGS="$CFLAGS"
7886 cf_save_CPPFLAGS="$CPPFLAGS"
7887
7888 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7889         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7890                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7891
7892 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7893         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7894                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7895
7896 echo "$as_me:7896: checking if we should define _POSIX_C_SOURCE" >&5
7897 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7898 if test "${cf_cv_posix_c_source+set}" = set; then
7899   echo $ECHO_N "(cached) $ECHO_C" >&6
7900 else
7901
7902 echo "${as_me:-configure}:7902: testing if the symbol is already defined go no further ..." 1>&5
7903
7904         cat >conftest.$ac_ext <<_ACEOF
7905 #line 7905 "configure"
7906 #include "confdefs.h"
7907 #include <sys/types.h>
7908 int
7909 main ()
7910 {
7911
7912 #ifndef _POSIX_C_SOURCE
7913 make an error
7914 #endif
7915   ;
7916   return 0;
7917 }
7918 _ACEOF
7919 rm -f conftest.$ac_objext
7920 if { (eval echo "$as_me:7920: \"$ac_compile\"") >&5
7921   (eval $ac_compile) 2>&5
7922   ac_status=$?
7923   echo "$as_me:7923: \$? = $ac_status" >&5
7924   (exit $ac_status); } &&
7925          { ac_try='test -s conftest.$ac_objext'
7926   { (eval echo "$as_me:7926: \"$ac_try\"") >&5
7927   (eval $ac_try) 2>&5
7928   ac_status=$?
7929   echo "$as_me:7929: \$? = $ac_status" >&5
7930   (exit $ac_status); }; }; then
7931   cf_cv_posix_c_source=no
7932 else
7933   echo "$as_me: failed program was:" >&5
7934 cat conftest.$ac_ext >&5
7935 cf_want_posix_source=no
7936          case .$cf_POSIX_C_SOURCE in #(vi
7937          .[12]??*) #(vi
7938                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7939                 ;;
7940          .2) #(vi
7941                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7942                 cf_want_posix_source=yes
7943                 ;;
7944          .*)
7945                 cf_want_posix_source=yes
7946                 ;;
7947          esac
7948          if test "$cf_want_posix_source" = yes ; then
7949                 cat >conftest.$ac_ext <<_ACEOF
7950 #line 7950 "configure"
7951 #include "confdefs.h"
7952 #include <sys/types.h>
7953 int
7954 main ()
7955 {
7956
7957 #ifdef _POSIX_SOURCE
7958 make an error
7959 #endif
7960   ;
7961   return 0;
7962 }
7963 _ACEOF
7964 rm -f conftest.$ac_objext
7965 if { (eval echo "$as_me:7965: \"$ac_compile\"") >&5
7966   (eval $ac_compile) 2>&5
7967   ac_status=$?
7968   echo "$as_me:7968: \$? = $ac_status" >&5
7969   (exit $ac_status); } &&
7970          { ac_try='test -s conftest.$ac_objext'
7971   { (eval echo "$as_me:7971: \"$ac_try\"") >&5
7972   (eval $ac_try) 2>&5
7973   ac_status=$?
7974   echo "$as_me:7974: \$? = $ac_status" >&5
7975   (exit $ac_status); }; }; then
7976   :
7977 else
7978   echo "$as_me: failed program was:" >&5
7979 cat conftest.$ac_ext >&5
7980 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7981 fi
7982 rm -f conftest.$ac_objext conftest.$ac_ext
7983          fi
7984
7985 echo "${as_me:-configure}:7985: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7986
7987          CFLAGS="$cf_trim_CFLAGS"
7988          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7989
7990 echo "${as_me:-configure}:7990: testing if the second compile does not leave our definition intact error ..." 1>&5
7991
7992          cat >conftest.$ac_ext <<_ACEOF
7993 #line 7993 "configure"
7994 #include "confdefs.h"
7995 #include <sys/types.h>
7996 int
7997 main ()
7998 {
7999
8000 #ifndef _POSIX_C_SOURCE
8001 make an error
8002 #endif
8003   ;
8004   return 0;
8005 }
8006 _ACEOF
8007 rm -f conftest.$ac_objext
8008 if { (eval echo "$as_me:8008: \"$ac_compile\"") >&5
8009   (eval $ac_compile) 2>&5
8010   ac_status=$?
8011   echo "$as_me:8011: \$? = $ac_status" >&5
8012   (exit $ac_status); } &&
8013          { ac_try='test -s conftest.$ac_objext'
8014   { (eval echo "$as_me:8014: \"$ac_try\"") >&5
8015   (eval $ac_try) 2>&5
8016   ac_status=$?
8017   echo "$as_me:8017: \$? = $ac_status" >&5
8018   (exit $ac_status); }; }; then
8019   :
8020 else
8021   echo "$as_me: failed program was:" >&5
8022 cat conftest.$ac_ext >&5
8023 cf_cv_posix_c_source=no
8024 fi
8025 rm -f conftest.$ac_objext conftest.$ac_ext
8026          CFLAGS="$cf_save_CFLAGS"
8027          CPPFLAGS="$cf_save_CPPFLAGS"
8028
8029 fi
8030 rm -f conftest.$ac_objext conftest.$ac_ext
8031
8032 fi
8033 echo "$as_me:8033: result: $cf_cv_posix_c_source" >&5
8034 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8035
8036 if test "$cf_cv_posix_c_source" != no ; then
8037         CFLAGS="$cf_trim_CFLAGS"
8038         CPPFLAGS="$cf_trim_CPPFLAGS"
8039
8040 cf_fix_cppflags=no
8041 cf_new_cflags=
8042 cf_new_cppflags=
8043 cf_new_extra_cppflags=
8044
8045 for cf_add_cflags in $cf_cv_posix_c_source
8046 do
8047 case $cf_fix_cppflags in
8048 no)
8049         case $cf_add_cflags in #(vi
8050         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8051                 case $cf_add_cflags in
8052                 -D*)
8053                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8054
8055                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8056                                 && test -z "${cf_tst_cflags}" \
8057                                 && cf_fix_cppflags=yes
8058
8059                         if test $cf_fix_cppflags = yes ; then
8060                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8061                                 continue
8062                         elif test "${cf_tst_cflags}" = "\"'" ; then
8063                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8064                                 continue
8065                         fi
8066                         ;;
8067                 esac
8068                 case "$CPPFLAGS" in
8069                 *$cf_add_cflags) #(vi
8070                         ;;
8071                 *) #(vi
8072                         case $cf_add_cflags in #(vi
8073                         -D*)
8074                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8075
8076 CPPFLAGS=`echo "$CPPFLAGS" | \
8077         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8078                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8079
8080                                 ;;
8081                         esac
8082                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8083                         ;;
8084                 esac
8085                 ;;
8086         *)
8087                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8088                 ;;
8089         esac
8090         ;;
8091 yes)
8092         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8093
8094         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8095
8096         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8097                 && test -z "${cf_tst_cflags}" \
8098                 && cf_fix_cppflags=no
8099         ;;
8100 esac
8101 done
8102
8103 if test -n "$cf_new_cflags" ; then
8104
8105         CFLAGS="$CFLAGS $cf_new_cflags"
8106 fi
8107
8108 if test -n "$cf_new_cppflags" ; then
8109
8110         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8111 fi
8112
8113 if test -n "$cf_new_extra_cppflags" ; then
8114
8115         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8116 fi
8117
8118 fi
8119
8120         ;;
8121 esac
8122
8123 if test -n "$cf_xopen_source" ; then
8124
8125 cf_fix_cppflags=no
8126 cf_new_cflags=
8127 cf_new_cppflags=
8128 cf_new_extra_cppflags=
8129
8130 for cf_add_cflags in $cf_xopen_source
8131 do
8132 case $cf_fix_cppflags in
8133 no)
8134         case $cf_add_cflags in #(vi
8135         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8136                 case $cf_add_cflags in
8137                 -D*)
8138                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8139
8140                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8141                                 && test -z "${cf_tst_cflags}" \
8142                                 && cf_fix_cppflags=yes
8143
8144                         if test $cf_fix_cppflags = yes ; then
8145                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8146                                 continue
8147                         elif test "${cf_tst_cflags}" = "\"'" ; then
8148                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8149                                 continue
8150                         fi
8151                         ;;
8152                 esac
8153                 case "$CPPFLAGS" in
8154                 *$cf_add_cflags) #(vi
8155                         ;;
8156                 *) #(vi
8157                         case $cf_add_cflags in #(vi
8158                         -D*)
8159                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8160
8161 CPPFLAGS=`echo "$CPPFLAGS" | \
8162         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8163                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8164
8165                                 ;;
8166                         esac
8167                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8168                         ;;
8169                 esac
8170                 ;;
8171         *)
8172                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8173                 ;;
8174         esac
8175         ;;
8176 yes)
8177         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8178
8179         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8180
8181         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8182                 && test -z "${cf_tst_cflags}" \
8183                 && cf_fix_cppflags=no
8184         ;;
8185 esac
8186 done
8187
8188 if test -n "$cf_new_cflags" ; then
8189         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8190
8191 echo "${as_me:-configure}:8191: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8192
8193         CFLAGS="$CFLAGS $cf_new_cflags"
8194 fi
8195
8196 if test -n "$cf_new_cppflags" ; then
8197         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8198
8199 echo "${as_me:-configure}:8199: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8200
8201         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8202 fi
8203
8204 if test -n "$cf_new_extra_cppflags" ; then
8205         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8206
8207 echo "${as_me:-configure}:8207: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8208
8209         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8210 fi
8211
8212 fi
8213
8214 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8215         echo "$as_me:8215: checking if _XOPEN_SOURCE really is set" >&5
8216 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8217         cat >conftest.$ac_ext <<_ACEOF
8218 #line 8218 "configure"
8219 #include "confdefs.h"
8220 #include <stdlib.h>
8221 int
8222 main ()
8223 {
8224
8225 #ifndef _XOPEN_SOURCE
8226 make an error
8227 #endif
8228   ;
8229   return 0;
8230 }
8231 _ACEOF
8232 rm -f conftest.$ac_objext
8233 if { (eval echo "$as_me:8233: \"$ac_compile\"") >&5
8234   (eval $ac_compile) 2>&5
8235   ac_status=$?
8236   echo "$as_me:8236: \$? = $ac_status" >&5
8237   (exit $ac_status); } &&
8238          { ac_try='test -s conftest.$ac_objext'
8239   { (eval echo "$as_me:8239: \"$ac_try\"") >&5
8240   (eval $ac_try) 2>&5
8241   ac_status=$?
8242   echo "$as_me:8242: \$? = $ac_status" >&5
8243   (exit $ac_status); }; }; then
8244   cf_XOPEN_SOURCE_set=yes
8245 else
8246   echo "$as_me: failed program was:" >&5
8247 cat conftest.$ac_ext >&5
8248 cf_XOPEN_SOURCE_set=no
8249 fi
8250 rm -f conftest.$ac_objext conftest.$ac_ext
8251         echo "$as_me:8251: result: $cf_XOPEN_SOURCE_set" >&5
8252 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8253         if test $cf_XOPEN_SOURCE_set = yes
8254         then
8255                 cat >conftest.$ac_ext <<_ACEOF
8256 #line 8256 "configure"
8257 #include "confdefs.h"
8258 #include <stdlib.h>
8259 int
8260 main ()
8261 {
8262
8263 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8264 make an error
8265 #endif
8266   ;
8267   return 0;
8268 }
8269 _ACEOF
8270 rm -f conftest.$ac_objext
8271 if { (eval echo "$as_me:8271: \"$ac_compile\"") >&5
8272   (eval $ac_compile) 2>&5
8273   ac_status=$?
8274   echo "$as_me:8274: \$? = $ac_status" >&5
8275   (exit $ac_status); } &&
8276          { ac_try='test -s conftest.$ac_objext'
8277   { (eval echo "$as_me:8277: \"$ac_try\"") >&5
8278   (eval $ac_try) 2>&5
8279   ac_status=$?
8280   echo "$as_me:8280: \$? = $ac_status" >&5
8281   (exit $ac_status); }; }; then
8282   cf_XOPEN_SOURCE_set_ok=yes
8283 else
8284   echo "$as_me: failed program was:" >&5
8285 cat conftest.$ac_ext >&5
8286 cf_XOPEN_SOURCE_set_ok=no
8287 fi
8288 rm -f conftest.$ac_objext conftest.$ac_ext
8289                 if test $cf_XOPEN_SOURCE_set_ok = no
8290                 then
8291                         { echo "$as_me:8291: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8292 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8293                 fi
8294         else
8295
8296 echo "$as_me:8296: checking if we should define _XOPEN_SOURCE" >&5
8297 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8298 if test "${cf_cv_xopen_source+set}" = set; then
8299   echo $ECHO_N "(cached) $ECHO_C" >&6
8300 else
8301
8302         cat >conftest.$ac_ext <<_ACEOF
8303 #line 8303 "configure"
8304 #include "confdefs.h"
8305
8306 #include <stdlib.h>
8307 #include <string.h>
8308 #include <sys/types.h>
8309
8310 int
8311 main ()
8312 {
8313
8314 #ifndef _XOPEN_SOURCE
8315 make an error
8316 #endif
8317   ;
8318   return 0;
8319 }
8320 _ACEOF
8321 rm -f conftest.$ac_objext
8322 if { (eval echo "$as_me:8322: \"$ac_compile\"") >&5
8323   (eval $ac_compile) 2>&5
8324   ac_status=$?
8325   echo "$as_me:8325: \$? = $ac_status" >&5
8326   (exit $ac_status); } &&
8327          { ac_try='test -s conftest.$ac_objext'
8328   { (eval echo "$as_me:8328: \"$ac_try\"") >&5
8329   (eval $ac_try) 2>&5
8330   ac_status=$?
8331   echo "$as_me:8331: \$? = $ac_status" >&5
8332   (exit $ac_status); }; }; then
8333   cf_cv_xopen_source=no
8334 else
8335   echo "$as_me: failed program was:" >&5
8336 cat conftest.$ac_ext >&5
8337 cf_save="$CPPFLAGS"
8338          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8339          cat >conftest.$ac_ext <<_ACEOF
8340 #line 8340 "configure"
8341 #include "confdefs.h"
8342
8343 #include <stdlib.h>
8344 #include <string.h>
8345 #include <sys/types.h>
8346
8347 int
8348 main ()
8349 {
8350
8351 #ifdef _XOPEN_SOURCE
8352 make an error
8353 #endif
8354   ;
8355   return 0;
8356 }
8357 _ACEOF
8358 rm -f conftest.$ac_objext
8359 if { (eval echo "$as_me:8359: \"$ac_compile\"") >&5
8360   (eval $ac_compile) 2>&5
8361   ac_status=$?
8362   echo "$as_me:8362: \$? = $ac_status" >&5
8363   (exit $ac_status); } &&
8364          { ac_try='test -s conftest.$ac_objext'
8365   { (eval echo "$as_me:8365: \"$ac_try\"") >&5
8366   (eval $ac_try) 2>&5
8367   ac_status=$?
8368   echo "$as_me:8368: \$? = $ac_status" >&5
8369   (exit $ac_status); }; }; then
8370   cf_cv_xopen_source=no
8371 else
8372   echo "$as_me: failed program was:" >&5
8373 cat conftest.$ac_ext >&5
8374 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8375 fi
8376 rm -f conftest.$ac_objext conftest.$ac_ext
8377         CPPFLAGS="$cf_save"
8378
8379 fi
8380 rm -f conftest.$ac_objext conftest.$ac_ext
8381
8382 fi
8383 echo "$as_me:8383: result: $cf_cv_xopen_source" >&5
8384 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8385
8386 if test "$cf_cv_xopen_source" != no ; then
8387
8388 CFLAGS=`echo "$CFLAGS" | \
8389         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8390                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8391
8392 CPPFLAGS=`echo "$CPPFLAGS" | \
8393         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8394                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8395
8396         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8397
8398 cf_fix_cppflags=no
8399 cf_new_cflags=
8400 cf_new_cppflags=
8401 cf_new_extra_cppflags=
8402
8403 for cf_add_cflags in $cf_temp_xopen_source
8404 do
8405 case $cf_fix_cppflags in
8406 no)
8407         case $cf_add_cflags in #(vi
8408         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8409                 case $cf_add_cflags in
8410                 -D*)
8411                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8412
8413                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8414                                 && test -z "${cf_tst_cflags}" \
8415                                 && cf_fix_cppflags=yes
8416
8417                         if test $cf_fix_cppflags = yes ; then
8418                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8419                                 continue
8420                         elif test "${cf_tst_cflags}" = "\"'" ; then
8421                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8422                                 continue
8423                         fi
8424                         ;;
8425                 esac
8426                 case "$CPPFLAGS" in
8427                 *$cf_add_cflags) #(vi
8428                         ;;
8429                 *) #(vi
8430                         case $cf_add_cflags in #(vi
8431                         -D*)
8432                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8433
8434 CPPFLAGS=`echo "$CPPFLAGS" | \
8435         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8436                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8437
8438                                 ;;
8439                         esac
8440                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8441                         ;;
8442                 esac
8443                 ;;
8444         *)
8445                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8446                 ;;
8447         esac
8448         ;;
8449 yes)
8450         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8451
8452         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8453
8454         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8455                 && test -z "${cf_tst_cflags}" \
8456                 && cf_fix_cppflags=no
8457         ;;
8458 esac
8459 done
8460
8461 if test -n "$cf_new_cflags" ; then
8462
8463         CFLAGS="$CFLAGS $cf_new_cflags"
8464 fi
8465
8466 if test -n "$cf_new_cppflags" ; then
8467
8468         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8469 fi
8470
8471 if test -n "$cf_new_extra_cppflags" ; then
8472
8473         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8474 fi
8475
8476 fi
8477
8478         fi
8479 fi
8480
8481 # Work around breakage on OS X
8482
8483 echo "$as_me:8483: checking if SIGWINCH is defined" >&5
8484 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8485 if test "${cf_cv_define_sigwinch+set}" = set; then
8486   echo $ECHO_N "(cached) $ECHO_C" >&6
8487 else
8488
8489         cat >conftest.$ac_ext <<_ACEOF
8490 #line 8490 "configure"
8491 #include "confdefs.h"
8492
8493 #include <sys/types.h>
8494 #include <sys/signal.h>
8495
8496 int
8497 main ()
8498 {
8499 int x = SIGWINCH
8500   ;
8501   return 0;
8502 }
8503 _ACEOF
8504 rm -f conftest.$ac_objext
8505 if { (eval echo "$as_me:8505: \"$ac_compile\"") >&5
8506   (eval $ac_compile) 2>&5
8507   ac_status=$?
8508   echo "$as_me:8508: \$? = $ac_status" >&5
8509   (exit $ac_status); } &&
8510          { ac_try='test -s conftest.$ac_objext'
8511   { (eval echo "$as_me:8511: \"$ac_try\"") >&5
8512   (eval $ac_try) 2>&5
8513   ac_status=$?
8514   echo "$as_me:8514: \$? = $ac_status" >&5
8515   (exit $ac_status); }; }; then
8516   cf_cv_define_sigwinch=yes
8517 else
8518   echo "$as_me: failed program was:" >&5
8519 cat conftest.$ac_ext >&5
8520 cat >conftest.$ac_ext <<_ACEOF
8521 #line 8521 "configure"
8522 #include "confdefs.h"
8523
8524 #undef _XOPEN_SOURCE
8525 #undef _POSIX_SOURCE
8526 #undef _POSIX_C_SOURCE
8527 #include <sys/types.h>
8528 #include <sys/signal.h>
8529
8530 int
8531 main ()
8532 {
8533 int x = SIGWINCH
8534   ;
8535   return 0;
8536 }
8537 _ACEOF
8538 rm -f conftest.$ac_objext
8539 if { (eval echo "$as_me:8539: \"$ac_compile\"") >&5
8540   (eval $ac_compile) 2>&5
8541   ac_status=$?
8542   echo "$as_me:8542: \$? = $ac_status" >&5
8543   (exit $ac_status); } &&
8544          { ac_try='test -s conftest.$ac_objext'
8545   { (eval echo "$as_me:8545: \"$ac_try\"") >&5
8546   (eval $ac_try) 2>&5
8547   ac_status=$?
8548   echo "$as_me:8548: \$? = $ac_status" >&5
8549   (exit $ac_status); }; }; then
8550   cf_cv_define_sigwinch=maybe
8551 else
8552   echo "$as_me: failed program was:" >&5
8553 cat conftest.$ac_ext >&5
8554 cf_cv_define_sigwinch=no
8555 fi
8556 rm -f conftest.$ac_objext conftest.$ac_ext
8557
8558 fi
8559 rm -f conftest.$ac_objext conftest.$ac_ext
8560
8561 fi
8562 echo "$as_me:8562: result: $cf_cv_define_sigwinch" >&5
8563 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8564
8565 if test "$cf_cv_define_sigwinch" = maybe ; then
8566 echo "$as_me:8566: checking for actual SIGWINCH definition" >&5
8567 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8568 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8569   echo $ECHO_N "(cached) $ECHO_C" >&6
8570 else
8571
8572 cf_cv_fixup_sigwinch=unknown
8573 cf_sigwinch=32
8574 while test $cf_sigwinch != 1
8575 do
8576         cat >conftest.$ac_ext <<_ACEOF
8577 #line 8577 "configure"
8578 #include "confdefs.h"
8579
8580 #undef _XOPEN_SOURCE
8581 #undef _POSIX_SOURCE
8582 #undef _POSIX_C_SOURCE
8583 #include <sys/types.h>
8584 #include <sys/signal.h>
8585
8586 int
8587 main ()
8588 {
8589
8590 #if SIGWINCH != $cf_sigwinch
8591 make an error
8592 #endif
8593 int x = SIGWINCH
8594   ;
8595   return 0;
8596 }
8597 _ACEOF
8598 rm -f conftest.$ac_objext
8599 if { (eval echo "$as_me:8599: \"$ac_compile\"") >&5
8600   (eval $ac_compile) 2>&5
8601   ac_status=$?
8602   echo "$as_me:8602: \$? = $ac_status" >&5
8603   (exit $ac_status); } &&
8604          { ac_try='test -s conftest.$ac_objext'
8605   { (eval echo "$as_me:8605: \"$ac_try\"") >&5
8606   (eval $ac_try) 2>&5
8607   ac_status=$?
8608   echo "$as_me:8608: \$? = $ac_status" >&5
8609   (exit $ac_status); }; }; then
8610   cf_cv_fixup_sigwinch=$cf_sigwinch
8611          break
8612 else
8613   echo "$as_me: failed program was:" >&5
8614 cat conftest.$ac_ext >&5
8615 fi
8616 rm -f conftest.$ac_objext conftest.$ac_ext
8617
8618 cf_sigwinch=`expr $cf_sigwinch - 1`
8619 done
8620
8621 fi
8622 echo "$as_me:8622: result: $cf_cv_fixup_sigwinch" >&5
8623 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8624
8625         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8626                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8627         fi
8628 fi
8629
8630 # Checks for CODESET support.
8631
8632   echo "$as_me:8632: checking for nl_langinfo and CODESET" >&5
8633 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8634 if test "${am_cv_langinfo_codeset+set}" = set; then
8635   echo $ECHO_N "(cached) $ECHO_C" >&6
8636 else
8637   cat >conftest.$ac_ext <<_ACEOF
8638 #line 8638 "configure"
8639 #include "confdefs.h"
8640 #include <langinfo.h>
8641 int
8642 main ()
8643 {
8644 char* cs = nl_langinfo(CODESET);
8645   ;
8646   return 0;
8647 }
8648 _ACEOF
8649 rm -f conftest.$ac_objext conftest$ac_exeext
8650 if { (eval echo "$as_me:8650: \"$ac_link\"") >&5
8651   (eval $ac_link) 2>&5
8652   ac_status=$?
8653   echo "$as_me:8653: \$? = $ac_status" >&5
8654   (exit $ac_status); } &&
8655          { ac_try='test -s conftest$ac_exeext'
8656   { (eval echo "$as_me:8656: \"$ac_try\"") >&5
8657   (eval $ac_try) 2>&5
8658   ac_status=$?
8659   echo "$as_me:8659: \$? = $ac_status" >&5
8660   (exit $ac_status); }; }; then
8661   am_cv_langinfo_codeset=yes
8662 else
8663   echo "$as_me: failed program was:" >&5
8664 cat conftest.$ac_ext >&5
8665 am_cv_langinfo_codeset=no
8666 fi
8667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8668
8669 fi
8670 echo "$as_me:8670: result: $am_cv_langinfo_codeset" >&5
8671 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8672   if test $am_cv_langinfo_codeset = yes; then
8673
8674 cat >>confdefs.h <<\EOF
8675 #define HAVE_LANGINFO_CODESET 1
8676 EOF
8677
8678   fi
8679
8680 # use these variables to work around a defect in gcc's fixincludes.
8681 NCURSES_OK_WCHAR_T=
8682 NCURSES_OK_WINT_T=
8683
8684 echo "$as_me:8684: checking if you want wide-character code" >&5
8685 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8686
8687 # Check whether --enable-widec or --disable-widec was given.
8688 if test "${enable_widec+set}" = set; then
8689   enableval="$enable_widec"
8690   with_widec=$enableval
8691 else
8692   with_widec=no
8693 fi;
8694 echo "$as_me:8694: result: $with_widec" >&5
8695 echo "${ECHO_T}$with_widec" >&6
8696 if test "x$with_widec" = xyes ; then
8697         if test "x$disable_lib_suffixes" = xno ; then
8698                 LIB_SUFFIX="w${LIB_SUFFIX}"
8699         fi
8700
8701 cat >>confdefs.h <<\EOF
8702 #define USE_WIDEC_SUPPORT 1
8703 EOF
8704
8705 cat >>confdefs.h <<\EOF
8706 #define NCURSES_WIDECHAR 1
8707 EOF
8708
8709 echo "$as_me:8709: checking if wchar.h can be used as is" >&5
8710 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8711 if test "${cf_cv_wchar_h_okay+set}" = set; then
8712   echo $ECHO_N "(cached) $ECHO_C" >&6
8713 else
8714
8715 cat >conftest.$ac_ext <<_ACEOF
8716 #line 8716 "configure"
8717 #include "confdefs.h"
8718
8719 #include <stdlib.h>
8720 #include <wchar.h>
8721
8722 int
8723 main ()
8724 {
8725
8726         wint_t foo = 0;
8727         int bar = iswpunct(foo)
8728   ;
8729   return 0;
8730 }
8731 _ACEOF
8732 rm -f conftest.$ac_objext
8733 if { (eval echo "$as_me:8733: \"$ac_compile\"") >&5
8734   (eval $ac_compile) 2>&5
8735   ac_status=$?
8736   echo "$as_me:8736: \$? = $ac_status" >&5
8737   (exit $ac_status); } &&
8738          { ac_try='test -s conftest.$ac_objext'
8739   { (eval echo "$as_me:8739: \"$ac_try\"") >&5
8740   (eval $ac_try) 2>&5
8741   ac_status=$?
8742   echo "$as_me:8742: \$? = $ac_status" >&5
8743   (exit $ac_status); }; }; then
8744   cf_cv_wchar_h_okay=yes
8745 else
8746   echo "$as_me: failed program was:" >&5
8747 cat conftest.$ac_ext >&5
8748 cf_cv_wchar_h_okay=no
8749 fi
8750 rm -f conftest.$ac_objext conftest.$ac_ext
8751 fi
8752 echo "$as_me:8752: result: $cf_cv_wchar_h_okay" >&5
8753 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8754
8755 if test $cf_cv_wchar_h_okay = no
8756 then
8757
8758 echo "$as_me:8758: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8759 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8760 cat >conftest.$ac_ext <<_ACEOF
8761 #line 8761 "configure"
8762 #include "confdefs.h"
8763 #include <sys/types.h>
8764
8765 int
8766 main ()
8767 {
8768
8769 #ifndef _XOPEN_SOURCE_EXTENDED
8770 make an error
8771 #endif
8772   ;
8773   return 0;
8774 }
8775 _ACEOF
8776 rm -f conftest.$ac_objext
8777 if { (eval echo "$as_me:8777: \"$ac_compile\"") >&5
8778   (eval $ac_compile) 2>&5
8779   ac_status=$?
8780   echo "$as_me:8780: \$? = $ac_status" >&5
8781   (exit $ac_status); } &&
8782          { ac_try='test -s conftest.$ac_objext'
8783   { (eval echo "$as_me:8783: \"$ac_try\"") >&5
8784   (eval $ac_try) 2>&5
8785   ac_status=$?
8786   echo "$as_me:8786: \$? = $ac_status" >&5
8787   (exit $ac_status); }; }; then
8788   cf_result=no
8789 else
8790   echo "$as_me: failed program was:" >&5
8791 cat conftest.$ac_ext >&5
8792 cf_result=yes
8793 fi
8794 rm -f conftest.$ac_objext conftest.$ac_ext
8795 echo "$as_me:8795: result: $cf_result" >&5
8796 echo "${ECHO_T}$cf_result" >&6
8797
8798 if test "$cf_result" = yes ; then
8799         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8800 elif test "x" != "x" ; then
8801         echo "$as_me:8801: checking checking for compatible value versus " >&5
8802 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8803         cat >conftest.$ac_ext <<_ACEOF
8804 #line 8804 "configure"
8805 #include "confdefs.h"
8806 #include <sys/types.h>
8807
8808 int
8809 main ()
8810 {
8811
8812 #if _XOPEN_SOURCE_EXTENDED- < 0
8813 make an error
8814 #endif
8815   ;
8816   return 0;
8817 }
8818 _ACEOF
8819 rm -f conftest.$ac_objext
8820 if { (eval echo "$as_me:8820: \"$ac_compile\"") >&5
8821   (eval $ac_compile) 2>&5
8822   ac_status=$?
8823   echo "$as_me:8823: \$? = $ac_status" >&5
8824   (exit $ac_status); } &&
8825          { ac_try='test -s conftest.$ac_objext'
8826   { (eval echo "$as_me:8826: \"$ac_try\"") >&5
8827   (eval $ac_try) 2>&5
8828   ac_status=$?
8829   echo "$as_me:8829: \$? = $ac_status" >&5
8830   (exit $ac_status); }; }; then
8831   cf_result=yes
8832 else
8833   echo "$as_me: failed program was:" >&5
8834 cat conftest.$ac_ext >&5
8835 cf_result=no
8836 fi
8837 rm -f conftest.$ac_objext conftest.$ac_ext
8838         echo "$as_me:8838: result: $cf_result" >&5
8839 echo "${ECHO_T}$cf_result" >&6
8840         if test "$cf_result" = no ; then
8841                 # perhaps we can override it - try...
8842                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8843         fi
8844 fi
8845
8846 fi
8847
8848         # with_overwrite=no
8849         NCURSES_CH_T=cchar_t
8850
8851 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8852 do
8853 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8854 echo "$as_me:8854: checking for $ac_func" >&5
8855 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8856 if eval "test \"\${$as_ac_var+set}\" = set"; then
8857   echo $ECHO_N "(cached) $ECHO_C" >&6
8858 else
8859   cat >conftest.$ac_ext <<_ACEOF
8860 #line 8860 "configure"
8861 #include "confdefs.h"
8862 /* System header to define __stub macros and hopefully few prototypes,
8863     which can conflict with char $ac_func (); below.  */
8864 #include <assert.h>
8865 /* Override any gcc2 internal prototype to avoid an error.  */
8866 #ifdef __cplusplus
8867 extern "C"
8868 #endif
8869 /* We use char because int might match the return type of a gcc2
8870    builtin and then its argument prototype would still apply.  */
8871 char $ac_func ();
8872 char (*f) ();
8873
8874 int
8875 main ()
8876 {
8877 /* The GNU C library defines this for functions which it implements
8878     to always fail with ENOSYS.  Some functions are actually named
8879     something starting with __ and the normal name is an alias.  */
8880 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8881 choke me
8882 #else
8883 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8884 #endif
8885
8886   ;
8887   return 0;
8888 }
8889 _ACEOF
8890 rm -f conftest.$ac_objext conftest$ac_exeext
8891 if { (eval echo "$as_me:8891: \"$ac_link\"") >&5
8892   (eval $ac_link) 2>&5
8893   ac_status=$?
8894   echo "$as_me:8894: \$? = $ac_status" >&5
8895   (exit $ac_status); } &&
8896          { ac_try='test -s conftest$ac_exeext'
8897   { (eval echo "$as_me:8897: \"$ac_try\"") >&5
8898   (eval $ac_try) 2>&5
8899   ac_status=$?
8900   echo "$as_me:8900: \$? = $ac_status" >&5
8901   (exit $ac_status); }; }; then
8902   eval "$as_ac_var=yes"
8903 else
8904   echo "$as_me: failed program was:" >&5
8905 cat conftest.$ac_ext >&5
8906 eval "$as_ac_var=no"
8907 fi
8908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8909 fi
8910 echo "$as_me:8910: result: `eval echo '${'$as_ac_var'}'`" >&5
8911 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8912 if test `eval echo '${'$as_ac_var'}'` = yes; then
8913   cat >>confdefs.h <<EOF
8914 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8915 EOF
8916
8917 fi
8918 done
8919
8920         if test "x$ac_cv_func_putwc" != xyes ; then
8921
8922 echo "$as_me:8922: checking for multibyte character support" >&5
8923 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8924 if test "${cf_cv_utf8_lib+set}" = set; then
8925   echo $ECHO_N "(cached) $ECHO_C" >&6
8926 else
8927
8928         cf_save_LIBS="$LIBS"
8929         cat >conftest.$ac_ext <<_ACEOF
8930 #line 8930 "configure"
8931 #include "confdefs.h"
8932
8933 #include <stdlib.h>
8934 int
8935 main ()
8936 {
8937 putwc(0,0);
8938   ;
8939   return 0;
8940 }
8941 _ACEOF
8942 rm -f conftest.$ac_objext conftest$ac_exeext
8943 if { (eval echo "$as_me:8943: \"$ac_link\"") >&5
8944   (eval $ac_link) 2>&5
8945   ac_status=$?
8946   echo "$as_me:8946: \$? = $ac_status" >&5
8947   (exit $ac_status); } &&
8948          { ac_try='test -s conftest$ac_exeext'
8949   { (eval echo "$as_me:8949: \"$ac_try\"") >&5
8950   (eval $ac_try) 2>&5
8951   ac_status=$?
8952   echo "$as_me:8952: \$? = $ac_status" >&5
8953   (exit $ac_status); }; }; then
8954   cf_cv_utf8_lib=yes
8955 else
8956   echo "$as_me: failed program was:" >&5
8957 cat conftest.$ac_ext >&5
8958
8959 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8960 # will be set on completion of the AC_TRY_LINK below.
8961 cf_cv_header_path_utf8=
8962 cf_cv_library_path_utf8=
8963
8964 echo "${as_me:-configure}:8964: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8965
8966 cf_save_LIBS="$LIBS"
8967
8968 cat >conftest.$ac_ext <<_ACEOF
8969 #line 8969 "configure"
8970 #include "confdefs.h"
8971
8972 #include <libutf8.h>
8973 int
8974 main ()
8975 {
8976 putwc(0,0);
8977   ;
8978   return 0;
8979 }
8980 _ACEOF
8981 rm -f conftest.$ac_objext conftest$ac_exeext
8982 if { (eval echo "$as_me:8982: \"$ac_link\"") >&5
8983   (eval $ac_link) 2>&5
8984   ac_status=$?
8985   echo "$as_me:8985: \$? = $ac_status" >&5
8986   (exit $ac_status); } &&
8987          { ac_try='test -s conftest$ac_exeext'
8988   { (eval echo "$as_me:8988: \"$ac_try\"") >&5
8989   (eval $ac_try) 2>&5
8990   ac_status=$?
8991   echo "$as_me:8991: \$? = $ac_status" >&5
8992   (exit $ac_status); }; }; then
8993
8994         cf_cv_find_linkage_utf8=yes
8995         cf_cv_header_path_utf8=/usr/include
8996         cf_cv_library_path_utf8=/usr/lib
8997
8998 else
8999   echo "$as_me: failed program was:" >&5
9000 cat conftest.$ac_ext >&5
9001
9002 LIBS="-lutf8  $cf_save_LIBS"
9003
9004 cat >conftest.$ac_ext <<_ACEOF
9005 #line 9005 "configure"
9006 #include "confdefs.h"
9007
9008 #include <libutf8.h>
9009 int
9010 main ()
9011 {
9012 putwc(0,0);
9013   ;
9014   return 0;
9015 }
9016 _ACEOF
9017 rm -f conftest.$ac_objext conftest$ac_exeext
9018 if { (eval echo "$as_me:9018: \"$ac_link\"") >&5
9019   (eval $ac_link) 2>&5
9020   ac_status=$?
9021   echo "$as_me:9021: \$? = $ac_status" >&5
9022   (exit $ac_status); } &&
9023          { ac_try='test -s conftest$ac_exeext'
9024   { (eval echo "$as_me:9024: \"$ac_try\"") >&5
9025   (eval $ac_try) 2>&5
9026   ac_status=$?
9027   echo "$as_me:9027: \$? = $ac_status" >&5
9028   (exit $ac_status); }; }; then
9029
9030         cf_cv_find_linkage_utf8=yes
9031         cf_cv_header_path_utf8=/usr/include
9032         cf_cv_library_path_utf8=/usr/lib
9033         cf_cv_library_file_utf8="-lutf8"
9034
9035 else
9036   echo "$as_me: failed program was:" >&5
9037 cat conftest.$ac_ext >&5
9038
9039         cf_cv_find_linkage_utf8=no
9040         LIBS="$cf_save_LIBS"
9041
9042     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9043
9044 echo "${as_me:-configure}:9044: testing find linkage for utf8 library ..." 1>&5
9045
9046 echo "${as_me:-configure}:9046: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9047
9048     cf_save_CPPFLAGS="$CPPFLAGS"
9049     cf_test_CPPFLAGS="$CPPFLAGS"
9050
9051 cf_search=
9052
9053 # collect the current set of include-directories from compiler flags
9054 cf_header_path_list=""
9055 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9056         for cf_header_path in $CPPFLAGS $CFLAGS
9057         do
9058                 case $cf_header_path in #(vi
9059                 -I*)
9060                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9061
9062 test "x$cf_header_path" != "xNONE" && \
9063 test -d "$cf_header_path" && \
9064  {
9065         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9066         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9067         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9068         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9069         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9070         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9071 }
9072
9073                         cf_header_path_list="$cf_header_path_list $cf_search"
9074                         ;;
9075                 esac
9076         done
9077 fi
9078
9079 # add the variations for the package we are looking for
9080
9081 cf_search=
9082
9083 test "x/usr" != "x$prefix" && \
9084 test -d "/usr" && \
9085 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9086         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
9087         test -d /usr/include &&          cf_search="$cf_search /usr/include"
9088         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
9089         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
9090         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
9091         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
9092 }
9093
9094 test "x$prefix" != "xNONE" && \
9095 test -d "$prefix" && \
9096  {
9097         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9098         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9099         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9100         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9101         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9102         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9103 }
9104
9105 test "x/usr/local" != "x$prefix" && \
9106 test -d "/usr/local" && \
9107 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9108         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
9109         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9110         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
9111         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
9112         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
9113         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
9114 }
9115
9116 test "x/opt" != "x$prefix" && \
9117 test -d "/opt" && \
9118 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9119         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
9120         test -d /opt/include &&          cf_search="$cf_search /opt/include"
9121         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
9122         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
9123         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9124         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9125 }
9126
9127 test "x$HOME" != "x$prefix" && \
9128 test -d "$HOME" && \
9129 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9130         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9131         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9132         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9133         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9134         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9135         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9136 }
9137
9138 test "$includedir" != NONE && \
9139 test "$includedir" != "/usr/include" && \
9140 test -d "$includedir" && {
9141         test -d $includedir &&    cf_search="$cf_search $includedir"
9142         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9143 }
9144
9145 test "$oldincludedir" != NONE && \
9146 test "$oldincludedir" != "/usr/include" && \
9147 test -d "$oldincludedir" && {
9148         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9149         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9150 }
9151
9152 cf_search="$cf_search $cf_header_path_list"
9153
9154     for cf_cv_header_path_utf8 in $cf_search
9155     do
9156       if test -d $cf_cv_header_path_utf8 ; then
9157         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9158
9159 echo "${as_me:-configure}:9159: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9160
9161         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9162         cat >conftest.$ac_ext <<_ACEOF
9163 #line 9163 "configure"
9164 #include "confdefs.h"
9165
9166 #include <libutf8.h>
9167 int
9168 main ()
9169 {
9170 putwc(0,0);
9171   ;
9172   return 0;
9173 }
9174 _ACEOF
9175 rm -f conftest.$ac_objext
9176 if { (eval echo "$as_me:9176: \"$ac_compile\"") >&5
9177   (eval $ac_compile) 2>&5
9178   ac_status=$?
9179   echo "$as_me:9179: \$? = $ac_status" >&5
9180   (exit $ac_status); } &&
9181          { ac_try='test -s conftest.$ac_objext'
9182   { (eval echo "$as_me:9182: \"$ac_try\"") >&5
9183   (eval $ac_try) 2>&5
9184   ac_status=$?
9185   echo "$as_me:9185: \$? = $ac_status" >&5
9186   (exit $ac_status); }; }; then
9187
9188             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9189
9190 echo "${as_me:-configure}:9190: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9191
9192             cf_cv_find_linkage_utf8=maybe
9193             cf_test_CPPFLAGS="$CPPFLAGS"
9194             break
9195 else
9196   echo "$as_me: failed program was:" >&5
9197 cat conftest.$ac_ext >&5
9198
9199             CPPFLAGS="$cf_save_CPPFLAGS"
9200
9201 fi
9202 rm -f conftest.$ac_objext conftest.$ac_ext
9203       fi
9204     done
9205
9206     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9207
9208 echo "${as_me:-configure}:9208: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9209
9210       cf_save_LIBS="$LIBS"
9211       cf_save_LDFLAGS="$LDFLAGS"
9212
9213       if test "$cf_cv_find_linkage_utf8" != yes ; then
9214
9215 cf_search=
9216 cf_library_path_list=""
9217 if test -n "${LDFLAGS}${LIBS}" ; then
9218         for cf_library_path in $LDFLAGS $LIBS
9219         do
9220                 case $cf_library_path in #(vi
9221                 -L*)
9222                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9223
9224 test "x$cf_library_path" != "xNONE" && \
9225 test -d "$cf_library_path" && \
9226  {
9227         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9228         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9229         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9230         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9231         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9232         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9233 }
9234
9235                         cf_library_path_list="$cf_library_path_list $cf_search"
9236                         ;;
9237                 esac
9238         done
9239 fi
9240
9241 cf_search=
9242
9243 test "x/usr" != "x$prefix" && \
9244 test -d "/usr" && \
9245 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9246         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9247         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9248         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9249         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9250         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9251         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9252 }
9253
9254 test "x$prefix" != "xNONE" && \
9255 test -d "$prefix" && \
9256  {
9257         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9258         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9259         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9260         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9261         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9262         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9263 }
9264
9265 test "x/usr/local" != "x$prefix" && \
9266 test -d "/usr/local" && \
9267 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9268         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9269         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9270         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9271         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9272         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9273         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9274 }
9275
9276 test "x/opt" != "x$prefix" && \
9277 test -d "/opt" && \
9278 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9279         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9280         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9281         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9282         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9283         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9284         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9285 }
9286
9287 test "x$HOME" != "x$prefix" && \
9288 test -d "$HOME" && \
9289 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9290         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9291         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9292         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9293         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9294         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9295         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9296 }
9297
9298 cf_search="$cf_library_path_list $cf_search"
9299
9300         for cf_cv_library_path_utf8 in $cf_search
9301         do
9302           if test -d $cf_cv_library_path_utf8 ; then
9303             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9304
9305 echo "${as_me:-configure}:9305: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9306
9307             CPPFLAGS="$cf_test_CPPFLAGS"
9308             LIBS="-lutf8  $cf_save_LIBS"
9309             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9310             cat >conftest.$ac_ext <<_ACEOF
9311 #line 9311 "configure"
9312 #include "confdefs.h"
9313
9314 #include <libutf8.h>
9315 int
9316 main ()
9317 {
9318 putwc(0,0);
9319   ;
9320   return 0;
9321 }
9322 _ACEOF
9323 rm -f conftest.$ac_objext conftest$ac_exeext
9324 if { (eval echo "$as_me:9324: \"$ac_link\"") >&5
9325   (eval $ac_link) 2>&5
9326   ac_status=$?
9327   echo "$as_me:9327: \$? = $ac_status" >&5
9328   (exit $ac_status); } &&
9329          { ac_try='test -s conftest$ac_exeext'
9330   { (eval echo "$as_me:9330: \"$ac_try\"") >&5
9331   (eval $ac_try) 2>&5
9332   ac_status=$?
9333   echo "$as_me:9333: \$? = $ac_status" >&5
9334   (exit $ac_status); }; }; then
9335
9336                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9337
9338 echo "${as_me:-configure}:9338: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9339
9340                 cf_cv_find_linkage_utf8=yes
9341                 cf_cv_library_file_utf8="-lutf8"
9342                 break
9343 else
9344   echo "$as_me: failed program was:" >&5
9345 cat conftest.$ac_ext >&5
9346
9347                 CPPFLAGS="$cf_save_CPPFLAGS"
9348                 LIBS="$cf_save_LIBS"
9349                 LDFLAGS="$cf_save_LDFLAGS"
9350
9351 fi
9352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9353           fi
9354         done
9355         CPPFLAGS="$cf_save_CPPFLAGS"
9356         LDFLAGS="$cf_save_LDFLAGS"
9357       fi
9358
9359     else
9360       cf_cv_find_linkage_utf8=no
9361     fi
9362
9363 fi
9364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9365
9366 fi
9367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9368
9369 LIBS="$cf_save_LIBS"
9370
9371 if test "$cf_cv_find_linkage_utf8" = yes ; then
9372 cf_cv_utf8_lib=add-on
9373 else
9374 cf_cv_utf8_lib=no
9375 fi
9376
9377 fi
9378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9379 fi
9380 echo "$as_me:9380: result: $cf_cv_utf8_lib" >&5
9381 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9382
9383 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9384 # ncurses/ncursesw:
9385 if test "$cf_cv_utf8_lib" = "add-on" ; then
9386
9387 cat >>confdefs.h <<\EOF
9388 #define HAVE_LIBUTF8_H 1
9389 EOF
9390
9391 if test -n "$cf_cv_header_path_utf8" ; then
9392   for cf_add_incdir in $cf_cv_header_path_utf8
9393   do
9394         while test $cf_add_incdir != /usr/include
9395         do
9396           if test -d $cf_add_incdir
9397           then
9398                 cf_have_incdir=no
9399                 if test -n "$CFLAGS$CPPFLAGS" ; then
9400                   # a loop is needed to ensure we can add subdirs of existing dirs
9401                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9402                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9403                           cf_have_incdir=yes; break
9404                         fi
9405                   done
9406                 fi
9407
9408                 if test "$cf_have_incdir" = no ; then
9409                   if test "$cf_add_incdir" = /usr/local/include ; then
9410                         if test "$GCC" = yes
9411                         then
9412                           cf_save_CPPFLAGS=$CPPFLAGS
9413                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9414                           cat >conftest.$ac_ext <<_ACEOF
9415 #line 9415 "configure"
9416 #include "confdefs.h"
9417 #include <stdio.h>
9418 int
9419 main ()
9420 {
9421 printf("Hello")
9422   ;
9423   return 0;
9424 }
9425 _ACEOF
9426 rm -f conftest.$ac_objext
9427 if { (eval echo "$as_me:9427: \"$ac_compile\"") >&5
9428   (eval $ac_compile) 2>&5
9429   ac_status=$?
9430   echo "$as_me:9430: \$? = $ac_status" >&5
9431   (exit $ac_status); } &&
9432          { ac_try='test -s conftest.$ac_objext'
9433   { (eval echo "$as_me:9433: \"$ac_try\"") >&5
9434   (eval $ac_try) 2>&5
9435   ac_status=$?
9436   echo "$as_me:9436: \$? = $ac_status" >&5
9437   (exit $ac_status); }; }; then
9438   :
9439 else
9440   echo "$as_me: failed program was:" >&5
9441 cat conftest.$ac_ext >&5
9442 cf_have_incdir=yes
9443 fi
9444 rm -f conftest.$ac_objext conftest.$ac_ext
9445                           CPPFLAGS=$cf_save_CPPFLAGS
9446                         fi
9447                   fi
9448                 fi
9449
9450                 if test "$cf_have_incdir" = no ; then
9451                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9452
9453 echo "${as_me:-configure}:9453: testing adding $cf_add_incdir to include-path ..." 1>&5
9454
9455                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9456
9457                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9458                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9459                   cf_add_incdir="$cf_top_incdir"
9460                 else
9461                   break
9462                 fi
9463           fi
9464         done
9465   done
9466 fi
9467
9468 if test -n "$cf_cv_library_path_utf8" ; then
9469   for cf_add_libdir in $cf_cv_library_path_utf8
9470   do
9471     if test $cf_add_libdir = /usr/lib ; then
9472       :
9473     elif test -d $cf_add_libdir
9474     then
9475       cf_have_libdir=no
9476       if test -n "$LDFLAGS$LIBS" ; then
9477         # a loop is needed to ensure we can add subdirs of existing dirs
9478         for cf_test_libdir in $LDFLAGS $LIBS ; do
9479           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9480             cf_have_libdir=yes; break
9481           fi
9482         done
9483       fi
9484       if test "$cf_have_libdir" = no ; then
9485         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9486
9487 echo "${as_me:-configure}:9487: testing adding $cf_add_libdir to library-path ..." 1>&5
9488
9489         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9490       fi
9491     fi
9492   done
9493 fi
9494
9495 cf_add_libs="$cf_cv_library_file_utf8"
9496 # Filter out duplicates - this happens with badly-designed ".pc" files...
9497 for cf_add_1lib in $LIBS
9498 do
9499         for cf_add_2lib in $cf_add_libs
9500         do
9501                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9502                 then
9503                         cf_add_1lib=
9504                         break
9505                 fi
9506         done
9507         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9508 done
9509 LIBS="$cf_add_libs"
9510
9511 fi
9512
9513                 if test "$cf_cv_utf8_lib" != no ; then
9514                         NCURSES_LIBUTF8=1
9515                 fi
9516         fi
9517
9518 # This is needed on Tru64 5.0 to declare mbstate_t
9519 echo "$as_me:9519: checking if we must include wchar.h to declare mbstate_t" >&5
9520 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9521 if test "${cf_cv_mbstate_t+set}" = set; then
9522   echo $ECHO_N "(cached) $ECHO_C" >&6
9523 else
9524
9525 cat >conftest.$ac_ext <<_ACEOF
9526 #line 9526 "configure"
9527 #include "confdefs.h"
9528
9529 #include <stdlib.h>
9530 #include <stdarg.h>
9531 #include <stdio.h>
9532 #ifdef HAVE_LIBUTF8_H
9533 #include <libutf8.h>
9534 #endif
9535 int
9536 main ()
9537 {
9538 mbstate_t state
9539   ;
9540   return 0;
9541 }
9542 _ACEOF
9543 rm -f conftest.$ac_objext
9544 if { (eval echo "$as_me:9544: \"$ac_compile\"") >&5
9545   (eval $ac_compile) 2>&5
9546   ac_status=$?
9547   echo "$as_me:9547: \$? = $ac_status" >&5
9548   (exit $ac_status); } &&
9549          { ac_try='test -s conftest.$ac_objext'
9550   { (eval echo "$as_me:9550: \"$ac_try\"") >&5
9551   (eval $ac_try) 2>&5
9552   ac_status=$?
9553   echo "$as_me:9553: \$? = $ac_status" >&5
9554   (exit $ac_status); }; }; then
9555   cf_cv_mbstate_t=no
9556 else
9557   echo "$as_me: failed program was:" >&5
9558 cat conftest.$ac_ext >&5
9559 cat >conftest.$ac_ext <<_ACEOF
9560 #line 9560 "configure"
9561 #include "confdefs.h"
9562
9563 #include <stdlib.h>
9564 #include <stdarg.h>
9565 #include <stdio.h>
9566 #include <wchar.h>
9567 #ifdef HAVE_LIBUTF8_H
9568 #include <libutf8.h>
9569 #endif
9570 int
9571 main ()
9572 {
9573 mbstate_t value
9574   ;
9575   return 0;
9576 }
9577 _ACEOF
9578 rm -f conftest.$ac_objext
9579 if { (eval echo "$as_me:9579: \"$ac_compile\"") >&5
9580   (eval $ac_compile) 2>&5
9581   ac_status=$?
9582   echo "$as_me:9582: \$? = $ac_status" >&5
9583   (exit $ac_status); } &&
9584          { ac_try='test -s conftest.$ac_objext'
9585   { (eval echo "$as_me:9585: \"$ac_try\"") >&5
9586   (eval $ac_try) 2>&5
9587   ac_status=$?
9588   echo "$as_me:9588: \$? = $ac_status" >&5
9589   (exit $ac_status); }; }; then
9590   cf_cv_mbstate_t=yes
9591 else
9592   echo "$as_me: failed program was:" >&5
9593 cat conftest.$ac_ext >&5
9594 cf_cv_mbstate_t=unknown
9595 fi
9596 rm -f conftest.$ac_objext conftest.$ac_ext
9597 fi
9598 rm -f conftest.$ac_objext conftest.$ac_ext
9599 fi
9600 echo "$as_me:9600: result: $cf_cv_mbstate_t" >&5
9601 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9602
9603 if test "$cf_cv_mbstate_t" = yes ; then
9604
9605 cat >>confdefs.h <<\EOF
9606 #define NEED_WCHAR_H 1
9607 EOF
9608
9609         NEED_WCHAR_H=1
9610 fi
9611
9612 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9613 if test "$cf_cv_mbstate_t" = unknown ; then
9614         NCURSES_MBSTATE_T=1
9615 fi
9616
9617 # This is needed on Tru64 5.0 to declare wchar_t
9618 echo "$as_me:9618: checking if we must include wchar.h to declare wchar_t" >&5
9619 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9620 if test "${cf_cv_wchar_t+set}" = set; then
9621   echo $ECHO_N "(cached) $ECHO_C" >&6
9622 else
9623
9624 cat >conftest.$ac_ext <<_ACEOF
9625 #line 9625 "configure"
9626 #include "confdefs.h"
9627
9628 #include <stdlib.h>
9629 #include <stdarg.h>
9630 #include <stdio.h>
9631 #ifdef HAVE_LIBUTF8_H
9632 #include <libutf8.h>
9633 #endif
9634 int
9635 main ()
9636 {
9637 wchar_t state
9638   ;
9639   return 0;
9640 }
9641 _ACEOF
9642 rm -f conftest.$ac_objext
9643 if { (eval echo "$as_me:9643: \"$ac_compile\"") >&5
9644   (eval $ac_compile) 2>&5
9645   ac_status=$?
9646   echo "$as_me:9646: \$? = $ac_status" >&5
9647   (exit $ac_status); } &&
9648          { ac_try='test -s conftest.$ac_objext'
9649   { (eval echo "$as_me:9649: \"$ac_try\"") >&5
9650   (eval $ac_try) 2>&5
9651   ac_status=$?
9652   echo "$as_me:9652: \$? = $ac_status" >&5
9653   (exit $ac_status); }; }; then
9654   cf_cv_wchar_t=no
9655 else
9656   echo "$as_me: failed program was:" >&5
9657 cat conftest.$ac_ext >&5
9658 cat >conftest.$ac_ext <<_ACEOF
9659 #line 9659 "configure"
9660 #include "confdefs.h"
9661
9662 #include <stdlib.h>
9663 #include <stdarg.h>
9664 #include <stdio.h>
9665 #include <wchar.h>
9666 #ifdef HAVE_LIBUTF8_H
9667 #include <libutf8.h>
9668 #endif
9669 int
9670 main ()
9671 {
9672 wchar_t value
9673   ;
9674   return 0;
9675 }
9676 _ACEOF
9677 rm -f conftest.$ac_objext
9678 if { (eval echo "$as_me:9678: \"$ac_compile\"") >&5
9679   (eval $ac_compile) 2>&5
9680   ac_status=$?
9681   echo "$as_me:9681: \$? = $ac_status" >&5
9682   (exit $ac_status); } &&
9683          { ac_try='test -s conftest.$ac_objext'
9684   { (eval echo "$as_me:9684: \"$ac_try\"") >&5
9685   (eval $ac_try) 2>&5
9686   ac_status=$?
9687   echo "$as_me:9687: \$? = $ac_status" >&5
9688   (exit $ac_status); }; }; then
9689   cf_cv_wchar_t=yes
9690 else
9691   echo "$as_me: failed program was:" >&5
9692 cat conftest.$ac_ext >&5
9693 cf_cv_wchar_t=unknown
9694 fi
9695 rm -f conftest.$ac_objext conftest.$ac_ext
9696 fi
9697 rm -f conftest.$ac_objext conftest.$ac_ext
9698 fi
9699 echo "$as_me:9699: result: $cf_cv_wchar_t" >&5
9700 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9701
9702 if test "$cf_cv_wchar_t" = yes ; then
9703
9704 cat >>confdefs.h <<\EOF
9705 #define NEED_WCHAR_H 1
9706 EOF
9707
9708         NEED_WCHAR_H=1
9709 fi
9710
9711 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9712 if test "$cf_cv_wchar_t" = unknown ; then
9713         NCURSES_WCHAR_T=1
9714 fi
9715
9716 # if we find wchar_t in either place, use substitution to provide a fallback.
9717 if test "$cf_cv_wchar_t" != unknown ; then
9718         NCURSES_OK_WCHAR_T=1
9719 fi
9720
9721 # This is needed on Tru64 5.0 to declare wint_t
9722 echo "$as_me:9722: checking if we must include wchar.h to declare wint_t" >&5
9723 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9724 if test "${cf_cv_wint_t+set}" = set; then
9725   echo $ECHO_N "(cached) $ECHO_C" >&6
9726 else
9727
9728 cat >conftest.$ac_ext <<_ACEOF
9729 #line 9729 "configure"
9730 #include "confdefs.h"
9731
9732 #include <stdlib.h>
9733 #include <stdarg.h>
9734 #include <stdio.h>
9735 #ifdef HAVE_LIBUTF8_H
9736 #include <libutf8.h>
9737 #endif
9738 int
9739 main ()
9740 {
9741 wint_t state
9742   ;
9743   return 0;
9744 }
9745 _ACEOF
9746 rm -f conftest.$ac_objext
9747 if { (eval echo "$as_me:9747: \"$ac_compile\"") >&5
9748   (eval $ac_compile) 2>&5
9749   ac_status=$?
9750   echo "$as_me:9750: \$? = $ac_status" >&5
9751   (exit $ac_status); } &&
9752          { ac_try='test -s conftest.$ac_objext'
9753   { (eval echo "$as_me:9753: \"$ac_try\"") >&5
9754   (eval $ac_try) 2>&5
9755   ac_status=$?
9756   echo "$as_me:9756: \$? = $ac_status" >&5
9757   (exit $ac_status); }; }; then
9758   cf_cv_wint_t=no
9759 else
9760   echo "$as_me: failed program was:" >&5
9761 cat conftest.$ac_ext >&5
9762 cat >conftest.$ac_ext <<_ACEOF
9763 #line 9763 "configure"
9764 #include "confdefs.h"
9765
9766 #include <stdlib.h>
9767 #include <stdarg.h>
9768 #include <stdio.h>
9769 #include <wchar.h>
9770 #ifdef HAVE_LIBUTF8_H
9771 #include <libutf8.h>
9772 #endif
9773 int
9774 main ()
9775 {
9776 wint_t value
9777   ;
9778   return 0;
9779 }
9780 _ACEOF
9781 rm -f conftest.$ac_objext
9782 if { (eval echo "$as_me:9782: \"$ac_compile\"") >&5
9783   (eval $ac_compile) 2>&5
9784   ac_status=$?
9785   echo "$as_me:9785: \$? = $ac_status" >&5
9786   (exit $ac_status); } &&
9787          { ac_try='test -s conftest.$ac_objext'
9788   { (eval echo "$as_me:9788: \"$ac_try\"") >&5
9789   (eval $ac_try) 2>&5
9790   ac_status=$?
9791   echo "$as_me:9791: \$? = $ac_status" >&5
9792   (exit $ac_status); }; }; then
9793   cf_cv_wint_t=yes
9794 else
9795   echo "$as_me: failed program was:" >&5
9796 cat conftest.$ac_ext >&5
9797 cf_cv_wint_t=unknown
9798 fi
9799 rm -f conftest.$ac_objext conftest.$ac_ext
9800 fi
9801 rm -f conftest.$ac_objext conftest.$ac_ext
9802 fi
9803 echo "$as_me:9803: result: $cf_cv_wint_t" >&5
9804 echo "${ECHO_T}$cf_cv_wint_t" >&6
9805
9806 if test "$cf_cv_wint_t" = yes ; then
9807
9808 cat >>confdefs.h <<\EOF
9809 #define NEED_WCHAR_H 1
9810 EOF
9811
9812         NEED_WCHAR_H=1
9813 fi
9814
9815 # if we do not find wint_t in either place, use substitution to provide a fallback.
9816 if test "$cf_cv_wint_t" = unknown ; then
9817         NCURSES_WINT_T=1
9818 fi
9819
9820 # if we find wint_t in either place, use substitution to provide a fallback.
9821 if test "$cf_cv_wint_t" != unknown ; then
9822         NCURSES_OK_WINT_T=1
9823 fi
9824
9825         if test "$NCURSES_MBSTATE_T" != 0; then
9826
9827 cat >>confdefs.h <<\EOF
9828 #define NEED_MBSTATE_T_DEF 1
9829 EOF
9830
9831         fi
9832 fi
9833
9834 ###   use option --disable-lp64 to allow long chtype
9835 case $cf_cv_abi_version in
9836 [345]*)
9837         default_with_lp64=no
9838         ;;
9839 *)
9840         default_with_lp64=yes
9841         ;;
9842 esac
9843
9844 echo "$as_me:9844: checking whether to enable _LP64 definition in curses.h" >&5
9845 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9846
9847 # Check whether --enable-lp64 or --disable-lp64 was given.
9848 if test "${enable_lp64+set}" = set; then
9849   enableval="$enable_lp64"
9850   with_lp64=$enableval
9851 else
9852   with_lp64=$default_with_lp64
9853 fi;
9854 echo "$as_me:9854: result: $with_lp64" >&5
9855 echo "${ECHO_T}$with_lp64" >&6
9856
9857 if test "x$with_lp64" = xyes ; then
9858         cf_cv_enable_lp64=1
9859 else
9860         cf_cv_enable_lp64=0
9861 fi
9862
9863 # Check whether --enable-largefile or --disable-largefile was given.
9864 if test "${enable_largefile+set}" = set; then
9865   enableval="$enable_largefile"
9866
9867 fi;
9868 if test "$enable_largefile" != no; then
9869
9870   echo "$as_me:9870: checking for special C compiler options needed for large files" >&5
9871 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9872 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9873   echo $ECHO_N "(cached) $ECHO_C" >&6
9874 else
9875   ac_cv_sys_largefile_CC=no
9876      if test "$GCC" != yes; then
9877        ac_save_CC=$CC
9878        while :; do
9879          # IRIX 6.2 and later do not support large files by default,
9880          # so use the C compiler's -n32 option if that helps.
9881          cat >conftest.$ac_ext <<_ACEOF
9882 #line 9882 "configure"
9883 #include "confdefs.h"
9884 #include <sys/types.h>
9885  /* Check that off_t can represent 2**63 - 1 correctly.
9886     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9887     since some C++ compilers masquerading as C compilers
9888     incorrectly reject 9223372036854775807.  */
9889 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9890   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9891                        && LARGE_OFF_T % 2147483647 == 1)
9892                       ? 1 : -1];
9893 int
9894 main ()
9895 {
9896
9897   ;
9898   return 0;
9899 }
9900 _ACEOF
9901          rm -f conftest.$ac_objext
9902 if { (eval echo "$as_me:9902: \"$ac_compile\"") >&5
9903   (eval $ac_compile) 2>&5
9904   ac_status=$?
9905   echo "$as_me:9905: \$? = $ac_status" >&5
9906   (exit $ac_status); } &&
9907          { ac_try='test -s conftest.$ac_objext'
9908   { (eval echo "$as_me:9908: \"$ac_try\"") >&5
9909   (eval $ac_try) 2>&5
9910   ac_status=$?
9911   echo "$as_me:9911: \$? = $ac_status" >&5
9912   (exit $ac_status); }; }; then
9913   break
9914 else
9915   echo "$as_me: failed program was:" >&5
9916 cat conftest.$ac_ext >&5
9917 fi
9918 rm -f conftest.$ac_objext
9919          CC="$CC -n32"
9920          rm -f conftest.$ac_objext
9921 if { (eval echo "$as_me:9921: \"$ac_compile\"") >&5
9922   (eval $ac_compile) 2>&5
9923   ac_status=$?
9924   echo "$as_me:9924: \$? = $ac_status" >&5
9925   (exit $ac_status); } &&
9926          { ac_try='test -s conftest.$ac_objext'
9927   { (eval echo "$as_me:9927: \"$ac_try\"") >&5
9928   (eval $ac_try) 2>&5
9929   ac_status=$?
9930   echo "$as_me:9930: \$? = $ac_status" >&5
9931   (exit $ac_status); }; }; then
9932   ac_cv_sys_largefile_CC=' -n32'; break
9933 else
9934   echo "$as_me: failed program was:" >&5
9935 cat conftest.$ac_ext >&5
9936 fi
9937 rm -f conftest.$ac_objext
9938          break
9939        done
9940        CC=$ac_save_CC
9941        rm -f conftest.$ac_ext
9942     fi
9943 fi
9944 echo "$as_me:9944: result: $ac_cv_sys_largefile_CC" >&5
9945 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9946   if test "$ac_cv_sys_largefile_CC" != no; then
9947     CC=$CC$ac_cv_sys_largefile_CC
9948   fi
9949
9950   echo "$as_me:9950: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9951 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9952 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9953   echo $ECHO_N "(cached) $ECHO_C" >&6
9954 else
9955   while :; do
9956   ac_cv_sys_file_offset_bits=no
9957   cat >conftest.$ac_ext <<_ACEOF
9958 #line 9958 "configure"
9959 #include "confdefs.h"
9960 #include <sys/types.h>
9961  /* Check that off_t can represent 2**63 - 1 correctly.
9962     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9963     since some C++ compilers masquerading as C compilers
9964     incorrectly reject 9223372036854775807.  */
9965 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9966   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9967                        && LARGE_OFF_T % 2147483647 == 1)
9968                       ? 1 : -1];
9969 int
9970 main ()
9971 {
9972
9973   ;
9974   return 0;
9975 }
9976 _ACEOF
9977 rm -f conftest.$ac_objext
9978 if { (eval echo "$as_me:9978: \"$ac_compile\"") >&5
9979   (eval $ac_compile) 2>&5
9980   ac_status=$?
9981   echo "$as_me:9981: \$? = $ac_status" >&5
9982   (exit $ac_status); } &&
9983          { ac_try='test -s conftest.$ac_objext'
9984   { (eval echo "$as_me:9984: \"$ac_try\"") >&5
9985   (eval $ac_try) 2>&5
9986   ac_status=$?
9987   echo "$as_me:9987: \$? = $ac_status" >&5
9988   (exit $ac_status); }; }; then
9989   break
9990 else
9991   echo "$as_me: failed program was:" >&5
9992 cat conftest.$ac_ext >&5
9993 fi
9994 rm -f conftest.$ac_objext conftest.$ac_ext
9995   cat >conftest.$ac_ext <<_ACEOF
9996 #line 9996 "configure"
9997 #include "confdefs.h"
9998 #define _FILE_OFFSET_BITS 64
9999 #include <sys/types.h>
10000  /* Check that off_t can represent 2**63 - 1 correctly.
10001     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10002     since some C++ compilers masquerading as C compilers
10003     incorrectly reject 9223372036854775807.  */
10004 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10005   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10006                        && LARGE_OFF_T % 2147483647 == 1)
10007                       ? 1 : -1];
10008 int
10009 main ()
10010 {
10011
10012   ;
10013   return 0;
10014 }
10015 _ACEOF
10016 rm -f conftest.$ac_objext
10017 if { (eval echo "$as_me:10017: \"$ac_compile\"") >&5
10018   (eval $ac_compile) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit $ac_status); } &&
10022          { ac_try='test -s conftest.$ac_objext'
10023   { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024   (eval $ac_try) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit $ac_status); }; }; then
10028   ac_cv_sys_file_offset_bits=64; break
10029 else
10030   echo "$as_me: failed program was:" >&5
10031 cat conftest.$ac_ext >&5
10032 fi
10033 rm -f conftest.$ac_objext conftest.$ac_ext
10034   break
10035 done
10036 fi
10037 echo "$as_me:10037: result: $ac_cv_sys_file_offset_bits" >&5
10038 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10039 if test "$ac_cv_sys_file_offset_bits" != no; then
10040
10041 cat >>confdefs.h <<EOF
10042 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10043 EOF
10044
10045 fi
10046 rm -rf conftest*
10047   echo "$as_me:10047: checking for _LARGE_FILES value needed for large files" >&5
10048 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10049 if test "${ac_cv_sys_large_files+set}" = set; then
10050   echo $ECHO_N "(cached) $ECHO_C" >&6
10051 else
10052   while :; do
10053   ac_cv_sys_large_files=no
10054   cat >conftest.$ac_ext <<_ACEOF
10055 #line 10055 "configure"
10056 #include "confdefs.h"
10057 #include <sys/types.h>
10058  /* Check that off_t can represent 2**63 - 1 correctly.
10059     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10060     since some C++ compilers masquerading as C compilers
10061     incorrectly reject 9223372036854775807.  */
10062 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10063   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10064                        && LARGE_OFF_T % 2147483647 == 1)
10065                       ? 1 : -1];
10066 int
10067 main ()
10068 {
10069
10070   ;
10071   return 0;
10072 }
10073 _ACEOF
10074 rm -f conftest.$ac_objext
10075 if { (eval echo "$as_me:10075: \"$ac_compile\"") >&5
10076   (eval $ac_compile) 2>&5
10077   ac_status=$?
10078   echo "$as_me:10078: \$? = $ac_status" >&5
10079   (exit $ac_status); } &&
10080          { ac_try='test -s conftest.$ac_objext'
10081   { (eval echo "$as_me:10081: \"$ac_try\"") >&5
10082   (eval $ac_try) 2>&5
10083   ac_status=$?
10084   echo "$as_me:10084: \$? = $ac_status" >&5
10085   (exit $ac_status); }; }; then
10086   break
10087 else
10088   echo "$as_me: failed program was:" >&5
10089 cat conftest.$ac_ext >&5
10090 fi
10091 rm -f conftest.$ac_objext conftest.$ac_ext
10092   cat >conftest.$ac_ext <<_ACEOF
10093 #line 10093 "configure"
10094 #include "confdefs.h"
10095 #define _LARGE_FILES 1
10096 #include <sys/types.h>
10097  /* Check that off_t can represent 2**63 - 1 correctly.
10098     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10099     since some C++ compilers masquerading as C compilers
10100     incorrectly reject 9223372036854775807.  */
10101 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10102   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10103                        && LARGE_OFF_T % 2147483647 == 1)
10104                       ? 1 : -1];
10105 int
10106 main ()
10107 {
10108
10109   ;
10110   return 0;
10111 }
10112 _ACEOF
10113 rm -f conftest.$ac_objext
10114 if { (eval echo "$as_me:10114: \"$ac_compile\"") >&5
10115   (eval $ac_compile) 2>&5
10116   ac_status=$?
10117   echo "$as_me:10117: \$? = $ac_status" >&5
10118   (exit $ac_status); } &&
10119          { ac_try='test -s conftest.$ac_objext'
10120   { (eval echo "$as_me:10120: \"$ac_try\"") >&5
10121   (eval $ac_try) 2>&5
10122   ac_status=$?
10123   echo "$as_me:10123: \$? = $ac_status" >&5
10124   (exit $ac_status); }; }; then
10125   ac_cv_sys_large_files=1; break
10126 else
10127   echo "$as_me: failed program was:" >&5
10128 cat conftest.$ac_ext >&5
10129 fi
10130 rm -f conftest.$ac_objext conftest.$ac_ext
10131   break
10132 done
10133 fi
10134 echo "$as_me:10134: result: $ac_cv_sys_large_files" >&5
10135 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10136 if test "$ac_cv_sys_large_files" != no; then
10137
10138 cat >>confdefs.h <<EOF
10139 #define _LARGE_FILES $ac_cv_sys_large_files
10140 EOF
10141
10142 fi
10143 rm -rf conftest*
10144 fi
10145
10146     if test "$enable_largefile" != no ; then
10147         echo "$as_me:10147: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10148 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10149 if test "${ac_cv_sys_largefile_source+set}" = set; then
10150   echo $ECHO_N "(cached) $ECHO_C" >&6
10151 else
10152   while :; do
10153   ac_cv_sys_largefile_source=no
10154   cat >conftest.$ac_ext <<_ACEOF
10155 #line 10155 "configure"
10156 #include "confdefs.h"
10157 #include <stdio.h>
10158 int
10159 main ()
10160 {
10161 return !fseeko;
10162   ;
10163   return 0;
10164 }
10165 _ACEOF
10166 rm -f conftest.$ac_objext
10167 if { (eval echo "$as_me:10167: \"$ac_compile\"") >&5
10168   (eval $ac_compile) 2>&5
10169   ac_status=$?
10170   echo "$as_me:10170: \$? = $ac_status" >&5
10171   (exit $ac_status); } &&
10172          { ac_try='test -s conftest.$ac_objext'
10173   { (eval echo "$as_me:10173: \"$ac_try\"") >&5
10174   (eval $ac_try) 2>&5
10175   ac_status=$?
10176   echo "$as_me:10176: \$? = $ac_status" >&5
10177   (exit $ac_status); }; }; then
10178   break
10179 else
10180   echo "$as_me: failed program was:" >&5
10181 cat conftest.$ac_ext >&5
10182 fi
10183 rm -f conftest.$ac_objext conftest.$ac_ext
10184   cat >conftest.$ac_ext <<_ACEOF
10185 #line 10185 "configure"
10186 #include "confdefs.h"
10187 #define _LARGEFILE_SOURCE 1
10188 #include <stdio.h>
10189 int
10190 main ()
10191 {
10192 return !fseeko;
10193   ;
10194   return 0;
10195 }
10196 _ACEOF
10197 rm -f conftest.$ac_objext
10198 if { (eval echo "$as_me:10198: \"$ac_compile\"") >&5
10199   (eval $ac_compile) 2>&5
10200   ac_status=$?
10201   echo "$as_me:10201: \$? = $ac_status" >&5
10202   (exit $ac_status); } &&
10203          { ac_try='test -s conftest.$ac_objext'
10204   { (eval echo "$as_me:10204: \"$ac_try\"") >&5
10205   (eval $ac_try) 2>&5
10206   ac_status=$?
10207   echo "$as_me:10207: \$? = $ac_status" >&5
10208   (exit $ac_status); }; }; then
10209   ac_cv_sys_largefile_source=1; break
10210 else
10211   echo "$as_me: failed program was:" >&5
10212 cat conftest.$ac_ext >&5
10213 fi
10214 rm -f conftest.$ac_objext conftest.$ac_ext
10215   break
10216 done
10217 fi
10218 echo "$as_me:10218: result: $ac_cv_sys_largefile_source" >&5
10219 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10220 if test "$ac_cv_sys_largefile_source" != no; then
10221
10222 cat >>confdefs.h <<EOF
10223 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10224 EOF
10225
10226 fi
10227 rm -rf conftest*
10228
10229 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10230 # in glibc 2.1.3, but that breaks too many other things.
10231 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10232 echo "$as_me:10232: checking for fseeko" >&5
10233 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10234 if test "${ac_cv_func_fseeko+set}" = set; then
10235   echo $ECHO_N "(cached) $ECHO_C" >&6
10236 else
10237   cat >conftest.$ac_ext <<_ACEOF
10238 #line 10238 "configure"
10239 #include "confdefs.h"
10240 #include <stdio.h>
10241 int
10242 main ()
10243 {
10244 return fseeko && fseeko (stdin, 0, 0);
10245   ;
10246   return 0;
10247 }
10248 _ACEOF
10249 rm -f conftest.$ac_objext conftest$ac_exeext
10250 if { (eval echo "$as_me:10250: \"$ac_link\"") >&5
10251   (eval $ac_link) 2>&5
10252   ac_status=$?
10253   echo "$as_me:10253: \$? = $ac_status" >&5
10254   (exit $ac_status); } &&
10255          { ac_try='test -s conftest$ac_exeext'
10256   { (eval echo "$as_me:10256: \"$ac_try\"") >&5
10257   (eval $ac_try) 2>&5
10258   ac_status=$?
10259   echo "$as_me:10259: \$? = $ac_status" >&5
10260   (exit $ac_status); }; }; then
10261   ac_cv_func_fseeko=yes
10262 else
10263   echo "$as_me: failed program was:" >&5
10264 cat conftest.$ac_ext >&5
10265 ac_cv_func_fseeko=no
10266 fi
10267 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10268 fi
10269 echo "$as_me:10269: result: $ac_cv_func_fseeko" >&5
10270 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10271 if test $ac_cv_func_fseeko = yes; then
10272
10273 cat >>confdefs.h <<\EOF
10274 #define HAVE_FSEEKO 1
10275 EOF
10276
10277 fi
10278
10279         # Normally we would collect these definitions in the config.h,
10280         # but (like _XOPEN_SOURCE), some environments rely on having these
10281         # defined before any of the system headers are included.  Another
10282         # case comes up with C++, e.g., on AIX the compiler compiles the
10283         # header files by themselves before looking at the body files it is
10284         # told to compile.  For ncurses, those header files do not include
10285         # the config.h
10286         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10287         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10288         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10289
10290         echo "$as_me:10290: checking whether to use struct dirent64" >&5
10291 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10292 if test "${cf_cv_struct_dirent64+set}" = set; then
10293   echo $ECHO_N "(cached) $ECHO_C" >&6
10294 else
10295
10296                 cat >conftest.$ac_ext <<_ACEOF
10297 #line 10297 "configure"
10298 #include "confdefs.h"
10299
10300 #include <sys/types.h>
10301 #include <dirent.h>
10302
10303 int
10304 main ()
10305 {
10306
10307                 /* if transitional largefile support is setup, this is true */
10308                 extern struct dirent64 * readdir(DIR *);
10309                 struct dirent64 *x = readdir((DIR *)0);
10310                 struct dirent *y = readdir((DIR *)0);
10311                 int z = x - y;
10312
10313   ;
10314   return 0;
10315 }
10316 _ACEOF
10317 rm -f conftest.$ac_objext
10318 if { (eval echo "$as_me:10318: \"$ac_compile\"") >&5
10319   (eval $ac_compile) 2>&5
10320   ac_status=$?
10321   echo "$as_me:10321: \$? = $ac_status" >&5
10322   (exit $ac_status); } &&
10323          { ac_try='test -s conftest.$ac_objext'
10324   { (eval echo "$as_me:10324: \"$ac_try\"") >&5
10325   (eval $ac_try) 2>&5
10326   ac_status=$?
10327   echo "$as_me:10327: \$? = $ac_status" >&5
10328   (exit $ac_status); }; }; then
10329   cf_cv_struct_dirent64=yes
10330 else
10331   echo "$as_me: failed program was:" >&5
10332 cat conftest.$ac_ext >&5
10333 cf_cv_struct_dirent64=no
10334 fi
10335 rm -f conftest.$ac_objext conftest.$ac_ext
10336
10337 fi
10338 echo "$as_me:10338: result: $cf_cv_struct_dirent64" >&5
10339 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10340         test "$cf_cv_struct_dirent64" = yes &&
10341 cat >>confdefs.h <<\EOF
10342 #define HAVE_STRUCT_DIRENT64 1
10343 EOF
10344
10345     fi
10346
10347 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10348 echo "$as_me:10348: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10349 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10350
10351 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10352 if test "${enable_tparm_varargs+set}" = set; then
10353   enableval="$enable_tparm_varargs"
10354   with_tparm_varargs=$enableval
10355 else
10356   with_tparm_varargs=yes
10357 fi;
10358 echo "$as_me:10358: result: $with_tparm_varargs" >&5
10359 echo "${ECHO_T}$with_tparm_varargs" >&6
10360 NCURSES_TPARM_VARARGS=0
10361 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10362
10363 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10364 if test "$with_ticlib" != no ; then
10365 echo "$as_me:10365: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10366 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10367
10368 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10369 if test "${enable_tic_depends+set}" = set; then
10370   enableval="$enable_tic_depends"
10371   with_tic_depends=$enableval
10372 else
10373   with_tic_depends=yes
10374 fi;
10375 echo "$as_me:10375: result: $with_tic_depends" >&5
10376 echo "${ECHO_T}$with_tic_depends" >&6
10377 else
10378         with_tic_depends=no
10379 fi
10380
10381 ###   use option --with-bool to override bool's type
10382 echo "$as_me:10382: checking for type of bool" >&5
10383 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10384
10385 # Check whether --with-bool or --without-bool was given.
10386 if test "${with_bool+set}" = set; then
10387   withval="$with_bool"
10388   NCURSES_BOOL="$withval"
10389 else
10390   NCURSES_BOOL=auto
10391 fi;
10392 echo "$as_me:10392: result: $NCURSES_BOOL" >&5
10393 echo "${ECHO_T}$NCURSES_BOOL" >&6
10394
10395 echo "$as_me:10395: checking for alternate terminal capabilities file" >&5
10396 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10397
10398 # Check whether --with-caps or --without-caps was given.
10399 if test "${with_caps+set}" = set; then
10400   withval="$with_caps"
10401   TERMINFO_CAPS=Caps.$withval
10402 else
10403   TERMINFO_CAPS=Caps
10404 fi;
10405 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10406 echo "$as_me:10406: result: $TERMINFO_CAPS" >&5
10407 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10408
10409 ###   use option --with-chtype to override chtype's type
10410 echo "$as_me:10410: checking for type of chtype" >&5
10411 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10412
10413 # Check whether --with-chtype or --without-chtype was given.
10414 if test "${with_chtype+set}" = set; then
10415   withval="$with_chtype"
10416   NCURSES_CHTYPE="$withval"
10417 else
10418   NCURSES_CHTYPE=auto
10419 fi;
10420 echo "$as_me:10420: result: $NCURSES_CHTYPE" >&5
10421 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10422
10423 ###   use option --with-ospeed to override ospeed's type
10424 echo "$as_me:10424: checking for type of ospeed" >&5
10425 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10426
10427 # Check whether --with-ospeed or --without-ospeed was given.
10428 if test "${with_ospeed+set}" = set; then
10429   withval="$with_ospeed"
10430   NCURSES_OSPEED="$withval"
10431 else
10432   NCURSES_OSPEED=short
10433 fi;
10434 echo "$as_me:10434: result: $NCURSES_OSPEED" >&5
10435 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10436
10437 ###   use option --with-mmask-t to override mmask_t's type
10438 echo "$as_me:10438: checking for type of mmask_t" >&5
10439 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10440
10441 # Check whether --with-mmask-t or --without-mmask-t was given.
10442 if test "${with_mmask_t+set}" = set; then
10443   withval="$with_mmask_t"
10444   NCURSES_MMASK_T="$withval"
10445 else
10446   NCURSES_MMASK_T=auto
10447 fi;
10448 echo "$as_me:10448: result: $NCURSES_MMASK_T" >&5
10449 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10450
10451 ###   use option --with-ccharw-max to override CCHARW_MAX size
10452 echo "$as_me:10452: checking for size CCHARW_MAX" >&5
10453 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10454
10455 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10456 if test "${with_ccharw_max+set}" = set; then
10457   withval="$with_ccharw_max"
10458   NCURSES_CCHARW_MAX="$withval"
10459 else
10460   NCURSES_CCHARW_MAX=5
10461 fi;
10462 echo "$as_me:10462: result: $NCURSES_CCHARW_MAX" >&5
10463 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10464
10465 ###   use option --with-tparm-arg to override tparm's argument type
10466 echo "$as_me:10466: checking for type of tparm args" >&5
10467 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10468
10469 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10470 if test "${with_tparm_arg+set}" = set; then
10471   withval="$with_tparm_arg"
10472   NCURSES_TPARM_ARG="$withval"
10473 else
10474   NCURSES_TPARM_ARG=long
10475 fi;
10476 echo "$as_me:10476: result: $NCURSES_TPARM_ARG" >&5
10477 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10478
10479 ### Enable compiling-in rcs id's
10480 echo "$as_me:10480: checking if RCS identifiers should be compiled-in" >&5
10481 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10482
10483 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10484 if test "${with_rcs_ids+set}" = set; then
10485   withval="$with_rcs_ids"
10486   with_rcs_ids=$withval
10487 else
10488   with_rcs_ids=no
10489 fi;
10490 echo "$as_me:10490: result: $with_rcs_ids" >&5
10491 echo "${ECHO_T}$with_rcs_ids" >&6
10492 test "x$with_rcs_ids" = xyes &&
10493 cat >>confdefs.h <<\EOF
10494 #define USE_RCS_IDS 1
10495 EOF
10496
10497 ###############################################################################
10498
10499 echo "$as_me:10499: checking format of man-pages" >&5
10500 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10501
10502 # Check whether --with-manpage-format or --without-manpage-format was given.
10503 if test "${with_manpage_format+set}" = set; then
10504   withval="$with_manpage_format"
10505   MANPAGE_FORMAT=$withval
10506 else
10507   MANPAGE_FORMAT=unknown
10508 fi;
10509
10510 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10511 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10512
10513 cf_unknown=
10514
10515 case $MANPAGE_FORMAT in
10516 unknown)
10517   if test -z "$MANPATH" ; then
10518     MANPATH="/usr/man:/usr/share/man"
10519   fi
10520
10521   # look for the 'date' man-page (it's most likely to be installed!)
10522   MANPAGE_FORMAT=
10523   cf_preform=no
10524   cf_catonly=yes
10525   cf_example=date
10526
10527   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10528   for cf_dir in $MANPATH; do
10529     test -z "$cf_dir" && cf_dir=/usr/man
10530     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
10531     do
10532       cf_test=`echo $cf_name | sed -e 's/*//'`
10533       if test "x$cf_test" = "x$cf_name" ; then
10534
10535         case "$cf_name" in
10536         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10537         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10538         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10539         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10540         esac
10541
10542         case "$cf_name" in
10543         $cf_dir/man*)
10544           cf_catonly=no
10545           ;;
10546         $cf_dir/cat*)
10547           cf_preform=yes
10548           ;;
10549         esac
10550         break
10551       fi
10552
10553       # if we found a match in either man* or cat*, stop looking
10554       if test -n "$MANPAGE_FORMAT" ; then
10555         cf_found=no
10556         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10557         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10558         case "$cf_name" in
10559         $cf_dir/cat*)
10560           cf_found=yes
10561           ;;
10562         esac
10563         test $cf_found=yes && break
10564       fi
10565     done
10566     # only check the first directory in $MANPATH where we find manpages
10567     if test -n "$MANPAGE_FORMAT" ; then
10568        break
10569     fi
10570   done
10571   # if we did not find the example, just assume it is normal
10572   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10573   IFS="$ac_save_ifs"
10574   ;;
10575 *)
10576   for cf_option in $MANPAGE_FORMAT; do
10577      case $cf_option in #(vi
10578      gzip|compress|BSDI|normal|formatted|catonly)
10579        ;;
10580      *)
10581        cf_unknown="$cf_unknown $cf_option"
10582        ;;
10583      esac
10584   done
10585   ;;
10586 esac
10587
10588 echo "$as_me:10588: result: $MANPAGE_FORMAT" >&5
10589 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10590 if test -n "$cf_unknown" ; then
10591   { echo "$as_me:10591: WARNING: Unexpected manpage-format $cf_unknown" >&5
10592 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10593 fi
10594
10595 echo "$as_me:10595: checking for manpage renaming" >&5
10596 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10597
10598 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10599 if test "${with_manpage_renames+set}" = set; then
10600   withval="$with_manpage_renames"
10601   MANPAGE_RENAMES=$withval
10602 else
10603   MANPAGE_RENAMES=yes
10604 fi;
10605
10606 case ".$MANPAGE_RENAMES" in #(vi
10607 .no) #(vi
10608   ;;
10609 .|.yes)
10610   # Debian 'man' program?
10611   if test -f /etc/debian_version ; then
10612     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10613   else
10614     MANPAGE_RENAMES=no
10615   fi
10616   ;;
10617 esac
10618
10619 if test "$MANPAGE_RENAMES" != no ; then
10620   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10621     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10622   elif test ! -f $MANPAGE_RENAMES ; then
10623     { { echo "$as_me:10623: error: not a filename: $MANPAGE_RENAMES" >&5
10624 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10625    { (exit 1); exit 1; }; }
10626   fi
10627
10628   test ! -d man && mkdir man
10629
10630   # Construct a sed-script to perform renaming within man-pages
10631   if test -n "$MANPAGE_RENAMES" ; then
10632     test ! -d man && mkdir man
10633     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10634   fi
10635 fi
10636
10637 echo "$as_me:10637: result: $MANPAGE_RENAMES" >&5
10638 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10639
10640 echo "$as_me:10640: checking if manpage aliases will be installed" >&5
10641 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10642
10643 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10644 if test "${with_manpage_aliases+set}" = set; then
10645   withval="$with_manpage_aliases"
10646   MANPAGE_ALIASES=$withval
10647 else
10648   MANPAGE_ALIASES=yes
10649 fi;
10650
10651 echo "$as_me:10651: result: $MANPAGE_ALIASES" >&5
10652 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10653
10654 case "x$LN_S" in #(vi
10655 xln*) #(vi
10656         cf_use_symlinks=yes
10657         ;;
10658 *)
10659         cf_use_symlinks=no
10660         ;;
10661 esac
10662
10663 MANPAGE_SYMLINKS=no
10664 if test "$MANPAGE_ALIASES" = yes ; then
10665 echo "$as_me:10665: checking if manpage symlinks should be used" >&5
10666 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10667
10668 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10669 if test "${with_manpage_symlinks+set}" = set; then
10670   withval="$with_manpage_symlinks"
10671   MANPAGE_SYMLINKS=$withval
10672 else
10673   MANPAGE_SYMLINKS=$cf_use_symlinks
10674 fi;
10675
10676 if test "$$cf_use_symlinks" = no; then
10677 if test "$MANPAGE_SYMLINKS" = yes ; then
10678         { echo "$as_me:10678: WARNING: cannot make symlinks" >&5
10679 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10680         MANPAGE_SYMLINKS=no
10681 fi
10682 fi
10683
10684 echo "$as_me:10684: result: $MANPAGE_SYMLINKS" >&5
10685 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10686 fi
10687
10688 echo "$as_me:10688: checking for manpage tbl" >&5
10689 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10690
10691 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10692 if test "${with_manpage_tbl+set}" = set; then
10693   withval="$with_manpage_tbl"
10694   MANPAGE_TBL=$withval
10695 else
10696   MANPAGE_TBL=no
10697 fi;
10698
10699 echo "$as_me:10699: result: $MANPAGE_TBL" >&5
10700 echo "${ECHO_T}$MANPAGE_TBL" >&6
10701
10702   if test "$prefix" = "NONE" ; then
10703      cf_prefix="$ac_default_prefix"
10704   else
10705      cf_prefix="$prefix"
10706   fi
10707
10708   case "$MANPAGE_FORMAT" in # (vi
10709   *catonly*) # (vi
10710     cf_format=yes
10711     cf_inboth=no
10712     ;;
10713   *formatted*) # (vi
10714     cf_format=yes
10715     cf_inboth=yes
10716     ;;
10717   *)
10718     cf_format=no
10719     cf_inboth=no
10720     ;;
10721   esac
10722
10723 test ! -d man && mkdir man
10724
10725 cf_so_strip=
10726 cf_compress=
10727 case "$MANPAGE_FORMAT" in #(vi
10728 *compress*) #(vi
10729         cf_so_strip="Z"
10730         cf_compress=compress
10731   ;;
10732 *gzip*)
10733         cf_so_strip="gz"
10734         cf_compress=gzip
10735   ;;
10736 esac
10737
10738 cf_edit_man=./edit_man.sh
10739 cf_man_alias=`pwd`/man_alias.sed
10740
10741 cat >$cf_edit_man <<CF_EOF
10742 #! /bin/sh
10743 # this script is generated by the configure-script CF_MAN_PAGES macro.
10744
10745 prefix="$cf_prefix"
10746 datarootdir="$datarootdir"
10747 datadir="$datadir"
10748
10749 NCURSES_MAJOR="$NCURSES_MAJOR"
10750 NCURSES_MINOR="$NCURSES_MINOR"
10751 NCURSES_PATCH="$NCURSES_PATCH"
10752
10753 NCURSES_OSPEED="$NCURSES_OSPEED"
10754 TERMINFO="$TERMINFO"
10755
10756 INSTALL="$INSTALL"
10757 INSTALL_DATA="$INSTALL_DATA"
10758
10759 transform="$program_transform_name"
10760
10761 TMP=\${TMPDIR:=/tmp}/man\$\$
10762 trap "rm -f \$TMP" 0 1 2 5 15
10763
10764 form=\$1
10765 shift || exit 1
10766
10767 verb=\$1
10768 shift || exit 1
10769
10770 mandir=\$1
10771 shift || exit 1
10772
10773 srcdir=\$1
10774 top_srcdir=\$srcdir/..
10775 shift || exit 1
10776
10777 if test "\$form" = normal ; then
10778         if test "$cf_format" = yes ; then
10779         if test "$cf_inboth" = no ; then
10780                 sh \$0 format \$verb \$mandir \$srcdir \$*
10781                 exit $?
10782         fi
10783         fi
10784         cf_subdir=\$mandir/man
10785         cf_tables=$MANPAGE_TBL
10786 else
10787         cf_subdir=\$mandir/cat
10788         cf_tables=yes
10789 fi
10790
10791 # process the list of source-files
10792 for i in \$* ; do
10793 case \$i in #(vi
10794 *.orig|*.rej) ;; #(vi
10795 *.[0-9]*)
10796         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10797         if test \$verb = installing ; then
10798         if test ! -d \$cf_subdir\${section} ; then
10799                 mkdir -p \$cf_subdir\$section
10800         fi
10801         fi
10802
10803         # replace variables in man page
10804         if test ! -f $cf_man_alias ; then
10805 cat >>$cf_man_alias <<-CF_EOF2
10806                 s,@DATADIR@,\$datadir,g
10807                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10808                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10809                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10810                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10811                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10812                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10813 CF_EOF
10814
10815         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10816         do
10817                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10818                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10819 cat >>$cf_edit_man <<-CF_EOF
10820                 s,@$cf_NAME@,$cf_name,g
10821 CF_EOF
10822         done
10823
10824 cat >>$cf_edit_man <<CF_EOF
10825 CF_EOF2
10826                 echo "...made $cf_man_alias"
10827         fi
10828
10829         aliases=
10830         cf_source=\`basename \$i\`
10831         inalias=\$cf_source
10832         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10833         if test ! -f \$inalias ; then
10834                 echo .. skipped \$cf_source
10835                 continue
10836         fi
10837 CF_EOF
10838
10839 if test "$MANPAGE_ALIASES" != no ; then
10840 cat >>$cf_edit_man <<CF_EOF
10841         nCurses=ignore.3x
10842         test $with_curses_h = yes && nCurses=ncurses.3x
10843         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10844 CF_EOF
10845 fi
10846
10847 if test "$MANPAGE_RENAMES" = no ; then
10848 cat >>$cf_edit_man <<CF_EOF
10849         # perform program transformations for section 1 man pages
10850         if test \$section = 1 ; then
10851                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10852         else
10853                 cf_target=\$cf_subdir\${section}/\$cf_source
10854         fi
10855 CF_EOF
10856 else
10857 cat >>$cf_edit_man <<CF_EOF
10858         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10859         if test -z "\$cf_target" ; then
10860                 echo '? missing rename for '\$cf_source
10861                 cf_target="\$cf_source"
10862         fi
10863         cf_target="\$cf_subdir\${section}/\${cf_target}"
10864
10865 CF_EOF
10866 fi
10867
10868 cat >>$cf_edit_man <<CF_EOF
10869         sed     -f $cf_man_alias \\
10870 CF_EOF
10871
10872 if test -f $MANPAGE_RENAMES ; then
10873 cat >>$cf_edit_man <<CF_EOF
10874                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10875 CF_EOF
10876 else
10877 cat >>$cf_edit_man <<CF_EOF
10878                 < \$i >\$TMP
10879 CF_EOF
10880 fi
10881
10882 cat >>$cf_edit_man <<CF_EOF
10883 if test \$cf_tables = yes ; then
10884         tbl \$TMP >\$TMP.out
10885         mv \$TMP.out \$TMP
10886 fi
10887 CF_EOF
10888
10889 if test $with_overwrite != yes ; then
10890 cat >>$cf_edit_man <<CF_EOF
10891         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10892         mv \$TMP.out \$TMP
10893 CF_EOF
10894 fi
10895
10896 if test $with_curses_h != yes ; then
10897 cat >>$cf_edit_man <<CF_EOF
10898         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10899         mv \$TMP.out \$TMP
10900 CF_EOF
10901 fi
10902
10903 cat >>$cf_edit_man <<CF_EOF
10904         if test \$form = format ; then
10905                 nroff -man \$TMP >\$TMP.out
10906                 mv \$TMP.out \$TMP
10907         fi
10908 CF_EOF
10909
10910 if test -n "$cf_compress" ; then
10911 cat >>$cf_edit_man <<CF_EOF
10912         if test \$verb = installing ; then
10913         if ( $cf_compress -f \$TMP )
10914         then
10915                 mv \$TMP.$cf_so_strip \$TMP
10916         fi
10917         fi
10918         cf_target="\$cf_target.$cf_so_strip"
10919 CF_EOF
10920 fi
10921
10922 case "$MANPAGE_FORMAT" in #(vi
10923 *BSDI*)
10924 cat >>$cf_edit_man <<CF_EOF
10925         if test \$form = format ; then
10926                 # BSDI installs only .0 suffixes in the cat directories
10927                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10928         fi
10929 CF_EOF
10930   ;;
10931 esac
10932
10933 cat >>$cf_edit_man <<CF_EOF
10934         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10935         if test \$verb = installing ; then
10936                 echo \$verb \$cf_target
10937                 \$INSTALL_DATA \$TMP \$cf_target
10938                 test -d \$cf_subdir\${section} &&
10939                 test -n "\$aliases" && (
10940                         cd \$cf_subdir\${section} && (
10941                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10942                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10943                                 cf_target=\`basename \$cf_target\`
10944                                 for cf_alias in \$aliases
10945                                 do
10946                                         if test \$section = 1 ; then
10947                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10948                                         fi
10949
10950                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10951                                                 if test -f \$cf_alias\${suffix} ; then
10952                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10953                                                         then
10954                                                                 continue
10955                                                         fi
10956                                                 fi
10957                                                 echo .. \$verb alias \$cf_alias\${suffix}
10958 CF_EOF
10959 case "x$LN_S" in #(vi
10960 *-f) #(vi
10961 cat >>$cf_edit_man <<CF_EOF
10962                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10963 CF_EOF
10964         ;;
10965 *)
10966 cat >>$cf_edit_man <<CF_EOF
10967                                                 rm -f \$cf_alias\${suffix}
10968                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10969 CF_EOF
10970         ;;
10971 esac
10972 cat >>$cf_edit_man <<CF_EOF
10973                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10974                                                 echo ".so \$cf_source" >\$TMP
10975 CF_EOF
10976 if test -n "$cf_compress" ; then
10977 cat >>$cf_edit_man <<CF_EOF
10978                                                 if test -n "$cf_so_strip" ; then
10979                                                         $cf_compress -f \$TMP
10980                                                         mv \$TMP.$cf_so_strip \$TMP
10981                                                 fi
10982 CF_EOF
10983 fi
10984 cat >>$cf_edit_man <<CF_EOF
10985                                                 echo .. \$verb alias \$cf_alias\${suffix}
10986                                                 rm -f \$cf_alias\${suffix}
10987                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10988                                         fi
10989                                 done
10990                         )
10991                 )
10992         elif test \$verb = removing ; then
10993                 test -f \$cf_target && (
10994                         echo \$verb \$cf_target
10995                         rm -f \$cf_target
10996                 )
10997                 test -d \$cf_subdir\${section} &&
10998                 test -n "\$aliases" && (
10999                         cd \$cf_subdir\${section} && (
11000                                 for cf_alias in \$aliases
11001                                 do
11002                                         if test \$section = 1 ; then
11003                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11004                                         fi
11005
11006                                         echo .. \$verb alias \$cf_alias\${suffix}
11007                                         rm -f \$cf_alias\${suffix}
11008                                 done
11009                         )
11010                 )
11011         else
11012 #               echo ".hy 0"
11013                 cat \$TMP
11014         fi
11015         ;;
11016 esac
11017 done
11018
11019 if test $cf_inboth = yes ; then
11020 if test \$form != format ; then
11021         sh \$0 format \$verb \$mandir \$srcdir \$*
11022 fi
11023 fi
11024
11025 exit 0
11026 CF_EOF
11027 chmod 755 $cf_edit_man
11028
11029 ###############################################################################
11030
11031 ### Note that some functions (such as const) are normally disabled anyway.
11032 echo "$as_me:11032: checking if you want to build with function extensions" >&5
11033 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11034
11035 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11036 if test "${enable_ext_funcs+set}" = set; then
11037   enableval="$enable_ext_funcs"
11038   with_ext_funcs=$enableval
11039 else
11040   with_ext_funcs=yes
11041 fi;
11042 echo "$as_me:11042: result: $with_ext_funcs" >&5
11043 echo "${ECHO_T}$with_ext_funcs" >&6
11044 if test "x$with_ext_funcs" = xyes ; then
11045         NCURSES_EXT_FUNCS=1
11046
11047 cat >>confdefs.h <<\EOF
11048 #define HAVE_ASSUME_DEFAULT_COLORS 1
11049 EOF
11050
11051 cat >>confdefs.h <<\EOF
11052 #define HAVE_CURSES_VERSION 1
11053 EOF
11054
11055 cat >>confdefs.h <<\EOF
11056 #define HAVE_HAS_KEY 1
11057 EOF
11058
11059 cat >>confdefs.h <<\EOF
11060 #define HAVE_RESIZETERM 1
11061 EOF
11062
11063 cat >>confdefs.h <<\EOF
11064 #define HAVE_RESIZE_TERM 1
11065 EOF
11066
11067 cat >>confdefs.h <<\EOF
11068 #define HAVE_TERM_ENTRY_H 1
11069 EOF
11070
11071 cat >>confdefs.h <<\EOF
11072 #define HAVE_USE_DEFAULT_COLORS 1
11073 EOF
11074
11075 cat >>confdefs.h <<\EOF
11076 #define HAVE_USE_SCREEN 1
11077 EOF
11078
11079 cat >>confdefs.h <<\EOF
11080 #define HAVE_USE_WINDOW 1
11081 EOF
11082
11083 cat >>confdefs.h <<\EOF
11084 #define HAVE_WRESIZE 1
11085 EOF
11086
11087 cat >>confdefs.h <<\EOF
11088 #define NCURSES_EXT_FUNCS 1
11089 EOF
11090
11091         GENERATED_EXT_FUNCS=generated
11092 else
11093         NCURSES_EXT_FUNCS=0
11094         GENERATED_EXT_FUNCS=
11095 fi
11096
11097 echo "$as_me:11097: checking if you want to build with experimental SCREEN extensions" >&5
11098 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11099
11100 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11101 if test "${enable_sp_funcs+set}" = set; then
11102   enableval="$enable_sp_funcs"
11103   with_sp_funcs=$enableval
11104 else
11105   with_sp_funcs=no
11106 fi;
11107 echo "$as_me:11107: result: $with_sp_funcs" >&5
11108 echo "${ECHO_T}$with_sp_funcs" >&6
11109 if test "x$with_sp_funcs" = xyes ; then
11110         NCURSES_SP_FUNCS=1
11111
11112 cat >>confdefs.h <<\EOF
11113 #define NCURSES_SP_FUNCS 1
11114 EOF
11115
11116         GENERATED_SP_FUNCS=generated
11117 else
11118         NCURSES_SP_FUNCS=0
11119         GENERATED_SP_FUNCS=
11120 fi
11121
11122 echo "$as_me:11122: checking if you want to build with experimental terminal-driver" >&5
11123 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11124
11125 # Check whether --enable-term-driver or --disable-term-driver was given.
11126 if test "${enable_term_driver+set}" = set; then
11127   enableval="$enable_term_driver"
11128   with_term_driver=$enableval
11129 else
11130   with_term_driver=no
11131 fi;
11132 echo "$as_me:11132: result: $with_term_driver" >&5
11133 echo "${ECHO_T}$with_term_driver" >&6
11134 if test "x$with_term_driver" = xyes ; then
11135
11136 cat >>confdefs.h <<\EOF
11137 #define USE_TERM_DRIVER 1
11138 EOF
11139
11140         if test "x$with_sp_funcs" != xyes ; then
11141                 { { echo "$as_me:11141: error: The term-driver option relies upon sp-funcs" >&5
11142 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11143    { (exit 1); exit 1; }; }
11144         fi
11145 fi
11146
11147 ###   use option --enable-const to turn on use of const beyond that in XSI.
11148 echo "$as_me:11148: checking for extended use of const keyword" >&5
11149 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11150
11151 # Check whether --enable-const or --disable-const was given.
11152 if test "${enable_const+set}" = set; then
11153   enableval="$enable_const"
11154   with_ext_const=$enableval
11155 else
11156   with_ext_const=no
11157 fi;
11158 echo "$as_me:11158: result: $with_ext_const" >&5
11159 echo "${ECHO_T}$with_ext_const" >&6
11160 NCURSES_CONST='/*nothing*/'
11161 if test "x$with_ext_const" = xyes ; then
11162         NCURSES_CONST=const
11163 fi
11164
11165 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11166 echo "$as_me:11166: checking if you want to use extended colors" >&5
11167 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11168
11169 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11170 if test "${enable_ext_colors+set}" = set; then
11171   enableval="$enable_ext_colors"
11172   with_ext_colors=$enableval
11173 else
11174   with_ext_colors=no
11175 fi;
11176 echo "$as_me:11176: result: $with_ext_colors" >&5
11177 echo "${ECHO_T}$with_ext_colors" >&6
11178 NCURSES_EXT_COLORS=0
11179 if test "x$with_ext_colors" = xyes ; then
11180         if test "x$with_widec" != xyes ; then
11181                 { { echo "$as_me:11181: error: This option applies only to wide-character library" >&5
11182 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11183    { (exit 1); exit 1; }; }
11184         else
11185                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11186
11187 if test "${with_abi_version+set}" != set; then
11188         case $cf_cv_rel_version in
11189         5.*)
11190                 cf_cv_rel_version=6.0
11191                 cf_cv_abi_version=6
11192                 { echo "$as_me:11192: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11193 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11194                 ;;
11195         esac
11196 fi
11197
11198         fi
11199         NCURSES_EXT_COLORS=1
11200
11201 cat >>confdefs.h <<\EOF
11202 #define NCURSES_EXT_COLORS 1
11203 EOF
11204
11205 fi
11206
11207 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11208 echo "$as_me:11208: checking if you want to use extended mouse encoding" >&5
11209 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11210
11211 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11212 if test "${enable_ext_mouse+set}" = set; then
11213   enableval="$enable_ext_mouse"
11214   with_ext_mouse=$enableval
11215 else
11216   with_ext_mouse=no
11217 fi;
11218 echo "$as_me:11218: result: $with_ext_mouse" >&5
11219 echo "${ECHO_T}$with_ext_mouse" >&6
11220 NCURSES_MOUSE_VERSION=1
11221 if test "x$with_ext_mouse" = xyes ; then
11222         NCURSES_MOUSE_VERSION=2
11223
11224 if test "${with_abi_version+set}" != set; then
11225         case $cf_cv_rel_version in
11226         5.*)
11227                 cf_cv_rel_version=6.0
11228                 cf_cv_abi_version=6
11229                 { echo "$as_me:11229: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11230 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11231                 ;;
11232         esac
11233 fi
11234
11235 fi
11236
11237 echo "$as_me:11237: checking if you want \$NCURSES_NO_PADDING code" >&5
11238 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11239
11240 # Check whether --enable-no-padding or --disable-no-padding was given.
11241 if test "${enable_no_padding+set}" = set; then
11242   enableval="$enable_no_padding"
11243   with_no_padding=$enableval
11244 else
11245   with_no_padding=$with_ext_funcs
11246 fi;
11247 echo "$as_me:11247: result: $with_no_padding" >&5
11248 echo "${ECHO_T}$with_no_padding" >&6
11249 test "x$with_no_padding" = xyes &&
11250 cat >>confdefs.h <<\EOF
11251 #define NCURSES_NO_PADDING 1
11252 EOF
11253
11254 echo "$as_me:11254: checking for ANSI C header files" >&5
11255 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11256 if test "${ac_cv_header_stdc+set}" = set; then
11257   echo $ECHO_N "(cached) $ECHO_C" >&6
11258 else
11259   cat >conftest.$ac_ext <<_ACEOF
11260 #line 11260 "configure"
11261 #include "confdefs.h"
11262 #include <stdlib.h>
11263 #include <stdarg.h>
11264 #include <string.h>
11265 #include <float.h>
11266
11267 _ACEOF
11268 if { (eval echo "$as_me:11268: \"$ac_cpp conftest.$ac_ext\"") >&5
11269   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11270   ac_status=$?
11271   egrep -v '^ *\+' conftest.er1 >conftest.err
11272   rm -f conftest.er1
11273   cat conftest.err >&5
11274   echo "$as_me:11274: \$? = $ac_status" >&5
11275   (exit $ac_status); } >/dev/null; then
11276   if test -s conftest.err; then
11277     ac_cpp_err=$ac_c_preproc_warn_flag
11278   else
11279     ac_cpp_err=
11280   fi
11281 else
11282   ac_cpp_err=yes
11283 fi
11284 if test -z "$ac_cpp_err"; then
11285   ac_cv_header_stdc=yes
11286 else
11287   echo "$as_me: failed program was:" >&5
11288   cat conftest.$ac_ext >&5
11289   ac_cv_header_stdc=no
11290 fi
11291 rm -f conftest.err conftest.$ac_ext
11292
11293 if test $ac_cv_header_stdc = yes; then
11294   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11295   cat >conftest.$ac_ext <<_ACEOF
11296 #line 11296 "configure"
11297 #include "confdefs.h"
11298 #include <string.h>
11299
11300 _ACEOF
11301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11302   egrep "memchr" >/dev/null 2>&1; then
11303   :
11304 else
11305   ac_cv_header_stdc=no
11306 fi
11307 rm -rf conftest*
11308
11309 fi
11310
11311 if test $ac_cv_header_stdc = yes; then
11312   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11313   cat >conftest.$ac_ext <<_ACEOF
11314 #line 11314 "configure"
11315 #include "confdefs.h"
11316 #include <stdlib.h>
11317
11318 _ACEOF
11319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11320   egrep "free" >/dev/null 2>&1; then
11321   :
11322 else
11323   ac_cv_header_stdc=no
11324 fi
11325 rm -rf conftest*
11326
11327 fi
11328
11329 if test $ac_cv_header_stdc = yes; then
11330   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11331   if test "$cross_compiling" = yes; then
11332   :
11333 else
11334   cat >conftest.$ac_ext <<_ACEOF
11335 #line 11335 "configure"
11336 #include "confdefs.h"
11337 #include <ctype.h>
11338 #if ((' ' & 0x0FF) == 0x020)
11339 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11340 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11341 #else
11342 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11343                      || ('j' <= (c) && (c) <= 'r') \
11344                      || ('s' <= (c) && (c) <= 'z'))
11345 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11346 #endif
11347
11348 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11349 int
11350 main ()
11351 {
11352   int i;
11353   for (i = 0; i < 256; i++)
11354     if (XOR (islower (i), ISLOWER (i))
11355         || toupper (i) != TOUPPER (i))
11356       $ac_main_return(2);
11357   $ac_main_return (0);
11358 }
11359 _ACEOF
11360 rm -f conftest$ac_exeext
11361 if { (eval echo "$as_me:11361: \"$ac_link\"") >&5
11362   (eval $ac_link) 2>&5
11363   ac_status=$?
11364   echo "$as_me:11364: \$? = $ac_status" >&5
11365   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11366   { (eval echo "$as_me:11366: \"$ac_try\"") >&5
11367   (eval $ac_try) 2>&5
11368   ac_status=$?
11369   echo "$as_me:11369: \$? = $ac_status" >&5
11370   (exit $ac_status); }; }; then
11371   :
11372 else
11373   echo "$as_me: program exited with status $ac_status" >&5
11374 echo "$as_me: failed program was:" >&5
11375 cat conftest.$ac_ext >&5
11376 ac_cv_header_stdc=no
11377 fi
11378 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11379 fi
11380 fi
11381 fi
11382 echo "$as_me:11382: result: $ac_cv_header_stdc" >&5
11383 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11384 if test $ac_cv_header_stdc = yes; then
11385
11386 cat >>confdefs.h <<\EOF
11387 #define STDC_HEADERS 1
11388 EOF
11389
11390 fi
11391
11392 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11393
11394 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11395                   inttypes.h stdint.h unistd.h
11396 do
11397 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11398 echo "$as_me:11398: checking for $ac_header" >&5
11399 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11400 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11401   echo $ECHO_N "(cached) $ECHO_C" >&6
11402 else
11403   cat >conftest.$ac_ext <<_ACEOF
11404 #line 11404 "configure"
11405 #include "confdefs.h"
11406 $ac_includes_default
11407 #include <$ac_header>
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   eval "$as_ac_Header=yes"
11422 else
11423   echo "$as_me: failed program was:" >&5
11424 cat conftest.$ac_ext >&5
11425 eval "$as_ac_Header=no"
11426 fi
11427 rm -f conftest.$ac_objext conftest.$ac_ext
11428 fi
11429 echo "$as_me:11429: result: `eval echo '${'$as_ac_Header'}'`" >&5
11430 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11431 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11432   cat >>confdefs.h <<EOF
11433 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11434 EOF
11435
11436 fi
11437 done
11438
11439 echo "$as_me:11439: checking for signed char" >&5
11440 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11441 if test "${ac_cv_type_signed_char+set}" = set; then
11442   echo $ECHO_N "(cached) $ECHO_C" >&6
11443 else
11444   cat >conftest.$ac_ext <<_ACEOF
11445 #line 11445 "configure"
11446 #include "confdefs.h"
11447 $ac_includes_default
11448 int
11449 main ()
11450 {
11451 if ((signed char *) 0)
11452   return 0;
11453 if (sizeof (signed char))
11454   return 0;
11455   ;
11456   return 0;
11457 }
11458 _ACEOF
11459 rm -f conftest.$ac_objext
11460 if { (eval echo "$as_me:11460: \"$ac_compile\"") >&5
11461   (eval $ac_compile) 2>&5
11462   ac_status=$?
11463   echo "$as_me:11463: \$? = $ac_status" >&5
11464   (exit $ac_status); } &&
11465          { ac_try='test -s conftest.$ac_objext'
11466   { (eval echo "$as_me:11466: \"$ac_try\"") >&5
11467   (eval $ac_try) 2>&5
11468   ac_status=$?
11469   echo "$as_me:11469: \$? = $ac_status" >&5
11470   (exit $ac_status); }; }; then
11471   ac_cv_type_signed_char=yes
11472 else
11473   echo "$as_me: failed program was:" >&5
11474 cat conftest.$ac_ext >&5
11475 ac_cv_type_signed_char=no
11476 fi
11477 rm -f conftest.$ac_objext conftest.$ac_ext
11478 fi
11479 echo "$as_me:11479: result: $ac_cv_type_signed_char" >&5
11480 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11481
11482 echo "$as_me:11482: checking size of signed char" >&5
11483 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11484 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11485   echo $ECHO_N "(cached) $ECHO_C" >&6
11486 else
11487   if test "$ac_cv_type_signed_char" = yes; then
11488   if test "$cross_compiling" = yes; then
11489   # Depending upon the size, compute the lo and hi bounds.
11490 cat >conftest.$ac_ext <<_ACEOF
11491 #line 11491 "configure"
11492 #include "confdefs.h"
11493 $ac_includes_default
11494 int
11495 main ()
11496 {
11497 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11498   ;
11499   return 0;
11500 }
11501 _ACEOF
11502 rm -f conftest.$ac_objext
11503 if { (eval echo "$as_me:11503: \"$ac_compile\"") >&5
11504   (eval $ac_compile) 2>&5
11505   ac_status=$?
11506   echo "$as_me:11506: \$? = $ac_status" >&5
11507   (exit $ac_status); } &&
11508          { ac_try='test -s conftest.$ac_objext'
11509   { (eval echo "$as_me:11509: \"$ac_try\"") >&5
11510   (eval $ac_try) 2>&5
11511   ac_status=$?
11512   echo "$as_me:11512: \$? = $ac_status" >&5
11513   (exit $ac_status); }; }; then
11514   ac_lo=0 ac_mid=0
11515   while :; do
11516     cat >conftest.$ac_ext <<_ACEOF
11517 #line 11517 "configure"
11518 #include "confdefs.h"
11519 $ac_includes_default
11520 int
11521 main ()
11522 {
11523 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11524   ;
11525   return 0;
11526 }
11527 _ACEOF
11528 rm -f conftest.$ac_objext
11529 if { (eval echo "$as_me:11529: \"$ac_compile\"") >&5
11530   (eval $ac_compile) 2>&5
11531   ac_status=$?
11532   echo "$as_me:11532: \$? = $ac_status" >&5
11533   (exit $ac_status); } &&
11534          { ac_try='test -s conftest.$ac_objext'
11535   { (eval echo "$as_me:11535: \"$ac_try\"") >&5
11536   (eval $ac_try) 2>&5
11537   ac_status=$?
11538   echo "$as_me:11538: \$? = $ac_status" >&5
11539   (exit $ac_status); }; }; then
11540   ac_hi=$ac_mid; break
11541 else
11542   echo "$as_me: failed program was:" >&5
11543 cat conftest.$ac_ext >&5
11544 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11545 fi
11546 rm -f conftest.$ac_objext conftest.$ac_ext
11547   done
11548 else
11549   echo "$as_me: failed program was:" >&5
11550 cat conftest.$ac_ext >&5
11551 ac_hi=-1 ac_mid=-1
11552   while :; do
11553     cat >conftest.$ac_ext <<_ACEOF
11554 #line 11554 "configure"
11555 #include "confdefs.h"
11556 $ac_includes_default
11557 int
11558 main ()
11559 {
11560 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11561   ;
11562   return 0;
11563 }
11564 _ACEOF
11565 rm -f conftest.$ac_objext
11566 if { (eval echo "$as_me:11566: \"$ac_compile\"") >&5
11567   (eval $ac_compile) 2>&5
11568   ac_status=$?
11569   echo "$as_me:11569: \$? = $ac_status" >&5
11570   (exit $ac_status); } &&
11571          { ac_try='test -s conftest.$ac_objext'
11572   { (eval echo "$as_me:11572: \"$ac_try\"") >&5
11573   (eval $ac_try) 2>&5
11574   ac_status=$?
11575   echo "$as_me:11575: \$? = $ac_status" >&5
11576   (exit $ac_status); }; }; then
11577   ac_lo=$ac_mid; break
11578 else
11579   echo "$as_me: failed program was:" >&5
11580 cat conftest.$ac_ext >&5
11581 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11582 fi
11583 rm -f conftest.$ac_objext conftest.$ac_ext
11584   done
11585 fi
11586 rm -f conftest.$ac_objext conftest.$ac_ext
11587 # Binary search between lo and hi bounds.
11588 while test "x$ac_lo" != "x$ac_hi"; do
11589   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11590   cat >conftest.$ac_ext <<_ACEOF
11591 #line 11591 "configure"
11592 #include "confdefs.h"
11593 $ac_includes_default
11594 int
11595 main ()
11596 {
11597 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11598   ;
11599   return 0;
11600 }
11601 _ACEOF
11602 rm -f conftest.$ac_objext
11603 if { (eval echo "$as_me:11603: \"$ac_compile\"") >&5
11604   (eval $ac_compile) 2>&5
11605   ac_status=$?
11606   echo "$as_me:11606: \$? = $ac_status" >&5
11607   (exit $ac_status); } &&
11608          { ac_try='test -s conftest.$ac_objext'
11609   { (eval echo "$as_me:11609: \"$ac_try\"") >&5
11610   (eval $ac_try) 2>&5
11611   ac_status=$?
11612   echo "$as_me:11612: \$? = $ac_status" >&5
11613   (exit $ac_status); }; }; then
11614   ac_hi=$ac_mid
11615 else
11616   echo "$as_me: failed program was:" >&5
11617 cat conftest.$ac_ext >&5
11618 ac_lo=`expr $ac_mid + 1`
11619 fi
11620 rm -f conftest.$ac_objext conftest.$ac_ext
11621 done
11622 ac_cv_sizeof_signed_char=$ac_lo
11623 else
11624   if test "$cross_compiling" = yes; then
11625   { { echo "$as_me:11625: error: cannot run test program while cross compiling" >&5
11626 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11627    { (exit 1); exit 1; }; }
11628 else
11629   cat >conftest.$ac_ext <<_ACEOF
11630 #line 11630 "configure"
11631 #include "confdefs.h"
11632 $ac_includes_default
11633 int
11634 main ()
11635 {
11636 FILE *f = fopen ("conftest.val", "w");
11637 if (!f)
11638   $ac_main_return (1);
11639 fprintf (f, "%d", (sizeof (signed char)));
11640 fclose (f);
11641   ;
11642   return 0;
11643 }
11644 _ACEOF
11645 rm -f conftest$ac_exeext
11646 if { (eval echo "$as_me:11646: \"$ac_link\"") >&5
11647   (eval $ac_link) 2>&5
11648   ac_status=$?
11649   echo "$as_me:11649: \$? = $ac_status" >&5
11650   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11651   { (eval echo "$as_me:11651: \"$ac_try\"") >&5
11652   (eval $ac_try) 2>&5
11653   ac_status=$?
11654   echo "$as_me:11654: \$? = $ac_status" >&5
11655   (exit $ac_status); }; }; then
11656   ac_cv_sizeof_signed_char=`cat conftest.val`
11657 else
11658   echo "$as_me: program exited with status $ac_status" >&5
11659 echo "$as_me: failed program was:" >&5
11660 cat conftest.$ac_ext >&5
11661 fi
11662 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11663 fi
11664 fi
11665 rm -f conftest.val
11666 else
11667   ac_cv_sizeof_signed_char=0
11668 fi
11669 fi
11670 echo "$as_me:11670: result: $ac_cv_sizeof_signed_char" >&5
11671 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11672 cat >>confdefs.h <<EOF
11673 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11674 EOF
11675
11676 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11677         NCURSES_SBOOL="signed char"
11678 else
11679         NCURSES_SBOOL="char"
11680 fi
11681 echo "$as_me:11681: checking if you want to use signed Boolean array in term.h" >&5
11682 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11683
11684 # Check whether --enable-signed-char or --disable-signed-char was given.
11685 if test "${enable_signed_char+set}" = set; then
11686   enableval="$enable_signed_char"
11687   with_signed_char=$enableval
11688 else
11689   with_signed_char=no
11690 fi;
11691 echo "$as_me:11691: result: $with_signed_char" >&5
11692 echo "${ECHO_T}$with_signed_char" >&6
11693 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11694
11695 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11696 echo "$as_me:11696: checking if you want SIGWINCH handler" >&5
11697 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11698
11699 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11700 if test "${enable_sigwinch+set}" = set; then
11701   enableval="$enable_sigwinch"
11702   with_sigwinch=$enableval
11703 else
11704   with_sigwinch=$with_ext_funcs
11705 fi;
11706 echo "$as_me:11706: result: $with_sigwinch" >&5
11707 echo "${ECHO_T}$with_sigwinch" >&6
11708 test "x$with_sigwinch" = xyes &&
11709 cat >>confdefs.h <<\EOF
11710 #define USE_SIGWINCH 1
11711 EOF
11712
11713 ###   use option --enable-tcap-names to allow user to define new capabilities
11714 echo "$as_me:11714: checking if you want user-definable terminal capabilities like termcap" >&5
11715 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11716
11717 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11718 if test "${enable_tcap_names+set}" = set; then
11719   enableval="$enable_tcap_names"
11720   with_tcap_names=$enableval
11721 else
11722   with_tcap_names=$with_ext_funcs
11723 fi;
11724 echo "$as_me:11724: result: $with_tcap_names" >&5
11725 echo "${ECHO_T}$with_tcap_names" >&6
11726 NCURSES_XNAMES=0
11727 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11728
11729 ###############################################################################
11730 # These options are relatively safe to experiment with.
11731
11732 echo "$as_me:11732: checking if you want all development code" >&5
11733 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11734
11735 # Check whether --with-develop or --without-develop was given.
11736 if test "${with_develop+set}" = set; then
11737   withval="$with_develop"
11738   with_develop=$withval
11739 else
11740   with_develop=no
11741 fi;
11742 echo "$as_me:11742: result: $with_develop" >&5
11743 echo "${ECHO_T}$with_develop" >&6
11744
11745 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11746 echo "$as_me:11746: checking if you want hard-tabs code" >&5
11747 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11748
11749 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11750 if test "${enable_hard_tabs+set}" = set; then
11751   enableval="$enable_hard_tabs"
11752
11753 else
11754   enable_hard_tabs=$with_develop
11755 fi;
11756 echo "$as_me:11756: result: $enable_hard_tabs" >&5
11757 echo "${ECHO_T}$enable_hard_tabs" >&6
11758 test "x$enable_hard_tabs" = xyes &&
11759 cat >>confdefs.h <<\EOF
11760 #define USE_HARD_TABS 1
11761 EOF
11762
11763 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11764 echo "$as_me:11764: checking if you want limited support for xmc" >&5
11765 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11766
11767 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11768 if test "${enable_xmc_glitch+set}" = set; then
11769   enableval="$enable_xmc_glitch"
11770
11771 else
11772   enable_xmc_glitch=$with_develop
11773 fi;
11774 echo "$as_me:11774: result: $enable_xmc_glitch" >&5
11775 echo "${ECHO_T}$enable_xmc_glitch" >&6
11776 test "x$enable_xmc_glitch" = xyes &&
11777 cat >>confdefs.h <<\EOF
11778 #define USE_XMC_SUPPORT 1
11779 EOF
11780
11781 ###############################################################################
11782 # These are just experimental, probably should not be in a package:
11783
11784 echo "$as_me:11784: checking if you do not want to assume colors are white-on-black" >&5
11785 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11786
11787 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11788 if test "${enable_assumed_color+set}" = set; then
11789   enableval="$enable_assumed_color"
11790   with_assumed_color=$enableval
11791 else
11792   with_assumed_color=yes
11793 fi;
11794 echo "$as_me:11794: result: $with_assumed_color" >&5
11795 echo "${ECHO_T}$with_assumed_color" >&6
11796 test "x$with_assumed_color" = xyes &&
11797 cat >>confdefs.h <<\EOF
11798 #define USE_ASSUMED_COLOR 1
11799 EOF
11800
11801 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11802 echo "$as_me:11802: checking if you want hashmap scrolling-optimization code" >&5
11803 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11804
11805 # Check whether --enable-hashmap or --disable-hashmap was given.
11806 if test "${enable_hashmap+set}" = set; then
11807   enableval="$enable_hashmap"
11808   with_hashmap=$enableval
11809 else
11810   with_hashmap=yes
11811 fi;
11812 echo "$as_me:11812: result: $with_hashmap" >&5
11813 echo "${ECHO_T}$with_hashmap" >&6
11814 test "x$with_hashmap" = xyes &&
11815 cat >>confdefs.h <<\EOF
11816 #define USE_HASHMAP 1
11817 EOF
11818
11819 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11820 echo "$as_me:11820: checking if you want colorfgbg code" >&5
11821 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11822
11823 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11824 if test "${enable_colorfgbg+set}" = set; then
11825   enableval="$enable_colorfgbg"
11826   with_colorfgbg=$enableval
11827 else
11828   with_colorfgbg=no
11829 fi;
11830 echo "$as_me:11830: result: $with_colorfgbg" >&5
11831 echo "${ECHO_T}$with_colorfgbg" >&6
11832 test "x$with_colorfgbg" = xyes &&
11833 cat >>confdefs.h <<\EOF
11834 #define USE_COLORFGBG 1
11835 EOF
11836
11837 ###   use option --enable-interop to turn on use of bindings used for interop
11838 echo "$as_me:11838: checking if you want interop bindings" >&5
11839 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11840
11841 # Check whether --enable-interop or --disable-interop was given.
11842 if test "${enable_interop+set}" = set; then
11843   enableval="$enable_interop"
11844   with_exp_interop=$enableval
11845 else
11846   with_exp_interop=no
11847 fi;
11848 echo "$as_me:11848: result: $with_exp_interop" >&5
11849 echo "${ECHO_T}$with_exp_interop" >&6
11850
11851 NCURSES_INTEROP_FUNCS=0
11852 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11853
11854 # This is still experimental (20080329), but should ultimately be moved to
11855 # the script-block --with-normal, etc.
11856
11857 echo "$as_me:11857: checking if you want to link with the pthread library" >&5
11858 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11859
11860 # Check whether --with-pthread or --without-pthread was given.
11861 if test "${with_pthread+set}" = set; then
11862   withval="$with_pthread"
11863   with_pthread=$withval
11864 else
11865   with_pthread=no
11866 fi;
11867 echo "$as_me:11867: result: $with_pthread" >&5
11868 echo "${ECHO_T}$with_pthread" >&6
11869
11870 if test "$with_pthread" != no ; then
11871     echo "$as_me:11871: checking for pthread.h" >&5
11872 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11873 if test "${ac_cv_header_pthread_h+set}" = set; then
11874   echo $ECHO_N "(cached) $ECHO_C" >&6
11875 else
11876   cat >conftest.$ac_ext <<_ACEOF
11877 #line 11877 "configure"
11878 #include "confdefs.h"
11879 #include <pthread.h>
11880 _ACEOF
11881 if { (eval echo "$as_me:11881: \"$ac_cpp conftest.$ac_ext\"") >&5
11882   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11883   ac_status=$?
11884   egrep -v '^ *\+' conftest.er1 >conftest.err
11885   rm -f conftest.er1
11886   cat conftest.err >&5
11887   echo "$as_me:11887: \$? = $ac_status" >&5
11888   (exit $ac_status); } >/dev/null; then
11889   if test -s conftest.err; then
11890     ac_cpp_err=$ac_c_preproc_warn_flag
11891   else
11892     ac_cpp_err=
11893   fi
11894 else
11895   ac_cpp_err=yes
11896 fi
11897 if test -z "$ac_cpp_err"; then
11898   ac_cv_header_pthread_h=yes
11899 else
11900   echo "$as_me: failed program was:" >&5
11901   cat conftest.$ac_ext >&5
11902   ac_cv_header_pthread_h=no
11903 fi
11904 rm -f conftest.err conftest.$ac_ext
11905 fi
11906 echo "$as_me:11906: result: $ac_cv_header_pthread_h" >&5
11907 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11908 if test $ac_cv_header_pthread_h = yes; then
11909
11910 cat >>confdefs.h <<\EOF
11911 #define HAVE_PTHREADS_H 1
11912 EOF
11913
11914         for cf_lib_pthread in pthread c_r
11915         do
11916             echo "$as_me:11916: checking if we can link with the $cf_lib_pthread library" >&5
11917 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11918             cf_save_LIBS="$LIBS"
11919
11920 cf_add_libs="-l$cf_lib_pthread"
11921 # Filter out duplicates - this happens with badly-designed ".pc" files...
11922 for cf_add_1lib in $LIBS
11923 do
11924         for cf_add_2lib in $cf_add_libs
11925         do
11926                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11927                 then
11928                         cf_add_1lib=
11929                         break
11930                 fi
11931         done
11932         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11933 done
11934 LIBS="$cf_add_libs"
11935
11936             cat >conftest.$ac_ext <<_ACEOF
11937 #line 11937 "configure"
11938 #include "confdefs.h"
11939
11940 #include <pthread.h>
11941
11942 int
11943 main ()
11944 {
11945
11946                 int rc = pthread_create(0,0,0,0);
11947                 int r2 = pthread_mutexattr_settype(0, 0);
11948
11949   ;
11950   return 0;
11951 }
11952 _ACEOF
11953 rm -f conftest.$ac_objext conftest$ac_exeext
11954 if { (eval echo "$as_me:11954: \"$ac_link\"") >&5
11955   (eval $ac_link) 2>&5
11956   ac_status=$?
11957   echo "$as_me:11957: \$? = $ac_status" >&5
11958   (exit $ac_status); } &&
11959          { ac_try='test -s conftest$ac_exeext'
11960   { (eval echo "$as_me:11960: \"$ac_try\"") >&5
11961   (eval $ac_try) 2>&5
11962   ac_status=$?
11963   echo "$as_me:11963: \$? = $ac_status" >&5
11964   (exit $ac_status); }; }; then
11965   with_pthread=yes
11966 else
11967   echo "$as_me: failed program was:" >&5
11968 cat conftest.$ac_ext >&5
11969 with_pthread=no
11970 fi
11971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11972             LIBS="$cf_save_LIBS"
11973             echo "$as_me:11973: result: $with_pthread" >&5
11974 echo "${ECHO_T}$with_pthread" >&6
11975             test "$with_pthread" = yes && break
11976         done
11977
11978         if test "$with_pthread" = yes ; then
11979
11980 cf_add_libs="-l$cf_lib_pthread"
11981 # Filter out duplicates - this happens with badly-designed ".pc" files...
11982 for cf_add_1lib in $LIBS
11983 do
11984         for cf_add_2lib in $cf_add_libs
11985         do
11986                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11987                 then
11988                         cf_add_1lib=
11989                         break
11990                 fi
11991         done
11992         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11993 done
11994 LIBS="$cf_add_libs"
11995
11996 cat >>confdefs.h <<\EOF
11997 #define HAVE_LIBPTHREADS 1
11998 EOF
11999
12000         else
12001             { { echo "$as_me:12001: error: Cannot link with pthread library" >&5
12002 echo "$as_me: error: Cannot link with pthread library" >&2;}
12003    { (exit 1); exit 1; }; }
12004         fi
12005
12006 fi
12007
12008 fi
12009
12010 if test "x$with_pthread" != xno; then
12011         echo "$as_me:12011: checking for pthread_kill" >&5
12012 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12013 if test "${ac_cv_func_pthread_kill+set}" = set; then
12014   echo $ECHO_N "(cached) $ECHO_C" >&6
12015 else
12016   cat >conftest.$ac_ext <<_ACEOF
12017 #line 12017 "configure"
12018 #include "confdefs.h"
12019 /* System header to define __stub macros and hopefully few prototypes,
12020     which can conflict with char pthread_kill (); below.  */
12021 #include <assert.h>
12022 /* Override any gcc2 internal prototype to avoid an error.  */
12023 #ifdef __cplusplus
12024 extern "C"
12025 #endif
12026 /* We use char because int might match the return type of a gcc2
12027    builtin and then its argument prototype would still apply.  */
12028 char pthread_kill ();
12029 char (*f) ();
12030
12031 int
12032 main ()
12033 {
12034 /* The GNU C library defines this for functions which it implements
12035     to always fail with ENOSYS.  Some functions are actually named
12036     something starting with __ and the normal name is an alias.  */
12037 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12038 choke me
12039 #else
12040 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12041 #endif
12042
12043   ;
12044   return 0;
12045 }
12046 _ACEOF
12047 rm -f conftest.$ac_objext conftest$ac_exeext
12048 if { (eval echo "$as_me:12048: \"$ac_link\"") >&5
12049   (eval $ac_link) 2>&5
12050   ac_status=$?
12051   echo "$as_me:12051: \$? = $ac_status" >&5
12052   (exit $ac_status); } &&
12053          { ac_try='test -s conftest$ac_exeext'
12054   { (eval echo "$as_me:12054: \"$ac_try\"") >&5
12055   (eval $ac_try) 2>&5
12056   ac_status=$?
12057   echo "$as_me:12057: \$? = $ac_status" >&5
12058   (exit $ac_status); }; }; then
12059   ac_cv_func_pthread_kill=yes
12060 else
12061   echo "$as_me: failed program was:" >&5
12062 cat conftest.$ac_ext >&5
12063 ac_cv_func_pthread_kill=no
12064 fi
12065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12066 fi
12067 echo "$as_me:12067: result: $ac_cv_func_pthread_kill" >&5
12068 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12069 if test $ac_cv_func_pthread_kill = yes; then
12070
12071                 echo "$as_me:12071: checking if you want to allow EINTR in wgetch with pthreads" >&5
12072 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12073
12074 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12075 if test "${enable_pthreads_eintr+set}" = set; then
12076   enableval="$enable_pthreads_eintr"
12077   use_pthreads_eintr=$enableval
12078 else
12079   use_pthreads_eintr=no
12080 fi;
12081                 echo "$as_me:12081: result: $use_pthreads_eintr" >&5
12082 echo "${ECHO_T}$use_pthreads_eintr" >&6
12083                 if test "x$use_pthreads_eintr" = xyes ; then
12084
12085 cat >>confdefs.h <<\EOF
12086 #define USE_PTHREADS_EINTR 1
12087 EOF
12088
12089                 fi
12090 fi
12091
12092         echo "$as_me:12092: checking if you want to use weak-symbols for pthreads" >&5
12093 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12094
12095 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12096 if test "${enable_weak_symbols+set}" = set; then
12097   enableval="$enable_weak_symbols"
12098   use_weak_symbols=$enableval
12099 else
12100   use_weak_symbols=no
12101 fi;
12102         echo "$as_me:12102: result: $use_weak_symbols" >&5
12103 echo "${ECHO_T}$use_weak_symbols" >&6
12104         if test "x$use_weak_symbols" = xyes ; then
12105
12106 echo "$as_me:12106: checking if $CC supports weak symbols" >&5
12107 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12108 if test "${cf_cv_weak_symbols+set}" = set; then
12109   echo $ECHO_N "(cached) $ECHO_C" >&6
12110 else
12111
12112 cat >conftest.$ac_ext <<_ACEOF
12113 #line 12113 "configure"
12114 #include "confdefs.h"
12115
12116 #include <stdio.h>
12117 int
12118 main ()
12119 {
12120
12121 #if defined(__GNUC__)
12122 #  if defined __USE_ISOC99
12123 #    define _cat_pragma(exp)    _Pragma(#exp)
12124 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12125 #  else
12126 #    define _weak_pragma(exp)
12127 #  endif
12128 #  define _declare(name)        __extension__ extern __typeof__(name) name
12129 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12130 #endif
12131
12132 weak_symbol(fopen);
12133
12134   ;
12135   return 0;
12136 }
12137 _ACEOF
12138 rm -f conftest.$ac_objext
12139 if { (eval echo "$as_me:12139: \"$ac_compile\"") >&5
12140   (eval $ac_compile) 2>&5
12141   ac_status=$?
12142   echo "$as_me:12142: \$? = $ac_status" >&5
12143   (exit $ac_status); } &&
12144          { ac_try='test -s conftest.$ac_objext'
12145   { (eval echo "$as_me:12145: \"$ac_try\"") >&5
12146   (eval $ac_try) 2>&5
12147   ac_status=$?
12148   echo "$as_me:12148: \$? = $ac_status" >&5
12149   (exit $ac_status); }; }; then
12150   cf_cv_weak_symbols=yes
12151 else
12152   echo "$as_me: failed program was:" >&5
12153 cat conftest.$ac_ext >&5
12154 cf_cv_weak_symbols=no
12155 fi
12156 rm -f conftest.$ac_objext conftest.$ac_ext
12157
12158 fi
12159 echo "$as_me:12159: result: $cf_cv_weak_symbols" >&5
12160 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12161
12162         else
12163                 cf_cv_weak_symbols=no
12164         fi
12165
12166         if test "x$cf_cv_weak_symbols" = xyes ; then
12167
12168 cat >>confdefs.h <<\EOF
12169 #define USE_WEAK_SYMBOLS 1
12170 EOF
12171
12172         fi
12173 fi
12174
12175 PTHREAD=
12176 if test "x$with_pthread" = "xyes" ; then
12177
12178 cat >>confdefs.h <<\EOF
12179 #define USE_PTHREADS 1
12180 EOF
12181
12182     enable_reentrant=yes
12183     if test "x$cf_cv_weak_symbols" = xyes ; then
12184         PTHREAD=-lpthread
12185     fi
12186 fi
12187
12188 # Reentrant code has to be opaque; there's little advantage to making ncurses
12189 # opaque outside of that, so there is no --enable-opaque option.  We can use
12190 # this option without --with-pthreads, but this will be always set for
12191 # pthreads.
12192 echo "$as_me:12192: checking if you want experimental reentrant code" >&5
12193 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12194
12195 # Check whether --enable-reentrant or --disable-reentrant was given.
12196 if test "${enable_reentrant+set}" = set; then
12197   enableval="$enable_reentrant"
12198   with_reentrant=$enableval
12199 else
12200   with_reentrant=no
12201 fi;
12202 echo "$as_me:12202: result: $with_reentrant" >&5
12203 echo "${ECHO_T}$with_reentrant" >&6
12204 if test "x$with_reentrant" = xyes ; then
12205         cf_cv_enable_reentrant=1
12206         cf_cv_enable_opaque="NCURSES_INTERNALS"
12207         NCURSES_OPAQUE=1
12208         NCURSES_SIZE_T=int
12209         if test "x$cf_cv_weak_symbols" = xyes ; then
12210
12211 # remove pthread library from $LIBS
12212 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12213
12214 cf_add_libs="-lpthread"
12215 # Filter out duplicates - this happens with badly-designed ".pc" files...
12216 for cf_add_1lib in $TEST_LIBS
12217 do
12218         for cf_add_2lib in $cf_add_libs
12219         do
12220                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12221                 then
12222                         cf_add_1lib=
12223                         break
12224                 fi
12225         done
12226         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12227 done
12228 TEST_LIBS="$cf_add_libs"
12229
12230 cf_add_libs="-lpthread"
12231 # Filter out duplicates - this happens with badly-designed ".pc" files...
12232 for cf_add_1lib in $TEST_LIBS2
12233 do
12234         for cf_add_2lib in $cf_add_libs
12235         do
12236                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12237                 then
12238                         cf_add_1lib=
12239                         break
12240                 fi
12241         done
12242         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12243 done
12244 TEST_LIBS2="$cf_add_libs"
12245
12246         else
12247                 # when not using weak symbols but with_reentrant,
12248                 # add 't' to the library suffix on all platforms
12249                 # except cygwin, where we only do that if ALSO
12250                 # compiling with full thread support.
12251                 case "$host" in
12252                 *cygwin* | *msys*) #(vi
12253                         if test "$with_pthread" = "yes" ; then
12254                                 if test "x$disable_lib_suffixes" = "xno" ; then
12255                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12256                                 fi
12257                         fi ;;
12258                 *)
12259                         if test "x$disable_lib_suffixes" = "xno" ; then
12260                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12261                         fi
12262                         ;;
12263                 esac
12264         fi
12265
12266 cat >>confdefs.h <<\EOF
12267 #define USE_REENTRANT 1
12268 EOF
12269
12270 if test "${with_abi_version+set}" != set; then
12271         case $cf_cv_rel_version in
12272         5.*)
12273                 cf_cv_rel_version=6.0
12274                 cf_cv_abi_version=6
12275                 { echo "$as_me:12275: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12276 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12277                 ;;
12278         esac
12279 fi
12280
12281 else
12282         cf_cv_enable_reentrant=0
12283         cf_cv_enable_opaque="NCURSES_OPAQUE"
12284         NCURSES_OPAQUE=0
12285         NCURSES_SIZE_T=short
12286 fi
12287
12288 ### Allow using a different wrap-prefix
12289 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12290         echo "$as_me:12290: checking for prefix used to wrap public variables" >&5
12291 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12292
12293 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12294 if test "${with_wrap_prefix+set}" = set; then
12295   withval="$with_wrap_prefix"
12296   NCURSES_WRAP_PREFIX=$withval
12297 else
12298   NCURSES_WRAP_PREFIX=_nc_
12299 fi;
12300         echo "$as_me:12300: result: $NCURSES_WRAP_PREFIX" >&5
12301 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12302 else
12303         NCURSES_WRAP_PREFIX=_nc_
12304 fi
12305
12306 cat >>confdefs.h <<EOF
12307 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12308 EOF
12309
12310 echo "$as_me:12310: checking if you want experimental safe-sprintf code" >&5
12311 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12312
12313 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12314 if test "${enable_safe_sprintf+set}" = set; then
12315   enableval="$enable_safe_sprintf"
12316   with_safe_sprintf=$enableval
12317 else
12318   with_safe_sprintf=no
12319 fi;
12320 echo "$as_me:12320: result: $with_safe_sprintf" >&5
12321 echo "${ECHO_T}$with_safe_sprintf" >&6
12322 test "x$with_safe_sprintf" = xyes &&
12323 cat >>confdefs.h <<\EOF
12324 #define USE_SAFE_SPRINTF 1
12325 EOF
12326
12327 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12328 # when hashmap is used scroll hints are useless
12329 if test "$with_hashmap" = no ; then
12330 echo "$as_me:12330: checking if you want to experiment without scrolling-hints code" >&5
12331 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12332
12333 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12334 if test "${enable_scroll_hints+set}" = set; then
12335   enableval="$enable_scroll_hints"
12336   with_scroll_hints=$enableval
12337 else
12338   with_scroll_hints=yes
12339 fi;
12340 echo "$as_me:12340: result: $with_scroll_hints" >&5
12341 echo "${ECHO_T}$with_scroll_hints" >&6
12342 test "x$with_scroll_hints" = xyes &&
12343 cat >>confdefs.h <<\EOF
12344 #define USE_SCROLL_HINTS 1
12345 EOF
12346
12347 fi
12348
12349 echo "$as_me:12349: checking if you want experimental wgetch-events code" >&5
12350 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12351
12352 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12353 if test "${enable_wgetch_events+set}" = set; then
12354   enableval="$enable_wgetch_events"
12355   with_wgetch_events=$enableval
12356 else
12357   with_wgetch_events=no
12358 fi;
12359 echo "$as_me:12359: result: $with_wgetch_events" >&5
12360 echo "${ECHO_T}$with_wgetch_events" >&6
12361 test "x$with_wgetch_events" = xyes &&
12362 cat >>confdefs.h <<\EOF
12363 #define NCURSES_WGETCH_EVENTS 1
12364 EOF
12365
12366 ###############################################################################
12367
12368 ###     use option --disable-echo to suppress full display compiling commands
12369
12370 echo "$as_me:12370: checking if you want to see long compiling messages" >&5
12371 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12372
12373 # Check whether --enable-echo or --disable-echo was given.
12374 if test "${enable_echo+set}" = set; then
12375   enableval="$enable_echo"
12376   test "$enableval" != no && enableval=yes
12377   if test "$enableval" != "yes" ; then
12378
12379     ECHO_LT='--silent'
12380     ECHO_LD='@echo linking $@;'
12381     RULE_CC='@echo compiling $<'
12382     SHOW_CC='@echo compiling $@'
12383     ECHO_CC='@'
12384
12385   else
12386
12387     ECHO_LT=''
12388     ECHO_LD=''
12389     RULE_CC=''
12390     SHOW_CC=''
12391     ECHO_CC=''
12392
12393   fi
12394 else
12395   enableval=yes
12396
12397     ECHO_LT=''
12398     ECHO_LD=''
12399     RULE_CC=''
12400     SHOW_CC=''
12401     ECHO_CC=''
12402
12403 fi;
12404 echo "$as_me:12404: result: $enableval" >&5
12405 echo "${ECHO_T}$enableval" >&6
12406
12407 if test "x$enable_echo" = xyes; then
12408         ECHO_LINK=
12409 else
12410         ECHO_LINK='@ echo linking $@ ... ;'
12411         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12412         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12413 fi
12414
12415 ###     use option --enable-warnings to turn on all gcc warnings
12416 echo "$as_me:12416: checking if you want to see compiler warnings" >&5
12417 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12418
12419 # Check whether --enable-warnings or --disable-warnings was given.
12420 if test "${enable_warnings+set}" = set; then
12421   enableval="$enable_warnings"
12422   with_warnings=$enableval
12423 fi;
12424 echo "$as_me:12424: result: $with_warnings" >&5
12425 echo "${ECHO_T}$with_warnings" >&6
12426
12427 if test "x$with_warnings" = "xyes"; then
12428
12429         ADAFLAGS="$ADAFLAGS -gnatg"
12430
12431 INTEL_COMPILER=no
12432
12433 if test "$GCC" = yes ; then
12434         case $host_os in
12435         linux*|gnu*)
12436                 echo "$as_me:12436: checking if this is really Intel C compiler" >&5
12437 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12438                 cf_save_CFLAGS="$CFLAGS"
12439                 CFLAGS="$CFLAGS -no-gcc"
12440                 cat >conftest.$ac_ext <<_ACEOF
12441 #line 12441 "configure"
12442 #include "confdefs.h"
12443
12444 int
12445 main ()
12446 {
12447
12448 #ifdef __INTEL_COMPILER
12449 #else
12450 make an error
12451 #endif
12452
12453   ;
12454   return 0;
12455 }
12456 _ACEOF
12457 rm -f conftest.$ac_objext
12458 if { (eval echo "$as_me:12458: \"$ac_compile\"") >&5
12459   (eval $ac_compile) 2>&5
12460   ac_status=$?
12461   echo "$as_me:12461: \$? = $ac_status" >&5
12462   (exit $ac_status); } &&
12463          { ac_try='test -s conftest.$ac_objext'
12464   { (eval echo "$as_me:12464: \"$ac_try\"") >&5
12465   (eval $ac_try) 2>&5
12466   ac_status=$?
12467   echo "$as_me:12467: \$? = $ac_status" >&5
12468   (exit $ac_status); }; }; then
12469   INTEL_COMPILER=yes
12470 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12471
12472 else
12473   echo "$as_me: failed program was:" >&5
12474 cat conftest.$ac_ext >&5
12475 fi
12476 rm -f conftest.$ac_objext conftest.$ac_ext
12477                 CFLAGS="$cf_save_CFLAGS"
12478                 echo "$as_me:12478: result: $INTEL_COMPILER" >&5
12479 echo "${ECHO_T}$INTEL_COMPILER" >&6
12480                 ;;
12481         esac
12482 fi
12483
12484 CLANG_COMPILER=no
12485
12486 if test "$GCC" = yes ; then
12487         echo "$as_me:12487: checking if this is really Clang C compiler" >&5
12488 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12489         cf_save_CFLAGS="$CFLAGS"
12490         CFLAGS="$CFLAGS -Qunused-arguments"
12491         cat >conftest.$ac_ext <<_ACEOF
12492 #line 12492 "configure"
12493 #include "confdefs.h"
12494
12495 int
12496 main ()
12497 {
12498
12499 #ifdef __clang__
12500 #else
12501 make an error
12502 #endif
12503
12504   ;
12505   return 0;
12506 }
12507 _ACEOF
12508 rm -f conftest.$ac_objext
12509 if { (eval echo "$as_me:12509: \"$ac_compile\"") >&5
12510   (eval $ac_compile) 2>&5
12511   ac_status=$?
12512   echo "$as_me:12512: \$? = $ac_status" >&5
12513   (exit $ac_status); } &&
12514          { ac_try='test -s conftest.$ac_objext'
12515   { (eval echo "$as_me:12515: \"$ac_try\"") >&5
12516   (eval $ac_try) 2>&5
12517   ac_status=$?
12518   echo "$as_me:12518: \$? = $ac_status" >&5
12519   (exit $ac_status); }; }; then
12520   CLANG_COMPILER=yes
12521 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12522
12523 else
12524   echo "$as_me: failed program was:" >&5
12525 cat conftest.$ac_ext >&5
12526 fi
12527 rm -f conftest.$ac_objext conftest.$ac_ext
12528         CFLAGS="$cf_save_CFLAGS"
12529         echo "$as_me:12529: result: $CLANG_COMPILER" >&5
12530 echo "${ECHO_T}$CLANG_COMPILER" >&6
12531 fi
12532
12533 cat > conftest.$ac_ext <<EOF
12534 #line 12534 "${as_me:-configure}"
12535 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12536 EOF
12537
12538 if test "$INTEL_COMPILER" = yes
12539 then
12540 # The "-wdXXX" options suppress warnings:
12541 # remark #1419: external declaration in primary source file
12542 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12543 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12544 # remark #193: zero used for undefined preprocessing identifier
12545 # remark #593: variable "curs_sb_left_arrow" was set but never used
12546 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12547 # remark #869: parameter "tw" was never referenced
12548 # remark #981: operands are evaluated in unspecified order
12549 # warning #279: controlling expression is constant
12550
12551         { echo "$as_me:12551: checking for $CC warning options..." >&5
12552 echo "$as_me: checking for $CC warning options..." >&6;}
12553         cf_save_CFLAGS="$CFLAGS"
12554         EXTRA_CFLAGS="-Wall"
12555         for cf_opt in \
12556                 wd1419 \
12557                 wd1683 \
12558                 wd1684 \
12559                 wd193 \
12560                 wd593 \
12561                 wd279 \
12562                 wd810 \
12563                 wd869 \
12564                 wd981
12565         do
12566                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12567                 if { (eval echo "$as_me:12567: \"$ac_compile\"") >&5
12568   (eval $ac_compile) 2>&5
12569   ac_status=$?
12570   echo "$as_me:12570: \$? = $ac_status" >&5
12571   (exit $ac_status); }; then
12572                         test -n "$verbose" && echo "$as_me:12572: result: ... -$cf_opt" >&5
12573 echo "${ECHO_T}... -$cf_opt" >&6
12574                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12575                 fi
12576         done
12577         CFLAGS="$cf_save_CFLAGS"
12578
12579 elif test "$GCC" = yes
12580 then
12581         { echo "$as_me:12581: checking for $CC warning options..." >&5
12582 echo "$as_me: checking for $CC warning options..." >&6;}
12583         cf_save_CFLAGS="$CFLAGS"
12584         EXTRA_CFLAGS=
12585         cf_warn_CONST=""
12586         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12587         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12588         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12589         for cf_opt in W Wall \
12590                 Wbad-function-cast \
12591                 Wcast-align \
12592                 Wcast-qual \
12593                 Wdeclaration-after-statement \
12594                 Wextra \
12595                 Winline \
12596                 Wmissing-declarations \
12597                 Wmissing-prototypes \
12598                 Wnested-externs \
12599                 Wpointer-arith \
12600                 Wshadow \
12601                 Wstrict-prototypes \
12602                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12603         do
12604                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12605                 if { (eval echo "$as_me:12605: \"$ac_compile\"") >&5
12606   (eval $ac_compile) 2>&5
12607   ac_status=$?
12608   echo "$as_me:12608: \$? = $ac_status" >&5
12609   (exit $ac_status); }; then
12610                         test -n "$verbose" && echo "$as_me:12610: result: ... -$cf_opt" >&5
12611 echo "${ECHO_T}... -$cf_opt" >&6
12612                         case $cf_opt in #(vi
12613                         Wcast-qual) #(vi
12614                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12615                                 ;;
12616                         Winline) #(vi
12617                                 case $GCC_VERSION in
12618                                 [34].*)
12619                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12620
12621 echo "${as_me:-configure}:12621: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12622
12623                                         continue;;
12624                                 esac
12625                                 ;;
12626                         Wpointer-arith) #(vi
12627                                 case $GCC_VERSION in
12628                                 [12].*)
12629                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12630
12631 echo "${as_me:-configure}:12631: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12632
12633                                         continue;;
12634                                 esac
12635                                 ;;
12636                         esac
12637                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12638                 fi
12639         done
12640         CFLAGS="$cf_save_CFLAGS"
12641 fi
12642 rm -rf conftest*
12643
12644         if test "x$cf_with_cxx" = xyes ; then
12645
12646 INTEL_CPLUSPLUS=no
12647
12648 if test "$GCC" = yes ; then
12649         case $host_os in
12650         linux*|gnu*)
12651                 echo "$as_me:12651: checking if this is really Intel C++ compiler" >&5
12652 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12653                 cf_save_CFLAGS="$CXXFLAGS"
12654                 CXXFLAGS="$CXXFLAGS -no-gcc"
12655                 cat >conftest.$ac_ext <<_ACEOF
12656 #line 12656 "configure"
12657 #include "confdefs.h"
12658
12659 int
12660 main ()
12661 {
12662
12663 #ifdef __INTEL_COMPILER
12664 #else
12665 make an error
12666 #endif
12667
12668   ;
12669   return 0;
12670 }
12671 _ACEOF
12672 rm -f conftest.$ac_objext
12673 if { (eval echo "$as_me:12673: \"$ac_compile\"") >&5
12674   (eval $ac_compile) 2>&5
12675   ac_status=$?
12676   echo "$as_me:12676: \$? = $ac_status" >&5
12677   (exit $ac_status); } &&
12678          { ac_try='test -s conftest.$ac_objext'
12679   { (eval echo "$as_me:12679: \"$ac_try\"") >&5
12680   (eval $ac_try) 2>&5
12681   ac_status=$?
12682   echo "$as_me:12682: \$? = $ac_status" >&5
12683   (exit $ac_status); }; }; then
12684   INTEL_CPLUSPLUS=yes
12685 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12686
12687 else
12688   echo "$as_me: failed program was:" >&5
12689 cat conftest.$ac_ext >&5
12690 fi
12691 rm -f conftest.$ac_objext conftest.$ac_ext
12692                 CXXFLAGS="$cf_save_CFLAGS"
12693                 echo "$as_me:12693: result: $INTEL_CPLUSPLUS" >&5
12694 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12695                 ;;
12696         esac
12697 fi
12698
12699 CLANG_CPLUSPLUS=no
12700
12701 if test "$GCC" = yes ; then
12702         echo "$as_me:12702: checking if this is really Clang C++ compiler" >&5
12703 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12704         cf_save_CFLAGS="$CXXFLAGS"
12705         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12706         cat >conftest.$ac_ext <<_ACEOF
12707 #line 12707 "configure"
12708 #include "confdefs.h"
12709
12710 int
12711 main ()
12712 {
12713
12714 #ifdef __clang__
12715 #else
12716 make an error
12717 #endif
12718
12719   ;
12720   return 0;
12721 }
12722 _ACEOF
12723 rm -f conftest.$ac_objext
12724 if { (eval echo "$as_me:12724: \"$ac_compile\"") >&5
12725   (eval $ac_compile) 2>&5
12726   ac_status=$?
12727   echo "$as_me:12727: \$? = $ac_status" >&5
12728   (exit $ac_status); } &&
12729          { ac_try='test -s conftest.$ac_objext'
12730   { (eval echo "$as_me:12730: \"$ac_try\"") >&5
12731   (eval $ac_try) 2>&5
12732   ac_status=$?
12733   echo "$as_me:12733: \$? = $ac_status" >&5
12734   (exit $ac_status); }; }; then
12735   CLANG_CPLUSPLUS=yes
12736 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12737
12738 else
12739   echo "$as_me: failed program was:" >&5
12740 cat conftest.$ac_ext >&5
12741 fi
12742 rm -f conftest.$ac_objext conftest.$ac_ext
12743         CXXFLAGS="$cf_save_CFLAGS"
12744         echo "$as_me:12744: result: $CLANG_CPLUSPLUS" >&5
12745 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12746 fi
12747
12748 ac_ext=cc
12749 ac_cpp='$CXXCPP $CPPFLAGS'
12750 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12751 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12752 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12753 ac_main_return=return
12754
12755 cat > conftest.$ac_ext <<EOF
12756 #line 12756 "configure"
12757 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12758 EOF
12759
12760 if test "$INTEL_CPLUSPLUS" = yes
12761 then
12762 # The "-wdXXX" options suppress warnings:
12763 # remark #1419: external declaration in primary source file
12764 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12765 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12766 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12767 # remark #193: zero used for undefined preprocessing identifier
12768 # remark #593: variable "curs_sb_left_arrow" was set but never used
12769 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12770 # remark #869: parameter "tw" was never referenced
12771 # remark #981: operands are evaluated in unspecified order
12772 # warning #269: invalid format string conversion
12773
12774         { echo "$as_me:12774: checking for $CC warning options..." >&5
12775 echo "$as_me: checking for $CC warning options..." >&6;}
12776         cf_save_CXXFLAGS="$CXXFLAGS"
12777         EXTRA_CXXFLAGS="-Wall"
12778         for cf_opt in \
12779                 wd1419 \
12780                 wd1682 \
12781                 wd1683 \
12782                 wd1684 \
12783                 wd193 \
12784                 wd279 \
12785                 wd593 \
12786                 wd810 \
12787                 wd869 \
12788                 wd981
12789         do
12790                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12791                 if { (eval echo "$as_me:12791: \"$ac_compile\"") >&5
12792   (eval $ac_compile) 2>&5
12793   ac_status=$?
12794   echo "$as_me:12794: \$? = $ac_status" >&5
12795   (exit $ac_status); }; then
12796                         test -n "$verbose" && echo "$as_me:12796: result: ... -$cf_opt" >&5
12797 echo "${ECHO_T}... -$cf_opt" >&6
12798                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12799                 fi
12800         done
12801         CXXFLAGS="$cf_save_CXXFLAGS"
12802
12803 elif test "$GXX" = yes
12804 then
12805         { echo "$as_me:12805: checking for $CXX warning options..." >&5
12806 echo "$as_me: checking for $CXX warning options..." >&6;}
12807         cf_save_CXXFLAGS="$CXXFLAGS"
12808         EXTRA_CXXFLAGS="-W -Wall"
12809         cf_gxx_extra_warnings=""
12810         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12811         case "$GCC_VERSION" in
12812         [1-2].*)
12813                 ;;
12814         *)
12815                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12816                 ;;
12817         esac
12818         for cf_opt in \
12819                 Wabi \
12820                 fabi-version=0 \
12821                 Wextra \
12822                 Wignored-qualifiers \
12823                 Wlogical-op \
12824                 Woverloaded-virtual \
12825                 Wsign-promo \
12826                 Wsynth \
12827                 Wold-style-cast \
12828                 Wcast-align \
12829                 Wcast-qual \
12830                 Wpointer-arith \
12831                 Wshadow \
12832                 Wundef $cf_gxx_extra_warnings Wno-unused
12833         do
12834                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12835                 if { (eval echo "$as_me:12835: \"$ac_compile\"") >&5
12836   (eval $ac_compile) 2>&5
12837   ac_status=$?
12838   echo "$as_me:12838: \$? = $ac_status" >&5
12839   (exit $ac_status); }; then
12840                         test -n "$verbose" && echo "$as_me:12840: result: ... -$cf_opt" >&5
12841 echo "${ECHO_T}... -$cf_opt" >&6
12842                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12843                 else
12844                         test -n "$verbose" && echo "$as_me:12844: result: ... no -$cf_opt" >&5
12845 echo "${ECHO_T}... no -$cf_opt" >&6
12846                 fi
12847         done
12848         CXXFLAGS="$cf_save_CXXFLAGS"
12849 fi
12850
12851 rm -rf conftest*
12852 ac_ext=c
12853 ac_cpp='$CPP $CPPFLAGS'
12854 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12855 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12856 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12857 ac_main_return=return
12858
12859         fi
12860 fi
12861
12862 if test "$GCC" = yes
12863 then
12864 cat > conftest.i <<EOF
12865 #ifndef GCC_PRINTF
12866 #define GCC_PRINTF 0
12867 #endif
12868 #ifndef GCC_SCANF
12869 #define GCC_SCANF 0
12870 #endif
12871 #ifndef GCC_NORETURN
12872 #define GCC_NORETURN /* nothing */
12873 #endif
12874 #ifndef GCC_UNUSED
12875 #define GCC_UNUSED /* nothing */
12876 #endif
12877 EOF
12878 if test "$GCC" = yes
12879 then
12880         { echo "$as_me:12880: checking for $CC __attribute__ directives..." >&5
12881 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12882 cat > conftest.$ac_ext <<EOF
12883 #line 12883 "${as_me:-configure}"
12884 #include "confdefs.h"
12885 #include "conftest.h"
12886 #include "conftest.i"
12887 #if     GCC_PRINTF
12888 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12889 #else
12890 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12891 #endif
12892 #if     GCC_SCANF
12893 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12894 #else
12895 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12896 #endif
12897 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12898 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12899 extern void foo(void) GCC_NORETURN;
12900 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12901 EOF
12902         cf_printf_attribute=no
12903         cf_scanf_attribute=no
12904         for cf_attribute in scanf printf unused noreturn
12905         do
12906
12907 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12908
12909                 cf_directive="__attribute__(($cf_attribute))"
12910                 echo "checking for $CC $cf_directive" 1>&5
12911
12912                 case $cf_attribute in #(vi
12913                 printf) #(vi
12914                         cf_printf_attribute=yes
12915                         cat >conftest.h <<EOF
12916 #define GCC_$cf_ATTRIBUTE 1
12917 EOF
12918                         ;;
12919                 scanf) #(vi
12920                         cf_scanf_attribute=yes
12921                         cat >conftest.h <<EOF
12922 #define GCC_$cf_ATTRIBUTE 1
12923 EOF
12924                         ;;
12925                 *) #(vi
12926                         cat >conftest.h <<EOF
12927 #define GCC_$cf_ATTRIBUTE $cf_directive
12928 EOF
12929                         ;;
12930                 esac
12931
12932                 if { (eval echo "$as_me:12932: \"$ac_compile\"") >&5
12933   (eval $ac_compile) 2>&5
12934   ac_status=$?
12935   echo "$as_me:12935: \$? = $ac_status" >&5
12936   (exit $ac_status); }; then
12937                         test -n "$verbose" && echo "$as_me:12937: result: ... $cf_attribute" >&5
12938 echo "${ECHO_T}... $cf_attribute" >&6
12939                         cat conftest.h >>confdefs.h
12940                         case $cf_attribute in #(vi
12941                         noreturn) #(vi
12942
12943 cat >>confdefs.h <<EOF
12944 #define GCC_NORETURN $cf_directive
12945 EOF
12946
12947                                 ;;
12948                         printf) #(vi
12949                                 cf_value='/* nothing */'
12950                                 if test "$cf_printf_attribute" != no ; then
12951                                         cf_value='__attribute__((format(printf,fmt,var)))'
12952
12953 cat >>confdefs.h <<\EOF
12954 #define GCC_PRINTF 1
12955 EOF
12956
12957                                 fi
12958
12959 cat >>confdefs.h <<EOF
12960 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12961 EOF
12962
12963                                 ;;
12964                         scanf) #(vi
12965                                 cf_value='/* nothing */'
12966                                 if test "$cf_scanf_attribute" != no ; then
12967                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12968
12969 cat >>confdefs.h <<\EOF
12970 #define GCC_SCANF 1
12971 EOF
12972
12973                                 fi
12974
12975 cat >>confdefs.h <<EOF
12976 #define GCC_SCANFLIKE(fmt,var) $cf_value
12977 EOF
12978
12979                                 ;;
12980                         unused) #(vi
12981
12982 cat >>confdefs.h <<EOF
12983 #define GCC_UNUSED $cf_directive
12984 EOF
12985
12986                                 ;;
12987                         esac
12988                 fi
12989         done
12990 else
12991         fgrep define conftest.i >>confdefs.h
12992 fi
12993 rm -rf conftest*
12994 fi
12995
12996 echo "$as_me:12996: checking if you want to work around bogus compiler/loader warnings" >&5
12997 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12998
12999 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13000 if test "${enable_string_hacks+set}" = set; then
13001   enableval="$enable_string_hacks"
13002   with_string_hacks=$enableval
13003 else
13004   with_string_hacks=no
13005 fi;
13006 echo "$as_me:13006: result: $with_string_hacks" >&5
13007 echo "${ECHO_T}$with_string_hacks" >&6
13008
13009 if test "x$with_string_hacks" = "xyes"; then
13010
13011 cat >>confdefs.h <<\EOF
13012 #define USE_STRING_HACKS 1
13013 EOF
13014
13015         { echo "$as_me:13015: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13016 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13017
13018 for ac_func in strlcat strlcpy snprintf
13019 do
13020 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13021 echo "$as_me:13021: checking for $ac_func" >&5
13022 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13023 if eval "test \"\${$as_ac_var+set}\" = set"; then
13024   echo $ECHO_N "(cached) $ECHO_C" >&6
13025 else
13026   cat >conftest.$ac_ext <<_ACEOF
13027 #line 13027 "configure"
13028 #include "confdefs.h"
13029 /* System header to define __stub macros and hopefully few prototypes,
13030     which can conflict with char $ac_func (); below.  */
13031 #include <assert.h>
13032 /* Override any gcc2 internal prototype to avoid an error.  */
13033 #ifdef __cplusplus
13034 extern "C"
13035 #endif
13036 /* We use char because int might match the return type of a gcc2
13037    builtin and then its argument prototype would still apply.  */
13038 char $ac_func ();
13039 char (*f) ();
13040
13041 int
13042 main ()
13043 {
13044 /* The GNU C library defines this for functions which it implements
13045     to always fail with ENOSYS.  Some functions are actually named
13046     something starting with __ and the normal name is an alias.  */
13047 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13048 choke me
13049 #else
13050 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13051 #endif
13052
13053   ;
13054   return 0;
13055 }
13056 _ACEOF
13057 rm -f conftest.$ac_objext conftest$ac_exeext
13058 if { (eval echo "$as_me:13058: \"$ac_link\"") >&5
13059   (eval $ac_link) 2>&5
13060   ac_status=$?
13061   echo "$as_me:13061: \$? = $ac_status" >&5
13062   (exit $ac_status); } &&
13063          { ac_try='test -s conftest$ac_exeext'
13064   { (eval echo "$as_me:13064: \"$ac_try\"") >&5
13065   (eval $ac_try) 2>&5
13066   ac_status=$?
13067   echo "$as_me:13067: \$? = $ac_status" >&5
13068   (exit $ac_status); }; }; then
13069   eval "$as_ac_var=yes"
13070 else
13071   echo "$as_me: failed program was:" >&5
13072 cat conftest.$ac_ext >&5
13073 eval "$as_ac_var=no"
13074 fi
13075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13076 fi
13077 echo "$as_me:13077: result: `eval echo '${'$as_ac_var'}'`" >&5
13078 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13079 if test `eval echo '${'$as_ac_var'}'` = yes; then
13080   cat >>confdefs.h <<EOF
13081 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13082 EOF
13083
13084 fi
13085 done
13086
13087 fi
13088
13089 ###     use option --enable-assertions to turn on generation of assertion code
13090 echo "$as_me:13090: checking if you want to enable runtime assertions" >&5
13091 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13092
13093 # Check whether --enable-assertions or --disable-assertions was given.
13094 if test "${enable_assertions+set}" = set; then
13095   enableval="$enable_assertions"
13096   with_assertions=$enableval
13097 else
13098   with_assertions=no
13099 fi;
13100 echo "$as_me:13100: result: $with_assertions" >&5
13101 echo "${ECHO_T}$with_assertions" >&6
13102 if test -n "$GCC"
13103 then
13104         if test "$with_assertions" = no
13105         then
13106                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13107         else
13108
13109         ADAFLAGS="$ADAFLAGS -gnata"
13110
13111         fi
13112 fi
13113
13114 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13115
13116 echo "$as_me:13116: checking if you want to use dmalloc for testing" >&5
13117 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13118
13119 # Check whether --with-dmalloc or --without-dmalloc was given.
13120 if test "${with_dmalloc+set}" = set; then
13121   withval="$with_dmalloc"
13122
13123 cat >>confdefs.h <<EOF
13124 #define USE_DMALLOC 1
13125 EOF
13126
13127         : ${with_cflags:=-g}
13128         : ${with_no_leaks:=yes}
13129          with_dmalloc=yes
13130 else
13131   with_dmalloc=
13132 fi;
13133 echo "$as_me:13133: result: ${with_dmalloc:-no}" >&5
13134 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13135
13136 case .$with_cflags in #(vi
13137 .*-g*)
13138         case .$CFLAGS in #(vi
13139         .*-g*) #(vi
13140                 ;;
13141         *)
13142
13143 cf_fix_cppflags=no
13144 cf_new_cflags=
13145 cf_new_cppflags=
13146 cf_new_extra_cppflags=
13147
13148 for cf_add_cflags in -g
13149 do
13150 case $cf_fix_cppflags in
13151 no)
13152         case $cf_add_cflags in #(vi
13153         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13154                 case $cf_add_cflags in
13155                 -D*)
13156                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13157
13158                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13159                                 && test -z "${cf_tst_cflags}" \
13160                                 && cf_fix_cppflags=yes
13161
13162                         if test $cf_fix_cppflags = yes ; then
13163                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13164                                 continue
13165                         elif test "${cf_tst_cflags}" = "\"'" ; then
13166                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13167                                 continue
13168                         fi
13169                         ;;
13170                 esac
13171                 case "$CPPFLAGS" in
13172                 *$cf_add_cflags) #(vi
13173                         ;;
13174                 *) #(vi
13175                         case $cf_add_cflags in #(vi
13176                         -D*)
13177                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13178
13179 CPPFLAGS=`echo "$CPPFLAGS" | \
13180         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13181                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13182
13183                                 ;;
13184                         esac
13185                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13186                         ;;
13187                 esac
13188                 ;;
13189         *)
13190                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13191                 ;;
13192         esac
13193         ;;
13194 yes)
13195         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13196
13197         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13198
13199         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13200                 && test -z "${cf_tst_cflags}" \
13201                 && cf_fix_cppflags=no
13202         ;;
13203 esac
13204 done
13205
13206 if test -n "$cf_new_cflags" ; then
13207
13208         CFLAGS="$CFLAGS $cf_new_cflags"
13209 fi
13210
13211 if test -n "$cf_new_cppflags" ; then
13212
13213         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13214 fi
13215
13216 if test -n "$cf_new_extra_cppflags" ; then
13217
13218         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13219 fi
13220
13221                 ;;
13222         esac
13223         ;;
13224 esac
13225
13226 if test "$with_dmalloc" = yes ; then
13227         echo "$as_me:13227: checking for dmalloc.h" >&5
13228 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13229 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13230   echo $ECHO_N "(cached) $ECHO_C" >&6
13231 else
13232   cat >conftest.$ac_ext <<_ACEOF
13233 #line 13233 "configure"
13234 #include "confdefs.h"
13235 #include <dmalloc.h>
13236 _ACEOF
13237 if { (eval echo "$as_me:13237: \"$ac_cpp conftest.$ac_ext\"") >&5
13238   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13239   ac_status=$?
13240   egrep -v '^ *\+' conftest.er1 >conftest.err
13241   rm -f conftest.er1
13242   cat conftest.err >&5
13243   echo "$as_me:13243: \$? = $ac_status" >&5
13244   (exit $ac_status); } >/dev/null; then
13245   if test -s conftest.err; then
13246     ac_cpp_err=$ac_c_preproc_warn_flag
13247   else
13248     ac_cpp_err=
13249   fi
13250 else
13251   ac_cpp_err=yes
13252 fi
13253 if test -z "$ac_cpp_err"; then
13254   ac_cv_header_dmalloc_h=yes
13255 else
13256   echo "$as_me: failed program was:" >&5
13257   cat conftest.$ac_ext >&5
13258   ac_cv_header_dmalloc_h=no
13259 fi
13260 rm -f conftest.err conftest.$ac_ext
13261 fi
13262 echo "$as_me:13262: result: $ac_cv_header_dmalloc_h" >&5
13263 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13264 if test $ac_cv_header_dmalloc_h = yes; then
13265
13266 echo "$as_me:13266: checking for dmalloc_debug in -ldmalloc" >&5
13267 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13268 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13269   echo $ECHO_N "(cached) $ECHO_C" >&6
13270 else
13271   ac_check_lib_save_LIBS=$LIBS
13272 LIBS="-ldmalloc  $LIBS"
13273 cat >conftest.$ac_ext <<_ACEOF
13274 #line 13274 "configure"
13275 #include "confdefs.h"
13276
13277 /* Override any gcc2 internal prototype to avoid an error.  */
13278 #ifdef __cplusplus
13279 extern "C"
13280 #endif
13281 /* We use char because int might match the return type of a gcc2
13282    builtin and then its argument prototype would still apply.  */
13283 char dmalloc_debug ();
13284 int
13285 main ()
13286 {
13287 dmalloc_debug ();
13288   ;
13289   return 0;
13290 }
13291 _ACEOF
13292 rm -f conftest.$ac_objext conftest$ac_exeext
13293 if { (eval echo "$as_me:13293: \"$ac_link\"") >&5
13294   (eval $ac_link) 2>&5
13295   ac_status=$?
13296   echo "$as_me:13296: \$? = $ac_status" >&5
13297   (exit $ac_status); } &&
13298          { ac_try='test -s conftest$ac_exeext'
13299   { (eval echo "$as_me:13299: \"$ac_try\"") >&5
13300   (eval $ac_try) 2>&5
13301   ac_status=$?
13302   echo "$as_me:13302: \$? = $ac_status" >&5
13303   (exit $ac_status); }; }; then
13304   ac_cv_lib_dmalloc_dmalloc_debug=yes
13305 else
13306   echo "$as_me: failed program was:" >&5
13307 cat conftest.$ac_ext >&5
13308 ac_cv_lib_dmalloc_dmalloc_debug=no
13309 fi
13310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13311 LIBS=$ac_check_lib_save_LIBS
13312 fi
13313 echo "$as_me:13313: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13314 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13315 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13316   cat >>confdefs.h <<EOF
13317 #define HAVE_LIBDMALLOC 1
13318 EOF
13319
13320   LIBS="-ldmalloc $LIBS"
13321
13322 fi
13323
13324 fi
13325
13326 fi
13327
13328 echo "$as_me:13328: checking if you want to use dbmalloc for testing" >&5
13329 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13330
13331 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13332 if test "${with_dbmalloc+set}" = set; then
13333   withval="$with_dbmalloc"
13334
13335 cat >>confdefs.h <<EOF
13336 #define USE_DBMALLOC 1
13337 EOF
13338
13339         : ${with_cflags:=-g}
13340         : ${with_no_leaks:=yes}
13341          with_dbmalloc=yes
13342 else
13343   with_dbmalloc=
13344 fi;
13345 echo "$as_me:13345: result: ${with_dbmalloc:-no}" >&5
13346 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13347
13348 case .$with_cflags in #(vi
13349 .*-g*)
13350         case .$CFLAGS in #(vi
13351         .*-g*) #(vi
13352                 ;;
13353         *)
13354
13355 cf_fix_cppflags=no
13356 cf_new_cflags=
13357 cf_new_cppflags=
13358 cf_new_extra_cppflags=
13359
13360 for cf_add_cflags in -g
13361 do
13362 case $cf_fix_cppflags in
13363 no)
13364         case $cf_add_cflags in #(vi
13365         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13366                 case $cf_add_cflags in
13367                 -D*)
13368                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13369
13370                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13371                                 && test -z "${cf_tst_cflags}" \
13372                                 && cf_fix_cppflags=yes
13373
13374                         if test $cf_fix_cppflags = yes ; then
13375                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13376                                 continue
13377                         elif test "${cf_tst_cflags}" = "\"'" ; then
13378                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13379                                 continue
13380                         fi
13381                         ;;
13382                 esac
13383                 case "$CPPFLAGS" in
13384                 *$cf_add_cflags) #(vi
13385                         ;;
13386                 *) #(vi
13387                         case $cf_add_cflags in #(vi
13388                         -D*)
13389                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13390
13391 CPPFLAGS=`echo "$CPPFLAGS" | \
13392         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13393                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13394
13395                                 ;;
13396                         esac
13397                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13398                         ;;
13399                 esac
13400                 ;;
13401         *)
13402                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13403                 ;;
13404         esac
13405         ;;
13406 yes)
13407         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13408
13409         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13410
13411         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13412                 && test -z "${cf_tst_cflags}" \
13413                 && cf_fix_cppflags=no
13414         ;;
13415 esac
13416 done
13417
13418 if test -n "$cf_new_cflags" ; then
13419
13420         CFLAGS="$CFLAGS $cf_new_cflags"
13421 fi
13422
13423 if test -n "$cf_new_cppflags" ; then
13424
13425         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13426 fi
13427
13428 if test -n "$cf_new_extra_cppflags" ; then
13429
13430         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13431 fi
13432
13433                 ;;
13434         esac
13435         ;;
13436 esac
13437
13438 if test "$with_dbmalloc" = yes ; then
13439         echo "$as_me:13439: checking for dbmalloc.h" >&5
13440 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13441 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13442   echo $ECHO_N "(cached) $ECHO_C" >&6
13443 else
13444   cat >conftest.$ac_ext <<_ACEOF
13445 #line 13445 "configure"
13446 #include "confdefs.h"
13447 #include <dbmalloc.h>
13448 _ACEOF
13449 if { (eval echo "$as_me:13449: \"$ac_cpp conftest.$ac_ext\"") >&5
13450   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13451   ac_status=$?
13452   egrep -v '^ *\+' conftest.er1 >conftest.err
13453   rm -f conftest.er1
13454   cat conftest.err >&5
13455   echo "$as_me:13455: \$? = $ac_status" >&5
13456   (exit $ac_status); } >/dev/null; then
13457   if test -s conftest.err; then
13458     ac_cpp_err=$ac_c_preproc_warn_flag
13459   else
13460     ac_cpp_err=
13461   fi
13462 else
13463   ac_cpp_err=yes
13464 fi
13465 if test -z "$ac_cpp_err"; then
13466   ac_cv_header_dbmalloc_h=yes
13467 else
13468   echo "$as_me: failed program was:" >&5
13469   cat conftest.$ac_ext >&5
13470   ac_cv_header_dbmalloc_h=no
13471 fi
13472 rm -f conftest.err conftest.$ac_ext
13473 fi
13474 echo "$as_me:13474: result: $ac_cv_header_dbmalloc_h" >&5
13475 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13476 if test $ac_cv_header_dbmalloc_h = yes; then
13477
13478 echo "$as_me:13478: checking for debug_malloc in -ldbmalloc" >&5
13479 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13480 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13481   echo $ECHO_N "(cached) $ECHO_C" >&6
13482 else
13483   ac_check_lib_save_LIBS=$LIBS
13484 LIBS="-ldbmalloc  $LIBS"
13485 cat >conftest.$ac_ext <<_ACEOF
13486 #line 13486 "configure"
13487 #include "confdefs.h"
13488
13489 /* Override any gcc2 internal prototype to avoid an error.  */
13490 #ifdef __cplusplus
13491 extern "C"
13492 #endif
13493 /* We use char because int might match the return type of a gcc2
13494    builtin and then its argument prototype would still apply.  */
13495 char debug_malloc ();
13496 int
13497 main ()
13498 {
13499 debug_malloc ();
13500   ;
13501   return 0;
13502 }
13503 _ACEOF
13504 rm -f conftest.$ac_objext conftest$ac_exeext
13505 if { (eval echo "$as_me:13505: \"$ac_link\"") >&5
13506   (eval $ac_link) 2>&5
13507   ac_status=$?
13508   echo "$as_me:13508: \$? = $ac_status" >&5
13509   (exit $ac_status); } &&
13510          { ac_try='test -s conftest$ac_exeext'
13511   { (eval echo "$as_me:13511: \"$ac_try\"") >&5
13512   (eval $ac_try) 2>&5
13513   ac_status=$?
13514   echo "$as_me:13514: \$? = $ac_status" >&5
13515   (exit $ac_status); }; }; then
13516   ac_cv_lib_dbmalloc_debug_malloc=yes
13517 else
13518   echo "$as_me: failed program was:" >&5
13519 cat conftest.$ac_ext >&5
13520 ac_cv_lib_dbmalloc_debug_malloc=no
13521 fi
13522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13523 LIBS=$ac_check_lib_save_LIBS
13524 fi
13525 echo "$as_me:13525: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13526 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13527 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13528   cat >>confdefs.h <<EOF
13529 #define HAVE_LIBDBMALLOC 1
13530 EOF
13531
13532   LIBS="-ldbmalloc $LIBS"
13533
13534 fi
13535
13536 fi
13537
13538 fi
13539
13540 echo "$as_me:13540: checking if you want to use valgrind for testing" >&5
13541 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13542
13543 # Check whether --with-valgrind or --without-valgrind was given.
13544 if test "${with_valgrind+set}" = set; then
13545   withval="$with_valgrind"
13546
13547 cat >>confdefs.h <<EOF
13548 #define USE_VALGRIND 1
13549 EOF
13550
13551         : ${with_cflags:=-g}
13552         : ${with_no_leaks:=yes}
13553          with_valgrind=yes
13554 else
13555   with_valgrind=
13556 fi;
13557 echo "$as_me:13557: result: ${with_valgrind:-no}" >&5
13558 echo "${ECHO_T}${with_valgrind:-no}" >&6
13559
13560 case .$with_cflags in #(vi
13561 .*-g*)
13562         case .$CFLAGS in #(vi
13563         .*-g*) #(vi
13564                 ;;
13565         *)
13566
13567 cf_fix_cppflags=no
13568 cf_new_cflags=
13569 cf_new_cppflags=
13570 cf_new_extra_cppflags=
13571
13572 for cf_add_cflags in -g
13573 do
13574 case $cf_fix_cppflags in
13575 no)
13576         case $cf_add_cflags in #(vi
13577         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13578                 case $cf_add_cflags in
13579                 -D*)
13580                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13581
13582                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13583                                 && test -z "${cf_tst_cflags}" \
13584                                 && cf_fix_cppflags=yes
13585
13586                         if test $cf_fix_cppflags = yes ; then
13587                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13588                                 continue
13589                         elif test "${cf_tst_cflags}" = "\"'" ; then
13590                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13591                                 continue
13592                         fi
13593                         ;;
13594                 esac
13595                 case "$CPPFLAGS" in
13596                 *$cf_add_cflags) #(vi
13597                         ;;
13598                 *) #(vi
13599                         case $cf_add_cflags in #(vi
13600                         -D*)
13601                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13602
13603 CPPFLAGS=`echo "$CPPFLAGS" | \
13604         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13605                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13606
13607                                 ;;
13608                         esac
13609                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13610                         ;;
13611                 esac
13612                 ;;
13613         *)
13614                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13615                 ;;
13616         esac
13617         ;;
13618 yes)
13619         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13620
13621         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13622
13623         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13624                 && test -z "${cf_tst_cflags}" \
13625                 && cf_fix_cppflags=no
13626         ;;
13627 esac
13628 done
13629
13630 if test -n "$cf_new_cflags" ; then
13631
13632         CFLAGS="$CFLAGS $cf_new_cflags"
13633 fi
13634
13635 if test -n "$cf_new_cppflags" ; then
13636
13637         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13638 fi
13639
13640 if test -n "$cf_new_extra_cppflags" ; then
13641
13642         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13643 fi
13644
13645                 ;;
13646         esac
13647         ;;
13648 esac
13649
13650 echo "$as_me:13650: checking if you want to perform memory-leak testing" >&5
13651 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13652
13653 # Check whether --enable-leaks or --disable-leaks was given.
13654 if test "${enable_leaks+set}" = set; then
13655   enableval="$enable_leaks"
13656   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13657 else
13658   : ${with_no_leaks:=no}
13659 fi;
13660 echo "$as_me:13660: result: $with_no_leaks" >&5
13661 echo "${ECHO_T}$with_no_leaks" >&6
13662
13663 if test "$with_no_leaks" = yes ; then
13664
13665 cat >>confdefs.h <<\EOF
13666 #define NO_LEAKS 1
13667 EOF
13668
13669 cat >>confdefs.h <<\EOF
13670 #define YY_NO_LEAKS 1
13671 EOF
13672
13673 fi
13674
13675 cat >>confdefs.h <<\EOF
13676 #define HAVE_NC_ALLOC_H 1
13677 EOF
13678
13679 ###     use option --enable-expanded to generate certain macros as functions
13680
13681 # Check whether --enable-expanded or --disable-expanded was given.
13682 if test "${enable_expanded+set}" = set; then
13683   enableval="$enable_expanded"
13684   test "x$enableval" = xyes &&
13685 cat >>confdefs.h <<\EOF
13686 #define NCURSES_EXPANDED 1
13687 EOF
13688
13689 fi;
13690
13691 ###     use option --disable-macros to suppress macros in favor of functions
13692
13693 # Check whether --enable-macros or --disable-macros was given.
13694 if test "${enable_macros+set}" = set; then
13695   enableval="$enable_macros"
13696   test "$enableval" = no &&
13697 cat >>confdefs.h <<\EOF
13698 #define NCURSES_NOMACROS 1
13699 EOF
13700
13701 fi;
13702
13703 # Normally we only add trace() to the debug-library.  Allow this to be
13704 # extended to all models of the ncurses library:
13705 cf_all_traces=no
13706 case "$CFLAGS $CPPFLAGS" in
13707 *-DTRACE*)
13708         cf_all_traces=yes
13709         ;;
13710 esac
13711
13712 echo "$as_me:13712: checking whether to add trace feature to all models" >&5
13713 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13714
13715 # Check whether --with-trace or --without-trace was given.
13716 if test "${with_trace+set}" = set; then
13717   withval="$with_trace"
13718   cf_with_trace=$withval
13719 else
13720   cf_with_trace=$cf_all_traces
13721 fi;
13722 echo "$as_me:13722: result: $cf_with_trace" >&5
13723 echo "${ECHO_T}$cf_with_trace" >&6
13724
13725 if test "x$cf_with_trace" = xyes ; then
13726         LIB_TRACING=all
13727         ADA_TRACE=TRUE
13728
13729 cf_fix_cppflags=no
13730 cf_new_cflags=
13731 cf_new_cppflags=
13732 cf_new_extra_cppflags=
13733
13734 for cf_add_cflags in -DTRACE
13735 do
13736 case $cf_fix_cppflags in
13737 no)
13738         case $cf_add_cflags in #(vi
13739         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13740                 case $cf_add_cflags in
13741                 -D*)
13742                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13743
13744                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13745                                 && test -z "${cf_tst_cflags}" \
13746                                 && cf_fix_cppflags=yes
13747
13748                         if test $cf_fix_cppflags = yes ; then
13749                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13750                                 continue
13751                         elif test "${cf_tst_cflags}" = "\"'" ; then
13752                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13753                                 continue
13754                         fi
13755                         ;;
13756                 esac
13757                 case "$CPPFLAGS" in
13758                 *$cf_add_cflags) #(vi
13759                         ;;
13760                 *) #(vi
13761                         case $cf_add_cflags in #(vi
13762                         -D*)
13763                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13764
13765 CPPFLAGS=`echo "$CPPFLAGS" | \
13766         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13767                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13768
13769                                 ;;
13770                         esac
13771                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13772                         ;;
13773                 esac
13774                 ;;
13775         *)
13776                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13777                 ;;
13778         esac
13779         ;;
13780 yes)
13781         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13782
13783         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13784
13785         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13786                 && test -z "${cf_tst_cflags}" \
13787                 && cf_fix_cppflags=no
13788         ;;
13789 esac
13790 done
13791
13792 if test -n "$cf_new_cflags" ; then
13793
13794         CFLAGS="$CFLAGS $cf_new_cflags"
13795 fi
13796
13797 if test -n "$cf_new_cppflags" ; then
13798
13799         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13800 fi
13801
13802 if test -n "$cf_new_extra_cppflags" ; then
13803
13804         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13805 fi
13806
13807 else
13808         LIB_TRACING=DEBUG
13809         ADA_TRACE=FALSE
13810 fi
13811
13812 echo "$as_me:13812: checking if we want to use GNAT projects" >&5
13813 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
13814
13815 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
13816 if test "${enable_gnat_projects+set}" = set; then
13817   enableval="$enable_gnat_projects"
13818   test "$enableval" != no && enableval=yes
13819   if test "$enableval" != "yes" ; then
13820     enable_gnat_projects=no
13821   else
13822     enable_gnat_projects=yes
13823   fi
13824 else
13825   enableval=yes
13826   enable_gnat_projects=yes
13827
13828 fi;
13829 echo "$as_me:13829: result: $enable_gnat_projects" >&5
13830 echo "${ECHO_T}$enable_gnat_projects" >&6
13831
13832 ###     Checks for libraries.
13833 case $cf_cv_system_name in #(vi
13834 *mingw32*) #(vi
13835         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
13836         LIBS=" -lpsapi $LIBS"
13837         ;;
13838 *)
13839 echo "$as_me:13839: checking for gettimeofday" >&5
13840 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13841 if test "${ac_cv_func_gettimeofday+set}" = set; then
13842   echo $ECHO_N "(cached) $ECHO_C" >&6
13843 else
13844   cat >conftest.$ac_ext <<_ACEOF
13845 #line 13845 "configure"
13846 #include "confdefs.h"
13847 /* System header to define __stub macros and hopefully few prototypes,
13848     which can conflict with char gettimeofday (); below.  */
13849 #include <assert.h>
13850 /* Override any gcc2 internal prototype to avoid an error.  */
13851 #ifdef __cplusplus
13852 extern "C"
13853 #endif
13854 /* We use char because int might match the return type of a gcc2
13855    builtin and then its argument prototype would still apply.  */
13856 char gettimeofday ();
13857 char (*f) ();
13858
13859 int
13860 main ()
13861 {
13862 /* The GNU C library defines this for functions which it implements
13863     to always fail with ENOSYS.  Some functions are actually named
13864     something starting with __ and the normal name is an alias.  */
13865 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13866 choke me
13867 #else
13868 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13869 #endif
13870
13871   ;
13872   return 0;
13873 }
13874 _ACEOF
13875 rm -f conftest.$ac_objext conftest$ac_exeext
13876 if { (eval echo "$as_me:13876: \"$ac_link\"") >&5
13877   (eval $ac_link) 2>&5
13878   ac_status=$?
13879   echo "$as_me:13879: \$? = $ac_status" >&5
13880   (exit $ac_status); } &&
13881          { ac_try='test -s conftest$ac_exeext'
13882   { (eval echo "$as_me:13882: \"$ac_try\"") >&5
13883   (eval $ac_try) 2>&5
13884   ac_status=$?
13885   echo "$as_me:13885: \$? = $ac_status" >&5
13886   (exit $ac_status); }; }; then
13887   ac_cv_func_gettimeofday=yes
13888 else
13889   echo "$as_me: failed program was:" >&5
13890 cat conftest.$ac_ext >&5
13891 ac_cv_func_gettimeofday=no
13892 fi
13893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13894 fi
13895 echo "$as_me:13895: result: $ac_cv_func_gettimeofday" >&5
13896 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13897 if test $ac_cv_func_gettimeofday = yes; then
13898
13899 cat >>confdefs.h <<\EOF
13900 #define HAVE_GETTIMEOFDAY 1
13901 EOF
13902
13903 else
13904
13905 echo "$as_me:13905: checking for gettimeofday in -lbsd" >&5
13906 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13907 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13908   echo $ECHO_N "(cached) $ECHO_C" >&6
13909 else
13910   ac_check_lib_save_LIBS=$LIBS
13911 LIBS="-lbsd  $LIBS"
13912 cat >conftest.$ac_ext <<_ACEOF
13913 #line 13913 "configure"
13914 #include "confdefs.h"
13915
13916 /* Override any gcc2 internal prototype to avoid an error.  */
13917 #ifdef __cplusplus
13918 extern "C"
13919 #endif
13920 /* We use char because int might match the return type of a gcc2
13921    builtin and then its argument prototype would still apply.  */
13922 char gettimeofday ();
13923 int
13924 main ()
13925 {
13926 gettimeofday ();
13927   ;
13928   return 0;
13929 }
13930 _ACEOF
13931 rm -f conftest.$ac_objext conftest$ac_exeext
13932 if { (eval echo "$as_me:13932: \"$ac_link\"") >&5
13933   (eval $ac_link) 2>&5
13934   ac_status=$?
13935   echo "$as_me:13935: \$? = $ac_status" >&5
13936   (exit $ac_status); } &&
13937          { ac_try='test -s conftest$ac_exeext'
13938   { (eval echo "$as_me:13938: \"$ac_try\"") >&5
13939   (eval $ac_try) 2>&5
13940   ac_status=$?
13941   echo "$as_me:13941: \$? = $ac_status" >&5
13942   (exit $ac_status); }; }; then
13943   ac_cv_lib_bsd_gettimeofday=yes
13944 else
13945   echo "$as_me: failed program was:" >&5
13946 cat conftest.$ac_ext >&5
13947 ac_cv_lib_bsd_gettimeofday=no
13948 fi
13949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13950 LIBS=$ac_check_lib_save_LIBS
13951 fi
13952 echo "$as_me:13952: result: $ac_cv_lib_bsd_gettimeofday" >&5
13953 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13954 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13955
13956 cat >>confdefs.h <<\EOF
13957 #define HAVE_GETTIMEOFDAY 1
13958 EOF
13959
13960 cf_add_libs="-lbsd"
13961 # Filter out duplicates - this happens with badly-designed ".pc" files...
13962 for cf_add_1lib in $LIBS
13963 do
13964         for cf_add_2lib in $cf_add_libs
13965         do
13966                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13967                 then
13968                         cf_add_1lib=
13969                         break
13970                 fi
13971         done
13972         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13973 done
13974 LIBS="$cf_add_libs"
13975
13976 fi
13977
13978 fi
13979         ;;
13980 esac
13981
13982 echo "$as_me:13982: checking if -lm needed for math functions" >&5
13983 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13984 if test "${cf_cv_need_libm+set}" = set; then
13985   echo $ECHO_N "(cached) $ECHO_C" >&6
13986 else
13987
13988         cat >conftest.$ac_ext <<_ACEOF
13989 #line 13989 "configure"
13990 #include "confdefs.h"
13991
13992         #include <stdio.h>
13993         #include <math.h>
13994
13995 int
13996 main ()
13997 {
13998 double x = rand(); printf("result = %g\n", pow(sin(x),x))
13999   ;
14000   return 0;
14001 }
14002 _ACEOF
14003 rm -f conftest.$ac_objext conftest$ac_exeext
14004 if { (eval echo "$as_me:14004: \"$ac_link\"") >&5
14005   (eval $ac_link) 2>&5
14006   ac_status=$?
14007   echo "$as_me:14007: \$? = $ac_status" >&5
14008   (exit $ac_status); } &&
14009          { ac_try='test -s conftest$ac_exeext'
14010   { (eval echo "$as_me:14010: \"$ac_try\"") >&5
14011   (eval $ac_try) 2>&5
14012   ac_status=$?
14013   echo "$as_me:14013: \$? = $ac_status" >&5
14014   (exit $ac_status); }; }; then
14015   cf_cv_need_libm=no
14016 else
14017   echo "$as_me: failed program was:" >&5
14018 cat conftest.$ac_ext >&5
14019 cf_cv_need_libm=yes
14020 fi
14021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14022 fi
14023 echo "$as_me:14023: result: $cf_cv_need_libm" >&5
14024 echo "${ECHO_T}$cf_cv_need_libm" >&6
14025 if test "$cf_cv_need_libm" = yes
14026 then
14027 MATH_LIB=-lm
14028 fi
14029
14030 ###     Checks for header files.
14031 echo "$as_me:14031: checking for ANSI C header files" >&5
14032 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14033 if test "${ac_cv_header_stdc+set}" = set; then
14034   echo $ECHO_N "(cached) $ECHO_C" >&6
14035 else
14036   cat >conftest.$ac_ext <<_ACEOF
14037 #line 14037 "configure"
14038 #include "confdefs.h"
14039 #include <stdlib.h>
14040 #include <stdarg.h>
14041 #include <string.h>
14042 #include <float.h>
14043
14044 _ACEOF
14045 if { (eval echo "$as_me:14045: \"$ac_cpp conftest.$ac_ext\"") >&5
14046   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14047   ac_status=$?
14048   egrep -v '^ *\+' conftest.er1 >conftest.err
14049   rm -f conftest.er1
14050   cat conftest.err >&5
14051   echo "$as_me:14051: \$? = $ac_status" >&5
14052   (exit $ac_status); } >/dev/null; then
14053   if test -s conftest.err; then
14054     ac_cpp_err=$ac_c_preproc_warn_flag
14055   else
14056     ac_cpp_err=
14057   fi
14058 else
14059   ac_cpp_err=yes
14060 fi
14061 if test -z "$ac_cpp_err"; then
14062   ac_cv_header_stdc=yes
14063 else
14064   echo "$as_me: failed program was:" >&5
14065   cat conftest.$ac_ext >&5
14066   ac_cv_header_stdc=no
14067 fi
14068 rm -f conftest.err conftest.$ac_ext
14069
14070 if test $ac_cv_header_stdc = yes; then
14071   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14072   cat >conftest.$ac_ext <<_ACEOF
14073 #line 14073 "configure"
14074 #include "confdefs.h"
14075 #include <string.h>
14076
14077 _ACEOF
14078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14079   egrep "memchr" >/dev/null 2>&1; then
14080   :
14081 else
14082   ac_cv_header_stdc=no
14083 fi
14084 rm -rf conftest*
14085
14086 fi
14087
14088 if test $ac_cv_header_stdc = yes; then
14089   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14090   cat >conftest.$ac_ext <<_ACEOF
14091 #line 14091 "configure"
14092 #include "confdefs.h"
14093 #include <stdlib.h>
14094
14095 _ACEOF
14096 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14097   egrep "free" >/dev/null 2>&1; then
14098   :
14099 else
14100   ac_cv_header_stdc=no
14101 fi
14102 rm -rf conftest*
14103
14104 fi
14105
14106 if test $ac_cv_header_stdc = yes; then
14107   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14108   if test "$cross_compiling" = yes; then
14109   :
14110 else
14111   cat >conftest.$ac_ext <<_ACEOF
14112 #line 14112 "configure"
14113 #include "confdefs.h"
14114 #include <ctype.h>
14115 #if ((' ' & 0x0FF) == 0x020)
14116 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14117 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14118 #else
14119 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14120                      || ('j' <= (c) && (c) <= 'r') \
14121                      || ('s' <= (c) && (c) <= 'z'))
14122 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14123 #endif
14124
14125 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14126 int
14127 main ()
14128 {
14129   int i;
14130   for (i = 0; i < 256; i++)
14131     if (XOR (islower (i), ISLOWER (i))
14132         || toupper (i) != TOUPPER (i))
14133       $ac_main_return(2);
14134   $ac_main_return (0);
14135 }
14136 _ACEOF
14137 rm -f conftest$ac_exeext
14138 if { (eval echo "$as_me:14138: \"$ac_link\"") >&5
14139   (eval $ac_link) 2>&5
14140   ac_status=$?
14141   echo "$as_me:14141: \$? = $ac_status" >&5
14142   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14143   { (eval echo "$as_me:14143: \"$ac_try\"") >&5
14144   (eval $ac_try) 2>&5
14145   ac_status=$?
14146   echo "$as_me:14146: \$? = $ac_status" >&5
14147   (exit $ac_status); }; }; then
14148   :
14149 else
14150   echo "$as_me: program exited with status $ac_status" >&5
14151 echo "$as_me: failed program was:" >&5
14152 cat conftest.$ac_ext >&5
14153 ac_cv_header_stdc=no
14154 fi
14155 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14156 fi
14157 fi
14158 fi
14159 echo "$as_me:14159: result: $ac_cv_header_stdc" >&5
14160 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14161 if test $ac_cv_header_stdc = yes; then
14162
14163 cat >>confdefs.h <<\EOF
14164 #define STDC_HEADERS 1
14165 EOF
14166
14167 fi
14168
14169 ac_header_dirent=no
14170 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14171   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14172 echo "$as_me:14172: checking for $ac_hdr that defines DIR" >&5
14173 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14174 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14175   echo $ECHO_N "(cached) $ECHO_C" >&6
14176 else
14177   cat >conftest.$ac_ext <<_ACEOF
14178 #line 14178 "configure"
14179 #include "confdefs.h"
14180 #include <sys/types.h>
14181 #include <$ac_hdr>
14182
14183 int
14184 main ()
14185 {
14186 if ((DIR *) 0)
14187 return 0;
14188   ;
14189   return 0;
14190 }
14191 _ACEOF
14192 rm -f conftest.$ac_objext
14193 if { (eval echo "$as_me:14193: \"$ac_compile\"") >&5
14194   (eval $ac_compile) 2>&5
14195   ac_status=$?
14196   echo "$as_me:14196: \$? = $ac_status" >&5
14197   (exit $ac_status); } &&
14198          { ac_try='test -s conftest.$ac_objext'
14199   { (eval echo "$as_me:14199: \"$ac_try\"") >&5
14200   (eval $ac_try) 2>&5
14201   ac_status=$?
14202   echo "$as_me:14202: \$? = $ac_status" >&5
14203   (exit $ac_status); }; }; then
14204   eval "$as_ac_Header=yes"
14205 else
14206   echo "$as_me: failed program was:" >&5
14207 cat conftest.$ac_ext >&5
14208 eval "$as_ac_Header=no"
14209 fi
14210 rm -f conftest.$ac_objext conftest.$ac_ext
14211 fi
14212 echo "$as_me:14212: result: `eval echo '${'$as_ac_Header'}'`" >&5
14213 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14214 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14215   cat >>confdefs.h <<EOF
14216 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14217 EOF
14218
14219 ac_header_dirent=$ac_hdr; break
14220 fi
14221
14222 done
14223 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14224 if test $ac_header_dirent = dirent.h; then
14225   echo "$as_me:14225: checking for opendir in -ldir" >&5
14226 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14227 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14228   echo $ECHO_N "(cached) $ECHO_C" >&6
14229 else
14230   ac_check_lib_save_LIBS=$LIBS
14231 LIBS="-ldir  $LIBS"
14232 cat >conftest.$ac_ext <<_ACEOF
14233 #line 14233 "configure"
14234 #include "confdefs.h"
14235
14236 /* Override any gcc2 internal prototype to avoid an error.  */
14237 #ifdef __cplusplus
14238 extern "C"
14239 #endif
14240 /* We use char because int might match the return type of a gcc2
14241    builtin and then its argument prototype would still apply.  */
14242 char opendir ();
14243 int
14244 main ()
14245 {
14246 opendir ();
14247   ;
14248   return 0;
14249 }
14250 _ACEOF
14251 rm -f conftest.$ac_objext conftest$ac_exeext
14252 if { (eval echo "$as_me:14252: \"$ac_link\"") >&5
14253   (eval $ac_link) 2>&5
14254   ac_status=$?
14255   echo "$as_me:14255: \$? = $ac_status" >&5
14256   (exit $ac_status); } &&
14257          { ac_try='test -s conftest$ac_exeext'
14258   { (eval echo "$as_me:14258: \"$ac_try\"") >&5
14259   (eval $ac_try) 2>&5
14260   ac_status=$?
14261   echo "$as_me:14261: \$? = $ac_status" >&5
14262   (exit $ac_status); }; }; then
14263   ac_cv_lib_dir_opendir=yes
14264 else
14265   echo "$as_me: failed program was:" >&5
14266 cat conftest.$ac_ext >&5
14267 ac_cv_lib_dir_opendir=no
14268 fi
14269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14270 LIBS=$ac_check_lib_save_LIBS
14271 fi
14272 echo "$as_me:14272: result: $ac_cv_lib_dir_opendir" >&5
14273 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14274 if test $ac_cv_lib_dir_opendir = yes; then
14275   LIBS="$LIBS -ldir"
14276 fi
14277
14278 else
14279   echo "$as_me:14279: checking for opendir in -lx" >&5
14280 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14281 if test "${ac_cv_lib_x_opendir+set}" = set; then
14282   echo $ECHO_N "(cached) $ECHO_C" >&6
14283 else
14284   ac_check_lib_save_LIBS=$LIBS
14285 LIBS="-lx  $LIBS"
14286 cat >conftest.$ac_ext <<_ACEOF
14287 #line 14287 "configure"
14288 #include "confdefs.h"
14289
14290 /* Override any gcc2 internal prototype to avoid an error.  */
14291 #ifdef __cplusplus
14292 extern "C"
14293 #endif
14294 /* We use char because int might match the return type of a gcc2
14295    builtin and then its argument prototype would still apply.  */
14296 char opendir ();
14297 int
14298 main ()
14299 {
14300 opendir ();
14301   ;
14302   return 0;
14303 }
14304 _ACEOF
14305 rm -f conftest.$ac_objext conftest$ac_exeext
14306 if { (eval echo "$as_me:14306: \"$ac_link\"") >&5
14307   (eval $ac_link) 2>&5
14308   ac_status=$?
14309   echo "$as_me:14309: \$? = $ac_status" >&5
14310   (exit $ac_status); } &&
14311          { ac_try='test -s conftest$ac_exeext'
14312   { (eval echo "$as_me:14312: \"$ac_try\"") >&5
14313   (eval $ac_try) 2>&5
14314   ac_status=$?
14315   echo "$as_me:14315: \$? = $ac_status" >&5
14316   (exit $ac_status); }; }; then
14317   ac_cv_lib_x_opendir=yes
14318 else
14319   echo "$as_me: failed program was:" >&5
14320 cat conftest.$ac_ext >&5
14321 ac_cv_lib_x_opendir=no
14322 fi
14323 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14324 LIBS=$ac_check_lib_save_LIBS
14325 fi
14326 echo "$as_me:14326: result: $ac_cv_lib_x_opendir" >&5
14327 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14328 if test $ac_cv_lib_x_opendir = yes; then
14329   LIBS="$LIBS -lx"
14330 fi
14331
14332 fi
14333
14334 echo "$as_me:14334: checking whether time.h and sys/time.h may both be included" >&5
14335 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14336 if test "${ac_cv_header_time+set}" = set; then
14337   echo $ECHO_N "(cached) $ECHO_C" >&6
14338 else
14339   cat >conftest.$ac_ext <<_ACEOF
14340 #line 14340 "configure"
14341 #include "confdefs.h"
14342 #include <sys/types.h>
14343 #include <sys/time.h>
14344 #include <time.h>
14345
14346 int
14347 main ()
14348 {
14349 if ((struct tm *) 0)
14350 return 0;
14351   ;
14352   return 0;
14353 }
14354 _ACEOF
14355 rm -f conftest.$ac_objext
14356 if { (eval echo "$as_me:14356: \"$ac_compile\"") >&5
14357   (eval $ac_compile) 2>&5
14358   ac_status=$?
14359   echo "$as_me:14359: \$? = $ac_status" >&5
14360   (exit $ac_status); } &&
14361          { ac_try='test -s conftest.$ac_objext'
14362   { (eval echo "$as_me:14362: \"$ac_try\"") >&5
14363   (eval $ac_try) 2>&5
14364   ac_status=$?
14365   echo "$as_me:14365: \$? = $ac_status" >&5
14366   (exit $ac_status); }; }; then
14367   ac_cv_header_time=yes
14368 else
14369   echo "$as_me: failed program was:" >&5
14370 cat conftest.$ac_ext >&5
14371 ac_cv_header_time=no
14372 fi
14373 rm -f conftest.$ac_objext conftest.$ac_ext
14374 fi
14375 echo "$as_me:14375: result: $ac_cv_header_time" >&5
14376 echo "${ECHO_T}$ac_cv_header_time" >&6
14377 if test $ac_cv_header_time = yes; then
14378
14379 cat >>confdefs.h <<\EOF
14380 #define TIME_WITH_SYS_TIME 1
14381 EOF
14382
14383 fi
14384
14385 cf_regex_func=no
14386
14387 cf_regex_libs="regex re"
14388 case $host_os in #(vi
14389 mingw*)
14390         cf_regex_libs="gnurx $cf_regex_libs"
14391         ;;
14392 esac
14393
14394 echo "$as_me:14394: checking for regcomp" >&5
14395 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14396 if test "${ac_cv_func_regcomp+set}" = set; then
14397   echo $ECHO_N "(cached) $ECHO_C" >&6
14398 else
14399   cat >conftest.$ac_ext <<_ACEOF
14400 #line 14400 "configure"
14401 #include "confdefs.h"
14402 /* System header to define __stub macros and hopefully few prototypes,
14403     which can conflict with char regcomp (); below.  */
14404 #include <assert.h>
14405 /* Override any gcc2 internal prototype to avoid an error.  */
14406 #ifdef __cplusplus
14407 extern "C"
14408 #endif
14409 /* We use char because int might match the return type of a gcc2
14410    builtin and then its argument prototype would still apply.  */
14411 char regcomp ();
14412 char (*f) ();
14413
14414 int
14415 main ()
14416 {
14417 /* The GNU C library defines this for functions which it implements
14418     to always fail with ENOSYS.  Some functions are actually named
14419     something starting with __ and the normal name is an alias.  */
14420 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14421 choke me
14422 #else
14423 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14424 #endif
14425
14426   ;
14427   return 0;
14428 }
14429 _ACEOF
14430 rm -f conftest.$ac_objext conftest$ac_exeext
14431 if { (eval echo "$as_me:14431: \"$ac_link\"") >&5
14432   (eval $ac_link) 2>&5
14433   ac_status=$?
14434   echo "$as_me:14434: \$? = $ac_status" >&5
14435   (exit $ac_status); } &&
14436          { ac_try='test -s conftest$ac_exeext'
14437   { (eval echo "$as_me:14437: \"$ac_try\"") >&5
14438   (eval $ac_try) 2>&5
14439   ac_status=$?
14440   echo "$as_me:14440: \$? = $ac_status" >&5
14441   (exit $ac_status); }; }; then
14442   ac_cv_func_regcomp=yes
14443 else
14444   echo "$as_me: failed program was:" >&5
14445 cat conftest.$ac_ext >&5
14446 ac_cv_func_regcomp=no
14447 fi
14448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14449 fi
14450 echo "$as_me:14450: result: $ac_cv_func_regcomp" >&5
14451 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14452 if test $ac_cv_func_regcomp = yes; then
14453   cf_regex_func=regcomp
14454 else
14455
14456         for cf_regex_lib in $cf_regex_libs
14457         do
14458                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14459 echo "$as_me:14459: checking for regcomp in -l$cf_regex_lib" >&5
14460 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14461 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14462   echo $ECHO_N "(cached) $ECHO_C" >&6
14463 else
14464   ac_check_lib_save_LIBS=$LIBS
14465 LIBS="-l$cf_regex_lib  $LIBS"
14466 cat >conftest.$ac_ext <<_ACEOF
14467 #line 14467 "configure"
14468 #include "confdefs.h"
14469
14470 /* Override any gcc2 internal prototype to avoid an error.  */
14471 #ifdef __cplusplus
14472 extern "C"
14473 #endif
14474 /* We use char because int might match the return type of a gcc2
14475    builtin and then its argument prototype would still apply.  */
14476 char regcomp ();
14477 int
14478 main ()
14479 {
14480 regcomp ();
14481   ;
14482   return 0;
14483 }
14484 _ACEOF
14485 rm -f conftest.$ac_objext conftest$ac_exeext
14486 if { (eval echo "$as_me:14486: \"$ac_link\"") >&5
14487   (eval $ac_link) 2>&5
14488   ac_status=$?
14489   echo "$as_me:14489: \$? = $ac_status" >&5
14490   (exit $ac_status); } &&
14491          { ac_try='test -s conftest$ac_exeext'
14492   { (eval echo "$as_me:14492: \"$ac_try\"") >&5
14493   (eval $ac_try) 2>&5
14494   ac_status=$?
14495   echo "$as_me:14495: \$? = $ac_status" >&5
14496   (exit $ac_status); }; }; then
14497   eval "$as_ac_Lib=yes"
14498 else
14499   echo "$as_me: failed program was:" >&5
14500 cat conftest.$ac_ext >&5
14501 eval "$as_ac_Lib=no"
14502 fi
14503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14504 LIBS=$ac_check_lib_save_LIBS
14505 fi
14506 echo "$as_me:14506: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14507 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14508 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14509
14510 cf_add_libs="-l$cf_regex_lib"
14511 # Filter out duplicates - this happens with badly-designed ".pc" files...
14512 for cf_add_1lib in $LIBS
14513 do
14514         for cf_add_2lib in $cf_add_libs
14515         do
14516                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14517                 then
14518                         cf_add_1lib=
14519                         break
14520                 fi
14521         done
14522         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14523 done
14524 LIBS="$cf_add_libs"
14525
14526                                 cf_regex_func=regcomp
14527                                 break
14528 fi
14529
14530         done
14531
14532 fi
14533
14534 if test "$cf_regex_func" = no ; then
14535         echo "$as_me:14535: checking for compile" >&5
14536 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14537 if test "${ac_cv_func_compile+set}" = set; then
14538   echo $ECHO_N "(cached) $ECHO_C" >&6
14539 else
14540   cat >conftest.$ac_ext <<_ACEOF
14541 #line 14541 "configure"
14542 #include "confdefs.h"
14543 /* System header to define __stub macros and hopefully few prototypes,
14544     which can conflict with char compile (); below.  */
14545 #include <assert.h>
14546 /* Override any gcc2 internal prototype to avoid an error.  */
14547 #ifdef __cplusplus
14548 extern "C"
14549 #endif
14550 /* We use char because int might match the return type of a gcc2
14551    builtin and then its argument prototype would still apply.  */
14552 char compile ();
14553 char (*f) ();
14554
14555 int
14556 main ()
14557 {
14558 /* The GNU C library defines this for functions which it implements
14559     to always fail with ENOSYS.  Some functions are actually named
14560     something starting with __ and the normal name is an alias.  */
14561 #if defined (__stub_compile) || defined (__stub___compile)
14562 choke me
14563 #else
14564 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14565 #endif
14566
14567   ;
14568   return 0;
14569 }
14570 _ACEOF
14571 rm -f conftest.$ac_objext conftest$ac_exeext
14572 if { (eval echo "$as_me:14572: \"$ac_link\"") >&5
14573   (eval $ac_link) 2>&5
14574   ac_status=$?
14575   echo "$as_me:14575: \$? = $ac_status" >&5
14576   (exit $ac_status); } &&
14577          { ac_try='test -s conftest$ac_exeext'
14578   { (eval echo "$as_me:14578: \"$ac_try\"") >&5
14579   (eval $ac_try) 2>&5
14580   ac_status=$?
14581   echo "$as_me:14581: \$? = $ac_status" >&5
14582   (exit $ac_status); }; }; then
14583   ac_cv_func_compile=yes
14584 else
14585   echo "$as_me: failed program was:" >&5
14586 cat conftest.$ac_ext >&5
14587 ac_cv_func_compile=no
14588 fi
14589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14590 fi
14591 echo "$as_me:14591: result: $ac_cv_func_compile" >&5
14592 echo "${ECHO_T}$ac_cv_func_compile" >&6
14593 if test $ac_cv_func_compile = yes; then
14594   cf_regex_func=compile
14595 else
14596
14597                 echo "$as_me:14597: checking for compile in -lgen" >&5
14598 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14599 if test "${ac_cv_lib_gen_compile+set}" = set; then
14600   echo $ECHO_N "(cached) $ECHO_C" >&6
14601 else
14602   ac_check_lib_save_LIBS=$LIBS
14603 LIBS="-lgen  $LIBS"
14604 cat >conftest.$ac_ext <<_ACEOF
14605 #line 14605 "configure"
14606 #include "confdefs.h"
14607
14608 /* Override any gcc2 internal prototype to avoid an error.  */
14609 #ifdef __cplusplus
14610 extern "C"
14611 #endif
14612 /* We use char because int might match the return type of a gcc2
14613    builtin and then its argument prototype would still apply.  */
14614 char compile ();
14615 int
14616 main ()
14617 {
14618 compile ();
14619   ;
14620   return 0;
14621 }
14622 _ACEOF
14623 rm -f conftest.$ac_objext conftest$ac_exeext
14624 if { (eval echo "$as_me:14624: \"$ac_link\"") >&5
14625   (eval $ac_link) 2>&5
14626   ac_status=$?
14627   echo "$as_me:14627: \$? = $ac_status" >&5
14628   (exit $ac_status); } &&
14629          { ac_try='test -s conftest$ac_exeext'
14630   { (eval echo "$as_me:14630: \"$ac_try\"") >&5
14631   (eval $ac_try) 2>&5
14632   ac_status=$?
14633   echo "$as_me:14633: \$? = $ac_status" >&5
14634   (exit $ac_status); }; }; then
14635   ac_cv_lib_gen_compile=yes
14636 else
14637   echo "$as_me: failed program was:" >&5
14638 cat conftest.$ac_ext >&5
14639 ac_cv_lib_gen_compile=no
14640 fi
14641 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14642 LIBS=$ac_check_lib_save_LIBS
14643 fi
14644 echo "$as_me:14644: result: $ac_cv_lib_gen_compile" >&5
14645 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14646 if test $ac_cv_lib_gen_compile = yes; then
14647
14648 cf_add_libs="-lgen"
14649 # Filter out duplicates - this happens with badly-designed ".pc" files...
14650 for cf_add_1lib in $LIBS
14651 do
14652         for cf_add_2lib in $cf_add_libs
14653         do
14654                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14655                 then
14656                         cf_add_1lib=
14657                         break
14658                 fi
14659         done
14660         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14661 done
14662 LIBS="$cf_add_libs"
14663
14664                                 cf_regex_func=compile
14665 fi
14666
14667 fi
14668
14669 fi
14670
14671 if test "$cf_regex_func" = no ; then
14672         { echo "$as_me:14672: WARNING: cannot find regular expression library" >&5
14673 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14674 fi
14675
14676 echo "$as_me:14676: checking for regular-expression headers" >&5
14677 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14678 if test "${cf_cv_regex_hdrs+set}" = set; then
14679   echo $ECHO_N "(cached) $ECHO_C" >&6
14680 else
14681
14682 cf_cv_regex_hdrs=no
14683 case $cf_regex_func in #(vi
14684 compile) #(vi
14685         for cf_regex_hdr in regexp.h regexpr.h
14686         do
14687                 cat >conftest.$ac_ext <<_ACEOF
14688 #line 14688 "configure"
14689 #include "confdefs.h"
14690 #include <$cf_regex_hdr>
14691 int
14692 main ()
14693 {
14694
14695                         char *p = compile("", "", "", 0);
14696                         int x = step("", "");
14697
14698   ;
14699   return 0;
14700 }
14701 _ACEOF
14702 rm -f conftest.$ac_objext conftest$ac_exeext
14703 if { (eval echo "$as_me:14703: \"$ac_link\"") >&5
14704   (eval $ac_link) 2>&5
14705   ac_status=$?
14706   echo "$as_me:14706: \$? = $ac_status" >&5
14707   (exit $ac_status); } &&
14708          { ac_try='test -s conftest$ac_exeext'
14709   { (eval echo "$as_me:14709: \"$ac_try\"") >&5
14710   (eval $ac_try) 2>&5
14711   ac_status=$?
14712   echo "$as_me:14712: \$? = $ac_status" >&5
14713   (exit $ac_status); }; }; then
14714
14715                         cf_cv_regex_hdrs=$cf_regex_hdr
14716                         break
14717
14718 else
14719   echo "$as_me: failed program was:" >&5
14720 cat conftest.$ac_ext >&5
14721 fi
14722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14723         done
14724         ;;
14725 *)
14726         for cf_regex_hdr in regex.h
14727         do
14728                 cat >conftest.$ac_ext <<_ACEOF
14729 #line 14729 "configure"
14730 #include "confdefs.h"
14731 #include <sys/types.h>
14732 #include <$cf_regex_hdr>
14733 int
14734 main ()
14735 {
14736
14737                         regex_t *p;
14738                         int x = regcomp(p, "", 0);
14739                         int y = regexec(p, "", 0, 0, 0);
14740                         regfree(p);
14741
14742   ;
14743   return 0;
14744 }
14745 _ACEOF
14746 rm -f conftest.$ac_objext conftest$ac_exeext
14747 if { (eval echo "$as_me:14747: \"$ac_link\"") >&5
14748   (eval $ac_link) 2>&5
14749   ac_status=$?
14750   echo "$as_me:14750: \$? = $ac_status" >&5
14751   (exit $ac_status); } &&
14752          { ac_try='test -s conftest$ac_exeext'
14753   { (eval echo "$as_me:14753: \"$ac_try\"") >&5
14754   (eval $ac_try) 2>&5
14755   ac_status=$?
14756   echo "$as_me:14756: \$? = $ac_status" >&5
14757   (exit $ac_status); }; }; then
14758
14759                         cf_cv_regex_hdrs=$cf_regex_hdr
14760                         break
14761
14762 else
14763   echo "$as_me: failed program was:" >&5
14764 cat conftest.$ac_ext >&5
14765 fi
14766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14767         done
14768         ;;
14769 esac
14770
14771 fi
14772 echo "$as_me:14772: result: $cf_cv_regex_hdrs" >&5
14773 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14774
14775 case $cf_cv_regex_hdrs in #(vi
14776     no)        { echo "$as_me:14776: WARNING: no regular expression header found" >&5
14777 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14778     regex.h)
14779 cat >>confdefs.h <<\EOF
14780 #define HAVE_REGEX_H_FUNCS 1
14781 EOF
14782  ;; #(vi
14783     regexp.h)
14784 cat >>confdefs.h <<\EOF
14785 #define HAVE_REGEXP_H_FUNCS 1
14786 EOF
14787  ;; #(vi
14788     regexpr.h)
14789 cat >>confdefs.h <<\EOF
14790 #define HAVE_REGEXPR_H_FUNCS 1
14791 EOF
14792  ;;
14793 esac
14794
14795 for ac_header in \
14796 fcntl.h \
14797 getopt.h \
14798 limits.h \
14799 locale.h \
14800 math.h \
14801 poll.h \
14802 sys/bsdtypes.h \
14803 sys/ioctl.h \
14804 sys/param.h \
14805 sys/poll.h \
14806 sys/select.h \
14807 sys/time.h \
14808 sys/times.h \
14809 ttyent.h \
14810 unistd.h \
14811 wctype.h \
14812
14813 do
14814 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14815 echo "$as_me:14815: checking for $ac_header" >&5
14816 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14817 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14818   echo $ECHO_N "(cached) $ECHO_C" >&6
14819 else
14820   cat >conftest.$ac_ext <<_ACEOF
14821 #line 14821 "configure"
14822 #include "confdefs.h"
14823 #include <$ac_header>
14824 _ACEOF
14825 if { (eval echo "$as_me:14825: \"$ac_cpp conftest.$ac_ext\"") >&5
14826   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14827   ac_status=$?
14828   egrep -v '^ *\+' conftest.er1 >conftest.err
14829   rm -f conftest.er1
14830   cat conftest.err >&5
14831   echo "$as_me:14831: \$? = $ac_status" >&5
14832   (exit $ac_status); } >/dev/null; then
14833   if test -s conftest.err; then
14834     ac_cpp_err=$ac_c_preproc_warn_flag
14835   else
14836     ac_cpp_err=
14837   fi
14838 else
14839   ac_cpp_err=yes
14840 fi
14841 if test -z "$ac_cpp_err"; then
14842   eval "$as_ac_Header=yes"
14843 else
14844   echo "$as_me: failed program was:" >&5
14845   cat conftest.$ac_ext >&5
14846   eval "$as_ac_Header=no"
14847 fi
14848 rm -f conftest.err conftest.$ac_ext
14849 fi
14850 echo "$as_me:14850: result: `eval echo '${'$as_ac_Header'}'`" >&5
14851 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14852 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14853   cat >>confdefs.h <<EOF
14854 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14855 EOF
14856
14857 fi
14858 done
14859
14860 for ac_header in unistd.h getopt.h
14861 do
14862 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14863 echo "$as_me:14863: checking for $ac_header" >&5
14864 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14865 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14866   echo $ECHO_N "(cached) $ECHO_C" >&6
14867 else
14868   cat >conftest.$ac_ext <<_ACEOF
14869 #line 14869 "configure"
14870 #include "confdefs.h"
14871 #include <$ac_header>
14872 _ACEOF
14873 if { (eval echo "$as_me:14873: \"$ac_cpp conftest.$ac_ext\"") >&5
14874   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14875   ac_status=$?
14876   egrep -v '^ *\+' conftest.er1 >conftest.err
14877   rm -f conftest.er1
14878   cat conftest.err >&5
14879   echo "$as_me:14879: \$? = $ac_status" >&5
14880   (exit $ac_status); } >/dev/null; then
14881   if test -s conftest.err; then
14882     ac_cpp_err=$ac_c_preproc_warn_flag
14883   else
14884     ac_cpp_err=
14885   fi
14886 else
14887   ac_cpp_err=yes
14888 fi
14889 if test -z "$ac_cpp_err"; then
14890   eval "$as_ac_Header=yes"
14891 else
14892   echo "$as_me: failed program was:" >&5
14893   cat conftest.$ac_ext >&5
14894   eval "$as_ac_Header=no"
14895 fi
14896 rm -f conftest.err conftest.$ac_ext
14897 fi
14898 echo "$as_me:14898: result: `eval echo '${'$as_ac_Header'}'`" >&5
14899 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14900 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14901   cat >>confdefs.h <<EOF
14902 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14903 EOF
14904
14905 fi
14906 done
14907
14908 echo "$as_me:14908: checking for header declaring getopt variables" >&5
14909 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14910 if test "${cf_cv_getopt_header+set}" = set; then
14911   echo $ECHO_N "(cached) $ECHO_C" >&6
14912 else
14913
14914 cf_cv_getopt_header=none
14915 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14916 do
14917 cat >conftest.$ac_ext <<_ACEOF
14918 #line 14918 "configure"
14919 #include "confdefs.h"
14920
14921 #include <$cf_header>
14922 int
14923 main ()
14924 {
14925 int x = optind; char *y = optarg
14926   ;
14927   return 0;
14928 }
14929 _ACEOF
14930 rm -f conftest.$ac_objext
14931 if { (eval echo "$as_me:14931: \"$ac_compile\"") >&5
14932   (eval $ac_compile) 2>&5
14933   ac_status=$?
14934   echo "$as_me:14934: \$? = $ac_status" >&5
14935   (exit $ac_status); } &&
14936          { ac_try='test -s conftest.$ac_objext'
14937   { (eval echo "$as_me:14937: \"$ac_try\"") >&5
14938   (eval $ac_try) 2>&5
14939   ac_status=$?
14940   echo "$as_me:14940: \$? = $ac_status" >&5
14941   (exit $ac_status); }; }; then
14942   cf_cv_getopt_header=$cf_header
14943  break
14944 else
14945   echo "$as_me: failed program was:" >&5
14946 cat conftest.$ac_ext >&5
14947 fi
14948 rm -f conftest.$ac_objext conftest.$ac_ext
14949 done
14950
14951 fi
14952 echo "$as_me:14952: result: $cf_cv_getopt_header" >&5
14953 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14954 if test $cf_cv_getopt_header != none ; then
14955
14956 cat >>confdefs.h <<\EOF
14957 #define HAVE_GETOPT_HEADER 1
14958 EOF
14959
14960 fi
14961 if test $cf_cv_getopt_header = getopt.h ; then
14962
14963 cat >>confdefs.h <<\EOF
14964 #define NEED_GETOPT_H 1
14965 EOF
14966
14967 fi
14968
14969 # check for ISC (this may also define _POSIX_SOURCE)
14970 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14971 if test "x$ISC" = xyes ; then
14972
14973 echo "$as_me:14973: checking for main in -lcposix" >&5
14974 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14975 if test "${ac_cv_lib_cposix_main+set}" = set; then
14976   echo $ECHO_N "(cached) $ECHO_C" >&6
14977 else
14978   ac_check_lib_save_LIBS=$LIBS
14979 LIBS="-lcposix  $LIBS"
14980 cat >conftest.$ac_ext <<_ACEOF
14981 #line 14981 "configure"
14982 #include "confdefs.h"
14983
14984 int
14985 main ()
14986 {
14987 main ();
14988   ;
14989   return 0;
14990 }
14991 _ACEOF
14992 rm -f conftest.$ac_objext conftest$ac_exeext
14993 if { (eval echo "$as_me:14993: \"$ac_link\"") >&5
14994   (eval $ac_link) 2>&5
14995   ac_status=$?
14996   echo "$as_me:14996: \$? = $ac_status" >&5
14997   (exit $ac_status); } &&
14998          { ac_try='test -s conftest$ac_exeext'
14999   { (eval echo "$as_me:14999: \"$ac_try\"") >&5
15000   (eval $ac_try) 2>&5
15001   ac_status=$?
15002   echo "$as_me:15002: \$? = $ac_status" >&5
15003   (exit $ac_status); }; }; then
15004   ac_cv_lib_cposix_main=yes
15005 else
15006   echo "$as_me: failed program was:" >&5
15007 cat conftest.$ac_ext >&5
15008 ac_cv_lib_cposix_main=no
15009 fi
15010 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15011 LIBS=$ac_check_lib_save_LIBS
15012 fi
15013 echo "$as_me:15013: result: $ac_cv_lib_cposix_main" >&5
15014 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15015 if test $ac_cv_lib_cposix_main = yes; then
15016   cat >>confdefs.h <<EOF
15017 #define HAVE_LIBCPOSIX 1
15018 EOF
15019
15020   LIBS="-lcposix $LIBS"
15021
15022 fi
15023
15024         echo "$as_me:15024: checking for bzero in -linet" >&5
15025 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15026 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15027   echo $ECHO_N "(cached) $ECHO_C" >&6
15028 else
15029   ac_check_lib_save_LIBS=$LIBS
15030 LIBS="-linet  $LIBS"
15031 cat >conftest.$ac_ext <<_ACEOF
15032 #line 15032 "configure"
15033 #include "confdefs.h"
15034
15035 /* Override any gcc2 internal prototype to avoid an error.  */
15036 #ifdef __cplusplus
15037 extern "C"
15038 #endif
15039 /* We use char because int might match the return type of a gcc2
15040    builtin and then its argument prototype would still apply.  */
15041 char bzero ();
15042 int
15043 main ()
15044 {
15045 bzero ();
15046   ;
15047   return 0;
15048 }
15049 _ACEOF
15050 rm -f conftest.$ac_objext conftest$ac_exeext
15051 if { (eval echo "$as_me:15051: \"$ac_link\"") >&5
15052   (eval $ac_link) 2>&5
15053   ac_status=$?
15054   echo "$as_me:15054: \$? = $ac_status" >&5
15055   (exit $ac_status); } &&
15056          { ac_try='test -s conftest$ac_exeext'
15057   { (eval echo "$as_me:15057: \"$ac_try\"") >&5
15058   (eval $ac_try) 2>&5
15059   ac_status=$?
15060   echo "$as_me:15060: \$? = $ac_status" >&5
15061   (exit $ac_status); }; }; then
15062   ac_cv_lib_inet_bzero=yes
15063 else
15064   echo "$as_me: failed program was:" >&5
15065 cat conftest.$ac_ext >&5
15066 ac_cv_lib_inet_bzero=no
15067 fi
15068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15069 LIBS=$ac_check_lib_save_LIBS
15070 fi
15071 echo "$as_me:15071: result: $ac_cv_lib_inet_bzero" >&5
15072 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15073 if test $ac_cv_lib_inet_bzero = yes; then
15074
15075 cf_add_libs="-linet"
15076 # Filter out duplicates - this happens with badly-designed ".pc" files...
15077 for cf_add_1lib in $LIBS
15078 do
15079         for cf_add_2lib in $cf_add_libs
15080         do
15081                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15082                 then
15083                         cf_add_1lib=
15084                         break
15085                 fi
15086         done
15087         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15088 done
15089 LIBS="$cf_add_libs"
15090
15091 fi
15092 fi
15093
15094 echo "$as_me:15094: checking if sys/time.h works with sys/select.h" >&5
15095 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15096 if test "${cf_cv_sys_time_select+set}" = set; then
15097   echo $ECHO_N "(cached) $ECHO_C" >&6
15098 else
15099
15100 cat >conftest.$ac_ext <<_ACEOF
15101 #line 15101 "configure"
15102 #include "confdefs.h"
15103
15104 #include <sys/types.h>
15105 #ifdef HAVE_SYS_TIME_H
15106 #include <sys/time.h>
15107 #endif
15108 #ifdef HAVE_SYS_SELECT_H
15109 #include <sys/select.h>
15110 #endif
15111
15112 int
15113 main ()
15114 {
15115
15116   ;
15117   return 0;
15118 }
15119 _ACEOF
15120 rm -f conftest.$ac_objext
15121 if { (eval echo "$as_me:15121: \"$ac_compile\"") >&5
15122   (eval $ac_compile) 2>&5
15123   ac_status=$?
15124   echo "$as_me:15124: \$? = $ac_status" >&5
15125   (exit $ac_status); } &&
15126          { ac_try='test -s conftest.$ac_objext'
15127   { (eval echo "$as_me:15127: \"$ac_try\"") >&5
15128   (eval $ac_try) 2>&5
15129   ac_status=$?
15130   echo "$as_me:15130: \$? = $ac_status" >&5
15131   (exit $ac_status); }; }; then
15132   cf_cv_sys_time_select=yes
15133 else
15134   echo "$as_me: failed program was:" >&5
15135 cat conftest.$ac_ext >&5
15136 cf_cv_sys_time_select=no
15137 fi
15138 rm -f conftest.$ac_objext conftest.$ac_ext
15139
15140 fi
15141
15142 echo "$as_me:15142: result: $cf_cv_sys_time_select" >&5
15143 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15144 test "$cf_cv_sys_time_select" = yes &&
15145 cat >>confdefs.h <<\EOF
15146 #define HAVE_SYS_TIME_SELECT 1
15147 EOF
15148
15149 ###     checks for compiler characteristics
15150 ac_ext=c
15151 ac_cpp='$CPP $CPPFLAGS'
15152 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15153 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15154 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15155 ac_main_return=return
15156
15157 echo "$as_me:15157: checking for an ANSI C-conforming const" >&5
15158 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15159 if test "${ac_cv_c_const+set}" = set; then
15160   echo $ECHO_N "(cached) $ECHO_C" >&6
15161 else
15162   cat >conftest.$ac_ext <<_ACEOF
15163 #line 15163 "configure"
15164 #include "confdefs.h"
15165
15166 int
15167 main ()
15168 {
15169 /* FIXME: Include the comments suggested by Paul. */
15170 #ifndef __cplusplus
15171   /* Ultrix mips cc rejects this.  */
15172   typedef int charset[2];
15173   const charset x;
15174   /* SunOS 4.1.1 cc rejects this.  */
15175   char const *const *ccp;
15176   char **p;
15177   /* NEC SVR4.0.2 mips cc rejects this.  */
15178   struct point {int x, y;};
15179   static struct point const zero = {0,0};
15180   /* AIX XL C 1.02.0.0 rejects this.
15181      It does not let you subtract one const X* pointer from another in
15182      an arm of an if-expression whose if-part is not a constant
15183      expression */
15184   const char *g = "string";
15185   ccp = &g + (g ? g-g : 0);
15186   /* HPUX 7.0 cc rejects these. */
15187   ++ccp;
15188   p = (char**) ccp;
15189   ccp = (char const *const *) p;
15190   { /* SCO 3.2v4 cc rejects this.  */
15191     char *t;
15192     char const *s = 0 ? (char *) 0 : (char const *) 0;
15193
15194     *t++ = 0;
15195   }
15196   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15197     int x[] = {25, 17};
15198     const int *foo = &x[0];
15199     ++foo;
15200   }
15201   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15202     typedef const int *iptr;
15203     iptr p = 0;
15204     ++p;
15205   }
15206   { /* AIX XL C 1.02.0.0 rejects this saying
15207        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15208     struct s { int j; const int *ap[3]; };
15209     struct s *b; b->j = 5;
15210   }
15211   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15212     const int foo = 10;
15213   }
15214 #endif
15215
15216   ;
15217   return 0;
15218 }
15219 _ACEOF
15220 rm -f conftest.$ac_objext
15221 if { (eval echo "$as_me:15221: \"$ac_compile\"") >&5
15222   (eval $ac_compile) 2>&5
15223   ac_status=$?
15224   echo "$as_me:15224: \$? = $ac_status" >&5
15225   (exit $ac_status); } &&
15226          { ac_try='test -s conftest.$ac_objext'
15227   { (eval echo "$as_me:15227: \"$ac_try\"") >&5
15228   (eval $ac_try) 2>&5
15229   ac_status=$?
15230   echo "$as_me:15230: \$? = $ac_status" >&5
15231   (exit $ac_status); }; }; then
15232   ac_cv_c_const=yes
15233 else
15234   echo "$as_me: failed program was:" >&5
15235 cat conftest.$ac_ext >&5
15236 ac_cv_c_const=no
15237 fi
15238 rm -f conftest.$ac_objext conftest.$ac_ext
15239 fi
15240 echo "$as_me:15240: result: $ac_cv_c_const" >&5
15241 echo "${ECHO_T}$ac_cv_c_const" >&6
15242 if test $ac_cv_c_const = no; then
15243
15244 cat >>confdefs.h <<\EOF
15245 #define const
15246 EOF
15247
15248 fi
15249
15250 echo "$as_me:15250: checking for inline" >&5
15251 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15252 if test "${ac_cv_c_inline+set}" = set; then
15253   echo $ECHO_N "(cached) $ECHO_C" >&6
15254 else
15255   ac_cv_c_inline=no
15256 for ac_kw in inline __inline__ __inline; do
15257   cat >conftest.$ac_ext <<_ACEOF
15258 #line 15258 "configure"
15259 #include "confdefs.h"
15260 #ifndef __cplusplus
15261 static $ac_kw int static_foo () {return 0; }
15262 $ac_kw int foo () {return 0; }
15263 #endif
15264
15265 _ACEOF
15266 rm -f conftest.$ac_objext
15267 if { (eval echo "$as_me:15267: \"$ac_compile\"") >&5
15268   (eval $ac_compile) 2>&5
15269   ac_status=$?
15270   echo "$as_me:15270: \$? = $ac_status" >&5
15271   (exit $ac_status); } &&
15272          { ac_try='test -s conftest.$ac_objext'
15273   { (eval echo "$as_me:15273: \"$ac_try\"") >&5
15274   (eval $ac_try) 2>&5
15275   ac_status=$?
15276   echo "$as_me:15276: \$? = $ac_status" >&5
15277   (exit $ac_status); }; }; then
15278   ac_cv_c_inline=$ac_kw; break
15279 else
15280   echo "$as_me: failed program was:" >&5
15281 cat conftest.$ac_ext >&5
15282 fi
15283 rm -f conftest.$ac_objext conftest.$ac_ext
15284 done
15285
15286 fi
15287 echo "$as_me:15287: result: $ac_cv_c_inline" >&5
15288 echo "${ECHO_T}$ac_cv_c_inline" >&6
15289 case $ac_cv_c_inline in
15290   inline | yes) ;;
15291   no)
15292 cat >>confdefs.h <<\EOF
15293 #define inline
15294 EOF
15295  ;;
15296   *)  cat >>confdefs.h <<EOF
15297 #define inline $ac_cv_c_inline
15298 EOF
15299  ;;
15300 esac
15301
15302 NCURSES_INLINE=
15303 if test "$ac_cv_c_inline" != no ; then
15304   NCURSES_INLINE=inline
15305   if test "$INTEL_COMPILER" = yes
15306   then
15307     :
15308   elif test "$CLANG_COMPILER" = yes
15309   then
15310     :
15311   elif test "$GCC" = yes
15312   then
15313     echo "$as_me:15313: checking if $CC supports options to tune inlining" >&5
15314 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15315 if test "${cf_cv_gcc_inline+set}" = set; then
15316   echo $ECHO_N "(cached) $ECHO_C" >&6
15317 else
15318
15319       cf_save_CFLAGS=$CFLAGS
15320       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15321       cat >conftest.$ac_ext <<_ACEOF
15322 #line 15322 "configure"
15323 #include "confdefs.h"
15324 inline int foo(void) { return 1; }
15325 int
15326 main ()
15327 {
15328 ${cf_cv_main_return:-return} foo()
15329   ;
15330   return 0;
15331 }
15332 _ACEOF
15333 rm -f conftest.$ac_objext
15334 if { (eval echo "$as_me:15334: \"$ac_compile\"") >&5
15335   (eval $ac_compile) 2>&5
15336   ac_status=$?
15337   echo "$as_me:15337: \$? = $ac_status" >&5
15338   (exit $ac_status); } &&
15339          { ac_try='test -s conftest.$ac_objext'
15340   { (eval echo "$as_me:15340: \"$ac_try\"") >&5
15341   (eval $ac_try) 2>&5
15342   ac_status=$?
15343   echo "$as_me:15343: \$? = $ac_status" >&5
15344   (exit $ac_status); }; }; then
15345   cf_cv_gcc_inline=yes
15346 else
15347   echo "$as_me: failed program was:" >&5
15348 cat conftest.$ac_ext >&5
15349 cf_cv_gcc_inline=no
15350 fi
15351 rm -f conftest.$ac_objext conftest.$ac_ext
15352       CFLAGS=$cf_save_CFLAGS
15353
15354 fi
15355 echo "$as_me:15355: result: $cf_cv_gcc_inline" >&5
15356 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15357     if test "$cf_cv_gcc_inline" = yes ; then
15358
15359 cf_fix_cppflags=no
15360 cf_new_cflags=
15361 cf_new_cppflags=
15362 cf_new_extra_cppflags=
15363
15364 for cf_add_cflags in --param max-inline-insns-single=1200
15365 do
15366 case $cf_fix_cppflags in
15367 no)
15368         case $cf_add_cflags in #(vi
15369         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15370                 case $cf_add_cflags in
15371                 -D*)
15372                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15373
15374                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15375                                 && test -z "${cf_tst_cflags}" \
15376                                 && cf_fix_cppflags=yes
15377
15378                         if test $cf_fix_cppflags = yes ; then
15379                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15380                                 continue
15381                         elif test "${cf_tst_cflags}" = "\"'" ; then
15382                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15383                                 continue
15384                         fi
15385                         ;;
15386                 esac
15387                 case "$CPPFLAGS" in
15388                 *$cf_add_cflags) #(vi
15389                         ;;
15390                 *) #(vi
15391                         case $cf_add_cflags in #(vi
15392                         -D*)
15393                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15394
15395 CPPFLAGS=`echo "$CPPFLAGS" | \
15396         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15397                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15398
15399                                 ;;
15400                         esac
15401                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15402                         ;;
15403                 esac
15404                 ;;
15405         *)
15406                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15407                 ;;
15408         esac
15409         ;;
15410 yes)
15411         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15412
15413         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15414
15415         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15416                 && test -z "${cf_tst_cflags}" \
15417                 && cf_fix_cppflags=no
15418         ;;
15419 esac
15420 done
15421
15422 if test -n "$cf_new_cflags" ; then
15423
15424         CFLAGS="$CFLAGS $cf_new_cflags"
15425 fi
15426
15427 if test -n "$cf_new_cppflags" ; then
15428
15429         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15430 fi
15431
15432 if test -n "$cf_new_extra_cppflags" ; then
15433
15434         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15435 fi
15436
15437     fi
15438   fi
15439 fi
15440
15441 echo "$as_me:15441: checking for signal global datatype" >&5
15442 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15443 if test "${cf_cv_sig_atomic_t+set}" = set; then
15444   echo $ECHO_N "(cached) $ECHO_C" >&6
15445 else
15446
15447         for cf_type in \
15448                 "volatile sig_atomic_t" \
15449                 "sig_atomic_t" \
15450                 "int"
15451         do
15452         cat >conftest.$ac_ext <<_ACEOF
15453 #line 15453 "configure"
15454 #include "confdefs.h"
15455
15456 #include <sys/types.h>
15457 #include <signal.h>
15458 #include <stdio.h>
15459
15460 extern $cf_type x;
15461 $cf_type x;
15462 static void handler(int sig)
15463 {
15464         x = 5;
15465 }
15466 int
15467 main ()
15468 {
15469 signal(SIGINT, handler);
15470                  x = 1
15471   ;
15472   return 0;
15473 }
15474 _ACEOF
15475 rm -f conftest.$ac_objext
15476 if { (eval echo "$as_me:15476: \"$ac_compile\"") >&5
15477   (eval $ac_compile) 2>&5
15478   ac_status=$?
15479   echo "$as_me:15479: \$? = $ac_status" >&5
15480   (exit $ac_status); } &&
15481          { ac_try='test -s conftest.$ac_objext'
15482   { (eval echo "$as_me:15482: \"$ac_try\"") >&5
15483   (eval $ac_try) 2>&5
15484   ac_status=$?
15485   echo "$as_me:15485: \$? = $ac_status" >&5
15486   (exit $ac_status); }; }; then
15487   cf_cv_sig_atomic_t=$cf_type
15488 else
15489   echo "$as_me: failed program was:" >&5
15490 cat conftest.$ac_ext >&5
15491 cf_cv_sig_atomic_t=no
15492 fi
15493 rm -f conftest.$ac_objext conftest.$ac_ext
15494                 test "$cf_cv_sig_atomic_t" != no && break
15495         done
15496
15497 fi
15498
15499 echo "$as_me:15499: result: $cf_cv_sig_atomic_t" >&5
15500 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15501 test "$cf_cv_sig_atomic_t" != no &&
15502 cat >>confdefs.h <<EOF
15503 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15504 EOF
15505
15506 if test $NCURSES_CHTYPE = auto ; then
15507
15508 echo "$as_me:15508: checking for type of chtype" >&5
15509 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15510 if test "${cf_cv_typeof_chtype+set}" = set; then
15511   echo $ECHO_N "(cached) $ECHO_C" >&6
15512 else
15513
15514                 if test "$cross_compiling" = yes; then
15515   cf_cv_typeof_chtype=long
15516 else
15517   cat >conftest.$ac_ext <<_ACEOF
15518 #line 15518 "configure"
15519 #include "confdefs.h"
15520
15521 #define WANT_BITS 31
15522 #include <stdio.h>
15523 int main()
15524 {
15525         FILE *fp = fopen("cf_test.out", "w");
15526         if (fp != 0) {
15527                 char *result = "long";
15528                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15529                         int n;
15530                         unsigned int x, y;
15531                         for (n = 0; n < WANT_BITS; n++) {
15532                                 x = (1 << n);
15533                                 y = (x >> n);
15534                                 if (y != 1 || x == 0) {
15535                                         x = 0;
15536                                         break;
15537                                 }
15538                         }
15539                         /*
15540                          * If x is nonzero, an int is big enough for the bits
15541                          * that we want.
15542                          */
15543                         result = (x != 0) ? "int" : "long";
15544                 }
15545                 fputs(result, fp);
15546                 fclose(fp);
15547         }
15548         ${cf_cv_main_return:-return}(0);
15549 }
15550
15551 _ACEOF
15552 rm -f conftest$ac_exeext
15553 if { (eval echo "$as_me:15553: \"$ac_link\"") >&5
15554   (eval $ac_link) 2>&5
15555   ac_status=$?
15556   echo "$as_me:15556: \$? = $ac_status" >&5
15557   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15558   { (eval echo "$as_me:15558: \"$ac_try\"") >&5
15559   (eval $ac_try) 2>&5
15560   ac_status=$?
15561   echo "$as_me:15561: \$? = $ac_status" >&5
15562   (exit $ac_status); }; }; then
15563   cf_cv_typeof_chtype=`cat cf_test.out`
15564 else
15565   echo "$as_me: program exited with status $ac_status" >&5
15566 echo "$as_me: failed program was:" >&5
15567 cat conftest.$ac_ext >&5
15568 cf_cv_typeof_chtype=long
15569 fi
15570 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15571 fi
15572                 rm -f cf_test.out
15573
15574 fi
15575
15576 echo "$as_me:15576: result: $cf_cv_typeof_chtype" >&5
15577 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15578
15579 cat >>confdefs.h <<EOF
15580 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15581 EOF
15582
15583 else
15584         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15585 fi
15586 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15587
15588 echo "$as_me:15588: checking if unsigned literals are legal" >&5
15589 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15590 if test "${cf_cv_unsigned_literals+set}" = set; then
15591   echo $ECHO_N "(cached) $ECHO_C" >&6
15592 else
15593
15594         cat >conftest.$ac_ext <<_ACEOF
15595 #line 15595 "configure"
15596 #include "confdefs.h"
15597
15598 int
15599 main ()
15600 {
15601 long x = 1L + 1UL + 1U + 1
15602   ;
15603   return 0;
15604 }
15605 _ACEOF
15606 rm -f conftest.$ac_objext
15607 if { (eval echo "$as_me:15607: \"$ac_compile\"") >&5
15608   (eval $ac_compile) 2>&5
15609   ac_status=$?
15610   echo "$as_me:15610: \$? = $ac_status" >&5
15611   (exit $ac_status); } &&
15612          { ac_try='test -s conftest.$ac_objext'
15613   { (eval echo "$as_me:15613: \"$ac_try\"") >&5
15614   (eval $ac_try) 2>&5
15615   ac_status=$?
15616   echo "$as_me:15616: \$? = $ac_status" >&5
15617   (exit $ac_status); }; }; then
15618   cf_cv_unsigned_literals=yes
15619 else
15620   echo "$as_me: failed program was:" >&5
15621 cat conftest.$ac_ext >&5
15622 cf_cv_unsigned_literals=no
15623 fi
15624 rm -f conftest.$ac_objext conftest.$ac_ext
15625
15626 fi
15627
15628 echo "$as_me:15628: result: $cf_cv_unsigned_literals" >&5
15629 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15630
15631 cf_cv_1UL="1"
15632 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15633 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15634
15635 if test $NCURSES_MMASK_T = auto ; then
15636         cf_cv_typeof_mmask_t=long
15637 else
15638         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15639 fi
15640 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15641
15642 ###     Checks for external-data
15643
15644 echo "$as_me:15644: checking if external errno is declared" >&5
15645 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15646 if test "${cf_cv_dcl_errno+set}" = set; then
15647   echo $ECHO_N "(cached) $ECHO_C" >&6
15648 else
15649
15650     cat >conftest.$ac_ext <<_ACEOF
15651 #line 15651 "configure"
15652 #include "confdefs.h"
15653
15654 #ifdef HAVE_STDLIB_H
15655 #include <stdlib.h>
15656 #endif
15657 #include <stdio.h>
15658 #include <sys/types.h>
15659 #include <errno.h>
15660 int
15661 main ()
15662 {
15663 int x = (int) errno
15664   ;
15665   return 0;
15666 }
15667 _ACEOF
15668 rm -f conftest.$ac_objext
15669 if { (eval echo "$as_me:15669: \"$ac_compile\"") >&5
15670   (eval $ac_compile) 2>&5
15671   ac_status=$?
15672   echo "$as_me:15672: \$? = $ac_status" >&5
15673   (exit $ac_status); } &&
15674          { ac_try='test -s conftest.$ac_objext'
15675   { (eval echo "$as_me:15675: \"$ac_try\"") >&5
15676   (eval $ac_try) 2>&5
15677   ac_status=$?
15678   echo "$as_me:15678: \$? = $ac_status" >&5
15679   (exit $ac_status); }; }; then
15680   cf_cv_dcl_errno=yes
15681 else
15682   echo "$as_me: failed program was:" >&5
15683 cat conftest.$ac_ext >&5
15684 cf_cv_dcl_errno=no
15685 fi
15686 rm -f conftest.$ac_objext conftest.$ac_ext
15687
15688 fi
15689 echo "$as_me:15689: result: $cf_cv_dcl_errno" >&5
15690 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15691
15692 if test "$cf_cv_dcl_errno" = no ; then
15693
15694 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15695
15696     cat >>confdefs.h <<EOF
15697 #define $cf_result 1
15698 EOF
15699
15700 fi
15701
15702 # It's possible (for near-UNIX clones) that the data doesn't exist
15703
15704 echo "$as_me:15704: checking if external errno exists" >&5
15705 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15706 if test "${cf_cv_have_errno+set}" = set; then
15707   echo $ECHO_N "(cached) $ECHO_C" >&6
15708 else
15709
15710     cat >conftest.$ac_ext <<_ACEOF
15711 #line 15711 "configure"
15712 #include "confdefs.h"
15713
15714 #undef errno
15715 extern int errno;
15716
15717 int
15718 main ()
15719 {
15720 errno = 2
15721   ;
15722   return 0;
15723 }
15724 _ACEOF
15725 rm -f conftest.$ac_objext conftest$ac_exeext
15726 if { (eval echo "$as_me:15726: \"$ac_link\"") >&5
15727   (eval $ac_link) 2>&5
15728   ac_status=$?
15729   echo "$as_me:15729: \$? = $ac_status" >&5
15730   (exit $ac_status); } &&
15731          { ac_try='test -s conftest$ac_exeext'
15732   { (eval echo "$as_me:15732: \"$ac_try\"") >&5
15733   (eval $ac_try) 2>&5
15734   ac_status=$?
15735   echo "$as_me:15735: \$? = $ac_status" >&5
15736   (exit $ac_status); }; }; then
15737   cf_cv_have_errno=yes
15738 else
15739   echo "$as_me: failed program was:" >&5
15740 cat conftest.$ac_ext >&5
15741 cf_cv_have_errno=no
15742 fi
15743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15744
15745 fi
15746 echo "$as_me:15746: result: $cf_cv_have_errno" >&5
15747 echo "${ECHO_T}$cf_cv_have_errno" >&6
15748
15749 if test "$cf_cv_have_errno" = yes ; then
15750
15751 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15752
15753     cat >>confdefs.h <<EOF
15754 #define $cf_result 1
15755 EOF
15756
15757 fi
15758
15759 echo "$as_me:15759: checking if data-only library module links" >&5
15760 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15761 if test "${cf_cv_link_dataonly+set}" = set; then
15762   echo $ECHO_N "(cached) $ECHO_C" >&6
15763 else
15764
15765         rm -f conftest.a
15766         cat >conftest.$ac_ext <<EOF
15767 #line 15767 "configure"
15768 int     testdata[3] = { 123, 456, 789 };
15769 EOF
15770         if { (eval echo "$as_me:15770: \"$ac_compile\"") >&5
15771   (eval $ac_compile) 2>&5
15772   ac_status=$?
15773   echo "$as_me:15773: \$? = $ac_status" >&5
15774   (exit $ac_status); } ; then
15775                 mv conftest.o data.o && \
15776                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15777         fi
15778         rm -f conftest.$ac_ext data.o
15779         cat >conftest.$ac_ext <<EOF
15780 #line 15780 "configure"
15781 int     testfunc()
15782 {
15783 #if defined(NeXT)
15784         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15785 #else
15786         extern int testdata[3];
15787         return testdata[0] == 123
15788            &&  testdata[1] == 456
15789            &&  testdata[2] == 789;
15790 #endif
15791 }
15792 EOF
15793         if { (eval echo "$as_me:15793: \"$ac_compile\"") >&5
15794   (eval $ac_compile) 2>&5
15795   ac_status=$?
15796   echo "$as_me:15796: \$? = $ac_status" >&5
15797   (exit $ac_status); }; then
15798                 mv conftest.o func.o && \
15799                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15800         fi
15801         rm -f conftest.$ac_ext func.o
15802         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15803         cf_saveLIBS="$LIBS"
15804         LIBS="conftest.a $LIBS"
15805         if test "$cross_compiling" = yes; then
15806   cf_cv_link_dataonly=unknown
15807 else
15808   cat >conftest.$ac_ext <<_ACEOF
15809 #line 15809 "configure"
15810 #include "confdefs.h"
15811
15812         int main()
15813         {
15814                 extern int testfunc();
15815                 ${cf_cv_main_return:-return} (!testfunc());
15816         }
15817
15818 _ACEOF
15819 rm -f conftest$ac_exeext
15820 if { (eval echo "$as_me:15820: \"$ac_link\"") >&5
15821   (eval $ac_link) 2>&5
15822   ac_status=$?
15823   echo "$as_me:15823: \$? = $ac_status" >&5
15824   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15825   { (eval echo "$as_me:15825: \"$ac_try\"") >&5
15826   (eval $ac_try) 2>&5
15827   ac_status=$?
15828   echo "$as_me:15828: \$? = $ac_status" >&5
15829   (exit $ac_status); }; }; then
15830   cf_cv_link_dataonly=yes
15831 else
15832   echo "$as_me: program exited with status $ac_status" >&5
15833 echo "$as_me: failed program was:" >&5
15834 cat conftest.$ac_ext >&5
15835 cf_cv_link_dataonly=no
15836 fi
15837 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15838 fi
15839         LIBS="$cf_saveLIBS"
15840
15841 fi
15842
15843 echo "$as_me:15843: result: $cf_cv_link_dataonly" >&5
15844 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15845
15846 if test "$cf_cv_link_dataonly" = no ; then
15847
15848 cat >>confdefs.h <<\EOF
15849 #define BROKEN_LINKER 1
15850 EOF
15851
15852         BROKEN_LINKER=1
15853 fi
15854
15855 ###     Checks for library functions.
15856
15857 for ac_func in \
15858 getcwd \
15859 getegid \
15860 geteuid \
15861 getttynam \
15862 issetugid \
15863 poll \
15864 putenv \
15865 remove \
15866 select \
15867 setbuf \
15868 setbuffer \
15869 setenv \
15870 setvbuf \
15871 sigaction \
15872 sigvec \
15873 strdup \
15874 strstr \
15875 tcgetpgrp \
15876 times \
15877 vsnprintf \
15878
15879 do
15880 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15881 echo "$as_me:15881: checking for $ac_func" >&5
15882 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15883 if eval "test \"\${$as_ac_var+set}\" = set"; then
15884   echo $ECHO_N "(cached) $ECHO_C" >&6
15885 else
15886   cat >conftest.$ac_ext <<_ACEOF
15887 #line 15887 "configure"
15888 #include "confdefs.h"
15889 /* System header to define __stub macros and hopefully few prototypes,
15890     which can conflict with char $ac_func (); below.  */
15891 #include <assert.h>
15892 /* Override any gcc2 internal prototype to avoid an error.  */
15893 #ifdef __cplusplus
15894 extern "C"
15895 #endif
15896 /* We use char because int might match the return type of a gcc2
15897    builtin and then its argument prototype would still apply.  */
15898 char $ac_func ();
15899 char (*f) ();
15900
15901 int
15902 main ()
15903 {
15904 /* The GNU C library defines this for functions which it implements
15905     to always fail with ENOSYS.  Some functions are actually named
15906     something starting with __ and the normal name is an alias.  */
15907 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15908 choke me
15909 #else
15910 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15911 #endif
15912
15913   ;
15914   return 0;
15915 }
15916 _ACEOF
15917 rm -f conftest.$ac_objext conftest$ac_exeext
15918 if { (eval echo "$as_me:15918: \"$ac_link\"") >&5
15919   (eval $ac_link) 2>&5
15920   ac_status=$?
15921   echo "$as_me:15921: \$? = $ac_status" >&5
15922   (exit $ac_status); } &&
15923          { ac_try='test -s conftest$ac_exeext'
15924   { (eval echo "$as_me:15924: \"$ac_try\"") >&5
15925   (eval $ac_try) 2>&5
15926   ac_status=$?
15927   echo "$as_me:15927: \$? = $ac_status" >&5
15928   (exit $ac_status); }; }; then
15929   eval "$as_ac_var=yes"
15930 else
15931   echo "$as_me: failed program was:" >&5
15932 cat conftest.$ac_ext >&5
15933 eval "$as_ac_var=no"
15934 fi
15935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15936 fi
15937 echo "$as_me:15937: result: `eval echo '${'$as_ac_var'}'`" >&5
15938 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15939 if test `eval echo '${'$as_ac_var'}'` = yes; then
15940   cat >>confdefs.h <<EOF
15941 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15942 EOF
15943
15944 fi
15945 done
15946
15947 if test "x$with_getcap" = "xyes" ; then
15948
15949 echo "$as_me:15949: checking for terminal-capability database functions" >&5
15950 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15951 if test "${cf_cv_cgetent+set}" = set; then
15952   echo $ECHO_N "(cached) $ECHO_C" >&6
15953 else
15954
15955 cat >conftest.$ac_ext <<_ACEOF
15956 #line 15956 "configure"
15957 #include "confdefs.h"
15958
15959 #include <stdlib.h>
15960 int
15961 main ()
15962 {
15963
15964         char temp[128];
15965         char *buf = temp;
15966         char *db_array = temp;
15967         cgetent(&buf, &db_array, "vt100");
15968         cgetcap(buf, "tc", '=');
15969         cgetmatch(buf, "tc");
15970
15971   ;
15972   return 0;
15973 }
15974 _ACEOF
15975 rm -f conftest.$ac_objext conftest$ac_exeext
15976 if { (eval echo "$as_me:15976: \"$ac_link\"") >&5
15977   (eval $ac_link) 2>&5
15978   ac_status=$?
15979   echo "$as_me:15979: \$? = $ac_status" >&5
15980   (exit $ac_status); } &&
15981          { ac_try='test -s conftest$ac_exeext'
15982   { (eval echo "$as_me:15982: \"$ac_try\"") >&5
15983   (eval $ac_try) 2>&5
15984   ac_status=$?
15985   echo "$as_me:15985: \$? = $ac_status" >&5
15986   (exit $ac_status); }; }; then
15987   cf_cv_cgetent=yes
15988 else
15989   echo "$as_me: failed program was:" >&5
15990 cat conftest.$ac_ext >&5
15991 cf_cv_cgetent=no
15992 fi
15993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15994
15995 fi
15996 echo "$as_me:15996: result: $cf_cv_cgetent" >&5
15997 echo "${ECHO_T}$cf_cv_cgetent" >&6
15998
15999 if test "$cf_cv_cgetent" = yes
16000 then
16001
16002 cat >>confdefs.h <<\EOF
16003 #define HAVE_BSD_CGETENT 1
16004 EOF
16005
16006 echo "$as_me:16006: checking if cgetent uses const parameter" >&5
16007 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16008 if test "${cf_cv_cgetent_const+set}" = set; then
16009   echo $ECHO_N "(cached) $ECHO_C" >&6
16010 else
16011
16012 cat >conftest.$ac_ext <<_ACEOF
16013 #line 16013 "configure"
16014 #include "confdefs.h"
16015
16016 #include <stdlib.h>
16017 int
16018 main ()
16019 {
16020
16021         char temp[128];
16022         char *buf = temp;
16023 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16024         const char *db_array = temp;
16025         cgetent(&buf, &db_array, "vt100");
16026 #endif
16027         cgetcap(buf, "tc", '=');
16028         cgetmatch(buf, "tc");
16029
16030   ;
16031   return 0;
16032 }
16033 _ACEOF
16034 rm -f conftest.$ac_objext conftest$ac_exeext
16035 if { (eval echo "$as_me:16035: \"$ac_link\"") >&5
16036   (eval $ac_link) 2>&5
16037   ac_status=$?
16038   echo "$as_me:16038: \$? = $ac_status" >&5
16039   (exit $ac_status); } &&
16040          { ac_try='test -s conftest$ac_exeext'
16041   { (eval echo "$as_me:16041: \"$ac_try\"") >&5
16042   (eval $ac_try) 2>&5
16043   ac_status=$?
16044   echo "$as_me:16044: \$? = $ac_status" >&5
16045   (exit $ac_status); }; }; then
16046   cf_cv_cgetent_const=yes
16047 else
16048   echo "$as_me: failed program was:" >&5
16049 cat conftest.$ac_ext >&5
16050 cf_cv_cgetent_const=no
16051 fi
16052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16053
16054 fi
16055 echo "$as_me:16055: result: $cf_cv_cgetent_const" >&5
16056 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16057         if test "$cf_cv_cgetent_const" = yes
16058         then
16059
16060 cat >>confdefs.h <<EOF
16061 #define CGETENT_CONST const
16062 EOF
16063
16064         fi
16065 fi
16066
16067 fi
16068
16069 echo "$as_me:16069: checking for isascii" >&5
16070 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16071 if test "${cf_cv_have_isascii+set}" = set; then
16072   echo $ECHO_N "(cached) $ECHO_C" >&6
16073 else
16074
16075         cat >conftest.$ac_ext <<_ACEOF
16076 #line 16076 "configure"
16077 #include "confdefs.h"
16078 #include <ctype.h>
16079 int
16080 main ()
16081 {
16082 int x = isascii(' ')
16083   ;
16084   return 0;
16085 }
16086 _ACEOF
16087 rm -f conftest.$ac_objext conftest$ac_exeext
16088 if { (eval echo "$as_me:16088: \"$ac_link\"") >&5
16089   (eval $ac_link) 2>&5
16090   ac_status=$?
16091   echo "$as_me:16091: \$? = $ac_status" >&5
16092   (exit $ac_status); } &&
16093          { ac_try='test -s conftest$ac_exeext'
16094   { (eval echo "$as_me:16094: \"$ac_try\"") >&5
16095   (eval $ac_try) 2>&5
16096   ac_status=$?
16097   echo "$as_me:16097: \$? = $ac_status" >&5
16098   (exit $ac_status); }; }; then
16099   cf_cv_have_isascii=yes
16100 else
16101   echo "$as_me: failed program was:" >&5
16102 cat conftest.$ac_ext >&5
16103 cf_cv_have_isascii=no
16104 fi
16105 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16106
16107 fi
16108 echo "$as_me:16108: result: $cf_cv_have_isascii" >&5
16109 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16110 test "$cf_cv_have_isascii" = yes &&
16111 cat >>confdefs.h <<\EOF
16112 #define HAVE_ISASCII 1
16113 EOF
16114
16115 if test "$ac_cv_func_sigaction" = yes; then
16116 echo "$as_me:16116: checking whether sigaction needs _POSIX_SOURCE" >&5
16117 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16118 cat >conftest.$ac_ext <<_ACEOF
16119 #line 16119 "configure"
16120 #include "confdefs.h"
16121
16122 #include <sys/types.h>
16123 #include <signal.h>
16124 int
16125 main ()
16126 {
16127 struct sigaction act
16128   ;
16129   return 0;
16130 }
16131 _ACEOF
16132 rm -f conftest.$ac_objext
16133 if { (eval echo "$as_me:16133: \"$ac_compile\"") >&5
16134   (eval $ac_compile) 2>&5
16135   ac_status=$?
16136   echo "$as_me:16136: \$? = $ac_status" >&5
16137   (exit $ac_status); } &&
16138          { ac_try='test -s conftest.$ac_objext'
16139   { (eval echo "$as_me:16139: \"$ac_try\"") >&5
16140   (eval $ac_try) 2>&5
16141   ac_status=$?
16142   echo "$as_me:16142: \$? = $ac_status" >&5
16143   (exit $ac_status); }; }; then
16144   sigact_bad=no
16145 else
16146   echo "$as_me: failed program was:" >&5
16147 cat conftest.$ac_ext >&5
16148
16149 cat >conftest.$ac_ext <<_ACEOF
16150 #line 16150 "configure"
16151 #include "confdefs.h"
16152
16153 #define _POSIX_SOURCE
16154 #include <sys/types.h>
16155 #include <signal.h>
16156 int
16157 main ()
16158 {
16159 struct sigaction act
16160   ;
16161   return 0;
16162 }
16163 _ACEOF
16164 rm -f conftest.$ac_objext
16165 if { (eval echo "$as_me:16165: \"$ac_compile\"") >&5
16166   (eval $ac_compile) 2>&5
16167   ac_status=$?
16168   echo "$as_me:16168: \$? = $ac_status" >&5
16169   (exit $ac_status); } &&
16170          { ac_try='test -s conftest.$ac_objext'
16171   { (eval echo "$as_me:16171: \"$ac_try\"") >&5
16172   (eval $ac_try) 2>&5
16173   ac_status=$?
16174   echo "$as_me:16174: \$? = $ac_status" >&5
16175   (exit $ac_status); }; }; then
16176   sigact_bad=yes
16177
16178 cat >>confdefs.h <<\EOF
16179 #define _POSIX_SOURCE 1
16180 EOF
16181
16182 else
16183   echo "$as_me: failed program was:" >&5
16184 cat conftest.$ac_ext >&5
16185 sigact_bad=unknown
16186 fi
16187 rm -f conftest.$ac_objext conftest.$ac_ext
16188 fi
16189 rm -f conftest.$ac_objext conftest.$ac_ext
16190 echo "$as_me:16190: result: $sigact_bad" >&5
16191 echo "${ECHO_T}$sigact_bad" >&6
16192 fi
16193
16194 echo "$as_me:16194: checking if nanosleep really works" >&5
16195 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16196 if test "${cf_cv_func_nanosleep+set}" = set; then
16197   echo $ECHO_N "(cached) $ECHO_C" >&6
16198 else
16199
16200 if test "$cross_compiling" = yes; then
16201   cf_cv_func_nanosleep=unknown
16202 else
16203   cat >conftest.$ac_ext <<_ACEOF
16204 #line 16204 "configure"
16205 #include "confdefs.h"
16206
16207 #include <stdio.h>
16208 #include <errno.h>
16209 #include <time.h>
16210
16211 #ifdef HAVE_SYS_TIME_H
16212 #include <sys/time.h>
16213 #endif
16214
16215 int main() {
16216         struct timespec ts1, ts2;
16217         int code;
16218         ts1.tv_sec  = 0;
16219         ts1.tv_nsec = 750000000;
16220         ts2.tv_sec  = 0;
16221         ts2.tv_nsec = 0;
16222         errno = 0;
16223         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16224         ${cf_cv_main_return:-return}(code != 0);
16225 }
16226
16227 _ACEOF
16228 rm -f conftest$ac_exeext
16229 if { (eval echo "$as_me:16229: \"$ac_link\"") >&5
16230   (eval $ac_link) 2>&5
16231   ac_status=$?
16232   echo "$as_me:16232: \$? = $ac_status" >&5
16233   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16234   { (eval echo "$as_me:16234: \"$ac_try\"") >&5
16235   (eval $ac_try) 2>&5
16236   ac_status=$?
16237   echo "$as_me:16237: \$? = $ac_status" >&5
16238   (exit $ac_status); }; }; then
16239   cf_cv_func_nanosleep=yes
16240 else
16241   echo "$as_me: program exited with status $ac_status" >&5
16242 echo "$as_me: failed program was:" >&5
16243 cat conftest.$ac_ext >&5
16244 cf_cv_func_nanosleep=no
16245 fi
16246 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16247 fi
16248 fi
16249 echo "$as_me:16249: result: $cf_cv_func_nanosleep" >&5
16250 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16251
16252 test "$cf_cv_func_nanosleep" = "yes" &&
16253 cat >>confdefs.h <<\EOF
16254 #define HAVE_NANOSLEEP 1
16255 EOF
16256
16257 for ac_header in \
16258 termio.h \
16259 termios.h \
16260 unistd.h \
16261
16262 do
16263 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16264 echo "$as_me:16264: checking for $ac_header" >&5
16265 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16266 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16267   echo $ECHO_N "(cached) $ECHO_C" >&6
16268 else
16269   cat >conftest.$ac_ext <<_ACEOF
16270 #line 16270 "configure"
16271 #include "confdefs.h"
16272 #include <$ac_header>
16273 _ACEOF
16274 if { (eval echo "$as_me:16274: \"$ac_cpp conftest.$ac_ext\"") >&5
16275   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16276   ac_status=$?
16277   egrep -v '^ *\+' conftest.er1 >conftest.err
16278   rm -f conftest.er1
16279   cat conftest.err >&5
16280   echo "$as_me:16280: \$? = $ac_status" >&5
16281   (exit $ac_status); } >/dev/null; then
16282   if test -s conftest.err; then
16283     ac_cpp_err=$ac_c_preproc_warn_flag
16284   else
16285     ac_cpp_err=
16286   fi
16287 else
16288   ac_cpp_err=yes
16289 fi
16290 if test -z "$ac_cpp_err"; then
16291   eval "$as_ac_Header=yes"
16292 else
16293   echo "$as_me: failed program was:" >&5
16294   cat conftest.$ac_ext >&5
16295   eval "$as_ac_Header=no"
16296 fi
16297 rm -f conftest.err conftest.$ac_ext
16298 fi
16299 echo "$as_me:16299: result: `eval echo '${'$as_ac_Header'}'`" >&5
16300 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16301 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16302   cat >>confdefs.h <<EOF
16303 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16304 EOF
16305
16306 fi
16307 done
16308
16309 if test "$ISC" = yes ; then
16310
16311 for ac_header in sys/termio.h
16312 do
16313 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16314 echo "$as_me:16314: checking for $ac_header" >&5
16315 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16316 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16317   echo $ECHO_N "(cached) $ECHO_C" >&6
16318 else
16319   cat >conftest.$ac_ext <<_ACEOF
16320 #line 16320 "configure"
16321 #include "confdefs.h"
16322 #include <$ac_header>
16323 _ACEOF
16324 if { (eval echo "$as_me:16324: \"$ac_cpp conftest.$ac_ext\"") >&5
16325   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16326   ac_status=$?
16327   egrep -v '^ *\+' conftest.er1 >conftest.err
16328   rm -f conftest.er1
16329   cat conftest.err >&5
16330   echo "$as_me:16330: \$? = $ac_status" >&5
16331   (exit $ac_status); } >/dev/null; then
16332   if test -s conftest.err; then
16333     ac_cpp_err=$ac_c_preproc_warn_flag
16334   else
16335     ac_cpp_err=
16336   fi
16337 else
16338   ac_cpp_err=yes
16339 fi
16340 if test -z "$ac_cpp_err"; then
16341   eval "$as_ac_Header=yes"
16342 else
16343   echo "$as_me: failed program was:" >&5
16344   cat conftest.$ac_ext >&5
16345   eval "$as_ac_Header=no"
16346 fi
16347 rm -f conftest.err conftest.$ac_ext
16348 fi
16349 echo "$as_me:16349: result: `eval echo '${'$as_ac_Header'}'`" >&5
16350 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16351 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16352   cat >>confdefs.h <<EOF
16353 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16354 EOF
16355
16356 fi
16357 done
16358
16359 fi
16360 if test "$ac_cv_header_termios_h" = yes ; then
16361         case "$CFLAGS $CPPFLAGS" in
16362         *-D_POSIX_SOURCE*)
16363                 termios_bad=dunno ;;
16364         *)      termios_bad=maybe ;;
16365         esac
16366         if test "$termios_bad" = maybe ; then
16367         echo "$as_me:16367: checking whether termios.h needs _POSIX_SOURCE" >&5
16368 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16369         cat >conftest.$ac_ext <<_ACEOF
16370 #line 16370 "configure"
16371 #include "confdefs.h"
16372 #include <termios.h>
16373 int
16374 main ()
16375 {
16376 struct termios foo; int x = foo.c_iflag
16377   ;
16378   return 0;
16379 }
16380 _ACEOF
16381 rm -f conftest.$ac_objext
16382 if { (eval echo "$as_me:16382: \"$ac_compile\"") >&5
16383   (eval $ac_compile) 2>&5
16384   ac_status=$?
16385   echo "$as_me:16385: \$? = $ac_status" >&5
16386   (exit $ac_status); } &&
16387          { ac_try='test -s conftest.$ac_objext'
16388   { (eval echo "$as_me:16388: \"$ac_try\"") >&5
16389   (eval $ac_try) 2>&5
16390   ac_status=$?
16391   echo "$as_me:16391: \$? = $ac_status" >&5
16392   (exit $ac_status); }; }; then
16393   termios_bad=no
16394 else
16395   echo "$as_me: failed program was:" >&5
16396 cat conftest.$ac_ext >&5
16397
16398                 cat >conftest.$ac_ext <<_ACEOF
16399 #line 16399 "configure"
16400 #include "confdefs.h"
16401
16402 #define _POSIX_SOURCE
16403 #include <termios.h>
16404 int
16405 main ()
16406 {
16407 struct termios foo; int x = foo.c_iflag
16408   ;
16409   return 0;
16410 }
16411 _ACEOF
16412 rm -f conftest.$ac_objext
16413 if { (eval echo "$as_me:16413: \"$ac_compile\"") >&5
16414   (eval $ac_compile) 2>&5
16415   ac_status=$?
16416   echo "$as_me:16416: \$? = $ac_status" >&5
16417   (exit $ac_status); } &&
16418          { ac_try='test -s conftest.$ac_objext'
16419   { (eval echo "$as_me:16419: \"$ac_try\"") >&5
16420   (eval $ac_try) 2>&5
16421   ac_status=$?
16422   echo "$as_me:16422: \$? = $ac_status" >&5
16423   (exit $ac_status); }; }; then
16424   termios_bad=unknown
16425 else
16426   echo "$as_me: failed program was:" >&5
16427 cat conftest.$ac_ext >&5
16428 termios_bad=yes
16429 cat >>confdefs.h <<\EOF
16430 #define _POSIX_SOURCE 1
16431 EOF
16432
16433 fi
16434 rm -f conftest.$ac_objext conftest.$ac_ext
16435
16436 fi
16437 rm -f conftest.$ac_objext conftest.$ac_ext
16438         echo "$as_me:16438: result: $termios_bad" >&5
16439 echo "${ECHO_T}$termios_bad" >&6
16440         fi
16441 fi
16442
16443 echo "$as_me:16443: checking for tcgetattr" >&5
16444 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16445 if test "${cf_cv_have_tcgetattr+set}" = set; then
16446   echo $ECHO_N "(cached) $ECHO_C" >&6
16447 else
16448
16449 cat >conftest.$ac_ext <<_ACEOF
16450 #line 16450 "configure"
16451 #include "confdefs.h"
16452
16453 #include <sys/types.h>
16454 #ifdef HAVE_UNISTD_H
16455 #include <unistd.h>
16456 #endif
16457 #ifdef HAVE_TERMIOS_H
16458 #include <termios.h>
16459 #define TTY struct termios
16460 #else
16461 #ifdef HAVE_TERMIO_H
16462 #include <termio.h>
16463 #define TTY struct termio
16464 #endif
16465 #endif
16466
16467 int
16468 main ()
16469 {
16470
16471 TTY foo;
16472 tcgetattr(1, &foo);
16473   ;
16474   return 0;
16475 }
16476 _ACEOF
16477 rm -f conftest.$ac_objext conftest$ac_exeext
16478 if { (eval echo "$as_me:16478: \"$ac_link\"") >&5
16479   (eval $ac_link) 2>&5
16480   ac_status=$?
16481   echo "$as_me:16481: \$? = $ac_status" >&5
16482   (exit $ac_status); } &&
16483          { ac_try='test -s conftest$ac_exeext'
16484   { (eval echo "$as_me:16484: \"$ac_try\"") >&5
16485   (eval $ac_try) 2>&5
16486   ac_status=$?
16487   echo "$as_me:16487: \$? = $ac_status" >&5
16488   (exit $ac_status); }; }; then
16489   cf_cv_have_tcgetattr=yes
16490 else
16491   echo "$as_me: failed program was:" >&5
16492 cat conftest.$ac_ext >&5
16493 cf_cv_have_tcgetattr=no
16494 fi
16495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16496 fi
16497 echo "$as_me:16497: result: $cf_cv_have_tcgetattr" >&5
16498 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16499 test "$cf_cv_have_tcgetattr" = yes &&
16500 cat >>confdefs.h <<\EOF
16501 #define HAVE_TCGETATTR 1
16502 EOF
16503
16504 echo "$as_me:16504: checking for vsscanf function or workaround" >&5
16505 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16506 if test "${cf_cv_func_vsscanf+set}" = set; then
16507   echo $ECHO_N "(cached) $ECHO_C" >&6
16508 else
16509
16510 cat >conftest.$ac_ext <<_ACEOF
16511 #line 16511 "configure"
16512 #include "confdefs.h"
16513
16514 #include <stdarg.h>
16515 #include <stdio.h>
16516 int
16517 main ()
16518 {
16519
16520         va_list ap;
16521         vsscanf("from", "%d", ap)
16522   ;
16523   return 0;
16524 }
16525 _ACEOF
16526 rm -f conftest.$ac_objext conftest$ac_exeext
16527 if { (eval echo "$as_me:16527: \"$ac_link\"") >&5
16528   (eval $ac_link) 2>&5
16529   ac_status=$?
16530   echo "$as_me:16530: \$? = $ac_status" >&5
16531   (exit $ac_status); } &&
16532          { ac_try='test -s conftest$ac_exeext'
16533   { (eval echo "$as_me:16533: \"$ac_try\"") >&5
16534   (eval $ac_try) 2>&5
16535   ac_status=$?
16536   echo "$as_me:16536: \$? = $ac_status" >&5
16537   (exit $ac_status); }; }; then
16538   cf_cv_func_vsscanf=vsscanf
16539 else
16540   echo "$as_me: failed program was:" >&5
16541 cat conftest.$ac_ext >&5
16542
16543 cat >conftest.$ac_ext <<_ACEOF
16544 #line 16544 "configure"
16545 #include "confdefs.h"
16546
16547 #include <stdarg.h>
16548 #include <stdio.h>
16549 int
16550 main ()
16551 {
16552
16553     FILE strbuf;
16554     char *str = "from";
16555
16556     strbuf._flag = _IOREAD;
16557     strbuf._ptr = strbuf._base = (unsigned char *) str;
16558     strbuf._cnt = strlen(str);
16559     strbuf._file = _NFILE;
16560     return (vfscanf(&strbuf, "%d", ap))
16561   ;
16562   return 0;
16563 }
16564 _ACEOF
16565 rm -f conftest.$ac_objext conftest$ac_exeext
16566 if { (eval echo "$as_me:16566: \"$ac_link\"") >&5
16567   (eval $ac_link) 2>&5
16568   ac_status=$?
16569   echo "$as_me:16569: \$? = $ac_status" >&5
16570   (exit $ac_status); } &&
16571          { ac_try='test -s conftest$ac_exeext'
16572   { (eval echo "$as_me:16572: \"$ac_try\"") >&5
16573   (eval $ac_try) 2>&5
16574   ac_status=$?
16575   echo "$as_me:16575: \$? = $ac_status" >&5
16576   (exit $ac_status); }; }; then
16577   cf_cv_func_vsscanf=vfscanf
16578 else
16579   echo "$as_me: failed program was:" >&5
16580 cat conftest.$ac_ext >&5
16581
16582 cat >conftest.$ac_ext <<_ACEOF
16583 #line 16583 "configure"
16584 #include "confdefs.h"
16585
16586 #include <stdarg.h>
16587 #include <stdio.h>
16588 int
16589 main ()
16590 {
16591
16592     FILE strbuf;
16593     char *str = "from";
16594
16595     strbuf._flag = _IOREAD;
16596     strbuf._ptr = strbuf._base = (unsigned char *) str;
16597     strbuf._cnt = strlen(str);
16598     strbuf._file = _NFILE;
16599     return (_doscan(&strbuf, "%d", ap))
16600   ;
16601   return 0;
16602 }
16603 _ACEOF
16604 rm -f conftest.$ac_objext conftest$ac_exeext
16605 if { (eval echo "$as_me:16605: \"$ac_link\"") >&5
16606   (eval $ac_link) 2>&5
16607   ac_status=$?
16608   echo "$as_me:16608: \$? = $ac_status" >&5
16609   (exit $ac_status); } &&
16610          { ac_try='test -s conftest$ac_exeext'
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   cf_cv_func_vsscanf=_doscan
16617 else
16618   echo "$as_me: failed program was:" >&5
16619 cat conftest.$ac_ext >&5
16620
16621 cf_cv_func_vsscanf=no
16622 fi
16623 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16624 fi
16625 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16626 fi
16627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16628 fi
16629 echo "$as_me:16629: result: $cf_cv_func_vsscanf" >&5
16630 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16631
16632 case $cf_cv_func_vsscanf in #(vi
16633 vsscanf)
16634 cat >>confdefs.h <<\EOF
16635 #define HAVE_VSSCANF 1
16636 EOF
16637 ;; #(vi
16638 vfscanf)
16639 cat >>confdefs.h <<\EOF
16640 #define HAVE_VFSCANF 1
16641 EOF
16642 ;; #(vi
16643 _doscan)
16644 cat >>confdefs.h <<\EOF
16645 #define HAVE__DOSCAN 1
16646 EOF
16647 ;;
16648 esac
16649
16650 echo "$as_me:16650: checking for working mkstemp" >&5
16651 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16652 if test "${cf_cv_func_mkstemp+set}" = set; then
16653   echo $ECHO_N "(cached) $ECHO_C" >&6
16654 else
16655
16656 rm -rf conftest*
16657 if test "$cross_compiling" = yes; then
16658   cf_cv_func_mkstemp=maybe
16659 else
16660   cat >conftest.$ac_ext <<_ACEOF
16661 #line 16661 "configure"
16662 #include "confdefs.h"
16663
16664 #include <sys/types.h>
16665 #include <stdlib.h>
16666 #include <stdio.h>
16667 #include <string.h>
16668 #include <sys/stat.h>
16669 int main()
16670 {
16671         char *tmpl = "conftestXXXXXX";
16672         char name[2][80];
16673         int n;
16674         int result = 0;
16675         int fd;
16676         struct stat sb;
16677
16678         umask(077);
16679         for (n = 0; n < 2; ++n) {
16680                 strcpy(name[n], tmpl);
16681                 if ((fd = mkstemp(name[n])) >= 0) {
16682                         if (!strcmp(name[n], tmpl)
16683                          || stat(name[n], &sb) != 0
16684                          || (sb.st_mode & S_IFMT) != S_IFREG
16685                          || (sb.st_mode & 077) != 0) {
16686                                 result = 1;
16687                         }
16688                         close(fd);
16689                 }
16690         }
16691         if (result == 0
16692          && !strcmp(name[0], name[1]))
16693                 result = 1;
16694         ${cf_cv_main_return:-return}(result);
16695 }
16696
16697 _ACEOF
16698 rm -f conftest$ac_exeext
16699 if { (eval echo "$as_me:16699: \"$ac_link\"") >&5
16700   (eval $ac_link) 2>&5
16701   ac_status=$?
16702   echo "$as_me:16702: \$? = $ac_status" >&5
16703   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16704   { (eval echo "$as_me:16704: \"$ac_try\"") >&5
16705   (eval $ac_try) 2>&5
16706   ac_status=$?
16707   echo "$as_me:16707: \$? = $ac_status" >&5
16708   (exit $ac_status); }; }; then
16709   cf_cv_func_mkstemp=yes
16710
16711 else
16712   echo "$as_me: program exited with status $ac_status" >&5
16713 echo "$as_me: failed program was:" >&5
16714 cat conftest.$ac_ext >&5
16715 cf_cv_func_mkstemp=no
16716
16717 fi
16718 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16719 fi
16720
16721 fi
16722 echo "$as_me:16722: result: $cf_cv_func_mkstemp" >&5
16723 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16724 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16725         echo "$as_me:16725: checking for mkstemp" >&5
16726 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16727 if test "${ac_cv_func_mkstemp+set}" = set; then
16728   echo $ECHO_N "(cached) $ECHO_C" >&6
16729 else
16730   cat >conftest.$ac_ext <<_ACEOF
16731 #line 16731 "configure"
16732 #include "confdefs.h"
16733 /* System header to define __stub macros and hopefully few prototypes,
16734     which can conflict with char mkstemp (); below.  */
16735 #include <assert.h>
16736 /* Override any gcc2 internal prototype to avoid an error.  */
16737 #ifdef __cplusplus
16738 extern "C"
16739 #endif
16740 /* We use char because int might match the return type of a gcc2
16741    builtin and then its argument prototype would still apply.  */
16742 char mkstemp ();
16743 char (*f) ();
16744
16745 int
16746 main ()
16747 {
16748 /* The GNU C library defines this for functions which it implements
16749     to always fail with ENOSYS.  Some functions are actually named
16750     something starting with __ and the normal name is an alias.  */
16751 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16752 choke me
16753 #else
16754 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16755 #endif
16756
16757   ;
16758   return 0;
16759 }
16760 _ACEOF
16761 rm -f conftest.$ac_objext conftest$ac_exeext
16762 if { (eval echo "$as_me:16762: \"$ac_link\"") >&5
16763   (eval $ac_link) 2>&5
16764   ac_status=$?
16765   echo "$as_me:16765: \$? = $ac_status" >&5
16766   (exit $ac_status); } &&
16767          { ac_try='test -s conftest$ac_exeext'
16768   { (eval echo "$as_me:16768: \"$ac_try\"") >&5
16769   (eval $ac_try) 2>&5
16770   ac_status=$?
16771   echo "$as_me:16771: \$? = $ac_status" >&5
16772   (exit $ac_status); }; }; then
16773   ac_cv_func_mkstemp=yes
16774 else
16775   echo "$as_me: failed program was:" >&5
16776 cat conftest.$ac_ext >&5
16777 ac_cv_func_mkstemp=no
16778 fi
16779 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16780 fi
16781 echo "$as_me:16781: result: $ac_cv_func_mkstemp" >&5
16782 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16783
16784 fi
16785 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16786
16787 cat >>confdefs.h <<\EOF
16788 #define HAVE_MKSTEMP 1
16789 EOF
16790
16791 fi
16792
16793 # setup for prototype of fallback for vsscanf()
16794
16795 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16796         HAVE_VSSCANF=1
16797 else
16798         HAVE_VSSCANF=0
16799 fi
16800
16801 if test "x$cross_compiling" = xyes ; then
16802         { echo "$as_me:16802: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16803 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16804 else
16805         echo "$as_me:16805: checking whether setvbuf arguments are reversed" >&5
16806 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16807 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16808   echo $ECHO_N "(cached) $ECHO_C" >&6
16809 else
16810   if test "$cross_compiling" = yes; then
16811   { { echo "$as_me:16811: error: cannot run test program while cross compiling" >&5
16812 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16813    { (exit 1); exit 1; }; }
16814 else
16815   cat >conftest.$ac_ext <<_ACEOF
16816 #line 16816 "configure"
16817 #include "confdefs.h"
16818 #include <stdio.h>
16819 /* If setvbuf has the reversed format, exit 0. */
16820 int
16821 main ()
16822 {
16823   /* This call has the arguments reversed.
16824      A reversed system may check and see that the address of main
16825      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16826   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16827     $ac_main_return(1);
16828   putc('\r', stdout);
16829   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16830 }
16831 _ACEOF
16832 rm -f conftest$ac_exeext
16833 if { (eval echo "$as_me:16833: \"$ac_link\"") >&5
16834   (eval $ac_link) 2>&5
16835   ac_status=$?
16836   echo "$as_me:16836: \$? = $ac_status" >&5
16837   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16838   { (eval echo "$as_me:16838: \"$ac_try\"") >&5
16839   (eval $ac_try) 2>&5
16840   ac_status=$?
16841   echo "$as_me:16841: \$? = $ac_status" >&5
16842   (exit $ac_status); }; }; then
16843   ac_cv_func_setvbuf_reversed=yes
16844 else
16845   echo "$as_me: program exited with status $ac_status" >&5
16846 echo "$as_me: failed program was:" >&5
16847 cat conftest.$ac_ext >&5
16848 ac_cv_func_setvbuf_reversed=no
16849 fi
16850 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16851 fi
16852 rm -f core core.* *.core
16853 fi
16854 echo "$as_me:16854: result: $ac_cv_func_setvbuf_reversed" >&5
16855 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16856 if test $ac_cv_func_setvbuf_reversed = yes; then
16857
16858 cat >>confdefs.h <<\EOF
16859 #define SETVBUF_REVERSED 1
16860 EOF
16861
16862 fi
16863
16864 fi
16865 echo "$as_me:16865: checking for intptr_t" >&5
16866 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16867 if test "${ac_cv_type_intptr_t+set}" = set; then
16868   echo $ECHO_N "(cached) $ECHO_C" >&6
16869 else
16870   cat >conftest.$ac_ext <<_ACEOF
16871 #line 16871 "configure"
16872 #include "confdefs.h"
16873 $ac_includes_default
16874 int
16875 main ()
16876 {
16877 if ((intptr_t *) 0)
16878   return 0;
16879 if (sizeof (intptr_t))
16880   return 0;
16881   ;
16882   return 0;
16883 }
16884 _ACEOF
16885 rm -f conftest.$ac_objext
16886 if { (eval echo "$as_me:16886: \"$ac_compile\"") >&5
16887   (eval $ac_compile) 2>&5
16888   ac_status=$?
16889   echo "$as_me:16889: \$? = $ac_status" >&5
16890   (exit $ac_status); } &&
16891          { ac_try='test -s conftest.$ac_objext'
16892   { (eval echo "$as_me:16892: \"$ac_try\"") >&5
16893   (eval $ac_try) 2>&5
16894   ac_status=$?
16895   echo "$as_me:16895: \$? = $ac_status" >&5
16896   (exit $ac_status); }; }; then
16897   ac_cv_type_intptr_t=yes
16898 else
16899   echo "$as_me: failed program was:" >&5
16900 cat conftest.$ac_ext >&5
16901 ac_cv_type_intptr_t=no
16902 fi
16903 rm -f conftest.$ac_objext conftest.$ac_ext
16904 fi
16905 echo "$as_me:16905: result: $ac_cv_type_intptr_t" >&5
16906 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16907 if test $ac_cv_type_intptr_t = yes; then
16908   :
16909 else
16910
16911 cat >>confdefs.h <<EOF
16912 #define intptr_t long
16913 EOF
16914
16915 fi
16916
16917 echo "$as_me:16917: checking for type sigaction_t" >&5
16918 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16919 if test "${cf_cv_type_sigaction+set}" = set; then
16920   echo $ECHO_N "(cached) $ECHO_C" >&6
16921 else
16922
16923         cat >conftest.$ac_ext <<_ACEOF
16924 #line 16924 "configure"
16925 #include "confdefs.h"
16926
16927 #include <signal.h>
16928 int
16929 main ()
16930 {
16931 sigaction_t x
16932   ;
16933   return 0;
16934 }
16935 _ACEOF
16936 rm -f conftest.$ac_objext
16937 if { (eval echo "$as_me:16937: \"$ac_compile\"") >&5
16938   (eval $ac_compile) 2>&5
16939   ac_status=$?
16940   echo "$as_me:16940: \$? = $ac_status" >&5
16941   (exit $ac_status); } &&
16942          { ac_try='test -s conftest.$ac_objext'
16943   { (eval echo "$as_me:16943: \"$ac_try\"") >&5
16944   (eval $ac_try) 2>&5
16945   ac_status=$?
16946   echo "$as_me:16946: \$? = $ac_status" >&5
16947   (exit $ac_status); }; }; then
16948   cf_cv_type_sigaction=yes
16949 else
16950   echo "$as_me: failed program was:" >&5
16951 cat conftest.$ac_ext >&5
16952 cf_cv_type_sigaction=no
16953 fi
16954 rm -f conftest.$ac_objext conftest.$ac_ext
16955 fi
16956
16957 echo "$as_me:16957: result: $cf_cv_type_sigaction" >&5
16958 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16959 test "$cf_cv_type_sigaction" = yes &&
16960 cat >>confdefs.h <<\EOF
16961 #define HAVE_TYPE_SIGACTION 1
16962 EOF
16963
16964 echo "$as_me:16964: checking declaration of size-change" >&5
16965 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16966 if test "${cf_cv_sizechange+set}" = set; then
16967   echo $ECHO_N "(cached) $ECHO_C" >&6
16968 else
16969
16970     cf_cv_sizechange=unknown
16971     cf_save_CPPFLAGS="$CPPFLAGS"
16972
16973 for cf_opts in "" "NEED_PTEM_H"
16974 do
16975
16976     CPPFLAGS="$cf_save_CPPFLAGS"
16977     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16978     cat >conftest.$ac_ext <<_ACEOF
16979 #line 16979 "configure"
16980 #include "confdefs.h"
16981 #include <sys/types.h>
16982 #ifdef HAVE_TERMIOS_H
16983 #include <termios.h>
16984 #else
16985 #ifdef HAVE_TERMIO_H
16986 #include <termio.h>
16987 #endif
16988 #endif
16989 #ifdef NEED_PTEM_H
16990 /* This is a workaround for SCO:  they neglected to define struct winsize in
16991  * termios.h -- it's only in termio.h and ptem.h
16992  */
16993 #include        <sys/stream.h>
16994 #include        <sys/ptem.h>
16995 #endif
16996 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16997 #include <sys/ioctl.h>
16998 #endif
16999
17000 int
17001 main ()
17002 {
17003
17004 #ifdef TIOCGSIZE
17005         struct ttysize win;     /* FIXME: what system is this? */
17006         int y = win.ts_lines;
17007         int x = win.ts_cols;
17008 #else
17009 #ifdef TIOCGWINSZ
17010         struct winsize win;
17011         int y = win.ws_row;
17012         int x = win.ws_col;
17013 #else
17014         no TIOCGSIZE or TIOCGWINSZ
17015 #endif /* TIOCGWINSZ */
17016 #endif /* TIOCGSIZE */
17017
17018   ;
17019   return 0;
17020 }
17021 _ACEOF
17022 rm -f conftest.$ac_objext
17023 if { (eval echo "$as_me:17023: \"$ac_compile\"") >&5
17024   (eval $ac_compile) 2>&5
17025   ac_status=$?
17026   echo "$as_me:17026: \$? = $ac_status" >&5
17027   (exit $ac_status); } &&
17028          { ac_try='test -s conftest.$ac_objext'
17029   { (eval echo "$as_me:17029: \"$ac_try\"") >&5
17030   (eval $ac_try) 2>&5
17031   ac_status=$?
17032   echo "$as_me:17032: \$? = $ac_status" >&5
17033   (exit $ac_status); }; }; then
17034   cf_cv_sizechange=yes
17035 else
17036   echo "$as_me: failed program was:" >&5
17037 cat conftest.$ac_ext >&5
17038 cf_cv_sizechange=no
17039 fi
17040 rm -f conftest.$ac_objext conftest.$ac_ext
17041
17042         CPPFLAGS="$cf_save_CPPFLAGS"
17043         if test "$cf_cv_sizechange" = yes ; then
17044                 echo "size-change succeeded ($cf_opts)" >&5
17045                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17046                 break
17047         fi
17048 done
17049
17050 fi
17051 echo "$as_me:17051: result: $cf_cv_sizechange" >&5
17052 echo "${ECHO_T}$cf_cv_sizechange" >&6
17053 if test "$cf_cv_sizechange" != no ; then
17054
17055 cat >>confdefs.h <<\EOF
17056 #define HAVE_SIZECHANGE 1
17057 EOF
17058
17059         case $cf_cv_sizechange in #(vi
17060         NEED*)
17061                 cat >>confdefs.h <<EOF
17062 #define $cf_cv_sizechange  1
17063 EOF
17064
17065                 ;;
17066         esac
17067 fi
17068
17069 echo "$as_me:17069: checking for memmove" >&5
17070 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17071 if test "${ac_cv_func_memmove+set}" = set; then
17072   echo $ECHO_N "(cached) $ECHO_C" >&6
17073 else
17074   cat >conftest.$ac_ext <<_ACEOF
17075 #line 17075 "configure"
17076 #include "confdefs.h"
17077 /* System header to define __stub macros and hopefully few prototypes,
17078     which can conflict with char memmove (); below.  */
17079 #include <assert.h>
17080 /* Override any gcc2 internal prototype to avoid an error.  */
17081 #ifdef __cplusplus
17082 extern "C"
17083 #endif
17084 /* We use char because int might match the return type of a gcc2
17085    builtin and then its argument prototype would still apply.  */
17086 char memmove ();
17087 char (*f) ();
17088
17089 int
17090 main ()
17091 {
17092 /* The GNU C library defines this for functions which it implements
17093     to always fail with ENOSYS.  Some functions are actually named
17094     something starting with __ and the normal name is an alias.  */
17095 #if defined (__stub_memmove) || defined (__stub___memmove)
17096 choke me
17097 #else
17098 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17099 #endif
17100
17101   ;
17102   return 0;
17103 }
17104 _ACEOF
17105 rm -f conftest.$ac_objext conftest$ac_exeext
17106 if { (eval echo "$as_me:17106: \"$ac_link\"") >&5
17107   (eval $ac_link) 2>&5
17108   ac_status=$?
17109   echo "$as_me:17109: \$? = $ac_status" >&5
17110   (exit $ac_status); } &&
17111          { ac_try='test -s conftest$ac_exeext'
17112   { (eval echo "$as_me:17112: \"$ac_try\"") >&5
17113   (eval $ac_try) 2>&5
17114   ac_status=$?
17115   echo "$as_me:17115: \$? = $ac_status" >&5
17116   (exit $ac_status); }; }; then
17117   ac_cv_func_memmove=yes
17118 else
17119   echo "$as_me: failed program was:" >&5
17120 cat conftest.$ac_ext >&5
17121 ac_cv_func_memmove=no
17122 fi
17123 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17124 fi
17125 echo "$as_me:17125: result: $ac_cv_func_memmove" >&5
17126 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17127 if test $ac_cv_func_memmove = yes; then
17128   :
17129 else
17130
17131 echo "$as_me:17131: checking for bcopy" >&5
17132 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17133 if test "${ac_cv_func_bcopy+set}" = set; then
17134   echo $ECHO_N "(cached) $ECHO_C" >&6
17135 else
17136   cat >conftest.$ac_ext <<_ACEOF
17137 #line 17137 "configure"
17138 #include "confdefs.h"
17139 /* System header to define __stub macros and hopefully few prototypes,
17140     which can conflict with char bcopy (); below.  */
17141 #include <assert.h>
17142 /* Override any gcc2 internal prototype to avoid an error.  */
17143 #ifdef __cplusplus
17144 extern "C"
17145 #endif
17146 /* We use char because int might match the return type of a gcc2
17147    builtin and then its argument prototype would still apply.  */
17148 char bcopy ();
17149 char (*f) ();
17150
17151 int
17152 main ()
17153 {
17154 /* The GNU C library defines this for functions which it implements
17155     to always fail with ENOSYS.  Some functions are actually named
17156     something starting with __ and the normal name is an alias.  */
17157 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17158 choke me
17159 #else
17160 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17161 #endif
17162
17163   ;
17164   return 0;
17165 }
17166 _ACEOF
17167 rm -f conftest.$ac_objext conftest$ac_exeext
17168 if { (eval echo "$as_me:17168: \"$ac_link\"") >&5
17169   (eval $ac_link) 2>&5
17170   ac_status=$?
17171   echo "$as_me:17171: \$? = $ac_status" >&5
17172   (exit $ac_status); } &&
17173          { ac_try='test -s conftest$ac_exeext'
17174   { (eval echo "$as_me:17174: \"$ac_try\"") >&5
17175   (eval $ac_try) 2>&5
17176   ac_status=$?
17177   echo "$as_me:17177: \$? = $ac_status" >&5
17178   (exit $ac_status); }; }; then
17179   ac_cv_func_bcopy=yes
17180 else
17181   echo "$as_me: failed program was:" >&5
17182 cat conftest.$ac_ext >&5
17183 ac_cv_func_bcopy=no
17184 fi
17185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17186 fi
17187 echo "$as_me:17187: result: $ac_cv_func_bcopy" >&5
17188 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17189 if test $ac_cv_func_bcopy = yes; then
17190
17191         echo "$as_me:17191: checking if bcopy does overlapping moves" >&5
17192 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17193 if test "${cf_cv_good_bcopy+set}" = set; then
17194   echo $ECHO_N "(cached) $ECHO_C" >&6
17195 else
17196
17197                 if test "$cross_compiling" = yes; then
17198   cf_cv_good_bcopy=unknown
17199 else
17200   cat >conftest.$ac_ext <<_ACEOF
17201 #line 17201 "configure"
17202 #include "confdefs.h"
17203
17204 int main() {
17205         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17206         char temp[40];
17207         bcopy(data, temp, sizeof(data));
17208         bcopy(temp+10, temp, 15);
17209         bcopy(temp+5, temp+15, 10);
17210         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17211 }
17212
17213 _ACEOF
17214 rm -f conftest$ac_exeext
17215 if { (eval echo "$as_me:17215: \"$ac_link\"") >&5
17216   (eval $ac_link) 2>&5
17217   ac_status=$?
17218   echo "$as_me:17218: \$? = $ac_status" >&5
17219   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17220   { (eval echo "$as_me:17220: \"$ac_try\"") >&5
17221   (eval $ac_try) 2>&5
17222   ac_status=$?
17223   echo "$as_me:17223: \$? = $ac_status" >&5
17224   (exit $ac_status); }; }; then
17225   cf_cv_good_bcopy=yes
17226 else
17227   echo "$as_me: program exited with status $ac_status" >&5
17228 echo "$as_me: failed program was:" >&5
17229 cat conftest.$ac_ext >&5
17230 cf_cv_good_bcopy=no
17231 fi
17232 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17233 fi
17234
17235 fi
17236 echo "$as_me:17236: result: $cf_cv_good_bcopy" >&5
17237 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17238
17239 else
17240   cf_cv_good_bcopy=no
17241 fi
17242
17243         if test "$cf_cv_good_bcopy" = yes ; then
17244
17245 cat >>confdefs.h <<\EOF
17246 #define USE_OK_BCOPY 1
17247 EOF
17248
17249         else
17250
17251 cat >>confdefs.h <<\EOF
17252 #define USE_MY_MEMMOVE 1
17253 EOF
17254
17255         fi
17256
17257 fi
17258
17259 echo "$as_me:17259: checking if poll really works" >&5
17260 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17261 if test "${cf_cv_working_poll+set}" = set; then
17262   echo $ECHO_N "(cached) $ECHO_C" >&6
17263 else
17264
17265 if test "$cross_compiling" = yes; then
17266   cf_cv_working_poll=unknown
17267 else
17268   cat >conftest.$ac_ext <<_ACEOF
17269 #line 17269 "configure"
17270 #include "confdefs.h"
17271
17272 #include <stdlib.h>
17273 #include <stdio.h>
17274 #include <unistd.h>
17275 #include <fcntl.h>
17276 #ifdef HAVE_POLL_H
17277 #include <poll.h>
17278 #else
17279 #include <sys/poll.h>
17280 #endif
17281 int main() {
17282         struct pollfd myfds;
17283         int ret;
17284
17285         /* check for Darwin bug with respect to "devices" */
17286         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17287         if (myfds.fd < 0)
17288                 myfds.fd = 0;
17289         myfds.events = POLLIN;
17290         myfds.revents = 0;
17291
17292         ret = poll(&myfds, 1, 100);
17293
17294         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17295                 ret = -1;
17296         } else {
17297                 int fd = 0;
17298                 if (!isatty(fd)) {
17299                         fd = open("/dev/tty", 2);       /* O_RDWR */
17300                 }
17301
17302                 if (fd >= 0) {
17303                         /* also check with standard input */
17304                         myfds.fd = fd;
17305                         myfds.events = POLLIN;
17306                         myfds.revents = 0;
17307                         ret = poll(&myfds, 1, 100);
17308                 } else {
17309                         ret = -1;
17310                 }
17311         }
17312         ${cf_cv_main_return:-return}(ret < 0);
17313 }
17314 _ACEOF
17315 rm -f conftest$ac_exeext
17316 if { (eval echo "$as_me:17316: \"$ac_link\"") >&5
17317   (eval $ac_link) 2>&5
17318   ac_status=$?
17319   echo "$as_me:17319: \$? = $ac_status" >&5
17320   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17321   { (eval echo "$as_me:17321: \"$ac_try\"") >&5
17322   (eval $ac_try) 2>&5
17323   ac_status=$?
17324   echo "$as_me:17324: \$? = $ac_status" >&5
17325   (exit $ac_status); }; }; then
17326   cf_cv_working_poll=yes
17327 else
17328   echo "$as_me: program exited with status $ac_status" >&5
17329 echo "$as_me: failed program was:" >&5
17330 cat conftest.$ac_ext >&5
17331 cf_cv_working_poll=no
17332 fi
17333 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17334 fi
17335 fi
17336 echo "$as_me:17336: result: $cf_cv_working_poll" >&5
17337 echo "${ECHO_T}$cf_cv_working_poll" >&6
17338 test "$cf_cv_working_poll" = "yes" &&
17339 cat >>confdefs.h <<\EOF
17340 #define HAVE_WORKING_POLL 1
17341 EOF
17342
17343 echo "$as_me:17343: checking for va_copy" >&5
17344 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17345 if test "${cf_cv_have_va_copy+set}" = set; then
17346   echo $ECHO_N "(cached) $ECHO_C" >&6
17347 else
17348
17349 cat >conftest.$ac_ext <<_ACEOF
17350 #line 17350 "configure"
17351 #include "confdefs.h"
17352
17353 #include <stdarg.h>
17354
17355 int
17356 main ()
17357 {
17358
17359         static va_list dst;
17360         static va_list src;
17361         va_copy(dst, src)
17362   ;
17363   return 0;
17364 }
17365 _ACEOF
17366 rm -f conftest.$ac_objext conftest$ac_exeext
17367 if { (eval echo "$as_me:17367: \"$ac_link\"") >&5
17368   (eval $ac_link) 2>&5
17369   ac_status=$?
17370   echo "$as_me:17370: \$? = $ac_status" >&5
17371   (exit $ac_status); } &&
17372          { ac_try='test -s conftest$ac_exeext'
17373   { (eval echo "$as_me:17373: \"$ac_try\"") >&5
17374   (eval $ac_try) 2>&5
17375   ac_status=$?
17376   echo "$as_me:17376: \$? = $ac_status" >&5
17377   (exit $ac_status); }; }; then
17378   cf_cv_have_va_copy=yes
17379 else
17380   echo "$as_me: failed program was:" >&5
17381 cat conftest.$ac_ext >&5
17382 cf_cv_have_va_copy=no
17383 fi
17384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17385 fi
17386 echo "$as_me:17386: result: $cf_cv_have_va_copy" >&5
17387 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17388
17389 test "$cf_cv_have_va_copy" = yes &&
17390 cat >>confdefs.h <<\EOF
17391 #define HAVE_VA_COPY 1
17392 EOF
17393
17394 echo "$as_me:17394: checking for __va_copy" >&5
17395 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17396 if test "${cf_cv_have___va_copy+set}" = set; then
17397   echo $ECHO_N "(cached) $ECHO_C" >&6
17398 else
17399
17400 cat >conftest.$ac_ext <<_ACEOF
17401 #line 17401 "configure"
17402 #include "confdefs.h"
17403
17404 #include <stdarg.h>
17405
17406 int
17407 main ()
17408 {
17409
17410         static va_list dst;
17411         static va_list src;
17412         __va_copy(dst, src)
17413   ;
17414   return 0;
17415 }
17416 _ACEOF
17417 rm -f conftest.$ac_objext conftest$ac_exeext
17418 if { (eval echo "$as_me:17418: \"$ac_link\"") >&5
17419   (eval $ac_link) 2>&5
17420   ac_status=$?
17421   echo "$as_me:17421: \$? = $ac_status" >&5
17422   (exit $ac_status); } &&
17423          { ac_try='test -s conftest$ac_exeext'
17424   { (eval echo "$as_me:17424: \"$ac_try\"") >&5
17425   (eval $ac_try) 2>&5
17426   ac_status=$?
17427   echo "$as_me:17427: \$? = $ac_status" >&5
17428   (exit $ac_status); }; }; then
17429   cf_cv_have___va_copy=yes
17430 else
17431   echo "$as_me: failed program was:" >&5
17432 cat conftest.$ac_ext >&5
17433 cf_cv_have___va_copy=no
17434 fi
17435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17436 fi
17437 echo "$as_me:17437: result: $cf_cv_have___va_copy" >&5
17438 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17439
17440 test "$cf_cv_have___va_copy" = yes &&
17441 cat >>confdefs.h <<\EOF
17442 #define HAVE___VA_COPY 1
17443 EOF
17444
17445 echo "$as_me:17445: checking for pid_t" >&5
17446 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17447 if test "${ac_cv_type_pid_t+set}" = set; then
17448   echo $ECHO_N "(cached) $ECHO_C" >&6
17449 else
17450   cat >conftest.$ac_ext <<_ACEOF
17451 #line 17451 "configure"
17452 #include "confdefs.h"
17453 $ac_includes_default
17454 int
17455 main ()
17456 {
17457 if ((pid_t *) 0)
17458   return 0;
17459 if (sizeof (pid_t))
17460   return 0;
17461   ;
17462   return 0;
17463 }
17464 _ACEOF
17465 rm -f conftest.$ac_objext
17466 if { (eval echo "$as_me:17466: \"$ac_compile\"") >&5
17467   (eval $ac_compile) 2>&5
17468   ac_status=$?
17469   echo "$as_me:17469: \$? = $ac_status" >&5
17470   (exit $ac_status); } &&
17471          { ac_try='test -s conftest.$ac_objext'
17472   { (eval echo "$as_me:17472: \"$ac_try\"") >&5
17473   (eval $ac_try) 2>&5
17474   ac_status=$?
17475   echo "$as_me:17475: \$? = $ac_status" >&5
17476   (exit $ac_status); }; }; then
17477   ac_cv_type_pid_t=yes
17478 else
17479   echo "$as_me: failed program was:" >&5
17480 cat conftest.$ac_ext >&5
17481 ac_cv_type_pid_t=no
17482 fi
17483 rm -f conftest.$ac_objext conftest.$ac_ext
17484 fi
17485 echo "$as_me:17485: result: $ac_cv_type_pid_t" >&5
17486 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17487 if test $ac_cv_type_pid_t = yes; then
17488   :
17489 else
17490
17491 cat >>confdefs.h <<EOF
17492 #define pid_t int
17493 EOF
17494
17495 fi
17496
17497 for ac_header in unistd.h vfork.h
17498 do
17499 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17500 echo "$as_me:17500: checking for $ac_header" >&5
17501 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17502 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17503   echo $ECHO_N "(cached) $ECHO_C" >&6
17504 else
17505   cat >conftest.$ac_ext <<_ACEOF
17506 #line 17506 "configure"
17507 #include "confdefs.h"
17508 #include <$ac_header>
17509 _ACEOF
17510 if { (eval echo "$as_me:17510: \"$ac_cpp conftest.$ac_ext\"") >&5
17511   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17512   ac_status=$?
17513   egrep -v '^ *\+' conftest.er1 >conftest.err
17514   rm -f conftest.er1
17515   cat conftest.err >&5
17516   echo "$as_me:17516: \$? = $ac_status" >&5
17517   (exit $ac_status); } >/dev/null; then
17518   if test -s conftest.err; then
17519     ac_cpp_err=$ac_c_preproc_warn_flag
17520   else
17521     ac_cpp_err=
17522   fi
17523 else
17524   ac_cpp_err=yes
17525 fi
17526 if test -z "$ac_cpp_err"; then
17527   eval "$as_ac_Header=yes"
17528 else
17529   echo "$as_me: failed program was:" >&5
17530   cat conftest.$ac_ext >&5
17531   eval "$as_ac_Header=no"
17532 fi
17533 rm -f conftest.err conftest.$ac_ext
17534 fi
17535 echo "$as_me:17535: result: `eval echo '${'$as_ac_Header'}'`" >&5
17536 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17537 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17538   cat >>confdefs.h <<EOF
17539 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17540 EOF
17541
17542 fi
17543 done
17544
17545 for ac_func in fork vfork
17546 do
17547 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17548 echo "$as_me:17548: checking for $ac_func" >&5
17549 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17550 if eval "test \"\${$as_ac_var+set}\" = set"; then
17551   echo $ECHO_N "(cached) $ECHO_C" >&6
17552 else
17553   cat >conftest.$ac_ext <<_ACEOF
17554 #line 17554 "configure"
17555 #include "confdefs.h"
17556 /* System header to define __stub macros and hopefully few prototypes,
17557     which can conflict with char $ac_func (); below.  */
17558 #include <assert.h>
17559 /* Override any gcc2 internal prototype to avoid an error.  */
17560 #ifdef __cplusplus
17561 extern "C"
17562 #endif
17563 /* We use char because int might match the return type of a gcc2
17564    builtin and then its argument prototype would still apply.  */
17565 char $ac_func ();
17566 char (*f) ();
17567
17568 int
17569 main ()
17570 {
17571 /* The GNU C library defines this for functions which it implements
17572     to always fail with ENOSYS.  Some functions are actually named
17573     something starting with __ and the normal name is an alias.  */
17574 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17575 choke me
17576 #else
17577 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17578 #endif
17579
17580   ;
17581   return 0;
17582 }
17583 _ACEOF
17584 rm -f conftest.$ac_objext conftest$ac_exeext
17585 if { (eval echo "$as_me:17585: \"$ac_link\"") >&5
17586   (eval $ac_link) 2>&5
17587   ac_status=$?
17588   echo "$as_me:17588: \$? = $ac_status" >&5
17589   (exit $ac_status); } &&
17590          { ac_try='test -s conftest$ac_exeext'
17591   { (eval echo "$as_me:17591: \"$ac_try\"") >&5
17592   (eval $ac_try) 2>&5
17593   ac_status=$?
17594   echo "$as_me:17594: \$? = $ac_status" >&5
17595   (exit $ac_status); }; }; then
17596   eval "$as_ac_var=yes"
17597 else
17598   echo "$as_me: failed program was:" >&5
17599 cat conftest.$ac_ext >&5
17600 eval "$as_ac_var=no"
17601 fi
17602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17603 fi
17604 echo "$as_me:17604: result: `eval echo '${'$as_ac_var'}'`" >&5
17605 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17606 if test `eval echo '${'$as_ac_var'}'` = yes; then
17607   cat >>confdefs.h <<EOF
17608 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17609 EOF
17610
17611 fi
17612 done
17613
17614 ac_cv_func_fork_works=$ac_cv_func_fork
17615 if test "x$ac_cv_func_fork" = xyes; then
17616   echo "$as_me:17616: checking for working fork" >&5
17617 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17618 if test "${ac_cv_func_fork_works+set}" = set; then
17619   echo $ECHO_N "(cached) $ECHO_C" >&6
17620 else
17621   if test "$cross_compiling" = yes; then
17622   ac_cv_func_fork_works=cross
17623 else
17624   cat >conftest.$ac_ext <<_ACEOF
17625 /* By Rüdiger Kuhlmann. */
17626       #include <sys/types.h>
17627       #if HAVE_UNISTD_H
17628       # include <unistd.h>
17629       #endif
17630       /* Some systems only have a dummy stub for fork() */
17631       int main ()
17632       {
17633         if (fork() < 0)
17634           $ac_main_return (1);
17635         $ac_main_return (0);
17636       }
17637 _ACEOF
17638 rm -f 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); } && { ac_try='./conftest$ac_exeext'
17644   { (eval echo "$as_me:17644: \"$ac_try\"") >&5
17645   (eval $ac_try) 2>&5
17646   ac_status=$?
17647   echo "$as_me:17647: \$? = $ac_status" >&5
17648   (exit $ac_status); }; }; then
17649   ac_cv_func_fork_works=yes
17650 else
17651   echo "$as_me: program exited with status $ac_status" >&5
17652 echo "$as_me: failed program was:" >&5
17653 cat conftest.$ac_ext >&5
17654 ac_cv_func_fork_works=no
17655 fi
17656 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17657 fi
17658 fi
17659 echo "$as_me:17659: result: $ac_cv_func_fork_works" >&5
17660 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17661
17662 fi
17663 if test "x$ac_cv_func_fork_works" = xcross; then
17664   case $host in
17665     *-*-amigaos* | *-*-msdosdjgpp*)
17666       # Override, as these systems have only a dummy fork() stub
17667       ac_cv_func_fork_works=no
17668       ;;
17669     *)
17670       ac_cv_func_fork_works=yes
17671       ;;
17672   esac
17673   { echo "$as_me:17673: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17674 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17675 fi
17676 ac_cv_func_vfork_works=$ac_cv_func_vfork
17677 if test "x$ac_cv_func_vfork" = xyes; then
17678   echo "$as_me:17678: checking for working vfork" >&5
17679 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17680 if test "${ac_cv_func_vfork_works+set}" = set; then
17681   echo $ECHO_N "(cached) $ECHO_C" >&6
17682 else
17683   if test "$cross_compiling" = yes; then
17684   ac_cv_func_vfork_works=cross
17685 else
17686   cat >conftest.$ac_ext <<_ACEOF
17687 #line 17687 "configure"
17688 #include "confdefs.h"
17689 /* Thanks to Paul Eggert for this test.  */
17690 #include <stdio.h>
17691 #include <sys/types.h>
17692 #include <sys/stat.h>
17693 #if HAVE_UNISTD_H
17694 # include <unistd.h>
17695 #endif
17696 #if HAVE_VFORK_H
17697 # include <vfork.h>
17698 #endif
17699 /* On some sparc systems, changes by the child to local and incoming
17700    argument registers are propagated back to the parent.  The compiler
17701    is told about this with #include <vfork.h>, but some compilers
17702    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17703    static variable whose address is put into a register that is
17704    clobbered by the vfork.  */
17705 static
17706 #ifdef __cplusplus
17707 sparc_address_test (int arg)
17708 # else
17709 sparc_address_test (arg) int arg;
17710 #endif
17711 {
17712   static pid_t child;
17713   if (!child) {
17714     child = vfork ();
17715     if (child < 0) {
17716       perror ("vfork");
17717       _exit(2);
17718     }
17719     if (!child) {
17720       arg = getpid();
17721       write(-1, "", 0);
17722       _exit (arg);
17723     }
17724   }
17725 }
17726
17727 int
17728 main ()
17729 {
17730   pid_t parent = getpid ();
17731   pid_t child;
17732
17733   sparc_address_test ();
17734
17735   child = vfork ();
17736
17737   if (child == 0) {
17738     /* Here is another test for sparc vfork register problems.  This
17739        test uses lots of local variables, at least as many local
17740        variables as main has allocated so far including compiler
17741        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17742        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17743        reuse the register of parent for one of the local variables,
17744        since it will think that parent can't possibly be used any more
17745        in this routine.  Assigning to the local variable will thus
17746        munge parent in the parent process.  */
17747     pid_t
17748       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17749       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17750     /* Convince the compiler that p..p7 are live; otherwise, it might
17751        use the same hardware register for all 8 local variables.  */
17752     if (p != p1 || p != p2 || p != p3 || p != p4
17753         || p != p5 || p != p6 || p != p7)
17754       _exit(1);
17755
17756     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17757        from child file descriptors.  If the child closes a descriptor
17758        before it execs or exits, this munges the parent's descriptor
17759        as well.  Test for this by closing stdout in the child.  */
17760     _exit(close(fileno(stdout)) != 0);
17761   } else {
17762     int status;
17763     struct stat st;
17764
17765     while (wait(&status) != child)
17766       ;
17767     $ac_main_return(
17768          /* Was there some problem with vforking?  */
17769          child < 0
17770
17771          /* Did the child fail?  (This shouldn't happen.)  */
17772          || status
17773
17774          /* Did the vfork/compiler bug occur?  */
17775          || parent != getpid()
17776
17777          /* Did the file descriptor bug occur?  */
17778          || fstat(fileno(stdout), &st) != 0
17779          );
17780   }
17781 }
17782 _ACEOF
17783 rm -f conftest$ac_exeext
17784 if { (eval echo "$as_me:17784: \"$ac_link\"") >&5
17785   (eval $ac_link) 2>&5
17786   ac_status=$?
17787   echo "$as_me:17787: \$? = $ac_status" >&5
17788   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17789   { (eval echo "$as_me:17789: \"$ac_try\"") >&5
17790   (eval $ac_try) 2>&5
17791   ac_status=$?
17792   echo "$as_me:17792: \$? = $ac_status" >&5
17793   (exit $ac_status); }; }; then
17794   ac_cv_func_vfork_works=yes
17795 else
17796   echo "$as_me: program exited with status $ac_status" >&5
17797 echo "$as_me: failed program was:" >&5
17798 cat conftest.$ac_ext >&5
17799 ac_cv_func_vfork_works=no
17800 fi
17801 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17802 fi
17803 fi
17804 echo "$as_me:17804: result: $ac_cv_func_vfork_works" >&5
17805 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17806
17807 fi;
17808 if test "x$ac_cv_func_fork_works" = xcross; then
17809   ac_cv_func_vfork_works=ac_cv_func_vfork
17810   { echo "$as_me:17810: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17811 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17812 fi
17813
17814 if test "x$ac_cv_func_vfork_works" = xyes; then
17815
17816 cat >>confdefs.h <<\EOF
17817 #define HAVE_WORKING_VFORK 1
17818 EOF
17819
17820 else
17821
17822 cat >>confdefs.h <<\EOF
17823 #define vfork fork
17824 EOF
17825
17826 fi
17827 if test "x$ac_cv_func_fork_works" = xyes; then
17828
17829 cat >>confdefs.h <<\EOF
17830 #define HAVE_WORKING_FORK 1
17831 EOF
17832
17833 fi
17834
17835 # special check for test/ditto.c
17836
17837 echo "$as_me:17837: checking for openpty in -lutil" >&5
17838 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17839 if test "${ac_cv_lib_util_openpty+set}" = set; then
17840   echo $ECHO_N "(cached) $ECHO_C" >&6
17841 else
17842   ac_check_lib_save_LIBS=$LIBS
17843 LIBS="-lutil  $LIBS"
17844 cat >conftest.$ac_ext <<_ACEOF
17845 #line 17845 "configure"
17846 #include "confdefs.h"
17847
17848 /* Override any gcc2 internal prototype to avoid an error.  */
17849 #ifdef __cplusplus
17850 extern "C"
17851 #endif
17852 /* We use char because int might match the return type of a gcc2
17853    builtin and then its argument prototype would still apply.  */
17854 char openpty ();
17855 int
17856 main ()
17857 {
17858 openpty ();
17859   ;
17860   return 0;
17861 }
17862 _ACEOF
17863 rm -f conftest.$ac_objext conftest$ac_exeext
17864 if { (eval echo "$as_me:17864: \"$ac_link\"") >&5
17865   (eval $ac_link) 2>&5
17866   ac_status=$?
17867   echo "$as_me:17867: \$? = $ac_status" >&5
17868   (exit $ac_status); } &&
17869          { ac_try='test -s conftest$ac_exeext'
17870   { (eval echo "$as_me:17870: \"$ac_try\"") >&5
17871   (eval $ac_try) 2>&5
17872   ac_status=$?
17873   echo "$as_me:17873: \$? = $ac_status" >&5
17874   (exit $ac_status); }; }; then
17875   ac_cv_lib_util_openpty=yes
17876 else
17877   echo "$as_me: failed program was:" >&5
17878 cat conftest.$ac_ext >&5
17879 ac_cv_lib_util_openpty=no
17880 fi
17881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17882 LIBS=$ac_check_lib_save_LIBS
17883 fi
17884 echo "$as_me:17884: result: $ac_cv_lib_util_openpty" >&5
17885 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17886 if test $ac_cv_lib_util_openpty = yes; then
17887   cf_cv_lib_util=yes
17888 else
17889   cf_cv_lib_util=no
17890 fi
17891
17892 echo "$as_me:17892: checking for openpty header" >&5
17893 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17894 if test "${cf_cv_func_openpty+set}" = set; then
17895   echo $ECHO_N "(cached) $ECHO_C" >&6
17896 else
17897
17898     cf_save_LIBS="$LIBS"
17899     test $cf_cv_lib_util = yes &&
17900 cf_add_libs="-lutil"
17901 # Filter out duplicates - this happens with badly-designed ".pc" files...
17902 for cf_add_1lib in $LIBS
17903 do
17904         for cf_add_2lib in $cf_add_libs
17905         do
17906                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17907                 then
17908                         cf_add_1lib=
17909                         break
17910                 fi
17911         done
17912         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17913 done
17914 LIBS="$cf_add_libs"
17915
17916     for cf_header in pty.h libutil.h util.h
17917     do
17918     cat >conftest.$ac_ext <<_ACEOF
17919 #line 17919 "configure"
17920 #include "confdefs.h"
17921
17922 #include <$cf_header>
17923
17924 int
17925 main ()
17926 {
17927
17928     int x = openpty((int *)0, (int *)0, (char *)0,
17929                    (struct termios *)0, (struct winsize *)0);
17930
17931   ;
17932   return 0;
17933 }
17934 _ACEOF
17935 rm -f conftest.$ac_objext conftest$ac_exeext
17936 if { (eval echo "$as_me:17936: \"$ac_link\"") >&5
17937   (eval $ac_link) 2>&5
17938   ac_status=$?
17939   echo "$as_me:17939: \$? = $ac_status" >&5
17940   (exit $ac_status); } &&
17941          { ac_try='test -s conftest$ac_exeext'
17942   { (eval echo "$as_me:17942: \"$ac_try\"") >&5
17943   (eval $ac_try) 2>&5
17944   ac_status=$?
17945   echo "$as_me:17945: \$? = $ac_status" >&5
17946   (exit $ac_status); }; }; then
17947
17948         cf_cv_func_openpty=$cf_header
17949         break
17950
17951 else
17952   echo "$as_me: failed program was:" >&5
17953 cat conftest.$ac_ext >&5
17954
17955         cf_cv_func_openpty=no
17956
17957 fi
17958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17959     done
17960     LIBS="$cf_save_LIBS"
17961
17962 fi
17963 echo "$as_me:17963: result: $cf_cv_func_openpty" >&5
17964 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17965
17966 if test "$cf_cv_func_openpty" != no ; then
17967
17968 cat >>confdefs.h <<EOF
17969 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17970 EOF
17971
17972 cat >>confdefs.h <<\EOF
17973 #define USE_XTERM_PTY 1
17974 EOF
17975
17976     if test "x$cf_cv_lib_util" = xyes ; then
17977
17978 cf_add_libs="-lutil"
17979 # Filter out duplicates - this happens with badly-designed ".pc" files...
17980 for cf_add_1lib in $TEST_LIBS
17981 do
17982         for cf_add_2lib in $cf_add_libs
17983         do
17984                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17985                 then
17986                         cf_add_1lib=
17987                         break
17988                 fi
17989         done
17990         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17991 done
17992 TEST_LIBS="$cf_add_libs"
17993
17994     fi
17995 fi
17996
17997 if test "$with_hashed_db" != no ; then
17998
17999 cat >>confdefs.h <<\EOF
18000 #define USE_HASHED_DB 1
18001 EOF
18002
18003 case $with_hashed_db in #(vi
18004 yes|*able*) #(vi
18005     ;;
18006 *)
18007     if test -d "$with_hashed_db" ; then
18008
18009 if test -n "$with_hashed_db/include" ; then
18010   for cf_add_incdir in $with_hashed_db/include
18011   do
18012         while test $cf_add_incdir != /usr/include
18013         do
18014           if test -d $cf_add_incdir
18015           then
18016                 cf_have_incdir=no
18017                 if test -n "$CFLAGS$CPPFLAGS" ; then
18018                   # a loop is needed to ensure we can add subdirs of existing dirs
18019                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18020                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18021                           cf_have_incdir=yes; break
18022                         fi
18023                   done
18024                 fi
18025
18026                 if test "$cf_have_incdir" = no ; then
18027                   if test "$cf_add_incdir" = /usr/local/include ; then
18028                         if test "$GCC" = yes
18029                         then
18030                           cf_save_CPPFLAGS=$CPPFLAGS
18031                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18032                           cat >conftest.$ac_ext <<_ACEOF
18033 #line 18033 "configure"
18034 #include "confdefs.h"
18035 #include <stdio.h>
18036 int
18037 main ()
18038 {
18039 printf("Hello")
18040   ;
18041   return 0;
18042 }
18043 _ACEOF
18044 rm -f conftest.$ac_objext
18045 if { (eval echo "$as_me:18045: \"$ac_compile\"") >&5
18046   (eval $ac_compile) 2>&5
18047   ac_status=$?
18048   echo "$as_me:18048: \$? = $ac_status" >&5
18049   (exit $ac_status); } &&
18050          { ac_try='test -s conftest.$ac_objext'
18051   { (eval echo "$as_me:18051: \"$ac_try\"") >&5
18052   (eval $ac_try) 2>&5
18053   ac_status=$?
18054   echo "$as_me:18054: \$? = $ac_status" >&5
18055   (exit $ac_status); }; }; then
18056   :
18057 else
18058   echo "$as_me: failed program was:" >&5
18059 cat conftest.$ac_ext >&5
18060 cf_have_incdir=yes
18061 fi
18062 rm -f conftest.$ac_objext conftest.$ac_ext
18063                           CPPFLAGS=$cf_save_CPPFLAGS
18064                         fi
18065                   fi
18066                 fi
18067
18068                 if test "$cf_have_incdir" = no ; then
18069                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18070
18071 echo "${as_me:-configure}:18071: testing adding $cf_add_incdir to include-path ..." 1>&5
18072
18073                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18074
18075                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18076                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18077                   cf_add_incdir="$cf_top_incdir"
18078                 else
18079                   break
18080                 fi
18081           fi
18082         done
18083   done
18084 fi
18085
18086 if test -n "$with_hashed_db/lib" ; then
18087   for cf_add_libdir in $with_hashed_db/lib
18088   do
18089     if test $cf_add_libdir = /usr/lib ; then
18090       :
18091     elif test -d $cf_add_libdir
18092     then
18093       cf_have_libdir=no
18094       if test -n "$LDFLAGS$LIBS" ; then
18095         # a loop is needed to ensure we can add subdirs of existing dirs
18096         for cf_test_libdir in $LDFLAGS $LIBS ; do
18097           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18098             cf_have_libdir=yes; break
18099           fi
18100         done
18101       fi
18102       if test "$cf_have_libdir" = no ; then
18103         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18104
18105 echo "${as_me:-configure}:18105: testing adding $cf_add_libdir to library-path ..." 1>&5
18106
18107         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18108       fi
18109     fi
18110   done
18111 fi
18112
18113         else
18114                 case "$with_hashed_db" in #(vi
18115                 ./*|../*|/*)
18116                         { echo "$as_me:18116: WARNING: no such directory $with_hashed_db" >&5
18117 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18118                         ;; #(vi
18119                 *)
18120
18121 cf_search=
18122
18123 test "x/usr" != "x$prefix" && \
18124 test -d "/usr" && \
18125 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18126         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
18127         test -d /usr/include &&          cf_search="$cf_search /usr/include"
18128         test -d /usr/include/$with_hashed_db &&       cf_search="$cf_search /usr/include/$with_hashed_db"
18129         test -d /usr/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/include/$with_hashed_db/include"
18130         test -d /usr/$with_hashed_db/include &&       cf_search="$cf_search /usr/$with_hashed_db/include"
18131         test -d /usr/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/include/$with_hashed_db"
18132 }
18133
18134 test "x$prefix" != "xNONE" && \
18135 test -d "$prefix" && \
18136  {
18137         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18138         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18139         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18140         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18141         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18142         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18143 }
18144
18145 test "x/usr/local" != "x$prefix" && \
18146 test -d "/usr/local" && \
18147 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18148         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
18149         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
18150         test -d /usr/local/include/$with_hashed_db &&       cf_search="$cf_search /usr/local/include/$with_hashed_db"
18151         test -d /usr/local/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/local/include/$with_hashed_db/include"
18152         test -d /usr/local/$with_hashed_db/include &&       cf_search="$cf_search /usr/local/$with_hashed_db/include"
18153         test -d /usr/local/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/include/$with_hashed_db"
18154 }
18155
18156 test "x/opt" != "x$prefix" && \
18157 test -d "/opt" && \
18158 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18159         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
18160         test -d /opt/include &&          cf_search="$cf_search /opt/include"
18161         test -d /opt/include/$with_hashed_db &&       cf_search="$cf_search /opt/include/$with_hashed_db"
18162         test -d /opt/include/$with_hashed_db/include &&    cf_search="$cf_search /opt/include/$with_hashed_db/include"
18163         test -d /opt/$with_hashed_db/include &&       cf_search="$cf_search /opt/$with_hashed_db/include"
18164         test -d /opt/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/include/$with_hashed_db"
18165 }
18166
18167 test "x$HOME" != "x$prefix" && \
18168 test -d "$HOME" && \
18169 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18170         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
18171         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
18172         test -d $HOME/include/$with_hashed_db &&       cf_search="$cf_search $HOME/include/$with_hashed_db"
18173         test -d $HOME/include/$with_hashed_db/include &&    cf_search="$cf_search $HOME/include/$with_hashed_db/include"
18174         test -d $HOME/$with_hashed_db/include &&       cf_search="$cf_search $HOME/$with_hashed_db/include"
18175         test -d $HOME/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/include/$with_hashed_db"
18176 }
18177
18178         for cf_item in $cf_search
18179         do
18180                 case $cf_item in #(vi
18181                 */$with_hashed_db)
18182
18183 if test -n "$cf_item" ; then
18184   for cf_add_incdir in $cf_item
18185   do
18186         while test $cf_add_incdir != /usr/include
18187         do
18188           if test -d $cf_add_incdir
18189           then
18190                 cf_have_incdir=no
18191                 if test -n "$CFLAGS$CPPFLAGS" ; then
18192                   # a loop is needed to ensure we can add subdirs of existing dirs
18193                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18194                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18195                           cf_have_incdir=yes; break
18196                         fi
18197                   done
18198                 fi
18199
18200                 if test "$cf_have_incdir" = no ; then
18201                   if test "$cf_add_incdir" = /usr/local/include ; then
18202                         if test "$GCC" = yes
18203                         then
18204                           cf_save_CPPFLAGS=$CPPFLAGS
18205                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18206                           cat >conftest.$ac_ext <<_ACEOF
18207 #line 18207 "configure"
18208 #include "confdefs.h"
18209 #include <stdio.h>
18210 int
18211 main ()
18212 {
18213 printf("Hello")
18214   ;
18215   return 0;
18216 }
18217 _ACEOF
18218 rm -f conftest.$ac_objext
18219 if { (eval echo "$as_me:18219: \"$ac_compile\"") >&5
18220   (eval $ac_compile) 2>&5
18221   ac_status=$?
18222   echo "$as_me:18222: \$? = $ac_status" >&5
18223   (exit $ac_status); } &&
18224          { ac_try='test -s conftest.$ac_objext'
18225   { (eval echo "$as_me:18225: \"$ac_try\"") >&5
18226   (eval $ac_try) 2>&5
18227   ac_status=$?
18228   echo "$as_me:18228: \$? = $ac_status" >&5
18229   (exit $ac_status); }; }; then
18230   :
18231 else
18232   echo "$as_me: failed program was:" >&5
18233 cat conftest.$ac_ext >&5
18234 cf_have_incdir=yes
18235 fi
18236 rm -f conftest.$ac_objext conftest.$ac_ext
18237                           CPPFLAGS=$cf_save_CPPFLAGS
18238                         fi
18239                   fi
18240                 fi
18241
18242                 if test "$cf_have_incdir" = no ; then
18243                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18244
18245 echo "${as_me:-configure}:18245: testing adding $cf_add_incdir to include-path ..." 1>&5
18246
18247                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18248
18249                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18250                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18251                   cf_add_incdir="$cf_top_incdir"
18252                 else
18253                   break
18254                 fi
18255           fi
18256         done
18257   done
18258 fi
18259
18260                         ;;
18261                 esac
18262         done
18263
18264 cf_search=
18265
18266 test "x/usr" != "x$prefix" && \
18267 test -d "/usr" && \
18268 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18269         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
18270         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
18271         test -d /usr/lib/$with_hashed_db &&       cf_search="$cf_search /usr/lib/$with_hashed_db"
18272         test -d /usr/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/lib/$with_hashed_db/lib"
18273         test -d /usr/$with_hashed_db/lib &&       cf_search="$cf_search /usr/$with_hashed_db/lib"
18274         test -d /usr/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/lib/$with_hashed_db"
18275 }
18276
18277 test "x$prefix" != "xNONE" && \
18278 test -d "$prefix" && \
18279  {
18280         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18281         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18282         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18283         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18284         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18285         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18286 }
18287
18288 test "x/usr/local" != "x$prefix" && \
18289 test -d "/usr/local" && \
18290 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18291         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
18292         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
18293         test -d /usr/local/lib/$with_hashed_db &&       cf_search="$cf_search /usr/local/lib/$with_hashed_db"
18294         test -d /usr/local/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/local/lib/$with_hashed_db/lib"
18295         test -d /usr/local/$with_hashed_db/lib &&       cf_search="$cf_search /usr/local/$with_hashed_db/lib"
18296         test -d /usr/local/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/lib/$with_hashed_db"
18297 }
18298
18299 test "x/opt" != "x$prefix" && \
18300 test -d "/opt" && \
18301 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18302         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
18303         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
18304         test -d /opt/lib/$with_hashed_db &&       cf_search="$cf_search /opt/lib/$with_hashed_db"
18305         test -d /opt/lib/$with_hashed_db/lib &&    cf_search="$cf_search /opt/lib/$with_hashed_db/lib"
18306         test -d /opt/$with_hashed_db/lib &&       cf_search="$cf_search /opt/$with_hashed_db/lib"
18307         test -d /opt/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/lib/$with_hashed_db"
18308 }
18309
18310 test "x$HOME" != "x$prefix" && \
18311 test -d "$HOME" && \
18312 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18313         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
18314         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
18315         test -d $HOME/lib/$with_hashed_db &&       cf_search="$cf_search $HOME/lib/$with_hashed_db"
18316         test -d $HOME/lib/$with_hashed_db/lib &&    cf_search="$cf_search $HOME/lib/$with_hashed_db/lib"
18317         test -d $HOME/$with_hashed_db/lib &&       cf_search="$cf_search $HOME/$with_hashed_db/lib"
18318         test -d $HOME/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/lib/$with_hashed_db"
18319 }
18320
18321         for cf_item in $cf_search
18322         do
18323                 case $cf_item in #(vi
18324                 */$with_hashed_db)
18325
18326 if test -n "$cf_item" ; then
18327   for cf_add_libdir in $cf_item
18328   do
18329     if test $cf_add_libdir = /usr/lib ; then
18330       :
18331     elif test -d $cf_add_libdir
18332     then
18333       cf_have_libdir=no
18334       if test -n "$LDFLAGS$LIBS" ; then
18335         # a loop is needed to ensure we can add subdirs of existing dirs
18336         for cf_test_libdir in $LDFLAGS $LIBS ; do
18337           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18338             cf_have_libdir=yes; break
18339           fi
18340         done
18341       fi
18342       if test "$cf_have_libdir" = no ; then
18343         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18344
18345 echo "${as_me:-configure}:18345: testing adding $cf_add_libdir to library-path ..." 1>&5
18346
18347         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18348       fi
18349     fi
18350   done
18351 fi
18352
18353                         ;;
18354                 esac
18355         done
18356
18357                         ;;
18358                 esac
18359     fi
18360 esac
18361
18362 echo "$as_me:18362: checking for db.h" >&5
18363 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18364 if test "${ac_cv_header_db_h+set}" = set; then
18365   echo $ECHO_N "(cached) $ECHO_C" >&6
18366 else
18367   cat >conftest.$ac_ext <<_ACEOF
18368 #line 18368 "configure"
18369 #include "confdefs.h"
18370 #include <db.h>
18371 _ACEOF
18372 if { (eval echo "$as_me:18372: \"$ac_cpp conftest.$ac_ext\"") >&5
18373   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18374   ac_status=$?
18375   egrep -v '^ *\+' conftest.er1 >conftest.err
18376   rm -f conftest.er1
18377   cat conftest.err >&5
18378   echo "$as_me:18378: \$? = $ac_status" >&5
18379   (exit $ac_status); } >/dev/null; then
18380   if test -s conftest.err; then
18381     ac_cpp_err=$ac_c_preproc_warn_flag
18382   else
18383     ac_cpp_err=
18384   fi
18385 else
18386   ac_cpp_err=yes
18387 fi
18388 if test -z "$ac_cpp_err"; then
18389   ac_cv_header_db_h=yes
18390 else
18391   echo "$as_me: failed program was:" >&5
18392   cat conftest.$ac_ext >&5
18393   ac_cv_header_db_h=no
18394 fi
18395 rm -f conftest.err conftest.$ac_ext
18396 fi
18397 echo "$as_me:18397: result: $ac_cv_header_db_h" >&5
18398 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18399 if test $ac_cv_header_db_h = yes; then
18400
18401 echo "$as_me:18401: checking for version of db" >&5
18402 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18403 if test "${cf_cv_hashed_db_version+set}" = set; then
18404   echo $ECHO_N "(cached) $ECHO_C" >&6
18405 else
18406
18407 cf_cv_hashed_db_version=unknown
18408
18409 for cf_db_version in 1 2 3 4 5 6
18410 do
18411
18412 echo "${as_me:-configure}:18412: testing checking for db version $cf_db_version ..." 1>&5
18413
18414         cat >conftest.$ac_ext <<_ACEOF
18415 #line 18415 "configure"
18416 #include "confdefs.h"
18417
18418 $ac_includes_default
18419 #include <db.h>
18420
18421 #ifdef DB_VERSION_MAJOR
18422         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18423 #if $cf_db_version == DB_VERSION_MAJOR
18424         /* ok */
18425 #else
18426         make an error
18427 #endif
18428 #else
18429 #if $cf_db_version == 1
18430         /* ok: assuming this is DB 1.8.5 */
18431 #else
18432         make an error
18433 #endif
18434 #endif
18435
18436 int
18437 main ()
18438 {
18439 DBT *foo = 0
18440   ;
18441   return 0;
18442 }
18443 _ACEOF
18444 rm -f conftest.$ac_objext
18445 if { (eval echo "$as_me:18445: \"$ac_compile\"") >&5
18446   (eval $ac_compile) 2>&5
18447   ac_status=$?
18448   echo "$as_me:18448: \$? = $ac_status" >&5
18449   (exit $ac_status); } &&
18450          { ac_try='test -s conftest.$ac_objext'
18451   { (eval echo "$as_me:18451: \"$ac_try\"") >&5
18452   (eval $ac_try) 2>&5
18453   ac_status=$?
18454   echo "$as_me:18454: \$? = $ac_status" >&5
18455   (exit $ac_status); }; }; then
18456
18457         cf_cv_hashed_db_version=$cf_db_version
18458         break
18459
18460 else
18461   echo "$as_me: failed program was:" >&5
18462 cat conftest.$ac_ext >&5
18463 fi
18464 rm -f conftest.$ac_objext conftest.$ac_ext
18465 done
18466
18467 fi
18468 echo "$as_me:18468: result: $cf_cv_hashed_db_version" >&5
18469 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18470
18471 if test "$cf_cv_hashed_db_version" = unknown ; then
18472         { { echo "$as_me:18472: error: Cannot determine version of db" >&5
18473 echo "$as_me: error: Cannot determine version of db" >&2;}
18474    { (exit 1); exit 1; }; }
18475 else
18476
18477 echo "$as_me:18477: checking for db libraries" >&5
18478 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18479 if test "${cf_cv_hashed_db_libs+set}" = set; then
18480   echo $ECHO_N "(cached) $ECHO_C" >&6
18481 else
18482
18483 cf_cv_hashed_db_libs=unknown
18484 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18485 do
18486         cf_save_libs="$LIBS"
18487         if test -n "$cf_db_libs"; then
18488
18489 cf_add_libs="-l$cf_db_libs"
18490 # Filter out duplicates - this happens with badly-designed ".pc" files...
18491 for cf_add_1lib in $LIBS
18492 do
18493         for cf_add_2lib in $cf_add_libs
18494         do
18495                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18496                 then
18497                         cf_add_1lib=
18498                         break
18499                 fi
18500         done
18501         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18502 done
18503 LIBS="$cf_add_libs"
18504
18505         fi
18506
18507 echo "${as_me:-configure}:18507: testing checking for library "$cf_db_libs" ..." 1>&5
18508
18509         cat >conftest.$ac_ext <<_ACEOF
18510 #line 18510 "configure"
18511 #include "confdefs.h"
18512
18513 $ac_includes_default
18514 #include <db.h>
18515
18516 int
18517 main ()
18518 {
18519
18520         char *path = "/tmp/foo";
18521 #ifdef DB_VERSION_MAJOR
18522 #if DB_VERSION_MAJOR >= 4
18523         DB *result = 0;
18524         db_create(&result, NULL, 0);
18525         result->open(result,
18526                 NULL,
18527                 path,
18528                 path,
18529                 DB_HASH,
18530                 DB_CREATE,
18531                 0644);
18532 #elif DB_VERSION_MAJOR >= 3
18533         DB *result = 0;
18534         db_create(&result, NULL, 0);
18535         result->open(result,
18536                 path,
18537                 path,
18538                 DB_HASH,
18539                 DB_CREATE,
18540                 0644);
18541 #elif DB_VERSION_MAJOR >= 2
18542         DB *result = 0;
18543         db_open(path,
18544                 DB_HASH,
18545                 DB_CREATE,
18546                 0644,
18547                 (DB_ENV *) 0,
18548                 (DB_INFO *) 0,
18549                 &result);
18550 #endif /* DB_VERSION_MAJOR */
18551 #else
18552         DB *result = dbopen(path,
18553                      2,
18554                      0644,
18555                      DB_HASH,
18556                      0);
18557 #endif
18558         ${cf_cv_main_return:-return}(result != 0)
18559
18560   ;
18561   return 0;
18562 }
18563 _ACEOF
18564 rm -f conftest.$ac_objext conftest$ac_exeext
18565 if { (eval echo "$as_me:18565: \"$ac_link\"") >&5
18566   (eval $ac_link) 2>&5
18567   ac_status=$?
18568   echo "$as_me:18568: \$? = $ac_status" >&5
18569   (exit $ac_status); } &&
18570          { ac_try='test -s conftest$ac_exeext'
18571   { (eval echo "$as_me:18571: \"$ac_try\"") >&5
18572   (eval $ac_try) 2>&5
18573   ac_status=$?
18574   echo "$as_me:18574: \$? = $ac_status" >&5
18575   (exit $ac_status); }; }; then
18576
18577         if test -n "$cf_db_libs" ; then
18578                 cf_cv_hashed_db_libs=$cf_db_libs
18579         else
18580                 cf_cv_hashed_db_libs=default
18581         fi
18582         LIBS="$cf_save_libs"
18583         break
18584
18585 else
18586   echo "$as_me: failed program was:" >&5
18587 cat conftest.$ac_ext >&5
18588 fi
18589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18590         LIBS="$cf_save_libs"
18591 done
18592
18593 fi
18594 echo "$as_me:18594: result: $cf_cv_hashed_db_libs" >&5
18595 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18596
18597         if test "$cf_cv_hashed_db_libs" = unknown ; then
18598                 { { echo "$as_me:18598: error: Cannot determine library for db" >&5
18599 echo "$as_me: error: Cannot determine library for db" >&2;}
18600    { (exit 1); exit 1; }; }
18601         elif test "$cf_cv_hashed_db_libs" != default ; then
18602
18603 cf_add_libs="-l$cf_cv_hashed_db_libs"
18604 # Filter out duplicates - this happens with badly-designed ".pc" files...
18605 for cf_add_1lib in $LIBS
18606 do
18607         for cf_add_2lib in $cf_add_libs
18608         do
18609                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18610                 then
18611                         cf_add_1lib=
18612                         break
18613                 fi
18614         done
18615         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18616 done
18617 LIBS="$cf_add_libs"
18618
18619         fi
18620 fi
18621
18622 else
18623
18624         { { echo "$as_me:18624: error: Cannot find db.h" >&5
18625 echo "$as_me: error: Cannot find db.h" >&2;}
18626    { (exit 1); exit 1; }; }
18627
18628 fi
18629
18630 fi
18631
18632 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18633         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18634         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18635 fi
18636
18637 # Just in case, check if the C compiler has a bool type.
18638
18639 echo "$as_me:18639: checking if we should include stdbool.h" >&5
18640 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18641
18642 if test "${cf_cv_header_stdbool_h+set}" = set; then
18643   echo $ECHO_N "(cached) $ECHO_C" >&6
18644 else
18645
18646         cat >conftest.$ac_ext <<_ACEOF
18647 #line 18647 "configure"
18648 #include "confdefs.h"
18649
18650 int
18651 main ()
18652 {
18653 bool foo = false
18654   ;
18655   return 0;
18656 }
18657 _ACEOF
18658 rm -f conftest.$ac_objext
18659 if { (eval echo "$as_me:18659: \"$ac_compile\"") >&5
18660   (eval $ac_compile) 2>&5
18661   ac_status=$?
18662   echo "$as_me:18662: \$? = $ac_status" >&5
18663   (exit $ac_status); } &&
18664          { ac_try='test -s conftest.$ac_objext'
18665   { (eval echo "$as_me:18665: \"$ac_try\"") >&5
18666   (eval $ac_try) 2>&5
18667   ac_status=$?
18668   echo "$as_me:18668: \$? = $ac_status" >&5
18669   (exit $ac_status); }; }; then
18670   cf_cv_header_stdbool_h=0
18671 else
18672   echo "$as_me: failed program was:" >&5
18673 cat conftest.$ac_ext >&5
18674 cat >conftest.$ac_ext <<_ACEOF
18675 #line 18675 "configure"
18676 #include "confdefs.h"
18677
18678 #ifndef __BEOS__
18679 #include <stdbool.h>
18680 #endif
18681
18682 int
18683 main ()
18684 {
18685 bool foo = false
18686   ;
18687   return 0;
18688 }
18689 _ACEOF
18690 rm -f conftest.$ac_objext
18691 if { (eval echo "$as_me:18691: \"$ac_compile\"") >&5
18692   (eval $ac_compile) 2>&5
18693   ac_status=$?
18694   echo "$as_me:18694: \$? = $ac_status" >&5
18695   (exit $ac_status); } &&
18696          { ac_try='test -s conftest.$ac_objext'
18697   { (eval echo "$as_me:18697: \"$ac_try\"") >&5
18698   (eval $ac_try) 2>&5
18699   ac_status=$?
18700   echo "$as_me:18700: \$? = $ac_status" >&5
18701   (exit $ac_status); }; }; then
18702   cf_cv_header_stdbool_h=1
18703 else
18704   echo "$as_me: failed program was:" >&5
18705 cat conftest.$ac_ext >&5
18706 cf_cv_header_stdbool_h=0
18707 fi
18708 rm -f conftest.$ac_objext conftest.$ac_ext
18709 fi
18710 rm -f conftest.$ac_objext conftest.$ac_ext
18711 fi
18712
18713 if test "$cf_cv_header_stdbool_h" = 1
18714 then    echo "$as_me:18714: result: yes" >&5
18715 echo "${ECHO_T}yes" >&6
18716 else    echo "$as_me:18716: result: no" >&5
18717 echo "${ECHO_T}no" >&6
18718 fi
18719
18720 echo "$as_me:18720: checking for builtin bool type" >&5
18721 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18722
18723 if test "${cf_cv_cc_bool_type+set}" = set; then
18724   echo $ECHO_N "(cached) $ECHO_C" >&6
18725 else
18726
18727         cat >conftest.$ac_ext <<_ACEOF
18728 #line 18728 "configure"
18729 #include "confdefs.h"
18730
18731 #include <stdio.h>
18732 #include <sys/types.h>
18733
18734 int
18735 main ()
18736 {
18737 bool x = false
18738   ;
18739   return 0;
18740 }
18741 _ACEOF
18742 rm -f conftest.$ac_objext
18743 if { (eval echo "$as_me:18743: \"$ac_compile\"") >&5
18744   (eval $ac_compile) 2>&5
18745   ac_status=$?
18746   echo "$as_me:18746: \$? = $ac_status" >&5
18747   (exit $ac_status); } &&
18748          { ac_try='test -s conftest.$ac_objext'
18749   { (eval echo "$as_me:18749: \"$ac_try\"") >&5
18750   (eval $ac_try) 2>&5
18751   ac_status=$?
18752   echo "$as_me:18752: \$? = $ac_status" >&5
18753   (exit $ac_status); }; }; then
18754   cf_cv_cc_bool_type=1
18755 else
18756   echo "$as_me: failed program was:" >&5
18757 cat conftest.$ac_ext >&5
18758 cf_cv_cc_bool_type=0
18759 fi
18760 rm -f conftest.$ac_objext conftest.$ac_ext
18761
18762 fi
18763
18764 if test "$cf_cv_cc_bool_type" = 1
18765 then    echo "$as_me:18765: result: yes" >&5
18766 echo "${ECHO_T}yes" >&6
18767 else    echo "$as_me:18767: result: no" >&5
18768 echo "${ECHO_T}no" >&6
18769 fi
18770
18771 # Check for C++ compiler characteristics (and ensure that it's there!)
18772 if test -n "$CXX" ; then
18773         ac_ext=cc
18774 ac_cpp='$CXXCPP $CPPFLAGS'
18775 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18776 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18777 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18778 ac_main_return=return
18779
18780 if test -n "$GXX" ; then
18781 case $cf_cv_system_name in #(vi
18782 os2*) #(vi
18783         cf_stdcpp_libname=stdcpp
18784         ;;
18785 *)
18786         cf_stdcpp_libname=stdc++
18787         ;;
18788 esac
18789 echo "$as_me:18789: checking for library $cf_stdcpp_libname" >&5
18790 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18791 if test "${cf_cv_libstdcpp+set}" = set; then
18792   echo $ECHO_N "(cached) $ECHO_C" >&6
18793 else
18794
18795         cf_save="$LIBS"
18796
18797 cf_add_libs="-l$cf_stdcpp_libname"
18798 # Filter out duplicates - this happens with badly-designed ".pc" files...
18799 for cf_add_1lib in $LIBS
18800 do
18801         for cf_add_2lib in $cf_add_libs
18802         do
18803                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18804                 then
18805                         cf_add_1lib=
18806                         break
18807                 fi
18808         done
18809         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18810 done
18811 LIBS="$cf_add_libs"
18812
18813 cat >conftest.$ac_ext <<_ACEOF
18814 #line 18814 "configure"
18815 #include "confdefs.h"
18816
18817 #include <strstream.h>
18818 int
18819 main ()
18820 {
18821
18822 char buf[80];
18823 strstreambuf foo(buf, sizeof(buf))
18824
18825   ;
18826   return 0;
18827 }
18828 _ACEOF
18829 rm -f conftest.$ac_objext conftest$ac_exeext
18830 if { (eval echo "$as_me:18830: \"$ac_link\"") >&5
18831   (eval $ac_link) 2>&5
18832   ac_status=$?
18833   echo "$as_me:18833: \$? = $ac_status" >&5
18834   (exit $ac_status); } &&
18835          { ac_try='test -s conftest$ac_exeext'
18836   { (eval echo "$as_me:18836: \"$ac_try\"") >&5
18837   (eval $ac_try) 2>&5
18838   ac_status=$?
18839   echo "$as_me:18839: \$? = $ac_status" >&5
18840   (exit $ac_status); }; }; then
18841   cf_cv_libstdcpp=yes
18842 else
18843   echo "$as_me: failed program was:" >&5
18844 cat conftest.$ac_ext >&5
18845 cf_cv_libstdcpp=no
18846 fi
18847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18848         LIBS="$cf_save"
18849
18850 fi
18851 echo "$as_me:18851: result: $cf_cv_libstdcpp" >&5
18852 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18853 test "$cf_cv_libstdcpp" = yes &&
18854 cf_add_libs="-l$cf_stdcpp_libname"
18855 # Filter out duplicates - this happens with badly-designed ".pc" files...
18856 for cf_add_1lib in $CXXLIBS
18857 do
18858         for cf_add_2lib in $cf_add_libs
18859         do
18860                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18861                 then
18862                         cf_add_1lib=
18863                         break
18864                 fi
18865         done
18866         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18867 done
18868 CXXLIBS="$cf_add_libs"
18869
18870 fi
18871
18872         echo "$as_me:18872: checking whether $CXX understands -c and -o together" >&5
18873 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18874 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18875   echo $ECHO_N "(cached) $ECHO_C" >&6
18876 else
18877
18878 cat > conftest.$ac_ext <<CF_EOF
18879 #include <stdio.h>
18880 int main()
18881 {
18882         ${cf_cv_main_return:-return}(0);
18883 }
18884 CF_EOF
18885 # We do the test twice because some compilers refuse to overwrite an
18886 # existing .o file with -o, though they will create one.
18887 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18888 if { (eval echo "$as_me:18888: \"$ac_try\"") >&5
18889   (eval $ac_try) 2>&5
18890   ac_status=$?
18891   echo "$as_me:18891: \$? = $ac_status" >&5
18892   (exit $ac_status); } &&
18893   test -f conftest2.$ac_objext && { (eval echo "$as_me:18893: \"$ac_try\"") >&5
18894   (eval $ac_try) 2>&5
18895   ac_status=$?
18896   echo "$as_me:18896: \$? = $ac_status" >&5
18897   (exit $ac_status); };
18898 then
18899   eval cf_cv_prog_CXX_c_o=yes
18900 else
18901   eval cf_cv_prog_CXX_c_o=no
18902 fi
18903 rm -rf conftest*
18904
18905 fi
18906 if test $cf_cv_prog_CXX_c_o = yes; then
18907   echo "$as_me:18907: result: yes" >&5
18908 echo "${ECHO_T}yes" >&6
18909 else
18910   echo "$as_me:18910: result: no" >&5
18911 echo "${ECHO_T}no" >&6
18912 fi
18913
18914         case $GXX_VERSION in
18915         1*|2.0-6*)
18916                 cf_cxx_library=yes
18917                 ;;
18918         *-2.7*|2.7*)
18919
18920 cf_cxx_library=unknown
18921 case $cf_cv_system_name in #(vi
18922 os2*) #(vi
18923         cf_gpp_libname=gpp
18924         ;;
18925 *)
18926         cf_gpp_libname=g++
18927         ;;
18928 esac
18929 if test "$GXX" = yes; then
18930         echo "$as_me:18930: checking for lib$cf_gpp_libname" >&5
18931 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18932         cf_save="$LIBS"
18933
18934 cf_add_libs="-l$cf_gpp_libname"
18935 # Filter out duplicates - this happens with badly-designed ".pc" files...
18936 for cf_add_1lib in $LIBS
18937 do
18938         for cf_add_2lib in $cf_add_libs
18939         do
18940                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18941                 then
18942                         cf_add_1lib=
18943                         break
18944                 fi
18945         done
18946         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18947 done
18948 LIBS="$cf_add_libs"
18949
18950         cat >conftest.$ac_ext <<_ACEOF
18951 #line 18951 "configure"
18952 #include "confdefs.h"
18953
18954 #include <$cf_gpp_libname/builtin.h>
18955
18956 int
18957 main ()
18958 {
18959 two_arg_error_handler_t foo2 = lib_error_handler
18960   ;
18961   return 0;
18962 }
18963 _ACEOF
18964 rm -f conftest.$ac_objext conftest$ac_exeext
18965 if { (eval echo "$as_me:18965: \"$ac_link\"") >&5
18966   (eval $ac_link) 2>&5
18967   ac_status=$?
18968   echo "$as_me:18968: \$? = $ac_status" >&5
18969   (exit $ac_status); } &&
18970          { ac_try='test -s conftest$ac_exeext'
18971   { (eval echo "$as_me:18971: \"$ac_try\"") >&5
18972   (eval $ac_try) 2>&5
18973   ac_status=$?
18974   echo "$as_me:18974: \$? = $ac_status" >&5
18975   (exit $ac_status); }; }; then
18976   cf_cxx_library=yes
18977
18978 cf_add_libs="-l$cf_gpp_libname"
18979 # Filter out duplicates - this happens with badly-designed ".pc" files...
18980 for cf_add_1lib in $CXXLIBS
18981 do
18982         for cf_add_2lib in $cf_add_libs
18983         do
18984                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18985                 then
18986                         cf_add_1lib=
18987                         break
18988                 fi
18989         done
18990         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18991 done
18992 CXXLIBS="$cf_add_libs"
18993
18994          if test "$cf_gpp_libname" = cpp ; then
18995
18996 cat >>confdefs.h <<\EOF
18997 #define HAVE_GPP_BUILTIN_H 1
18998 EOF
18999
19000          else
19001
19002 cat >>confdefs.h <<\EOF
19003 #define HAVE_GXX_BUILTIN_H 1
19004 EOF
19005
19006          fi
19007 else
19008   echo "$as_me: failed program was:" >&5
19009 cat conftest.$ac_ext >&5
19010 cat >conftest.$ac_ext <<_ACEOF
19011 #line 19011 "configure"
19012 #include "confdefs.h"
19013
19014 #include <builtin.h>
19015
19016 int
19017 main ()
19018 {
19019 two_arg_error_handler_t foo2 = lib_error_handler
19020   ;
19021   return 0;
19022 }
19023 _ACEOF
19024 rm -f conftest.$ac_objext conftest$ac_exeext
19025 if { (eval echo "$as_me:19025: \"$ac_link\"") >&5
19026   (eval $ac_link) 2>&5
19027   ac_status=$?
19028   echo "$as_me:19028: \$? = $ac_status" >&5
19029   (exit $ac_status); } &&
19030          { ac_try='test -s conftest$ac_exeext'
19031   { (eval echo "$as_me:19031: \"$ac_try\"") >&5
19032   (eval $ac_try) 2>&5
19033   ac_status=$?
19034   echo "$as_me:19034: \$? = $ac_status" >&5
19035   (exit $ac_status); }; }; then
19036   cf_cxx_library=yes
19037
19038 cf_add_libs="-l$cf_gpp_libname"
19039 # Filter out duplicates - this happens with badly-designed ".pc" files...
19040 for cf_add_1lib in $CXXLIBS
19041 do
19042         for cf_add_2lib in $cf_add_libs
19043         do
19044                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19045                 then
19046                         cf_add_1lib=
19047                         break
19048                 fi
19049         done
19050         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19051 done
19052 CXXLIBS="$cf_add_libs"
19053
19054 cat >>confdefs.h <<\EOF
19055 #define HAVE_BUILTIN_H 1
19056 EOF
19057
19058 else
19059   echo "$as_me: failed program was:" >&5
19060 cat conftest.$ac_ext >&5
19061 cf_cxx_library=no
19062 fi
19063 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19064 fi
19065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19066         LIBS="$cf_save"
19067         echo "$as_me:19067: result: $cf_cxx_library" >&5
19068 echo "${ECHO_T}$cf_cxx_library" >&6
19069 fi
19070
19071                 ;;
19072         *)
19073                 cf_cxx_library=no
19074                 ;;
19075         esac
19076
19077         ac_ext=cc
19078 ac_cpp='$CXXCPP $CPPFLAGS'
19079 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19080 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19081 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19082 ac_main_return=return
19083 echo "$as_me:19083: checking how to run the C++ preprocessor" >&5
19084 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19085 if test -z "$CXXCPP"; then
19086   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19087   echo $ECHO_N "(cached) $ECHO_C" >&6
19088 else
19089       # Double quotes because CXXCPP needs to be expanded
19090     for CXXCPP in "$CXX -E" "/lib/cpp"
19091     do
19092       ac_preproc_ok=false
19093 for ac_cxx_preproc_warn_flag in '' yes
19094 do
19095   # Use a header file that comes with gcc, so configuring glibc
19096   # with a fresh cross-compiler works.
19097   # On the NeXT, cc -E runs the code through the compiler's parser,
19098   # not just through cpp. "Syntax error" is here to catch this case.
19099   cat >conftest.$ac_ext <<_ACEOF
19100 #line 19100 "configure"
19101 #include "confdefs.h"
19102 #include <assert.h>
19103                      Syntax error
19104 _ACEOF
19105 if { (eval echo "$as_me:19105: \"$ac_cpp conftest.$ac_ext\"") >&5
19106   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19107   ac_status=$?
19108   egrep -v '^ *\+' conftest.er1 >conftest.err
19109   rm -f conftest.er1
19110   cat conftest.err >&5
19111   echo "$as_me:19111: \$? = $ac_status" >&5
19112   (exit $ac_status); } >/dev/null; then
19113   if test -s conftest.err; then
19114     ac_cpp_err=$ac_cxx_preproc_warn_flag
19115   else
19116     ac_cpp_err=
19117   fi
19118 else
19119   ac_cpp_err=yes
19120 fi
19121 if test -z "$ac_cpp_err"; then
19122   :
19123 else
19124   echo "$as_me: failed program was:" >&5
19125   cat conftest.$ac_ext >&5
19126   # Broken: fails on valid input.
19127 continue
19128 fi
19129 rm -f conftest.err conftest.$ac_ext
19130
19131   # OK, works on sane cases.  Now check whether non-existent headers
19132   # can be detected and how.
19133   cat >conftest.$ac_ext <<_ACEOF
19134 #line 19134 "configure"
19135 #include "confdefs.h"
19136 #include <ac_nonexistent.h>
19137 _ACEOF
19138 if { (eval echo "$as_me:19138: \"$ac_cpp conftest.$ac_ext\"") >&5
19139   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19140   ac_status=$?
19141   egrep -v '^ *\+' conftest.er1 >conftest.err
19142   rm -f conftest.er1
19143   cat conftest.err >&5
19144   echo "$as_me:19144: \$? = $ac_status" >&5
19145   (exit $ac_status); } >/dev/null; then
19146   if test -s conftest.err; then
19147     ac_cpp_err=$ac_cxx_preproc_warn_flag
19148   else
19149     ac_cpp_err=
19150   fi
19151 else
19152   ac_cpp_err=yes
19153 fi
19154 if test -z "$ac_cpp_err"; then
19155   # Broken: success on invalid input.
19156 continue
19157 else
19158   echo "$as_me: failed program was:" >&5
19159   cat conftest.$ac_ext >&5
19160   # Passes both tests.
19161 ac_preproc_ok=:
19162 break
19163 fi
19164 rm -f conftest.err conftest.$ac_ext
19165
19166 done
19167 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19168 rm -f conftest.err conftest.$ac_ext
19169 if $ac_preproc_ok; then
19170   break
19171 fi
19172
19173     done
19174     ac_cv_prog_CXXCPP=$CXXCPP
19175
19176 fi
19177   CXXCPP=$ac_cv_prog_CXXCPP
19178 else
19179   ac_cv_prog_CXXCPP=$CXXCPP
19180 fi
19181 echo "$as_me:19181: result: $CXXCPP" >&5
19182 echo "${ECHO_T}$CXXCPP" >&6
19183 ac_preproc_ok=false
19184 for ac_cxx_preproc_warn_flag in '' yes
19185 do
19186   # Use a header file that comes with gcc, so configuring glibc
19187   # with a fresh cross-compiler works.
19188   # On the NeXT, cc -E runs the code through the compiler's parser,
19189   # not just through cpp. "Syntax error" is here to catch this case.
19190   cat >conftest.$ac_ext <<_ACEOF
19191 #line 19191 "configure"
19192 #include "confdefs.h"
19193 #include <assert.h>
19194                      Syntax error
19195 _ACEOF
19196 if { (eval echo "$as_me:19196: \"$ac_cpp conftest.$ac_ext\"") >&5
19197   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19198   ac_status=$?
19199   egrep -v '^ *\+' conftest.er1 >conftest.err
19200   rm -f conftest.er1
19201   cat conftest.err >&5
19202   echo "$as_me:19202: \$? = $ac_status" >&5
19203   (exit $ac_status); } >/dev/null; then
19204   if test -s conftest.err; then
19205     ac_cpp_err=$ac_cxx_preproc_warn_flag
19206   else
19207     ac_cpp_err=
19208   fi
19209 else
19210   ac_cpp_err=yes
19211 fi
19212 if test -z "$ac_cpp_err"; then
19213   :
19214 else
19215   echo "$as_me: failed program was:" >&5
19216   cat conftest.$ac_ext >&5
19217   # Broken: fails on valid input.
19218 continue
19219 fi
19220 rm -f conftest.err conftest.$ac_ext
19221
19222   # OK, works on sane cases.  Now check whether non-existent headers
19223   # can be detected and how.
19224   cat >conftest.$ac_ext <<_ACEOF
19225 #line 19225 "configure"
19226 #include "confdefs.h"
19227 #include <ac_nonexistent.h>
19228 _ACEOF
19229 if { (eval echo "$as_me:19229: \"$ac_cpp conftest.$ac_ext\"") >&5
19230   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19231   ac_status=$?
19232   egrep -v '^ *\+' conftest.er1 >conftest.err
19233   rm -f conftest.er1
19234   cat conftest.err >&5
19235   echo "$as_me:19235: \$? = $ac_status" >&5
19236   (exit $ac_status); } >/dev/null; then
19237   if test -s conftest.err; then
19238     ac_cpp_err=$ac_cxx_preproc_warn_flag
19239   else
19240     ac_cpp_err=
19241   fi
19242 else
19243   ac_cpp_err=yes
19244 fi
19245 if test -z "$ac_cpp_err"; then
19246   # Broken: success on invalid input.
19247 continue
19248 else
19249   echo "$as_me: failed program was:" >&5
19250   cat conftest.$ac_ext >&5
19251   # Passes both tests.
19252 ac_preproc_ok=:
19253 break
19254 fi
19255 rm -f conftest.err conftest.$ac_ext
19256
19257 done
19258 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19259 rm -f conftest.err conftest.$ac_ext
19260 if $ac_preproc_ok; then
19261   :
19262 else
19263   { { echo "$as_me:19263: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19264 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19265    { (exit 1); exit 1; }; }
19266 fi
19267
19268 ac_ext=cc
19269 ac_cpp='$CXXCPP $CPPFLAGS'
19270 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19271 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19272 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19273 ac_main_return=return
19274
19275 for ac_header in typeinfo
19276 do
19277 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19278 echo "$as_me:19278: checking for $ac_header" >&5
19279 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19280 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19281   echo $ECHO_N "(cached) $ECHO_C" >&6
19282 else
19283   cat >conftest.$ac_ext <<_ACEOF
19284 #line 19284 "configure"
19285 #include "confdefs.h"
19286 #include <$ac_header>
19287 _ACEOF
19288 if { (eval echo "$as_me:19288: \"$ac_cpp conftest.$ac_ext\"") >&5
19289   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19290   ac_status=$?
19291   egrep -v '^ *\+' conftest.er1 >conftest.err
19292   rm -f conftest.er1
19293   cat conftest.err >&5
19294   echo "$as_me:19294: \$? = $ac_status" >&5
19295   (exit $ac_status); } >/dev/null; then
19296   if test -s conftest.err; then
19297     ac_cpp_err=$ac_cxx_preproc_warn_flag
19298   else
19299     ac_cpp_err=
19300   fi
19301 else
19302   ac_cpp_err=yes
19303 fi
19304 if test -z "$ac_cpp_err"; then
19305   eval "$as_ac_Header=yes"
19306 else
19307   echo "$as_me: failed program was:" >&5
19308   cat conftest.$ac_ext >&5
19309   eval "$as_ac_Header=no"
19310 fi
19311 rm -f conftest.err conftest.$ac_ext
19312 fi
19313 echo "$as_me:19313: result: `eval echo '${'$as_ac_Header'}'`" >&5
19314 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19315 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19316   cat >>confdefs.h <<EOF
19317 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19318 EOF
19319
19320 fi
19321 done
19322
19323 for ac_header in iostream
19324 do
19325 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19326 echo "$as_me:19326: checking for $ac_header" >&5
19327 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19328 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19329   echo $ECHO_N "(cached) $ECHO_C" >&6
19330 else
19331   cat >conftest.$ac_ext <<_ACEOF
19332 #line 19332 "configure"
19333 #include "confdefs.h"
19334 #include <$ac_header>
19335 _ACEOF
19336 if { (eval echo "$as_me:19336: \"$ac_cpp conftest.$ac_ext\"") >&5
19337   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19338   ac_status=$?
19339   egrep -v '^ *\+' conftest.er1 >conftest.err
19340   rm -f conftest.er1
19341   cat conftest.err >&5
19342   echo "$as_me:19342: \$? = $ac_status" >&5
19343   (exit $ac_status); } >/dev/null; then
19344   if test -s conftest.err; then
19345     ac_cpp_err=$ac_cxx_preproc_warn_flag
19346   else
19347     ac_cpp_err=
19348   fi
19349 else
19350   ac_cpp_err=yes
19351 fi
19352 if test -z "$ac_cpp_err"; then
19353   eval "$as_ac_Header=yes"
19354 else
19355   echo "$as_me: failed program was:" >&5
19356   cat conftest.$ac_ext >&5
19357   eval "$as_ac_Header=no"
19358 fi
19359 rm -f conftest.err conftest.$ac_ext
19360 fi
19361 echo "$as_me:19361: result: `eval echo '${'$as_ac_Header'}'`" >&5
19362 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19363 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19364   cat >>confdefs.h <<EOF
19365 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19366 EOF
19367
19368 fi
19369 done
19370
19371 if test x"$ac_cv_header_iostream" = xyes ; then
19372         echo "$as_me:19372: checking if iostream uses std-namespace" >&5
19373 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19374         cat >conftest.$ac_ext <<_ACEOF
19375 #line 19375 "configure"
19376 #include "confdefs.h"
19377
19378 #include <iostream>
19379 using std::endl;
19380 using std::cerr;
19381 int
19382 main ()
19383 {
19384
19385 cerr << "testing" << endl;
19386
19387   ;
19388   return 0;
19389 }
19390 _ACEOF
19391 rm -f conftest.$ac_objext
19392 if { (eval echo "$as_me:19392: \"$ac_compile\"") >&5
19393   (eval $ac_compile) 2>&5
19394   ac_status=$?
19395   echo "$as_me:19395: \$? = $ac_status" >&5
19396   (exit $ac_status); } &&
19397          { ac_try='test -s conftest.$ac_objext'
19398   { (eval echo "$as_me:19398: \"$ac_try\"") >&5
19399   (eval $ac_try) 2>&5
19400   ac_status=$?
19401   echo "$as_me:19401: \$? = $ac_status" >&5
19402   (exit $ac_status); }; }; then
19403   cf_iostream_namespace=yes
19404 else
19405   echo "$as_me: failed program was:" >&5
19406 cat conftest.$ac_ext >&5
19407 cf_iostream_namespace=no
19408 fi
19409 rm -f conftest.$ac_objext conftest.$ac_ext
19410         echo "$as_me:19410: result: $cf_iostream_namespace" >&5
19411 echo "${ECHO_T}$cf_iostream_namespace" >&6
19412         if test "$cf_iostream_namespace" = yes ; then
19413
19414 cat >>confdefs.h <<\EOF
19415 #define IOSTREAM_NAMESPACE 1
19416 EOF
19417
19418         fi
19419 fi
19420
19421 echo "$as_me:19421: checking if we should include stdbool.h" >&5
19422 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19423
19424 if test "${cf_cv_header_stdbool_h+set}" = set; then
19425   echo $ECHO_N "(cached) $ECHO_C" >&6
19426 else
19427
19428         cat >conftest.$ac_ext <<_ACEOF
19429 #line 19429 "configure"
19430 #include "confdefs.h"
19431
19432 int
19433 main ()
19434 {
19435 bool foo = false
19436   ;
19437   return 0;
19438 }
19439 _ACEOF
19440 rm -f conftest.$ac_objext
19441 if { (eval echo "$as_me:19441: \"$ac_compile\"") >&5
19442   (eval $ac_compile) 2>&5
19443   ac_status=$?
19444   echo "$as_me:19444: \$? = $ac_status" >&5
19445   (exit $ac_status); } &&
19446          { ac_try='test -s conftest.$ac_objext'
19447   { (eval echo "$as_me:19447: \"$ac_try\"") >&5
19448   (eval $ac_try) 2>&5
19449   ac_status=$?
19450   echo "$as_me:19450: \$? = $ac_status" >&5
19451   (exit $ac_status); }; }; then
19452   cf_cv_header_stdbool_h=0
19453 else
19454   echo "$as_me: failed program was:" >&5
19455 cat conftest.$ac_ext >&5
19456 cat >conftest.$ac_ext <<_ACEOF
19457 #line 19457 "configure"
19458 #include "confdefs.h"
19459
19460 #ifndef __BEOS__
19461 #include <stdbool.h>
19462 #endif
19463
19464 int
19465 main ()
19466 {
19467 bool foo = false
19468   ;
19469   return 0;
19470 }
19471 _ACEOF
19472 rm -f conftest.$ac_objext
19473 if { (eval echo "$as_me:19473: \"$ac_compile\"") >&5
19474   (eval $ac_compile) 2>&5
19475   ac_status=$?
19476   echo "$as_me:19476: \$? = $ac_status" >&5
19477   (exit $ac_status); } &&
19478          { ac_try='test -s conftest.$ac_objext'
19479   { (eval echo "$as_me:19479: \"$ac_try\"") >&5
19480   (eval $ac_try) 2>&5
19481   ac_status=$?
19482   echo "$as_me:19482: \$? = $ac_status" >&5
19483   (exit $ac_status); }; }; then
19484   cf_cv_header_stdbool_h=1
19485 else
19486   echo "$as_me: failed program was:" >&5
19487 cat conftest.$ac_ext >&5
19488 cf_cv_header_stdbool_h=0
19489 fi
19490 rm -f conftest.$ac_objext conftest.$ac_ext
19491 fi
19492 rm -f conftest.$ac_objext conftest.$ac_ext
19493 fi
19494
19495 if test "$cf_cv_header_stdbool_h" = 1
19496 then    echo "$as_me:19496: result: yes" >&5
19497 echo "${ECHO_T}yes" >&6
19498 else    echo "$as_me:19498: result: no" >&5
19499 echo "${ECHO_T}no" >&6
19500 fi
19501
19502 echo "$as_me:19502: checking for builtin bool type" >&5
19503 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19504
19505 if test "${cf_cv_builtin_bool+set}" = set; then
19506   echo $ECHO_N "(cached) $ECHO_C" >&6
19507 else
19508
19509         cat >conftest.$ac_ext <<_ACEOF
19510 #line 19510 "configure"
19511 #include "confdefs.h"
19512
19513 #include <stdio.h>
19514 #include <sys/types.h>
19515
19516 int
19517 main ()
19518 {
19519 bool x = false
19520   ;
19521   return 0;
19522 }
19523 _ACEOF
19524 rm -f conftest.$ac_objext
19525 if { (eval echo "$as_me:19525: \"$ac_compile\"") >&5
19526   (eval $ac_compile) 2>&5
19527   ac_status=$?
19528   echo "$as_me:19528: \$? = $ac_status" >&5
19529   (exit $ac_status); } &&
19530          { ac_try='test -s conftest.$ac_objext'
19531   { (eval echo "$as_me:19531: \"$ac_try\"") >&5
19532   (eval $ac_try) 2>&5
19533   ac_status=$?
19534   echo "$as_me:19534: \$? = $ac_status" >&5
19535   (exit $ac_status); }; }; then
19536   cf_cv_builtin_bool=1
19537 else
19538   echo "$as_me: failed program was:" >&5
19539 cat conftest.$ac_ext >&5
19540 cf_cv_builtin_bool=0
19541 fi
19542 rm -f conftest.$ac_objext conftest.$ac_ext
19543
19544 fi
19545
19546 if test "$cf_cv_builtin_bool" = 1
19547 then    echo "$as_me:19547: result: yes" >&5
19548 echo "${ECHO_T}yes" >&6
19549 else    echo "$as_me:19549: result: no" >&5
19550 echo "${ECHO_T}no" >&6
19551 fi
19552
19553 echo "$as_me:19553: checking for size of bool" >&5
19554 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19555 if test "${cf_cv_type_of_bool+set}" = set; then
19556   echo $ECHO_N "(cached) $ECHO_C" >&6
19557 else
19558
19559         rm -f cf_test.out
19560         if test "$cross_compiling" = yes; then
19561   cf_cv_type_of_bool=unknown
19562 else
19563   cat >conftest.$ac_ext <<_ACEOF
19564 #line 19564 "configure"
19565 #include "confdefs.h"
19566
19567 #include <stdlib.h>
19568 #include <stdio.h>
19569
19570 #if defined(__cplusplus)
19571
19572 #ifdef HAVE_GXX_BUILTIN_H
19573 #include <g++/builtin.h>
19574 #elif HAVE_GPP_BUILTIN_H
19575 #include <gpp/builtin.h>
19576 #elif HAVE_BUILTIN_H
19577 #include <builtin.h>
19578 #endif
19579
19580 #else
19581
19582 #if $cf_cv_header_stdbool_h
19583 #include <stdbool.h>
19584 #endif
19585
19586 #endif
19587
19588 int main()
19589 {
19590         FILE *fp = fopen("cf_test.out", "w");
19591         if (fp != 0) {
19592                 bool x = true;
19593                 if ((bool)(-x) >= 0)
19594                         fputs("unsigned ", fp);
19595                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19596                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19597                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19598                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19599                 fclose(fp);
19600         }
19601         ${cf_cv_main_return:-return}(0);
19602 }
19603
19604 _ACEOF
19605 rm -f conftest$ac_exeext
19606 if { (eval echo "$as_me:19606: \"$ac_link\"") >&5
19607   (eval $ac_link) 2>&5
19608   ac_status=$?
19609   echo "$as_me:19609: \$? = $ac_status" >&5
19610   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19611   { (eval echo "$as_me:19611: \"$ac_try\"") >&5
19612   (eval $ac_try) 2>&5
19613   ac_status=$?
19614   echo "$as_me:19614: \$? = $ac_status" >&5
19615   (exit $ac_status); }; }; then
19616   cf_cv_type_of_bool=`cat cf_test.out`
19617                  if test -z "$cf_cv_type_of_bool"; then
19618                    cf_cv_type_of_bool=unknown
19619                  fi
19620 else
19621   echo "$as_me: program exited with status $ac_status" >&5
19622 echo "$as_me: failed program was:" >&5
19623 cat conftest.$ac_ext >&5
19624 cf_cv_type_of_bool=unknown
19625 fi
19626 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19627 fi
19628
19629 fi
19630
19631         rm -f cf_test.out
19632 echo "$as_me:19632: result: $cf_cv_type_of_bool" >&5
19633 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19634 if test "$cf_cv_type_of_bool" = unknown ; then
19635         case .$NCURSES_BOOL in #(vi
19636         .auto|.) NCURSES_BOOL=unsigned;;
19637         esac
19638         { echo "$as_me:19638: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19639 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19640         cf_cv_type_of_bool=$NCURSES_BOOL
19641 fi
19642
19643 echo "$as_me:19643: checking for special defines needed for etip.h" >&5
19644 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19645 cf_save_CXXFLAGS="$CXXFLAGS"
19646 cf_result="none"
19647
19648 # etip.h includes ncurses.h which includes ncurses_dll.h
19649 # But ncurses_dll.h is generated - fix here.
19650 test -d include || mkdir include
19651 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
19652
19653 for cf_math in "" MATH_H
19654 do
19655 for cf_excp in "" MATH_EXCEPTION
19656 do
19657         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19658         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19659         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19660 cat >conftest.$ac_ext <<_ACEOF
19661 #line 19661 "configure"
19662 #include "confdefs.h"
19663
19664 #include <etip.h.in>
19665
19666 int
19667 main ()
19668 {
19669
19670   ;
19671   return 0;
19672 }
19673 _ACEOF
19674 rm -f conftest.$ac_objext
19675 if { (eval echo "$as_me:19675: \"$ac_compile\"") >&5
19676   (eval $ac_compile) 2>&5
19677   ac_status=$?
19678   echo "$as_me:19678: \$? = $ac_status" >&5
19679   (exit $ac_status); } &&
19680          { ac_try='test -s conftest.$ac_objext'
19681   { (eval echo "$as_me:19681: \"$ac_try\"") >&5
19682   (eval $ac_try) 2>&5
19683   ac_status=$?
19684   echo "$as_me:19684: \$? = $ac_status" >&5
19685   (exit $ac_status); }; }; then
19686
19687         test -n "$cf_math" && cat >>confdefs.h <<EOF
19688 #define ETIP_NEEDS_${cf_math} 1
19689 EOF
19690
19691         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19692 #define ETIP_NEEDS_${cf_excp} 1
19693 EOF
19694
19695         cf_result="$cf_math $cf_excp"
19696         break 2
19697
19698 else
19699   echo "$as_me: failed program was:" >&5
19700 cat conftest.$ac_ext >&5
19701 fi
19702 rm -f conftest.$ac_objext conftest.$ac_ext
19703 done
19704 done
19705 echo "$as_me:19705: result: $cf_result" >&5
19706 echo "${ECHO_T}$cf_result" >&6
19707 CXXFLAGS="$cf_save_CXXFLAGS"
19708
19709 if test -n "$CXX"; then
19710 echo "$as_me:19710: checking if $CXX accepts parameter initialization" >&5
19711 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19712 if test "${cf_cv_cpp_param_init+set}" = set; then
19713   echo $ECHO_N "(cached) $ECHO_C" >&6
19714 else
19715
19716         ac_ext=cc
19717 ac_cpp='$CXXCPP $CPPFLAGS'
19718 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19719 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19720 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19721 ac_main_return=return
19722
19723         if test "$cross_compiling" = yes; then
19724   cf_cv_cpp_param_init=unknown
19725 else
19726   cat >conftest.$ac_ext <<_ACEOF
19727 #line 19727 "configure"
19728 #include "confdefs.h"
19729
19730 class TEST {
19731 private:
19732         int value;
19733 public:
19734         TEST(int x = 1);
19735         ~TEST();
19736 };
19737
19738 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19739 {
19740         value = x;
19741 }
19742 int main() { }
19743
19744 _ACEOF
19745 rm -f conftest$ac_exeext
19746 if { (eval echo "$as_me:19746: \"$ac_link\"") >&5
19747   (eval $ac_link) 2>&5
19748   ac_status=$?
19749   echo "$as_me:19749: \$? = $ac_status" >&5
19750   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19751   { (eval echo "$as_me:19751: \"$ac_try\"") >&5
19752   (eval $ac_try) 2>&5
19753   ac_status=$?
19754   echo "$as_me:19754: \$? = $ac_status" >&5
19755   (exit $ac_status); }; }; then
19756   cf_cv_cpp_param_init=yes
19757 else
19758   echo "$as_me: program exited with status $ac_status" >&5
19759 echo "$as_me: failed program was:" >&5
19760 cat conftest.$ac_ext >&5
19761 cf_cv_cpp_param_init=no
19762 fi
19763 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19764 fi
19765         ac_ext=cc
19766 ac_cpp='$CXXCPP $CPPFLAGS'
19767 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19768 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19769 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19770 ac_main_return=return
19771
19772 fi
19773 echo "$as_me:19773: result: $cf_cv_cpp_param_init" >&5
19774 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19775 fi
19776 test "$cf_cv_cpp_param_init" = yes &&
19777 cat >>confdefs.h <<\EOF
19778 #define CPP_HAS_PARAM_INIT 1
19779 EOF
19780
19781 if test -n "$CXX"; then
19782
19783 echo "$as_me:19783: checking if $CXX accepts static_cast" >&5
19784 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19785 if test "${cf_cv_cpp_static_cast+set}" = set; then
19786   echo $ECHO_N "(cached) $ECHO_C" >&6
19787 else
19788
19789         ac_ext=cc
19790 ac_cpp='$CXXCPP $CPPFLAGS'
19791 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19792 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19793 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19794 ac_main_return=return
19795
19796         cat >conftest.$ac_ext <<_ACEOF
19797 #line 19797 "configure"
19798 #include "confdefs.h"
19799
19800 class NCursesPanel
19801 {
19802 public:
19803   NCursesPanel(int nlines,
19804                int ncols,
19805                int begin_y = 0,
19806                int begin_x = 0)
19807   {
19808   }
19809   NCursesPanel();
19810   ~NCursesPanel();
19811 };
19812
19813 template<class T> class NCursesUserPanel : public NCursesPanel
19814 {
19815 public:
19816   NCursesUserPanel (int nlines,
19817                     int ncols,
19818                     int begin_y = 0,
19819                     int begin_x = 0,
19820                     const T* p_UserData = static_cast<T*>(0))
19821     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19822   {
19823   };
19824   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19825   {
19826   };
19827
19828   virtual ~NCursesUserPanel() {};
19829 };
19830
19831 int
19832 main ()
19833 {
19834
19835         const char* p_UserData = static_cast<char*>(0)
19836   ;
19837   return 0;
19838 }
19839 _ACEOF
19840 rm -f conftest.$ac_objext
19841 if { (eval echo "$as_me:19841: \"$ac_compile\"") >&5
19842   (eval $ac_compile) 2>&5
19843   ac_status=$?
19844   echo "$as_me:19844: \$? = $ac_status" >&5
19845   (exit $ac_status); } &&
19846          { ac_try='test -s conftest.$ac_objext'
19847   { (eval echo "$as_me:19847: \"$ac_try\"") >&5
19848   (eval $ac_try) 2>&5
19849   ac_status=$?
19850   echo "$as_me:19850: \$? = $ac_status" >&5
19851   (exit $ac_status); }; }; then
19852   cf_cv_cpp_static_cast=yes
19853 else
19854   echo "$as_me: failed program was:" >&5
19855 cat conftest.$ac_ext >&5
19856 cf_cv_cpp_static_cast=no
19857 fi
19858 rm -f conftest.$ac_objext conftest.$ac_ext
19859
19860         ac_ext=cc
19861 ac_cpp='$CXXCPP $CPPFLAGS'
19862 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19863 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19864 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19865 ac_main_return=return
19866
19867 fi
19868 echo "$as_me:19868: result: $cf_cv_cpp_static_cast" >&5
19869 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19870
19871 fi
19872
19873 test "$cf_cv_cpp_static_cast" = yes &&
19874 cat >>confdefs.h <<\EOF
19875 #define CPP_HAS_STATIC_CAST 1
19876 EOF
19877
19878         CXX_AR='$(AR)'
19879         CXX_ARFLAGS='$(ARFLAGS)'
19880         case $cf_cv_system_name in #(vi
19881         irix*) #(vi
19882             if test "$GXX" != yes ; then
19883                 CXX_AR='$(CXX)'
19884                 CXX_ARFLAGS='-ar -o'
19885             fi
19886             ;;
19887         sco3.2v5*) #(vi
19888             CXXLDFLAGS="-u main"
19889             ;;
19890         solaris2*)
19891             if test "$GXX" != yes ; then
19892                 CXX_AR='$(CXX)'
19893                 CXX_ARFLAGS='-xar -o'
19894             fi
19895             ;;
19896         esac
19897
19898 else
19899         cf_cxx_library=no
19900         cf_cv_builtin_bool=1
19901
19902         # Just because we are not configuring against C++ right now does not
19903         # mean that a user will not want to use C++.  Some distributors disable
19904         # the C++ portion of this configuration as a shortcut (or just to avoid
19905         # compiling the demo in the c++ directory).  So we need a reasonable
19906         # default for the 'bool' type.
19907         #
19908         # Caveat: since the storage of the bool type is not standardized, it
19909         # may change.
19910
19911         if test "$NCURSES_BOOL" != auto ; then
19912                 cf_cv_type_of_bool=$NCURSES_BOOL
19913                 cf_cv_header_stdbool_h=0
19914         else
19915                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19916
19917 echo "$as_me:19917: checking for size of bool" >&5
19918 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19919 if test "${cf_cv_type_of_bool+set}" = set; then
19920   echo $ECHO_N "(cached) $ECHO_C" >&6
19921 else
19922
19923         rm -f cf_test.out
19924         if test "$cross_compiling" = yes; then
19925   cf_cv_type_of_bool=unknown
19926 else
19927   cat >conftest.$ac_ext <<_ACEOF
19928 #line 19928 "configure"
19929 #include "confdefs.h"
19930
19931 #include <stdlib.h>
19932 #include <stdio.h>
19933
19934 #if defined(__cplusplus)
19935
19936 #ifdef HAVE_GXX_BUILTIN_H
19937 #include <g++/builtin.h>
19938 #elif HAVE_GPP_BUILTIN_H
19939 #include <gpp/builtin.h>
19940 #elif HAVE_BUILTIN_H
19941 #include <builtin.h>
19942 #endif
19943
19944 #else
19945
19946 #if $cf_cv_header_stdbool_h
19947 #include <stdbool.h>
19948 #endif
19949
19950 #endif
19951
19952 int main()
19953 {
19954         FILE *fp = fopen("cf_test.out", "w");
19955         if (fp != 0) {
19956                 bool x = true;
19957                 if ((bool)(-x) >= 0)
19958                         fputs("unsigned ", fp);
19959                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19960                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19961                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19962                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19963                 fclose(fp);
19964         }
19965         ${cf_cv_main_return:-return}(0);
19966 }
19967
19968 _ACEOF
19969 rm -f conftest$ac_exeext
19970 if { (eval echo "$as_me:19970: \"$ac_link\"") >&5
19971   (eval $ac_link) 2>&5
19972   ac_status=$?
19973   echo "$as_me:19973: \$? = $ac_status" >&5
19974   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19975   { (eval echo "$as_me:19975: \"$ac_try\"") >&5
19976   (eval $ac_try) 2>&5
19977   ac_status=$?
19978   echo "$as_me:19978: \$? = $ac_status" >&5
19979   (exit $ac_status); }; }; then
19980   cf_cv_type_of_bool=`cat cf_test.out`
19981                  if test -z "$cf_cv_type_of_bool"; then
19982                    cf_cv_type_of_bool=unknown
19983                  fi
19984 else
19985   echo "$as_me: program exited with status $ac_status" >&5
19986 echo "$as_me: failed program was:" >&5
19987 cat conftest.$ac_ext >&5
19988 cf_cv_type_of_bool=unknown
19989 fi
19990 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19991 fi
19992
19993 fi
19994
19995         rm -f cf_test.out
19996 echo "$as_me:19996: result: $cf_cv_type_of_bool" >&5
19997 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19998 if test "$cf_cv_type_of_bool" = unknown ; then
19999         case .$NCURSES_BOOL in #(vi
20000         .auto|.) NCURSES_BOOL=unsigned;;
20001         esac
20002         { echo "$as_me:20002: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20003 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20004         cf_cv_type_of_bool=$NCURSES_BOOL
20005 fi
20006
20007                 else
20008                         echo "$as_me:20008: checking for fallback type of bool" >&5
20009 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20010                         case "$host_cpu" in #(vi
20011                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20012                         *)      cf_cv_type_of_bool=int  ;;
20013                         esac
20014                         echo "$as_me:20014: result: $cf_cv_type_of_bool" >&5
20015 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20016                 fi
20017         fi
20018 fi
20019
20020 # If the C compiler did not declare bool, and we did not determine that the C++
20021 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20022 # ncurses library use the same type as C++ bool.  Note that this allows one to
20023 # specify the type of bool in a configure-script option and postpone
20024 # integration with the C++ compiler provided that the types are compatible.
20025 USE_CXX_BOOL=1
20026 if test $cf_cv_cc_bool_type = 1
20027 then
20028         # oops: C has a bool.  Unlikely, but C++ could differ.
20029         USE_CXX_BOOL=0
20030 elif test $cf_cv_builtin_bool = 0
20031 then
20032         # C++ has no bool
20033         USE_CXX_BOOL=0
20034 else
20035         # this is the normal case
20036         USE_CXX_BOOL='defined(__cplusplus)'
20037 fi
20038
20039 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20040
20041         if test "$cf_with_ada" != "no" ; then
20042                 if test "$with_libtool" != "no"; then
20043                         { echo "$as_me:20043: WARNING: libtool does not support Ada - disabling feature" >&5
20044 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20045                         cf_with_ada=no
20046                 fi
20047         fi
20048
20049         if test "$cf_with_ada" != "no" ; then
20050
20051 cf_ada_make=gnatmake
20052 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20053 set dummy $cf_ada_make; ac_word=$2
20054 echo "$as_me:20054: checking for $ac_word" >&5
20055 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20056 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20057   echo $ECHO_N "(cached) $ECHO_C" >&6
20058 else
20059   if test -n "$gnat_exists"; then
20060   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20061 else
20062   ac_save_IFS=$IFS; IFS=$ac_path_separator
20063 ac_dummy="$PATH"
20064 for ac_dir in $ac_dummy; do
20065   IFS=$ac_save_IFS
20066   test -z "$ac_dir" && ac_dir=.
20067   $as_executable_p "$ac_dir/$ac_word" || continue
20068 ac_cv_prog_gnat_exists="yes"
20069 echo "$as_me:20069: found $ac_dir/$ac_word" >&5
20070 break
20071 done
20072
20073   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20074 fi
20075 fi
20076 gnat_exists=$ac_cv_prog_gnat_exists
20077 if test -n "$gnat_exists"; then
20078   echo "$as_me:20078: result: $gnat_exists" >&5
20079 echo "${ECHO_T}$gnat_exists" >&6
20080 else
20081   echo "$as_me:20081: result: no" >&5
20082 echo "${ECHO_T}no" >&6
20083 fi
20084
20085 if test "$ac_cv_prog_gnat_exists" = no; then
20086    cf_ada_make=
20087    cf_cv_prog_gnat_correct=no
20088 else
20089
20090 echo "$as_me:20090: checking for gnat version" >&5
20091 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20092 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20093         grep '[0-9].[0-9][0-9]*' |\
20094     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20095 echo "$as_me:20095: result: $cf_gnat_version" >&5
20096 echo "${ECHO_T}$cf_gnat_version" >&6
20097
20098 case $cf_gnat_version in #(vi
20099 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20100         cf_cv_prog_gnat_correct=yes
20101         ;;
20102 *)
20103         { echo "$as_me:20103: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20104 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20105         cf_cv_prog_gnat_correct=no
20106         ;;
20107 esac
20108
20109    # Extract the first word of "m4", so it can be a program name with args.
20110 set dummy m4; ac_word=$2
20111 echo "$as_me:20111: checking for $ac_word" >&5
20112 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20113 if test "${ac_cv_prog_M4_exists+set}" = set; then
20114   echo $ECHO_N "(cached) $ECHO_C" >&6
20115 else
20116   if test -n "$M4_exists"; then
20117   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20118 else
20119   ac_save_IFS=$IFS; IFS=$ac_path_separator
20120 ac_dummy="$PATH"
20121 for ac_dir in $ac_dummy; do
20122   IFS=$ac_save_IFS
20123   test -z "$ac_dir" && ac_dir=.
20124   $as_executable_p "$ac_dir/$ac_word" || continue
20125 ac_cv_prog_M4_exists="yes"
20126 echo "$as_me:20126: found $ac_dir/$ac_word" >&5
20127 break
20128 done
20129
20130   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20131 fi
20132 fi
20133 M4_exists=$ac_cv_prog_M4_exists
20134 if test -n "$M4_exists"; then
20135   echo "$as_me:20135: result: $M4_exists" >&5
20136 echo "${ECHO_T}$M4_exists" >&6
20137 else
20138   echo "$as_me:20138: result: no" >&5
20139 echo "${ECHO_T}no" >&6
20140 fi
20141
20142    if test "$ac_cv_prog_M4_exists" = no; then
20143       cf_cv_prog_gnat_correct=no
20144       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20145    fi
20146    if test "$cf_cv_prog_gnat_correct" = yes; then
20147       echo "$as_me:20147: checking if GNAT works" >&5
20148 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20149
20150 rm -rf conftest* *~conftest*
20151 cat >>conftest.ads <<CF_EOF
20152 procedure conftest;
20153 CF_EOF
20154 cat >>conftest.adb <<CF_EOF
20155 with Text_IO;
20156 with GNAT.OS_Lib;
20157 procedure conftest is
20158 begin
20159    Text_IO.Put ("Hello World");
20160    Text_IO.New_Line;
20161    GNAT.OS_Lib.OS_Exit (0);
20162 end conftest;
20163 CF_EOF
20164 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20165    if ( ./conftest 1>&5 2>&1 ) ; then
20166       cf_cv_prog_gnat_correct=yes
20167    else
20168       cf_cv_prog_gnat_correct=no
20169    fi
20170 else
20171    cf_cv_prog_gnat_correct=no
20172 fi
20173 rm -rf conftest* *~conftest*
20174
20175       echo "$as_me:20175: result: $cf_cv_prog_gnat_correct" >&5
20176 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20177    fi
20178 fi
20179
20180                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20181
20182         ADAFLAGS="$ADAFLAGS -gnatpn"
20183
20184         echo "$as_me:20184: checking optimization options for ADAFLAGS" >&5
20185 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20186         case "$CFLAGS" in
20187         *-g*)
20188
20189         ADAFLAGS="$ADAFLAGS -g"
20190
20191                 ;;
20192         esac
20193         case "$CFLAGS" in
20194         *-O*)
20195                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20196
20197         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20198
20199                 ;;
20200         esac
20201         echo "$as_me:20201: result: $ADAFLAGS" >&5
20202 echo "${ECHO_T}$ADAFLAGS" >&6
20203
20204 echo "$as_me:20204: checking if GNATPREP supports -T option" >&5
20205 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20206 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20207   echo $ECHO_N "(cached) $ECHO_C" >&6
20208 else
20209
20210 cf_cv_gnatprep_opt_t=no
20211 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20212
20213 fi
20214 echo "$as_me:20214: result: $cf_cv_gnatprep_opt_t" >&5
20215 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20216 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20217
20218 echo "$as_me:20218: checking if GNAT supports generics" >&5
20219 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20220 case $cf_gnat_version in #(vi
20221 3.[1-9]*|[4-9].*) #(vi
20222         cf_gnat_generics=yes
20223         ;;
20224 *)
20225         cf_gnat_generics=no
20226         ;;
20227 esac
20228 echo "$as_me:20228: result: $cf_gnat_generics" >&5
20229 echo "${ECHO_T}$cf_gnat_generics" >&6
20230
20231 if test "$cf_gnat_generics" = yes
20232 then
20233         cf_compile_generics=generics
20234         cf_generic_objects="\${GENOBJS}"
20235 else
20236         cf_compile_generics=
20237         cf_generic_objects=
20238 fi
20239
20240 echo "$as_me:20240: checking if GNAT supports SIGINT" >&5
20241 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20242 if test "${cf_cv_gnat_sigint+set}" = set; then
20243   echo $ECHO_N "(cached) $ECHO_C" >&6
20244 else
20245
20246 rm -rf conftest* *~conftest*
20247 cat >>conftest.ads <<CF_EOF
20248 with Ada.Interrupts.Names;
20249
20250 package ConfTest is
20251
20252    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20253    pragma Unreserve_All_Interrupts;
20254    pragma Warnings (On);
20255
20256    protected Process is
20257       procedure Stop;
20258       function Continue return Boolean;
20259       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20260    private
20261       Done : Boolean := False;
20262    end Process;
20263
20264 end ConfTest;
20265 CF_EOF
20266 cat >>conftest.adb <<CF_EOF
20267 package body ConfTest is
20268    protected body Process is
20269       procedure Stop is
20270       begin
20271          Done := True;
20272       end Stop;
20273       function Continue return Boolean is
20274       begin
20275          return not Done;
20276       end Continue;
20277    end Process;
20278 end ConfTest;
20279 CF_EOF
20280 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20281       cf_cv_gnat_sigint=yes
20282 else
20283    cf_cv_gnat_sigint=no
20284 fi
20285 rm -rf conftest* *~conftest*
20286
20287 fi
20288 echo "$as_me:20288: result: $cf_cv_gnat_sigint" >&5
20289 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20290
20291 if test $cf_cv_gnat_sigint = yes ; then
20292         USE_GNAT_SIGINT=""
20293 else
20294         USE_GNAT_SIGINT="#"
20295 fi
20296
20297 cf_gnat_libraries=no
20298 cf_gnat_projects=no
20299
20300 if test "$enable_gnat_projects" != no ; then
20301 echo "$as_me:20301: checking if GNAT supports project files" >&5
20302 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20303 case $cf_gnat_version in #(vi
20304 3.[0-9]*) #(vi
20305         ;;
20306 *)
20307         case $cf_cv_system_name in #(vi
20308         cygwin*|msys*) #(vi
20309                 ;;
20310         *)
20311                 mkdir conftest.src conftest.bin conftest.lib
20312                 cd conftest.src
20313                 rm -rf conftest* *~conftest*
20314                 cat >>library.gpr <<CF_EOF
20315 project Library is
20316   Kind := External ("LIB_KIND");
20317   for Library_Name use "ConfTest";
20318   for Object_Dir use ".";
20319   for Library_ALI_Dir use External("LIBRARY_DIR");
20320   for Library_Version use External ("SONAME");
20321   for Library_Kind use Kind;
20322   for Library_Dir use External("BUILD_DIR");
20323   Source_Dir := External ("SOURCE_DIR");
20324   for Source_Dirs use (Source_Dir);
20325 end Library;
20326 CF_EOF
20327                 cat >>confpackage.ads <<CF_EOF
20328 package ConfPackage is
20329    procedure conftest;
20330 end ConfPackage;
20331 CF_EOF
20332                 cat >>confpackage.adb <<CF_EOF
20333 with Text_IO;
20334 package body ConfPackage is
20335    procedure conftest is
20336    begin
20337       Text_IO.Put ("Hello World");
20338       Text_IO.New_Line;
20339    end conftest;
20340 end ConfPackage;
20341 CF_EOF
20342                 if ( $cf_ada_make $ADAFLAGS \
20343                                 -Plibrary.gpr \
20344                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20345                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20346                                 -XSOURCE_DIR=`pwd` \
20347                                 -XSONAME=libConfTest.so.1 \
20348                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20349                         cf_gnat_projects=yes
20350                 fi
20351                 cd ..
20352                 if test -f conftest.lib/confpackage.ali
20353                 then
20354                         cf_gnat_libraries=yes
20355                 fi
20356                 rm -rf conftest* *~conftest*
20357                 ;;
20358         esac
20359         ;;
20360 esac
20361 echo "$as_me:20361: result: $cf_gnat_projects" >&5
20362 echo "${ECHO_T}$cf_gnat_projects" >&6
20363 fi # enable_gnat_projects
20364
20365 if test $cf_gnat_projects = yes
20366 then
20367         echo "$as_me:20367: checking if GNAT supports libraries" >&5
20368 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20369         echo "$as_me:20369: result: $cf_gnat_libraries" >&5
20370 echo "${ECHO_T}$cf_gnat_libraries" >&6
20371 fi
20372
20373 if test "$cf_gnat_projects" = yes
20374 then
20375         USE_OLD_MAKERULES="#"
20376         USE_GNAT_PROJECTS=""
20377 else
20378         USE_OLD_MAKERULES=""
20379         USE_GNAT_PROJECTS="#"
20380 fi
20381
20382 if test "$cf_gnat_libraries" = yes
20383 then
20384         USE_GNAT_LIBRARIES=""
20385 else
20386         USE_GNAT_LIBRARIES="#"
20387 fi
20388
20389 echo "$as_me:20389: checking for ada-compiler" >&5
20390 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20391
20392 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20393 if test "${with_ada_compiler+set}" = set; then
20394   withval="$with_ada_compiler"
20395   cf_ada_compiler=$withval
20396 else
20397   cf_ada_compiler=gnatmake
20398 fi;
20399
20400 echo "$as_me:20400: result: $cf_ada_compiler" >&5
20401 echo "${ECHO_T}$cf_ada_compiler" >&6
20402
20403                         cf_ada_package=terminal_interface
20404
20405 echo "$as_me:20405: checking for ada-include" >&5
20406 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20407
20408 # Check whether --with-ada-include or --without-ada-include was given.
20409 if test "${with_ada_include+set}" = set; then
20410   withval="$with_ada_include"
20411
20412 else
20413   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20414 fi; if test -n "$prefix/share/ada/adainclude" ; then
20415
20416 if test "x$prefix" != xNONE; then
20417   cf_path_syntax="$prefix"
20418 else
20419   cf_path_syntax="$ac_default_prefix"
20420 fi
20421
20422 case ".$withval" in #(vi
20423 .\$\(*\)*|.\'*\'*) #(vi
20424   ;;
20425 ..|./*|.\\*) #(vi
20426   ;;
20427 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20428   ;;
20429 .\${*prefix}*|.\${*dir}*) #(vi
20430   eval withval="$withval"
20431   case ".$withval" in #(vi
20432   .NONE/*)
20433     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20434     ;;
20435   esac
20436   ;; #(vi
20437 .no|.NONE/*)
20438   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20439   ;;
20440 *)
20441   { { echo "$as_me:20441: error: expected a pathname, not \"$withval\"" >&5
20442 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20443    { (exit 1); exit 1; }; }
20444   ;;
20445 esac
20446
20447 fi
20448 eval ADA_INCLUDE="$withval"
20449
20450 echo "$as_me:20450: result: $ADA_INCLUDE" >&5
20451 echo "${ECHO_T}$ADA_INCLUDE" >&6
20452
20453 echo "$as_me:20453: checking for ada-objects" >&5
20454 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20455
20456 # Check whether --with-ada-objects or --without-ada-objects was given.
20457 if test "${with_ada_objects+set}" = set; then
20458   withval="$with_ada_objects"
20459
20460 else
20461   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20462 fi; if test -n "$prefix/lib/ada/adalib" ; then
20463
20464 if test "x$prefix" != xNONE; then
20465   cf_path_syntax="$prefix"
20466 else
20467   cf_path_syntax="$ac_default_prefix"
20468 fi
20469
20470 case ".$withval" in #(vi
20471 .\$\(*\)*|.\'*\'*) #(vi
20472   ;;
20473 ..|./*|.\\*) #(vi
20474   ;;
20475 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20476   ;;
20477 .\${*prefix}*|.\${*dir}*) #(vi
20478   eval withval="$withval"
20479   case ".$withval" in #(vi
20480   .NONE/*)
20481     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20482     ;;
20483   esac
20484   ;; #(vi
20485 .no|.NONE/*)
20486   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20487   ;;
20488 *)
20489   { { echo "$as_me:20489: error: expected a pathname, not \"$withval\"" >&5
20490 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20491    { (exit 1); exit 1; }; }
20492   ;;
20493 esac
20494
20495 fi
20496 eval ADA_OBJECTS="$withval"
20497
20498 echo "$as_me:20498: result: $ADA_OBJECTS" >&5
20499 echo "${ECHO_T}$ADA_OBJECTS" >&6
20500
20501 echo "$as_me:20501: checking if an Ada95 shared-library should be built" >&5
20502 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20503
20504 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20505 if test "${with_ada_sharedlib+set}" = set; then
20506   withval="$with_ada_sharedlib"
20507   with_ada_sharedlib=$withval
20508 else
20509   with_ada_sharedlib=no
20510 fi;
20511 echo "$as_me:20511: result: $with_ada_sharedlib" >&5
20512 echo "${ECHO_T}$with_ada_sharedlib" >&6
20513
20514 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20515 MAKE_ADA_SHAREDLIB="#"
20516
20517 if test "x$with_ada_sharedlib" != xno
20518 then
20519         MAKE_ADA_SHAREDLIB=
20520         if test "x$with_ada_sharedlib" != xyes
20521         then
20522                 ADA_SHAREDLIB="$with_ada_sharedlib"
20523         fi
20524 fi
20525
20526                 fi
20527         fi
20528 else
20529         cf_with_ada=no
20530 fi
20531
20532 # do this "late" to avoid conflict with header-checks
20533 if test "x$with_widec" = xyes ; then
20534         echo "$as_me:20534: checking for wchar_t" >&5
20535 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20536 if test "${ac_cv_type_wchar_t+set}" = set; then
20537   echo $ECHO_N "(cached) $ECHO_C" >&6
20538 else
20539   cat >conftest.$ac_ext <<_ACEOF
20540 #line 20540 "configure"
20541 #include "confdefs.h"
20542 $ac_includes_default
20543 int
20544 main ()
20545 {
20546 if ((wchar_t *) 0)
20547   return 0;
20548 if (sizeof (wchar_t))
20549   return 0;
20550   ;
20551   return 0;
20552 }
20553 _ACEOF
20554 rm -f conftest.$ac_objext
20555 if { (eval echo "$as_me:20555: \"$ac_compile\"") >&5
20556   (eval $ac_compile) 2>&5
20557   ac_status=$?
20558   echo "$as_me:20558: \$? = $ac_status" >&5
20559   (exit $ac_status); } &&
20560          { ac_try='test -s conftest.$ac_objext'
20561   { (eval echo "$as_me:20561: \"$ac_try\"") >&5
20562   (eval $ac_try) 2>&5
20563   ac_status=$?
20564   echo "$as_me:20564: \$? = $ac_status" >&5
20565   (exit $ac_status); }; }; then
20566   ac_cv_type_wchar_t=yes
20567 else
20568   echo "$as_me: failed program was:" >&5
20569 cat conftest.$ac_ext >&5
20570 ac_cv_type_wchar_t=no
20571 fi
20572 rm -f conftest.$ac_objext conftest.$ac_ext
20573 fi
20574 echo "$as_me:20574: result: $ac_cv_type_wchar_t" >&5
20575 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20576
20577 echo "$as_me:20577: checking size of wchar_t" >&5
20578 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20579 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20580   echo $ECHO_N "(cached) $ECHO_C" >&6
20581 else
20582   if test "$ac_cv_type_wchar_t" = yes; then
20583   if test "$cross_compiling" = yes; then
20584   # Depending upon the size, compute the lo and hi bounds.
20585 cat >conftest.$ac_ext <<_ACEOF
20586 #line 20586 "configure"
20587 #include "confdefs.h"
20588 $ac_includes_default
20589 int
20590 main ()
20591 {
20592 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20593   ;
20594   return 0;
20595 }
20596 _ACEOF
20597 rm -f conftest.$ac_objext
20598 if { (eval echo "$as_me:20598: \"$ac_compile\"") >&5
20599   (eval $ac_compile) 2>&5
20600   ac_status=$?
20601   echo "$as_me:20601: \$? = $ac_status" >&5
20602   (exit $ac_status); } &&
20603          { ac_try='test -s conftest.$ac_objext'
20604   { (eval echo "$as_me:20604: \"$ac_try\"") >&5
20605   (eval $ac_try) 2>&5
20606   ac_status=$?
20607   echo "$as_me:20607: \$? = $ac_status" >&5
20608   (exit $ac_status); }; }; then
20609   ac_lo=0 ac_mid=0
20610   while :; do
20611     cat >conftest.$ac_ext <<_ACEOF
20612 #line 20612 "configure"
20613 #include "confdefs.h"
20614 $ac_includes_default
20615 int
20616 main ()
20617 {
20618 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20619   ;
20620   return 0;
20621 }
20622 _ACEOF
20623 rm -f conftest.$ac_objext
20624 if { (eval echo "$as_me:20624: \"$ac_compile\"") >&5
20625   (eval $ac_compile) 2>&5
20626   ac_status=$?
20627   echo "$as_me:20627: \$? = $ac_status" >&5
20628   (exit $ac_status); } &&
20629          { ac_try='test -s conftest.$ac_objext'
20630   { (eval echo "$as_me:20630: \"$ac_try\"") >&5
20631   (eval $ac_try) 2>&5
20632   ac_status=$?
20633   echo "$as_me:20633: \$? = $ac_status" >&5
20634   (exit $ac_status); }; }; then
20635   ac_hi=$ac_mid; break
20636 else
20637   echo "$as_me: failed program was:" >&5
20638 cat conftest.$ac_ext >&5
20639 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20640 fi
20641 rm -f conftest.$ac_objext conftest.$ac_ext
20642   done
20643 else
20644   echo "$as_me: failed program was:" >&5
20645 cat conftest.$ac_ext >&5
20646 ac_hi=-1 ac_mid=-1
20647   while :; do
20648     cat >conftest.$ac_ext <<_ACEOF
20649 #line 20649 "configure"
20650 #include "confdefs.h"
20651 $ac_includes_default
20652 int
20653 main ()
20654 {
20655 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20656   ;
20657   return 0;
20658 }
20659 _ACEOF
20660 rm -f conftest.$ac_objext
20661 if { (eval echo "$as_me:20661: \"$ac_compile\"") >&5
20662   (eval $ac_compile) 2>&5
20663   ac_status=$?
20664   echo "$as_me:20664: \$? = $ac_status" >&5
20665   (exit $ac_status); } &&
20666          { ac_try='test -s conftest.$ac_objext'
20667   { (eval echo "$as_me:20667: \"$ac_try\"") >&5
20668   (eval $ac_try) 2>&5
20669   ac_status=$?
20670   echo "$as_me:20670: \$? = $ac_status" >&5
20671   (exit $ac_status); }; }; then
20672   ac_lo=$ac_mid; break
20673 else
20674   echo "$as_me: failed program was:" >&5
20675 cat conftest.$ac_ext >&5
20676 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20677 fi
20678 rm -f conftest.$ac_objext conftest.$ac_ext
20679   done
20680 fi
20681 rm -f conftest.$ac_objext conftest.$ac_ext
20682 # Binary search between lo and hi bounds.
20683 while test "x$ac_lo" != "x$ac_hi"; do
20684   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20685   cat >conftest.$ac_ext <<_ACEOF
20686 #line 20686 "configure"
20687 #include "confdefs.h"
20688 $ac_includes_default
20689 int
20690 main ()
20691 {
20692 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20693   ;
20694   return 0;
20695 }
20696 _ACEOF
20697 rm -f conftest.$ac_objext
20698 if { (eval echo "$as_me:20698: \"$ac_compile\"") >&5
20699   (eval $ac_compile) 2>&5
20700   ac_status=$?
20701   echo "$as_me:20701: \$? = $ac_status" >&5
20702   (exit $ac_status); } &&
20703          { ac_try='test -s conftest.$ac_objext'
20704   { (eval echo "$as_me:20704: \"$ac_try\"") >&5
20705   (eval $ac_try) 2>&5
20706   ac_status=$?
20707   echo "$as_me:20707: \$? = $ac_status" >&5
20708   (exit $ac_status); }; }; then
20709   ac_hi=$ac_mid
20710 else
20711   echo "$as_me: failed program was:" >&5
20712 cat conftest.$ac_ext >&5
20713 ac_lo=`expr $ac_mid + 1`
20714 fi
20715 rm -f conftest.$ac_objext conftest.$ac_ext
20716 done
20717 ac_cv_sizeof_wchar_t=$ac_lo
20718 else
20719   if test "$cross_compiling" = yes; then
20720   { { echo "$as_me:20720: error: cannot run test program while cross compiling" >&5
20721 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20722    { (exit 1); exit 1; }; }
20723 else
20724   cat >conftest.$ac_ext <<_ACEOF
20725 #line 20725 "configure"
20726 #include "confdefs.h"
20727 $ac_includes_default
20728 int
20729 main ()
20730 {
20731 FILE *f = fopen ("conftest.val", "w");
20732 if (!f)
20733   $ac_main_return (1);
20734 fprintf (f, "%d", (sizeof (wchar_t)));
20735 fclose (f);
20736   ;
20737   return 0;
20738 }
20739 _ACEOF
20740 rm -f conftest$ac_exeext
20741 if { (eval echo "$as_me:20741: \"$ac_link\"") >&5
20742   (eval $ac_link) 2>&5
20743   ac_status=$?
20744   echo "$as_me:20744: \$? = $ac_status" >&5
20745   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20746   { (eval echo "$as_me:20746: \"$ac_try\"") >&5
20747   (eval $ac_try) 2>&5
20748   ac_status=$?
20749   echo "$as_me:20749: \$? = $ac_status" >&5
20750   (exit $ac_status); }; }; then
20751   ac_cv_sizeof_wchar_t=`cat conftest.val`
20752 else
20753   echo "$as_me: program exited with status $ac_status" >&5
20754 echo "$as_me: failed program was:" >&5
20755 cat conftest.$ac_ext >&5
20756 fi
20757 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20758 fi
20759 fi
20760 rm -f conftest.val
20761 else
20762   ac_cv_sizeof_wchar_t=0
20763 fi
20764 fi
20765 echo "$as_me:20765: result: $ac_cv_sizeof_wchar_t" >&5
20766 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20767 cat >>confdefs.h <<EOF
20768 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20769 EOF
20770
20771 fi
20772
20773 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20774 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20775 ###
20776 ### ticlib modules may be a separate library, otherwise contained in termlib.
20777 ### termlib modules may be a separate library, otherwise contained in ncurses.
20778 ###
20779 ### The of "+" or " " between the tokens controls the way the script
20780 ### chooses to split module lists into libraries.
20781 ###
20782 ### (see CF_LIB_RULES).
20783 echo "$as_me:20783: checking for library subsets" >&5
20784 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20785 LIB_SUBSETS=
20786
20787 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20788         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20789         if test "$with_ticlib" != no ; then
20790                 LIB_SUBSETS="${LIB_SUBSETS} "
20791         else
20792                 LIB_SUBSETS="${LIB_SUBSETS}+"
20793         fi
20794 fi
20795
20796 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20797 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20798
20799 if test "$with_termlib" != no ; then
20800         LIB_SUBSETS="${LIB_SUBSETS} "
20801 else
20802         LIB_SUBSETS="${LIB_SUBSETS}+"
20803 fi
20804
20805 LIB_SUBSETS="${LIB_SUBSETS}base"
20806
20807 # Most term-driver calls are to tinfo, but some like init_pair are to the
20808 # base library (so it resides in base).
20809 if test "$with_term_driver" != no ; then
20810         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20811         case $cf_cv_system_name in #(vi
20812         *mingw32*) #(vi
20813                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20814                 ;;
20815         *) #(vi
20816                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20817                 ;;
20818         esac
20819 fi
20820
20821 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20822 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20823
20824 echo "$as_me:20824: result: $LIB_SUBSETS" >&5
20825 echo "${ECHO_T}$LIB_SUBSETS" >&6
20826
20827 ### Construct the list of include-directories to be generated
20828
20829 if test "$GCC" != yes; then
20830         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20831 elif test "$includedir" != "/usr/include"; then
20832         if test "$includedir" = '${prefix}/include' ; then
20833                 if test x$prefix != x/usr ; then
20834                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20835                 fi
20836         else
20837                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
20838         fi
20839 fi
20840 if test "$srcdir" != "."; then
20841         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20842 fi
20843 CPPFLAGS="-I../include $CPPFLAGS"
20844 if test "$srcdir" != "."; then
20845         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
20846 fi
20847 CPPFLAGS="-I. $CPPFLAGS"
20848
20849 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20850 if test "$srcdir" != "."; then
20851         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20852 fi
20853 if test "$GCC" != yes; then
20854         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20855 elif test "$includedir" != "/usr/include"; then
20856         if test "$includedir" = '${prefix}/include' ; then
20857                 if test x$prefix != x/usr ; then
20858                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20859                 fi
20860         else
20861                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20862         fi
20863 fi
20864
20865 ### Build up pieces for makefile rules
20866 echo "$as_me:20866: checking default library suffix" >&5
20867 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20868
20869         case $DFT_LWR_MODEL in
20870         libtool) DFT_ARG_SUFFIX=''   ;;
20871         normal)  DFT_ARG_SUFFIX=''   ;;
20872         debug)   DFT_ARG_SUFFIX='_g' ;;
20873         profile) DFT_ARG_SUFFIX='_p' ;;
20874         shared)  DFT_ARG_SUFFIX=''   ;;
20875         esac
20876         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20877 echo "$as_me:20877: result: $DFT_ARG_SUFFIX" >&5
20878 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20879
20880 echo "$as_me:20880: checking default library-dependency suffix" >&5
20881 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20882
20883         case X$DFT_LWR_MODEL in #(vi
20884         Xlibtool) #(vi
20885                 DFT_LIB_SUFFIX='.la'
20886                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20887                 ;;
20888         Xdebug) #(vi
20889                 DFT_LIB_SUFFIX='_g.a'
20890                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20891                 ;;
20892         Xprofile) #(vi
20893                 DFT_LIB_SUFFIX='_p.a'
20894                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20895                 ;;
20896         Xshared) #(vi
20897                 case $cf_cv_system_name in
20898                 aix[5-7]*) #(vi
20899                         DFT_LIB_SUFFIX='.so'
20900                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20901                         ;;
20902                 cygwin*|msys*|mingw*) #(vi
20903                         DFT_LIB_SUFFIX='.dll'
20904                         DFT_DEP_SUFFIX='.dll.a'
20905                         ;;
20906                 darwin*) #(vi
20907                         DFT_LIB_SUFFIX='.dylib'
20908                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20909                         ;;
20910                 hpux*) #(vi
20911                         case $target in
20912                         ia64*) #(vi
20913                                 DFT_LIB_SUFFIX='.so'
20914                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20915                                 ;;
20916                         *) #(vi
20917                                 DFT_LIB_SUFFIX='.sl'
20918                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20919                                 ;;
20920                         esac
20921                         ;;
20922                 *) #(vi
20923                         DFT_LIB_SUFFIX='.so'
20924                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20925                         ;;
20926                 esac
20927                 ;;
20928         *)
20929                 DFT_LIB_SUFFIX='.a'
20930                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20931                 ;;
20932         esac
20933         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
20934         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
20935 echo "$as_me:20935: result: $DFT_DEP_SUFFIX" >&5
20936 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
20937
20938 echo "$as_me:20938: checking default object directory" >&5
20939 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
20940
20941         case $DFT_LWR_MODEL in
20942         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
20943         normal)  DFT_OBJ_SUBDIR='objects' ;;
20944         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
20945         profile) DFT_OBJ_SUBDIR='obj_p' ;;
20946         shared)
20947                 case $cf_cv_system_name in #(vi
20948                 cygwin|msys) #(vi
20949                         DFT_OBJ_SUBDIR='objects' ;;
20950                 *)
20951                         DFT_OBJ_SUBDIR='obj_s' ;;
20952                 esac
20953         esac
20954 echo "$as_me:20954: result: $DFT_OBJ_SUBDIR" >&5
20955 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
20956
20957 if test "x$cf_with_cxx" = xyes ; then
20958 echo "$as_me:20958: checking c++ library-dependency suffix" >&5
20959 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
20960 if test "$with_libtool" != "no"; then
20961         # libtool thinks it can make c++ shared libraries (perhaps only g++)
20962         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20963 elif test "$with_shared_cxx" != "no"; then
20964         # also for g++ users...
20965         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20966 else
20967         # we normally make a static library because C/C++ library rules differ
20968
20969         case Xnormal in #(vi
20970         Xlibtool) #(vi
20971                 CXX_LIB_SUFFIX='.la'
20972                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20973                 ;;
20974         Xdebug) #(vi
20975                 CXX_LIB_SUFFIX='_g.a'
20976                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20977                 ;;
20978         Xprofile) #(vi
20979                 CXX_LIB_SUFFIX='_p.a'
20980                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20981                 ;;
20982         Xshared) #(vi
20983                 case $cf_cv_system_name in
20984                 aix[5-7]*) #(vi
20985                         CXX_LIB_SUFFIX='.so'
20986                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20987                         ;;
20988                 cygwin*|msys*|mingw*) #(vi
20989                         CXX_LIB_SUFFIX='.dll'
20990                         CXX_DEP_SUFFIX='.dll.a'
20991                         ;;
20992                 darwin*) #(vi
20993                         CXX_LIB_SUFFIX='.dylib'
20994                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20995                         ;;
20996                 hpux*) #(vi
20997                         case $target in
20998                         ia64*) #(vi
20999                                 CXX_LIB_SUFFIX='.so'
21000                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21001                                 ;;
21002                         *) #(vi
21003                                 CXX_LIB_SUFFIX='.sl'
21004                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21005                                 ;;
21006                         esac
21007                         ;;
21008                 *) #(vi
21009                         CXX_LIB_SUFFIX='.so'
21010                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21011                         ;;
21012                 esac
21013                 ;;
21014         *)
21015                 CXX_LIB_SUFFIX='.a'
21016                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21017                 ;;
21018         esac
21019         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21020         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21021
21022 fi
21023 echo "$as_me:21023: result: $CXX_LIB_SUFFIX" >&5
21024 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21025
21026 fi
21027
21028 # do not want -ldl in build except as needed for -lncurses dependency
21029 if test "x$with_dlsym" = xyes ; then
21030 if test $DFT_LWR_MODEL = shared || \
21031    test $DFT_LWR_MODEL = libtool ; then
21032
21033 # remove dl library from $LIBS
21034 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21035
21036 fi
21037 fi
21038 ### Set up low-level terminfo dependencies for makefiles.
21039
21040 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21041 # do not need libdl
21042 TICS_LIST=
21043 if test "x$with_dlsym" = xyes ; then
21044
21045 # remove dl library from $SHLIB_LIST
21046 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21047
21048 fi
21049
21050 if test "$with_ticlib" != no ; then
21051
21052         if test "x$with_ticlib" != xyes ; then
21053                 TICS_NAME=$with_ticlib
21054                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21055                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21056                 TICS_LIB_SUFFIX="${with_ticlib}"
21057         else
21058                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21059                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21060                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21061         fi
21062         TICS_LDFLAGS="-L${LIB_DIR}"
21063         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21064 else
21065         TICS_LDFLAGS="-L${LIB_DIR}"
21066         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21067 fi
21068
21069 if test "$with_termlib" != no ; then
21070
21071         if test "x$with_termlib" != xyes ; then
21072                 TINFO_NAME=$with_termlib
21073                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21074                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21075                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21076                 TINFO_LIB_SUFFIX="${with_termlib}"
21077         else
21078                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21079                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21080                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21081                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21082         fi
21083
21084         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21085         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21086         if test "$DFT_LWR_MODEL" = "libtool"; then
21087                 TEST_ARGS="${TEST_DEPS}"
21088                 TEST_ARG2="${TEST_DEP2}"
21089                 TINFO_LDFLAGS="-L${LIB_DIR}"
21090                 TINFO_LIBS="$TEST_ARGS"
21091                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21092                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21093         else
21094                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21095                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21096                 if test "x$with_term_driver" != xno ; then
21097                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21098                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21099                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21100                 else
21101                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21102                         TINFO_LIBS="$TEST_ARGS"
21103                 fi
21104                 TINFO_LDFLAGS="-L${LIB_DIR}"
21105                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21106         fi
21107 else
21108         # the next lines are needed for linking libtic over libncurses
21109         TINFO_NAME=${LIB_NAME}
21110         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21111         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21112         if test "x$with_tic_depends" = xyes ; then
21113                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21114         else
21115                 TICS_LIST="$SHLIB_LIST"
21116         fi
21117
21118         TINFO_LDFLAGS="-L${LIB_DIR}"
21119         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21120 fi
21121
21122 if test "$DFT_LWR_MODEL" = shared ; then
21123         case $cf_cv_system_name in #(vi
21124         cygwin*|msys*)
21125                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21126                 TINFO_SUFFIX=.dll
21127                 ;;
21128         esac
21129 fi
21130
21131 if test "x$with_dlsym" = xyes ; then
21132
21133 # remove dl library from $TICS_LIST
21134 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21135
21136 fi
21137
21138 if test "$DFT_LWR_MODEL" = "libtool"; then
21139     OBJEXT=lo
21140 fi
21141
21142 # needed for Ada95
21143 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21144
21145 case $DFT_LWR_MODEL in
21146 normal|debug|profile)
21147
21148 if test "$GCC" = yes ; then
21149         case $cf_cv_system_name in #(
21150         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21151                 LDFLAGS_STATIC=
21152                 LDFLAGS_SHARED=
21153                 ;;
21154     *)  #( normally, except when broken
21155         LDFLAGS_STATIC=-static
21156         LDFLAGS_SHARED=-dynamic
21157         ;;
21158     esac
21159 else
21160         case $cf_cv_system_name in #(
21161         aix[4-7]*)      #( from ld manpage
21162                 LDFLAGS_STATIC=-bstatic
21163                 LDFLAGS_SHARED=-bdynamic
21164                 ;;
21165         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21166                 # We could also use just "archive" and "shared".
21167                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21168                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21169                 ;;
21170         irix*)          #( from ld manpage IRIX64
21171                 LDFLAGS_STATIC=-Bstatic
21172                 LDFLAGS_SHARED=-Bdynamic
21173                 ;;
21174         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21175                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21176                 LDFLAGS_STATIC=-noso
21177                 LDFLAGS_SHARED=-so_archive
21178                 ;;
21179         solaris2*)
21180                 LDFLAGS_STATIC=-Bstatic
21181                 LDFLAGS_SHARED=-Bdynamic
21182                 ;;
21183         esac
21184 fi
21185
21186 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21187 then
21188         echo "$as_me:21188: checking if linker supports switching between static/dynamic" >&5
21189 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21190
21191         rm -f libconftest.a
21192         cat >conftest.$ac_ext <<EOF
21193 #line 21193 "configure"
21194 #include <stdio.h>
21195 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21196 EOF
21197         if { (eval echo "$as_me:21197: \"$ac_compile\"") >&5
21198   (eval $ac_compile) 2>&5
21199   ac_status=$?
21200   echo "$as_me:21200: \$? = $ac_status" >&5
21201   (exit $ac_status); } ; then
21202                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21203                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21204         fi
21205         rm -f conftest.*
21206
21207         cf_save_LIBS="$LIBS"
21208
21209         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21210         cat >conftest.$ac_ext <<_ACEOF
21211 #line 21211 "configure"
21212 #include "confdefs.h"
21213
21214 #line 21214 "configure"
21215 #include <stdio.h>
21216 int cf_ldflags_static(FILE *fp);
21217
21218 int
21219 main ()
21220 {
21221
21222         return cf_ldflags_static(stdin);
21223
21224   ;
21225   return 0;
21226 }
21227 _ACEOF
21228 rm -f conftest.$ac_objext conftest$ac_exeext
21229 if { (eval echo "$as_me:21229: \"$ac_link\"") >&5
21230   (eval $ac_link) 2>&5
21231   ac_status=$?
21232   echo "$as_me:21232: \$? = $ac_status" >&5
21233   (exit $ac_status); } &&
21234          { ac_try='test -s conftest$ac_exeext'
21235   { (eval echo "$as_me:21235: \"$ac_try\"") >&5
21236   (eval $ac_try) 2>&5
21237   ac_status=$?
21238   echo "$as_me:21238: \$? = $ac_status" >&5
21239   (exit $ac_status); }; }; then
21240
21241         # some linkers simply ignore the -dynamic
21242         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21243         *static*) # (vi
21244                 cf_ldflags_static=no
21245                 ;;
21246         *)
21247                 cf_ldflags_static=yes
21248                 ;;
21249         esac
21250
21251 else
21252   echo "$as_me: failed program was:" >&5
21253 cat conftest.$ac_ext >&5
21254 cf_ldflags_static=no
21255 fi
21256 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21257
21258         rm -f libconftest.*
21259         LIBS="$cf_save_LIBS"
21260
21261         echo "$as_me:21261: result: $cf_ldflags_static" >&5
21262 echo "${ECHO_T}$cf_ldflags_static" >&6
21263
21264         if test $cf_ldflags_static != yes
21265         then
21266                 LDFLAGS_STATIC=
21267                 LDFLAGS_SHARED=
21268         fi
21269 else
21270         LDFLAGS_STATIC=
21271         LDFLAGS_SHARED=
21272 fi
21273
21274         ;;
21275 esac
21276
21277 echo "$as_me:21277: checking where we will install curses.h" >&5
21278 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21279
21280 includesubdir=
21281 if test "$with_overwrite" = no && \
21282  ( test "x$includedir" = 'x${prefix}/include' || \
21283    test "x$includedir" = "x${prefix}/include" )
21284 then
21285         includesubdir="/ncurses${LIB_SUFFIX}"
21286 fi
21287 echo "$as_me:21287: result: ${includedir}${includesubdir}" >&5
21288 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21289
21290 ### Resolve a conflict between normal and wide-curses by forcing applications
21291 ### that will need libutf8 to add it to their configure script.
21292 if test "$with_overwrite" != no ; then
21293 if test "$NCURSES_LIBUTF8" = 1 ; then
21294         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21295         { echo "$as_me:21295: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21296 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21297 fi
21298 fi
21299 WITH_OVERWRITE=$with_overwrite
21300
21301 # used to separate tack out of the tree
21302 NCURSES_TREE=
21303
21304 ### predefined stuff for the test programs
21305
21306 cat >>confdefs.h <<\EOF
21307 #define HAVE_SLK_COLOR 1
21308 EOF
21309
21310 ### Construct the list of subdirectories for which we'll customize makefiles
21311 ### with the appropriate compile-rules.
21312
21313 echo "$as_me:21313: checking for src modules" >&5
21314 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21315
21316 # dependencies and linker-arguments for test-programs
21317 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21318 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21319 if test "$DFT_LWR_MODEL" = "libtool"; then
21320         TEST_ARGS="${TEST_DEPS}"
21321         TEST_ARG2="${TEST_DEP2}"
21322 else
21323         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21324         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21325 fi
21326
21327 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21328 cf_cv_src_modules=
21329 for cf_dir in $modules_to_build
21330 do
21331         if test -f $srcdir/$cf_dir/modules; then
21332
21333                 # We may/may not have tack in the distribution, though the
21334                 # makefile is.
21335                 if test $cf_dir = tack ; then
21336                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21337                                 continue
21338                         fi
21339                 fi
21340
21341                 if test -z "$cf_cv_src_modules"; then
21342                         cf_cv_src_modules=$cf_dir
21343                 else
21344                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21345                 fi
21346
21347                 # Make the ncurses_cfg.h file record the library interface files as
21348                 # well.  These are header files that are the same name as their
21349                 # directory.  Ncurses is the only library that does not follow
21350                 # that pattern.
21351                 if test $cf_dir = tack ; then
21352                         continue
21353                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21354
21355 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21356
21357                         cat >>confdefs.h <<EOF
21358 #define HAVE_${cf_have_include}_H 1
21359 EOF
21360
21361                         cat >>confdefs.h <<EOF
21362 #define HAVE_LIB${cf_have_include} 1
21363 EOF
21364
21365                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21366                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21367                         if test "$DFT_LWR_MODEL" = "libtool"; then
21368                                 TEST_ARGS="${TEST_DEPS}"
21369                                 TEST_ARG2="${TEST_DEP2}"
21370                         else
21371                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21372                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21373                         fi
21374                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21375                 fi
21376         fi
21377 done
21378 echo "$as_me:21378: result: $cf_cv_src_modules" >&5
21379 echo "${ECHO_T}$cf_cv_src_modules" >&6
21380
21381 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21382 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21383
21384 SRC_SUBDIRS=
21385 if test "x$cf_with_manpages" != xno ; then
21386         SRC_SUBDIRS="$SRC_SUBDIRS man"
21387 fi
21388 SRC_SUBDIRS="$SRC_SUBDIRS include"
21389 for cf_dir in $cf_cv_src_modules
21390 do
21391         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21392 done
21393 if test "x$cf_with_tests" != "xno" ; then
21394         SRC_SUBDIRS="$SRC_SUBDIRS test"
21395 fi
21396 if test "x$cf_with_db_install" = xyes; then
21397         test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
21398 fi
21399 if test "$cf_with_cxx_binding" != no; then
21400         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21401         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21402 fi
21403
21404 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21405 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21406
21407 ADA_SUBDIRS=
21408 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21409         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21410         ADA_SUBDIRS="gen src"
21411         if test "x$cf_with_tests" != "xno" ; then
21412                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21413         fi
21414 fi
21415
21416 SUB_MAKEFILES=
21417 for cf_dir in $SRC_SUBDIRS
21418 do
21419         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21420 done
21421
21422 if test -n "$ADA_SUBDIRS"; then
21423         for cf_dir in $ADA_SUBDIRS
21424         do
21425                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21426         done
21427
21428 fi
21429
21430 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21431    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21432    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21433 fi
21434
21435 DIRS_TO_MAKE="lib"
21436 for cf_item in $cf_list_models
21437 do
21438
21439         case $cf_item in
21440         libtool) cf_subdir='obj_lo'  ;;
21441         normal)  cf_subdir='objects' ;;
21442         debug)   cf_subdir='obj_g' ;;
21443         profile) cf_subdir='obj_p' ;;
21444         shared)
21445                 case $cf_cv_system_name in #(vi
21446                 cygwin|msys) #(vi
21447                         cf_subdir='objects' ;;
21448                 *)
21449                         cf_subdir='obj_s' ;;
21450                 esac
21451         esac
21452
21453         for cf_item2 in $DIRS_TO_MAKE
21454         do
21455                 test $cf_item2 = $cf_subdir && break
21456         done
21457         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21458 done
21459 for cf_dir in $DIRS_TO_MAKE
21460 do
21461         test ! -d $cf_dir && mkdir $cf_dir
21462 done
21463
21464 # symbols that differ when compiling Ada95 by itself.
21465 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21466
21467 # values to use as strings
21468
21469 cat >>confdefs.h <<EOF
21470 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21471 EOF
21472
21473 cat >>confdefs.h <<EOF
21474 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21475 EOF
21476
21477 ### Now that we're done running tests, add the compiler-warnings, if any
21478
21479 cf_fix_cppflags=no
21480 cf_new_cflags=
21481 cf_new_cppflags=
21482 cf_new_extra_cppflags=
21483
21484 for cf_add_cflags in $EXTRA_CFLAGS
21485 do
21486 case $cf_fix_cppflags in
21487 no)
21488         case $cf_add_cflags in #(vi
21489         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21490                 case $cf_add_cflags in
21491                 -D*)
21492                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21493
21494                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21495                                 && test -z "${cf_tst_cflags}" \
21496                                 && cf_fix_cppflags=yes
21497
21498                         if test $cf_fix_cppflags = yes ; then
21499                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21500                                 continue
21501                         elif test "${cf_tst_cflags}" = "\"'" ; then
21502                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21503                                 continue
21504                         fi
21505                         ;;
21506                 esac
21507                 case "$CPPFLAGS" in
21508                 *$cf_add_cflags) #(vi
21509                         ;;
21510                 *) #(vi
21511                         case $cf_add_cflags in #(vi
21512                         -D*)
21513                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21514
21515 CPPFLAGS=`echo "$CPPFLAGS" | \
21516         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21517                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21518
21519                                 ;;
21520                         esac
21521                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21522                         ;;
21523                 esac
21524                 ;;
21525         *)
21526                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21527                 ;;
21528         esac
21529         ;;
21530 yes)
21531         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21532
21533         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21534
21535         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21536                 && test -z "${cf_tst_cflags}" \
21537                 && cf_fix_cppflags=no
21538         ;;
21539 esac
21540 done
21541
21542 if test -n "$cf_new_cflags" ; then
21543
21544         CFLAGS="$CFLAGS $cf_new_cflags"
21545 fi
21546
21547 if test -n "$cf_new_cppflags" ; then
21548
21549         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21550 fi
21551
21552 if test -n "$cf_new_extra_cppflags" ; then
21553
21554         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21555 fi
21556
21557 ### Define substitutions for header files to avoid name-pollution
21558
21559 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21560         HAVE_TCGETATTR=1
21561 else
21562         HAVE_TCGETATTR=0
21563 fi
21564
21565 if test "x$ac_cv_header_stdint_h" = xyes ; then
21566         HAVE_STDINT_H=1
21567 else
21568         HAVE_STDINT_H=0
21569 fi
21570
21571 if test "x$ac_cv_header_termio_h" = xyes ; then
21572         HAVE_TERMIO_H=1
21573 else
21574         HAVE_TERMIO_H=0
21575 fi
21576
21577 if test "x$ac_cv_header_termios_h" = xyes ; then
21578         HAVE_TERMIOS_H=1
21579 else
21580         HAVE_TERMIOS_H=0
21581 fi
21582
21583 ################################################################################
21584 test "x$use_database" = xyes && \
21585 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21586
21587 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21588 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21589
21590 if test "x$enable_pc_files" = xyes ; then \
21591 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21592 MAKE_PC_FILES=
21593 else
21594 MAKE_PC_FILES="#"
21595 fi
21596
21597 # Extract the first word of "tic", so it can be a program name with args.
21598 set dummy tic; ac_word=$2
21599 echo "$as_me:21599: checking for $ac_word" >&5
21600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21601 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21602   echo $ECHO_N "(cached) $ECHO_C" >&6
21603 else
21604   case $TIC_PATH in
21605   [\\/]* | ?:[\\/]*)
21606   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21607   ;;
21608   *)
21609   ac_save_IFS=$IFS; IFS=$ac_path_separator
21610 ac_dummy="$PATH:/usr/local/ncurses/bin"
21611 for ac_dir in $ac_dummy; do
21612   IFS=$ac_save_IFS
21613   test -z "$ac_dir" && ac_dir=.
21614   if $as_executable_p "$ac_dir/$ac_word"; then
21615    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21616    echo "$as_me:21616: found $ac_dir/$ac_word" >&5
21617    break
21618 fi
21619 done
21620
21621   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21622   ;;
21623 esac
21624 fi
21625 TIC_PATH=$ac_cv_path_TIC_PATH
21626
21627 if test -n "$TIC_PATH"; then
21628   echo "$as_me:21628: result: $TIC_PATH" >&5
21629 echo "${ECHO_T}$TIC_PATH" >&6
21630 else
21631   echo "$as_me:21631: result: no" >&5
21632 echo "${ECHO_T}no" >&6
21633 fi
21634
21635 if test -n "$FALLBACK_LIST"
21636 then
21637         if test "$TIC_PATH" = unknown
21638         then
21639                 { echo "$as_me:21639: WARNING: no tic program found for fallbacks" >&5
21640 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21641         fi
21642 fi
21643
21644 if test "x$cf_with_tests" != xno ; then
21645         MAKE_TESTS=
21646 else
21647         MAKE_TESTS="#"
21648 fi
21649
21650 ADAHTML_DIR=../../doc/html/ada
21651
21652 # these could be configurable, but are not currently
21653 PANEL_NAME=panel
21654 MENU_NAME=menu
21655 FORM_NAME=form
21656 CXX_NAME=ncurses++
21657
21658 # workaround for g++ versus Solaris (20131116)
21659 case $cf_cv_system_name in #(vi
21660 solaris2*) #(vi
21661         case "x$CPPFLAGS" in #(vi
21662         *-D_XOPEN_SOURCE_EXTENDED*)
21663                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21664
21665 echo "${as_me:-configure}:21665: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21666
21667                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21668                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21669                 ;;
21670         esac
21671         ;;
21672 esac
21673
21674 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21675 case "x$NCURSES_OSPEED" in #(vi
21676 *short*) #(vi
21677         cf_compatible=1
21678         ;;
21679 *)
21680         cf_compatible=0
21681         ;;
21682 esac
21683
21684 cat >>confdefs.h <<EOF
21685 #define NCURSES_OSPEED_COMPAT $cf_compatible
21686 EOF
21687
21688 case "x$cf_cv_typeof_chtype" in
21689 xshort|xint|xlong)
21690         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
21691         ;;
21692 esac
21693
21694 case "x$cf_cv_typeof_mmask_t" in
21695 xshort|xint|xlong)
21696         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
21697         ;;
21698 esac
21699
21700 SUB_SCRIPTS=
21701
21702 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"
21703 ac_config_commands="$ac_config_commands default"
21704 cat >confcache <<\_ACEOF
21705 # This file is a shell script that caches the results of configure
21706 # tests run on this system so they can be shared between configure
21707 # scripts and configure runs, see configure's option --config-cache.
21708 # It is not useful on other systems.  If it contains results you don't
21709 # want to keep, you may remove or edit it.
21710 #
21711 # config.status only pays attention to the cache file if you give it
21712 # the --recheck option to rerun configure.
21713 #
21714 # `ac_cv_env_foo' variables (set or unset) will be overriden when
21715 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21716 # following values.
21717
21718 _ACEOF
21719
21720 # The following way of writing the cache mishandles newlines in values,
21721 # but we know of no workaround that is simple, portable, and efficient.
21722 # So, don't put newlines in cache variables' values.
21723 # Ultrix sh set writes to stderr and can't be redirected directly,
21724 # and sets the high bit in the cache file unless we assign to the vars.
21725 {
21726   (set) 2>&1 |
21727     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21728     *ac_space=\ *)
21729       # `set' does not quote correctly, so add quotes (double-quote
21730       # substitution turns \\\\ into \\, and sed turns \\ into \).
21731       sed -n \
21732         "s/'/'\\\\''/g;
21733           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21734       ;;
21735     *)
21736       # `set' quotes correctly as required by POSIX, so do not add quotes.
21737       sed -n \
21738         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21739       ;;
21740     esac;
21741 } |
21742   sed '
21743      t clear
21744      : clear
21745      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21746      t end
21747      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21748      : end' >>confcache
21749 if cmp -s $cache_file confcache; then :; else
21750   if test -w $cache_file; then
21751     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21752     cat confcache >$cache_file
21753   else
21754     echo "not updating unwritable cache $cache_file"
21755   fi
21756 fi
21757 rm -f confcache
21758
21759 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21760 # Let make expand exec_prefix.
21761 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21762
21763 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21764 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21765 # trailing colons and then remove the whole line if VPATH becomes empty
21766 # (actually we leave an empty line to preserve line numbers).
21767 if test "x$srcdir" = x.; then
21768   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21769 s/:*\$(srcdir):*/:/;
21770 s/:*\${srcdir}:*/:/;
21771 s/:*@srcdir@:*/:/;
21772 s/^\([^=]*=[    ]*\):*/\1/;
21773 s/:*$//;
21774 s/^[^=]*=[      ]*$//;
21775 }'
21776 fi
21777
21778 DEFS=-DHAVE_CONFIG_H
21779
21780 : ${CONFIG_STATUS=./config.status}
21781 ac_clean_files_save=$ac_clean_files
21782 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21783 { echo "$as_me:21783: creating $CONFIG_STATUS" >&5
21784 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21785 cat >$CONFIG_STATUS <<_ACEOF
21786 #! $SHELL
21787 # Generated automatically by configure.
21788 # Run this file to recreate the current configuration.
21789 # Compiler output produced by configure, useful for debugging
21790 # configure, is in config.log if it exists.
21791
21792 debug=false
21793 SHELL=\${CONFIG_SHELL-$SHELL}
21794 ac_cs_invocation="\$0 \$@"
21795
21796 _ACEOF
21797
21798 cat >>$CONFIG_STATUS <<\_ACEOF
21799 # Be Bourne compatible
21800 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21801   emulate sh
21802   NULLCMD=:
21803 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21804   set -o posix
21805 fi
21806
21807 # Name of the executable.
21808 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21809
21810 if expr a : '\(a\)' >/dev/null 2>&1; then
21811   as_expr=expr
21812 else
21813   as_expr=false
21814 fi
21815
21816 rm -f conf$$ conf$$.exe conf$$.file
21817 echo >conf$$.file
21818 if ln -s conf$$.file conf$$ 2>/dev/null; then
21819   # We could just check for DJGPP; but this test a) works b) is more generic
21820   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21821   if test -f conf$$.exe; then
21822     # Don't use ln at all; we don't have any links
21823     as_ln_s='cp -p'
21824   else
21825     as_ln_s='ln -s'
21826   fi
21827 elif ln conf$$.file conf$$ 2>/dev/null; then
21828   as_ln_s=ln
21829 else
21830   as_ln_s='cp -p'
21831 fi
21832 rm -f conf$$ conf$$.exe conf$$.file
21833
21834 as_executable_p="test -f"
21835
21836 # Support unset when possible.
21837 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21838   as_unset=unset
21839 else
21840   as_unset=false
21841 fi
21842
21843 # NLS nuisances.
21844 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21845 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21846 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21847 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21848 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21849 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21850 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21851 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21852
21853 # IFS
21854 # We need space, tab and new line, in precisely that order.
21855 as_nl='
21856 '
21857 IFS="   $as_nl"
21858
21859 # CDPATH.
21860 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21861
21862 exec 6>&1
21863
21864 _ACEOF
21865
21866 # Files that config.status was made for.
21867 if test -n "$ac_config_files"; then
21868   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21869 fi
21870
21871 if test -n "$ac_config_headers"; then
21872   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21873 fi
21874
21875 if test -n "$ac_config_links"; then
21876   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21877 fi
21878
21879 if test -n "$ac_config_commands"; then
21880   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21881 fi
21882
21883 cat >>$CONFIG_STATUS <<\EOF
21884
21885 ac_cs_usage="\
21886 \`$as_me' instantiates files from templates according to the
21887 current configuration.
21888
21889 Usage: $0 [OPTIONS] [FILE]...
21890
21891   -h, --help       print this help, then exit
21892   -V, --version    print version number, then exit
21893   -d, --debug      don't remove temporary files
21894       --recheck    update $as_me by reconfiguring in the same conditions
21895   --file=FILE[:TEMPLATE]
21896                    instantiate the configuration file FILE
21897   --header=FILE[:TEMPLATE]
21898                    instantiate the configuration header FILE
21899
21900 Configuration files:
21901 $config_files
21902
21903 Configuration headers:
21904 $config_headers
21905
21906 Configuration commands:
21907 $config_commands
21908
21909 Report bugs to <dickey@invisible-island.net>."
21910 EOF
21911
21912 cat >>$CONFIG_STATUS <<EOF
21913 ac_cs_version="\\
21914 config.status
21915 configured by $0, generated by GNU Autoconf 2.52.20121002,
21916   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21917
21918 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21919 Free Software Foundation, Inc.
21920 This config.status script is free software; the Free Software Foundation
21921 gives unlimited permission to copy, distribute and modify it."
21922 srcdir=$srcdir
21923 INSTALL="$INSTALL"
21924 EOF
21925
21926 cat >>$CONFIG_STATUS <<\EOF
21927 # If no file are specified by the user, then we need to provide default
21928 # value.  By we need to know if files were specified by the user.
21929 ac_need_defaults=:
21930 while test $# != 0
21931 do
21932   case $1 in
21933   --*=*)
21934     ac_option=`expr "x$1" : 'x\([^=]*\)='`
21935     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21936     shift
21937     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21938     shift
21939     ;;
21940   -*);;
21941   *) # This is not an option, so the user has probably given explicit
21942      # arguments.
21943      ac_need_defaults=false;;
21944   esac
21945
21946   case $1 in
21947   # Handling of the options.
21948 EOF
21949 cat >>$CONFIG_STATUS <<EOF
21950   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21951     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21952     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21953 EOF
21954 cat >>$CONFIG_STATUS <<\EOF
21955   --version | --vers* | -V )
21956     echo "$ac_cs_version"; exit 0 ;;
21957   --he | --h)
21958     # Conflict between --help and --header
21959     { { echo "$as_me:21959: error: ambiguous option: $1
21960 Try \`$0 --help' for more information." >&5
21961 echo "$as_me: error: ambiguous option: $1
21962 Try \`$0 --help' for more information." >&2;}
21963    { (exit 1); exit 1; }; };;
21964   --help | --hel | -h )
21965     echo "$ac_cs_usage"; exit 0 ;;
21966   --debug | --d* | -d )
21967     debug=: ;;
21968   --file | --fil | --fi | --f )
21969     shift
21970     CONFIG_FILES="$CONFIG_FILES $1"
21971     ac_need_defaults=false;;
21972   --header | --heade | --head | --hea )
21973     shift
21974     CONFIG_HEADERS="$CONFIG_HEADERS $1"
21975     ac_need_defaults=false;;
21976
21977   # This is an error.
21978   -*) { { echo "$as_me:21978: error: unrecognized option: $1
21979 Try \`$0 --help' for more information." >&5
21980 echo "$as_me: error: unrecognized option: $1
21981 Try \`$0 --help' for more information." >&2;}
21982    { (exit 1); exit 1; }; } ;;
21983
21984   *) ac_config_targets="$ac_config_targets $1" ;;
21985
21986   esac
21987   shift
21988 done
21989
21990 exec 5>>config.log
21991 cat >&5 << _ACEOF
21992
21993 ## ----------------------- ##
21994 ## Running config.status.  ##
21995 ## ----------------------- ##
21996
21997 This file was extended by $as_me 2.52.20121002, executed with
21998   CONFIG_FILES    = $CONFIG_FILES
21999   CONFIG_HEADERS  = $CONFIG_HEADERS
22000   CONFIG_LINKS    = $CONFIG_LINKS
22001   CONFIG_COMMANDS = $CONFIG_COMMANDS
22002   > $ac_cs_invocation
22003 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22004
22005 _ACEOF
22006 EOF
22007
22008 cat >>$CONFIG_STATUS <<EOF
22009 #
22010 # INIT-COMMANDS section.
22011 #
22012
22013 ### Special initialization commands, used to pass information from the
22014 ### configuration-run into config.status
22015
22016 AWK="$AWK"
22017 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22018 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22019 ECHO_LD="$ECHO_LD"
22020 LDCONFIG="$LDCONFIG"
22021 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22022 LIB_NAME="$LIB_NAME"
22023 LIB_PREFIX="$LIB_PREFIX"
22024 LIB_SUBSETS="$LIB_SUBSETS"
22025 LIB_SUFFIX="$LIB_SUFFIX"
22026 LIB_TRACING="$LIB_TRACING"
22027 LN_S="$LN_S"
22028 MAKE_TERMINFO="$MAKE_TERMINFO"
22029 NCURSES_MAJOR="$NCURSES_MAJOR"
22030 NCURSES_MINOR="$NCURSES_MINOR"
22031 NCURSES_OSPEED="$NCURSES_OSPEED"
22032 NCURSES_PATCH="$NCURSES_PATCH"
22033 SRC_SUBDIRS="$SRC_SUBDIRS"
22034 TERMINFO="$TERMINFO"
22035 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22036 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22037 TICS_NAME="$TICS_NAME"
22038 TIC_PATH="$TIC_PATH"
22039 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22040 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22041 TINFO_NAME="$TINFO_NAME"
22042 TINFO_SUFFIX="$TINFO_SUFFIX"
22043 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22044 WITH_CURSES_H="$with_curses_h"
22045 WITH_ECHO="${enable_echo:=yes}"
22046 WITH_OVERWRITE="$with_overwrite"
22047 cf_LIST_MODELS="$cf_list_models"
22048 cf_cv_abi_version="$cf_cv_abi_version"
22049 cf_cv_do_relink="$cf_cv_do_relink"
22050 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22051 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22052 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22053 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22054 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22055 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22056 cf_cv_rel_version="$cf_cv_rel_version"
22057 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22058 cf_cv_shared_soname='$cf_cv_shared_soname'
22059 cf_cv_shlib_version="$cf_cv_shlib_version"
22060 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22061 cf_cv_system_name="$cf_cv_system_name"
22062 cf_cv_term_driver="$with_term_driver"
22063 cf_with_ada="$cf_with_ada"
22064 cf_with_cxx_binding="$cf_with_cxx_binding"
22065 cf_with_db_install="$cf_with_db_install"
22066 cf_with_manpages="$cf_with_manpages"
22067 cf_with_tests="$cf_with_tests"
22068 with_shared_cxx="$with_shared_cxx"
22069 host="$host"
22070 target="$target"
22071
22072 EOF
22073
22074 cat >>$CONFIG_STATUS <<\EOF
22075 for ac_config_target in $ac_config_targets
22076 do
22077   case "$ac_config_target" in
22078   # Handling of arguments.
22079   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22080   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22081   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22082   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22083   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22084   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22085   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22086   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22087   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22088   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22089   *) { { echo "$as_me:22089: error: invalid argument: $ac_config_target" >&5
22090 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22091    { (exit 1); exit 1; }; };;
22092   esac
22093 done
22094
22095 # If the user did not use the arguments to specify the items to instantiate,
22096 # then the envvar interface is used.  Set only those that are not.
22097 # We use the long form for the default assignment because of an extremely
22098 # bizarre bug on SunOS 4.1.3.
22099 if $ac_need_defaults; then
22100   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22101   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22102   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22103 fi
22104
22105 # Create a temporary directory, and hook for its removal unless debugging.
22106 $debug ||
22107 {
22108   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22109   trap '{ (exit 1); exit 1; }' 1 2 13 15
22110 }
22111
22112 # Create a (secure) tmp directory for tmp files.
22113 : ${TMPDIR=/tmp}
22114 {
22115   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22116   test -n "$tmp" && test -d "$tmp"
22117 }  ||
22118 {
22119   tmp=$TMPDIR/cs$$-$RANDOM
22120   (umask 077 && mkdir $tmp)
22121 } ||
22122 {
22123    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22124    { (exit 1); exit 1; }
22125 }
22126
22127 EOF
22128
22129 cat >>$CONFIG_STATUS <<EOF
22130
22131 #
22132 # CONFIG_FILES section.
22133 #
22134
22135 # No need to generate the scripts if there are no CONFIG_FILES.
22136 # This happens for instance when ./config.status config.h
22137 if test -n "\$CONFIG_FILES"; then
22138   # Protect against being on the right side of a sed subst in config.status.
22139   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22140    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22141 s,@SHELL@,$SHELL,;t t
22142 s,@exec_prefix@,$exec_prefix,;t t
22143 s,@prefix@,$prefix,;t t
22144 s,@program_transform_name@,$program_transform_name,;t t
22145 s,@bindir@,$bindir,;t t
22146 s,@sbindir@,$sbindir,;t t
22147 s,@libexecdir@,$libexecdir,;t t
22148 s,@datarootdir@,$datarootdir,;t t
22149 s,@datadir@,$datadir,;t t
22150 s,@sysconfdir@,$sysconfdir,;t t
22151 s,@sharedstatedir@,$sharedstatedir,;t t
22152 s,@localstatedir@,$localstatedir,;t t
22153 s,@libdir@,$libdir,;t t
22154 s,@includedir@,$includedir,;t t
22155 s,@oldincludedir@,$oldincludedir,;t t
22156 s,@infodir@,$infodir,;t t
22157 s,@mandir@,$mandir,;t t
22158 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22159 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22160 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22161 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22162 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22163 s,@build_alias@,$build_alias,;t t
22164 s,@host_alias@,$host_alias,;t t
22165 s,@target_alias@,$target_alias,;t t
22166 s,@ECHO_C@,$ECHO_C,;t t
22167 s,@ECHO_N@,$ECHO_N,;t t
22168 s,@ECHO_T@,$ECHO_T,;t t
22169 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22170 s,@DEFS@,$DEFS,;t t
22171 s,@LIBS@,$LIBS,;t t
22172 s,@top_builddir@,$top_builddir,;t t
22173 s,@EGREP@,$EGREP,;t t
22174 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22175 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22176 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22177 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22178 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22179 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22180 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22181 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22182 s,@build@,$build,;t t
22183 s,@build_cpu@,$build_cpu,;t t
22184 s,@build_vendor@,$build_vendor,;t t
22185 s,@build_os@,$build_os,;t t
22186 s,@host@,$host,;t t
22187 s,@host_cpu@,$host_cpu,;t t
22188 s,@host_vendor@,$host_vendor,;t t
22189 s,@host_os@,$host_os,;t t
22190 s,@target@,$target,;t t
22191 s,@target_cpu@,$target_cpu,;t t
22192 s,@target_vendor@,$target_vendor,;t t
22193 s,@target_os@,$target_os,;t t
22194 s,@CC@,$CC,;t t
22195 s,@CFLAGS@,$CFLAGS,;t t
22196 s,@LDFLAGS@,$LDFLAGS,;t t
22197 s,@CPPFLAGS@,$CPPFLAGS,;t t
22198 s,@ac_ct_CC@,$ac_ct_CC,;t t
22199 s,@EXEEXT@,$EXEEXT,;t t
22200 s,@OBJEXT@,$OBJEXT,;t t
22201 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22202 s,@CPP@,$CPP,;t t
22203 s,@LDCONFIG@,$LDCONFIG,;t t
22204 s,@CXX@,$CXX,;t t
22205 s,@CXXFLAGS@,$CXXFLAGS,;t t
22206 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22207 s,@AWK@,$AWK,;t t
22208 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22209 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22210 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22211 s,@LINT@,$LINT,;t t
22212 s,@LINT_OPTS@,$LINT_OPTS,;t t
22213 s,@LN_S@,$LN_S,;t t
22214 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22215 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22216 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22217 s,@SET_MAKE@,$SET_MAKE,;t t
22218 s,@CTAGS@,$CTAGS,;t t
22219 s,@ETAGS@,$ETAGS,;t t
22220 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22221 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22222 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22223 s,@RANLIB@,$RANLIB,;t t
22224 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22225 s,@LD@,$LD,;t t
22226 s,@ac_ct_LD@,$ac_ct_LD,;t t
22227 s,@AR@,$AR,;t t
22228 s,@ac_ct_AR@,$ac_ct_AR,;t t
22229 s,@NM@,$NM,;t t
22230 s,@ac_ct_NM@,$ac_ct_NM,;t t
22231 s,@ARFLAGS@,$ARFLAGS,;t t
22232 s,@DESTDIR@,$DESTDIR,;t t
22233 s,@BUILD_CC@,$BUILD_CC,;t t
22234 s,@BUILD_CPP@,$BUILD_CPP,;t t
22235 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22236 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22237 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22238 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22239 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22240 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22241 s,@cf_list_models@,$cf_list_models,;t t
22242 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22243 s,@LIBTOOL@,$LIBTOOL,;t t
22244 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22245 s,@LT_UNDEF@,$LT_UNDEF,;t t
22246 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22247 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22248 s,@LIB_CREATE@,$LIB_CREATE,;t t
22249 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22250 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22251 s,@LIB_PREP@,$LIB_PREP,;t t
22252 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22253 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22254 s,@LIB_LINK@,$LIB_LINK,;t t
22255 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22256 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22257 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22258 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22259 s,@TICS_NAME@,$TICS_NAME,;t t
22260 s,@TINFO_NAME@,$TINFO_NAME,;t t
22261 s,@LIB_NAME@,$LIB_NAME,;t t
22262 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22263 s,@CC_G_OPT@,$CC_G_OPT,;t t
22264 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22265 s,@LD_MODEL@,$LD_MODEL,;t t
22266 s,@shlibdir@,$shlibdir,;t t
22267 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22268 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22269 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22270 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22271 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22272 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22273 s,@LINK_PROGS@,$LINK_PROGS,;t t
22274 s,@LINK_TESTS@,$LINK_TESTS,;t t
22275 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22276 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22277 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22278 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22279 s,@RPATH_LIST@,$RPATH_LIST,;t t
22280 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22281 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22282 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22283 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22284 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22285 s,@XTERM_KBS@,$XTERM_KBS,;t t
22286 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22287 s,@TERMINFO@,$TERMINFO,;t t
22288 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22289 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22290 s,@TERMPATH@,$TERMPATH,;t t
22291 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22292 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22293 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22294 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22295 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22296 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22297 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22298 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22299 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22300 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22301 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22302 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22303 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22304 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22305 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22306 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22307 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22308 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22309 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22310 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22311 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22312 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22313 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22314 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22315 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22316 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22317 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22318 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22319 s,@PTHREAD@,$PTHREAD,;t t
22320 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22321 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22322 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22323 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22324 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22325 s,@ECHO_LT@,$ECHO_LT,;t t
22326 s,@ECHO_LD@,$ECHO_LD,;t t
22327 s,@RULE_CC@,$RULE_CC,;t t
22328 s,@SHOW_CC@,$SHOW_CC,;t t
22329 s,@ECHO_CC@,$ECHO_CC,;t t
22330 s,@ECHO_LINK@,$ECHO_LINK,;t t
22331 s,@ADAFLAGS@,$ADAFLAGS,;t t
22332 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22333 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22334 s,@ADA_TRACE@,$ADA_TRACE,;t t
22335 s,@MATH_LIB@,$MATH_LIB,;t t
22336 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22337 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22338 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22339 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22340 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22341 s,@TEST_LIBS@,$TEST_LIBS,;t t
22342 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22343 s,@CXXCPP@,$CXXCPP,;t t
22344 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22345 s,@CXX_AR@,$CXX_AR,;t t
22346 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22347 s,@CXXLIBS@,$CXXLIBS,;t t
22348 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22349 s,@gnat_exists@,$gnat_exists,;t t
22350 s,@M4_exists@,$M4_exists,;t t
22351 s,@cf_ada_make@,$cf_ada_make,;t t
22352 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22353 s,@cf_compile_generics@,$cf_compile_generics,;t t
22354 s,@cf_generic_objects@,$cf_generic_objects,;t t
22355 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22356 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22357 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22358 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22359 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22360 s,@cf_ada_package@,$cf_ada_package,;t t
22361 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22362 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22363 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22364 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22365 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22366 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22367 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22368 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22369 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22370 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22371 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22372 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22373 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22374 s,@TICS_LIBS@,$TICS_LIBS,;t t
22375 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22376 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22377 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22378 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22379 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22380 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22381 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22382 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22383 s,@includesubdir@,$includesubdir,;t t
22384 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22385 s,@TICS_LIST@,$TICS_LIST,;t t
22386 s,@TINFO_LIST@,$TINFO_LIST,;t t
22387 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22388 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22389 s,@TEST_ARGS@,$TEST_ARGS,;t t
22390 s,@TEST_DEPS@,$TEST_DEPS,;t t
22391 s,@TEST_ARG2@,$TEST_ARG2,;t t
22392 s,@TEST_DEP2@,$TEST_DEP2,;t t
22393 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22394 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22395 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22396 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22397 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22398 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22399 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22400 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22401 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22402 s,@cross_compiling@,$cross_compiling,;t t
22403 s,@TIC_PATH@,$TIC_PATH,;t t
22404 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22405 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22406 s,@PANEL_NAME@,$PANEL_NAME,;t t
22407 s,@MENU_NAME@,$MENU_NAME,;t t
22408 s,@FORM_NAME@,$FORM_NAME,;t t
22409 s,@CXX_NAME@,$CXX_NAME,;t t
22410 CEOF
22411
22412 EOF
22413
22414   cat >>$CONFIG_STATUS <<\EOF
22415   # Split the substitutions into bite-sized pieces for seds with
22416   # small command number limits, like on Digital OSF/1 and HP-UX.
22417   ac_max_sed_lines=48
22418   ac_sed_frag=1 # Number of current file.
22419   ac_beg=1 # First line for current file.
22420   ac_end=$ac_max_sed_lines # Line after last line for current file.
22421   ac_more_lines=:
22422   ac_sed_cmds=
22423   while $ac_more_lines; do
22424     if test $ac_beg -gt 1; then
22425       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22426     else
22427       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22428     fi
22429     if test ! -s $tmp/subs.frag; then
22430       ac_more_lines=false
22431     else
22432       # The purpose of the label and of the branching condition is to
22433       # speed up the sed processing (if there are no `@' at all, there
22434       # is no need to browse any of the substitutions).
22435       # These are the two extra sed commands mentioned above.
22436       (echo ':t
22437   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22438       if test -z "$ac_sed_cmds"; then
22439         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22440       else
22441         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22442       fi
22443       ac_sed_frag=`expr $ac_sed_frag + 1`
22444       ac_beg=$ac_end
22445       ac_end=`expr $ac_end + $ac_max_sed_lines`
22446     fi
22447   done
22448   if test -z "$ac_sed_cmds"; then
22449     ac_sed_cmds=cat
22450   fi
22451 fi # test -n "$CONFIG_FILES"
22452
22453 EOF
22454 cat >>$CONFIG_STATUS <<\EOF
22455 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22456   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22457   case $ac_file in
22458   - | *:- | *:-:* ) # input from stdin
22459         cat >$tmp/stdin
22460         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22461         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22462   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22463         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22464   * )   ac_file_in=$ac_file.in ;;
22465   esac
22466
22467   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22468   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22469          X"$ac_file" : 'X\(//\)[^/]' \| \
22470          X"$ac_file" : 'X\(//\)$' \| \
22471          X"$ac_file" : 'X\(/\)' \| \
22472          .     : '\(.\)' 2>/dev/null ||
22473 echo X"$ac_file" |
22474     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22475           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22476           /^X\(\/\/\)$/{ s//\1/; q; }
22477           /^X\(\/\).*/{ s//\1/; q; }
22478           s/.*/./; q'`
22479   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22480     { case "$ac_dir" in
22481   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22482   *)                      as_incr_dir=.;;
22483 esac
22484 as_dummy="$ac_dir"
22485 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22486   case $as_mkdir_dir in
22487     # Skip DOS drivespec
22488     ?:) as_incr_dir=$as_mkdir_dir ;;
22489     *)
22490       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22491       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22492     ;;
22493   esac
22494 done; }
22495
22496     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22497     # A "../" for each directory in $ac_dir_suffix.
22498     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22499   else
22500     ac_dir_suffix= ac_dots=
22501   fi
22502
22503   case $srcdir in
22504   .)  ac_srcdir=.
22505       if test -z "$ac_dots"; then
22506          ac_top_srcdir=.
22507       else
22508          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22509       fi ;;
22510   [\\/]* | ?:[\\/]* )
22511       ac_srcdir=$srcdir$ac_dir_suffix;
22512       ac_top_srcdir=$srcdir ;;
22513   *) # Relative path.
22514     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22515     ac_top_srcdir=$ac_dots$srcdir ;;
22516   esac
22517
22518   case $INSTALL in
22519   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22520   *) ac_INSTALL=$ac_dots$INSTALL ;;
22521   esac
22522
22523   if test x"$ac_file" != x-; then
22524     { echo "$as_me:22524: creating $ac_file" >&5
22525 echo "$as_me: creating $ac_file" >&6;}
22526     rm -f "$ac_file"
22527   fi
22528   # Let's still pretend it is `configure' which instantiates (i.e., don't
22529   # use $as_me), people would be surprised to read:
22530   #    /* config.h.  Generated automatically by config.status.  */
22531   configure_input="Generated automatically from `echo $ac_file_in |
22532                                                  sed 's,.*/,,'` by configure."
22533
22534   # First look for the input files in the build tree, otherwise in the
22535   # src tree.
22536   ac_file_inputs=`IFS=:
22537     for f in $ac_file_in; do
22538       case $f in
22539       -) echo $tmp/stdin ;;
22540       [\\/$]*)
22541          # Absolute (can't be DOS-style, as IFS=:)
22542          test -f "$f" || { { echo "$as_me:22542: error: cannot find input file: $f" >&5
22543 echo "$as_me: error: cannot find input file: $f" >&2;}
22544    { (exit 1); exit 1; }; }
22545          echo $f;;
22546       *) # Relative
22547          if test -f "$f"; then
22548            # Build tree
22549            echo $f
22550          elif test -f "$srcdir/$f"; then
22551            # Source tree
22552            echo $srcdir/$f
22553          else
22554            # /dev/null tree
22555            { { echo "$as_me:22555: error: cannot find input file: $f" >&5
22556 echo "$as_me: error: cannot find input file: $f" >&2;}
22557    { (exit 1); exit 1; }; }
22558          fi;;
22559       esac
22560     done` || { (exit 1); exit 1; }
22561 EOF
22562 cat >>$CONFIG_STATUS <<\EOF
22563   ac_warn_datarootdir=no
22564   if test x"$ac_file" != x-; then
22565     for ac_item in $ac_file_inputs
22566     do
22567       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22568       if test -n "$ac_seen"; then
22569         ac_used=`grep '@datarootdir@' $ac_item`
22570         if test -z "$ac_used"; then
22571           { echo "$as_me:22571: WARNING: datarootdir was used implicitly but not set:
22572 $ac_seen" >&5
22573 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22574 $ac_seen" >&2;}
22575           ac_warn_datarootdir=yes
22576         fi
22577       fi
22578       ac_seen=`grep '${datarootdir}' $ac_item`
22579       if test -n "$ac_seen"; then
22580         { echo "$as_me:22580: WARNING: datarootdir was used explicitly but not set:
22581 $ac_seen" >&5
22582 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22583 $ac_seen" >&2;}
22584         ac_warn_datarootdir=yes
22585       fi
22586     done
22587   fi
22588
22589 if test "x$ac_warn_datarootdir" = xyes; then
22590   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22591 fi
22592
22593 EOF
22594 cat >>$CONFIG_STATUS <<EOF
22595   sed "$ac_vpsub
22596 $extrasub
22597 EOF
22598 cat >>$CONFIG_STATUS <<\EOF
22599 :t
22600 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22601 s,@configure_input@,$configure_input,;t t
22602 s,@srcdir@,$ac_srcdir,;t t
22603 s,@top_srcdir@,$ac_top_srcdir,;t t
22604 s,@INSTALL@,$ac_INSTALL,;t t
22605 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22606   rm -f $tmp/stdin
22607   if test x"$ac_file" != x-; then
22608     cp $tmp/out $ac_file
22609
22610     for ac_name in prefix exec_prefix datarootdir
22611     do
22612         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22613         if test -n "$ac_seen"; then
22614             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22615             if test -z "$ac_init"; then
22616               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22617               { echo "$as_me:22617: WARNING: Variable $ac_name is used but was not set:
22618 $ac_seen" >&5
22619 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22620 $ac_seen" >&2;}
22621             fi
22622         fi
22623     done
22624     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22625     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22626     if test -s $tmp/out; then
22627       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22628       { echo "$as_me:22628: WARNING: Some variables may not be substituted:
22629 $ac_seen" >&5
22630 echo "$as_me: WARNING: Some variables may not be substituted:
22631 $ac_seen" >&2;}
22632     fi
22633   else
22634     cat $tmp/out
22635   fi
22636   rm -f $tmp/out
22637
22638 done
22639 EOF
22640 cat >>$CONFIG_STATUS <<\EOF
22641
22642 #
22643 # CONFIG_HEADER section.
22644 #
22645
22646 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22647 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22648 #
22649 # ac_d sets the value in "#define NAME VALUE" lines.
22650 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22651 ac_dB='[        ].*$,\1#\2'
22652 ac_dC=' '
22653 ac_dD=',;t'
22654 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22655 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22656 ac_iB='\([      ]\),\1#\2define\3'
22657 ac_iC=' '
22658 ac_iD='\4,;t'
22659 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22660 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22661 ac_uB='$,\1#\2define\3'
22662 ac_uC=' '
22663 ac_uD=',;t'
22664
22665 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22666   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22667   case $ac_file in
22668   - | *:- | *:-:* ) # input from stdin
22669         cat >$tmp/stdin
22670         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22671         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22672   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22673         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22674   * )   ac_file_in=$ac_file.in ;;
22675   esac
22676
22677   test x"$ac_file" != x- && { echo "$as_me:22677: creating $ac_file" >&5
22678 echo "$as_me: creating $ac_file" >&6;}
22679
22680   # First look for the input files in the build tree, otherwise in the
22681   # src tree.
22682   ac_file_inputs=`IFS=:
22683     for f in $ac_file_in; do
22684       case $f in
22685       -) echo $tmp/stdin ;;
22686       [\\/$]*)
22687          # Absolute (can't be DOS-style, as IFS=:)
22688          test -f "$f" || { { echo "$as_me:22688: error: cannot find input file: $f" >&5
22689 echo "$as_me: error: cannot find input file: $f" >&2;}
22690    { (exit 1); exit 1; }; }
22691          echo $f;;
22692       *) # Relative
22693          if test -f "$f"; then
22694            # Build tree
22695            echo $f
22696          elif test -f "$srcdir/$f"; then
22697            # Source tree
22698            echo $srcdir/$f
22699          else
22700            # /dev/null tree
22701            { { echo "$as_me:22701: error: cannot find input file: $f" >&5
22702 echo "$as_me: error: cannot find input file: $f" >&2;}
22703    { (exit 1); exit 1; }; }
22704          fi;;
22705       esac
22706     done` || { (exit 1); exit 1; }
22707   # Remove the trailing spaces.
22708   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
22709
22710 EOF
22711
22712 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
22713 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
22714 # be either 'cat' or 'sort'.
22715 cat confdefs.h | uniq >conftest.vals
22716
22717 # Break up conftest.vals because some shells have a limit on
22718 # the size of here documents, and old seds have small limits too.
22719
22720 rm -f conftest.tail
22721 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
22722 while grep . conftest.vals >/dev/null
22723 do
22724   # Write chunks of a limited-size here document to conftest.frag.
22725   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22726   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22727   echo 'CEOF' >> $CONFIG_STATUS
22728   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22729   rm -f conftest.vals
22730   mv conftest.tail conftest.vals
22731 done
22732 rm -f conftest.vals
22733
22734 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
22735 # marker @DEFS@.
22736 echo '  cat >> conftest.edit <<CEOF
22737 /@DEFS@/r conftest.frag
22738 /@DEFS@/d
22739 CEOF
22740 sed -f conftest.edit $tmp/in > $tmp/out
22741 rm -f $tmp/in
22742 mv $tmp/out $tmp/in
22743 rm -f conftest.edit conftest.frag
22744 ' >> $CONFIG_STATUS
22745
22746 cat >>$CONFIG_STATUS <<\EOF
22747   # Let's still pretend it is `configure' which instantiates (i.e., don't
22748   # use $as_me), people would be surprised to read:
22749   #    /* config.h.  Generated automatically by config.status.  */
22750   if test x"$ac_file" = x-; then
22751     echo "/* Generated automatically by configure.  */" >$tmp/config.h
22752   else
22753     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22754   fi
22755   cat $tmp/in >>$tmp/config.h
22756   rm -f $tmp/in
22757   if test x"$ac_file" != x-; then
22758     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22759       { echo "$as_me:22759: $ac_file is unchanged" >&5
22760 echo "$as_me: $ac_file is unchanged" >&6;}
22761     else
22762       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22763          X"$ac_file" : 'X\(//\)[^/]' \| \
22764          X"$ac_file" : 'X\(//\)$' \| \
22765          X"$ac_file" : 'X\(/\)' \| \
22766          .     : '\(.\)' 2>/dev/null ||
22767 echo X"$ac_file" |
22768     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22769           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22770           /^X\(\/\/\)$/{ s//\1/; q; }
22771           /^X\(\/\).*/{ s//\1/; q; }
22772           s/.*/./; q'`
22773       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22774         { case "$ac_dir" in
22775   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22776   *)                      as_incr_dir=.;;
22777 esac
22778 as_dummy="$ac_dir"
22779 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22780   case $as_mkdir_dir in
22781     # Skip DOS drivespec
22782     ?:) as_incr_dir=$as_mkdir_dir ;;
22783     *)
22784       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22785       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22786     ;;
22787   esac
22788 done; }
22789
22790       fi
22791       rm -f $ac_file
22792       mv $tmp/config.h $ac_file
22793     fi
22794   else
22795     cat $tmp/config.h
22796     rm -f $tmp/config.h
22797   fi
22798 done
22799 EOF
22800 cat >>$CONFIG_STATUS <<\EOF
22801 #
22802 # CONFIG_COMMANDS section.
22803 #
22804 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22805   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22806   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22807
22808   case $ac_dest in
22809     default )
22810 if test "x$cf_with_tests" != xno ; then
22811
22812 for cf_dir in test
22813 do
22814         if test ! -d $srcdir/$cf_dir; then
22815                 continue
22816         elif test -f $srcdir/$cf_dir/programs; then
22817                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22818         fi
22819 done
22820
22821 fi
22822
22823 cf_prefix=$LIB_PREFIX
22824
22825 case $cf_cv_shlib_version in #(vi
22826 cygdll|msysdll|mingw)
22827         TINFO_NAME=$TINFO_ARG_SUFFIX
22828         TINFO_SUFFIX=.dll
22829         ;;
22830 esac
22831
22832 if test -n "$TINFO_SUFFIX" ; then
22833         case $TINFO_SUFFIX in
22834         tw*)
22835                 TINFO_NAME="${TINFO_NAME}tw"
22836                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22837                 ;;
22838         t*)
22839                 TINFO_NAME="${TINFO_NAME}t"
22840                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22841                 ;;
22842         w*)
22843                 TINFO_NAME="${TINFO_NAME}w"
22844                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22845                 ;;
22846         esac
22847 fi
22848
22849 for cf_dir in $SRC_SUBDIRS
22850 do
22851         if test ! -d $srcdir/$cf_dir ; then
22852                 continue
22853         elif test -f $srcdir/$cf_dir/modules; then
22854
22855                 SHARED_LIB=
22856                 Libs_To_Make=
22857                 for cf_item in $cf_LIST_MODELS
22858                 do
22859
22860         case X$cf_item in #(vi
22861         Xlibtool) #(vi
22862                 cf_suffix='.la'
22863                 cf_depsuf=$cf_suffix
22864                 ;;
22865         Xdebug) #(vi
22866                 cf_suffix='_g.a'
22867                 cf_depsuf=$cf_suffix
22868                 ;;
22869         Xprofile) #(vi
22870                 cf_suffix='_p.a'
22871                 cf_depsuf=$cf_suffix
22872                 ;;
22873         Xshared) #(vi
22874                 case $cf_cv_system_name in
22875                 aix[5-7]*) #(vi
22876                         cf_suffix='.so'
22877                         cf_depsuf=$cf_suffix
22878                         ;;
22879                 cygwin*|msys*|mingw*) #(vi
22880                         cf_suffix='.dll'
22881                         cf_depsuf='.dll.a'
22882                         ;;
22883                 darwin*) #(vi
22884                         cf_suffix='.dylib'
22885                         cf_depsuf=$cf_suffix
22886                         ;;
22887                 hpux*) #(vi
22888                         case $target in
22889                         ia64*) #(vi
22890                                 cf_suffix='.so'
22891                                 cf_depsuf=$cf_suffix
22892                                 ;;
22893                         *) #(vi
22894                                 cf_suffix='.sl'
22895                                 cf_depsuf=$cf_suffix
22896                                 ;;
22897                         esac
22898                         ;;
22899                 *) #(vi
22900                         cf_suffix='.so'
22901                         cf_depsuf=$cf_suffix
22902                         ;;
22903                 esac
22904                 ;;
22905         *)
22906                 cf_suffix='.a'
22907                 cf_depsuf=$cf_suffix
22908                 ;;
22909         esac
22910         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22911         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22912
22913                         cf_libname=$cf_dir
22914                         test "$cf_dir" = c++ && cf_libname=ncurses++
22915                         if test $cf_item = shared ; then
22916                                 if test -n "${LIB_SUFFIX}"
22917                                 then
22918                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22919                                 else
22920                                         cf_shared_suffix="$cf_suffix"
22921                                 fi
22922                                 if test "$cf_cv_do_symlinks" = yes ; then
22923                                         cf_version_name=
22924
22925                                         case "$cf_cv_shlib_version" in #(vi
22926                                         rel) #(vi
22927                                                 cf_version_name=REL_VERSION
22928                                                 ;;
22929                                         abi)
22930                                                 cf_version_name=ABI_VERSION
22931                                                 ;;
22932                                         esac
22933
22934                                         if test -n "$cf_version_name"
22935                                         then
22936                                                 case "$cf_cv_system_name" in #(vi
22937                                                 darwin*)
22938                                                         # "w", etc?
22939                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
22940                                                         ;; #(vi
22941                                                 *)
22942                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
22943                                                         ;;
22944                                                 esac
22945                                         fi
22946                                         if test -n "${LIB_SUFFIX}"
22947                                         then
22948                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22949                                         else
22950                                                 cf_shared_suffix="$cf_suffix"
22951                                         fi
22952                                 fi
22953                                 # cygwin needs import library, and has unique naming convention
22954                                 # use autodetected ${cf_prefix} for import lib and static lib, but
22955                                 # use 'cyg' prefix for shared lib.
22956                                 case $cf_cv_shlib_version in #(vi
22957                                 cygdll) #(vi
22958                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22959                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
22960                                         continue
22961                                         ;;
22962                                 msysdll) #(vi
22963                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22964                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
22965                                         continue
22966                                         ;;
22967                                 mingw)
22968                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22969                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
22970                                         continue
22971                                         ;;
22972                                 esac
22973                         fi
22974                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
22975                 done
22976
22977                 if test $cf_dir = ncurses ; then
22978                         cf_subsets="$LIB_SUBSETS"
22979                         cf_r_parts="$cf_subsets"
22980                         cf_liblist="$Libs_To_Make"
22981
22982                         while test -n "$cf_r_parts"
22983                         do
22984                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
22985                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
22986                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
22987                                         cf_item=
22988                                         case $cf_l_parts in #(vi
22989                                         *termlib*) #(vi
22990                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
22991                                                 ;;
22992                                         *ticlib*)
22993                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
22994                                                 ;;
22995                                         *)
22996                                                 break
22997                                                 ;;
22998                                         esac
22999                                         if test -n "$cf_item"; then
23000                                                 Libs_To_Make="$cf_item $Libs_To_Make"
23001                                         fi
23002                                 else
23003                                         break
23004                                 fi
23005                         done
23006                 else
23007                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23008                 fi
23009
23010                 if test $cf_dir = c++; then
23011                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23012                                 cf_list=
23013                                 for cf_item in $Libs_To_Make
23014                                 do
23015                                         case $cf_item in
23016                                         *.a)
23017                                                 ;;
23018                                         *)
23019                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23020                                                 ;;
23021                                         esac
23022                                         for cf_test in $cf_list
23023                                         do
23024                                                 if test "$cf_test" = "$cf_item"
23025                                                 then
23026                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23027                                                         cf_item=
23028                                                         break
23029                                                 fi
23030                                         done
23031                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23032                                 done
23033                                 Libs_To_Make="$cf_list"
23034                         fi
23035                 fi
23036
23037                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23038                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23039                         $cf_dir/Makefile >$cf_dir/Makefile.out
23040                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23041
23042                 $AWK -f $srcdir/mk-0th.awk \
23043                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23044                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23045
23046                 for cf_subset in $cf_subsets
23047                 do
23048                         cf_subdirs=
23049                         for cf_item in $cf_LIST_MODELS
23050                         do
23051
23052                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23053
23054 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23055
23056                         CXX_MODEL=$cf_ITEM
23057                         if test "$CXX_MODEL" = SHARED; then
23058                                 case $cf_cv_shlib_version in #(vi
23059                                 cygdll|msysdll|mingw) #(vi
23060                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23061
23062 echo "${as_me:-configure}:23062: testing overriding CXX_MODEL to SHARED ..." 1>&5
23063
23064                                         with_shared_cxx=yes
23065                                         ;;
23066                                 *)
23067                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23068                                         ;;
23069                                 esac
23070                         fi
23071
23072         case X$cf_item in #(vi
23073         Xlibtool) #(vi
23074                 cf_suffix='.la'
23075                 cf_depsuf=$cf_suffix
23076                 ;;
23077         Xdebug) #(vi
23078                 cf_suffix='_g.a'
23079                 cf_depsuf=$cf_suffix
23080                 ;;
23081         Xprofile) #(vi
23082                 cf_suffix='_p.a'
23083                 cf_depsuf=$cf_suffix
23084                 ;;
23085         Xshared) #(vi
23086                 case $cf_cv_system_name in
23087                 aix[5-7]*) #(vi
23088                         cf_suffix='.so'
23089                         cf_depsuf=$cf_suffix
23090                         ;;
23091                 cygwin*|msys*|mingw*) #(vi
23092                         cf_suffix='.dll'
23093                         cf_depsuf='.dll.a'
23094                         ;;
23095                 darwin*) #(vi
23096                         cf_suffix='.dylib'
23097                         cf_depsuf=$cf_suffix
23098                         ;;
23099                 hpux*) #(vi
23100                         case $target in
23101                         ia64*) #(vi
23102                                 cf_suffix='.so'
23103                                 cf_depsuf=$cf_suffix
23104                                 ;;
23105                         *) #(vi
23106                                 cf_suffix='.sl'
23107                                 cf_depsuf=$cf_suffix
23108                                 ;;
23109                         esac
23110                         ;;
23111                 *) #(vi
23112                         cf_suffix='.so'
23113                         cf_depsuf=$cf_suffix
23114                         ;;
23115                 esac
23116                 ;;
23117         *)
23118                 cf_suffix='.a'
23119                 cf_depsuf=$cf_suffix
23120                 ;;
23121         esac
23122         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23123         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23124
23125         case $cf_item in
23126         libtool) cf_subdir='obj_lo'  ;;
23127         normal)  cf_subdir='objects' ;;
23128         debug)   cf_subdir='obj_g' ;;
23129         profile) cf_subdir='obj_p' ;;
23130         shared)
23131                 case $cf_cv_system_name in #(vi
23132                 cygwin|msys) #(vi
23133                         cf_subdir='objects' ;;
23134                 *)
23135                         cf_subdir='obj_s' ;;
23136                 esac
23137         esac
23138
23139                         # Test for case where we build libtinfo with a different name.
23140                         cf_libname=$cf_dir
23141                         if test $cf_dir = ncurses ; then
23142                                 case $cf_subset in
23143                                 *base*)
23144                                         cf_libname=${cf_libname}$LIB_SUFFIX
23145                                         ;;
23146                                 *termlib*)
23147                                         cf_libname=$TINFO_LIB_SUFFIX
23148                                         ;;
23149                                 ticlib*)
23150                                         cf_libname=$TICS_LIB_SUFFIX
23151                                         ;;
23152                                 esac
23153                         elif test $cf_dir = c++ ; then
23154                                 cf_libname=ncurses++$LIB_SUFFIX
23155                         else
23156                                 cf_libname=${cf_libname}$LIB_SUFFIX
23157                         fi
23158                         if test -n "${DFT_ARG_SUFFIX}" ; then
23159                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23160                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23161                         fi
23162
23163                         # These dependencies really are for development, not
23164                         # builds, but they are useful in porting, too.
23165                         cf_depend="../include/ncurses_cfg.h"
23166                         if test "$srcdir" = "."; then
23167                                 cf_reldir="."
23168                         else
23169                                 cf_reldir="\${srcdir}"
23170                         fi
23171
23172                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23173                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23174                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23175                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23176                         fi
23177
23178                         cf_dir_suffix=
23179                         old_cf_suffix="$cf_suffix"
23180                         if test "$cf_cv_shlib_version_infix" = yes ; then
23181                         if test -n "$LIB_SUFFIX" ; then
23182                                 case $LIB_SUFFIX in
23183                                 tw*)
23184                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23185                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23186                                         cf_dir_suffix=tw
23187                                         ;;
23188                                 t*)
23189                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23190                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23191                                         cf_dir_suffix=t
23192                                         ;;
23193                                 w*)
23194                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23195                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23196                                         cf_dir_suffix=w
23197                                         ;;
23198                                 esac
23199                         fi
23200                         fi
23201
23202                         $AWK -f $srcdir/mk-1st.awk \
23203                                 name=${cf_libname}${cf_dir_suffix} \
23204                                 traces=$LIB_TRACING \
23205                                 MODEL=$cf_ITEM \
23206                                 CXX_MODEL=$CXX_MODEL \
23207                                 model=$cf_subdir \
23208                                 prefix=$cf_prefix \
23209                                 suffix=$cf_suffix \
23210                                 subset=$cf_subset \
23211                                 driver=$cf_cv_term_driver \
23212                                 SymLink="$LN_S" \
23213                                 TermlibRoot=$TINFO_NAME \
23214                                 TermlibSuffix=$TINFO_SUFFIX \
23215                                 ShlibVer=$cf_cv_shlib_version \
23216                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23217                                 ReLink=${cf_cv_do_relink:-no} \
23218                                 DoLinks=$cf_cv_do_symlinks \
23219                                 rmSoLocs=$cf_cv_rm_so_locs \
23220                                 ldconfig="$LDCONFIG" \
23221                                 overwrite=$WITH_OVERWRITE \
23222                                 depend="$cf_depend" \
23223                                 host="$host" \
23224                                 libtool_version="$LIBTOOL_VERSION" \
23225                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23226
23227                         cf_suffix="$old_cf_suffix"
23228
23229                         for cf_subdir2 in $cf_subdirs lib
23230                         do
23231                                 test $cf_subdir = $cf_subdir2 && break
23232                         done
23233                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23234                         $AWK -f $srcdir/mk-2nd.awk \
23235                                 name=$cf_dir \
23236                                 traces=$LIB_TRACING \
23237                                 MODEL=$cf_ITEM \
23238                                 model=$cf_subdir \
23239                                 subset=$cf_subset \
23240                                 srcdir=$srcdir \
23241                                 echo=$WITH_ECHO \
23242                                 crenames=$cf_cv_prog_CC_c_o \
23243                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23244                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23245                         cf_subdirs="$cf_subdirs $cf_subdir"
23246                         done
23247                 done
23248         fi
23249
23250         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23251 done
23252
23253 for cf_dir in $SRC_SUBDIRS
23254 do
23255         if test ! -d $srcdir/$cf_dir ; then
23256                 continue
23257         fi
23258
23259         if test -f $cf_dir/Makefile ; then
23260                 case "$cf_dir" in
23261                 Ada95) #(vi
23262                         echo 'libs \' >> Makefile
23263                         echo 'install.libs \' >> Makefile
23264                         echo 'uninstall.libs ::' >> Makefile
23265                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23266                         ;;
23267                 esac
23268         fi
23269
23270         if test -f $srcdir/$cf_dir/modules; then
23271                 echo >> Makefile
23272                 if test -f $srcdir/$cf_dir/headers; then
23273 cat >> Makefile <<CF_EOF
23274 install.includes \\
23275 uninstall.includes \\
23276 CF_EOF
23277                 fi
23278 if test "$cf_dir" != "c++" ; then
23279 echo 'lint \' >> Makefile
23280 fi
23281 cat >> Makefile <<CF_EOF
23282 libs \\
23283 lintlib \\
23284 install.libs \\
23285 uninstall.libs \\
23286 install.$cf_dir \\
23287 uninstall.$cf_dir ::
23288         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23289 CF_EOF
23290         elif test -f $srcdir/$cf_dir/headers; then
23291 cat >> Makefile <<CF_EOF
23292
23293 libs \\
23294 install.libs \\
23295 uninstall.libs \\
23296 install.includes \\
23297 uninstall.includes ::
23298         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23299 CF_EOF
23300 fi
23301 done
23302
23303 if test "x$cf_with_db_install" = xyes; then
23304 cat >> Makefile <<CF_EOF
23305
23306 install.libs uninstall.libs \\
23307 install.data uninstall.data ::
23308 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23309 CF_EOF
23310 fi
23311
23312 if test "x$cf_with_manpages" = xyes; then
23313 cat >> Makefile <<CF_EOF
23314
23315 install.man \\
23316 uninstall.man ::
23317         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23318 CF_EOF
23319 fi
23320
23321 cat >> Makefile <<CF_EOF
23322
23323 distclean ::
23324         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23325         rm -f headers.sh headers.sed mk_shared_lib.sh
23326         rm -f edit_man.* man_alias.*
23327         rm -rf \${DIRS_TO_MAKE}
23328 CF_EOF
23329
23330 # Special case: tack's manpage lives in its own directory.
23331 if test "x$cf_with_manpages" = xyes; then
23332 if test -d tack ; then
23333 if test -f $srcdir/$tack.h; then
23334 cat >> Makefile <<CF_EOF
23335
23336 install.man \\
23337 uninstall.man ::
23338         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23339 CF_EOF
23340 fi
23341 fi
23342 fi
23343
23344 rm -f headers.sed headers.sh
23345
23346 echo creating headers.sh
23347 cat >headers.sh <<CF_EOF
23348 #! /bin/sh
23349 # This shell script is generated by the 'configure' script.  It is invoked in a
23350 # subdirectory of the build tree.  It generates a sed-script in the parent
23351 # directory that is used to adjust includes for header files that reside in a
23352 # subdirectory of /usr/include, etc.
23353 PRG=""
23354 while test \$# != 3
23355 do
23356 PRG="\$PRG \$1"; shift
23357 done
23358 DST=\$1
23359 REF=\$2
23360 SRC=\$3
23361 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23362 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23363 echo installing \$SRC in \$DST
23364 CF_EOF
23365
23366 if test $WITH_CURSES_H = yes; then
23367         cat >>headers.sh <<CF_EOF
23368 case \$DST in
23369 /*/include/*)
23370         END=\`basename \$DST\`
23371         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23372         do
23373                 NAME=\`basename \$i\`
23374                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23375         done
23376         ;;
23377 *)
23378         echo "" >> \$TMPSED
23379         ;;
23380 esac
23381 CF_EOF
23382
23383 else
23384         cat >>headers.sh <<CF_EOF
23385 case \$DST in
23386 /*/include/*)
23387         END=\`basename \$DST\`
23388         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23389         do
23390                 NAME=\`basename \$i\`
23391                 if test "\$NAME" = "curses.h"
23392                 then
23393                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23394                         NAME=ncurses.h
23395                 fi
23396                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23397         done
23398         ;;
23399 *)
23400         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23401         ;;
23402 esac
23403 CF_EOF
23404 fi
23405 cat >>headers.sh <<CF_EOF
23406 rm -f \$TMPSRC
23407 sed -f \$TMPSED \$SRC > \$TMPSRC
23408 NAME=\`basename \$SRC\`
23409 CF_EOF
23410 if test $WITH_CURSES_H != yes; then
23411         cat >>headers.sh <<CF_EOF
23412 test "\$NAME" = "curses.h" && NAME=ncurses.h
23413 CF_EOF
23414 fi
23415 cat >>headers.sh <<CF_EOF
23416 # Just in case someone gzip'd manpages, remove the conflicting copy.
23417 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23418
23419 eval \$PRG \$TMPSRC \$DST/\$NAME
23420 rm -f \$TMPSRC \$TMPSED
23421 CF_EOF
23422
23423 chmod 0755 headers.sh
23424
23425 for cf_dir in $SRC_SUBDIRS
23426 do
23427         if test ! -d $srcdir/$cf_dir ; then
23428                 continue
23429         fi
23430
23431         if test -f $srcdir/$cf_dir/headers; then
23432                 $AWK -f $srcdir/mk-hdr.awk \
23433                         subset="$LIB_SUBSETS" \
23434                         compat="$WITH_CURSES_H" \
23435                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23436         fi
23437
23438         if test -f $srcdir/$cf_dir/modules; then
23439                 if test "$cf_dir" != "c++" ; then
23440                         cat >>$cf_dir/Makefile <<"CF_EOF"
23441 depend : ${AUTO_SRC}
23442         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23443
23444 # DO NOT DELETE THIS LINE -- make depend depends on it.
23445 CF_EOF
23446                 fi
23447         fi
23448 done
23449
23450 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23451 if test -z "$USE_OLD_MAKERULES" ; then
23452         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23453 fi
23454 fi
23455  ;;
23456   esac
23457 done
23458 EOF
23459
23460 cat >>$CONFIG_STATUS <<\EOF
23461
23462 { (exit 0); exit 0; }
23463 EOF
23464 chmod +x $CONFIG_STATUS
23465 ac_clean_files=$ac_clean_files_save
23466
23467 # configure is writing to config.log, and then calls config.status.
23468 # config.status does its own redirection, appending to config.log.
23469 # Unfortunately, on DOS this fails, as config.log is still kept open
23470 # by configure, so config.status won't be able to write to it; its
23471 # output is simply discarded.  So we exec the FD to /dev/null,
23472 # effectively closing config.log, so it can be properly (re)opened and
23473 # appended to by config.status.  When coming back to configure, we
23474 # need to make the FD available again.
23475 if test "$no_create" != yes; then
23476   ac_cs_success=:
23477   exec 5>/dev/null
23478   $SHELL $CONFIG_STATUS || ac_cs_success=false
23479   exec 5>>config.log
23480   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23481   # would make configure fail if this is the last instruction.
23482   $ac_cs_success || { (exit 1); exit 1; }
23483 fi
23484 ${MAKE:-make} preinstall