]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20151010
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.619 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20150926.
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   --with-pc-suffix        suffixes pc-files
718   --enable-mixed-case     tic should assume mixed-case filenames
719   --with-install-prefix   prefixes actual install-location ($DESTDIR)
720 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
721   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
722   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
723   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
724   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
725   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
726   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
727 Options to Specify the Libraries Built/Used:
728   --disable-libtool-version  enable to use libtool's incompatible naming scheme
729   --with-libtool          generate libraries with libtool
730   --with-shared           generate shared-libraries
731   --with-normal           generate normal-libraries (default)
732   --with-debug            generate debug-libraries (default)
733   --with-profile          generate profile-libraries
734   --with-cxx-shared       generate C++ shared-libraries
735   --with-lib-prefix       override library-prefix
736   --with-termlib          generate separate terminfo library
737   --with-ticlib           generate separate tic library
738   --with-gpm              use Alessandro Rubini's GPM library
739   --without-dlsym         do not use dlsym() to load GPM dynamically
740   --with-sysmouse         use sysmouse (FreeBSD console)
741   --enable-rpath          use rpath option when generating shared libraries
742   --disable-relink        relink shared libraries during install
743   --with-shlib-version=X  Specify rel or abi version for shared libs
744   --with-libtool-opts=XXX specify additional libtool options
745   --with-export-syms=XXX  limit exported symbols using libtool
746   --with-versioned-syms=X markup versioned symbols using ld
747   --disable-lib-suffixes  disable library suffixes
748   --disable-rpath-hack    don't add rpath options for additional libraries
749 Fine-Tuning Your Configuration:
750   --with-extra-suffix=X   append extra suffix to header/library paths
751   --disable-overwrite     put headers in subdir, omit link to -lcurses
752   --disable-database      do not use terminfo, only fallbacks/termcap
753   --with-database=XXX     specify terminfo source to install
754   --with-hashed-db        specify hashed-database library
755   --with-fallbacks=XXX    specify list of fallback terminal descriptions
756   --without-xterm-new     specify if xterm terminfo should be old version
757   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
758   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
759   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
760   --disable-big-core      assume machine has little memory
761   --disable-big-strings   assume compiler has only standard-size strings
762   --enable-termcap        compile in termcap fallback support
763   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
764   --enable-getcap         fast termcap load, no xrefs to terminfo
765   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
766   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
767   --disable-root-environ  restrict environment when running as root
768   --enable-symlinks       make tic use symbolic links not hard links
769   --enable-broken_linker  compile with broken-linker support code
770   --enable-bsdpad         recognize BSD-style prefix padding
771   --enable-widec          compile with wide-char/UTF-8 code
772   --disable-lp64          allow chtype to be long (ignore _LP64)
773   --disable-largefile     omit support for large files
774   --disable-tparm-varargs compile tparm() without varargs interface
775   --disable-tic-depends   link tic library without explicit dependency on ncurses library
776   --with-bool=TYPE        override fallback type of bool variable
777   --with-caps=alt         compile with alternate Caps file
778   --with-chtype=TYPE      override type of chtype
779   --with-ospeed=TYPE      override type of ospeed variable
780   --with-mmask-t=TYPE     override type of mmask_t
781   --with-ccharw-max=XXX   override size CCHARW_MAX
782   --with-tparm-arg=TYPE   override parameter type of tparm
783   --with-rcs-ids          compile-in RCS identifiers
784 Options to Specify How Manpages are Installed:
785   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
786                           optionally formatted/catonly, e.g., gzip,formatted
787   --with-manpage-renames  specify manpage-renaming
788   --with-manpage-aliases  specify manpage-aliases using .so
789   --with-manpage-symlinks specify manpage-aliases using symlinks
790   --with-manpage-tbl      specify manpage processing with tbl
791 Extensions:
792   --disable-ext-funcs     disable function-extensions
793   --enable-sp-funcs       enable SCREEN-extensions
794   --enable-term-driver    enable terminal-driver
795   --enable-const          compile with extra/non-standard const
796   --enable-ext-colors     compile for 256-color support
797   --enable-ext-mouse      compile for extended mouse-encoding
798   --enable-ext-putwin     compile with extended putwin/screendump
799   --enable-no-padding     compile with $NCURSES_NO_PADDING code
800   --enable-signed-char    compile using signed Boolean's in term.h
801   --enable-sigwinch       compile with SIGWINCH handler
802   --enable-tcap-names     compile with user-definable terminal capabilities
803 Development Code:
804   --without-develop       disable development options
805   --enable-hard-tabs      compile with hard-tabs code
806   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
807 Experimental Code:
808   --disable-assumed-color do not assume anything about default-colors
809   --disable-hashmap       compile without hashmap scrolling-optimization
810   --enable-colorfgbg      compile-in experimental $COLORFGBG code
811   --enable-interop        compile-in interop bindings
812   --with-pthread          use POSIX thread library
813   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
814   --enable-weak-symbols   enable weak-symbols for pthreads
815   --enable-reentrant      compile with reentrant code
816   --with-wrap-prefix=XXX  override prefix used for public variables
817   --enable-safe-sprintf   compile with experimental safe-sprintf code
818   --disable-scroll-hints  compile without scroll-hints code
819   --enable-wgetch-events  compile with wgetch-events code
820 Testing/development Options:
821   --disable-echo          do not display "compiling" commands
822   --enable-warnings       build: turn on GCC compiler warnings
823   --enable-string-hacks   work around bogus compiler/loader warnings
824   --enable-assertions     test: turn on generation of assertion code
825   --with-dmalloc          test: use Gray Watson's dmalloc library
826   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
827   --with-valgrind         test: use valgrind
828   --disable-leaks         test: free permanent memory, analyze leaks
829   --enable-expanded       test: generate functions for certain macros
830   --disable-macros        test: use functions rather than macros
831   --with-trace            test: add trace() function to all models of ncurses
832   --disable-gnat-projects test: disable GNAT projects even if usable
833 Ada95 Binding Options:
834   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
835   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
836   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
837   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
838
839 Some influential environment variables:
840   CC          C compiler command
841   CFLAGS      C compiler flags
842   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
843               nonstandard directory <lib dir>
844   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
845               headers in a nonstandard directory <include dir>
846   CPP         C preprocessor
847   CXX         C++ compiler command
848   CXXFLAGS    C++ compiler flags
849   CXXCPP      C++ preprocessor
850
851 Use these variables to override the choices made by `configure' or to help
852 it to find libraries and programs with nonstandard names/locations.
853
854 EOF
855 fi
856
857 if test "$ac_init_help" = "recursive"; then
858   # If there are subdirs, report their specific --help.
859   ac_popdir=`pwd`
860   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
861     cd $ac_subdir
862     # A "../" for each directory in /$ac_subdir.
863     ac_dots=`echo $ac_subdir |
864              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
865
866     case $srcdir in
867     .) # No --srcdir option.  We are building in place.
868       ac_sub_srcdir=$srcdir ;;
869     [\\/]* | ?:[\\/]* ) # Absolute path.
870       ac_sub_srcdir=$srcdir/$ac_subdir ;;
871     *) # Relative path.
872       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
873     esac
874
875     # Check for guested configure; otherwise get Cygnus style configure.
876     if test -f $ac_sub_srcdir/configure.gnu; then
877       echo
878       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
879     elif test -f $ac_sub_srcdir/configure; then
880       echo
881       $SHELL $ac_sub_srcdir/configure  --help=recursive
882     elif test -f $ac_sub_srcdir/configure.ac ||
883            test -f $ac_sub_srcdir/configure.in; then
884       echo
885       $ac_configure --help
886     else
887       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
888     fi
889     cd $ac_popdir
890   done
891 fi
892
893 test -n "$ac_init_help" && exit 0
894 if $ac_init_version; then
895   cat <<\EOF
896
897 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
898 Free Software Foundation, Inc.
899 This configure script is free software; the Free Software Foundation
900 gives unlimited permission to copy, distribute and modify it.
901 EOF
902   exit 0
903 fi
904 exec 5>config.log
905 cat >&5 <<EOF
906 This file contains any messages produced by compilers while
907 running configure, to aid debugging if configure makes a mistake.
908
909 It was created by $as_me, which was
910 generated by GNU Autoconf 2.52.20150926.  Invocation command line was
911
912   $ $0 $@
913
914 EOF
915 {
916 cat <<_ASUNAME
917 ## ---------- ##
918 ## Platform.  ##
919 ## ---------- ##
920
921 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
922 uname -m = `(uname -m) 2>/dev/null || echo unknown`
923 uname -r = `(uname -r) 2>/dev/null || echo unknown`
924 uname -s = `(uname -s) 2>/dev/null || echo unknown`
925 uname -v = `(uname -v) 2>/dev/null || echo unknown`
926
927 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
928 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
929
930 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
931 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
932 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
933 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
934 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
935 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
936 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
937
938 PATH = $PATH
939
940 _ASUNAME
941 } >&5
942
943 cat >&5 <<EOF
944 ## ------------ ##
945 ## Core tests.  ##
946 ## ------------ ##
947
948 EOF
949
950 # Keep a trace of the command line.
951 # Strip out --no-create and --no-recursion so they do not pile up.
952 # Also quote any args containing shell meta-characters.
953 ac_configure_args=
954 ac_sep=
955 for ac_arg
956 do
957   case $ac_arg in
958   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
959   | --no-cr | --no-c) ;;
960   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
962   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
963     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
964     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
965     ac_sep=" " ;;
966   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
967      ac_sep=" " ;;
968   esac
969   # Get rid of the leading space.
970 done
971
972 # When interrupted or exit'd, cleanup temporary files, and complete
973 # config.log.  We remove comments because anyway the quotes in there
974 # would cause problems or look ugly.
975 trap 'exit_status=$?
976   # Save into config.log some information that might help in debugging.
977   echo >&5
978   echo "## ----------------- ##" >&5
979   echo "## Cache variables.  ##" >&5
980   echo "## ----------------- ##" >&5
981   echo >&5
982   # The following way of writing the cache mishandles newlines in values,
983 {
984   (set) 2>&1 |
985     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
986     *ac_space=\ *)
987       sed -n \
988         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
989           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
990       ;;
991     *)
992       sed -n \
993         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
994       ;;
995     esac;
996 } >&5
997   sed "/^$/d" confdefs.h >conftest.log
998   if test -s conftest.log; then
999     echo >&5
1000     echo "## ------------ ##" >&5
1001     echo "## confdefs.h.  ##" >&5
1002     echo "## ------------ ##" >&5
1003     echo >&5
1004     cat conftest.log >&5
1005   fi
1006   (echo; echo) >&5
1007   test "$ac_signal" != 0 &&
1008     echo "$as_me: caught signal $ac_signal" >&5
1009   echo "$as_me: exit $exit_status" >&5
1010   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1011     exit $exit_status
1012      ' 0
1013 for ac_signal in 1 2 13 15; do
1014   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1015 done
1016 ac_signal=0
1017
1018 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1019 rm -rf conftest* confdefs.h
1020 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1021 echo >confdefs.h
1022
1023 # Let the site file select an alternate cache file if it wants to.
1024 # Prefer explicitly selected file to automatically selected ones.
1025 if test -z "$CONFIG_SITE"; then
1026   if test "x$prefix" != xNONE; then
1027     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1028   else
1029     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1030   fi
1031 fi
1032 for ac_site_file in $CONFIG_SITE; do
1033   if test -r "$ac_site_file"; then
1034     { echo "$as_me:1034: loading site script $ac_site_file" >&5
1035 echo "$as_me: loading site script $ac_site_file" >&6;}
1036     cat "$ac_site_file" >&5
1037     . "$ac_site_file"
1038   fi
1039 done
1040
1041 if test -r "$cache_file"; then
1042   # Some versions of bash will fail to source /dev/null (special
1043   # files actually), so we avoid doing that.
1044   if test -f "$cache_file"; then
1045     { echo "$as_me:1045: loading cache $cache_file" >&5
1046 echo "$as_me: loading cache $cache_file" >&6;}
1047     case $cache_file in
1048       [\\/]* | ?:[\\/]* ) . $cache_file;;
1049       *)                      . ./$cache_file;;
1050     esac
1051   fi
1052 else
1053   { echo "$as_me:1053: creating cache $cache_file" >&5
1054 echo "$as_me: creating cache $cache_file" >&6;}
1055   >$cache_file
1056 fi
1057
1058 # Check that the precious variables saved in the cache have kept the same
1059 # value.
1060 ac_cache_corrupted=false
1061 for ac_var in `(set) 2>&1 |
1062                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1063   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1064   eval ac_new_set=\$ac_env_${ac_var}_set
1065   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1066   eval ac_new_val="\$ac_env_${ac_var}_value"
1067   case $ac_old_set,$ac_new_set in
1068     set,)
1069       { echo "$as_me:1069: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1070 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1071       ac_cache_corrupted=: ;;
1072     ,set)
1073       { echo "$as_me:1073: error: \`$ac_var' was not set in the previous run" >&5
1074 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1075       ac_cache_corrupted=: ;;
1076     ,);;
1077     *)
1078       if test "x$ac_old_val" != "x$ac_new_val"; then
1079         { echo "$as_me:1079: error: \`$ac_var' has changed since the previous run:" >&5
1080 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1081         { echo "$as_me:1081:   former value:  $ac_old_val" >&5
1082 echo "$as_me:   former value:  $ac_old_val" >&2;}
1083         { echo "$as_me:1083:   current value: $ac_new_val" >&5
1084 echo "$as_me:   current value: $ac_new_val" >&2;}
1085         ac_cache_corrupted=:
1086       fi;;
1087   esac
1088   # Pass precious variables to config.status.  It doesn't matter if
1089   # we pass some twice (in addition to the command line arguments).
1090   if test "$ac_new_set" = set; then
1091     case $ac_new_val in
1092     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1093       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1094       ac_configure_args="$ac_configure_args '$ac_arg'"
1095       ;;
1096     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1097        ;;
1098     esac
1099   fi
1100 done
1101 if $ac_cache_corrupted; then
1102   { echo "$as_me:1102: error: changes in the environment can compromise the build" >&5
1103 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1104   { { echo "$as_me:1104: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1105 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1106    { (exit 1); exit 1; }; }
1107 fi
1108
1109 ac_ext=c
1110 ac_cpp='$CPP $CPPFLAGS'
1111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1114 ac_main_return=return
1115
1116 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1117   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1118                    ECHO_T='     ' ;;
1119   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1120   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1121 esac
1122 echo "#! $SHELL" >conftest.sh
1123 echo  "exit 0"   >>conftest.sh
1124 chmod +x conftest.sh
1125 if { (echo "$as_me:1125: PATH=\".;.\"; conftest.sh") >&5
1126   (PATH=".;."; conftest.sh) 2>&5
1127   ac_status=$?
1128   echo "$as_me:1128: \$? = $ac_status" >&5
1129   (exit $ac_status); }; then
1130   ac_path_separator=';'
1131 else
1132   ac_path_separator=:
1133 fi
1134 PATH_SEPARATOR="$ac_path_separator"
1135 rm -f conftest.sh
1136
1137 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1138
1139 top_builddir=`pwd`
1140
1141 echo "$as_me:1141: checking for egrep" >&5
1142 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1143 if test "${ac_cv_prog_egrep+set}" = set; then
1144   echo $ECHO_N "(cached) $ECHO_C" >&6
1145 else
1146   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1147                 then ac_cv_prog_egrep='grep -E'
1148                 else ac_cv_prog_egrep='egrep'
1149         fi
1150 fi
1151 echo "$as_me:1151: result: $ac_cv_prog_egrep" >&5
1152 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1153         EGREP=$ac_cv_prog_egrep
1154
1155         test -z "$EGREP" && { { echo "$as_me:1155: error: No egrep program found" >&5
1156 echo "$as_me: error: No egrep program found" >&2;}
1157    { (exit 1); exit 1; }; }
1158
1159 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1160 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1161 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1162 cf_cv_abi_version=${NCURSES_MAJOR}
1163 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1164 cf_cv_timestamp=`date`
1165 echo "$as_me:1165: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1166 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1167
1168 if test -f $srcdir/VERSION ; then
1169         echo "$as_me:1169: checking for package version" >&5
1170 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1171
1172         # if there are not enough fields, cut returns the last one...
1173         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1174         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1175         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1176
1177         # this is how CF_BUNDLED_INTL uses $VERSION:
1178         VERSION="$cf_field1"
1179
1180         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1181         test -z "$VERSION_MAJOR" && { { echo "$as_me:1181: error: missing major-version" >&5
1182 echo "$as_me: error: missing major-version" >&2;}
1183    { (exit 1); exit 1; }; }
1184
1185         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1186         test -z "$VERSION_MINOR" && { { echo "$as_me:1186: error: missing minor-version" >&5
1187 echo "$as_me: error: missing minor-version" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190         echo "$as_me:1190: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1191 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1192
1193         echo "$as_me:1193: checking for package patch date" >&5
1194 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1195         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1196         case .$VERSION_PATCH in
1197         (.)
1198                 { { echo "$as_me:1198: error: missing patch-date $VERSION_PATCH" >&5
1199 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1200    { (exit 1); exit 1; }; }
1201                 ;;
1202         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1203                 ;;
1204         (*)
1205                 { { echo "$as_me:1205: error: illegal patch-date $VERSION_PATCH" >&5
1206 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1207    { (exit 1); exit 1; }; }
1208                 ;;
1209         esac
1210         echo "$as_me:1210: result: $VERSION_PATCH" >&5
1211 echo "${ECHO_T}$VERSION_PATCH" >&6
1212 else
1213         { { echo "$as_me:1213: error: did not find $srcdir/VERSION" >&5
1214 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1215    { (exit 1); exit 1; }; }
1216 fi
1217
1218 # show the actual data that we have for versions:
1219 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1220
1221 echo "${as_me:-configure}:1221: testing ABI VERSION $VERSION ..." 1>&5
1222
1223 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1224
1225 echo "${as_me:-configure}:1225: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1226
1227 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1228
1229 echo "${as_me:-configure}:1229: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1230
1231 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1232
1233 echo "${as_me:-configure}:1233: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1234
1235         cf_PACKAGE=NCURSES
1236         PACKAGE=ncurses
1237
1238 cat >>confdefs.h <<EOF
1239 #define PACKAGE "$PACKAGE"
1240 EOF
1241
1242 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1243
1244         cat >>confdefs.h <<EOF
1245 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1246 EOF
1247
1248         cat >>confdefs.h <<EOF
1249 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1250 EOF
1251
1252 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1253
1254 # Check whether --with-rel-version or --without-rel-version was given.
1255 if test "${with_rel_version+set}" = set; then
1256   withval="$with_rel_version"
1257   { echo "$as_me:1257: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1258 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1259  cf_cv_rel_version=$withval
1260 fi;
1261
1262  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1263  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1264
1265 if test -n "$NCURSES_MAJOR" ; then
1266   case $NCURSES_MAJOR in
1267   ([0-9]*)
1268         ;;
1269   (*)
1270         { { echo "$as_me:1270: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1271 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1272    { (exit 1); exit 1; }; }
1273         ;;
1274   esac
1275 else
1276   { { echo "$as_me:1276: error: Release major-version value is empty" >&5
1277 echo "$as_me: error: Release major-version value is empty" >&2;}
1278    { (exit 1); exit 1; }; }
1279 fi
1280
1281 if test -n "$NCURSES_MINOR" ; then
1282   case $NCURSES_MINOR in
1283   ([0-9]*)
1284         ;;
1285   (*)
1286         { { echo "$as_me:1286: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1287 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1288    { (exit 1); exit 1; }; }
1289         ;;
1290   esac
1291 else
1292   { { echo "$as_me:1292: error: Release minor-version value is empty" >&5
1293 echo "$as_me: error: Release minor-version value is empty" >&2;}
1294    { (exit 1); exit 1; }; }
1295 fi
1296
1297 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1298
1299 # Check whether --with-abi-version or --without-abi-version was given.
1300 if test "${with_abi_version+set}" = set; then
1301   withval="$with_abi_version"
1302
1303         if test "x$cf_cv_abi_version" != "x$withval"
1304         then
1305                 { echo "$as_me:1305: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1306 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1307                 case $cf_cv_rel_version in
1308                 (5.*)
1309                         cf_cv_rel_version=$withval.0
1310                         ;;
1311                 (6.*)
1312                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1313                         ;;
1314                 esac
1315         fi
1316         cf_cv_abi_version=$withval
1317 fi;
1318
1319 if test -n "$cf_cv_abi_version" ; then
1320   case $cf_cv_abi_version in
1321   ([0-9]*)
1322         ;;
1323   (*)
1324         { { echo "$as_me:1324: error: ABI version is not a number: $cf_cv_abi_version" >&5
1325 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1326    { (exit 1); exit 1; }; }
1327         ;;
1328   esac
1329 else
1330   { { echo "$as_me:1330: error: ABI version value is empty" >&5
1331 echo "$as_me: error: ABI version value is empty" >&2;}
1332    { (exit 1); exit 1; }; }
1333 fi
1334
1335 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1336 then
1337         case $cf_cv_rel_version in
1338         (5.*)
1339                 cf_cv_rel_version=$with_abi_version.0
1340                 ;;
1341         esac
1342 fi
1343
1344 ac_aux_dir=
1345 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1346   if test -f $ac_dir/install-sh; then
1347     ac_aux_dir=$ac_dir
1348     ac_install_sh="$ac_aux_dir/install-sh -c"
1349     break
1350   elif test -f $ac_dir/install.sh; then
1351     ac_aux_dir=$ac_dir
1352     ac_install_sh="$ac_aux_dir/install.sh -c"
1353     break
1354   elif test -f $ac_dir/shtool; then
1355     ac_aux_dir=$ac_dir
1356     ac_install_sh="$ac_aux_dir/shtool install -c"
1357     break
1358   fi
1359 done
1360 if test -z "$ac_aux_dir"; then
1361   { { echo "$as_me:1361: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1362 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1363    { (exit 1); exit 1; }; }
1364 fi
1365 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1366 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1367 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1368
1369 # Make sure we can run config.sub.
1370 $ac_config_sub sun4 >/dev/null 2>&1 ||
1371   { { echo "$as_me:1371: error: cannot run $ac_config_sub" >&5
1372 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1373    { (exit 1); exit 1; }; }
1374
1375 echo "$as_me:1375: checking build system type" >&5
1376 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1377 if test "${ac_cv_build+set}" = set; then
1378   echo $ECHO_N "(cached) $ECHO_C" >&6
1379 else
1380   ac_cv_build_alias=$build_alias
1381 test -z "$ac_cv_build_alias" &&
1382   ac_cv_build_alias=`$ac_config_guess`
1383 test -z "$ac_cv_build_alias" &&
1384   { { echo "$as_me:1384: error: cannot guess build type; you must specify one" >&5
1385 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1386    { (exit 1); exit 1; }; }
1387 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1388   { { echo "$as_me:1388: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1389 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1390    { (exit 1); exit 1; }; }
1391
1392 fi
1393 echo "$as_me:1393: result: $ac_cv_build" >&5
1394 echo "${ECHO_T}$ac_cv_build" >&6
1395 build=$ac_cv_build
1396 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1399
1400 echo "$as_me:1400: checking host system type" >&5
1401 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1402 if test "${ac_cv_host+set}" = set; then
1403   echo $ECHO_N "(cached) $ECHO_C" >&6
1404 else
1405   ac_cv_host_alias=$host_alias
1406 test -z "$ac_cv_host_alias" &&
1407   ac_cv_host_alias=$ac_cv_build_alias
1408 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1409   { { echo "$as_me:1409: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1410 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1411    { (exit 1); exit 1; }; }
1412
1413 fi
1414 echo "$as_me:1414: result: $ac_cv_host" >&5
1415 echo "${ECHO_T}$ac_cv_host" >&6
1416 host=$ac_cv_host
1417 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1418 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1419 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1420
1421 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1422         echo "$as_me:1422: checking target system type" >&5
1423 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1424 if test "${ac_cv_target+set}" = set; then
1425   echo $ECHO_N "(cached) $ECHO_C" >&6
1426 else
1427   ac_cv_target_alias=$target_alias
1428 test "x$ac_cv_target_alias" = "x" &&
1429   ac_cv_target_alias=$ac_cv_host_alias
1430 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1431   { { echo "$as_me:1431: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1432 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1433    { (exit 1); exit 1; }; }
1434
1435 fi
1436 echo "$as_me:1436: result: $ac_cv_target" >&5
1437 echo "${ECHO_T}$ac_cv_target" >&6
1438 target=$ac_cv_target
1439 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1442
1443 # The aliases save the names the user supplied, while $host etc.
1444 # will get canonicalized.
1445 test -n "$target_alias" &&
1446   test "$program_prefix$program_suffix$program_transform_name" = \
1447     NONENONEs,x,x, &&
1448   program_prefix=${target_alias}-
1449         system_name="$host_os"
1450 else
1451         system_name="`(uname -s -r) 2>/dev/null`"
1452         if test -z "$system_name" ; then
1453                 system_name="`(hostname) 2>/dev/null`"
1454         fi
1455 fi
1456 test -n "$system_name" &&
1457 cat >>confdefs.h <<EOF
1458 #define SYSTEM_NAME "$system_name"
1459 EOF
1460
1461 if test "${cf_cv_system_name+set}" = set; then
1462   echo $ECHO_N "(cached) $ECHO_C" >&6
1463 else
1464   cf_cv_system_name="$system_name"
1465 fi
1466
1467 test -z "$system_name" && system_name="$cf_cv_system_name"
1468 test -n "$cf_cv_system_name" && echo "$as_me:1468: result: Configuring for $cf_cv_system_name" >&5
1469 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1470
1471 if test ".$system_name" != ".$cf_cv_system_name" ; then
1472         echo "$as_me:1472: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1473 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1474         { { echo "$as_me:1474: error: \"Please remove config.cache and try again.\"" >&5
1475 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1476    { (exit 1); exit 1; }; }
1477 fi
1478
1479 # Check whether --with-system-type or --without-system-type was given.
1480 if test "${with_system_type+set}" = set; then
1481   withval="$with_system_type"
1482   { echo "$as_me:1482: WARNING: overriding system type to $withval" >&5
1483 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1484         cf_cv_system_name=$withval
1485         host_os=$withval
1486
1487 fi;
1488
1489 ###     Save the given $CFLAGS to allow user-override.
1490 cf_user_CFLAGS="$CFLAGS"
1491
1492 ###     Default install-location
1493
1494 echo "$as_me:1494: checking for prefix" >&5
1495 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1496 if test "x$prefix" = "xNONE" ; then
1497         case "$cf_cv_system_name" in
1498                 # non-vendor systems don't have a conflict
1499         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1500                 prefix=/usr
1501                 ;;
1502         (*)     prefix=$ac_default_prefix
1503                 ;;
1504         esac
1505 fi
1506 echo "$as_me:1506: result: $prefix" >&5
1507 echo "${ECHO_T}$prefix" >&6
1508
1509 if test "x$prefix" = "xNONE" ; then
1510 echo "$as_me:1510: checking for default include-directory" >&5
1511 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1512 test -n "$verbose" && echo 1>&6
1513 for cf_symbol in \
1514         $includedir \
1515         $includedir/ncurses \
1516         $prefix/include \
1517         $prefix/include/ncurses \
1518         /usr/local/include \
1519         /usr/local/include/ncurses \
1520         /usr/include \
1521         /usr/include/ncurses
1522 do
1523         cf_dir=`eval echo $cf_symbol`
1524         if test -f $cf_dir/curses.h ; then
1525         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1526                 includedir="$cf_symbol"
1527                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1528                 break
1529         fi
1530         fi
1531         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1532 done
1533 echo "$as_me:1533: result: $includedir" >&5
1534 echo "${ECHO_T}$includedir" >&6
1535 fi
1536
1537 ### Defaults for ncurses ABI
1538
1539 case x$cf_cv_abi_version in
1540 (x[6789])
1541         cf_dft_ext_colors=yes
1542         cf_dft_ext_const=yes
1543         cf_dft_ext_mouse=yes
1544         cf_dft_ext_putwin=yes
1545         cf_dft_ext_spfuncs=yes
1546         cf_dft_filter_syms=yes
1547         cf_dft_chtype=uint32_t
1548         cf_dft_mmask_t=uint32_t
1549         cf_dft_interop=yes
1550         cf_dft_tparm_arg=intptr_t
1551         cf_dft_with_lp64=yes
1552         ;;
1553 (*)
1554         cf_dft_ext_colors=no
1555         cf_dft_ext_const=no
1556         cf_dft_ext_mouse=no
1557         cf_dft_ext_putwin=no
1558         cf_dft_ext_spfuncs=no
1559         cf_dft_filter_syms=no
1560         cf_dft_chtype=auto
1561         cf_dft_mmask_t=auto
1562         cf_dft_interop=no
1563         cf_dft_tparm_arg=long
1564         cf_dft_with_lp64=no
1565         ;;
1566 esac
1567
1568 ###     Checks for programs.
1569
1570 # Check whether --with-ada or --without-ada was given.
1571 if test "${with_ada+set}" = set; then
1572   withval="$with_ada"
1573   cf_with_ada=$withval
1574 else
1575   cf_with_ada=yes
1576 fi;
1577 if test "x$cf_with_ada" = xyes
1578 then
1579         cf_PROG_CC="gnatgcc gcc cc"
1580 else
1581         cf_PROG_CC="gcc cc"
1582 fi
1583
1584 ac_ext=c
1585 ac_cpp='$CPP $CPPFLAGS'
1586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1589 ac_main_return=return
1590 if test -n "$ac_tool_prefix"; then
1591   for ac_prog in $cf_PROG_CC
1592   do
1593     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1594 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1595 echo "$as_me:1595: checking for $ac_word" >&5
1596 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1597 if test "${ac_cv_prog_CC+set}" = set; then
1598   echo $ECHO_N "(cached) $ECHO_C" >&6
1599 else
1600   if test -n "$CC"; then
1601   ac_cv_prog_CC="$CC" # Let the user override the test.
1602 else
1603   ac_save_IFS=$IFS; IFS=$ac_path_separator
1604 ac_dummy="$PATH"
1605 for ac_dir in $ac_dummy; do
1606   IFS=$ac_save_IFS
1607   test -z "$ac_dir" && ac_dir=.
1608   $as_executable_p "$ac_dir/$ac_word" || continue
1609 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1610 echo "$as_me:1610: found $ac_dir/$ac_word" >&5
1611 break
1612 done
1613
1614 fi
1615 fi
1616 CC=$ac_cv_prog_CC
1617 if test -n "$CC"; then
1618   echo "$as_me:1618: result: $CC" >&5
1619 echo "${ECHO_T}$CC" >&6
1620 else
1621   echo "$as_me:1621: result: no" >&5
1622 echo "${ECHO_T}no" >&6
1623 fi
1624
1625     test -n "$CC" && break
1626   done
1627 fi
1628 if test -z "$CC"; then
1629   ac_ct_CC=$CC
1630   for ac_prog in $cf_PROG_CC
1631 do
1632   # Extract the first word of "$ac_prog", so it can be a program name with args.
1633 set dummy $ac_prog; ac_word=$2
1634 echo "$as_me:1634: checking for $ac_word" >&5
1635 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1636 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1637   echo $ECHO_N "(cached) $ECHO_C" >&6
1638 else
1639   if test -n "$ac_ct_CC"; then
1640   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1641 else
1642   ac_save_IFS=$IFS; IFS=$ac_path_separator
1643 ac_dummy="$PATH"
1644 for ac_dir in $ac_dummy; do
1645   IFS=$ac_save_IFS
1646   test -z "$ac_dir" && ac_dir=.
1647   $as_executable_p "$ac_dir/$ac_word" || continue
1648 ac_cv_prog_ac_ct_CC="$ac_prog"
1649 echo "$as_me:1649: found $ac_dir/$ac_word" >&5
1650 break
1651 done
1652
1653 fi
1654 fi
1655 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1656 if test -n "$ac_ct_CC"; then
1657   echo "$as_me:1657: result: $ac_ct_CC" >&5
1658 echo "${ECHO_T}$ac_ct_CC" >&6
1659 else
1660   echo "$as_me:1660: result: no" >&5
1661 echo "${ECHO_T}no" >&6
1662 fi
1663
1664   test -n "$ac_ct_CC" && break
1665 done
1666
1667   CC=$ac_ct_CC
1668 fi
1669
1670 test -z "$CC" && { { echo "$as_me:1670: error: no acceptable cc found in \$PATH" >&5
1671 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1672    { (exit 1); exit 1; }; }
1673
1674 # Provide some information about the compiler.
1675 echo "$as_me:1675:" \
1676      "checking for C compiler version" >&5
1677 ac_compiler=`set X $ac_compile; echo $2`
1678 { (eval echo "$as_me:1678: \"$ac_compiler --version </dev/null >&5\"") >&5
1679   (eval $ac_compiler --version </dev/null >&5) 2>&5
1680   ac_status=$?
1681   echo "$as_me:1681: \$? = $ac_status" >&5
1682   (exit $ac_status); }
1683 { (eval echo "$as_me:1683: \"$ac_compiler -v </dev/null >&5\"") >&5
1684   (eval $ac_compiler -v </dev/null >&5) 2>&5
1685   ac_status=$?
1686   echo "$as_me:1686: \$? = $ac_status" >&5
1687   (exit $ac_status); }
1688 { (eval echo "$as_me:1688: \"$ac_compiler -V </dev/null >&5\"") >&5
1689   (eval $ac_compiler -V </dev/null >&5) 2>&5
1690   ac_status=$?
1691   echo "$as_me:1691: \$? = $ac_status" >&5
1692   (exit $ac_status); }
1693
1694 cat >conftest.$ac_ext <<_ACEOF
1695 #line 1695 "configure"
1696 #include "confdefs.h"
1697
1698 int
1699 main ()
1700 {
1701
1702   ;
1703   return 0;
1704 }
1705 _ACEOF
1706 ac_clean_files_save=$ac_clean_files
1707 ac_clean_files="$ac_clean_files a.out a.exe"
1708 # Try to create an executable without -o first, disregard a.out.
1709 # It will help us diagnose broken compilers, and finding out an intuition
1710 # of exeext.
1711 echo "$as_me:1711: checking for C compiler default output" >&5
1712 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1713 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1714 if { (eval echo "$as_me:1714: \"$ac_link_default\"") >&5
1715   (eval $ac_link_default) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }; then
1719   # Find the output, starting from the most likely.  This scheme is
1720 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1721 # resort.
1722 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1723                 ls a.out conftest 2>/dev/null;
1724                 ls a.* conftest.* 2>/dev/null`; do
1725   case $ac_file in
1726     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1727     a.out ) # We found the default executable, but exeext='' is most
1728             # certainly right.
1729             break;;
1730     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1731           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1732           export ac_cv_exeext
1733           break;;
1734     * ) break;;
1735   esac
1736 done
1737 else
1738   echo "$as_me: failed program was:" >&5
1739 cat conftest.$ac_ext >&5
1740 { { echo "$as_me:1740: error: C compiler cannot create executables" >&5
1741 echo "$as_me: error: C compiler cannot create executables" >&2;}
1742    { (exit 77); exit 77; }; }
1743 fi
1744
1745 ac_exeext=$ac_cv_exeext
1746 echo "$as_me:1746: result: $ac_file" >&5
1747 echo "${ECHO_T}$ac_file" >&6
1748
1749 # Check the compiler produces executables we can run.  If not, either
1750 # the compiler is broken, or we cross compile.
1751 echo "$as_me:1751: checking whether the C compiler works" >&5
1752 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1753 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1754 # If not cross compiling, check that we can run a simple program.
1755 if test "$cross_compiling" != yes; then
1756   if { ac_try='./$ac_file'
1757   { (eval echo "$as_me:1757: \"$ac_try\"") >&5
1758   (eval $ac_try) 2>&5
1759   ac_status=$?
1760   echo "$as_me:1760: \$? = $ac_status" >&5
1761   (exit $ac_status); }; }; then
1762     cross_compiling=no
1763   else
1764     if test "$cross_compiling" = maybe; then
1765         cross_compiling=yes
1766     else
1767         { { echo "$as_me:1767: error: cannot run C compiled programs.
1768 If you meant to cross compile, use \`--host'." >&5
1769 echo "$as_me: error: cannot run C compiled programs.
1770 If you meant to cross compile, use \`--host'." >&2;}
1771    { (exit 1); exit 1; }; }
1772     fi
1773   fi
1774 fi
1775 echo "$as_me:1775: result: yes" >&5
1776 echo "${ECHO_T}yes" >&6
1777
1778 rm -f a.out a.exe conftest$ac_cv_exeext
1779 ac_clean_files=$ac_clean_files_save
1780 # Check the compiler produces executables we can run.  If not, either
1781 # the compiler is broken, or we cross compile.
1782 echo "$as_me:1782: checking whether we are cross compiling" >&5
1783 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1784 echo "$as_me:1784: result: $cross_compiling" >&5
1785 echo "${ECHO_T}$cross_compiling" >&6
1786
1787 echo "$as_me:1787: checking for executable suffix" >&5
1788 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1789 if { (eval echo "$as_me:1789: \"$ac_link\"") >&5
1790   (eval $ac_link) 2>&5
1791   ac_status=$?
1792   echo "$as_me:1792: \$? = $ac_status" >&5
1793   (exit $ac_status); }; then
1794   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1795 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1796 # work properly (i.e., refer to `conftest.exe'), while it won't with
1797 # `rm'.
1798 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1799   case $ac_file in
1800     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1801     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1802           export ac_cv_exeext
1803           break;;
1804     * ) break;;
1805   esac
1806 done
1807 else
1808   { { echo "$as_me:1808: error: cannot compute EXEEXT: cannot compile and link" >&5
1809 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1810    { (exit 1); exit 1; }; }
1811 fi
1812
1813 rm -f conftest$ac_cv_exeext
1814 echo "$as_me:1814: result: $ac_cv_exeext" >&5
1815 echo "${ECHO_T}$ac_cv_exeext" >&6
1816
1817 rm -f conftest.$ac_ext
1818 EXEEXT=$ac_cv_exeext
1819 ac_exeext=$EXEEXT
1820 echo "$as_me:1820: checking for object suffix" >&5
1821 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1822 if test "${ac_cv_objext+set}" = set; then
1823   echo $ECHO_N "(cached) $ECHO_C" >&6
1824 else
1825   cat >conftest.$ac_ext <<_ACEOF
1826 #line 1826 "configure"
1827 #include "confdefs.h"
1828
1829 int
1830 main ()
1831 {
1832
1833   ;
1834   return 0;
1835 }
1836 _ACEOF
1837 rm -f conftest.o conftest.obj
1838 if { (eval echo "$as_me:1838: \"$ac_compile\"") >&5
1839   (eval $ac_compile) 2>&5
1840   ac_status=$?
1841   echo "$as_me:1841: \$? = $ac_status" >&5
1842   (exit $ac_status); }; then
1843   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1844   case $ac_file in
1845     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1846     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1847        break;;
1848   esac
1849 done
1850 else
1851   echo "$as_me: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
1853 { { echo "$as_me:1853: error: cannot compute OBJEXT: cannot compile" >&5
1854 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1855    { (exit 1); exit 1; }; }
1856 fi
1857
1858 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1859 fi
1860 echo "$as_me:1860: result: $ac_cv_objext" >&5
1861 echo "${ECHO_T}$ac_cv_objext" >&6
1862 OBJEXT=$ac_cv_objext
1863 ac_objext=$OBJEXT
1864 echo "$as_me:1864: checking whether we are using the GNU C compiler" >&5
1865 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1866 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1867   echo $ECHO_N "(cached) $ECHO_C" >&6
1868 else
1869   cat >conftest.$ac_ext <<_ACEOF
1870 #line 1870 "configure"
1871 #include "confdefs.h"
1872
1873 int
1874 main ()
1875 {
1876 #ifndef __GNUC__
1877        choke me
1878 #endif
1879
1880   ;
1881   return 0;
1882 }
1883 _ACEOF
1884 rm -f conftest.$ac_objext
1885 if { (eval echo "$as_me:1885: \"$ac_compile\"") >&5
1886   (eval $ac_compile) 2>&5
1887   ac_status=$?
1888   echo "$as_me:1888: \$? = $ac_status" >&5
1889   (exit $ac_status); } &&
1890          { ac_try='test -s conftest.$ac_objext'
1891   { (eval echo "$as_me:1891: \"$ac_try\"") >&5
1892   (eval $ac_try) 2>&5
1893   ac_status=$?
1894   echo "$as_me:1894: \$? = $ac_status" >&5
1895   (exit $ac_status); }; }; then
1896   ac_compiler_gnu=yes
1897 else
1898   echo "$as_me: failed program was:" >&5
1899 cat conftest.$ac_ext >&5
1900 ac_compiler_gnu=no
1901 fi
1902 rm -f conftest.$ac_objext conftest.$ac_ext
1903 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1904
1905 fi
1906 echo "$as_me:1906: result: $ac_cv_c_compiler_gnu" >&5
1907 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1908 GCC=`test $ac_compiler_gnu = yes && echo yes`
1909 ac_test_CFLAGS=${CFLAGS+set}
1910 ac_save_CFLAGS=$CFLAGS
1911 CFLAGS="-g"
1912 echo "$as_me:1912: checking whether $CC accepts -g" >&5
1913 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1914 if test "${ac_cv_prog_cc_g+set}" = set; then
1915   echo $ECHO_N "(cached) $ECHO_C" >&6
1916 else
1917   cat >conftest.$ac_ext <<_ACEOF
1918 #line 1918 "configure"
1919 #include "confdefs.h"
1920
1921 int
1922 main ()
1923 {
1924
1925   ;
1926   return 0;
1927 }
1928 _ACEOF
1929 rm -f conftest.$ac_objext
1930 if { (eval echo "$as_me:1930: \"$ac_compile\"") >&5
1931   (eval $ac_compile) 2>&5
1932   ac_status=$?
1933   echo "$as_me:1933: \$? = $ac_status" >&5
1934   (exit $ac_status); } &&
1935          { ac_try='test -s conftest.$ac_objext'
1936   { (eval echo "$as_me:1936: \"$ac_try\"") >&5
1937   (eval $ac_try) 2>&5
1938   ac_status=$?
1939   echo "$as_me:1939: \$? = $ac_status" >&5
1940   (exit $ac_status); }; }; then
1941   ac_cv_prog_cc_g=yes
1942 else
1943   echo "$as_me: failed program was:" >&5
1944 cat conftest.$ac_ext >&5
1945 ac_cv_prog_cc_g=no
1946 fi
1947 rm -f conftest.$ac_objext conftest.$ac_ext
1948 fi
1949 echo "$as_me:1949: result: $ac_cv_prog_cc_g" >&5
1950 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1951 if test "$ac_test_CFLAGS" = set; then
1952   CFLAGS=$ac_save_CFLAGS
1953 elif test $ac_cv_prog_cc_g = yes; then
1954   if test "$GCC" = yes; then
1955     CFLAGS="-g -O2"
1956   else
1957     CFLAGS="-g"
1958   fi
1959 else
1960   if test "$GCC" = yes; then
1961     CFLAGS="-O2"
1962   else
1963     CFLAGS=
1964   fi
1965 fi
1966 # Some people use a C++ compiler to compile C.  Since we use `exit',
1967 # in C++ we need to declare it.  In case someone uses the same compiler
1968 # for both compiling C and C++ we need to have the C++ compiler decide
1969 # the declaration of exit, since it's the most demanding environment.
1970 cat >conftest.$ac_ext <<_ACEOF
1971 #ifndef __cplusplus
1972   choke me
1973 #endif
1974 _ACEOF
1975 rm -f conftest.$ac_objext
1976 if { (eval echo "$as_me:1976: \"$ac_compile\"") >&5
1977   (eval $ac_compile) 2>&5
1978   ac_status=$?
1979   echo "$as_me:1979: \$? = $ac_status" >&5
1980   (exit $ac_status); } &&
1981          { ac_try='test -s conftest.$ac_objext'
1982   { (eval echo "$as_me:1982: \"$ac_try\"") >&5
1983   (eval $ac_try) 2>&5
1984   ac_status=$?
1985   echo "$as_me:1985: \$? = $ac_status" >&5
1986   (exit $ac_status); }; }; then
1987   for ac_declaration in \
1988    ''\
1989    '#include <stdlib.h>' \
1990    'extern "C" void std::exit (int) throw (); using std::exit;' \
1991    'extern "C" void std::exit (int); using std::exit;' \
1992    'extern "C" void exit (int) throw ();' \
1993    'extern "C" void exit (int);' \
1994    'void exit (int);'
1995 do
1996   cat >conftest.$ac_ext <<_ACEOF
1997 #line 1997 "configure"
1998 #include "confdefs.h"
1999 #include <stdlib.h>
2000 $ac_declaration
2001 int
2002 main ()
2003 {
2004 exit (42);
2005   ;
2006   return 0;
2007 }
2008 _ACEOF
2009 rm -f conftest.$ac_objext
2010 if { (eval echo "$as_me:2010: \"$ac_compile\"") >&5
2011   (eval $ac_compile) 2>&5
2012   ac_status=$?
2013   echo "$as_me:2013: \$? = $ac_status" >&5
2014   (exit $ac_status); } &&
2015          { ac_try='test -s conftest.$ac_objext'
2016   { (eval echo "$as_me:2016: \"$ac_try\"") >&5
2017   (eval $ac_try) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); }; }; then
2021   :
2022 else
2023   echo "$as_me: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
2025 continue
2026 fi
2027 rm -f conftest.$ac_objext conftest.$ac_ext
2028   cat >conftest.$ac_ext <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031 $ac_declaration
2032 int
2033 main ()
2034 {
2035 exit (42);
2036   ;
2037   return 0;
2038 }
2039 _ACEOF
2040 rm -f conftest.$ac_objext
2041 if { (eval echo "$as_me:2041: \"$ac_compile\"") >&5
2042   (eval $ac_compile) 2>&5
2043   ac_status=$?
2044   echo "$as_me:2044: \$? = $ac_status" >&5
2045   (exit $ac_status); } &&
2046          { ac_try='test -s conftest.$ac_objext'
2047   { (eval echo "$as_me:2047: \"$ac_try\"") >&5
2048   (eval $ac_try) 2>&5
2049   ac_status=$?
2050   echo "$as_me:2050: \$? = $ac_status" >&5
2051   (exit $ac_status); }; }; then
2052   break
2053 else
2054   echo "$as_me: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 fi
2057 rm -f conftest.$ac_objext conftest.$ac_ext
2058 done
2059 rm -rf conftest*
2060 if test -n "$ac_declaration"; then
2061   echo '#ifdef __cplusplus' >>confdefs.h
2062   echo $ac_declaration      >>confdefs.h
2063   echo '#endif'             >>confdefs.h
2064 fi
2065
2066 else
2067   echo "$as_me: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
2069 fi
2070 rm -f conftest.$ac_objext conftest.$ac_ext
2071 ac_ext=c
2072 ac_cpp='$CPP $CPPFLAGS'
2073 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2074 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2075 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2076 ac_main_return=return
2077
2078 GCC_VERSION=none
2079 if test "$GCC" = yes ; then
2080         echo "$as_me:2080: checking version of $CC" >&5
2081 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2082         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.].*//'`"
2083         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2084         echo "$as_me:2084: result: $GCC_VERSION" >&5
2085 echo "${ECHO_T}$GCC_VERSION" >&6
2086 fi
2087
2088 echo "$as_me:2088: checking for $CC option to accept ANSI C" >&5
2089 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2090 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2091   echo $ECHO_N "(cached) $ECHO_C" >&6
2092 else
2093   ac_cv_prog_cc_stdc=no
2094 ac_save_CC=$CC
2095 cat >conftest.$ac_ext <<_ACEOF
2096 #line 2096 "configure"
2097 #include "confdefs.h"
2098 #include <stdarg.h>
2099 #include <stdio.h>
2100 #include <sys/types.h>
2101 #include <sys/stat.h>
2102 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2103 struct buf { int x; };
2104 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2105 static char *e (p, i)
2106      char **p;
2107      int i;
2108 {
2109   return p[i];
2110 }
2111 static char *f (char * (*g) (char **, int), char **p, ...)
2112 {
2113   char *s;
2114   va_list v;
2115   va_start (v,p);
2116   s = g (p, va_arg (v,int));
2117   va_end (v);
2118   return s;
2119 }
2120 int test (int i, double x);
2121 struct s1 {int (*f) (int a);};
2122 struct s2 {int (*f) (double a);};
2123 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2124 int argc;
2125 char **argv;
2126 int
2127 main ()
2128 {
2129 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2130   ;
2131   return 0;
2132 }
2133 _ACEOF
2134 # Don't try gcc -ansi; that turns off useful extensions and
2135 # breaks some systems' header files.
2136 # AIX                   -qlanglvl=ansi
2137 # Ultrix and OSF/1      -std1
2138 # HP-UX 10.20 and later -Ae
2139 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2140 # SVR4                  -Xc -D__EXTENSIONS__
2141 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2142 do
2143   CC="$ac_save_CC $ac_arg"
2144   rm -f conftest.$ac_objext
2145 if { (eval echo "$as_me:2145: \"$ac_compile\"") >&5
2146   (eval $ac_compile) 2>&5
2147   ac_status=$?
2148   echo "$as_me:2148: \$? = $ac_status" >&5
2149   (exit $ac_status); } &&
2150          { ac_try='test -s conftest.$ac_objext'
2151   { (eval echo "$as_me:2151: \"$ac_try\"") >&5
2152   (eval $ac_try) 2>&5
2153   ac_status=$?
2154   echo "$as_me:2154: \$? = $ac_status" >&5
2155   (exit $ac_status); }; }; then
2156   ac_cv_prog_cc_stdc=$ac_arg
2157 break
2158 else
2159   echo "$as_me: failed program was:" >&5
2160 cat conftest.$ac_ext >&5
2161 fi
2162 rm -f conftest.$ac_objext
2163 done
2164 rm -f conftest.$ac_ext conftest.$ac_objext
2165 CC=$ac_save_CC
2166
2167 fi
2168
2169 case "x$ac_cv_prog_cc_stdc" in
2170   x|xno)
2171     echo "$as_me:2171: result: none needed" >&5
2172 echo "${ECHO_T}none needed" >&6 ;;
2173   *)
2174     echo "$as_me:2174: result: $ac_cv_prog_cc_stdc" >&5
2175 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2176     CC="$CC $ac_cv_prog_cc_stdc" ;;
2177 esac
2178
2179 # This should have been defined by AC_PROG_CC
2180 : ${CC:=cc}
2181
2182 echo "$as_me:2182: checking \$CC variable" >&5
2183 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2184 case "$CC" in
2185 (*[\ \  ]-[IUD]*)
2186         echo "$as_me:2186: result: broken" >&5
2187 echo "${ECHO_T}broken" >&6
2188         { echo "$as_me:2188: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2189 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2190         # humor him...
2191         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2192         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2193
2194 cf_fix_cppflags=no
2195 cf_new_cflags=
2196 cf_new_cppflags=
2197 cf_new_extra_cppflags=
2198
2199 for cf_add_cflags in $cf_flags
2200 do
2201 case $cf_fix_cppflags in
2202 (no)
2203         case $cf_add_cflags in
2204         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2205                 case $cf_add_cflags in
2206                 (-D*)
2207                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2208
2209                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2210                                 && test -z "${cf_tst_cflags}" \
2211                                 && cf_fix_cppflags=yes
2212
2213                         if test $cf_fix_cppflags = yes ; then
2214                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2215                                 continue
2216                         elif test "${cf_tst_cflags}" = "\"'" ; then
2217                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2218                                 continue
2219                         fi
2220                         ;;
2221                 esac
2222                 case "$CPPFLAGS" in
2223                 (*$cf_add_cflags)
2224                         ;;
2225                 (*)
2226                         case $cf_add_cflags in
2227                         (-D*)
2228                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2229
2230 CPPFLAGS=`echo "$CPPFLAGS" | \
2231         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2232                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2233
2234                                 ;;
2235                         esac
2236                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2237                         ;;
2238                 esac
2239                 ;;
2240         (*)
2241                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2242                 ;;
2243         esac
2244         ;;
2245 (yes)
2246         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2247
2248         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2249
2250         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2251                 && test -z "${cf_tst_cflags}" \
2252                 && cf_fix_cppflags=no
2253         ;;
2254 esac
2255 done
2256
2257 if test -n "$cf_new_cflags" ; then
2258
2259         CFLAGS="$CFLAGS $cf_new_cflags"
2260 fi
2261
2262 if test -n "$cf_new_cppflags" ; then
2263
2264         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2265 fi
2266
2267 if test -n "$cf_new_extra_cppflags" ; then
2268
2269         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2270 fi
2271
2272         ;;
2273 (*)
2274         echo "$as_me:2274: result: ok" >&5
2275 echo "${ECHO_T}ok" >&6
2276         ;;
2277 esac
2278
2279 ac_ext=c
2280 ac_cpp='$CPP $CPPFLAGS'
2281 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2282 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2283 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2284 ac_main_return=return
2285 echo "$as_me:2285: checking how to run the C preprocessor" >&5
2286 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2287 # On Suns, sometimes $CPP names a directory.
2288 if test -n "$CPP" && test -d "$CPP"; then
2289   CPP=
2290 fi
2291 if test -z "$CPP"; then
2292   if test "${ac_cv_prog_CPP+set}" = set; then
2293   echo $ECHO_N "(cached) $ECHO_C" >&6
2294 else
2295       # Double quotes because CPP needs to be expanded
2296     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2297     do
2298       ac_preproc_ok=false
2299 for ac_c_preproc_warn_flag in '' yes
2300 do
2301   # Use a header file that comes with gcc, so configuring glibc
2302   # with a fresh cross-compiler works.
2303   # On the NeXT, cc -E runs the code through the compiler's parser,
2304   # not just through cpp. "Syntax error" is here to catch this case.
2305   cat >conftest.$ac_ext <<_ACEOF
2306 #line 2306 "configure"
2307 #include "confdefs.h"
2308 #include <assert.h>
2309                      Syntax error
2310 _ACEOF
2311 if { (eval echo "$as_me:2311: \"$ac_cpp conftest.$ac_ext\"") >&5
2312   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2313   ac_status=$?
2314   egrep -v '^ *\+' conftest.er1 >conftest.err
2315   rm -f conftest.er1
2316   cat conftest.err >&5
2317   echo "$as_me:2317: \$? = $ac_status" >&5
2318   (exit $ac_status); } >/dev/null; then
2319   if test -s conftest.err; then
2320     ac_cpp_err=$ac_c_preproc_warn_flag
2321   else
2322     ac_cpp_err=
2323   fi
2324 else
2325   ac_cpp_err=yes
2326 fi
2327 if test -z "$ac_cpp_err"; then
2328   :
2329 else
2330   echo "$as_me: failed program was:" >&5
2331   cat conftest.$ac_ext >&5
2332   # Broken: fails on valid input.
2333 continue
2334 fi
2335 rm -f conftest.err conftest.$ac_ext
2336
2337   # OK, works on sane cases.  Now check whether non-existent headers
2338   # can be detected and how.
2339   cat >conftest.$ac_ext <<_ACEOF
2340 #line 2340 "configure"
2341 #include "confdefs.h"
2342 #include <ac_nonexistent.h>
2343 _ACEOF
2344 if { (eval echo "$as_me:2344: \"$ac_cpp conftest.$ac_ext\"") >&5
2345   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2346   ac_status=$?
2347   egrep -v '^ *\+' conftest.er1 >conftest.err
2348   rm -f conftest.er1
2349   cat conftest.err >&5
2350   echo "$as_me:2350: \$? = $ac_status" >&5
2351   (exit $ac_status); } >/dev/null; then
2352   if test -s conftest.err; then
2353     ac_cpp_err=$ac_c_preproc_warn_flag
2354   else
2355     ac_cpp_err=
2356   fi
2357 else
2358   ac_cpp_err=yes
2359 fi
2360 if test -z "$ac_cpp_err"; then
2361   # Broken: success on invalid input.
2362 continue
2363 else
2364   echo "$as_me: failed program was:" >&5
2365   cat conftest.$ac_ext >&5
2366   # Passes both tests.
2367 ac_preproc_ok=:
2368 break
2369 fi
2370 rm -f conftest.err conftest.$ac_ext
2371
2372 done
2373 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2374 rm -f conftest.err conftest.$ac_ext
2375 if $ac_preproc_ok; then
2376   break
2377 fi
2378
2379     done
2380     ac_cv_prog_CPP=$CPP
2381
2382 fi
2383   CPP=$ac_cv_prog_CPP
2384 else
2385   ac_cv_prog_CPP=$CPP
2386 fi
2387 echo "$as_me:2387: result: $CPP" >&5
2388 echo "${ECHO_T}$CPP" >&6
2389 ac_preproc_ok=false
2390 for ac_c_preproc_warn_flag in '' yes
2391 do
2392   # Use a header file that comes with gcc, so configuring glibc
2393   # with a fresh cross-compiler works.
2394   # On the NeXT, cc -E runs the code through the compiler's parser,
2395   # not just through cpp. "Syntax error" is here to catch this case.
2396   cat >conftest.$ac_ext <<_ACEOF
2397 #line 2397 "configure"
2398 #include "confdefs.h"
2399 #include <assert.h>
2400                      Syntax error
2401 _ACEOF
2402 if { (eval echo "$as_me:2402: \"$ac_cpp conftest.$ac_ext\"") >&5
2403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2404   ac_status=$?
2405   egrep -v '^ *\+' conftest.er1 >conftest.err
2406   rm -f conftest.er1
2407   cat conftest.err >&5
2408   echo "$as_me:2408: \$? = $ac_status" >&5
2409   (exit $ac_status); } >/dev/null; then
2410   if test -s conftest.err; then
2411     ac_cpp_err=$ac_c_preproc_warn_flag
2412   else
2413     ac_cpp_err=
2414   fi
2415 else
2416   ac_cpp_err=yes
2417 fi
2418 if test -z "$ac_cpp_err"; then
2419   :
2420 else
2421   echo "$as_me: failed program was:" >&5
2422   cat conftest.$ac_ext >&5
2423   # Broken: fails on valid input.
2424 continue
2425 fi
2426 rm -f conftest.err conftest.$ac_ext
2427
2428   # OK, works on sane cases.  Now check whether non-existent headers
2429   # can be detected and how.
2430   cat >conftest.$ac_ext <<_ACEOF
2431 #line 2431 "configure"
2432 #include "confdefs.h"
2433 #include <ac_nonexistent.h>
2434 _ACEOF
2435 if { (eval echo "$as_me:2435: \"$ac_cpp conftest.$ac_ext\"") >&5
2436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2437   ac_status=$?
2438   egrep -v '^ *\+' conftest.er1 >conftest.err
2439   rm -f conftest.er1
2440   cat conftest.err >&5
2441   echo "$as_me:2441: \$? = $ac_status" >&5
2442   (exit $ac_status); } >/dev/null; then
2443   if test -s conftest.err; then
2444     ac_cpp_err=$ac_c_preproc_warn_flag
2445   else
2446     ac_cpp_err=
2447   fi
2448 else
2449   ac_cpp_err=yes
2450 fi
2451 if test -z "$ac_cpp_err"; then
2452   # Broken: success on invalid input.
2453 continue
2454 else
2455   echo "$as_me: failed program was:" >&5
2456   cat conftest.$ac_ext >&5
2457   # Passes both tests.
2458 ac_preproc_ok=:
2459 break
2460 fi
2461 rm -f conftest.err conftest.$ac_ext
2462
2463 done
2464 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2465 rm -f conftest.err conftest.$ac_ext
2466 if $ac_preproc_ok; then
2467   :
2468 else
2469   { { echo "$as_me:2469: error: C preprocessor \"$CPP\" fails sanity check" >&5
2470 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2471    { (exit 1); exit 1; }; }
2472 fi
2473
2474 ac_ext=c
2475 ac_cpp='$CPP $CPPFLAGS'
2476 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2477 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2478 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2479 ac_main_return=return
2480
2481 if test $ac_cv_c_compiler_gnu = yes; then
2482     echo "$as_me:2482: checking whether $CC needs -traditional" >&5
2483 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2484 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2485   echo $ECHO_N "(cached) $ECHO_C" >&6
2486 else
2487     ac_pattern="Autoconf.*'x'"
2488   cat >conftest.$ac_ext <<_ACEOF
2489 #line 2489 "configure"
2490 #include "confdefs.h"
2491 #include <sgtty.h>
2492 int Autoconf = TIOCGETP;
2493 _ACEOF
2494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2495   egrep "$ac_pattern" >/dev/null 2>&1; then
2496   ac_cv_prog_gcc_traditional=yes
2497 else
2498   ac_cv_prog_gcc_traditional=no
2499 fi
2500 rm -rf conftest*
2501
2502   if test $ac_cv_prog_gcc_traditional = no; then
2503     cat >conftest.$ac_ext <<_ACEOF
2504 #line 2504 "configure"
2505 #include "confdefs.h"
2506 #include <termio.h>
2507 int Autoconf = TCGETA;
2508 _ACEOF
2509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2510   egrep "$ac_pattern" >/dev/null 2>&1; then
2511   ac_cv_prog_gcc_traditional=yes
2512 fi
2513 rm -rf conftest*
2514
2515   fi
2516 fi
2517 echo "$as_me:2517: result: $ac_cv_prog_gcc_traditional" >&5
2518 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2519   if test $ac_cv_prog_gcc_traditional = yes; then
2520     CC="$CC -traditional"
2521   fi
2522 fi
2523
2524 echo "$as_me:2524: checking whether $CC understands -c and -o together" >&5
2525 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2526 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2527   echo $ECHO_N "(cached) $ECHO_C" >&6
2528 else
2529
2530 cat > conftest.$ac_ext <<CF_EOF
2531 #include <stdio.h>
2532 int main()
2533 {
2534         ${cf_cv_main_return:-return}(0);
2535 }
2536 CF_EOF
2537 # We do the test twice because some compilers refuse to overwrite an
2538 # existing .o file with -o, though they will create one.
2539 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2540 if { (eval echo "$as_me:2540: \"$ac_try\"") >&5
2541   (eval $ac_try) 2>&5
2542   ac_status=$?
2543   echo "$as_me:2543: \$? = $ac_status" >&5
2544   (exit $ac_status); } &&
2545   test -f conftest2.$ac_objext && { (eval echo "$as_me:2545: \"$ac_try\"") >&5
2546   (eval $ac_try) 2>&5
2547   ac_status=$?
2548   echo "$as_me:2548: \$? = $ac_status" >&5
2549   (exit $ac_status); };
2550 then
2551   eval cf_cv_prog_CC_c_o=yes
2552 else
2553   eval cf_cv_prog_CC_c_o=no
2554 fi
2555 rm -rf conftest*
2556
2557 fi
2558 if test $cf_cv_prog_CC_c_o = yes; then
2559   echo "$as_me:2559: result: yes" >&5
2560 echo "${ECHO_T}yes" >&6
2561 else
2562   echo "$as_me:2562: result: no" >&5
2563 echo "${ECHO_T}no" >&6
2564 fi
2565
2566 if test "$cross_compiling" = yes ; then
2567         LDCONFIG=:
2568 else
2569         case "$cf_cv_system_name" in
2570         (dragonfly*|mirbsd*|freebsd*)
2571                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2572                 ;;
2573         (*) LDPATH=$PATH:/sbin:/usr/sbin
2574                 # Extract the first word of "ldconfig", so it can be a program name with args.
2575 set dummy ldconfig; ac_word=$2
2576 echo "$as_me:2576: checking for $ac_word" >&5
2577 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2578 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2579   echo $ECHO_N "(cached) $ECHO_C" >&6
2580 else
2581   case $LDCONFIG in
2582   [\\/]* | ?:[\\/]*)
2583   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2584   ;;
2585   *)
2586   ac_save_IFS=$IFS; IFS=$ac_path_separator
2587 ac_dummy="$LDPATH"
2588 for ac_dir in $ac_dummy; do
2589   IFS=$ac_save_IFS
2590   test -z "$ac_dir" && ac_dir=.
2591   if $as_executable_p "$ac_dir/$ac_word"; then
2592    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2593    echo "$as_me:2593: found $ac_dir/$ac_word" >&5
2594    break
2595 fi
2596 done
2597
2598   ;;
2599 esac
2600 fi
2601 LDCONFIG=$ac_cv_path_LDCONFIG
2602
2603 if test -n "$LDCONFIG"; then
2604   echo "$as_me:2604: result: $LDCONFIG" >&5
2605 echo "${ECHO_T}$LDCONFIG" >&6
2606 else
2607   echo "$as_me:2607: result: no" >&5
2608 echo "${ECHO_T}no" >&6
2609 fi
2610
2611                 ;;
2612         esac
2613 fi
2614
2615 echo "$as_me:2615: checking if you want to ensure bool is consistent with C++" >&5
2616 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2617
2618 # Check whether --with-cxx or --without-cxx was given.
2619 if test "${with_cxx+set}" = set; then
2620   withval="$with_cxx"
2621   cf_with_cxx=$withval
2622 else
2623   cf_with_cxx=yes
2624 fi;
2625 echo "$as_me:2625: result: $cf_with_cxx" >&5
2626 echo "${ECHO_T}$cf_with_cxx" >&6
2627 if test "X$cf_with_cxx" = Xno ; then
2628         CXX=""
2629         GXX=""
2630 else
2631         # with autoconf 2.13, we can change the error to a warning:
2632                 ac_ext=cc
2633 ac_cpp='$CXXCPP $CPPFLAGS'
2634 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2635 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2636 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2637 ac_main_return=return
2638 if test -n "$ac_tool_prefix"; then
2639   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2640   do
2641     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2642 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2643 echo "$as_me:2643: checking for $ac_word" >&5
2644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2645 if test "${ac_cv_prog_CXX+set}" = set; then
2646   echo $ECHO_N "(cached) $ECHO_C" >&6
2647 else
2648   if test -n "$CXX"; then
2649   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2650 else
2651   ac_save_IFS=$IFS; IFS=$ac_path_separator
2652 ac_dummy="$PATH"
2653 for ac_dir in $ac_dummy; do
2654   IFS=$ac_save_IFS
2655   test -z "$ac_dir" && ac_dir=.
2656   $as_executable_p "$ac_dir/$ac_word" || continue
2657 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2658 echo "$as_me:2658: found $ac_dir/$ac_word" >&5
2659 break
2660 done
2661
2662 fi
2663 fi
2664 CXX=$ac_cv_prog_CXX
2665 if test -n "$CXX"; then
2666   echo "$as_me:2666: result: $CXX" >&5
2667 echo "${ECHO_T}$CXX" >&6
2668 else
2669   echo "$as_me:2669: result: no" >&5
2670 echo "${ECHO_T}no" >&6
2671 fi
2672
2673     test -n "$CXX" && break
2674   done
2675 fi
2676 if test -z "$CXX"; then
2677   ac_ct_CXX=$CXX
2678   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2679 do
2680   # Extract the first word of "$ac_prog", so it can be a program name with args.
2681 set dummy $ac_prog; ac_word=$2
2682 echo "$as_me:2682: checking for $ac_word" >&5
2683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2684 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2685   echo $ECHO_N "(cached) $ECHO_C" >&6
2686 else
2687   if test -n "$ac_ct_CXX"; then
2688   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2689 else
2690   ac_save_IFS=$IFS; IFS=$ac_path_separator
2691 ac_dummy="$PATH"
2692 for ac_dir in $ac_dummy; do
2693   IFS=$ac_save_IFS
2694   test -z "$ac_dir" && ac_dir=.
2695   $as_executable_p "$ac_dir/$ac_word" || continue
2696 ac_cv_prog_ac_ct_CXX="$ac_prog"
2697 echo "$as_me:2697: found $ac_dir/$ac_word" >&5
2698 break
2699 done
2700
2701 fi
2702 fi
2703 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2704 if test -n "$ac_ct_CXX"; then
2705   echo "$as_me:2705: result: $ac_ct_CXX" >&5
2706 echo "${ECHO_T}$ac_ct_CXX" >&6
2707 else
2708   echo "$as_me:2708: result: no" >&5
2709 echo "${ECHO_T}no" >&6
2710 fi
2711
2712   test -n "$ac_ct_CXX" && break
2713 done
2714 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2715
2716   CXX=$ac_ct_CXX
2717 fi
2718
2719 # Provide some information about the compiler.
2720 echo "$as_me:2720:" \
2721      "checking for C++ compiler version" >&5
2722 ac_compiler=`set X $ac_compile; echo $2`
2723 { (eval echo "$as_me:2723: \"$ac_compiler --version </dev/null >&5\"") >&5
2724   (eval $ac_compiler --version </dev/null >&5) 2>&5
2725   ac_status=$?
2726   echo "$as_me:2726: \$? = $ac_status" >&5
2727   (exit $ac_status); }
2728 { (eval echo "$as_me:2728: \"$ac_compiler -v </dev/null >&5\"") >&5
2729   (eval $ac_compiler -v </dev/null >&5) 2>&5
2730   ac_status=$?
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); }
2733 { (eval echo "$as_me:2733: \"$ac_compiler -V </dev/null >&5\"") >&5
2734   (eval $ac_compiler -V </dev/null >&5) 2>&5
2735   ac_status=$?
2736   echo "$as_me:2736: \$? = $ac_status" >&5
2737   (exit $ac_status); }
2738
2739 echo "$as_me:2739: checking whether we are using the GNU C++ compiler" >&5
2740 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2741 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2742   echo $ECHO_N "(cached) $ECHO_C" >&6
2743 else
2744   cat >conftest.$ac_ext <<_ACEOF
2745 #line 2745 "configure"
2746 #include "confdefs.h"
2747
2748 int
2749 main ()
2750 {
2751 #ifndef __GNUC__
2752        choke me
2753 #endif
2754
2755   ;
2756   return 0;
2757 }
2758 _ACEOF
2759 rm -f conftest.$ac_objext
2760 if { (eval echo "$as_me:2760: \"$ac_compile\"") >&5
2761   (eval $ac_compile) 2>&5
2762   ac_status=$?
2763   echo "$as_me:2763: \$? = $ac_status" >&5
2764   (exit $ac_status); } &&
2765          { ac_try='test -s conftest.$ac_objext'
2766   { (eval echo "$as_me:2766: \"$ac_try\"") >&5
2767   (eval $ac_try) 2>&5
2768   ac_status=$?
2769   echo "$as_me:2769: \$? = $ac_status" >&5
2770   (exit $ac_status); }; }; then
2771   ac_compiler_gnu=yes
2772 else
2773   echo "$as_me: failed program was:" >&5
2774 cat conftest.$ac_ext >&5
2775 ac_compiler_gnu=no
2776 fi
2777 rm -f conftest.$ac_objext conftest.$ac_ext
2778 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2779
2780 fi
2781 echo "$as_me:2781: result: $ac_cv_cxx_compiler_gnu" >&5
2782 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2783 GXX=`test $ac_compiler_gnu = yes && echo yes`
2784 ac_test_CXXFLAGS=${CXXFLAGS+set}
2785 ac_save_CXXFLAGS=$CXXFLAGS
2786 CXXFLAGS="-g"
2787 echo "$as_me:2787: checking whether $CXX accepts -g" >&5
2788 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2789 if test "${ac_cv_prog_cxx_g+set}" = set; then
2790   echo $ECHO_N "(cached) $ECHO_C" >&6
2791 else
2792   cat >conftest.$ac_ext <<_ACEOF
2793 #line 2793 "configure"
2794 #include "confdefs.h"
2795
2796 int
2797 main ()
2798 {
2799
2800   ;
2801   return 0;
2802 }
2803 _ACEOF
2804 rm -f conftest.$ac_objext
2805 if { (eval echo "$as_me:2805: \"$ac_compile\"") >&5
2806   (eval $ac_compile) 2>&5
2807   ac_status=$?
2808   echo "$as_me:2808: \$? = $ac_status" >&5
2809   (exit $ac_status); } &&
2810          { ac_try='test -s conftest.$ac_objext'
2811   { (eval echo "$as_me:2811: \"$ac_try\"") >&5
2812   (eval $ac_try) 2>&5
2813   ac_status=$?
2814   echo "$as_me:2814: \$? = $ac_status" >&5
2815   (exit $ac_status); }; }; then
2816   ac_cv_prog_cxx_g=yes
2817 else
2818   echo "$as_me: failed program was:" >&5
2819 cat conftest.$ac_ext >&5
2820 ac_cv_prog_cxx_g=no
2821 fi
2822 rm -f conftest.$ac_objext conftest.$ac_ext
2823 fi
2824 echo "$as_me:2824: result: $ac_cv_prog_cxx_g" >&5
2825 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2826 if test "$ac_test_CXXFLAGS" = set; then
2827   CXXFLAGS=$ac_save_CXXFLAGS
2828 elif test $ac_cv_prog_cxx_g = yes; then
2829   if test "$GXX" = yes; then
2830     CXXFLAGS="-g -O2"
2831   else
2832     CXXFLAGS="-g"
2833   fi
2834 else
2835   if test "$GXX" = yes; then
2836     CXXFLAGS="-O2"
2837   else
2838     CXXFLAGS=
2839   fi
2840 fi
2841 for ac_declaration in \
2842    ''\
2843    '#include <stdlib.h>' \
2844    'extern "C" void std::exit (int) throw (); using std::exit;' \
2845    'extern "C" void std::exit (int); using std::exit;' \
2846    'extern "C" void exit (int) throw ();' \
2847    'extern "C" void exit (int);' \
2848    'void exit (int);'
2849 do
2850   cat >conftest.$ac_ext <<_ACEOF
2851 #line 2851 "configure"
2852 #include "confdefs.h"
2853 #include <stdlib.h>
2854 $ac_declaration
2855 int
2856 main ()
2857 {
2858 exit (42);
2859   ;
2860   return 0;
2861 }
2862 _ACEOF
2863 rm -f conftest.$ac_objext
2864 if { (eval echo "$as_me:2864: \"$ac_compile\"") >&5
2865   (eval $ac_compile) 2>&5
2866   ac_status=$?
2867   echo "$as_me:2867: \$? = $ac_status" >&5
2868   (exit $ac_status); } &&
2869          { ac_try='test -s conftest.$ac_objext'
2870   { (eval echo "$as_me:2870: \"$ac_try\"") >&5
2871   (eval $ac_try) 2>&5
2872   ac_status=$?
2873   echo "$as_me:2873: \$? = $ac_status" >&5
2874   (exit $ac_status); }; }; then
2875   :
2876 else
2877   echo "$as_me: failed program was:" >&5
2878 cat conftest.$ac_ext >&5
2879 continue
2880 fi
2881 rm -f conftest.$ac_objext conftest.$ac_ext
2882   cat >conftest.$ac_ext <<_ACEOF
2883 #line 2883 "configure"
2884 #include "confdefs.h"
2885 $ac_declaration
2886 int
2887 main ()
2888 {
2889 exit (42);
2890   ;
2891   return 0;
2892 }
2893 _ACEOF
2894 rm -f conftest.$ac_objext
2895 if { (eval echo "$as_me:2895: \"$ac_compile\"") >&5
2896   (eval $ac_compile) 2>&5
2897   ac_status=$?
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit $ac_status); } &&
2900          { ac_try='test -s conftest.$ac_objext'
2901   { (eval echo "$as_me:2901: \"$ac_try\"") >&5
2902   (eval $ac_try) 2>&5
2903   ac_status=$?
2904   echo "$as_me:2904: \$? = $ac_status" >&5
2905   (exit $ac_status); }; }; then
2906   break
2907 else
2908   echo "$as_me: failed program was:" >&5
2909 cat conftest.$ac_ext >&5
2910 fi
2911 rm -f conftest.$ac_objext conftest.$ac_ext
2912 done
2913 rm -rf conftest*
2914 if test -n "$ac_declaration"; then
2915   echo '#ifdef __cplusplus' >>confdefs.h
2916   echo $ac_declaration      >>confdefs.h
2917   echo '#endif'             >>confdefs.h
2918 fi
2919
2920 ac_ext=c
2921 ac_cpp='$CPP $CPPFLAGS'
2922 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2923 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2924 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2925 ac_main_return=return
2926
2927         ac_ext=cc
2928 ac_cpp='$CXXCPP $CPPFLAGS'
2929 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2930 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2931 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2932 ac_main_return=return
2933
2934         if test "x$cf_with_cxx" != xno
2935         then
2936                 # Several of the C++ configurations do not work, particularly when
2937                 # cross-compiling (20140913 -TD)
2938                 echo "$as_me:2938: checking if $CXX works" >&5
2939 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2940
2941                 save_CPPFLAGS="$CPPFLAGS"
2942                 eval cf_includedir=${includedir}
2943                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2944
2945 cat >conftest.$ac_ext <<_ACEOF
2946 #line 2946 "configure"
2947 #include "confdefs.h"
2948
2949 #include <stdlib.h>
2950 #include <stdio.h>
2951
2952 int
2953 main ()
2954 {
2955
2956                 printf("Hello world!\n")
2957
2958   ;
2959   return 0;
2960 }
2961 _ACEOF
2962 rm -f conftest.$ac_objext
2963 if { (eval echo "$as_me:2963: \"$ac_compile\"") >&5
2964   (eval $ac_compile) 2>&5
2965   ac_status=$?
2966   echo "$as_me:2966: \$? = $ac_status" >&5
2967   (exit $ac_status); } &&
2968          { ac_try='test -s conftest.$ac_objext'
2969   { (eval echo "$as_me:2969: \"$ac_try\"") >&5
2970   (eval $ac_try) 2>&5
2971   ac_status=$?
2972   echo "$as_me:2972: \$? = $ac_status" >&5
2973   (exit $ac_status); }; }; then
2974   cf_cxx_works=yes
2975 else
2976   echo "$as_me: failed program was:" >&5
2977 cat conftest.$ac_ext >&5
2978 cf_cxx_works=no
2979 fi
2980 rm -f conftest.$ac_objext conftest.$ac_ext
2981                 CPPFLAGS="$save_CPPFLAGS"
2982
2983                 echo "$as_me:2983: result: $cf_cxx_works" >&5
2984 echo "${ECHO_T}$cf_cxx_works" >&6
2985                 if test "x$cf_cxx_works" = xno
2986                 then
2987                         { echo "$as_me:2987: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2988 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2989                         cf_with_cxx=no; CXX=""; GXX="";
2990                 fi
2991         fi
2992         ac_ext=c
2993 ac_cpp='$CPP $CPPFLAGS'
2994 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2995 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2996 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2997 ac_main_return=return
2998
2999         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3000         if test "$CXX" = "g++" ; then
3001                 # Extract the first word of "g++", so it can be a program name with args.
3002 set dummy g++; ac_word=$2
3003 echo "$as_me:3003: checking for $ac_word" >&5
3004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3005 if test "${ac_cv_path_CXX+set}" = set; then
3006   echo $ECHO_N "(cached) $ECHO_C" >&6
3007 else
3008   case $CXX in
3009   [\\/]* | ?:[\\/]*)
3010   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3011   ;;
3012   *)
3013   ac_save_IFS=$IFS; IFS=$ac_path_separator
3014 ac_dummy="$PATH"
3015 for ac_dir in $ac_dummy; do
3016   IFS=$ac_save_IFS
3017   test -z "$ac_dir" && ac_dir=.
3018   if $as_executable_p "$ac_dir/$ac_word"; then
3019    ac_cv_path_CXX="$ac_dir/$ac_word"
3020    echo "$as_me:3020: found $ac_dir/$ac_word" >&5
3021    break
3022 fi
3023 done
3024
3025   ;;
3026 esac
3027 fi
3028 CXX=$ac_cv_path_CXX
3029
3030 if test -n "$CXX"; then
3031   echo "$as_me:3031: result: $CXX" >&5
3032 echo "${ECHO_T}$CXX" >&6
3033 else
3034   echo "$as_me:3034: result: no" >&5
3035 echo "${ECHO_T}no" >&6
3036 fi
3037
3038         fi
3039         case "x$CXX" in
3040         (x|xg++)
3041                 { echo "$as_me:3041: WARNING: You don't have any C++ compiler, too bad" >&5
3042 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3043                 cf_with_cxx=no; CXX=""; GXX="";
3044                 ;;
3045         esac
3046 fi
3047
3048 GXX_VERSION=none
3049 if test "$GXX" = yes; then
3050         echo "$as_me:3050: checking version of ${CXX:-g++}" >&5
3051 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3052         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3053         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3054         echo "$as_me:3054: result: $GXX_VERSION" >&5
3055 echo "${ECHO_T}$GXX_VERSION" >&6
3056 fi
3057
3058 case $GXX_VERSION in
3059 (1*|2.[0-6]*)
3060         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3061         # cf_cxx_library=no
3062         { echo "$as_me:3062: WARNING: templates do not work" >&5
3063 echo "$as_me: WARNING: templates do not work" >&2;}
3064         ;;
3065 esac
3066
3067 echo "$as_me:3067: checking if you want to build C++ binding and demo" >&5
3068 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3069
3070 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3071 if test "${with_cxx_binding+set}" = set; then
3072   withval="$with_cxx_binding"
3073   cf_with_cxx_binding=$withval
3074 else
3075   cf_with_cxx_binding=$cf_with_cxx
3076 fi;
3077 echo "$as_me:3077: result: $cf_with_cxx_binding" >&5
3078 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3079
3080 echo "$as_me:3080: checking if you want to build with Ada95" >&5
3081 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3082 echo "$as_me:3082: result: $cf_with_ada" >&5
3083 echo "${ECHO_T}$cf_with_ada" >&6
3084
3085 echo "$as_me:3085: checking if you want to install terminal database" >&5
3086 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3087
3088 # Check whether --enable-db-install or --disable-db-install was given.
3089 if test "${enable_db_install+set}" = set; then
3090   enableval="$enable_db_install"
3091   cf_with_db_install=$enableval
3092 else
3093   cf_with_db_install=yes
3094 fi;
3095 echo "$as_me:3095: result: $cf_with_db_install" >&5
3096 echo "${ECHO_T}$cf_with_db_install" >&6
3097
3098 echo "$as_me:3098: checking if you want to install manpages" >&5
3099 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3100
3101 # Check whether --with-manpages or --without-manpages was given.
3102 if test "${with_manpages+set}" = set; then
3103   withval="$with_manpages"
3104   cf_with_manpages=$withval
3105 else
3106   cf_with_manpages=yes
3107 fi;
3108 echo "$as_me:3108: result: $cf_with_manpages" >&5
3109 echo "${ECHO_T}$cf_with_manpages" >&6
3110
3111 echo "$as_me:3111: checking if you want to build programs such as tic" >&5
3112 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3113
3114 # Check whether --with-progs or --without-progs was given.
3115 if test "${with_progs+set}" = set; then
3116   withval="$with_progs"
3117   cf_with_progs=$withval
3118 else
3119   cf_with_progs=yes
3120 fi;
3121 echo "$as_me:3121: result: $cf_with_progs" >&5
3122 echo "${ECHO_T}$cf_with_progs" >&6
3123
3124 echo "$as_me:3124: checking if you want to build test-programs" >&5
3125 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3126
3127 # Check whether --with-tests or --without-tests was given.
3128 if test "${with_tests+set}" = set; then
3129   withval="$with_tests"
3130   cf_with_tests=$withval
3131 else
3132   cf_with_tests=yes
3133 fi;
3134 echo "$as_me:3134: result: $cf_with_tests" >&5
3135 echo "${ECHO_T}$cf_with_tests" >&6
3136
3137 echo "$as_me:3137: checking if you wish to install curses.h" >&5
3138 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3139
3140 # Check whether --with-curses-h or --without-curses-h was given.
3141 if test "${with_curses_h+set}" = set; then
3142   withval="$with_curses_h"
3143   with_curses_h=$withval
3144 else
3145   with_curses_h=yes
3146 fi;
3147 echo "$as_me:3147: result: $with_curses_h" >&5
3148 echo "${ECHO_T}$with_curses_h" >&6
3149
3150 modules_to_build="ncurses"
3151 if test "X$cf_with_progs" != Xno ; then
3152 modules_to_build="$modules_to_build progs tack"
3153 fi
3154 modules_to_build="$modules_to_build panel menu form"
3155
3156 test "$program_prefix" != NONE &&
3157   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3158 # Use a double $ so make ignores it.
3159 test "$program_suffix" != NONE &&
3160   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3161 # Double any \ or $.  echo might interpret backslashes.
3162 # By default was `s,x,x', remove it if useless.
3163 cat <<\_ACEOF >conftest.sed
3164 s/[\\$]/&&/g;s/;s,x,x,$//
3165 _ACEOF
3166 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3167 rm conftest.sed
3168
3169 for ac_prog in mawk gawk nawk awk
3170 do
3171   # Extract the first word of "$ac_prog", so it can be a program name with args.
3172 set dummy $ac_prog; ac_word=$2
3173 echo "$as_me:3173: checking for $ac_word" >&5
3174 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3175 if test "${ac_cv_prog_AWK+set}" = set; then
3176   echo $ECHO_N "(cached) $ECHO_C" >&6
3177 else
3178   if test -n "$AWK"; then
3179   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3180 else
3181   ac_save_IFS=$IFS; IFS=$ac_path_separator
3182 ac_dummy="$PATH"
3183 for ac_dir in $ac_dummy; do
3184   IFS=$ac_save_IFS
3185   test -z "$ac_dir" && ac_dir=.
3186   $as_executable_p "$ac_dir/$ac_word" || continue
3187 ac_cv_prog_AWK="$ac_prog"
3188 echo "$as_me:3188: found $ac_dir/$ac_word" >&5
3189 break
3190 done
3191
3192 fi
3193 fi
3194 AWK=$ac_cv_prog_AWK
3195 if test -n "$AWK"; then
3196   echo "$as_me:3196: result: $AWK" >&5
3197 echo "${ECHO_T}$AWK" >&6
3198 else
3199   echo "$as_me:3199: result: no" >&5
3200 echo "${ECHO_T}no" >&6
3201 fi
3202
3203   test -n "$AWK" && break
3204 done
3205
3206 test -z "$AWK" && { { echo "$as_me:3206: error: No awk program found" >&5
3207 echo "$as_me: error: No awk program found" >&2;}
3208    { (exit 1); exit 1; }; }
3209
3210 echo "$as_me:3210: checking for egrep" >&5
3211 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3212 if test "${ac_cv_prog_egrep+set}" = set; then
3213   echo $ECHO_N "(cached) $ECHO_C" >&6
3214 else
3215   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3216                 then ac_cv_prog_egrep='grep -E'
3217                 else ac_cv_prog_egrep='egrep'
3218         fi
3219 fi
3220 echo "$as_me:3220: result: $ac_cv_prog_egrep" >&5
3221 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3222         EGREP=$ac_cv_prog_egrep
3223
3224         test -z "$EGREP" && { { echo "$as_me:3224: error: No egrep program found" >&5
3225 echo "$as_me: error: No egrep program found" >&2;}
3226    { (exit 1); exit 1; }; }
3227
3228 # Find a good install program.  We prefer a C program (faster),
3229 # so one script is as good as another.  But avoid the broken or
3230 # incompatible versions:
3231 # SysV /etc/install, /usr/sbin/install
3232 # SunOS /usr/etc/install
3233 # IRIX /sbin/install
3234 # AIX /bin/install
3235 # AmigaOS /C/install, which installs bootblocks on floppy discs
3236 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3237 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3238 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3239 # ./install, which can be erroneously created by make from ./install.sh.
3240 echo "$as_me:3240: checking for a BSD compatible install" >&5
3241 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3242 if test -z "$INSTALL"; then
3243 if test "${ac_cv_path_install+set}" = set; then
3244   echo $ECHO_N "(cached) $ECHO_C" >&6
3245 else
3246     ac_save_IFS=$IFS; IFS=$ac_path_separator
3247   for ac_dir in $PATH; do
3248     IFS=$ac_save_IFS
3249     # Account for people who put trailing slashes in PATH elements.
3250     case $ac_dir/ in
3251     / | ./ | .// | /cC/* \
3252     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3253     | /usr/ucb/* ) ;;
3254     *)
3255       # OSF1 and SCO ODT 3.0 have their own names for install.
3256       # Don't use installbsd from OSF since it installs stuff as root
3257       # by default.
3258       for ac_prog in ginstall scoinst install; do
3259         if $as_executable_p "$ac_dir/$ac_prog"; then
3260           if test $ac_prog = install &&
3261             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3262             # AIX install.  It has an incompatible calling convention.
3263             :
3264           elif test $ac_prog = install &&
3265             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3266             # program-specific install script used by HP pwplus--don't use.
3267             :
3268           else
3269             ac_cv_path_install="$ac_dir/$ac_prog -c"
3270             break 2
3271           fi
3272         fi
3273       done
3274       ;;
3275     esac
3276   done
3277
3278 fi
3279   if test "${ac_cv_path_install+set}" = set; then
3280     INSTALL=$ac_cv_path_install
3281   else
3282     # As a last resort, use the slow shell script.  We don't cache a
3283     # path for INSTALL within a source directory, because that will
3284     # break other packages using the cache if that directory is
3285     # removed, or if the path is relative.
3286     INSTALL=$ac_install_sh
3287   fi
3288 fi
3289 echo "$as_me:3289: result: $INSTALL" >&5
3290 echo "${ECHO_T}$INSTALL" >&6
3291
3292 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3293 # It thinks the first close brace ends the variable substitution.
3294 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3295
3296 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3297
3298 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3299
3300 case $INSTALL in
3301 (/*)
3302         ;;
3303 (*)
3304         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3305         test -z "$cf_dir" && cf_dir=.
3306         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3307         ;;
3308 esac
3309
3310 for ac_prog in tdlint lint alint splint lclint
3311 do
3312   # Extract the first word of "$ac_prog", so it can be a program name with args.
3313 set dummy $ac_prog; ac_word=$2
3314 echo "$as_me:3314: checking for $ac_word" >&5
3315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3316 if test "${ac_cv_prog_LINT+set}" = set; then
3317   echo $ECHO_N "(cached) $ECHO_C" >&6
3318 else
3319   if test -n "$LINT"; then
3320   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3321 else
3322   ac_save_IFS=$IFS; IFS=$ac_path_separator
3323 ac_dummy="$PATH"
3324 for ac_dir in $ac_dummy; do
3325   IFS=$ac_save_IFS
3326   test -z "$ac_dir" && ac_dir=.
3327   $as_executable_p "$ac_dir/$ac_word" || continue
3328 ac_cv_prog_LINT="$ac_prog"
3329 echo "$as_me:3329: found $ac_dir/$ac_word" >&5
3330 break
3331 done
3332
3333 fi
3334 fi
3335 LINT=$ac_cv_prog_LINT
3336 if test -n "$LINT"; then
3337   echo "$as_me:3337: result: $LINT" >&5
3338 echo "${ECHO_T}$LINT" >&6
3339 else
3340   echo "$as_me:3340: result: no" >&5
3341 echo "${ECHO_T}no" >&6
3342 fi
3343
3344   test -n "$LINT" && break
3345 done
3346
3347 echo "$as_me:3347: checking whether ln -s works" >&5
3348 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3349 LN_S=$as_ln_s
3350 if test "$LN_S" = "ln -s"; then
3351   echo "$as_me:3351: result: yes" >&5
3352 echo "${ECHO_T}yes" >&6
3353 else
3354   echo "$as_me:3354: result: no, using $LN_S" >&5
3355 echo "${ECHO_T}no, using $LN_S" >&6
3356 fi
3357
3358 echo "$as_me:3358: checking if $LN_S -f options work" >&5
3359 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3360
3361 rm -f conf$$.src conf$$dst
3362 echo >conf$$.dst
3363 echo first >conf$$.src
3364 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3365         cf_prog_ln_sf=yes
3366 else
3367         cf_prog_ln_sf=no
3368 fi
3369 rm -f conf$$.dst conf$$src
3370 echo "$as_me:3370: result: $cf_prog_ln_sf" >&5
3371 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3372
3373 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3374
3375 echo "$as_me:3375: checking for long file names" >&5
3376 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3377 if test "${ac_cv_sys_long_file_names+set}" = set; then
3378   echo $ECHO_N "(cached) $ECHO_C" >&6
3379 else
3380   ac_cv_sys_long_file_names=yes
3381 # Test for long file names in all the places we know might matter:
3382 #      .                the current directory, where building will happen
3383 #      $prefix/lib      where we will be installing things
3384 #      $exec_prefix/lib likewise
3385 # eval it to expand exec_prefix.
3386 #      $TMPDIR          if set, where it might want to write temporary files
3387 # if $TMPDIR is not set:
3388 #      /tmp             where it might want to write temporary files
3389 #      /var/tmp         likewise
3390 #      /usr/tmp         likewise
3391 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3392   ac_tmpdirs=$TMPDIR
3393 else
3394   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3395 fi
3396 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3397   test -d $ac_dir || continue
3398   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3399   ac_xdir=$ac_dir/cf$$
3400   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3401   ac_tf1=$ac_xdir/conftest9012345
3402   ac_tf2=$ac_xdir/conftest9012346
3403   (echo 1 >$ac_tf1) 2>/dev/null
3404   (echo 2 >$ac_tf2) 2>/dev/null
3405   ac_val=`cat $ac_tf1 2>/dev/null`
3406   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3407     ac_cv_sys_long_file_names=no
3408     rm -rf $ac_xdir 2>/dev/null
3409     break
3410   fi
3411   rm -rf $ac_xdir 2>/dev/null
3412 done
3413 fi
3414 echo "$as_me:3414: result: $ac_cv_sys_long_file_names" >&5
3415 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3416 if test $ac_cv_sys_long_file_names = yes; then
3417
3418 cat >>confdefs.h <<\EOF
3419 #define HAVE_LONG_FILE_NAMES 1
3420 EOF
3421
3422 fi
3423
3424 # if we find pkg-config, check if we should install the ".pc" files.
3425
3426 echo "$as_me:3426: checking if you want to use pkg-config" >&5
3427 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3428
3429 # Check whether --with-pkg-config or --without-pkg-config was given.
3430 if test "${with_pkg_config+set}" = set; then
3431   withval="$with_pkg_config"
3432   cf_pkg_config=$withval
3433 else
3434   cf_pkg_config=yes
3435 fi;
3436 echo "$as_me:3436: result: $cf_pkg_config" >&5
3437 echo "${ECHO_T}$cf_pkg_config" >&6
3438
3439 case $cf_pkg_config in
3440 (no)
3441         PKG_CONFIG=none
3442         ;;
3443 (yes)
3444
3445 if test -n "$ac_tool_prefix"; then
3446   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3447 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3448 echo "$as_me:3448: checking for $ac_word" >&5
3449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3450 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3451   echo $ECHO_N "(cached) $ECHO_C" >&6
3452 else
3453   case $PKG_CONFIG in
3454   [\\/]* | ?:[\\/]*)
3455   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3456   ;;
3457   *)
3458   ac_save_IFS=$IFS; IFS=$ac_path_separator
3459 ac_dummy="$PATH"
3460 for ac_dir in $ac_dummy; do
3461   IFS=$ac_save_IFS
3462   test -z "$ac_dir" && ac_dir=.
3463   if $as_executable_p "$ac_dir/$ac_word"; then
3464    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3465    echo "$as_me:3465: found $ac_dir/$ac_word" >&5
3466    break
3467 fi
3468 done
3469
3470   ;;
3471 esac
3472 fi
3473 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3474
3475 if test -n "$PKG_CONFIG"; then
3476   echo "$as_me:3476: result: $PKG_CONFIG" >&5
3477 echo "${ECHO_T}$PKG_CONFIG" >&6
3478 else
3479   echo "$as_me:3479: result: no" >&5
3480 echo "${ECHO_T}no" >&6
3481 fi
3482
3483 fi
3484 if test -z "$ac_cv_path_PKG_CONFIG"; then
3485   ac_pt_PKG_CONFIG=$PKG_CONFIG
3486   # Extract the first word of "pkg-config", so it can be a program name with args.
3487 set dummy pkg-config; ac_word=$2
3488 echo "$as_me:3488: checking for $ac_word" >&5
3489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3490 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3491   echo $ECHO_N "(cached) $ECHO_C" >&6
3492 else
3493   case $ac_pt_PKG_CONFIG in
3494   [\\/]* | ?:[\\/]*)
3495   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3496   ;;
3497   *)
3498   ac_save_IFS=$IFS; IFS=$ac_path_separator
3499 ac_dummy="$PATH"
3500 for ac_dir in $ac_dummy; do
3501   IFS=$ac_save_IFS
3502   test -z "$ac_dir" && ac_dir=.
3503   if $as_executable_p "$ac_dir/$ac_word"; then
3504    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3505    echo "$as_me:3505: found $ac_dir/$ac_word" >&5
3506    break
3507 fi
3508 done
3509
3510   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3511   ;;
3512 esac
3513 fi
3514 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3515
3516 if test -n "$ac_pt_PKG_CONFIG"; then
3517   echo "$as_me:3517: result: $ac_pt_PKG_CONFIG" >&5
3518 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3519 else
3520   echo "$as_me:3520: result: no" >&5
3521 echo "${ECHO_T}no" >&6
3522 fi
3523
3524   PKG_CONFIG=$ac_pt_PKG_CONFIG
3525 else
3526   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3527 fi
3528
3529         ;;
3530 (*)
3531         PKG_CONFIG=$withval
3532         ;;
3533 esac
3534
3535 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3536 if test "$PKG_CONFIG" != none ; then
3537
3538 if test "x$prefix" != xNONE; then
3539         cf_path_syntax="$prefix"
3540 else
3541         cf_path_syntax="$ac_default_prefix"
3542 fi
3543
3544 case ".$PKG_CONFIG" in
3545 (.\$\(*\)*|.\'*\'*)
3546         ;;
3547 (..|./*|.\\*)
3548         ;;
3549 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3550         ;;
3551 (.\${*prefix}*|.\${*dir}*)
3552         eval PKG_CONFIG="$PKG_CONFIG"
3553         case ".$PKG_CONFIG" in
3554         (.NONE/*)
3555                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3556                 ;;
3557         esac
3558         ;;
3559 (.no|.NONE/*)
3560         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3561         ;;
3562 (*)
3563         { { echo "$as_me:3563: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3564 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3565    { (exit 1); exit 1; }; }
3566         ;;
3567 esac
3568
3569 elif test "x$cf_pkg_config" != xno ; then
3570         { echo "$as_me:3570: WARNING: pkg-config is not installed" >&5
3571 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3572 fi
3573
3574 case $PKG_CONFIG in
3575 (no|none|yes)
3576         echo "$as_me:3576: checking for pkg-config library directory" >&5
3577 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3578         ;;
3579 (*)
3580         echo "$as_me:3580: checking for $PKG_CONFIG library directory" >&5
3581 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3582         ;;
3583 esac
3584
3585 PKG_CONFIG_LIBDIR=no
3586
3587 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3588 if test "${with_pkg_config_libdir+set}" = set; then
3589   withval="$with_pkg_config_libdir"
3590   PKG_CONFIG_LIBDIR=$withval
3591 else
3592   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3593 fi;
3594
3595 case x$PKG_CONFIG_LIBDIR in
3596 (x/*)
3597         ;;
3598 (xyes)
3599         # Look for the library directory using the same prefix as the executable
3600         if test "x$PKG_CONFIG" = xnone
3601         then
3602                 cf_path=$prefix
3603         else
3604                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3605         fi
3606
3607         # If you don't like using the default architecture, you have to specify the
3608         # intended library directory and corresponding compiler/linker options.
3609         #
3610         # This case allows for Debian's 2014-flavor of multiarch, along with the
3611         # most common variations before that point.  Some other variants spell the
3612         # directory differently, e.g., "pkg-config", and put it in unusual places.
3613         # pkg-config has always been poorly standardized, which is ironic...
3614         case x`(arch) 2>/dev/null` in
3615         (*64)
3616                 cf_search_path="\
3617                         $cf_path/lib/*64-linux-gnu \
3618                         $cf_path/share \
3619                         $cf_path/lib64 \
3620                         $cf_path/lib32 \
3621                         $cf_path/lib"
3622                 ;;
3623         (*)
3624                 cf_search_path="\
3625                         $cf_path/lib/*-linux-gnu \
3626                         $cf_path/share \
3627                         $cf_path/lib32 \
3628                         $cf_path/lib \
3629                         $cf_path/libdata"
3630                 ;;
3631         esac
3632
3633         test -n "$verbose" && echo "    list..." 1>&6
3634
3635 echo "${as_me:-configure}:3635: testing list... ..." 1>&5
3636
3637         for cf_config in $cf_search_path
3638         do
3639                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3640
3641 echo "${as_me:-configure}:3641: testing checking $cf_config/pkgconfig ..." 1>&5
3642
3643                 if test -d $cf_config/pkgconfig
3644                 then
3645                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3646                         echo "$as_me:3646: checking done" >&5
3647 echo $ECHO_N "checking done... $ECHO_C" >&6
3648                         break
3649                 fi
3650         done
3651         ;;
3652 (*)
3653         ;;
3654 esac
3655
3656 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3657         echo "$as_me:3657: result: $PKG_CONFIG_LIBDIR" >&5
3658 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3659 fi
3660
3661 if test "x$PKG_CONFIG" != xnone
3662 then
3663         echo "$as_me:3663: checking if we should install .pc files for $PKG_CONFIG" >&5
3664 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3665 else
3666         echo "$as_me:3666: checking if we should install .pc files" >&5
3667 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3668 fi
3669
3670 # Check whether --enable-pc-files or --disable-pc-files was given.
3671 if test "${enable_pc_files+set}" = set; then
3672   enableval="$enable_pc_files"
3673   enable_pc_files=$enableval
3674 else
3675   enable_pc_files=no
3676 fi;
3677 echo "$as_me:3677: result: $enable_pc_files" >&5
3678 echo "${ECHO_T}$enable_pc_files" >&6
3679
3680 if test "x$enable_pc_files" != xno
3681 then
3682         case "x$PKG_CONFIG_LIBDIR" in
3683         (xno|xyes)
3684                 { echo "$as_me:3684: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3685 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3686                 MAKE_PC_FILES="#"
3687                 ;;
3688         (*)
3689
3690 if test "x$prefix" != xNONE; then
3691         cf_path_syntax="$prefix"
3692 else
3693         cf_path_syntax="$ac_default_prefix"
3694 fi
3695
3696 case ".$PKG_CONFIG_LIBDIR" in
3697 (.\$\(*\)*|.\'*\'*)
3698         ;;
3699 (..|./*|.\\*)
3700         ;;
3701 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3702         ;;
3703 (.\${*prefix}*|.\${*dir}*)
3704         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3705         case ".$PKG_CONFIG_LIBDIR" in
3706         (.NONE/*)
3707                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3708                 ;;
3709         esac
3710         ;;
3711 (.no|.NONE/*)
3712         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3713         ;;
3714 (*)
3715         { { echo "$as_me:3715: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3716 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3717    { (exit 1); exit 1; }; }
3718         ;;
3719 esac
3720
3721                 MAKE_PC_FILES=
3722                 ;;
3723         esac
3724 else
3725         MAKE_PC_FILES="#"
3726 fi
3727
3728 if test -z "$MAKE_PC_FILES"
3729 then
3730         echo "$as_me:3730: checking for suffix to add to pc-files" >&5
3731 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3732
3733 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3734 if test "${with_pc_suffix+set}" = set; then
3735   withval="$with_pc_suffix"
3736   case "x$withval" in
3737         (xyes|xno)
3738                 PC_MODULE_SUFFIX=
3739                 ;;
3740         (*)     PC_MODULE_SUFFIX="$withval"
3741                 ;;
3742         esac
3743 fi;
3744         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3745         echo "$as_me:3745: result: $PC_MODULE_SUFFIX" >&5
3746 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3747         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3748
3749 fi
3750
3751 echo "$as_me:3751: checking if we should assume mixed-case filenames" >&5
3752 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3753
3754 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3755 if test "${enable_mixed_case+set}" = set; then
3756   enableval="$enable_mixed_case"
3757   enable_mixedcase=$enableval
3758 else
3759   enable_mixedcase=auto
3760 fi;
3761 echo "$as_me:3761: result: $enable_mixedcase" >&5
3762 echo "${ECHO_T}$enable_mixedcase" >&6
3763 if test "$enable_mixedcase" = "auto" ; then
3764
3765 echo "$as_me:3765: checking if filesystem supports mixed-case filenames" >&5
3766 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3767 if test "${cf_cv_mixedcase+set}" = set; then
3768   echo $ECHO_N "(cached) $ECHO_C" >&6
3769 else
3770
3771 if test "$cross_compiling" = yes ; then
3772         case $target_alias in
3773         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3774                 cf_cv_mixedcase=no
3775                 ;;
3776         (*)
3777                 cf_cv_mixedcase=yes
3778                 ;;
3779         esac
3780 else
3781         rm -f conftest CONFTEST
3782         echo test >conftest
3783         if test -f CONFTEST ; then
3784                 cf_cv_mixedcase=no
3785         else
3786                 cf_cv_mixedcase=yes
3787         fi
3788         rm -f conftest CONFTEST
3789 fi
3790
3791 fi
3792 echo "$as_me:3792: result: $cf_cv_mixedcase" >&5
3793 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3794 test "$cf_cv_mixedcase" = yes &&
3795 cat >>confdefs.h <<\EOF
3796 #define MIXEDCASE_FILENAMES 1
3797 EOF
3798
3799 else
3800         cf_cv_mixedcase=$enable_mixedcase
3801         if test "x$enable_mixedcase" = "xyes" ; then
3802
3803 cat >>confdefs.h <<\EOF
3804 #define MIXEDCASE_FILENAMES 1
3805 EOF
3806
3807         fi
3808 fi
3809
3810 # do this after mixed-case option (tags/TAGS is not as important as tic).
3811 echo "$as_me:3811: checking whether ${MAKE-make} sets \${MAKE}" >&5
3812 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3813 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3814 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3815   echo $ECHO_N "(cached) $ECHO_C" >&6
3816 else
3817   cat >conftest.make <<\EOF
3818 all:
3819         @echo 'ac_maketemp="${MAKE}"'
3820 EOF
3821 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3822 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3823 if test -n "$ac_maketemp"; then
3824   eval ac_cv_prog_make_${ac_make}_set=yes
3825 else
3826   eval ac_cv_prog_make_${ac_make}_set=no
3827 fi
3828 rm -f conftest.make
3829 fi
3830 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3831   echo "$as_me:3831: result: yes" >&5
3832 echo "${ECHO_T}yes" >&6
3833   SET_MAKE=
3834 else
3835   echo "$as_me:3835: result: no" >&5
3836 echo "${ECHO_T}no" >&6
3837   SET_MAKE="MAKE=${MAKE-make}"
3838 fi
3839
3840 for ac_prog in exctags ctags
3841 do
3842   # Extract the first word of "$ac_prog", so it can be a program name with args.
3843 set dummy $ac_prog; ac_word=$2
3844 echo "$as_me:3844: checking for $ac_word" >&5
3845 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3846 if test "${ac_cv_prog_CTAGS+set}" = set; then
3847   echo $ECHO_N "(cached) $ECHO_C" >&6
3848 else
3849   if test -n "$CTAGS"; then
3850   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3851 else
3852   ac_save_IFS=$IFS; IFS=$ac_path_separator
3853 ac_dummy="$PATH"
3854 for ac_dir in $ac_dummy; do
3855   IFS=$ac_save_IFS
3856   test -z "$ac_dir" && ac_dir=.
3857   $as_executable_p "$ac_dir/$ac_word" || continue
3858 ac_cv_prog_CTAGS="$ac_prog"
3859 echo "$as_me:3859: found $ac_dir/$ac_word" >&5
3860 break
3861 done
3862
3863 fi
3864 fi
3865 CTAGS=$ac_cv_prog_CTAGS
3866 if test -n "$CTAGS"; then
3867   echo "$as_me:3867: result: $CTAGS" >&5
3868 echo "${ECHO_T}$CTAGS" >&6
3869 else
3870   echo "$as_me:3870: result: no" >&5
3871 echo "${ECHO_T}no" >&6
3872 fi
3873
3874   test -n "$CTAGS" && break
3875 done
3876
3877 for ac_prog in exetags etags
3878 do
3879   # Extract the first word of "$ac_prog", so it can be a program name with args.
3880 set dummy $ac_prog; ac_word=$2
3881 echo "$as_me:3881: checking for $ac_word" >&5
3882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3883 if test "${ac_cv_prog_ETAGS+set}" = set; then
3884   echo $ECHO_N "(cached) $ECHO_C" >&6
3885 else
3886   if test -n "$ETAGS"; then
3887   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3888 else
3889   ac_save_IFS=$IFS; IFS=$ac_path_separator
3890 ac_dummy="$PATH"
3891 for ac_dir in $ac_dummy; do
3892   IFS=$ac_save_IFS
3893   test -z "$ac_dir" && ac_dir=.
3894   $as_executable_p "$ac_dir/$ac_word" || continue
3895 ac_cv_prog_ETAGS="$ac_prog"
3896 echo "$as_me:3896: found $ac_dir/$ac_word" >&5
3897 break
3898 done
3899
3900 fi
3901 fi
3902 ETAGS=$ac_cv_prog_ETAGS
3903 if test -n "$ETAGS"; then
3904   echo "$as_me:3904: result: $ETAGS" >&5
3905 echo "${ECHO_T}$ETAGS" >&6
3906 else
3907   echo "$as_me:3907: result: no" >&5
3908 echo "${ECHO_T}no" >&6
3909 fi
3910
3911   test -n "$ETAGS" && break
3912 done
3913
3914 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3915 set dummy ${CTAGS:-ctags}; ac_word=$2
3916 echo "$as_me:3916: checking for $ac_word" >&5
3917 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3918 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3919   echo $ECHO_N "(cached) $ECHO_C" >&6
3920 else
3921   if test -n "$MAKE_LOWER_TAGS"; then
3922   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3923 else
3924   ac_save_IFS=$IFS; IFS=$ac_path_separator
3925 ac_dummy="$PATH"
3926 for ac_dir in $ac_dummy; do
3927   IFS=$ac_save_IFS
3928   test -z "$ac_dir" && ac_dir=.
3929   $as_executable_p "$ac_dir/$ac_word" || continue
3930 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3931 echo "$as_me:3931: found $ac_dir/$ac_word" >&5
3932 break
3933 done
3934
3935   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3936 fi
3937 fi
3938 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3939 if test -n "$MAKE_LOWER_TAGS"; then
3940   echo "$as_me:3940: result: $MAKE_LOWER_TAGS" >&5
3941 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3942 else
3943   echo "$as_me:3943: result: no" >&5
3944 echo "${ECHO_T}no" >&6
3945 fi
3946
3947 if test "$cf_cv_mixedcase" = yes ; then
3948         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3949 set dummy ${ETAGS:-etags}; ac_word=$2
3950 echo "$as_me:3950: checking for $ac_word" >&5
3951 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3952 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3953   echo $ECHO_N "(cached) $ECHO_C" >&6
3954 else
3955   if test -n "$MAKE_UPPER_TAGS"; then
3956   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3957 else
3958   ac_save_IFS=$IFS; IFS=$ac_path_separator
3959 ac_dummy="$PATH"
3960 for ac_dir in $ac_dummy; do
3961   IFS=$ac_save_IFS
3962   test -z "$ac_dir" && ac_dir=.
3963   $as_executable_p "$ac_dir/$ac_word" || continue
3964 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3965 echo "$as_me:3965: found $ac_dir/$ac_word" >&5
3966 break
3967 done
3968
3969   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3970 fi
3971 fi
3972 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3973 if test -n "$MAKE_UPPER_TAGS"; then
3974   echo "$as_me:3974: result: $MAKE_UPPER_TAGS" >&5
3975 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3976 else
3977   echo "$as_me:3977: result: no" >&5
3978 echo "${ECHO_T}no" >&6
3979 fi
3980
3981 else
3982         MAKE_UPPER_TAGS=no
3983 fi
3984
3985 if test "$MAKE_UPPER_TAGS" = yes ; then
3986         MAKE_UPPER_TAGS=
3987 else
3988         MAKE_UPPER_TAGS="#"
3989 fi
3990
3991 if test "$MAKE_LOWER_TAGS" = yes ; then
3992         MAKE_LOWER_TAGS=
3993 else
3994         MAKE_LOWER_TAGS="#"
3995 fi
3996
3997 echo "$as_me:3997: checking for makeflags variable" >&5
3998 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3999 if test "${cf_cv_makeflags+set}" = set; then
4000   echo $ECHO_N "(cached) $ECHO_C" >&6
4001 else
4002
4003         cf_cv_makeflags=''
4004         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4005         do
4006                 cat >cf_makeflags.tmp <<CF_EOF
4007 SHELL = $SHELL
4008 all :
4009         @ echo '.$cf_option'
4010 CF_EOF
4011                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4012                 case "$cf_result" in
4013                 (.*k|.*kw)
4014                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4015                         case "$cf_result" in
4016                         (.*CC=*)        cf_cv_makeflags=
4017                                 ;;
4018                         (*)     cf_cv_makeflags=$cf_option
4019                                 ;;
4020                         esac
4021                         break
4022                         ;;
4023                 (.-)    ;;
4024                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
4025                         ;;
4026                 esac
4027         done
4028         rm -f cf_makeflags.tmp
4029
4030 fi
4031 echo "$as_me:4031: result: $cf_cv_makeflags" >&5
4032 echo "${ECHO_T}$cf_cv_makeflags" >&6
4033
4034 if test -n "$ac_tool_prefix"; then
4035   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4036 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4037 echo "$as_me:4037: checking for $ac_word" >&5
4038 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4039 if test "${ac_cv_prog_RANLIB+set}" = set; then
4040   echo $ECHO_N "(cached) $ECHO_C" >&6
4041 else
4042   if test -n "$RANLIB"; then
4043   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4044 else
4045   ac_save_IFS=$IFS; IFS=$ac_path_separator
4046 ac_dummy="$PATH"
4047 for ac_dir in $ac_dummy; do
4048   IFS=$ac_save_IFS
4049   test -z "$ac_dir" && ac_dir=.
4050   $as_executable_p "$ac_dir/$ac_word" || continue
4051 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4052 echo "$as_me:4052: found $ac_dir/$ac_word" >&5
4053 break
4054 done
4055
4056 fi
4057 fi
4058 RANLIB=$ac_cv_prog_RANLIB
4059 if test -n "$RANLIB"; then
4060   echo "$as_me:4060: result: $RANLIB" >&5
4061 echo "${ECHO_T}$RANLIB" >&6
4062 else
4063   echo "$as_me:4063: result: no" >&5
4064 echo "${ECHO_T}no" >&6
4065 fi
4066
4067 fi
4068 if test -z "$ac_cv_prog_RANLIB"; then
4069   ac_ct_RANLIB=$RANLIB
4070   # Extract the first word of "ranlib", so it can be a program name with args.
4071 set dummy ranlib; ac_word=$2
4072 echo "$as_me:4072: checking for $ac_word" >&5
4073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4074 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4075   echo $ECHO_N "(cached) $ECHO_C" >&6
4076 else
4077   if test -n "$ac_ct_RANLIB"; then
4078   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4079 else
4080   ac_save_IFS=$IFS; IFS=$ac_path_separator
4081 ac_dummy="$PATH"
4082 for ac_dir in $ac_dummy; do
4083   IFS=$ac_save_IFS
4084   test -z "$ac_dir" && ac_dir=.
4085   $as_executable_p "$ac_dir/$ac_word" || continue
4086 ac_cv_prog_ac_ct_RANLIB="ranlib"
4087 echo "$as_me:4087: found $ac_dir/$ac_word" >&5
4088 break
4089 done
4090
4091   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4092 fi
4093 fi
4094 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4095 if test -n "$ac_ct_RANLIB"; then
4096   echo "$as_me:4096: result: $ac_ct_RANLIB" >&5
4097 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4098 else
4099   echo "$as_me:4099: result: no" >&5
4100 echo "${ECHO_T}no" >&6
4101 fi
4102
4103   RANLIB=$ac_ct_RANLIB
4104 else
4105   RANLIB="$ac_cv_prog_RANLIB"
4106 fi
4107
4108 if test -n "$ac_tool_prefix"; then
4109   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4110 set dummy ${ac_tool_prefix}ld; ac_word=$2
4111 echo "$as_me:4111: checking for $ac_word" >&5
4112 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4113 if test "${ac_cv_prog_LD+set}" = set; then
4114   echo $ECHO_N "(cached) $ECHO_C" >&6
4115 else
4116   if test -n "$LD"; then
4117   ac_cv_prog_LD="$LD" # Let the user override the test.
4118 else
4119   ac_save_IFS=$IFS; IFS=$ac_path_separator
4120 ac_dummy="$PATH"
4121 for ac_dir in $ac_dummy; do
4122   IFS=$ac_save_IFS
4123   test -z "$ac_dir" && ac_dir=.
4124   $as_executable_p "$ac_dir/$ac_word" || continue
4125 ac_cv_prog_LD="${ac_tool_prefix}ld"
4126 echo "$as_me:4126: found $ac_dir/$ac_word" >&5
4127 break
4128 done
4129
4130 fi
4131 fi
4132 LD=$ac_cv_prog_LD
4133 if test -n "$LD"; then
4134   echo "$as_me:4134: result: $LD" >&5
4135 echo "${ECHO_T}$LD" >&6
4136 else
4137   echo "$as_me:4137: result: no" >&5
4138 echo "${ECHO_T}no" >&6
4139 fi
4140
4141 fi
4142 if test -z "$ac_cv_prog_LD"; then
4143   ac_ct_LD=$LD
4144   # Extract the first word of "ld", so it can be a program name with args.
4145 set dummy ld; ac_word=$2
4146 echo "$as_me:4146: checking for $ac_word" >&5
4147 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4148 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4149   echo $ECHO_N "(cached) $ECHO_C" >&6
4150 else
4151   if test -n "$ac_ct_LD"; then
4152   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4153 else
4154   ac_save_IFS=$IFS; IFS=$ac_path_separator
4155 ac_dummy="$PATH"
4156 for ac_dir in $ac_dummy; do
4157   IFS=$ac_save_IFS
4158   test -z "$ac_dir" && ac_dir=.
4159   $as_executable_p "$ac_dir/$ac_word" || continue
4160 ac_cv_prog_ac_ct_LD="ld"
4161 echo "$as_me:4161: found $ac_dir/$ac_word" >&5
4162 break
4163 done
4164
4165   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4166 fi
4167 fi
4168 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4169 if test -n "$ac_ct_LD"; then
4170   echo "$as_me:4170: result: $ac_ct_LD" >&5
4171 echo "${ECHO_T}$ac_ct_LD" >&6
4172 else
4173   echo "$as_me:4173: result: no" >&5
4174 echo "${ECHO_T}no" >&6
4175 fi
4176
4177   LD=$ac_ct_LD
4178 else
4179   LD="$ac_cv_prog_LD"
4180 fi
4181
4182 if test -n "$ac_tool_prefix"; then
4183   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4184 set dummy ${ac_tool_prefix}ar; ac_word=$2
4185 echo "$as_me:4185: checking for $ac_word" >&5
4186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4187 if test "${ac_cv_prog_AR+set}" = set; then
4188   echo $ECHO_N "(cached) $ECHO_C" >&6
4189 else
4190   if test -n "$AR"; then
4191   ac_cv_prog_AR="$AR" # Let the user override the test.
4192 else
4193   ac_save_IFS=$IFS; IFS=$ac_path_separator
4194 ac_dummy="$PATH"
4195 for ac_dir in $ac_dummy; do
4196   IFS=$ac_save_IFS
4197   test -z "$ac_dir" && ac_dir=.
4198   $as_executable_p "$ac_dir/$ac_word" || continue
4199 ac_cv_prog_AR="${ac_tool_prefix}ar"
4200 echo "$as_me:4200: found $ac_dir/$ac_word" >&5
4201 break
4202 done
4203
4204 fi
4205 fi
4206 AR=$ac_cv_prog_AR
4207 if test -n "$AR"; then
4208   echo "$as_me:4208: result: $AR" >&5
4209 echo "${ECHO_T}$AR" >&6
4210 else
4211   echo "$as_me:4211: result: no" >&5
4212 echo "${ECHO_T}no" >&6
4213 fi
4214
4215 fi
4216 if test -z "$ac_cv_prog_AR"; then
4217   ac_ct_AR=$AR
4218   # Extract the first word of "ar", so it can be a program name with args.
4219 set dummy ar; ac_word=$2
4220 echo "$as_me:4220: checking for $ac_word" >&5
4221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4222 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4223   echo $ECHO_N "(cached) $ECHO_C" >&6
4224 else
4225   if test -n "$ac_ct_AR"; then
4226   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4227 else
4228   ac_save_IFS=$IFS; IFS=$ac_path_separator
4229 ac_dummy="$PATH"
4230 for ac_dir in $ac_dummy; do
4231   IFS=$ac_save_IFS
4232   test -z "$ac_dir" && ac_dir=.
4233   $as_executable_p "$ac_dir/$ac_word" || continue
4234 ac_cv_prog_ac_ct_AR="ar"
4235 echo "$as_me:4235: found $ac_dir/$ac_word" >&5
4236 break
4237 done
4238
4239   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4240 fi
4241 fi
4242 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4243 if test -n "$ac_ct_AR"; then
4244   echo "$as_me:4244: result: $ac_ct_AR" >&5
4245 echo "${ECHO_T}$ac_ct_AR" >&6
4246 else
4247   echo "$as_me:4247: result: no" >&5
4248 echo "${ECHO_T}no" >&6
4249 fi
4250
4251   AR=$ac_ct_AR
4252 else
4253   AR="$ac_cv_prog_AR"
4254 fi
4255
4256 if test -n "$ac_tool_prefix"; then
4257   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4258 set dummy ${ac_tool_prefix}nm; ac_word=$2
4259 echo "$as_me:4259: checking for $ac_word" >&5
4260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4261 if test "${ac_cv_prog_NM+set}" = set; then
4262   echo $ECHO_N "(cached) $ECHO_C" >&6
4263 else
4264   if test -n "$NM"; then
4265   ac_cv_prog_NM="$NM" # Let the user override the test.
4266 else
4267   ac_save_IFS=$IFS; IFS=$ac_path_separator
4268 ac_dummy="$PATH"
4269 for ac_dir in $ac_dummy; do
4270   IFS=$ac_save_IFS
4271   test -z "$ac_dir" && ac_dir=.
4272   $as_executable_p "$ac_dir/$ac_word" || continue
4273 ac_cv_prog_NM="${ac_tool_prefix}nm"
4274 echo "$as_me:4274: found $ac_dir/$ac_word" >&5
4275 break
4276 done
4277
4278 fi
4279 fi
4280 NM=$ac_cv_prog_NM
4281 if test -n "$NM"; then
4282   echo "$as_me:4282: result: $NM" >&5
4283 echo "${ECHO_T}$NM" >&6
4284 else
4285   echo "$as_me:4285: result: no" >&5
4286 echo "${ECHO_T}no" >&6
4287 fi
4288
4289 fi
4290 if test -z "$ac_cv_prog_NM"; then
4291   ac_ct_NM=$NM
4292   # Extract the first word of "nm", so it can be a program name with args.
4293 set dummy nm; ac_word=$2
4294 echo "$as_me:4294: checking for $ac_word" >&5
4295 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4296 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4297   echo $ECHO_N "(cached) $ECHO_C" >&6
4298 else
4299   if test -n "$ac_ct_NM"; then
4300   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4301 else
4302   ac_save_IFS=$IFS; IFS=$ac_path_separator
4303 ac_dummy="$PATH"
4304 for ac_dir in $ac_dummy; do
4305   IFS=$ac_save_IFS
4306   test -z "$ac_dir" && ac_dir=.
4307   $as_executable_p "$ac_dir/$ac_word" || continue
4308 ac_cv_prog_ac_ct_NM="nm"
4309 echo "$as_me:4309: found $ac_dir/$ac_word" >&5
4310 break
4311 done
4312
4313   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4314 fi
4315 fi
4316 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4317 if test -n "$ac_ct_NM"; then
4318   echo "$as_me:4318: result: $ac_ct_NM" >&5
4319 echo "${ECHO_T}$ac_ct_NM" >&6
4320 else
4321   echo "$as_me:4321: result: no" >&5
4322 echo "${ECHO_T}no" >&6
4323 fi
4324
4325   NM=$ac_ct_NM
4326 else
4327   NM="$ac_cv_prog_NM"
4328 fi
4329
4330 if test -n "$ac_tool_prefix"; then
4331   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4332 set dummy ${ac_tool_prefix}ar; ac_word=$2
4333 echo "$as_me:4333: checking for $ac_word" >&5
4334 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4335 if test "${ac_cv_prog_AR+set}" = set; then
4336   echo $ECHO_N "(cached) $ECHO_C" >&6
4337 else
4338   if test -n "$AR"; then
4339   ac_cv_prog_AR="$AR" # Let the user override the test.
4340 else
4341   ac_save_IFS=$IFS; IFS=$ac_path_separator
4342 ac_dummy="$PATH"
4343 for ac_dir in $ac_dummy; do
4344   IFS=$ac_save_IFS
4345   test -z "$ac_dir" && ac_dir=.
4346   $as_executable_p "$ac_dir/$ac_word" || continue
4347 ac_cv_prog_AR="${ac_tool_prefix}ar"
4348 echo "$as_me:4348: found $ac_dir/$ac_word" >&5
4349 break
4350 done
4351
4352 fi
4353 fi
4354 AR=$ac_cv_prog_AR
4355 if test -n "$AR"; then
4356   echo "$as_me:4356: result: $AR" >&5
4357 echo "${ECHO_T}$AR" >&6
4358 else
4359   echo "$as_me:4359: result: no" >&5
4360 echo "${ECHO_T}no" >&6
4361 fi
4362
4363 fi
4364 if test -z "$ac_cv_prog_AR"; then
4365   ac_ct_AR=$AR
4366   # Extract the first word of "ar", so it can be a program name with args.
4367 set dummy ar; ac_word=$2
4368 echo "$as_me:4368: checking for $ac_word" >&5
4369 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4370 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4371   echo $ECHO_N "(cached) $ECHO_C" >&6
4372 else
4373   if test -n "$ac_ct_AR"; then
4374   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4375 else
4376   ac_save_IFS=$IFS; IFS=$ac_path_separator
4377 ac_dummy="$PATH"
4378 for ac_dir in $ac_dummy; do
4379   IFS=$ac_save_IFS
4380   test -z "$ac_dir" && ac_dir=.
4381   $as_executable_p "$ac_dir/$ac_word" || continue
4382 ac_cv_prog_ac_ct_AR="ar"
4383 echo "$as_me:4383: found $ac_dir/$ac_word" >&5
4384 break
4385 done
4386
4387   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4388 fi
4389 fi
4390 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4391 if test -n "$ac_ct_AR"; then
4392   echo "$as_me:4392: result: $ac_ct_AR" >&5
4393 echo "${ECHO_T}$ac_ct_AR" >&6
4394 else
4395   echo "$as_me:4395: result: no" >&5
4396 echo "${ECHO_T}no" >&6
4397 fi
4398
4399   AR=$ac_ct_AR
4400 else
4401   AR="$ac_cv_prog_AR"
4402 fi
4403
4404 echo "$as_me:4404: checking for options to update archives" >&5
4405 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4406 if test "${cf_cv_ar_flags+set}" = set; then
4407   echo $ECHO_N "(cached) $ECHO_C" >&6
4408 else
4409
4410         cf_cv_ar_flags=unknown
4411         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4412         do
4413
4414                 # check if $ARFLAGS already contains this choice
4415                 if test "x$ARFLAGS" != "x" ; then
4416                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4417                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4418                                 cf_cv_ar_flags=
4419                                 break
4420                         fi
4421                 fi
4422
4423                 rm -f conftest.$ac_cv_objext
4424                 rm -f conftest.a
4425
4426                 cat >conftest.$ac_ext <<EOF
4427 #line 4427 "configure"
4428 int     testdata[3] = { 123, 456, 789 };
4429 EOF
4430                 if { (eval echo "$as_me:4430: \"$ac_compile\"") >&5
4431   (eval $ac_compile) 2>&5
4432   ac_status=$?
4433   echo "$as_me:4433: \$? = $ac_status" >&5
4434   (exit $ac_status); } ; then
4435                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4436                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4437                         if test -f conftest.a ; then
4438                                 cf_cv_ar_flags=$cf_ar_flags
4439                                 break
4440                         fi
4441                 else
4442                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4443
4444 echo "${as_me:-configure}:4444: testing cannot compile test-program ..." 1>&5
4445
4446                         break
4447                 fi
4448         done
4449         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4450
4451 fi
4452 echo "$as_me:4452: result: $cf_cv_ar_flags" >&5
4453 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4454
4455 if test -n "$ARFLAGS" ; then
4456         if test -n "$cf_cv_ar_flags" ; then
4457                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4458         fi
4459 else
4460         ARFLAGS=$cf_cv_ar_flags
4461 fi
4462
4463 echo "$as_me:4463: checking if you have specified an install-prefix" >&5
4464 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4465
4466 # Check whether --with-install-prefix or --without-install-prefix was given.
4467 if test "${with_install_prefix+set}" = set; then
4468   withval="$with_install_prefix"
4469   case "x$withval" in
4470         (xyes|xno)
4471                 ;;
4472         (*)     DESTDIR="$withval"
4473                 ;;
4474         esac
4475 fi;
4476 echo "$as_me:4476: result: $DESTDIR" >&5
4477 echo "${ECHO_T}$DESTDIR" >&6
4478
4479 ###############################################################################
4480
4481 # If we're cross-compiling, allow the user to override the tools and their
4482 # options.  The configure script is oriented toward identifying the host
4483 # compiler, etc., but we need a build compiler to generate parts of the source.
4484
4485 if test "$cross_compiling" = yes ; then
4486
4487         # defaults that we might want to override
4488         : ${BUILD_CFLAGS:=''}
4489         : ${BUILD_CPPFLAGS:=''}
4490         : ${BUILD_LDFLAGS:=''}
4491         : ${BUILD_LIBS:=''}
4492         : ${BUILD_EXEEXT:='$x'}
4493         : ${BUILD_OBJEXT:='o'}
4494
4495 # Check whether --with-build-cc or --without-build-cc was given.
4496 if test "${with_build_cc+set}" = set; then
4497   withval="$with_build_cc"
4498   BUILD_CC="$withval"
4499 else
4500   for ac_prog in gcc cc cl
4501 do
4502   # Extract the first word of "$ac_prog", so it can be a program name with args.
4503 set dummy $ac_prog; ac_word=$2
4504 echo "$as_me:4504: checking for $ac_word" >&5
4505 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4506 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4507   echo $ECHO_N "(cached) $ECHO_C" >&6
4508 else
4509   if test -n "$BUILD_CC"; then
4510   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4511 else
4512   ac_save_IFS=$IFS; IFS=$ac_path_separator
4513 ac_dummy="$PATH"
4514 for ac_dir in $ac_dummy; do
4515   IFS=$ac_save_IFS
4516   test -z "$ac_dir" && ac_dir=.
4517   $as_executable_p "$ac_dir/$ac_word" || continue
4518 ac_cv_prog_BUILD_CC="$ac_prog"
4519 echo "$as_me:4519: found $ac_dir/$ac_word" >&5
4520 break
4521 done
4522
4523 fi
4524 fi
4525 BUILD_CC=$ac_cv_prog_BUILD_CC
4526 if test -n "$BUILD_CC"; then
4527   echo "$as_me:4527: result: $BUILD_CC" >&5
4528 echo "${ECHO_T}$BUILD_CC" >&6
4529 else
4530   echo "$as_me:4530: result: no" >&5
4531 echo "${ECHO_T}no" >&6
4532 fi
4533
4534   test -n "$BUILD_CC" && break
4535 done
4536
4537 fi;
4538         echo "$as_me:4538: checking for native build C compiler" >&5
4539 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4540         echo "$as_me:4540: result: $BUILD_CC" >&5
4541 echo "${ECHO_T}$BUILD_CC" >&6
4542
4543         echo "$as_me:4543: checking for native build C preprocessor" >&5
4544 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4545
4546 # Check whether --with-build-cpp or --without-build-cpp was given.
4547 if test "${with_build_cpp+set}" = set; then
4548   withval="$with_build_cpp"
4549   BUILD_CPP="$withval"
4550 else
4551   BUILD_CPP='${BUILD_CC} -E'
4552 fi;
4553         echo "$as_me:4553: result: $BUILD_CPP" >&5
4554 echo "${ECHO_T}$BUILD_CPP" >&6
4555
4556         echo "$as_me:4556: checking for native build C flags" >&5
4557 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4558
4559 # Check whether --with-build-cflags or --without-build-cflags was given.
4560 if test "${with_build_cflags+set}" = set; then
4561   withval="$with_build_cflags"
4562   BUILD_CFLAGS="$withval"
4563 fi;
4564         echo "$as_me:4564: result: $BUILD_CFLAGS" >&5
4565 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4566
4567         echo "$as_me:4567: checking for native build C preprocessor-flags" >&5
4568 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4569
4570 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4571 if test "${with_build_cppflags+set}" = set; then
4572   withval="$with_build_cppflags"
4573   BUILD_CPPFLAGS="$withval"
4574 fi;
4575         echo "$as_me:4575: result: $BUILD_CPPFLAGS" >&5
4576 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4577
4578         echo "$as_me:4578: checking for native build linker-flags" >&5
4579 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4580
4581 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4582 if test "${with_build_ldflags+set}" = set; then
4583   withval="$with_build_ldflags"
4584   BUILD_LDFLAGS="$withval"
4585 fi;
4586         echo "$as_me:4586: result: $BUILD_LDFLAGS" >&5
4587 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4588
4589         echo "$as_me:4589: checking for native build linker-libraries" >&5
4590 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4591
4592 # Check whether --with-build-libs or --without-build-libs was given.
4593 if test "${with_build_libs+set}" = set; then
4594   withval="$with_build_libs"
4595   BUILD_LIBS="$withval"
4596 fi;
4597         echo "$as_me:4597: result: $BUILD_LIBS" >&5
4598 echo "${ECHO_T}$BUILD_LIBS" >&6
4599
4600         # this assumes we're on Unix.
4601         BUILD_EXEEXT=
4602         BUILD_OBJEXT=o
4603
4604         : ${BUILD_CC:='${CC}'}
4605
4606         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4607                 { { echo "$as_me:4607: error: Cross-build requires two compilers.
4608 Use --with-build-cc to specify the native compiler." >&5
4609 echo "$as_me: error: Cross-build requires two compilers.
4610 Use --with-build-cc to specify the native compiler." >&2;}
4611    { (exit 1); exit 1; }; }
4612         fi
4613
4614 else
4615         : ${BUILD_CC:='${CC}'}
4616         : ${BUILD_CPP:='${CPP}'}
4617         : ${BUILD_CFLAGS:='${CFLAGS}'}
4618         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4619         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4620         : ${BUILD_LIBS:='${LIBS}'}
4621         : ${BUILD_EXEEXT:='$x'}
4622         : ${BUILD_OBJEXT:='o'}
4623 fi
4624
4625 ###############################################################################
4626
4627 ### Options to allow the user to specify the set of libraries which are used.
4628 ### Use "--without-normal --with-shared" to allow the default model to be
4629 ### shared, for example.
4630 cf_list_models=""
4631
4632 echo "$as_me:4632: checking if libtool -version-number should be used" >&5
4633 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4634
4635 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4636 if test "${enable_libtool_version+set}" = set; then
4637   enableval="$enable_libtool_version"
4638   test "$enableval" != no && enableval=yes
4639         if test "$enableval" != "yes" ; then
4640     cf_libtool_version=no
4641         else
4642                 cf_libtool_version=yes
4643         fi
4644 else
4645   enableval=yes
4646         cf_libtool_version=yes
4647
4648 fi;
4649 echo "$as_me:4649: result: $cf_libtool_version" >&5
4650 echo "${ECHO_T}$cf_libtool_version" >&6
4651
4652 if test "$cf_libtool_version" = yes ; then
4653         LIBTOOL_VERSION="-version-number"
4654 else
4655         LIBTOOL_VERSION="-version-info"
4656         case "x$VERSION" in
4657         (x)
4658                 { echo "$as_me:4658: WARNING: VERSION was not set" >&5
4659 echo "$as_me: WARNING: VERSION was not set" >&2;}
4660                 ;;
4661         (x*.*.*)
4662                 ABI_VERSION="$VERSION"
4663                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4664
4665 echo "${as_me:-configure}:4665: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4666
4667                 ;;
4668         (x*:*:*)
4669                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4670                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4671
4672 echo "${as_me:-configure}:4672: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4673
4674                 ;;
4675         (*)
4676                 { echo "$as_me:4676: WARNING: unexpected VERSION value: $VERSION" >&5
4677 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4678                 ;;
4679         esac
4680 fi
4681
4682 LIBTOOL=
4683
4684 # common library maintenance symbols that are convenient for libtool scripts:
4685 LIB_CREATE='${AR} -cr'
4686 LIB_OBJECT='${OBJECTS}'
4687 LIB_SUFFIX=.a
4688 LIB_PREP="$RANLIB"
4689
4690 # symbols used to prop libtool up to enable it to determine what it should be
4691 # doing:
4692 LIB_CLEAN=
4693 LIB_COMPILE=
4694 LIB_LINK='${CC}'
4695 LIB_INSTALL=
4696 LIB_UNINSTALL=
4697
4698 echo "$as_me:4698: checking if you want to build libraries with libtool" >&5
4699 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4700
4701 # Check whether --with-libtool or --without-libtool was given.
4702 if test "${with_libtool+set}" = set; then
4703   withval="$with_libtool"
4704   with_libtool=$withval
4705 else
4706   with_libtool=no
4707 fi;
4708 echo "$as_me:4708: result: $with_libtool" >&5
4709 echo "${ECHO_T}$with_libtool" >&6
4710 if test "$with_libtool" != "no"; then
4711
4712         if test "$with_libtool" != "yes" ; then
4713
4714 if test "x$prefix" != xNONE; then
4715         cf_path_syntax="$prefix"
4716 else
4717         cf_path_syntax="$ac_default_prefix"
4718 fi
4719
4720 case ".$with_libtool" in
4721 (.\$\(*\)*|.\'*\'*)
4722         ;;
4723 (..|./*|.\\*)
4724         ;;
4725 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4726         ;;
4727 (.\${*prefix}*|.\${*dir}*)
4728         eval with_libtool="$with_libtool"
4729         case ".$with_libtool" in
4730         (.NONE/*)
4731                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4732                 ;;
4733         esac
4734         ;;
4735 (.no|.NONE/*)
4736         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4737         ;;
4738 (*)
4739         { { echo "$as_me:4739: error: expected a pathname, not \"$with_libtool\"" >&5
4740 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4741    { (exit 1); exit 1; }; }
4742         ;;
4743 esac
4744
4745                 LIBTOOL=$with_libtool
4746         else
4747                 if test -n "$ac_tool_prefix"; then
4748   for ac_prog in libtool glibtool
4749   do
4750     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4751 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4752 echo "$as_me:4752: checking for $ac_word" >&5
4753 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4754 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4755   echo $ECHO_N "(cached) $ECHO_C" >&6
4756 else
4757   if test -n "$LIBTOOL"; then
4758   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4759 else
4760   ac_save_IFS=$IFS; IFS=$ac_path_separator
4761 ac_dummy="$PATH"
4762 for ac_dir in $ac_dummy; do
4763   IFS=$ac_save_IFS
4764   test -z "$ac_dir" && ac_dir=.
4765   $as_executable_p "$ac_dir/$ac_word" || continue
4766 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4767 echo "$as_me:4767: found $ac_dir/$ac_word" >&5
4768 break
4769 done
4770
4771 fi
4772 fi
4773 LIBTOOL=$ac_cv_prog_LIBTOOL
4774 if test -n "$LIBTOOL"; then
4775   echo "$as_me:4775: result: $LIBTOOL" >&5
4776 echo "${ECHO_T}$LIBTOOL" >&6
4777 else
4778   echo "$as_me:4778: result: no" >&5
4779 echo "${ECHO_T}no" >&6
4780 fi
4781
4782     test -n "$LIBTOOL" && break
4783   done
4784 fi
4785 if test -z "$LIBTOOL"; then
4786   ac_ct_LIBTOOL=$LIBTOOL
4787   for ac_prog in libtool glibtool
4788 do
4789   # Extract the first word of "$ac_prog", so it can be a program name with args.
4790 set dummy $ac_prog; ac_word=$2
4791 echo "$as_me:4791: checking for $ac_word" >&5
4792 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4793 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4794   echo $ECHO_N "(cached) $ECHO_C" >&6
4795 else
4796   if test -n "$ac_ct_LIBTOOL"; then
4797   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4798 else
4799   ac_save_IFS=$IFS; IFS=$ac_path_separator
4800 ac_dummy="$PATH"
4801 for ac_dir in $ac_dummy; do
4802   IFS=$ac_save_IFS
4803   test -z "$ac_dir" && ac_dir=.
4804   $as_executable_p "$ac_dir/$ac_word" || continue
4805 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4806 echo "$as_me:4806: found $ac_dir/$ac_word" >&5
4807 break
4808 done
4809
4810 fi
4811 fi
4812 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4813 if test -n "$ac_ct_LIBTOOL"; then
4814   echo "$as_me:4814: result: $ac_ct_LIBTOOL" >&5
4815 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4816 else
4817   echo "$as_me:4817: result: no" >&5
4818 echo "${ECHO_T}no" >&6
4819 fi
4820
4821   test -n "$ac_ct_LIBTOOL" && break
4822 done
4823 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4824
4825   LIBTOOL=$ac_ct_LIBTOOL
4826 fi
4827
4828 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4829 then
4830         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.].*//'`
4831 else
4832         cf_cv_libtool_version=
4833 fi
4834 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4835
4836                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4837                 then
4838
4839 unset ac_cv_prog_ac_ct_LIBTOOL
4840 unset ac_ct_LIBTOOL
4841 unset LIBTOOL
4842
4843                         if test -n "$ac_tool_prefix"; then
4844   for ac_prog in glibtool
4845   do
4846     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4847 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4848 echo "$as_me:4848: checking for $ac_word" >&5
4849 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4850 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4851   echo $ECHO_N "(cached) $ECHO_C" >&6
4852 else
4853   if test -n "$LIBTOOL"; then
4854   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4855 else
4856   ac_save_IFS=$IFS; IFS=$ac_path_separator
4857 ac_dummy="$PATH"
4858 for ac_dir in $ac_dummy; do
4859   IFS=$ac_save_IFS
4860   test -z "$ac_dir" && ac_dir=.
4861   $as_executable_p "$ac_dir/$ac_word" || continue
4862 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4863 echo "$as_me:4863: found $ac_dir/$ac_word" >&5
4864 break
4865 done
4866
4867 fi
4868 fi
4869 LIBTOOL=$ac_cv_prog_LIBTOOL
4870 if test -n "$LIBTOOL"; then
4871   echo "$as_me:4871: result: $LIBTOOL" >&5
4872 echo "${ECHO_T}$LIBTOOL" >&6
4873 else
4874   echo "$as_me:4874: result: no" >&5
4875 echo "${ECHO_T}no" >&6
4876 fi
4877
4878     test -n "$LIBTOOL" && break
4879   done
4880 fi
4881 if test -z "$LIBTOOL"; then
4882   ac_ct_LIBTOOL=$LIBTOOL
4883   for ac_prog in glibtool
4884 do
4885   # Extract the first word of "$ac_prog", so it can be a program name with args.
4886 set dummy $ac_prog; ac_word=$2
4887 echo "$as_me:4887: checking for $ac_word" >&5
4888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4889 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4890   echo $ECHO_N "(cached) $ECHO_C" >&6
4891 else
4892   if test -n "$ac_ct_LIBTOOL"; then
4893   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4894 else
4895   ac_save_IFS=$IFS; IFS=$ac_path_separator
4896 ac_dummy="$PATH"
4897 for ac_dir in $ac_dummy; do
4898   IFS=$ac_save_IFS
4899   test -z "$ac_dir" && ac_dir=.
4900   $as_executable_p "$ac_dir/$ac_word" || continue
4901 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4902 echo "$as_me:4902: found $ac_dir/$ac_word" >&5
4903 break
4904 done
4905
4906 fi
4907 fi
4908 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4909 if test -n "$ac_ct_LIBTOOL"; then
4910   echo "$as_me:4910: result: $ac_ct_LIBTOOL" >&5
4911 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4912 else
4913   echo "$as_me:4913: result: no" >&5
4914 echo "${ECHO_T}no" >&6
4915 fi
4916
4917   test -n "$ac_ct_LIBTOOL" && break
4918 done
4919 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4920
4921   LIBTOOL=$ac_ct_LIBTOOL
4922 fi
4923
4924 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4925 then
4926         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.].*//'`
4927 else
4928         cf_cv_libtool_version=
4929 fi
4930 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4931
4932                 fi
4933         fi
4934         if test -z "$LIBTOOL" ; then
4935                 { { echo "$as_me:4935: error: Cannot find libtool" >&5
4936 echo "$as_me: error: Cannot find libtool" >&2;}
4937    { (exit 1); exit 1; }; }
4938         fi
4939         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4940         LIB_OBJECT='${OBJECTS:.o=.lo}'
4941         LIB_SUFFIX=.la
4942         LIB_CLEAN='${LIBTOOL} --mode=clean'
4943         LIB_COMPILE='${LIBTOOL} --mode=compile'
4944         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4945         LIB_INSTALL='${LIBTOOL} --mode=install'
4946         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4947         LIB_PREP=:
4948
4949 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4950 then
4951         echo "$as_me:4951: checking version of $LIBTOOL" >&5
4952 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4953
4954 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4955 then
4956         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.].*//'`
4957 else
4958         cf_cv_libtool_version=
4959 fi
4960 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4961
4962         echo "$as_me:4962: result: $cf_cv_libtool_version" >&5
4963 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4964         if test -z "$cf_cv_libtool_version" ; then
4965                 { { echo "$as_me:4965: error: This is not GNU libtool" >&5
4966 echo "$as_me: error: This is not GNU libtool" >&2;}
4967    { (exit 1); exit 1; }; }
4968         fi
4969 else
4970         { { echo "$as_me:4970: error: GNU libtool has not been found" >&5
4971 echo "$as_me: error: GNU libtool has not been found" >&2;}
4972    { (exit 1); exit 1; }; }
4973 fi
4974
4975         # special hack to add -no-undefined (which libtool should do for itself)
4976         LT_UNDEF=
4977         case "$cf_cv_system_name" in
4978         (cygwin*|msys*|mingw32*|uwin*|aix[4-7])
4979                 LT_UNDEF=-no-undefined
4980                 ;;
4981         esac
4982
4983         # special hack to add --tag option for C++ compiler
4984         case $cf_cv_libtool_version in
4985         (1.[5-9]*|[2-9].[0-9.a-z]*)
4986                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4987                 LIBTOOL="$LIBTOOL --tag=CC"
4988                 ;;
4989         (*)
4990                 LIBTOOL_CXX="$LIBTOOL"
4991                 ;;
4992         esac
4993 else
4994         LIBTOOL=""
4995         LIBTOOL_CXX=""
4996 fi
4997
4998 test -z "$LIBTOOL" && ECHO_LT=
4999
5000 if test "$with_libtool" != "no" ; then
5001
5002 cf_list_models="$cf_list_models libtool"
5003
5004 else
5005
5006 echo "$as_me:5006: checking if you want to build shared libraries" >&5
5007 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5008
5009 # Check whether --with-shared or --without-shared was given.
5010 if test "${with_shared+set}" = set; then
5011   withval="$with_shared"
5012   with_shared=$withval
5013 else
5014   with_shared=no
5015 fi;
5016 echo "$as_me:5016: result: $with_shared" >&5
5017 echo "${ECHO_T}$with_shared" >&6
5018 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5019
5020 echo "$as_me:5020: checking if you want to build static libraries" >&5
5021 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5022
5023 # Check whether --with-normal or --without-normal was given.
5024 if test "${with_normal+set}" = set; then
5025   withval="$with_normal"
5026   with_normal=$withval
5027 else
5028   with_normal=yes
5029 fi;
5030 echo "$as_me:5030: result: $with_normal" >&5
5031 echo "${ECHO_T}$with_normal" >&6
5032 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5033
5034 echo "$as_me:5034: checking if you want to build debug libraries" >&5
5035 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5036
5037 # Check whether --with-debug or --without-debug was given.
5038 if test "${with_debug+set}" = set; then
5039   withval="$with_debug"
5040   with_debug=$withval
5041 else
5042   with_debug=yes
5043 fi;
5044 echo "$as_me:5044: result: $with_debug" >&5
5045 echo "${ECHO_T}$with_debug" >&6
5046 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5047
5048 echo "$as_me:5048: checking if you want to build profiling libraries" >&5
5049 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5050
5051 # Check whether --with-profile or --without-profile was given.
5052 if test "${with_profile+set}" = set; then
5053   withval="$with_profile"
5054   with_profile=$withval
5055 else
5056   with_profile=no
5057 fi;
5058 echo "$as_me:5058: result: $with_profile" >&5
5059 echo "${ECHO_T}$with_profile" >&6
5060 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5061
5062 fi
5063
5064 if test "X$cf_with_cxx_binding" != Xno; then
5065 if test "x$with_shared" = "xyes"; then
5066 echo "$as_me:5066: checking if you want to build C++ shared libraries" >&5
5067 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5068
5069 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5070 if test "${with_cxx_shared+set}" = set; then
5071   withval="$with_cxx_shared"
5072   with_shared_cxx=$withval
5073 else
5074   with_shared_cxx=no
5075 fi;
5076 echo "$as_me:5076: result: $with_shared_cxx" >&5
5077 echo "${ECHO_T}$with_shared_cxx" >&6
5078 fi
5079 fi
5080
5081 ###############################################################################
5082
5083 echo "$as_me:5083: checking for specified models" >&5
5084 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5085 test -z "$cf_list_models" && cf_list_models=normal
5086 test "$with_libtool" != "no" && cf_list_models=libtool
5087 echo "$as_me:5087: result: $cf_list_models" >&5
5088 echo "${ECHO_T}$cf_list_models" >&6
5089
5090 ### Use the first model as the default, and save its suffix for use in building
5091 ### up test-applications.
5092 echo "$as_me:5092: checking for default model" >&5
5093 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5094 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5095 echo "$as_me:5095: result: $DFT_LWR_MODEL" >&5
5096 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5097
5098 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5099
5100 TICS_NAME=tic
5101
5102 TINFO_NAME=tinfo
5103
5104 LIB_NAME=ncurses
5105
5106 LIB_DIR=../lib
5107 LIB_2ND=../../lib
5108
5109 echo "$as_me:5109: checking if you want to have a library-prefix" >&5
5110 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5111
5112 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5113 if test "${with_lib_prefix+set}" = set; then
5114   withval="$with_lib_prefix"
5115   with_lib_prefix=$withval
5116 else
5117   with_lib_prefix=auto
5118 fi;
5119 echo "$as_me:5119: result: $with_lib_prefix" >&5
5120 echo "${ECHO_T}$with_lib_prefix" >&6
5121
5122 if test $with_lib_prefix = auto
5123 then
5124
5125         case $cf_cv_system_name in
5126         (OS/2*|os2*)
5127                 LIB_PREFIX=''
5128                 ;;
5129         (*)     LIB_PREFIX='lib'
5130                 ;;
5131         esac
5132 cf_prefix=$LIB_PREFIX
5133
5134 elif test $with_lib_prefix = no
5135 then
5136         LIB_PREFIX=
5137 else
5138         LIB_PREFIX=$with_lib_prefix
5139 fi
5140
5141 LIB_SUFFIX=
5142
5143         echo "$as_me:5143: checking for PATH separator" >&5
5144 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5145         case $cf_cv_system_name in
5146         (os2*)  PATH_SEPARATOR=';'  ;;
5147         (*)     ${PATH_SEPARATOR:=':'}  ;;
5148         esac
5149
5150         echo "$as_me:5150: result: $PATH_SEPARATOR" >&5
5151 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5152
5153 ###############################################################################
5154
5155 echo "$as_me:5155: checking if you want to build a separate terminfo library" >&5
5156 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5157
5158 # Check whether --with-termlib or --without-termlib was given.
5159 if test "${with_termlib+set}" = set; then
5160   withval="$with_termlib"
5161   with_termlib=$withval
5162 else
5163   with_termlib=no
5164 fi;
5165 echo "$as_me:5165: result: $with_termlib" >&5
5166 echo "${ECHO_T}$with_termlib" >&6
5167
5168 echo "$as_me:5168: checking if you want to build a separate tic library" >&5
5169 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5170
5171 # Check whether --with-ticlib or --without-ticlib was given.
5172 if test "${with_ticlib+set}" = set; then
5173   withval="$with_ticlib"
5174   with_ticlib=$withval
5175 else
5176   with_ticlib=no
5177 fi;
5178 echo "$as_me:5178: result: $with_ticlib" >&5
5179 echo "${ECHO_T}$with_ticlib" >&6
5180
5181 ### Checks for special libraries, must be done up-front.
5182 SHLIB_LIST=""
5183
5184 echo "$as_me:5184: checking if you want to link with the GPM mouse library" >&5
5185 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5186
5187 # Check whether --with-gpm or --without-gpm was given.
5188 if test "${with_gpm+set}" = set; then
5189   withval="$with_gpm"
5190   with_gpm=$withval
5191 else
5192   with_gpm=maybe
5193 fi;
5194 echo "$as_me:5194: result: $with_gpm" >&5
5195 echo "${ECHO_T}$with_gpm" >&6
5196
5197 if test "$with_gpm" != no ; then
5198         echo "$as_me:5198: checking for gpm.h" >&5
5199 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5200 if test "${ac_cv_header_gpm_h+set}" = set; then
5201   echo $ECHO_N "(cached) $ECHO_C" >&6
5202 else
5203   cat >conftest.$ac_ext <<_ACEOF
5204 #line 5204 "configure"
5205 #include "confdefs.h"
5206 #include <gpm.h>
5207 _ACEOF
5208 if { (eval echo "$as_me:5208: \"$ac_cpp conftest.$ac_ext\"") >&5
5209   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5210   ac_status=$?
5211   egrep -v '^ *\+' conftest.er1 >conftest.err
5212   rm -f conftest.er1
5213   cat conftest.err >&5
5214   echo "$as_me:5214: \$? = $ac_status" >&5
5215   (exit $ac_status); } >/dev/null; then
5216   if test -s conftest.err; then
5217     ac_cpp_err=$ac_c_preproc_warn_flag
5218   else
5219     ac_cpp_err=
5220   fi
5221 else
5222   ac_cpp_err=yes
5223 fi
5224 if test -z "$ac_cpp_err"; then
5225   ac_cv_header_gpm_h=yes
5226 else
5227   echo "$as_me: failed program was:" >&5
5228   cat conftest.$ac_ext >&5
5229   ac_cv_header_gpm_h=no
5230 fi
5231 rm -f conftest.err conftest.$ac_ext
5232 fi
5233 echo "$as_me:5233: result: $ac_cv_header_gpm_h" >&5
5234 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5235 if test $ac_cv_header_gpm_h = yes; then
5236
5237 cat >>confdefs.h <<\EOF
5238 #define HAVE_GPM_H 1
5239 EOF
5240
5241                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5242                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5243
5244 echo "${as_me:-configure}:5244: testing assuming we really have GPM library ..." 1>&5
5245
5246 cat >>confdefs.h <<\EOF
5247 #define HAVE_LIBGPM 1
5248 EOF
5249
5250                 else
5251                         echo "$as_me:5251: checking for Gpm_Open in -lgpm" >&5
5252 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5253 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5254   echo $ECHO_N "(cached) $ECHO_C" >&6
5255 else
5256   ac_check_lib_save_LIBS=$LIBS
5257 LIBS="-lgpm  $LIBS"
5258 cat >conftest.$ac_ext <<_ACEOF
5259 #line 5259 "configure"
5260 #include "confdefs.h"
5261
5262 /* Override any gcc2 internal prototype to avoid an error.  */
5263 #ifdef __cplusplus
5264 extern "C"
5265 #endif
5266 /* We use char because int might match the return type of a gcc2
5267    builtin and then its argument prototype would still apply.  */
5268 char Gpm_Open ();
5269 int
5270 main ()
5271 {
5272 Gpm_Open ();
5273   ;
5274   return 0;
5275 }
5276 _ACEOF
5277 rm -f conftest.$ac_objext conftest$ac_exeext
5278 if { (eval echo "$as_me:5278: \"$ac_link\"") >&5
5279   (eval $ac_link) 2>&5
5280   ac_status=$?
5281   echo "$as_me:5281: \$? = $ac_status" >&5
5282   (exit $ac_status); } &&
5283          { ac_try='test -s conftest$ac_exeext'
5284   { (eval echo "$as_me:5284: \"$ac_try\"") >&5
5285   (eval $ac_try) 2>&5
5286   ac_status=$?
5287   echo "$as_me:5287: \$? = $ac_status" >&5
5288   (exit $ac_status); }; }; then
5289   ac_cv_lib_gpm_Gpm_Open=yes
5290 else
5291   echo "$as_me: failed program was:" >&5
5292 cat conftest.$ac_ext >&5
5293 ac_cv_lib_gpm_Gpm_Open=no
5294 fi
5295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5296 LIBS=$ac_check_lib_save_LIBS
5297 fi
5298 echo "$as_me:5298: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5299 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5300 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5301   :
5302 else
5303
5304                                 { { echo "$as_me:5304: error: Cannot link with GPM library" >&5
5305 echo "$as_me: error: Cannot link with GPM library" >&2;}
5306    { (exit 1); exit 1; }; }
5307                 fi
5308                 with_gpm=yes
5309
5310 fi
5311
5312 else
5313
5314                 test "$with_gpm" != maybe && { echo "$as_me:5314: WARNING: Cannot find GPM header" >&5
5315 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5316                 with_gpm=no
5317
5318 fi
5319
5320 fi
5321
5322 if test "$with_gpm" != no ; then
5323         echo "$as_me:5323: checking if you want to load GPM dynamically" >&5
5324 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5325
5326 # Check whether --with-dlsym or --without-dlsym was given.
5327 if test "${with_dlsym+set}" = set; then
5328   withval="$with_dlsym"
5329   with_dlsym=$withval
5330 else
5331   with_dlsym=yes
5332 fi;
5333         echo "$as_me:5333: result: $with_dlsym" >&5
5334 echo "${ECHO_T}$with_dlsym" >&6
5335         if test "x$with_dlsym" = xyes ; then
5336
5337 cf_have_dlsym=no
5338 echo "$as_me:5338: checking for dlsym" >&5
5339 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5340 if test "${ac_cv_func_dlsym+set}" = set; then
5341   echo $ECHO_N "(cached) $ECHO_C" >&6
5342 else
5343   cat >conftest.$ac_ext <<_ACEOF
5344 #line 5344 "configure"
5345 #include "confdefs.h"
5346 /* System header to define __stub macros and hopefully few prototypes,
5347     which can conflict with char dlsym (); below.  */
5348 #include <assert.h>
5349 /* Override any gcc2 internal prototype to avoid an error.  */
5350 #ifdef __cplusplus
5351 extern "C"
5352 #endif
5353 /* We use char because int might match the return type of a gcc2
5354    builtin and then its argument prototype would still apply.  */
5355 char dlsym ();
5356 char (*f) ();
5357
5358 int
5359 main ()
5360 {
5361 /* The GNU C library defines this for functions which it implements
5362     to always fail with ENOSYS.  Some functions are actually named
5363     something starting with __ and the normal name is an alias.  */
5364 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5365 choke me
5366 #else
5367 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5368 #endif
5369
5370   ;
5371   return 0;
5372 }
5373 _ACEOF
5374 rm -f conftest.$ac_objext conftest$ac_exeext
5375 if { (eval echo "$as_me:5375: \"$ac_link\"") >&5
5376   (eval $ac_link) 2>&5
5377   ac_status=$?
5378   echo "$as_me:5378: \$? = $ac_status" >&5
5379   (exit $ac_status); } &&
5380          { ac_try='test -s conftest$ac_exeext'
5381   { (eval echo "$as_me:5381: \"$ac_try\"") >&5
5382   (eval $ac_try) 2>&5
5383   ac_status=$?
5384   echo "$as_me:5384: \$? = $ac_status" >&5
5385   (exit $ac_status); }; }; then
5386   ac_cv_func_dlsym=yes
5387 else
5388   echo "$as_me: failed program was:" >&5
5389 cat conftest.$ac_ext >&5
5390 ac_cv_func_dlsym=no
5391 fi
5392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5393 fi
5394 echo "$as_me:5394: result: $ac_cv_func_dlsym" >&5
5395 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5396 if test $ac_cv_func_dlsym = yes; then
5397   cf_have_dlsym=yes
5398 else
5399
5400 cf_have_libdl=no
5401 echo "$as_me:5401: checking for dlsym in -ldl" >&5
5402 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5403 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5404   echo $ECHO_N "(cached) $ECHO_C" >&6
5405 else
5406   ac_check_lib_save_LIBS=$LIBS
5407 LIBS="-ldl  $LIBS"
5408 cat >conftest.$ac_ext <<_ACEOF
5409 #line 5409 "configure"
5410 #include "confdefs.h"
5411
5412 /* Override any gcc2 internal prototype to avoid an error.  */
5413 #ifdef __cplusplus
5414 extern "C"
5415 #endif
5416 /* We use char because int might match the return type of a gcc2
5417    builtin and then its argument prototype would still apply.  */
5418 char dlsym ();
5419 int
5420 main ()
5421 {
5422 dlsym ();
5423   ;
5424   return 0;
5425 }
5426 _ACEOF
5427 rm -f conftest.$ac_objext conftest$ac_exeext
5428 if { (eval echo "$as_me:5428: \"$ac_link\"") >&5
5429   (eval $ac_link) 2>&5
5430   ac_status=$?
5431   echo "$as_me:5431: \$? = $ac_status" >&5
5432   (exit $ac_status); } &&
5433          { ac_try='test -s conftest$ac_exeext'
5434   { (eval echo "$as_me:5434: \"$ac_try\"") >&5
5435   (eval $ac_try) 2>&5
5436   ac_status=$?
5437   echo "$as_me:5437: \$? = $ac_status" >&5
5438   (exit $ac_status); }; }; then
5439   ac_cv_lib_dl_dlsym=yes
5440 else
5441   echo "$as_me: failed program was:" >&5
5442 cat conftest.$ac_ext >&5
5443 ac_cv_lib_dl_dlsym=no
5444 fi
5445 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5446 LIBS=$ac_check_lib_save_LIBS
5447 fi
5448 echo "$as_me:5448: result: $ac_cv_lib_dl_dlsym" >&5
5449 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5450 if test $ac_cv_lib_dl_dlsym = yes; then
5451
5452         cf_have_dlsym=yes
5453         cf_have_libdl=yes
5454 fi
5455
5456 fi
5457
5458 if test "$cf_have_dlsym" = yes ; then
5459         test "$cf_have_libdl" = yes && {
5460 cf_add_libs="-ldl"
5461 # Filter out duplicates - this happens with badly-designed ".pc" files...
5462 for cf_add_1lib in $LIBS
5463 do
5464         for cf_add_2lib in $cf_add_libs
5465         do
5466                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5467                 then
5468                         cf_add_1lib=
5469                         break
5470                 fi
5471         done
5472         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5473 done
5474 LIBS="$cf_add_libs"
5475  }
5476
5477         echo "$as_me:5477: checking whether able to link to dl*() functions" >&5
5478 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5479         cat >conftest.$ac_ext <<_ACEOF
5480 #line 5480 "configure"
5481 #include "confdefs.h"
5482 #include <dlfcn.h>
5483 int
5484 main ()
5485 {
5486
5487                 void *obj;
5488                 if ((obj = dlopen("filename", 0)) != 0) {
5489                         if (dlsym(obj, "symbolname") == 0) {
5490                         dlclose(obj);
5491                         }
5492                 }
5493   ;
5494   return 0;
5495 }
5496 _ACEOF
5497 rm -f conftest.$ac_objext conftest$ac_exeext
5498 if { (eval echo "$as_me:5498: \"$ac_link\"") >&5
5499   (eval $ac_link) 2>&5
5500   ac_status=$?
5501   echo "$as_me:5501: \$? = $ac_status" >&5
5502   (exit $ac_status); } &&
5503          { ac_try='test -s conftest$ac_exeext'
5504   { (eval echo "$as_me:5504: \"$ac_try\"") >&5
5505   (eval $ac_try) 2>&5
5506   ac_status=$?
5507   echo "$as_me:5507: \$? = $ac_status" >&5
5508   (exit $ac_status); }; }; then
5509
5510 cat >>confdefs.h <<\EOF
5511 #define HAVE_LIBDL 1
5512 EOF
5513
5514 else
5515   echo "$as_me: failed program was:" >&5
5516 cat conftest.$ac_ext >&5
5517
5518                 { { echo "$as_me:5518: error: Cannot link test program for libdl" >&5
5519 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5520    { (exit 1); exit 1; }; }
5521 fi
5522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5523         echo "$as_me:5523: result: ok" >&5
5524 echo "${ECHO_T}ok" >&6
5525 else
5526         { { echo "$as_me:5526: error: Cannot find dlsym function" >&5
5527 echo "$as_me: error: Cannot find dlsym function" >&2;}
5528    { (exit 1); exit 1; }; }
5529 fi
5530
5531                 if test "x$with_gpm" != xyes ; then
5532                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5533
5534 echo "${as_me:-configure}:5534: testing assuming soname for gpm is $with_gpm ..." 1>&5
5535
5536                         cf_cv_gpm_soname="$with_gpm"
5537                 else
5538
5539 echo "$as_me:5539: checking for soname of gpm library" >&5
5540 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5541 if test "${cf_cv_gpm_soname+set}" = set; then
5542   echo $ECHO_N "(cached) $ECHO_C" >&6
5543 else
5544
5545 cf_cv_gpm_soname=unknown
5546 if test "$cross_compiling" != yes ; then
5547 cat >conftest.$ac_ext <<CF_EOF
5548 #include <gpm.h>
5549 int main()
5550 {
5551 if (Gpm_Open(0,0)) Gpm_Close();
5552         ${cf_cv_main_return:-return}(0);
5553 }
5554 CF_EOF
5555 cf_save_LIBS="$LIBS"
5556
5557 cf_add_libs="-lgpm"
5558 # Filter out duplicates - this happens with badly-designed ".pc" files...
5559 for cf_add_1lib in $LIBS
5560 do
5561         for cf_add_2lib in $cf_add_libs
5562         do
5563                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5564                 then
5565                         cf_add_1lib=
5566                         break
5567                 fi
5568         done
5569         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5570 done
5571 LIBS="$cf_add_libs"
5572
5573         if { (eval echo "$as_me:5573: \"$ac_compile\"") >&5
5574   (eval $ac_compile) 2>&5
5575   ac_status=$?
5576   echo "$as_me:5576: \$? = $ac_status" >&5
5577   (exit $ac_status); } ; then
5578                 if { (eval echo "$as_me:5578: \"$ac_link\"") >&5
5579   (eval $ac_link) 2>&5
5580   ac_status=$?
5581   echo "$as_me:5581: \$? = $ac_status" >&5
5582   (exit $ac_status); } ; then
5583                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5584                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5585                 fi
5586         fi
5587 rm -rf conftest*
5588 LIBS="$cf_save_LIBS"
5589 fi
5590
5591 fi
5592 echo "$as_me:5592: result: $cf_cv_gpm_soname" >&5
5593 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5594
5595                 fi
5596                 test "$cf_cv_gpm_soname" != "unknown" &&
5597 cat >>confdefs.h <<EOF
5598 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5599 EOF
5600
5601                 SHLIB_LIST="-ldl $SHLIB_LIST"
5602         else
5603                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5604
5605 cf_add_libs="-lgpm"
5606 # Filter out duplicates - this happens with badly-designed ".pc" files...
5607 for cf_add_1lib in $TEST_LIBS
5608 do
5609         for cf_add_2lib in $cf_add_libs
5610         do
5611                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5612                 then
5613                         cf_add_1lib=
5614                         break
5615                 fi
5616         done
5617         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5618 done
5619 TEST_LIBS="$cf_add_libs"
5620
5621         fi
5622
5623 cat >>confdefs.h <<\EOF
5624 #define HAVE_LIBGPM 1
5625 EOF
5626
5627 echo "$as_me:5627: checking for Gpm_Wgetch in -lgpm" >&5
5628 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5629 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5630   echo $ECHO_N "(cached) $ECHO_C" >&6
5631 else
5632   ac_check_lib_save_LIBS=$LIBS
5633 LIBS="-lgpm  $LIBS"
5634 cat >conftest.$ac_ext <<_ACEOF
5635 #line 5635 "configure"
5636 #include "confdefs.h"
5637
5638 /* Override any gcc2 internal prototype to avoid an error.  */
5639 #ifdef __cplusplus
5640 extern "C"
5641 #endif
5642 /* We use char because int might match the return type of a gcc2
5643    builtin and then its argument prototype would still apply.  */
5644 char Gpm_Wgetch ();
5645 int
5646 main ()
5647 {
5648 Gpm_Wgetch ();
5649   ;
5650   return 0;
5651 }
5652 _ACEOF
5653 rm -f conftest.$ac_objext conftest$ac_exeext
5654 if { (eval echo "$as_me:5654: \"$ac_link\"") >&5
5655   (eval $ac_link) 2>&5
5656   ac_status=$?
5657   echo "$as_me:5657: \$? = $ac_status" >&5
5658   (exit $ac_status); } &&
5659          { ac_try='test -s conftest$ac_exeext'
5660   { (eval echo "$as_me:5660: \"$ac_try\"") >&5
5661   (eval $ac_try) 2>&5
5662   ac_status=$?
5663   echo "$as_me:5663: \$? = $ac_status" >&5
5664   (exit $ac_status); }; }; then
5665   ac_cv_lib_gpm_Gpm_Wgetch=yes
5666 else
5667   echo "$as_me: failed program was:" >&5
5668 cat conftest.$ac_ext >&5
5669 ac_cv_lib_gpm_Gpm_Wgetch=no
5670 fi
5671 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5672 LIBS=$ac_check_lib_save_LIBS
5673 fi
5674 echo "$as_me:5674: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5675 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5676 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5677
5678 echo "$as_me:5678: checking if GPM is weakly bound to curses library" >&5
5679 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5680 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5681   echo $ECHO_N "(cached) $ECHO_C" >&6
5682 else
5683
5684 cf_cv_check_gpm_wgetch=unknown
5685 if test "$cross_compiling" != yes ; then
5686
5687 cat >conftest.$ac_ext <<CF_EOF
5688 #include <gpm.h>
5689 int main()
5690 {
5691         Gpm_Wgetch();
5692         ${cf_cv_main_return:-return}(0);
5693 }
5694 CF_EOF
5695
5696         cf_save_LIBS="$LIBS"
5697         # This only works if we can look at the symbol table.  If a shared
5698         # library is stripped for install, we cannot use that.  So we're forced
5699         # to rely on the static library, noting that some packagers may not
5700         # include it.
5701         LIBS="-static -lgpm -dynamic $LIBS"
5702         if { (eval echo "$as_me:5702: \"$ac_compile\"") >&5
5703   (eval $ac_compile) 2>&5
5704   ac_status=$?
5705   echo "$as_me:5705: \$? = $ac_status" >&5
5706   (exit $ac_status); } ; then
5707                 if { (eval echo "$as_me:5707: \"$ac_link\"") >&5
5708   (eval $ac_link) 2>&5
5709   ac_status=$?
5710   echo "$as_me:5710: \$? = $ac_status" >&5
5711   (exit $ac_status); } ; then
5712                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5713                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5714                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5715                 fi
5716         fi
5717         rm -rf conftest*
5718         LIBS="$cf_save_LIBS"
5719 fi
5720
5721 fi
5722 echo "$as_me:5722: result: $cf_cv_check_gpm_wgetch" >&5
5723 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5724
5725 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5726         { echo "$as_me:5726: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5727 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5728 fi
5729
5730 fi
5731
5732 fi
5733
5734 # not everyone has "test -c"
5735 if test -c /dev/sysmouse 2>/dev/null ; then
5736 echo "$as_me:5736: checking if you want to use sysmouse" >&5
5737 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5738
5739 # Check whether --with-sysmouse or --without-sysmouse was given.
5740 if test "${with_sysmouse+set}" = set; then
5741   withval="$with_sysmouse"
5742   cf_with_sysmouse=$withval
5743 else
5744   cf_with_sysmouse=maybe
5745 fi;
5746         if test "$cf_with_sysmouse" != no ; then
5747         cat >conftest.$ac_ext <<_ACEOF
5748 #line 5748 "configure"
5749 #include "confdefs.h"
5750
5751 #include <osreldate.h>
5752 #if (__FreeBSD_version >= 400017)
5753 #include <sys/consio.h>
5754 #include <sys/fbio.h>
5755 #else
5756 #include <machine/console.h>
5757 #endif
5758
5759 int
5760 main ()
5761 {
5762
5763         struct mouse_info the_mouse;
5764         ioctl(0, CONS_MOUSECTL, &the_mouse);
5765
5766   ;
5767   return 0;
5768 }
5769 _ACEOF
5770 rm -f conftest.$ac_objext
5771 if { (eval echo "$as_me:5771: \"$ac_compile\"") >&5
5772   (eval $ac_compile) 2>&5
5773   ac_status=$?
5774   echo "$as_me:5774: \$? = $ac_status" >&5
5775   (exit $ac_status); } &&
5776          { ac_try='test -s conftest.$ac_objext'
5777   { (eval echo "$as_me:5777: \"$ac_try\"") >&5
5778   (eval $ac_try) 2>&5
5779   ac_status=$?
5780   echo "$as_me:5780: \$? = $ac_status" >&5
5781   (exit $ac_status); }; }; then
5782   cf_with_sysmouse=yes
5783 else
5784   echo "$as_me: failed program was:" >&5
5785 cat conftest.$ac_ext >&5
5786 cf_with_sysmouse=no
5787 fi
5788 rm -f conftest.$ac_objext conftest.$ac_ext
5789         fi
5790 echo "$as_me:5790: result: $cf_with_sysmouse" >&5
5791 echo "${ECHO_T}$cf_with_sysmouse" >&6
5792 test "$cf_with_sysmouse" = yes &&
5793 cat >>confdefs.h <<\EOF
5794 #define USE_SYSMOUSE 1
5795 EOF
5796
5797 fi
5798
5799 if test X"$CC_G_OPT" = X"" ; then
5800         CC_G_OPT='-g'
5801         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5802 fi
5803
5804 if test X"$CXX_G_OPT" = X"" ; then
5805         CXX_G_OPT='-g'
5806         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5807 fi
5808
5809 echo "$as_me:5809: checking for default loader flags" >&5
5810 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5811 case $DFT_LWR_MODEL in
5812 (libtool) LD_MODEL=''   ;;
5813 (normal)  LD_MODEL=''   ;;
5814 (debug)   LD_MODEL=$CC_G_OPT ;;
5815 (profile) LD_MODEL='-pg';;
5816 (shared)  LD_MODEL=''   ;;
5817 esac
5818 echo "$as_me:5818: result: $LD_MODEL" >&5
5819 echo "${ECHO_T}$LD_MODEL" >&6
5820
5821 case $DFT_LWR_MODEL in
5822 (shared)
5823
5824 echo "$as_me:5824: checking if rpath option should be used" >&5
5825 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5826
5827 # Check whether --enable-rpath or --disable-rpath was given.
5828 if test "${enable_rpath+set}" = set; then
5829   enableval="$enable_rpath"
5830   cf_cv_enable_rpath=$enableval
5831 else
5832   cf_cv_enable_rpath=no
5833 fi;
5834 echo "$as_me:5834: result: $cf_cv_enable_rpath" >&5
5835 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5836
5837 echo "$as_me:5837: checking if shared libraries should be relinked during install" >&5
5838 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5839
5840 # Check whether --enable-relink or --disable-relink was given.
5841 if test "${enable_relink+set}" = set; then
5842   enableval="$enable_relink"
5843   cf_cv_do_relink=$enableval
5844 else
5845   cf_cv_do_relink=yes
5846 fi;
5847 echo "$as_me:5847: result: $cf_cv_do_relink" >&5
5848 echo "${ECHO_T}$cf_cv_do_relink" >&6
5849         ;;
5850 esac
5851
5852 # we will build libraries one-level down.
5853 rel_builddir=..
5854
5855 LD_RPATH_OPT=
5856 echo "$as_me:5856: checking for an rpath option" >&5
5857 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5858 case $cf_cv_system_name in
5859 (irix*)
5860         if test "$GCC" = yes; then
5861                 LD_RPATH_OPT="-Wl,-rpath,"
5862         else
5863                 LD_RPATH_OPT="-rpath "
5864         fi
5865         ;;
5866 (linux*|gnu*|k*bsd*-gnu)
5867         LD_RPATH_OPT="-Wl,-rpath,"
5868         ;;
5869 (openbsd[2-9].*|mirbsd*)
5870         LD_RPATH_OPT="-Wl,-rpath,"
5871         ;;
5872 (dragonfly*|freebsd*)
5873         LD_RPATH_OPT="-rpath "
5874         ;;
5875 (netbsd*)
5876         LD_RPATH_OPT="-Wl,-rpath,"
5877         ;;
5878 (osf*|mls+*)
5879         LD_RPATH_OPT="-rpath "
5880         ;;
5881 (solaris2*)
5882         LD_RPATH_OPT="-R"
5883         ;;
5884 (*)
5885         ;;
5886 esac
5887 echo "$as_me:5887: result: $LD_RPATH_OPT" >&5
5888 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5889
5890 case "x$LD_RPATH_OPT" in
5891 (x-R*)
5892         echo "$as_me:5892: checking if we need a space after rpath option" >&5
5893 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5894         cf_save_LIBS="$LIBS"
5895
5896 cf_add_libs="${LD_RPATH_OPT}$libdir"
5897 # Filter out duplicates - this happens with badly-designed ".pc" files...
5898 for cf_add_1lib in $LIBS
5899 do
5900         for cf_add_2lib in $cf_add_libs
5901         do
5902                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5903                 then
5904                         cf_add_1lib=
5905                         break
5906                 fi
5907         done
5908         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5909 done
5910 LIBS="$cf_add_libs"
5911
5912         cat >conftest.$ac_ext <<_ACEOF
5913 #line 5913 "configure"
5914 #include "confdefs.h"
5915
5916 int
5917 main ()
5918 {
5919
5920   ;
5921   return 0;
5922 }
5923 _ACEOF
5924 rm -f conftest.$ac_objext conftest$ac_exeext
5925 if { (eval echo "$as_me:5925: \"$ac_link\"") >&5
5926   (eval $ac_link) 2>&5
5927   ac_status=$?
5928   echo "$as_me:5928: \$? = $ac_status" >&5
5929   (exit $ac_status); } &&
5930          { ac_try='test -s conftest$ac_exeext'
5931   { (eval echo "$as_me:5931: \"$ac_try\"") >&5
5932   (eval $ac_try) 2>&5
5933   ac_status=$?
5934   echo "$as_me:5934: \$? = $ac_status" >&5
5935   (exit $ac_status); }; }; then
5936   cf_rpath_space=no
5937 else
5938   echo "$as_me: failed program was:" >&5
5939 cat conftest.$ac_ext >&5
5940 cf_rpath_space=yes
5941 fi
5942 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5943         LIBS="$cf_save_LIBS"
5944         echo "$as_me:5944: result: $cf_rpath_space" >&5
5945 echo "${ECHO_T}$cf_rpath_space" >&6
5946         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5947         ;;
5948 esac
5949
5950         RM_SHARED_OPTS=
5951         LOCAL_LDFLAGS=
5952         LOCAL_LDFLAGS2=
5953         LD_SHARED_OPTS=
5954         INSTALL_LIB="-m 644"
5955         : ${rel_builddir:=.}
5956
5957         shlibdir=$libdir
5958
5959         MAKE_DLLS="#"
5960
5961         cf_cv_do_symlinks=no
5962         cf_ld_rpath_opt=
5963         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5964
5965         echo "$as_me:5965: checking if release/abi version should be used for shared libs" >&5
5966 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5967
5968 # Check whether --with-shlib-version or --without-shlib-version was given.
5969 if test "${with_shlib_version+set}" = set; then
5970   withval="$with_shlib_version"
5971   test -z "$withval" && withval=auto
5972         case $withval in
5973         (yes)
5974                 cf_cv_shlib_version=auto
5975                 ;;
5976         (rel|abi|auto)
5977                 cf_cv_shlib_version=$withval
5978                 ;;
5979         (*)
5980                 echo "$as_me:5980: result: $withval" >&5
5981 echo "${ECHO_T}$withval" >&6
5982                 { { echo "$as_me:5982: error: option value must be one of: rel, abi, or auto" >&5
5983 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5984    { (exit 1); exit 1; }; }
5985                 ;;
5986         esac
5987
5988 else
5989   cf_cv_shlib_version=auto
5990 fi;
5991         echo "$as_me:5991: result: $cf_cv_shlib_version" >&5
5992 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5993
5994         cf_cv_rm_so_locs=no
5995         cf_try_cflags=
5996
5997         # Some less-capable ports of gcc support only -fpic
5998         CC_SHARED_OPTS=
5999         if test "$GCC" = yes
6000         then
6001                 echo "$as_me:6001: checking which $CC option to use" >&5
6002 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6003                 cf_save_CFLAGS="$CFLAGS"
6004                 for CC_SHARED_OPTS in -fPIC -fpic ''
6005                 do
6006                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6007                         cat >conftest.$ac_ext <<_ACEOF
6008 #line 6008 "configure"
6009 #include "confdefs.h"
6010 #include <stdio.h>
6011 int
6012 main ()
6013 {
6014 int x = 1
6015   ;
6016   return 0;
6017 }
6018 _ACEOF
6019 rm -f conftest.$ac_objext
6020 if { (eval echo "$as_me:6020: \"$ac_compile\"") >&5
6021   (eval $ac_compile) 2>&5
6022   ac_status=$?
6023   echo "$as_me:6023: \$? = $ac_status" >&5
6024   (exit $ac_status); } &&
6025          { ac_try='test -s conftest.$ac_objext'
6026   { (eval echo "$as_me:6026: \"$ac_try\"") >&5
6027   (eval $ac_try) 2>&5
6028   ac_status=$?
6029   echo "$as_me:6029: \$? = $ac_status" >&5
6030   (exit $ac_status); }; }; then
6031   break
6032 else
6033   echo "$as_me: failed program was:" >&5
6034 cat conftest.$ac_ext >&5
6035 fi
6036 rm -f conftest.$ac_objext conftest.$ac_ext
6037                 done
6038                 echo "$as_me:6038: result: $CC_SHARED_OPTS" >&5
6039 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6040                 CFLAGS="$cf_save_CFLAGS"
6041         fi
6042
6043         cf_cv_shlib_version_infix=no
6044
6045         case $cf_cv_system_name in
6046         (aix4.3-9*|aix[5-7]*)
6047                 if test "$GCC" = yes; then
6048                         CC_SHARED_OPTS='-Wl,-brtl'
6049                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6050                 else
6051                         CC_SHARED_OPTS='-brtl'
6052                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6053                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6054                 fi
6055                 ;;
6056         (beos*)
6057                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6058                 ;;
6059         (cygwin*)
6060                 CC_SHARED_OPTS=
6061                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6062                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6063                 cf_cv_shlib_version=cygdll
6064                 cf_cv_shlib_version_infix=cygdll
6065                 shlibdir=$bindir
6066                 MAKE_DLLS=
6067                 cat >mk_shared_lib.sh <<-CF_EOF
6068                 #!$SHELL
6069                 SHARED_LIB=\$1
6070                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6071                 shift
6072                 cat <<-EOF
6073                 Linking shared library
6074                 ** SHARED_LIB \$SHARED_LIB
6075                 ** IMPORT_LIB \$IMPORT_LIB
6076 EOF
6077                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6078 CF_EOF
6079                 chmod +x mk_shared_lib.sh
6080                 ;;
6081         (msys*)
6082                 CC_SHARED_OPTS=
6083                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6084                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6085                 cf_cv_shlib_version=msysdll
6086                 cf_cv_shlib_version_infix=msysdll
6087                 shlibdir=$bindir
6088                 MAKE_DLLS=
6089                 cat >mk_shared_lib.sh <<-CF_EOF
6090                 #!$SHELL
6091                 SHARED_LIB=\$1
6092                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6093                 shift
6094                 cat <<-EOF
6095                 Linking shared library
6096                 ** SHARED_LIB \$SHARED_LIB
6097                 ** IMPORT_LIB \$IMPORT_LIB
6098 EOF
6099                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6100 CF_EOF
6101                 chmod +x mk_shared_lib.sh
6102                 ;;
6103         (darwin*)
6104                 cf_try_cflags="no-cpp-precomp"
6105                 CC_SHARED_OPTS="-dynamic"
6106                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6107                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6108                 cf_cv_shlib_version_infix=yes
6109                 echo "$as_me:6109: checking if ld -search_paths_first works" >&5
6110 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6111 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6112   echo $ECHO_N "(cached) $ECHO_C" >&6
6113 else
6114
6115                         cf_save_LDFLAGS=$LDFLAGS
6116                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6117                         cat >conftest.$ac_ext <<_ACEOF
6118 #line 6118 "configure"
6119 #include "confdefs.h"
6120
6121 int
6122 main ()
6123 {
6124 int i;
6125   ;
6126   return 0;
6127 }
6128 _ACEOF
6129 rm -f conftest.$ac_objext conftest$ac_exeext
6130 if { (eval echo "$as_me:6130: \"$ac_link\"") >&5
6131   (eval $ac_link) 2>&5
6132   ac_status=$?
6133   echo "$as_me:6133: \$? = $ac_status" >&5
6134   (exit $ac_status); } &&
6135          { ac_try='test -s conftest$ac_exeext'
6136   { (eval echo "$as_me:6136: \"$ac_try\"") >&5
6137   (eval $ac_try) 2>&5
6138   ac_status=$?
6139   echo "$as_me:6139: \$? = $ac_status" >&5
6140   (exit $ac_status); }; }; then
6141   cf_cv_ldflags_search_paths_first=yes
6142 else
6143   echo "$as_me: failed program was:" >&5
6144 cat conftest.$ac_ext >&5
6145 cf_cv_ldflags_search_paths_first=no
6146 fi
6147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6148                                 LDFLAGS=$cf_save_LDFLAGS
6149 fi
6150 echo "$as_me:6150: result: $cf_cv_ldflags_search_paths_first" >&5
6151 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6152                 if test $cf_cv_ldflags_search_paths_first = yes; then
6153                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6154                 fi
6155                 ;;
6156         (hpux[7-8]*)
6157                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6158                 if test "$GCC" != yes; then
6159                         CC_SHARED_OPTS='+Z'
6160                 fi
6161                 MK_SHARED_LIB='${LD} -b -o $@'
6162                 INSTALL_LIB="-m 555"
6163                 ;;
6164         (hpux*)
6165                 # (tested with gcc 2.7.2 -- I don't have c89)
6166                 if test "$GCC" = yes; then
6167                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6168                 else
6169                         CC_SHARED_OPTS='+Z'
6170                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6171                 fi
6172                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6173                 # HP-UX shared libraries must be executable, and should be
6174                 # readonly to exploit a quirk in the memory manager.
6175                 INSTALL_LIB="-m 555"
6176                 ;;
6177         (interix*)
6178                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6179                 if test "$cf_cv_shlib_version" = rel; then
6180                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6181                 else
6182                         cf_shared_soname='`basename `'
6183                 fi
6184                 CC_SHARED_OPTS=
6185                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6186                 ;;
6187         (irix*)
6188                 if test "$cf_cv_enable_rpath" = yes ; then
6189                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6190                 fi
6191                 # tested with IRIX 5.2 and 'cc'.
6192                 if test "$GCC" != yes; then
6193                         CC_SHARED_OPTS='-KPIC'
6194                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6195                 else
6196                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6197                 fi
6198                 cf_cv_rm_so_locs=yes
6199                 ;;
6200         (linux*|gnu*|k*bsd*-gnu)
6201                 if test "$DFT_LWR_MODEL" = "shared" ; then
6202                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6203                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6204                 fi
6205                 if test "$cf_cv_enable_rpath" = yes ; then
6206                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6207                 fi
6208
6209         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6210         if test "$cf_cv_shlib_version" = rel; then
6211                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6212         else
6213                 cf_cv_shared_soname='`basename $@`'
6214         fi
6215
6216                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6217                 ;;
6218         (mingw*)
6219                 cf_cv_shlib_version=mingw
6220                 cf_cv_shlib_version_infix=mingw
6221                 shlibdir=$bindir
6222                 MAKE_DLLS=
6223                 if test "$DFT_LWR_MODEL" = "shared" ; then
6224                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6225                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6226                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6227                 fi
6228                 CC_SHARED_OPTS=
6229                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6230                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6231                 cat >mk_shared_lib.sh <<-CF_EOF
6232                 #!$SHELL
6233                 SHARED_LIB=\$1
6234                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6235                 shift
6236                 cat <<-EOF
6237                 Linking shared library
6238                 ** SHARED_LIB \$SHARED_LIB
6239                 ** IMPORT_LIB \$IMPORT_LIB
6240 EOF
6241                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6242 CF_EOF
6243                 chmod +x mk_shared_lib.sh
6244                 ;;
6245         (openbsd[2-9].*|mirbsd*)
6246                 if test "$DFT_LWR_MODEL" = "shared" ; then
6247                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6248                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6249                 fi
6250                 if test "$cf_cv_enable_rpath" = yes ; then
6251                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6252                 fi
6253                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6254
6255         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6256         if test "$cf_cv_shlib_version" = rel; then
6257                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6258         else
6259                 cf_cv_shared_soname='`basename $@`'
6260         fi
6261
6262                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6263                 ;;
6264         (nto-qnx*|openbsd*|freebsd[12].*)
6265                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6266                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6267                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6268                 ;;
6269         (dragonfly*|freebsd*)
6270                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6271                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6272                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6273                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6274                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6275                 fi
6276
6277         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6278         if test "$cf_cv_shlib_version" = rel; then
6279                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6280         else
6281                 cf_cv_shared_soname='`basename $@`'
6282         fi
6283
6284                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6285                 ;;
6286         (netbsd*)
6287                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6288                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6289                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6290                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6291                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6292                         if test "$cf_cv_shlib_version" = auto; then
6293                         if test -f /usr/libexec/ld.elf_so; then
6294                                 cf_cv_shlib_version=abi
6295                         else
6296                                 cf_cv_shlib_version=rel
6297                         fi
6298                         fi
6299
6300         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6301         if test "$cf_cv_shlib_version" = rel; then
6302                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6303         else
6304                 cf_cv_shared_soname='`basename $@`'
6305         fi
6306
6307                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6308                 else
6309                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6310                 fi
6311                 ;;
6312         (osf*|mls+*)
6313                 # tested with OSF/1 V3.2 and 'cc'
6314                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6315                 # link with shared libs).
6316                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6317                 case $host_os in
6318                 (osf4*)
6319                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6320                         ;;
6321                 esac
6322                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6323                 if test "$DFT_LWR_MODEL" = "shared" ; then
6324                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6325                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6326                 fi
6327                 cf_cv_rm_so_locs=yes
6328                 ;;
6329         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6330                 # tested with osr5.0.5
6331                 if test "$GCC" != yes; then
6332                         CC_SHARED_OPTS='-belf -KPIC'
6333                 fi
6334                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6335                 if test "$cf_cv_enable_rpath" = yes ; then
6336                         # only way is to set LD_RUN_PATH but no switch for it
6337                         RUN_PATH=$libdir
6338                 fi
6339                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6340                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6341                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6342                 ;;
6343         (sunos4*)
6344                 # tested with SunOS 4.1.1 and gcc 2.7.0
6345                 if test "$GCC" != yes; then
6346                         CC_SHARED_OPTS='-KPIC'
6347                 fi
6348                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6349                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6350                 ;;
6351         (solaris2*)
6352                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6353                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6354                 if test "$DFT_LWR_MODEL" = "shared" ; then
6355                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6356                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6357                 fi
6358                 if test "$cf_cv_enable_rpath" = yes ; then
6359                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6360                 fi
6361
6362         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6363         if test "$cf_cv_shlib_version" = rel; then
6364                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6365         else
6366                 cf_cv_shared_soname='`basename $@`'
6367         fi
6368
6369                 if test "$GCC" != yes; then
6370                         cf_save_CFLAGS="$CFLAGS"
6371                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6372                         do
6373                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6374                                 cat >conftest.$ac_ext <<_ACEOF
6375 #line 6375 "configure"
6376 #include "confdefs.h"
6377 #include <stdio.h>
6378 int
6379 main ()
6380 {
6381 printf("Hello\n");
6382   ;
6383   return 0;
6384 }
6385 _ACEOF
6386 rm -f conftest.$ac_objext
6387 if { (eval echo "$as_me:6387: \"$ac_compile\"") >&5
6388   (eval $ac_compile) 2>&5
6389   ac_status=$?
6390   echo "$as_me:6390: \$? = $ac_status" >&5
6391   (exit $ac_status); } &&
6392          { ac_try='test -s conftest.$ac_objext'
6393   { (eval echo "$as_me:6393: \"$ac_try\"") >&5
6394   (eval $ac_try) 2>&5
6395   ac_status=$?
6396   echo "$as_me:6396: \$? = $ac_status" >&5
6397   (exit $ac_status); }; }; then
6398   break
6399 else
6400   echo "$as_me: failed program was:" >&5
6401 cat conftest.$ac_ext >&5
6402 fi
6403 rm -f conftest.$ac_objext conftest.$ac_ext
6404                         done
6405                         CFLAGS="$cf_save_CFLAGS"
6406                         CC_SHARED_OPTS=$cf_shared_opts
6407                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6408                 else
6409                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6410                 fi
6411                 ;;
6412         (sysv5uw7*|unix_sv*)
6413                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6414                 if test "$GCC" != yes; then
6415                         CC_SHARED_OPTS='-KPIC'
6416                 fi
6417                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6418                 ;;
6419         (*)
6420                 CC_SHARED_OPTS='unknown'
6421                 MK_SHARED_LIB='echo unknown'
6422                 ;;
6423         esac
6424
6425         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6426         case "$cf_cv_shlib_version" in
6427         (rel|abi)
6428                 case "$MK_SHARED_LIB" in
6429                 (*'-o $@')
6430                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6431                         ;;
6432                 (*)
6433                         { echo "$as_me:6433: WARNING: ignored --with-shlib-version" >&5
6434 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6435                         ;;
6436                 esac
6437                 ;;
6438         esac
6439
6440         if test -n "$cf_try_cflags"
6441         then
6442 cat > conftest.$ac_ext <<EOF
6443 #line 6443 "${as_me:-configure}"
6444 #include <stdio.h>
6445 int main(int argc, char *argv[])
6446 {
6447         printf("hello\n");
6448         return (argv[argc-1] == 0) ;
6449 }
6450 EOF
6451                 cf_save_CFLAGS="$CFLAGS"
6452                 for cf_opt in $cf_try_cflags
6453                 do
6454                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6455                         echo "$as_me:6455: checking if CFLAGS option -$cf_opt works" >&5
6456 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6457                         if { (eval echo "$as_me:6457: \"$ac_compile\"") >&5
6458   (eval $ac_compile) 2>&5
6459   ac_status=$?
6460   echo "$as_me:6460: \$? = $ac_status" >&5
6461   (exit $ac_status); }; then
6462                                 echo "$as_me:6462: result: yes" >&5
6463 echo "${ECHO_T}yes" >&6
6464                                 cf_save_CFLAGS="$CFLAGS"
6465                         else
6466                                 echo "$as_me:6466: result: no" >&5
6467 echo "${ECHO_T}no" >&6
6468                         fi
6469                 done
6470                 CFLAGS="$cf_save_CFLAGS"
6471         fi
6472
6473         # RPATH_LIST is a colon-separated list of directories
6474         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6475         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6476
6477         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6478
6479         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6480
6481 echo "${as_me:-configure}:6481: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6482
6483         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6484
6485 echo "${as_me:-configure}:6485: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6486
6487 for model in $cf_list_models; do
6488         case $model in
6489         (libtool)
6490
6491 echo "$as_me:6491: checking for additional libtool options" >&5
6492 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6493
6494 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6495 if test "${with_libtool_opts+set}" = set; then
6496   withval="$with_libtool_opts"
6497   with_libtool_opts=$withval
6498 else
6499   with_libtool_opts=no
6500 fi;
6501 echo "$as_me:6501: result: $with_libtool_opts" >&5
6502 echo "${ECHO_T}$with_libtool_opts" >&6
6503
6504 case .$with_libtool_opts in
6505 (.yes|.no|.)
6506         ;;
6507 (*)
6508         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6509         ;;
6510 esac
6511
6512 echo "$as_me:6512: checking if exported-symbols file should be used" >&5
6513 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6514
6515 # Check whether --with-export-syms or --without-export-syms was given.
6516 if test "${with_export_syms+set}" = set; then
6517   withval="$with_export_syms"
6518   with_export_syms=$withval
6519 else
6520   with_export_syms=no
6521 fi;
6522 if test "x$with_export_syms" = xyes
6523 then
6524         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6525
6526 fi
6527 echo "$as_me:6527: result: $with_export_syms" >&5
6528 echo "${ECHO_T}$with_export_syms" >&6
6529 if test "x$with_export_syms" != xno
6530 then
6531         EXPORT_SYMS="-export-symbols $with_export_syms"
6532
6533 fi
6534
6535                 ;;
6536         (shared)
6537                 if test "$CC_SHARED_OPTS" = "unknown"; then
6538                         { { echo "$as_me:6538: error: Shared libraries are not supported in this version" >&5
6539 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6540    { (exit 1); exit 1; }; }
6541                 fi
6542
6543 echo "$as_me:6543: checking if versioned-symbols file should be used" >&5
6544 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6545
6546 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6547 if test "${with_versioned_syms+set}" = set; then
6548   withval="$with_versioned_syms"
6549   with_versioned_syms=$withval
6550 else
6551   with_versioned_syms=no
6552 fi;
6553 if test "x$with_versioned_syms" = xyes
6554 then
6555         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6556
6557 fi
6558 echo "$as_me:6558: result: $with_versioned_syms" >&5
6559 echo "${ECHO_T}$with_versioned_syms" >&6
6560
6561 RESULTING_SYMS=
6562 VERSIONED_SYMS=
6563 WILDCARD_SYMS=
6564
6565 if test "x$with_versioned_syms" != xno
6566 then
6567         RESULTING_SYMS=$with_versioned_syms
6568         case "x$MK_SHARED_LIB" in
6569         (*-Wl,*)
6570                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6571                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6572                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6573
6574 echo "${as_me:-configure}:6574: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6575
6576                 ;;
6577         (*-dy\ *)
6578                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6579                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6580                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6581
6582 echo "${as_me:-configure}:6582: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6583
6584                 ;;
6585         (*)
6586                 { echo "$as_me:6586: WARNING: this system does not support versioned-symbols" >&5
6587 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6588                 ;;
6589         esac
6590
6591         # Linux ld can selectively override scope, e.g., of symbols beginning with
6592         # "_" by first declaring some as global, and then using a wildcard to
6593         # declare the others as local.  Some other loaders cannot do this.  Check
6594         # by constructing a (very) simple shared library and inspecting its
6595         # symbols.
6596         if test "x$VERSIONED_SYMS" != "x"
6597         then
6598                 echo "$as_me:6598: checking if wildcards can be used to selectively omit symbols" >&5
6599 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6600                 WILDCARD_SYMS=no
6601
6602                 # make sources
6603                 rm -f conftest.*
6604
6605                 cat >conftest.ver <<EOF
6606 module_1.0 {
6607 global:
6608         globalf1;
6609 local:
6610         localf1;
6611 };
6612 module_2.0 {
6613 global:
6614         globalf2;
6615 local:
6616         localf2;
6617         _*;
6618 } module_1.0;
6619 submodule_1.0 {
6620 global:
6621         subglobalf1;
6622         _ismissing;
6623 local:
6624         sublocalf1;
6625 };
6626 submodule_2.0 {
6627 global:
6628         subglobalf2;
6629 local:
6630         sublocalf2;
6631         _*;
6632 } submodule_1.0;
6633 EOF
6634                 cat >conftest.$ac_ext <<EOF
6635 #line 6635 "configure"
6636 int     _ismissing(void) { return 1; }
6637 int     _localf1(void) { return 1; }
6638 int     _localf2(void) { return 2; }
6639 int     globalf1(void) { return 1; }
6640 int     globalf2(void) { return 2; }
6641 int     _sublocalf1(void) { return 1; }
6642 int     _sublocalf2(void) { return 2; }
6643 int     subglobalf1(void) { return 1; }
6644 int     subglobalf2(void) { return 2; }
6645 EOF
6646                 cat >conftest.mk <<EOF
6647 CC=${CC}
6648 CFLAGS=${CFLAGS}
6649 CPPFLAGS=${CPPFLAGS}
6650 LDFLAGS=${LDFLAGS}
6651 LIBS=${LIBS}
6652 VERSIONED_SYMS=${VERSIONED_SYMS}
6653 RESULTING_SYMS=conftest.ver
6654 MK_SHARED_LIB=${MK_SHARED_LIB}
6655 conftest.so: conftest.$ac_cv_objext
6656                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6657 EOF
6658
6659                 # compile source, make library
6660                 if make -f conftest.mk 2>&5 >/dev/null
6661                 then
6662                         # test for missing symbol
6663                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ]T[     ]'`
6664                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6665                 fi
6666                 echo "$as_me:6666: result: $WILDCARD_SYMS" >&5
6667 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6668                 rm -f conftest.*
6669         fi
6670 fi
6671
6672                 ;;
6673         esac
6674 done
6675
6676 # pretend that ncurses==ncursesw==ncursest
6677 echo "$as_me:6677: checking if you want to disable library suffixes" >&5
6678 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6679
6680 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6681 if test "${enable_lib_suffixes+set}" = set; then
6682   enableval="$enable_lib_suffixes"
6683   test "$enableval" != no && enableval=yes
6684         if test "$enableval" != "yes" ; then
6685     disable_lib_suffixes=yes
6686         else
6687                 disable_lib_suffixes=no
6688         fi
6689 else
6690   enableval=yes
6691         disable_lib_suffixes=no
6692
6693 fi;
6694 echo "$as_me:6694: result: $disable_lib_suffixes" >&5
6695 echo "${ECHO_T}$disable_lib_suffixes" >&6
6696
6697 ### If we're building with rpath, try to link non-standard libs that way too.
6698 if test "$DFT_LWR_MODEL" = "shared"; then
6699
6700 echo "$as_me:6700: checking if rpath-hack should be disabled" >&5
6701 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6702
6703 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6704 if test "${enable_rpath_hack+set}" = set; then
6705   enableval="$enable_rpath_hack"
6706   test "$enableval" != no && enableval=yes
6707         if test "$enableval" != "yes" ; then
6708     cf_disable_rpath_hack=yes
6709         else
6710                 cf_disable_rpath_hack=no
6711         fi
6712 else
6713   enableval=yes
6714         cf_disable_rpath_hack=no
6715
6716 fi;
6717 echo "$as_me:6717: result: $cf_disable_rpath_hack" >&5
6718 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6719 if test "$cf_disable_rpath_hack" = no ; then
6720
6721 echo "$as_me:6721: checking for updated LDFLAGS" >&5
6722 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6723 if test -n "$LD_RPATH_OPT" ; then
6724         echo "$as_me:6724: result: maybe" >&5
6725 echo "${ECHO_T}maybe" >&6
6726
6727         for ac_prog in ldd
6728 do
6729   # Extract the first word of "$ac_prog", so it can be a program name with args.
6730 set dummy $ac_prog; ac_word=$2
6731 echo "$as_me:6731: checking for $ac_word" >&5
6732 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6733 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6734   echo $ECHO_N "(cached) $ECHO_C" >&6
6735 else
6736   if test -n "$cf_ldd_prog"; then
6737   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6738 else
6739   ac_save_IFS=$IFS; IFS=$ac_path_separator
6740 ac_dummy="$PATH"
6741 for ac_dir in $ac_dummy; do
6742   IFS=$ac_save_IFS
6743   test -z "$ac_dir" && ac_dir=.
6744   $as_executable_p "$ac_dir/$ac_word" || continue
6745 ac_cv_prog_cf_ldd_prog="$ac_prog"
6746 echo "$as_me:6746: found $ac_dir/$ac_word" >&5
6747 break
6748 done
6749
6750 fi
6751 fi
6752 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6753 if test -n "$cf_ldd_prog"; then
6754   echo "$as_me:6754: result: $cf_ldd_prog" >&5
6755 echo "${ECHO_T}$cf_ldd_prog" >&6
6756 else
6757   echo "$as_me:6757: result: no" >&5
6758 echo "${ECHO_T}no" >&6
6759 fi
6760
6761   test -n "$cf_ldd_prog" && break
6762 done
6763 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6764
6765         cf_rpath_list="/usr/lib /lib"
6766         if test "$cf_ldd_prog" != no
6767         then
6768                 cf_rpath_oops=
6769
6770 cat >conftest.$ac_ext <<_ACEOF
6771 #line 6771 "configure"
6772 #include "confdefs.h"
6773 #include <stdio.h>
6774 int
6775 main ()
6776 {
6777 printf("Hello");
6778   ;
6779   return 0;
6780 }
6781 _ACEOF
6782 rm -f conftest.$ac_objext conftest$ac_exeext
6783 if { (eval echo "$as_me:6783: \"$ac_link\"") >&5
6784   (eval $ac_link) 2>&5
6785   ac_status=$?
6786   echo "$as_me:6786: \$? = $ac_status" >&5
6787   (exit $ac_status); } &&
6788          { ac_try='test -s conftest$ac_exeext'
6789   { (eval echo "$as_me:6789: \"$ac_try\"") >&5
6790   (eval $ac_try) 2>&5
6791   ac_status=$?
6792   echo "$as_me:6792: \$? = $ac_status" >&5
6793   (exit $ac_status); }; }; then
6794   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6795                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6796 else
6797   echo "$as_me: failed program was:" >&5
6798 cat conftest.$ac_ext >&5
6799 fi
6800 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6801
6802                 # If we passed the link-test, but get a "not found" on a given library,
6803                 # this could be due to inept reconfiguration of gcc to make it only
6804                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6805                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6806                 # /usr/local libraries.
6807                 if test -n "$cf_rpath_oops"
6808                 then
6809                         for cf_rpath_src in $cf_rpath_oops
6810                         do
6811                                 for cf_rpath_dir in \
6812                                         /usr/local \
6813                                         /usr/pkg \
6814                                         /opt/sfw
6815                                 do
6816                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6817                                         then
6818                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6819
6820 echo "${as_me:-configure}:6820: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6821
6822                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6823                                                 break
6824                                         fi
6825                                 done
6826                         done
6827                 fi
6828         fi
6829
6830         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6831
6832 echo "${as_me:-configure}:6832: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6833
6834 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6835
6836 echo "${as_me:-configure}:6836: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6837
6838 cf_rpath_dst=
6839 for cf_rpath_src in $LDFLAGS
6840 do
6841         case $cf_rpath_src in
6842         (-L*)
6843
6844                 # check if this refers to a directory which we will ignore
6845                 cf_rpath_skip=no
6846                 if test -n "$cf_rpath_list"
6847                 then
6848                         for cf_rpath_item in $cf_rpath_list
6849                         do
6850                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6851                                 then
6852                                         cf_rpath_skip=yes
6853                                         break
6854                                 fi
6855                         done
6856                 fi
6857
6858                 if test "$cf_rpath_skip" = no
6859                 then
6860                         # transform the option
6861                         if test "$LD_RPATH_OPT" = "-R " ; then
6862                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6863                         else
6864                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6865                         fi
6866
6867                         # if we have not already added this, add it now
6868                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6869                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6870                         then
6871                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6872
6873 echo "${as_me:-configure}:6873: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6874
6875                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6876                         fi
6877                 fi
6878                 ;;
6879         esac
6880         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6881 done
6882 LDFLAGS=$cf_rpath_dst
6883
6884 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6885
6886 echo "${as_me:-configure}:6886: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6887
6888 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6889
6890 echo "${as_me:-configure}:6890: testing ...checking LIBS $LIBS ..." 1>&5
6891
6892 cf_rpath_dst=
6893 for cf_rpath_src in $LIBS
6894 do
6895         case $cf_rpath_src in
6896         (-L*)
6897
6898                 # check if this refers to a directory which we will ignore
6899                 cf_rpath_skip=no
6900                 if test -n "$cf_rpath_list"
6901                 then
6902                         for cf_rpath_item in $cf_rpath_list
6903                         do
6904                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6905                                 then
6906                                         cf_rpath_skip=yes
6907                                         break
6908                                 fi
6909                         done
6910                 fi
6911
6912                 if test "$cf_rpath_skip" = no
6913                 then
6914                         # transform the option
6915                         if test "$LD_RPATH_OPT" = "-R " ; then
6916                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6917                         else
6918                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6919                         fi
6920
6921                         # if we have not already added this, add it now
6922                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6923                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6924                         then
6925                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6926
6927 echo "${as_me:-configure}:6927: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6928
6929                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6930                         fi
6931                 fi
6932                 ;;
6933         esac
6934         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6935 done
6936 LIBS=$cf_rpath_dst
6937
6938 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6939
6940 echo "${as_me:-configure}:6940: testing ...checked LIBS $LIBS ..." 1>&5
6941
6942         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6943
6944 echo "${as_me:-configure}:6944: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6945
6946 else
6947         echo "$as_me:6947: result: no" >&5
6948 echo "${ECHO_T}no" >&6
6949 fi
6950
6951 fi
6952
6953 fi
6954
6955 ###############################################################################
6956
6957 ###     use option --with-extra-suffix to append suffix to headers and libraries
6958 echo "$as_me:6958: checking if you wish to append extra suffix to header/library paths" >&5
6959 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
6960 EXTRA_SUFFIX=
6961
6962 # Check whether --with-extra-suffix or --without-extra-suffix was given.
6963 if test "${with_extra_suffix+set}" = set; then
6964   withval="$with_extra_suffix"
6965   case x$withval in
6966         (no)
6967                 ;;
6968         (xyes|x)
6969                 EXTRA_SUFFIX=$cf_cv_abi_version
6970                 ;;
6971         (*)
6972                 EXTRA_SUFFIX=$withval
6973                 ;;
6974         esac
6975
6976 fi;
6977 echo "$as_me:6977: result: $EXTRA_SUFFIX" >&5
6978 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
6979
6980 ###     use option --disable-overwrite to leave out the link to -lcurses
6981 echo "$as_me:6981: checking if you wish to install ncurses overwriting curses" >&5
6982 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6983
6984 # Check whether --enable-overwrite or --disable-overwrite was given.
6985 if test "${enable_overwrite+set}" = set; then
6986   enableval="$enable_overwrite"
6987   with_overwrite=$enableval
6988 else
6989   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6990 fi;
6991 echo "$as_me:6991: result: $with_overwrite" >&5
6992 echo "${ECHO_T}$with_overwrite" >&6
6993
6994 echo "$as_me:6994: checking if external terminfo-database is used" >&5
6995 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6996
6997 # Check whether --enable-database or --disable-database was given.
6998 if test "${enable_database+set}" = set; then
6999   enableval="$enable_database"
7000   use_database=$enableval
7001 else
7002   use_database=yes
7003 fi;
7004 echo "$as_me:7004: result: $use_database" >&5
7005 echo "${ECHO_T}$use_database" >&6
7006
7007 case $host_os in
7008 (os2*)
7009         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7010         ;;
7011 (*)
7012         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7013         ;;
7014 esac
7015
7016 NCURSES_USE_DATABASE=0
7017 if test "$use_database" != no ; then
7018         NCURSES_USE_DATABASE=1
7019
7020         echo "$as_me:7020: checking which terminfo source-file will be installed" >&5
7021 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7022
7023 # Check whether --with-database or --without-database was given.
7024 if test "${with_database+set}" = set; then
7025   withval="$with_database"
7026   TERMINFO_SRC=$withval
7027 fi;
7028         echo "$as_me:7028: result: $TERMINFO_SRC" >&5
7029 echo "${ECHO_T}$TERMINFO_SRC" >&6
7030
7031         echo "$as_me:7031: checking whether to use hashed database instead of directory/tree" >&5
7032 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7033
7034 # Check whether --with-hashed-db or --without-hashed-db was given.
7035 if test "${with_hashed_db+set}" = set; then
7036   withval="$with_hashed_db"
7037
7038 else
7039   with_hashed_db=no
7040 fi;
7041         echo "$as_me:7041: result: $with_hashed_db" >&5
7042 echo "${ECHO_T}$with_hashed_db" >&6
7043 else
7044         with_hashed_db=no
7045 fi
7046
7047 echo "$as_me:7047: checking for list of fallback descriptions" >&5
7048 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7049
7050 # Check whether --with-fallbacks or --without-fallbacks was given.
7051 if test "${with_fallbacks+set}" = set; then
7052   withval="$with_fallbacks"
7053   with_fallback=$withval
7054 else
7055   with_fallback=
7056 fi;
7057 echo "$as_me:7057: result: $with_fallback" >&5
7058 echo "${ECHO_T}$with_fallback" >&6
7059 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7060
7061 echo "$as_me:7061: checking if you want modern xterm or antique" >&5
7062 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7063
7064 # Check whether --with-xterm-new or --without-xterm-new was given.
7065 if test "${with_xterm_new+set}" = set; then
7066   withval="$with_xterm_new"
7067   with_xterm_new=$withval
7068 else
7069   with_xterm_new=yes
7070 fi;
7071 case $with_xterm_new in
7072 (no) with_xterm_new=xterm-old;;
7073 (*)      with_xterm_new=xterm-new;;
7074 esac
7075 echo "$as_me:7075: result: $with_xterm_new" >&5
7076 echo "${ECHO_T}$with_xterm_new" >&6
7077 WHICH_XTERM=$with_xterm_new
7078
7079 echo "$as_me:7079: checking if xterm backspace sends BS or DEL" >&5
7080 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7081
7082 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7083 if test "${with_xterm_kbs+set}" = set; then
7084   withval="$with_xterm_kbs"
7085   with_xterm_kbs=$withval
7086 else
7087   with_xterm_kbs=BS
7088 fi;
7089 case x$with_xterm_kbs in
7090 (xyes|xno|xBS|xbs|x8)
7091         with_xterm_kbs=BS
7092         ;;
7093 (xDEL|xdel|x127)
7094         with_xterm_kbs=DEL
7095         ;;
7096 (*)
7097         with_xterm_kbs=$withval
7098         ;;
7099 esac
7100 echo "$as_me:7100: result: $with_xterm_kbs" >&5
7101 echo "${ECHO_T}$with_xterm_kbs" >&6
7102 XTERM_KBS=$with_xterm_kbs
7103
7104 MAKE_TERMINFO=
7105 if test "$use_database" = no ; then
7106         TERMINFO="${datadir}/terminfo"
7107         MAKE_TERMINFO="#"
7108 else
7109
7110 echo "$as_me:7110: checking for list of terminfo directories" >&5
7111 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7112
7113 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7114 if test "${with_terminfo_dirs+set}" = set; then
7115   withval="$with_terminfo_dirs"
7116
7117 else
7118   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7119 fi;
7120 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7121 cf_dst_path=
7122 for cf_src_path in $withval
7123 do
7124
7125 if test "x$prefix" != xNONE; then
7126         cf_path_syntax="$prefix"
7127 else
7128         cf_path_syntax="$ac_default_prefix"
7129 fi
7130
7131 case ".$cf_src_path" in
7132 (.\$\(*\)*|.\'*\'*)
7133         ;;
7134 (..|./*|.\\*)
7135         ;;
7136 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7137         ;;
7138 (.\${*prefix}*|.\${*dir}*)
7139         eval cf_src_path="$cf_src_path"
7140         case ".$cf_src_path" in
7141         (.NONE/*)
7142                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7143                 ;;
7144         esac
7145         ;;
7146 (.no|.NONE/*)
7147         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7148         ;;
7149 (*)
7150         { { echo "$as_me:7150: error: expected a pathname, not \"$cf_src_path\"" >&5
7151 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7152    { (exit 1); exit 1; }; }
7153         ;;
7154 esac
7155
7156   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7157   cf_dst_path="${cf_dst_path}${cf_src_path}"
7158 done
7159 IFS="$ac_save_ifs"
7160
7161 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7162 # so we have to check/work around.  We do prefer the result of "eval"...
7163 eval cf_dst_eval="$cf_dst_path"
7164 case "x$cf_dst_eval" in
7165 (xNONE*)
7166         TERMINFO_DIRS=$cf_dst_path
7167         ;;
7168 (*)
7169         TERMINFO_DIRS="$cf_dst_eval"
7170         ;;
7171 esac
7172
7173 echo "$as_me:7173: result: $TERMINFO_DIRS" >&5
7174 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7175 test -n "$TERMINFO_DIRS" &&
7176 cat >>confdefs.h <<EOF
7177 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7178 EOF
7179
7180 echo "$as_me:7180: checking for default terminfo directory" >&5
7181 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7182
7183 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7184 if test "${with_default_terminfo_dir+set}" = set; then
7185   withval="$with_default_terminfo_dir"
7186
7187 else
7188   withval="${TERMINFO:-${datadir}/terminfo}"
7189 fi; if test -n "${datadir}/terminfo" ; then
7190
7191 if test "x$prefix" != xNONE; then
7192         cf_path_syntax="$prefix"
7193 else
7194         cf_path_syntax="$ac_default_prefix"
7195 fi
7196
7197 case ".$withval" in
7198 (.\$\(*\)*|.\'*\'*)
7199         ;;
7200 (..|./*|.\\*)
7201         ;;
7202 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7203         ;;
7204 (.\${*prefix}*|.\${*dir}*)
7205         eval withval="$withval"
7206         case ".$withval" in
7207         (.NONE/*)
7208                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7209                 ;;
7210         esac
7211         ;;
7212 (.no|.NONE/*)
7213         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7214         ;;
7215 (*)
7216         { { echo "$as_me:7216: error: expected a pathname, not \"$withval\"" >&5
7217 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7218    { (exit 1); exit 1; }; }
7219         ;;
7220 esac
7221
7222 fi
7223 eval TERMINFO="$withval"
7224
7225 echo "$as_me:7225: result: $TERMINFO" >&5
7226 echo "${ECHO_T}$TERMINFO" >&6
7227
7228 cat >>confdefs.h <<EOF
7229 #define TERMINFO "$TERMINFO"
7230 EOF
7231
7232 fi
7233
7234 ###     use option --disable-big-core to make tic run on small machines
7235 ###     We need 4Mb, check if we can allocate 50% more than that.
7236 echo "$as_me:7236: checking if big-core option selected" >&5
7237 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7238
7239 # Check whether --enable-big-core or --disable-big-core was given.
7240 if test "${enable_big_core+set}" = set; then
7241   enableval="$enable_big_core"
7242   with_big_core=$enableval
7243 else
7244   if test "$cross_compiling" = yes; then
7245   with_big_core=no
7246 else
7247   cat >conftest.$ac_ext <<_ACEOF
7248 #line 7248 "configure"
7249 #include "confdefs.h"
7250
7251 #include <stdlib.h>
7252 #include <string.h>
7253 int main() {
7254         unsigned long n = 6000000L;
7255         char *s = malloc(n);
7256         if (s != 0)
7257                 s[0] = s[n-1] = 0;
7258         ${cf_cv_main_return:-return}(s == 0);
7259 }
7260 _ACEOF
7261 rm -f conftest$ac_exeext
7262 if { (eval echo "$as_me:7262: \"$ac_link\"") >&5
7263   (eval $ac_link) 2>&5
7264   ac_status=$?
7265   echo "$as_me:7265: \$? = $ac_status" >&5
7266   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7267   { (eval echo "$as_me:7267: \"$ac_try\"") >&5
7268   (eval $ac_try) 2>&5
7269   ac_status=$?
7270   echo "$as_me:7270: \$? = $ac_status" >&5
7271   (exit $ac_status); }; }; then
7272   with_big_core=yes
7273 else
7274   echo "$as_me: program exited with status $ac_status" >&5
7275 echo "$as_me: failed program was:" >&5
7276 cat conftest.$ac_ext >&5
7277 with_big_core=no
7278 fi
7279 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7280 fi
7281 fi;
7282 echo "$as_me:7282: result: $with_big_core" >&5
7283 echo "${ECHO_T}$with_big_core" >&6
7284 test "x$with_big_core" = "xyes" &&
7285 cat >>confdefs.h <<\EOF
7286 #define HAVE_BIG_CORE 1
7287 EOF
7288
7289 ### ISO C only guarantees 512-char strings, we have tables which load faster
7290 ### when constructed using "big" strings.  More than the C compiler, the awk
7291 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7292 echo "$as_me:7292: checking if big-strings option selected" >&5
7293 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7294
7295 # Check whether --enable-big-strings or --disable-big-strings was given.
7296 if test "${enable_big_strings+set}" = set; then
7297   enableval="$enable_big_strings"
7298   with_big_strings=$enableval
7299 else
7300
7301         case x$AWK in
7302         (x)
7303                 eval with_big_strings=no
7304                 ;;
7305         (*)
7306                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7307                         | $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
7308                         eval with_big_strings=yes
7309                 else
7310                         eval with_big_strings=no
7311                 fi
7312                 ;;
7313         esac
7314
7315 fi;
7316 echo "$as_me:7316: result: $with_big_strings" >&5
7317 echo "${ECHO_T}$with_big_strings" >&6
7318
7319 USE_BIG_STRINGS=0
7320 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7321
7322 ###     use option --enable-termcap to compile in the termcap fallback support
7323 echo "$as_me:7323: checking if you want termcap-fallback support" >&5
7324 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7325
7326 # Check whether --enable-termcap or --disable-termcap was given.
7327 if test "${enable_termcap+set}" = set; then
7328   enableval="$enable_termcap"
7329   with_termcap=$enableval
7330 else
7331   with_termcap=no
7332 fi;
7333 echo "$as_me:7333: result: $with_termcap" >&5
7334 echo "${ECHO_T}$with_termcap" >&6
7335
7336 NCURSES_USE_TERMCAP=0
7337 if test "x$with_termcap" != "xyes" ; then
7338         if test "$use_database" = no ; then
7339                 if test -z "$with_fallback" ; then
7340                         { { echo "$as_me:7340: error: You have disabled the database w/o specifying fallbacks" >&5
7341 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7342    { (exit 1); exit 1; }; }
7343                 fi
7344         fi
7345
7346 cat >>confdefs.h <<\EOF
7347 #define PURE_TERMINFO 1
7348 EOF
7349
7350 else
7351
7352         if test "$with_ticlib" != no ; then
7353                 { { echo "$as_me:7353: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7354 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7355    { (exit 1); exit 1; }; }
7356         fi
7357
7358         NCURSES_USE_TERMCAP=1
7359         echo "$as_me:7359: checking for list of termcap files" >&5
7360 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7361
7362 # Check whether --with-termpath or --without-termpath was given.
7363 if test "${with_termpath+set}" = set; then
7364   withval="$with_termpath"
7365
7366 else
7367   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7368 fi;
7369 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7370 cf_dst_path=
7371 for cf_src_path in $withval
7372 do
7373
7374 if test "x$prefix" != xNONE; then
7375         cf_path_syntax="$prefix"
7376 else
7377         cf_path_syntax="$ac_default_prefix"
7378 fi
7379
7380 case ".$cf_src_path" in
7381 (.\$\(*\)*|.\'*\'*)
7382         ;;
7383 (..|./*|.\\*)
7384         ;;
7385 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7386         ;;
7387 (.\${*prefix}*|.\${*dir}*)
7388         eval cf_src_path="$cf_src_path"
7389         case ".$cf_src_path" in
7390         (.NONE/*)
7391                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7392                 ;;
7393         esac
7394         ;;
7395 (.no|.NONE/*)
7396         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7397         ;;
7398 (*)
7399         { { echo "$as_me:7399: error: expected a pathname, not \"$cf_src_path\"" >&5
7400 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7401    { (exit 1); exit 1; }; }
7402         ;;
7403 esac
7404
7405   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7406   cf_dst_path="${cf_dst_path}${cf_src_path}"
7407 done
7408 IFS="$ac_save_ifs"
7409
7410 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7411 # so we have to check/work around.  We do prefer the result of "eval"...
7412 eval cf_dst_eval="$cf_dst_path"
7413 case "x$cf_dst_eval" in
7414 (xNONE*)
7415         TERMPATH=$cf_dst_path
7416         ;;
7417 (*)
7418         TERMPATH="$cf_dst_eval"
7419         ;;
7420 esac
7421
7422         echo "$as_me:7422: result: $TERMPATH" >&5
7423 echo "${ECHO_T}$TERMPATH" >&6
7424         test -n "$TERMPATH" &&
7425 cat >>confdefs.h <<EOF
7426 #define TERMPATH "$TERMPATH"
7427 EOF
7428
7429         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7430         echo "$as_me:7430: checking if fast termcap-loader is needed" >&5
7431 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7432
7433 # Check whether --enable-getcap or --disable-getcap was given.
7434 if test "${enable_getcap+set}" = set; then
7435   enableval="$enable_getcap"
7436   with_getcap=$enableval
7437 else
7438   with_getcap=no
7439 fi;
7440         echo "$as_me:7440: result: $with_getcap" >&5
7441 echo "${ECHO_T}$with_getcap" >&6
7442         test "x$with_getcap" = "xyes" &&
7443 cat >>confdefs.h <<\EOF
7444 #define USE_GETCAP 1
7445 EOF
7446
7447         echo "$as_me:7447: checking if translated termcaps will be cached in ~/.terminfo" >&5
7448 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7449
7450 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7451 if test "${enable_getcap_cache+set}" = set; then
7452   enableval="$enable_getcap_cache"
7453   with_getcap_cache=$enableval
7454 else
7455   with_getcap_cache=no
7456 fi;
7457         echo "$as_me:7457: result: $with_getcap_cache" >&5
7458 echo "${ECHO_T}$with_getcap_cache" >&6
7459         test "x$with_getcap_cache" = "xyes" &&
7460 cat >>confdefs.h <<\EOF
7461 #define USE_GETCAP_CACHE 1
7462 EOF
7463
7464 fi
7465
7466 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7467 echo "$as_me:7467: checking if ~/.terminfo is wanted" >&5
7468 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7469
7470 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7471 if test "${enable_home_terminfo+set}" = set; then
7472   enableval="$enable_home_terminfo"
7473   with_home_terminfo=$enableval
7474 else
7475   with_home_terminfo=yes
7476 fi;
7477 echo "$as_me:7477: result: $with_home_terminfo" >&5
7478 echo "${ECHO_T}$with_home_terminfo" >&6
7479 test "x$with_home_terminfo" = "xyes" &&
7480 cat >>confdefs.h <<\EOF
7481 #define USE_HOME_TERMINFO 1
7482 EOF
7483
7484 echo "$as_me:7484: checking if you want to use restricted environment when running as root" >&5
7485 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7486
7487 # Check whether --enable-root-environ or --disable-root-environ was given.
7488 if test "${enable_root_environ+set}" = set; then
7489   enableval="$enable_root_environ"
7490   with_root_environ=$enableval
7491 else
7492   with_root_environ=yes
7493 fi;
7494 echo "$as_me:7494: result: $with_root_environ" >&5
7495 echo "${ECHO_T}$with_root_environ" >&6
7496 test "x$with_root_environ" = xyes &&
7497 cat >>confdefs.h <<\EOF
7498 #define USE_ROOT_ENVIRON 1
7499 EOF
7500
7501 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7502 ###   to reduce storage requirements for the terminfo database.
7503
7504 for ac_func in \
7505         remove \
7506         unlink
7507 do
7508 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7509 echo "$as_me:7509: checking for $ac_func" >&5
7510 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7511 if eval "test \"\${$as_ac_var+set}\" = set"; then
7512   echo $ECHO_N "(cached) $ECHO_C" >&6
7513 else
7514   cat >conftest.$ac_ext <<_ACEOF
7515 #line 7515 "configure"
7516 #include "confdefs.h"
7517 /* System header to define __stub macros and hopefully few prototypes,
7518     which can conflict with char $ac_func (); below.  */
7519 #include <assert.h>
7520 /* Override any gcc2 internal prototype to avoid an error.  */
7521 #ifdef __cplusplus
7522 extern "C"
7523 #endif
7524 /* We use char because int might match the return type of a gcc2
7525    builtin and then its argument prototype would still apply.  */
7526 char $ac_func ();
7527 char (*f) ();
7528
7529 int
7530 main ()
7531 {
7532 /* The GNU C library defines this for functions which it implements
7533     to always fail with ENOSYS.  Some functions are actually named
7534     something starting with __ and the normal name is an alias.  */
7535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7536 choke me
7537 #else
7538 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7539 #endif
7540
7541   ;
7542   return 0;
7543 }
7544 _ACEOF
7545 rm -f conftest.$ac_objext conftest$ac_exeext
7546 if { (eval echo "$as_me:7546: \"$ac_link\"") >&5
7547   (eval $ac_link) 2>&5
7548   ac_status=$?
7549   echo "$as_me:7549: \$? = $ac_status" >&5
7550   (exit $ac_status); } &&
7551          { ac_try='test -s conftest$ac_exeext'
7552   { (eval echo "$as_me:7552: \"$ac_try\"") >&5
7553   (eval $ac_try) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit $ac_status); }; }; then
7557   eval "$as_ac_var=yes"
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 cat conftest.$ac_ext >&5
7561 eval "$as_ac_var=no"
7562 fi
7563 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7564 fi
7565 echo "$as_me:7565: result: `eval echo '${'$as_ac_var'}'`" >&5
7566 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7567 if test `eval echo '${'$as_ac_var'}'` = yes; then
7568   cat >>confdefs.h <<EOF
7569 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7570 EOF
7571
7572 fi
7573 done
7574
7575 if test "$cross_compiling" = yes ; then
7576
7577 for ac_func in \
7578                 link \
7579                 symlink
7580 do
7581 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7582 echo "$as_me:7582: checking for $ac_func" >&5
7583 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7584 if eval "test \"\${$as_ac_var+set}\" = set"; then
7585   echo $ECHO_N "(cached) $ECHO_C" >&6
7586 else
7587   cat >conftest.$ac_ext <<_ACEOF
7588 #line 7588 "configure"
7589 #include "confdefs.h"
7590 /* System header to define __stub macros and hopefully few prototypes,
7591     which can conflict with char $ac_func (); below.  */
7592 #include <assert.h>
7593 /* Override any gcc2 internal prototype to avoid an error.  */
7594 #ifdef __cplusplus
7595 extern "C"
7596 #endif
7597 /* We use char because int might match the return type of a gcc2
7598    builtin and then its argument prototype would still apply.  */
7599 char $ac_func ();
7600 char (*f) ();
7601
7602 int
7603 main ()
7604 {
7605 /* The GNU C library defines this for functions which it implements
7606     to always fail with ENOSYS.  Some functions are actually named
7607     something starting with __ and the normal name is an alias.  */
7608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7609 choke me
7610 #else
7611 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7612 #endif
7613
7614   ;
7615   return 0;
7616 }
7617 _ACEOF
7618 rm -f conftest.$ac_objext conftest$ac_exeext
7619 if { (eval echo "$as_me:7619: \"$ac_link\"") >&5
7620   (eval $ac_link) 2>&5
7621   ac_status=$?
7622   echo "$as_me:7622: \$? = $ac_status" >&5
7623   (exit $ac_status); } &&
7624          { ac_try='test -s conftest$ac_exeext'
7625   { (eval echo "$as_me:7625: \"$ac_try\"") >&5
7626   (eval $ac_try) 2>&5
7627   ac_status=$?
7628   echo "$as_me:7628: \$? = $ac_status" >&5
7629   (exit $ac_status); }; }; then
7630   eval "$as_ac_var=yes"
7631 else
7632   echo "$as_me: failed program was:" >&5
7633 cat conftest.$ac_ext >&5
7634 eval "$as_ac_var=no"
7635 fi
7636 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7637 fi
7638 echo "$as_me:7638: result: `eval echo '${'$as_ac_var'}'`" >&5
7639 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7640 if test `eval echo '${'$as_ac_var'}'` = yes; then
7641   cat >>confdefs.h <<EOF
7642 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7643 EOF
7644
7645 fi
7646 done
7647
7648 else
7649         echo "$as_me:7649: checking if link/symlink functions work" >&5
7650 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7651 if test "${cf_cv_link_funcs+set}" = set; then
7652   echo $ECHO_N "(cached) $ECHO_C" >&6
7653 else
7654
7655                 cf_cv_link_funcs=
7656                 for cf_func in link symlink ; do
7657                         if test "$cross_compiling" = yes; then
7658
7659                         eval 'ac_cv_func_'$cf_func'=error'
7660 else
7661   cat >conftest.$ac_ext <<_ACEOF
7662 #line 7662 "configure"
7663 #include "confdefs.h"
7664
7665 #include <sys/types.h>
7666 #include <sys/stat.h>
7667 #ifdef HAVE_UNISTD_H
7668 #include <unistd.h>
7669 #endif
7670 int main()
7671 {
7672         int fail = 0;
7673         char *src = "config.log";
7674         char *dst = "conftest.chk";
7675         struct stat src_sb;
7676         struct stat dst_sb;
7677
7678         stat(src, &src_sb);
7679         fail = ($cf_func("config.log", "conftest.chk") < 0)
7680             || (stat(dst, &dst_sb) < 0)
7681             || (dst_sb.st_mtime != src_sb.st_mtime);
7682 #ifdef HAVE_UNLINK
7683         unlink(dst);
7684 #else
7685         remove(dst);
7686 #endif
7687         ${cf_cv_main_return:-return} (fail);
7688 }
7689
7690 _ACEOF
7691 rm -f conftest$ac_exeext
7692 if { (eval echo "$as_me:7692: \"$ac_link\"") >&5
7693   (eval $ac_link) 2>&5
7694   ac_status=$?
7695   echo "$as_me:7695: \$? = $ac_status" >&5
7696   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7697   { (eval echo "$as_me:7697: \"$ac_try\"") >&5
7698   (eval $ac_try) 2>&5
7699   ac_status=$?
7700   echo "$as_me:7700: \$? = $ac_status" >&5
7701   (exit $ac_status); }; }; then
7702
7703                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7704                         eval 'ac_cv_func_'$cf_func'=yes'
7705 else
7706   echo "$as_me: program exited with status $ac_status" >&5
7707 echo "$as_me: failed program was:" >&5
7708 cat conftest.$ac_ext >&5
7709
7710                         eval 'ac_cv_func_'$cf_func'=no'
7711 fi
7712 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7713 fi
7714                 done
7715                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7716
7717 fi
7718 echo "$as_me:7718: result: $cf_cv_link_funcs" >&5
7719 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7720         test "$ac_cv_func_link"    = yes &&
7721 cat >>confdefs.h <<\EOF
7722 #define HAVE_LINK 1
7723 EOF
7724
7725         test "$ac_cv_func_symlink" = yes &&
7726 cat >>confdefs.h <<\EOF
7727 #define HAVE_SYMLINK 1
7728 EOF
7729
7730 fi
7731
7732 with_links=no
7733 with_symlinks=no
7734
7735 # soft links (symbolic links) are useful for some systems where hard links do
7736 # not work, or to make it simpler to copy terminfo trees around.
7737 if test "x$ac_cv_func_symlink" = xyes ; then
7738         echo "$as_me:7738: checking if tic should use symbolic links" >&5
7739 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7740
7741 # Check whether --enable-symlinks or --disable-symlinks was given.
7742 if test "${enable_symlinks+set}" = set; then
7743   enableval="$enable_symlinks"
7744   with_symlinks=$enableval
7745 else
7746   with_symlinks=no
7747 fi;
7748         echo "$as_me:7748: result: $with_symlinks" >&5
7749 echo "${ECHO_T}$with_symlinks" >&6
7750 fi
7751
7752 # If we have hard links and did not choose to use soft links instead, there is
7753 # no reason to make this choice optional - use the hard links.
7754 if test "$with_symlinks" = no ; then
7755         echo "$as_me:7755: checking if tic should use hard links" >&5
7756 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7757         if test "x$ac_cv_func_link" = xyes ; then
7758                 with_links=yes
7759         else
7760                 with_links=no
7761         fi
7762         echo "$as_me:7762: result: $with_links" >&5
7763 echo "${ECHO_T}$with_links" >&6
7764 fi
7765
7766 test "x$with_links" = xyes &&
7767 cat >>confdefs.h <<\EOF
7768 #define USE_LINKS 1
7769 EOF
7770
7771 test "x$with_symlinks" = xyes &&
7772 cat >>confdefs.h <<\EOF
7773 #define USE_SYMLINKS 1
7774 EOF
7775
7776 ###   use option --enable-broken-linker to force on use of broken-linker support
7777 echo "$as_me:7777: checking if you want broken-linker support code" >&5
7778 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7779
7780 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7781 if test "${enable_broken_linker+set}" = set; then
7782   enableval="$enable_broken_linker"
7783   with_broken_linker=$enableval
7784 else
7785   with_broken_linker=${BROKEN_LINKER:-no}
7786 fi;
7787 echo "$as_me:7787: result: $with_broken_linker" >&5
7788 echo "${ECHO_T}$with_broken_linker" >&6
7789
7790 BROKEN_LINKER=0
7791 if test "x$with_broken_linker" = xyes ; then
7792
7793 cat >>confdefs.h <<\EOF
7794 #define BROKEN_LINKER 1
7795 EOF
7796
7797         BROKEN_LINKER=1
7798 elif test "$DFT_LWR_MODEL" = shared ; then
7799         case $cf_cv_system_name in
7800         (cygwin*)
7801
7802 cat >>confdefs.h <<\EOF
7803 #define BROKEN_LINKER 1
7804 EOF
7805
7806                 BROKEN_LINKER=1
7807                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7808
7809 echo "${as_me:-configure}:7809: testing cygwin linker is broken anyway ..." 1>&5
7810
7811                 ;;
7812         esac
7813 fi
7814
7815 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7816 echo "$as_me:7816: checking if tputs should process BSD-style prefix padding" >&5
7817 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7818
7819 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7820 if test "${enable_bsdpad+set}" = set; then
7821   enableval="$enable_bsdpad"
7822   with_bsdpad=$enableval
7823 else
7824   with_bsdpad=no
7825 fi;
7826 echo "$as_me:7826: result: $with_bsdpad" >&5
7827 echo "${ECHO_T}$with_bsdpad" >&6
7828 test "x$with_bsdpad" = xyes &&
7829 cat >>confdefs.h <<\EOF
7830 #define BSD_TPUTS 1
7831 EOF
7832
7833 ###   use option --enable-widec to turn on use of wide-character support
7834 NCURSES_CH_T=chtype
7835 NCURSES_LIBUTF8=0
7836
7837 NEED_WCHAR_H=0
7838 NCURSES_MBSTATE_T=0
7839 NCURSES_WCHAR_T=0
7840 NCURSES_WINT_T=0
7841
7842 # Check to define _XOPEN_SOURCE "automatically"
7843 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7844
7845 cf_XOPEN_SOURCE=500
7846 cf_POSIX_C_SOURCE=199506L
7847 cf_xopen_source=
7848
7849 case $host_os in
7850 (aix[4-7]*)
7851         cf_xopen_source="-D_ALL_SOURCE"
7852         ;;
7853 (cygwin|msys)
7854         cf_XOPEN_SOURCE=600
7855         ;;
7856 (darwin[0-8].*)
7857         cf_xopen_source="-D_APPLE_C_SOURCE"
7858         ;;
7859 (darwin*)
7860         cf_xopen_source="-D_DARWIN_C_SOURCE"
7861         cf_XOPEN_SOURCE=
7862         ;;
7863 (freebsd*|dragonfly*)
7864         # 5.x headers associate
7865         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7866         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7867         cf_POSIX_C_SOURCE=200112L
7868         cf_XOPEN_SOURCE=600
7869         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7870         ;;
7871 (hpux11*)
7872         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7873         ;;
7874 (hpux*)
7875         cf_xopen_source="-D_HPUX_SOURCE"
7876         ;;
7877 (irix[56].*)
7878         cf_xopen_source="-D_SGI_SOURCE"
7879         cf_XOPEN_SOURCE=
7880         ;;
7881 (linux*|gnu*|mint*|k*bsd*-gnu)
7882
7883 echo "$as_me:7883: checking if we must define _GNU_SOURCE" >&5
7884 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7885 if test "${cf_cv_gnu_source+set}" = set; then
7886   echo $ECHO_N "(cached) $ECHO_C" >&6
7887 else
7888
7889 cat >conftest.$ac_ext <<_ACEOF
7890 #line 7890 "configure"
7891 #include "confdefs.h"
7892 #include <sys/types.h>
7893 int
7894 main ()
7895 {
7896
7897 #ifndef _XOPEN_SOURCE
7898 make an error
7899 #endif
7900   ;
7901   return 0;
7902 }
7903 _ACEOF
7904 rm -f conftest.$ac_objext
7905 if { (eval echo "$as_me:7905: \"$ac_compile\"") >&5
7906   (eval $ac_compile) 2>&5
7907   ac_status=$?
7908   echo "$as_me:7908: \$? = $ac_status" >&5
7909   (exit $ac_status); } &&
7910          { ac_try='test -s conftest.$ac_objext'
7911   { (eval echo "$as_me:7911: \"$ac_try\"") >&5
7912   (eval $ac_try) 2>&5
7913   ac_status=$?
7914   echo "$as_me:7914: \$? = $ac_status" >&5
7915   (exit $ac_status); }; }; then
7916   cf_cv_gnu_source=no
7917 else
7918   echo "$as_me: failed program was:" >&5
7919 cat conftest.$ac_ext >&5
7920 cf_save="$CPPFLAGS"
7921          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7922          cat >conftest.$ac_ext <<_ACEOF
7923 #line 7923 "configure"
7924 #include "confdefs.h"
7925 #include <sys/types.h>
7926 int
7927 main ()
7928 {
7929
7930 #ifdef _XOPEN_SOURCE
7931 make an error
7932 #endif
7933   ;
7934   return 0;
7935 }
7936 _ACEOF
7937 rm -f conftest.$ac_objext
7938 if { (eval echo "$as_me:7938: \"$ac_compile\"") >&5
7939   (eval $ac_compile) 2>&5
7940   ac_status=$?
7941   echo "$as_me:7941: \$? = $ac_status" >&5
7942   (exit $ac_status); } &&
7943          { ac_try='test -s conftest.$ac_objext'
7944   { (eval echo "$as_me:7944: \"$ac_try\"") >&5
7945   (eval $ac_try) 2>&5
7946   ac_status=$?
7947   echo "$as_me:7947: \$? = $ac_status" >&5
7948   (exit $ac_status); }; }; then
7949   cf_cv_gnu_source=no
7950 else
7951   echo "$as_me: failed program was:" >&5
7952 cat conftest.$ac_ext >&5
7953 cf_cv_gnu_source=yes
7954 fi
7955 rm -f conftest.$ac_objext conftest.$ac_ext
7956         CPPFLAGS="$cf_save"
7957
7958 fi
7959 rm -f conftest.$ac_objext conftest.$ac_ext
7960
7961 fi
7962 echo "$as_me:7962: result: $cf_cv_gnu_source" >&5
7963 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7964 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7965
7966         ;;
7967 (minix*)
7968         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7969         ;;
7970 (mirbsd*)
7971         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7972         cf_XOPEN_SOURCE=
7973
7974 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7975
7976 cf_save_CFLAGS="$CFLAGS"
7977 cf_save_CPPFLAGS="$CPPFLAGS"
7978
7979 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7980         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7981                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7982
7983 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7984         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7985                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7986
7987 echo "$as_me:7987: checking if we should define _POSIX_C_SOURCE" >&5
7988 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7989 if test "${cf_cv_posix_c_source+set}" = set; then
7990   echo $ECHO_N "(cached) $ECHO_C" >&6
7991 else
7992
7993 echo "${as_me:-configure}:7993: testing if the symbol is already defined go no further ..." 1>&5
7994
7995         cat >conftest.$ac_ext <<_ACEOF
7996 #line 7996 "configure"
7997 #include "confdefs.h"
7998 #include <sys/types.h>
7999 int
8000 main ()
8001 {
8002
8003 #ifndef _POSIX_C_SOURCE
8004 make an error
8005 #endif
8006   ;
8007   return 0;
8008 }
8009 _ACEOF
8010 rm -f conftest.$ac_objext
8011 if { (eval echo "$as_me:8011: \"$ac_compile\"") >&5
8012   (eval $ac_compile) 2>&5
8013   ac_status=$?
8014   echo "$as_me:8014: \$? = $ac_status" >&5
8015   (exit $ac_status); } &&
8016          { ac_try='test -s conftest.$ac_objext'
8017   { (eval echo "$as_me:8017: \"$ac_try\"") >&5
8018   (eval $ac_try) 2>&5
8019   ac_status=$?
8020   echo "$as_me:8020: \$? = $ac_status" >&5
8021   (exit $ac_status); }; }; then
8022   cf_cv_posix_c_source=no
8023 else
8024   echo "$as_me: failed program was:" >&5
8025 cat conftest.$ac_ext >&5
8026 cf_want_posix_source=no
8027          case .$cf_POSIX_C_SOURCE in
8028          (.[12]??*)
8029                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8030                 ;;
8031          (.2)
8032                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8033                 cf_want_posix_source=yes
8034                 ;;
8035          (.*)
8036                 cf_want_posix_source=yes
8037                 ;;
8038          esac
8039          if test "$cf_want_posix_source" = yes ; then
8040                 cat >conftest.$ac_ext <<_ACEOF
8041 #line 8041 "configure"
8042 #include "confdefs.h"
8043 #include <sys/types.h>
8044 int
8045 main ()
8046 {
8047
8048 #ifdef _POSIX_SOURCE
8049 make an error
8050 #endif
8051   ;
8052   return 0;
8053 }
8054 _ACEOF
8055 rm -f conftest.$ac_objext
8056 if { (eval echo "$as_me:8056: \"$ac_compile\"") >&5
8057   (eval $ac_compile) 2>&5
8058   ac_status=$?
8059   echo "$as_me:8059: \$? = $ac_status" >&5
8060   (exit $ac_status); } &&
8061          { ac_try='test -s conftest.$ac_objext'
8062   { (eval echo "$as_me:8062: \"$ac_try\"") >&5
8063   (eval $ac_try) 2>&5
8064   ac_status=$?
8065   echo "$as_me:8065: \$? = $ac_status" >&5
8066   (exit $ac_status); }; }; then
8067   :
8068 else
8069   echo "$as_me: failed program was:" >&5
8070 cat conftest.$ac_ext >&5
8071 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8072 fi
8073 rm -f conftest.$ac_objext conftest.$ac_ext
8074          fi
8075
8076 echo "${as_me:-configure}:8076: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8077
8078          CFLAGS="$cf_trim_CFLAGS"
8079          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8080
8081 echo "${as_me:-configure}:8081: testing if the second compile does not leave our definition intact error ..." 1>&5
8082
8083          cat >conftest.$ac_ext <<_ACEOF
8084 #line 8084 "configure"
8085 #include "confdefs.h"
8086 #include <sys/types.h>
8087 int
8088 main ()
8089 {
8090
8091 #ifndef _POSIX_C_SOURCE
8092 make an error
8093 #endif
8094   ;
8095   return 0;
8096 }
8097 _ACEOF
8098 rm -f conftest.$ac_objext
8099 if { (eval echo "$as_me:8099: \"$ac_compile\"") >&5
8100   (eval $ac_compile) 2>&5
8101   ac_status=$?
8102   echo "$as_me:8102: \$? = $ac_status" >&5
8103   (exit $ac_status); } &&
8104          { ac_try='test -s conftest.$ac_objext'
8105   { (eval echo "$as_me:8105: \"$ac_try\"") >&5
8106   (eval $ac_try) 2>&5
8107   ac_status=$?
8108   echo "$as_me:8108: \$? = $ac_status" >&5
8109   (exit $ac_status); }; }; then
8110   :
8111 else
8112   echo "$as_me: failed program was:" >&5
8113 cat conftest.$ac_ext >&5
8114 cf_cv_posix_c_source=no
8115 fi
8116 rm -f conftest.$ac_objext conftest.$ac_ext
8117          CFLAGS="$cf_save_CFLAGS"
8118          CPPFLAGS="$cf_save_CPPFLAGS"
8119
8120 fi
8121 rm -f conftest.$ac_objext conftest.$ac_ext
8122
8123 fi
8124 echo "$as_me:8124: result: $cf_cv_posix_c_source" >&5
8125 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8126
8127 if test "$cf_cv_posix_c_source" != no ; then
8128         CFLAGS="$cf_trim_CFLAGS"
8129         CPPFLAGS="$cf_trim_CPPFLAGS"
8130
8131 cf_fix_cppflags=no
8132 cf_new_cflags=
8133 cf_new_cppflags=
8134 cf_new_extra_cppflags=
8135
8136 for cf_add_cflags in $cf_cv_posix_c_source
8137 do
8138 case $cf_fix_cppflags in
8139 (no)
8140         case $cf_add_cflags in
8141         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8142                 case $cf_add_cflags in
8143                 (-D*)
8144                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8145
8146                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8147                                 && test -z "${cf_tst_cflags}" \
8148                                 && cf_fix_cppflags=yes
8149
8150                         if test $cf_fix_cppflags = yes ; then
8151                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8152                                 continue
8153                         elif test "${cf_tst_cflags}" = "\"'" ; then
8154                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8155                                 continue
8156                         fi
8157                         ;;
8158                 esac
8159                 case "$CPPFLAGS" in
8160                 (*$cf_add_cflags)
8161                         ;;
8162                 (*)
8163                         case $cf_add_cflags in
8164                         (-D*)
8165                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8166
8167 CPPFLAGS=`echo "$CPPFLAGS" | \
8168         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8169                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8170
8171                                 ;;
8172                         esac
8173                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8174                         ;;
8175                 esac
8176                 ;;
8177         (*)
8178                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8179                 ;;
8180         esac
8181         ;;
8182 (yes)
8183         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8184
8185         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8186
8187         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8188                 && test -z "${cf_tst_cflags}" \
8189                 && cf_fix_cppflags=no
8190         ;;
8191 esac
8192 done
8193
8194 if test -n "$cf_new_cflags" ; then
8195
8196         CFLAGS="$CFLAGS $cf_new_cflags"
8197 fi
8198
8199 if test -n "$cf_new_cppflags" ; then
8200
8201         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8202 fi
8203
8204 if test -n "$cf_new_extra_cppflags" ; then
8205
8206         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8207 fi
8208
8209 fi
8210
8211         ;;
8212 (netbsd*)
8213         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8214         ;;
8215 (openbsd[4-9]*)
8216         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8217         cf_xopen_source="-D_BSD_SOURCE"
8218         cf_XOPEN_SOURCE=600
8219         ;;
8220 (openbsd*)
8221         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8222         ;;
8223 (osf[45]*)
8224         cf_xopen_source="-D_OSF_SOURCE"
8225         ;;
8226 (nto-qnx*)
8227         cf_xopen_source="-D_QNX_SOURCE"
8228         ;;
8229 (sco*)
8230         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8231         ;;
8232 (solaris2.*)
8233         cf_xopen_source="-D__EXTENSIONS__"
8234         cf_cv_xopen_source=broken
8235         ;;
8236 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8237         cf_XOPEN_SOURCE=
8238         cf_POSIX_C_SOURCE=
8239         ;;
8240 (*)
8241
8242 echo "$as_me:8242: checking if we should define _XOPEN_SOURCE" >&5
8243 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8244 if test "${cf_cv_xopen_source+set}" = set; then
8245   echo $ECHO_N "(cached) $ECHO_C" >&6
8246 else
8247
8248         cat >conftest.$ac_ext <<_ACEOF
8249 #line 8249 "configure"
8250 #include "confdefs.h"
8251
8252 #include <stdlib.h>
8253 #include <string.h>
8254 #include <sys/types.h>
8255
8256 int
8257 main ()
8258 {
8259
8260 #ifndef _XOPEN_SOURCE
8261 make an error
8262 #endif
8263   ;
8264   return 0;
8265 }
8266 _ACEOF
8267 rm -f conftest.$ac_objext
8268 if { (eval echo "$as_me:8268: \"$ac_compile\"") >&5
8269   (eval $ac_compile) 2>&5
8270   ac_status=$?
8271   echo "$as_me:8271: \$? = $ac_status" >&5
8272   (exit $ac_status); } &&
8273          { ac_try='test -s conftest.$ac_objext'
8274   { (eval echo "$as_me:8274: \"$ac_try\"") >&5
8275   (eval $ac_try) 2>&5
8276   ac_status=$?
8277   echo "$as_me:8277: \$? = $ac_status" >&5
8278   (exit $ac_status); }; }; then
8279   cf_cv_xopen_source=no
8280 else
8281   echo "$as_me: failed program was:" >&5
8282 cat conftest.$ac_ext >&5
8283 cf_save="$CPPFLAGS"
8284          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8285          cat >conftest.$ac_ext <<_ACEOF
8286 #line 8286 "configure"
8287 #include "confdefs.h"
8288
8289 #include <stdlib.h>
8290 #include <string.h>
8291 #include <sys/types.h>
8292
8293 int
8294 main ()
8295 {
8296
8297 #ifdef _XOPEN_SOURCE
8298 make an error
8299 #endif
8300   ;
8301   return 0;
8302 }
8303 _ACEOF
8304 rm -f conftest.$ac_objext
8305 if { (eval echo "$as_me:8305: \"$ac_compile\"") >&5
8306   (eval $ac_compile) 2>&5
8307   ac_status=$?
8308   echo "$as_me:8308: \$? = $ac_status" >&5
8309   (exit $ac_status); } &&
8310          { ac_try='test -s conftest.$ac_objext'
8311   { (eval echo "$as_me:8311: \"$ac_try\"") >&5
8312   (eval $ac_try) 2>&5
8313   ac_status=$?
8314   echo "$as_me:8314: \$? = $ac_status" >&5
8315   (exit $ac_status); }; }; then
8316   cf_cv_xopen_source=no
8317 else
8318   echo "$as_me: failed program was:" >&5
8319 cat conftest.$ac_ext >&5
8320 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8321 fi
8322 rm -f conftest.$ac_objext conftest.$ac_ext
8323         CPPFLAGS="$cf_save"
8324
8325 fi
8326 rm -f conftest.$ac_objext conftest.$ac_ext
8327
8328 fi
8329 echo "$as_me:8329: result: $cf_cv_xopen_source" >&5
8330 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8331
8332 if test "$cf_cv_xopen_source" != no ; then
8333
8334 CFLAGS=`echo "$CFLAGS" | \
8335         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8336                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8337
8338 CPPFLAGS=`echo "$CPPFLAGS" | \
8339         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8340                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8341
8342         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8343
8344 cf_fix_cppflags=no
8345 cf_new_cflags=
8346 cf_new_cppflags=
8347 cf_new_extra_cppflags=
8348
8349 for cf_add_cflags in $cf_temp_xopen_source
8350 do
8351 case $cf_fix_cppflags in
8352 (no)
8353         case $cf_add_cflags in
8354         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8355                 case $cf_add_cflags in
8356                 (-D*)
8357                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8358
8359                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8360                                 && test -z "${cf_tst_cflags}" \
8361                                 && cf_fix_cppflags=yes
8362
8363                         if test $cf_fix_cppflags = yes ; then
8364                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8365                                 continue
8366                         elif test "${cf_tst_cflags}" = "\"'" ; then
8367                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8368                                 continue
8369                         fi
8370                         ;;
8371                 esac
8372                 case "$CPPFLAGS" in
8373                 (*$cf_add_cflags)
8374                         ;;
8375                 (*)
8376                         case $cf_add_cflags in
8377                         (-D*)
8378                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8379
8380 CPPFLAGS=`echo "$CPPFLAGS" | \
8381         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8382                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8383
8384                                 ;;
8385                         esac
8386                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8387                         ;;
8388                 esac
8389                 ;;
8390         (*)
8391                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8392                 ;;
8393         esac
8394         ;;
8395 (yes)
8396         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8397
8398         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8399
8400         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8401                 && test -z "${cf_tst_cflags}" \
8402                 && cf_fix_cppflags=no
8403         ;;
8404 esac
8405 done
8406
8407 if test -n "$cf_new_cflags" ; then
8408
8409         CFLAGS="$CFLAGS $cf_new_cflags"
8410 fi
8411
8412 if test -n "$cf_new_cppflags" ; then
8413
8414         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8415 fi
8416
8417 if test -n "$cf_new_extra_cppflags" ; then
8418
8419         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8420 fi
8421
8422 fi
8423
8424 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8425
8426 cf_save_CFLAGS="$CFLAGS"
8427 cf_save_CPPFLAGS="$CPPFLAGS"
8428
8429 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8430         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8431                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8432
8433 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8434         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8435                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8436
8437 echo "$as_me:8437: checking if we should define _POSIX_C_SOURCE" >&5
8438 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8439 if test "${cf_cv_posix_c_source+set}" = set; then
8440   echo $ECHO_N "(cached) $ECHO_C" >&6
8441 else
8442
8443 echo "${as_me:-configure}:8443: testing if the symbol is already defined go no further ..." 1>&5
8444
8445         cat >conftest.$ac_ext <<_ACEOF
8446 #line 8446 "configure"
8447 #include "confdefs.h"
8448 #include <sys/types.h>
8449 int
8450 main ()
8451 {
8452
8453 #ifndef _POSIX_C_SOURCE
8454 make an error
8455 #endif
8456   ;
8457   return 0;
8458 }
8459 _ACEOF
8460 rm -f conftest.$ac_objext
8461 if { (eval echo "$as_me:8461: \"$ac_compile\"") >&5
8462   (eval $ac_compile) 2>&5
8463   ac_status=$?
8464   echo "$as_me:8464: \$? = $ac_status" >&5
8465   (exit $ac_status); } &&
8466          { ac_try='test -s conftest.$ac_objext'
8467   { (eval echo "$as_me:8467: \"$ac_try\"") >&5
8468   (eval $ac_try) 2>&5
8469   ac_status=$?
8470   echo "$as_me:8470: \$? = $ac_status" >&5
8471   (exit $ac_status); }; }; then
8472   cf_cv_posix_c_source=no
8473 else
8474   echo "$as_me: failed program was:" >&5
8475 cat conftest.$ac_ext >&5
8476 cf_want_posix_source=no
8477          case .$cf_POSIX_C_SOURCE in
8478          (.[12]??*)
8479                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8480                 ;;
8481          (.2)
8482                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8483                 cf_want_posix_source=yes
8484                 ;;
8485          (.*)
8486                 cf_want_posix_source=yes
8487                 ;;
8488          esac
8489          if test "$cf_want_posix_source" = yes ; then
8490                 cat >conftest.$ac_ext <<_ACEOF
8491 #line 8491 "configure"
8492 #include "confdefs.h"
8493 #include <sys/types.h>
8494 int
8495 main ()
8496 {
8497
8498 #ifdef _POSIX_SOURCE
8499 make an error
8500 #endif
8501   ;
8502   return 0;
8503 }
8504 _ACEOF
8505 rm -f conftest.$ac_objext
8506 if { (eval echo "$as_me:8506: \"$ac_compile\"") >&5
8507   (eval $ac_compile) 2>&5
8508   ac_status=$?
8509   echo "$as_me:8509: \$? = $ac_status" >&5
8510   (exit $ac_status); } &&
8511          { ac_try='test -s conftest.$ac_objext'
8512   { (eval echo "$as_me:8512: \"$ac_try\"") >&5
8513   (eval $ac_try) 2>&5
8514   ac_status=$?
8515   echo "$as_me:8515: \$? = $ac_status" >&5
8516   (exit $ac_status); }; }; then
8517   :
8518 else
8519   echo "$as_me: failed program was:" >&5
8520 cat conftest.$ac_ext >&5
8521 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8522 fi
8523 rm -f conftest.$ac_objext conftest.$ac_ext
8524          fi
8525
8526 echo "${as_me:-configure}:8526: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8527
8528          CFLAGS="$cf_trim_CFLAGS"
8529          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8530
8531 echo "${as_me:-configure}:8531: testing if the second compile does not leave our definition intact error ..." 1>&5
8532
8533          cat >conftest.$ac_ext <<_ACEOF
8534 #line 8534 "configure"
8535 #include "confdefs.h"
8536 #include <sys/types.h>
8537 int
8538 main ()
8539 {
8540
8541 #ifndef _POSIX_C_SOURCE
8542 make an error
8543 #endif
8544   ;
8545   return 0;
8546 }
8547 _ACEOF
8548 rm -f conftest.$ac_objext
8549 if { (eval echo "$as_me:8549: \"$ac_compile\"") >&5
8550   (eval $ac_compile) 2>&5
8551   ac_status=$?
8552   echo "$as_me:8552: \$? = $ac_status" >&5
8553   (exit $ac_status); } &&
8554          { ac_try='test -s conftest.$ac_objext'
8555   { (eval echo "$as_me:8555: \"$ac_try\"") >&5
8556   (eval $ac_try) 2>&5
8557   ac_status=$?
8558   echo "$as_me:8558: \$? = $ac_status" >&5
8559   (exit $ac_status); }; }; then
8560   :
8561 else
8562   echo "$as_me: failed program was:" >&5
8563 cat conftest.$ac_ext >&5
8564 cf_cv_posix_c_source=no
8565 fi
8566 rm -f conftest.$ac_objext conftest.$ac_ext
8567          CFLAGS="$cf_save_CFLAGS"
8568          CPPFLAGS="$cf_save_CPPFLAGS"
8569
8570 fi
8571 rm -f conftest.$ac_objext conftest.$ac_ext
8572
8573 fi
8574 echo "$as_me:8574: result: $cf_cv_posix_c_source" >&5
8575 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8576
8577 if test "$cf_cv_posix_c_source" != no ; then
8578         CFLAGS="$cf_trim_CFLAGS"
8579         CPPFLAGS="$cf_trim_CPPFLAGS"
8580
8581 cf_fix_cppflags=no
8582 cf_new_cflags=
8583 cf_new_cppflags=
8584 cf_new_extra_cppflags=
8585
8586 for cf_add_cflags in $cf_cv_posix_c_source
8587 do
8588 case $cf_fix_cppflags in
8589 (no)
8590         case $cf_add_cflags in
8591         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8592                 case $cf_add_cflags in
8593                 (-D*)
8594                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8595
8596                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8597                                 && test -z "${cf_tst_cflags}" \
8598                                 && cf_fix_cppflags=yes
8599
8600                         if test $cf_fix_cppflags = yes ; then
8601                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8602                                 continue
8603                         elif test "${cf_tst_cflags}" = "\"'" ; then
8604                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8605                                 continue
8606                         fi
8607                         ;;
8608                 esac
8609                 case "$CPPFLAGS" in
8610                 (*$cf_add_cflags)
8611                         ;;
8612                 (*)
8613                         case $cf_add_cflags in
8614                         (-D*)
8615                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8616
8617 CPPFLAGS=`echo "$CPPFLAGS" | \
8618         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8619                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8620
8621                                 ;;
8622                         esac
8623                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8624                         ;;
8625                 esac
8626                 ;;
8627         (*)
8628                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8629                 ;;
8630         esac
8631         ;;
8632 (yes)
8633         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8634
8635         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8636
8637         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8638                 && test -z "${cf_tst_cflags}" \
8639                 && cf_fix_cppflags=no
8640         ;;
8641 esac
8642 done
8643
8644 if test -n "$cf_new_cflags" ; then
8645
8646         CFLAGS="$CFLAGS $cf_new_cflags"
8647 fi
8648
8649 if test -n "$cf_new_cppflags" ; then
8650
8651         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8652 fi
8653
8654 if test -n "$cf_new_extra_cppflags" ; then
8655
8656         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8657 fi
8658
8659 fi
8660
8661         ;;
8662 esac
8663
8664 if test -n "$cf_xopen_source" ; then
8665
8666 cf_fix_cppflags=no
8667 cf_new_cflags=
8668 cf_new_cppflags=
8669 cf_new_extra_cppflags=
8670
8671 for cf_add_cflags in $cf_xopen_source
8672 do
8673 case $cf_fix_cppflags in
8674 (no)
8675         case $cf_add_cflags in
8676         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8677                 case $cf_add_cflags in
8678                 (-D*)
8679                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8680
8681                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8682                                 && test -z "${cf_tst_cflags}" \
8683                                 && cf_fix_cppflags=yes
8684
8685                         if test $cf_fix_cppflags = yes ; then
8686                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8687                                 continue
8688                         elif test "${cf_tst_cflags}" = "\"'" ; then
8689                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8690                                 continue
8691                         fi
8692                         ;;
8693                 esac
8694                 case "$CPPFLAGS" in
8695                 (*$cf_add_cflags)
8696                         ;;
8697                 (*)
8698                         case $cf_add_cflags in
8699                         (-D*)
8700                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8701
8702 CPPFLAGS=`echo "$CPPFLAGS" | \
8703         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8704                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8705
8706                                 ;;
8707                         esac
8708                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8709                         ;;
8710                 esac
8711                 ;;
8712         (*)
8713                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8714                 ;;
8715         esac
8716         ;;
8717 (yes)
8718         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8719
8720         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8721
8722         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8723                 && test -z "${cf_tst_cflags}" \
8724                 && cf_fix_cppflags=no
8725         ;;
8726 esac
8727 done
8728
8729 if test -n "$cf_new_cflags" ; then
8730         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8731
8732 echo "${as_me:-configure}:8732: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8733
8734         CFLAGS="$CFLAGS $cf_new_cflags"
8735 fi
8736
8737 if test -n "$cf_new_cppflags" ; then
8738         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8739
8740 echo "${as_me:-configure}:8740: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8741
8742         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8743 fi
8744
8745 if test -n "$cf_new_extra_cppflags" ; then
8746         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8747
8748 echo "${as_me:-configure}:8748: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8749
8750         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8751 fi
8752
8753 fi
8754
8755 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8756         echo "$as_me:8756: checking if _XOPEN_SOURCE really is set" >&5
8757 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8758         cat >conftest.$ac_ext <<_ACEOF
8759 #line 8759 "configure"
8760 #include "confdefs.h"
8761 #include <stdlib.h>
8762 int
8763 main ()
8764 {
8765
8766 #ifndef _XOPEN_SOURCE
8767 make an error
8768 #endif
8769   ;
8770   return 0;
8771 }
8772 _ACEOF
8773 rm -f conftest.$ac_objext
8774 if { (eval echo "$as_me:8774: \"$ac_compile\"") >&5
8775   (eval $ac_compile) 2>&5
8776   ac_status=$?
8777   echo "$as_me:8777: \$? = $ac_status" >&5
8778   (exit $ac_status); } &&
8779          { ac_try='test -s conftest.$ac_objext'
8780   { (eval echo "$as_me:8780: \"$ac_try\"") >&5
8781   (eval $ac_try) 2>&5
8782   ac_status=$?
8783   echo "$as_me:8783: \$? = $ac_status" >&5
8784   (exit $ac_status); }; }; then
8785   cf_XOPEN_SOURCE_set=yes
8786 else
8787   echo "$as_me: failed program was:" >&5
8788 cat conftest.$ac_ext >&5
8789 cf_XOPEN_SOURCE_set=no
8790 fi
8791 rm -f conftest.$ac_objext conftest.$ac_ext
8792         echo "$as_me:8792: result: $cf_XOPEN_SOURCE_set" >&5
8793 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8794         if test $cf_XOPEN_SOURCE_set = yes
8795         then
8796                 cat >conftest.$ac_ext <<_ACEOF
8797 #line 8797 "configure"
8798 #include "confdefs.h"
8799 #include <stdlib.h>
8800 int
8801 main ()
8802 {
8803
8804 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8805 make an error
8806 #endif
8807   ;
8808   return 0;
8809 }
8810 _ACEOF
8811 rm -f conftest.$ac_objext
8812 if { (eval echo "$as_me:8812: \"$ac_compile\"") >&5
8813   (eval $ac_compile) 2>&5
8814   ac_status=$?
8815   echo "$as_me:8815: \$? = $ac_status" >&5
8816   (exit $ac_status); } &&
8817          { ac_try='test -s conftest.$ac_objext'
8818   { (eval echo "$as_me:8818: \"$ac_try\"") >&5
8819   (eval $ac_try) 2>&5
8820   ac_status=$?
8821   echo "$as_me:8821: \$? = $ac_status" >&5
8822   (exit $ac_status); }; }; then
8823   cf_XOPEN_SOURCE_set_ok=yes
8824 else
8825   echo "$as_me: failed program was:" >&5
8826 cat conftest.$ac_ext >&5
8827 cf_XOPEN_SOURCE_set_ok=no
8828 fi
8829 rm -f conftest.$ac_objext conftest.$ac_ext
8830                 if test $cf_XOPEN_SOURCE_set_ok = no
8831                 then
8832                         { echo "$as_me:8832: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8833 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8834                 fi
8835         else
8836
8837 echo "$as_me:8837: checking if we should define _XOPEN_SOURCE" >&5
8838 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8839 if test "${cf_cv_xopen_source+set}" = set; then
8840   echo $ECHO_N "(cached) $ECHO_C" >&6
8841 else
8842
8843         cat >conftest.$ac_ext <<_ACEOF
8844 #line 8844 "configure"
8845 #include "confdefs.h"
8846
8847 #include <stdlib.h>
8848 #include <string.h>
8849 #include <sys/types.h>
8850
8851 int
8852 main ()
8853 {
8854
8855 #ifndef _XOPEN_SOURCE
8856 make an error
8857 #endif
8858   ;
8859   return 0;
8860 }
8861 _ACEOF
8862 rm -f conftest.$ac_objext
8863 if { (eval echo "$as_me:8863: \"$ac_compile\"") >&5
8864   (eval $ac_compile) 2>&5
8865   ac_status=$?
8866   echo "$as_me:8866: \$? = $ac_status" >&5
8867   (exit $ac_status); } &&
8868          { ac_try='test -s conftest.$ac_objext'
8869   { (eval echo "$as_me:8869: \"$ac_try\"") >&5
8870   (eval $ac_try) 2>&5
8871   ac_status=$?
8872   echo "$as_me:8872: \$? = $ac_status" >&5
8873   (exit $ac_status); }; }; then
8874   cf_cv_xopen_source=no
8875 else
8876   echo "$as_me: failed program was:" >&5
8877 cat conftest.$ac_ext >&5
8878 cf_save="$CPPFLAGS"
8879          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8880          cat >conftest.$ac_ext <<_ACEOF
8881 #line 8881 "configure"
8882 #include "confdefs.h"
8883
8884 #include <stdlib.h>
8885 #include <string.h>
8886 #include <sys/types.h>
8887
8888 int
8889 main ()
8890 {
8891
8892 #ifdef _XOPEN_SOURCE
8893 make an error
8894 #endif
8895   ;
8896   return 0;
8897 }
8898 _ACEOF
8899 rm -f conftest.$ac_objext
8900 if { (eval echo "$as_me:8900: \"$ac_compile\"") >&5
8901   (eval $ac_compile) 2>&5
8902   ac_status=$?
8903   echo "$as_me:8903: \$? = $ac_status" >&5
8904   (exit $ac_status); } &&
8905          { ac_try='test -s conftest.$ac_objext'
8906   { (eval echo "$as_me:8906: \"$ac_try\"") >&5
8907   (eval $ac_try) 2>&5
8908   ac_status=$?
8909   echo "$as_me:8909: \$? = $ac_status" >&5
8910   (exit $ac_status); }; }; then
8911   cf_cv_xopen_source=no
8912 else
8913   echo "$as_me: failed program was:" >&5
8914 cat conftest.$ac_ext >&5
8915 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8916 fi
8917 rm -f conftest.$ac_objext conftest.$ac_ext
8918         CPPFLAGS="$cf_save"
8919
8920 fi
8921 rm -f conftest.$ac_objext conftest.$ac_ext
8922
8923 fi
8924 echo "$as_me:8924: result: $cf_cv_xopen_source" >&5
8925 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8926
8927 if test "$cf_cv_xopen_source" != no ; then
8928
8929 CFLAGS=`echo "$CFLAGS" | \
8930         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8931                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8932
8933 CPPFLAGS=`echo "$CPPFLAGS" | \
8934         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8935                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8936
8937         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8938
8939 cf_fix_cppflags=no
8940 cf_new_cflags=
8941 cf_new_cppflags=
8942 cf_new_extra_cppflags=
8943
8944 for cf_add_cflags in $cf_temp_xopen_source
8945 do
8946 case $cf_fix_cppflags in
8947 (no)
8948         case $cf_add_cflags in
8949         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8950                 case $cf_add_cflags in
8951                 (-D*)
8952                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8953
8954                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8955                                 && test -z "${cf_tst_cflags}" \
8956                                 && cf_fix_cppflags=yes
8957
8958                         if test $cf_fix_cppflags = yes ; then
8959                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8960                                 continue
8961                         elif test "${cf_tst_cflags}" = "\"'" ; then
8962                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8963                                 continue
8964                         fi
8965                         ;;
8966                 esac
8967                 case "$CPPFLAGS" in
8968                 (*$cf_add_cflags)
8969                         ;;
8970                 (*)
8971                         case $cf_add_cflags in
8972                         (-D*)
8973                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8974
8975 CPPFLAGS=`echo "$CPPFLAGS" | \
8976         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8977                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8978
8979                                 ;;
8980                         esac
8981                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8982                         ;;
8983                 esac
8984                 ;;
8985         (*)
8986                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8987                 ;;
8988         esac
8989         ;;
8990 (yes)
8991         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8992
8993         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8994
8995         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8996                 && test -z "${cf_tst_cflags}" \
8997                 && cf_fix_cppflags=no
8998         ;;
8999 esac
9000 done
9001
9002 if test -n "$cf_new_cflags" ; then
9003
9004         CFLAGS="$CFLAGS $cf_new_cflags"
9005 fi
9006
9007 if test -n "$cf_new_cppflags" ; then
9008
9009         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9010 fi
9011
9012 if test -n "$cf_new_extra_cppflags" ; then
9013
9014         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9015 fi
9016
9017 fi
9018
9019         fi
9020 fi
9021
9022 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9023
9024 # Work around breakage on OS X
9025
9026 echo "$as_me:9026: checking if SIGWINCH is defined" >&5
9027 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9028 if test "${cf_cv_define_sigwinch+set}" = set; then
9029   echo $ECHO_N "(cached) $ECHO_C" >&6
9030 else
9031
9032         cat >conftest.$ac_ext <<_ACEOF
9033 #line 9033 "configure"
9034 #include "confdefs.h"
9035
9036 #include <sys/types.h>
9037 #include <sys/signal.h>
9038
9039 int
9040 main ()
9041 {
9042 int x = SIGWINCH
9043   ;
9044   return 0;
9045 }
9046 _ACEOF
9047 rm -f conftest.$ac_objext
9048 if { (eval echo "$as_me:9048: \"$ac_compile\"") >&5
9049   (eval $ac_compile) 2>&5
9050   ac_status=$?
9051   echo "$as_me:9051: \$? = $ac_status" >&5
9052   (exit $ac_status); } &&
9053          { ac_try='test -s conftest.$ac_objext'
9054   { (eval echo "$as_me:9054: \"$ac_try\"") >&5
9055   (eval $ac_try) 2>&5
9056   ac_status=$?
9057   echo "$as_me:9057: \$? = $ac_status" >&5
9058   (exit $ac_status); }; }; then
9059   cf_cv_define_sigwinch=yes
9060 else
9061   echo "$as_me: failed program was:" >&5
9062 cat conftest.$ac_ext >&5
9063 cat >conftest.$ac_ext <<_ACEOF
9064 #line 9064 "configure"
9065 #include "confdefs.h"
9066
9067 #undef _XOPEN_SOURCE
9068 #undef _POSIX_SOURCE
9069 #undef _POSIX_C_SOURCE
9070 #include <sys/types.h>
9071 #include <sys/signal.h>
9072
9073 int
9074 main ()
9075 {
9076 int x = SIGWINCH
9077   ;
9078   return 0;
9079 }
9080 _ACEOF
9081 rm -f conftest.$ac_objext
9082 if { (eval echo "$as_me:9082: \"$ac_compile\"") >&5
9083   (eval $ac_compile) 2>&5
9084   ac_status=$?
9085   echo "$as_me:9085: \$? = $ac_status" >&5
9086   (exit $ac_status); } &&
9087          { ac_try='test -s conftest.$ac_objext'
9088   { (eval echo "$as_me:9088: \"$ac_try\"") >&5
9089   (eval $ac_try) 2>&5
9090   ac_status=$?
9091   echo "$as_me:9091: \$? = $ac_status" >&5
9092   (exit $ac_status); }; }; then
9093   cf_cv_define_sigwinch=maybe
9094 else
9095   echo "$as_me: failed program was:" >&5
9096 cat conftest.$ac_ext >&5
9097 cf_cv_define_sigwinch=no
9098 fi
9099 rm -f conftest.$ac_objext conftest.$ac_ext
9100
9101 fi
9102 rm -f conftest.$ac_objext conftest.$ac_ext
9103
9104 fi
9105 echo "$as_me:9105: result: $cf_cv_define_sigwinch" >&5
9106 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9107
9108 if test "$cf_cv_define_sigwinch" = maybe ; then
9109 echo "$as_me:9109: checking for actual SIGWINCH definition" >&5
9110 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9111 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9112   echo $ECHO_N "(cached) $ECHO_C" >&6
9113 else
9114
9115 cf_cv_fixup_sigwinch=unknown
9116 cf_sigwinch=32
9117 while test $cf_sigwinch != 1
9118 do
9119         cat >conftest.$ac_ext <<_ACEOF
9120 #line 9120 "configure"
9121 #include "confdefs.h"
9122
9123 #undef _XOPEN_SOURCE
9124 #undef _POSIX_SOURCE
9125 #undef _POSIX_C_SOURCE
9126 #include <sys/types.h>
9127 #include <sys/signal.h>
9128
9129 int
9130 main ()
9131 {
9132
9133 #if SIGWINCH != $cf_sigwinch
9134 make an error
9135 #endif
9136 int x = SIGWINCH
9137   ;
9138   return 0;
9139 }
9140 _ACEOF
9141 rm -f conftest.$ac_objext
9142 if { (eval echo "$as_me:9142: \"$ac_compile\"") >&5
9143   (eval $ac_compile) 2>&5
9144   ac_status=$?
9145   echo "$as_me:9145: \$? = $ac_status" >&5
9146   (exit $ac_status); } &&
9147          { ac_try='test -s conftest.$ac_objext'
9148   { (eval echo "$as_me:9148: \"$ac_try\"") >&5
9149   (eval $ac_try) 2>&5
9150   ac_status=$?
9151   echo "$as_me:9151: \$? = $ac_status" >&5
9152   (exit $ac_status); }; }; then
9153   cf_cv_fixup_sigwinch=$cf_sigwinch
9154          break
9155 else
9156   echo "$as_me: failed program was:" >&5
9157 cat conftest.$ac_ext >&5
9158 fi
9159 rm -f conftest.$ac_objext conftest.$ac_ext
9160
9161 cf_sigwinch=`expr $cf_sigwinch - 1`
9162 done
9163
9164 fi
9165 echo "$as_me:9165: result: $cf_cv_fixup_sigwinch" >&5
9166 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9167
9168         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9169                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9170         fi
9171 fi
9172
9173 # Checks for CODESET support.
9174
9175 echo "$as_me:9175: checking for nl_langinfo and CODESET" >&5
9176 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9177 if test "${am_cv_langinfo_codeset+set}" = set; then
9178   echo $ECHO_N "(cached) $ECHO_C" >&6
9179 else
9180   cat >conftest.$ac_ext <<_ACEOF
9181 #line 9181 "configure"
9182 #include "confdefs.h"
9183 #include <langinfo.h>
9184 int
9185 main ()
9186 {
9187 char* cs = nl_langinfo(CODESET);
9188   ;
9189   return 0;
9190 }
9191 _ACEOF
9192 rm -f conftest.$ac_objext conftest$ac_exeext
9193 if { (eval echo "$as_me:9193: \"$ac_link\"") >&5
9194   (eval $ac_link) 2>&5
9195   ac_status=$?
9196   echo "$as_me:9196: \$? = $ac_status" >&5
9197   (exit $ac_status); } &&
9198          { ac_try='test -s conftest$ac_exeext'
9199   { (eval echo "$as_me:9199: \"$ac_try\"") >&5
9200   (eval $ac_try) 2>&5
9201   ac_status=$?
9202   echo "$as_me:9202: \$? = $ac_status" >&5
9203   (exit $ac_status); }; }; then
9204   am_cv_langinfo_codeset=yes
9205 else
9206   echo "$as_me: failed program was:" >&5
9207 cat conftest.$ac_ext >&5
9208 am_cv_langinfo_codeset=no
9209 fi
9210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9211
9212 fi
9213 echo "$as_me:9213: result: $am_cv_langinfo_codeset" >&5
9214 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9215         if test $am_cv_langinfo_codeset = yes; then
9216
9217 cat >>confdefs.h <<\EOF
9218 #define HAVE_LANGINFO_CODESET 1
9219 EOF
9220
9221         fi
9222
9223 # use these variables to work around a defect in gcc's fixincludes.
9224 NCURSES_OK_WCHAR_T=
9225 NCURSES_OK_WINT_T=
9226
9227 echo "$as_me:9227: checking if you want wide-character code" >&5
9228 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9229
9230 # Check whether --enable-widec or --disable-widec was given.
9231 if test "${enable_widec+set}" = set; then
9232   enableval="$enable_widec"
9233   with_widec=$enableval
9234 else
9235   with_widec=no
9236 fi;
9237 echo "$as_me:9237: result: $with_widec" >&5
9238 echo "${ECHO_T}$with_widec" >&6
9239 if test "x$with_widec" = xyes ; then
9240         if test "x$disable_lib_suffixes" = xno ; then
9241                 LIB_SUFFIX="w${LIB_SUFFIX}"
9242         fi
9243
9244 cat >>confdefs.h <<\EOF
9245 #define USE_WIDEC_SUPPORT 1
9246 EOF
9247
9248 cat >>confdefs.h <<\EOF
9249 #define NCURSES_WIDECHAR 1
9250 EOF
9251
9252 echo "$as_me:9252: checking if wchar.h can be used as is" >&5
9253 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9254 if test "${cf_cv_wchar_h_okay+set}" = set; then
9255   echo $ECHO_N "(cached) $ECHO_C" >&6
9256 else
9257
9258 cat >conftest.$ac_ext <<_ACEOF
9259 #line 9259 "configure"
9260 #include "confdefs.h"
9261
9262 #include <stdlib.h>
9263 #include <wchar.h>
9264
9265 int
9266 main ()
9267 {
9268
9269         wint_t foo = 0;
9270         int bar = iswpunct(foo)
9271   ;
9272   return 0;
9273 }
9274 _ACEOF
9275 rm -f conftest.$ac_objext
9276 if { (eval echo "$as_me:9276: \"$ac_compile\"") >&5
9277   (eval $ac_compile) 2>&5
9278   ac_status=$?
9279   echo "$as_me:9279: \$? = $ac_status" >&5
9280   (exit $ac_status); } &&
9281          { ac_try='test -s conftest.$ac_objext'
9282   { (eval echo "$as_me:9282: \"$ac_try\"") >&5
9283   (eval $ac_try) 2>&5
9284   ac_status=$?
9285   echo "$as_me:9285: \$? = $ac_status" >&5
9286   (exit $ac_status); }; }; then
9287   cf_cv_wchar_h_okay=yes
9288 else
9289   echo "$as_me: failed program was:" >&5
9290 cat conftest.$ac_ext >&5
9291 cf_cv_wchar_h_okay=no
9292 fi
9293 rm -f conftest.$ac_objext conftest.$ac_ext
9294 fi
9295 echo "$as_me:9295: result: $cf_cv_wchar_h_okay" >&5
9296 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9297
9298 if test $cf_cv_wchar_h_okay = no
9299 then
9300
9301 echo "$as_me:9301: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9302 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9303 cat >conftest.$ac_ext <<_ACEOF
9304 #line 9304 "configure"
9305 #include "confdefs.h"
9306 #include <sys/types.h>
9307
9308 int
9309 main ()
9310 {
9311
9312 #ifndef _XOPEN_SOURCE_EXTENDED
9313 make an error
9314 #endif
9315   ;
9316   return 0;
9317 }
9318 _ACEOF
9319 rm -f conftest.$ac_objext
9320 if { (eval echo "$as_me:9320: \"$ac_compile\"") >&5
9321   (eval $ac_compile) 2>&5
9322   ac_status=$?
9323   echo "$as_me:9323: \$? = $ac_status" >&5
9324   (exit $ac_status); } &&
9325          { ac_try='test -s conftest.$ac_objext'
9326   { (eval echo "$as_me:9326: \"$ac_try\"") >&5
9327   (eval $ac_try) 2>&5
9328   ac_status=$?
9329   echo "$as_me:9329: \$? = $ac_status" >&5
9330   (exit $ac_status); }; }; then
9331   cf_result=no
9332 else
9333   echo "$as_me: failed program was:" >&5
9334 cat conftest.$ac_ext >&5
9335 cf_result=yes
9336 fi
9337 rm -f conftest.$ac_objext conftest.$ac_ext
9338 echo "$as_me:9338: result: $cf_result" >&5
9339 echo "${ECHO_T}$cf_result" >&6
9340
9341 if test "$cf_result" = yes ; then
9342         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9343 elif test "x" != "x" ; then
9344         echo "$as_me:9344: checking checking for compatible value versus " >&5
9345 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9346         cat >conftest.$ac_ext <<_ACEOF
9347 #line 9347 "configure"
9348 #include "confdefs.h"
9349 #include <sys/types.h>
9350
9351 int
9352 main ()
9353 {
9354
9355 #if _XOPEN_SOURCE_EXTENDED- < 0
9356 make an error
9357 #endif
9358   ;
9359   return 0;
9360 }
9361 _ACEOF
9362 rm -f conftest.$ac_objext
9363 if { (eval echo "$as_me:9363: \"$ac_compile\"") >&5
9364   (eval $ac_compile) 2>&5
9365   ac_status=$?
9366   echo "$as_me:9366: \$? = $ac_status" >&5
9367   (exit $ac_status); } &&
9368          { ac_try='test -s conftest.$ac_objext'
9369   { (eval echo "$as_me:9369: \"$ac_try\"") >&5
9370   (eval $ac_try) 2>&5
9371   ac_status=$?
9372   echo "$as_me:9372: \$? = $ac_status" >&5
9373   (exit $ac_status); }; }; then
9374   cf_result=yes
9375 else
9376   echo "$as_me: failed program was:" >&5
9377 cat conftest.$ac_ext >&5
9378 cf_result=no
9379 fi
9380 rm -f conftest.$ac_objext conftest.$ac_ext
9381         echo "$as_me:9381: result: $cf_result" >&5
9382 echo "${ECHO_T}$cf_result" >&6
9383         if test "$cf_result" = no ; then
9384                 # perhaps we can override it - try...
9385                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9386         fi
9387 fi
9388
9389 fi
9390
9391         # with_overwrite=no
9392         NCURSES_CH_T=cchar_t
9393
9394 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9395 do
9396 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9397 echo "$as_me:9397: checking for $ac_func" >&5
9398 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9399 if eval "test \"\${$as_ac_var+set}\" = set"; then
9400   echo $ECHO_N "(cached) $ECHO_C" >&6
9401 else
9402   cat >conftest.$ac_ext <<_ACEOF
9403 #line 9403 "configure"
9404 #include "confdefs.h"
9405 /* System header to define __stub macros and hopefully few prototypes,
9406     which can conflict with char $ac_func (); below.  */
9407 #include <assert.h>
9408 /* Override any gcc2 internal prototype to avoid an error.  */
9409 #ifdef __cplusplus
9410 extern "C"
9411 #endif
9412 /* We use char because int might match the return type of a gcc2
9413    builtin and then its argument prototype would still apply.  */
9414 char $ac_func ();
9415 char (*f) ();
9416
9417 int
9418 main ()
9419 {
9420 /* The GNU C library defines this for functions which it implements
9421     to always fail with ENOSYS.  Some functions are actually named
9422     something starting with __ and the normal name is an alias.  */
9423 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9424 choke me
9425 #else
9426 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9427 #endif
9428
9429   ;
9430   return 0;
9431 }
9432 _ACEOF
9433 rm -f conftest.$ac_objext conftest$ac_exeext
9434 if { (eval echo "$as_me:9434: \"$ac_link\"") >&5
9435   (eval $ac_link) 2>&5
9436   ac_status=$?
9437   echo "$as_me:9437: \$? = $ac_status" >&5
9438   (exit $ac_status); } &&
9439          { ac_try='test -s conftest$ac_exeext'
9440   { (eval echo "$as_me:9440: \"$ac_try\"") >&5
9441   (eval $ac_try) 2>&5
9442   ac_status=$?
9443   echo "$as_me:9443: \$? = $ac_status" >&5
9444   (exit $ac_status); }; }; then
9445   eval "$as_ac_var=yes"
9446 else
9447   echo "$as_me: failed program was:" >&5
9448 cat conftest.$ac_ext >&5
9449 eval "$as_ac_var=no"
9450 fi
9451 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9452 fi
9453 echo "$as_me:9453: result: `eval echo '${'$as_ac_var'}'`" >&5
9454 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9455 if test `eval echo '${'$as_ac_var'}'` = yes; then
9456   cat >>confdefs.h <<EOF
9457 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9458 EOF
9459
9460 fi
9461 done
9462
9463         if test "x$ac_cv_func_putwc" != xyes ; then
9464
9465 echo "$as_me:9465: checking for multibyte character support" >&5
9466 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9467 if test "${cf_cv_utf8_lib+set}" = set; then
9468   echo $ECHO_N "(cached) $ECHO_C" >&6
9469 else
9470
9471         cf_save_LIBS="$LIBS"
9472         cat >conftest.$ac_ext <<_ACEOF
9473 #line 9473 "configure"
9474 #include "confdefs.h"
9475
9476 #include <stdlib.h>
9477 int
9478 main ()
9479 {
9480 putwc(0,0);
9481   ;
9482   return 0;
9483 }
9484 _ACEOF
9485 rm -f conftest.$ac_objext conftest$ac_exeext
9486 if { (eval echo "$as_me:9486: \"$ac_link\"") >&5
9487   (eval $ac_link) 2>&5
9488   ac_status=$?
9489   echo "$as_me:9489: \$? = $ac_status" >&5
9490   (exit $ac_status); } &&
9491          { ac_try='test -s conftest$ac_exeext'
9492   { (eval echo "$as_me:9492: \"$ac_try\"") >&5
9493   (eval $ac_try) 2>&5
9494   ac_status=$?
9495   echo "$as_me:9495: \$? = $ac_status" >&5
9496   (exit $ac_status); }; }; then
9497   cf_cv_utf8_lib=yes
9498 else
9499   echo "$as_me: failed program was:" >&5
9500 cat conftest.$ac_ext >&5
9501
9502 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9503 # will be set on completion of the AC_TRY_LINK below.
9504 cf_cv_header_path_utf8=
9505 cf_cv_library_path_utf8=
9506
9507 echo "${as_me:-configure}:9507: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9508
9509 cf_save_LIBS="$LIBS"
9510
9511 cat >conftest.$ac_ext <<_ACEOF
9512 #line 9512 "configure"
9513 #include "confdefs.h"
9514
9515 #include <libutf8.h>
9516 int
9517 main ()
9518 {
9519 putwc(0,0);
9520   ;
9521   return 0;
9522 }
9523 _ACEOF
9524 rm -f conftest.$ac_objext conftest$ac_exeext
9525 if { (eval echo "$as_me:9525: \"$ac_link\"") >&5
9526   (eval $ac_link) 2>&5
9527   ac_status=$?
9528   echo "$as_me:9528: \$? = $ac_status" >&5
9529   (exit $ac_status); } &&
9530          { ac_try='test -s conftest$ac_exeext'
9531   { (eval echo "$as_me:9531: \"$ac_try\"") >&5
9532   (eval $ac_try) 2>&5
9533   ac_status=$?
9534   echo "$as_me:9534: \$? = $ac_status" >&5
9535   (exit $ac_status); }; }; then
9536
9537         cf_cv_find_linkage_utf8=yes
9538         cf_cv_header_path_utf8=/usr/include
9539         cf_cv_library_path_utf8=/usr/lib
9540
9541 else
9542   echo "$as_me: failed program was:" >&5
9543 cat conftest.$ac_ext >&5
9544
9545 LIBS="-lutf8  $cf_save_LIBS"
9546
9547 cat >conftest.$ac_ext <<_ACEOF
9548 #line 9548 "configure"
9549 #include "confdefs.h"
9550
9551 #include <libutf8.h>
9552 int
9553 main ()
9554 {
9555 putwc(0,0);
9556   ;
9557   return 0;
9558 }
9559 _ACEOF
9560 rm -f conftest.$ac_objext conftest$ac_exeext
9561 if { (eval echo "$as_me:9561: \"$ac_link\"") >&5
9562   (eval $ac_link) 2>&5
9563   ac_status=$?
9564   echo "$as_me:9564: \$? = $ac_status" >&5
9565   (exit $ac_status); } &&
9566          { ac_try='test -s conftest$ac_exeext'
9567   { (eval echo "$as_me:9567: \"$ac_try\"") >&5
9568   (eval $ac_try) 2>&5
9569   ac_status=$?
9570   echo "$as_me:9570: \$? = $ac_status" >&5
9571   (exit $ac_status); }; }; then
9572
9573         cf_cv_find_linkage_utf8=yes
9574         cf_cv_header_path_utf8=/usr/include
9575         cf_cv_library_path_utf8=/usr/lib
9576         cf_cv_library_file_utf8="-lutf8"
9577
9578 else
9579   echo "$as_me: failed program was:" >&5
9580 cat conftest.$ac_ext >&5
9581
9582         cf_cv_find_linkage_utf8=no
9583         LIBS="$cf_save_LIBS"
9584
9585         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9586
9587 echo "${as_me:-configure}:9587: testing find linkage for utf8 library ..." 1>&5
9588
9589 echo "${as_me:-configure}:9589: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9590
9591         cf_save_CPPFLAGS="$CPPFLAGS"
9592         cf_test_CPPFLAGS="$CPPFLAGS"
9593
9594 cf_search=
9595
9596 # collect the current set of include-directories from compiler flags
9597 cf_header_path_list=""
9598 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9599         for cf_header_path in $CPPFLAGS $CFLAGS
9600         do
9601                 case $cf_header_path in
9602                 (-I*)
9603                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9604
9605 test "x$cf_header_path" != "xNONE" && \
9606 test -d "$cf_header_path" && \
9607  {
9608         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9609         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9610         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9611         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9612         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9613         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9614 }
9615
9616                         cf_header_path_list="$cf_header_path_list $cf_search"
9617                         ;;
9618                 esac
9619         done
9620 fi
9621
9622 # add the variations for the package we are looking for
9623
9624 cf_search=
9625
9626 test "x$prefix" != "xNONE" && \
9627 test -d "$prefix" && \
9628  {
9629         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9630         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9631         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9632         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9633         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9634         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9635 }
9636
9637 for cf_subdir_prefix in \
9638         /usr \
9639         /usr/local \
9640         /usr/pkg \
9641         /opt \
9642         /opt/local \
9643         $HOME
9644 do
9645
9646 test "x$cf_subdir_prefix" != "x$prefix" && \
9647 test -d "$cf_subdir_prefix" && \
9648 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9649         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9650         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9651         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9652         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9653         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9654         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9655 }
9656
9657 done
9658
9659 test "$includedir" != NONE && \
9660 test "$includedir" != "/usr/include" && \
9661 test -d "$includedir" && {
9662         test -d $includedir &&    cf_search="$cf_search $includedir"
9663         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9664 }
9665
9666 test "$oldincludedir" != NONE && \
9667 test "$oldincludedir" != "/usr/include" && \
9668 test -d "$oldincludedir" && {
9669         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9670         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9671 }
9672
9673 cf_search="$cf_search $cf_header_path_list"
9674
9675         for cf_cv_header_path_utf8 in $cf_search
9676         do
9677                 if test -d $cf_cv_header_path_utf8 ; then
9678                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9679
9680 echo "${as_me:-configure}:9680: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9681
9682                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9683                         cat >conftest.$ac_ext <<_ACEOF
9684 #line 9684 "configure"
9685 #include "confdefs.h"
9686
9687 #include <libutf8.h>
9688 int
9689 main ()
9690 {
9691 putwc(0,0);
9692   ;
9693   return 0;
9694 }
9695 _ACEOF
9696 rm -f conftest.$ac_objext
9697 if { (eval echo "$as_me:9697: \"$ac_compile\"") >&5
9698   (eval $ac_compile) 2>&5
9699   ac_status=$?
9700   echo "$as_me:9700: \$? = $ac_status" >&5
9701   (exit $ac_status); } &&
9702          { ac_try='test -s conftest.$ac_objext'
9703   { (eval echo "$as_me:9703: \"$ac_try\"") >&5
9704   (eval $ac_try) 2>&5
9705   ac_status=$?
9706   echo "$as_me:9706: \$? = $ac_status" >&5
9707   (exit $ac_status); }; }; then
9708
9709                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9710
9711 echo "${as_me:-configure}:9711: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9712
9713                                 cf_cv_find_linkage_utf8=maybe
9714                                 cf_test_CPPFLAGS="$CPPFLAGS"
9715                                 break
9716 else
9717   echo "$as_me: failed program was:" >&5
9718 cat conftest.$ac_ext >&5
9719
9720                                 CPPFLAGS="$cf_save_CPPFLAGS"
9721
9722 fi
9723 rm -f conftest.$ac_objext conftest.$ac_ext
9724                 fi
9725         done
9726
9727         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9728
9729 echo "${as_me:-configure}:9729: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9730
9731                 cf_save_LIBS="$LIBS"
9732                 cf_save_LDFLAGS="$LDFLAGS"
9733
9734                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9735
9736 cf_search=
9737 cf_library_path_list=""
9738 if test -n "${LDFLAGS}${LIBS}" ; then
9739         for cf_library_path in $LDFLAGS $LIBS
9740         do
9741                 case $cf_library_path in
9742                 (-L*)
9743                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9744
9745 test "x$cf_library_path" != "xNONE" && \
9746 test -d "$cf_library_path" && \
9747  {
9748         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9749         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9750         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9751         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9752         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9753         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9754 }
9755
9756                         cf_library_path_list="$cf_library_path_list $cf_search"
9757                         ;;
9758                 esac
9759         done
9760 fi
9761
9762 cf_search=
9763
9764 test "x$prefix" != "xNONE" && \
9765 test -d "$prefix" && \
9766  {
9767         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9768         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9769         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9770         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9771         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9772         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9773 }
9774
9775 for cf_subdir_prefix in \
9776         /usr \
9777         /usr/local \
9778         /usr/pkg \
9779         /opt \
9780         /opt/local \
9781         $HOME
9782 do
9783
9784 test "x$cf_subdir_prefix" != "x$prefix" && \
9785 test -d "$cf_subdir_prefix" && \
9786 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9787         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9788         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9789         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9790         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9791         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9792         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9793 }
9794
9795 done
9796
9797 cf_search="$cf_library_path_list $cf_search"
9798
9799                         for cf_cv_library_path_utf8 in $cf_search
9800                         do
9801                                 if test -d $cf_cv_library_path_utf8 ; then
9802                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
9803
9804 echo "${as_me:-configure}:9804: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9805
9806                                         CPPFLAGS="$cf_test_CPPFLAGS"
9807                                         LIBS="-lutf8  $cf_save_LIBS"
9808                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9809                                         cat >conftest.$ac_ext <<_ACEOF
9810 #line 9810 "configure"
9811 #include "confdefs.h"
9812
9813 #include <libutf8.h>
9814 int
9815 main ()
9816 {
9817 putwc(0,0);
9818   ;
9819   return 0;
9820 }
9821 _ACEOF
9822 rm -f conftest.$ac_objext conftest$ac_exeext
9823 if { (eval echo "$as_me:9823: \"$ac_link\"") >&5
9824   (eval $ac_link) 2>&5
9825   ac_status=$?
9826   echo "$as_me:9826: \$? = $ac_status" >&5
9827   (exit $ac_status); } &&
9828          { ac_try='test -s conftest$ac_exeext'
9829   { (eval echo "$as_me:9829: \"$ac_try\"") >&5
9830   (eval $ac_try) 2>&5
9831   ac_status=$?
9832   echo "$as_me:9832: \$? = $ac_status" >&5
9833   (exit $ac_status); }; }; then
9834
9835                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9836
9837 echo "${as_me:-configure}:9837: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9838
9839                                         cf_cv_find_linkage_utf8=yes
9840                                         cf_cv_library_file_utf8="-lutf8"
9841                                         break
9842 else
9843   echo "$as_me: failed program was:" >&5
9844 cat conftest.$ac_ext >&5
9845
9846                                         CPPFLAGS="$cf_save_CPPFLAGS"
9847                                         LIBS="$cf_save_LIBS"
9848                                         LDFLAGS="$cf_save_LDFLAGS"
9849
9850 fi
9851 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9852                                 fi
9853                         done
9854                         CPPFLAGS="$cf_save_CPPFLAGS"
9855                         LDFLAGS="$cf_save_LDFLAGS"
9856                 fi
9857
9858         else
9859                 cf_cv_find_linkage_utf8=no
9860         fi
9861
9862 fi
9863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9864
9865 fi
9866 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9867
9868 LIBS="$cf_save_LIBS"
9869
9870 if test "$cf_cv_find_linkage_utf8" = yes ; then
9871 cf_cv_utf8_lib=add-on
9872 else
9873 cf_cv_utf8_lib=no
9874 fi
9875
9876 fi
9877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9878 fi
9879 echo "$as_me:9879: result: $cf_cv_utf8_lib" >&5
9880 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9881
9882 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9883 # ncurses/ncursesw:
9884 if test "$cf_cv_utf8_lib" = "add-on" ; then
9885
9886 cat >>confdefs.h <<\EOF
9887 #define HAVE_LIBUTF8_H 1
9888 EOF
9889
9890 if test -n "$cf_cv_header_path_utf8" ; then
9891   for cf_add_incdir in $cf_cv_header_path_utf8
9892   do
9893         while test $cf_add_incdir != /usr/include
9894         do
9895           if test -d $cf_add_incdir
9896           then
9897                 cf_have_incdir=no
9898                 if test -n "$CFLAGS$CPPFLAGS" ; then
9899                   # a loop is needed to ensure we can add subdirs of existing dirs
9900                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9901                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9902                           cf_have_incdir=yes; break
9903                         fi
9904                   done
9905                 fi
9906
9907                 if test "$cf_have_incdir" = no ; then
9908                   if test "$cf_add_incdir" = /usr/local/include ; then
9909                         if test "$GCC" = yes
9910                         then
9911                           cf_save_CPPFLAGS=$CPPFLAGS
9912                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9913                           cat >conftest.$ac_ext <<_ACEOF
9914 #line 9914 "configure"
9915 #include "confdefs.h"
9916 #include <stdio.h>
9917 int
9918 main ()
9919 {
9920 printf("Hello")
9921   ;
9922   return 0;
9923 }
9924 _ACEOF
9925 rm -f conftest.$ac_objext
9926 if { (eval echo "$as_me:9926: \"$ac_compile\"") >&5
9927   (eval $ac_compile) 2>&5
9928   ac_status=$?
9929   echo "$as_me:9929: \$? = $ac_status" >&5
9930   (exit $ac_status); } &&
9931          { ac_try='test -s conftest.$ac_objext'
9932   { (eval echo "$as_me:9932: \"$ac_try\"") >&5
9933   (eval $ac_try) 2>&5
9934   ac_status=$?
9935   echo "$as_me:9935: \$? = $ac_status" >&5
9936   (exit $ac_status); }; }; then
9937   :
9938 else
9939   echo "$as_me: failed program was:" >&5
9940 cat conftest.$ac_ext >&5
9941 cf_have_incdir=yes
9942 fi
9943 rm -f conftest.$ac_objext conftest.$ac_ext
9944                           CPPFLAGS=$cf_save_CPPFLAGS
9945                         fi
9946                   fi
9947                 fi
9948
9949                 if test "$cf_have_incdir" = no ; then
9950                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9951
9952 echo "${as_me:-configure}:9952: testing adding $cf_add_incdir to include-path ..." 1>&5
9953
9954                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9955
9956                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9957                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9958                   cf_add_incdir="$cf_top_incdir"
9959                 else
9960                   break
9961                 fi
9962           else
9963                 break
9964           fi
9965         done
9966   done
9967 fi
9968
9969 if test -n "$cf_cv_library_path_utf8" ; then
9970         for cf_add_libdir in $cf_cv_library_path_utf8
9971         do
9972                 if test $cf_add_libdir = /usr/lib ; then
9973                         :
9974                 elif test -d $cf_add_libdir
9975                 then
9976                         cf_have_libdir=no
9977                         if test -n "$LDFLAGS$LIBS" ; then
9978                                 # a loop is needed to ensure we can add subdirs of existing dirs
9979                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
9980                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9981                                                 cf_have_libdir=yes; break
9982                                         fi
9983                                 done
9984                         fi
9985                         if test "$cf_have_libdir" = no ; then
9986                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9987
9988 echo "${as_me:-configure}:9988: testing adding $cf_add_libdir to library-path ..." 1>&5
9989
9990                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9991                         fi
9992                 fi
9993         done
9994 fi
9995
9996 cf_add_libs="$cf_cv_library_file_utf8"
9997 # Filter out duplicates - this happens with badly-designed ".pc" files...
9998 for cf_add_1lib in $LIBS
9999 do
10000         for cf_add_2lib in $cf_add_libs
10001         do
10002                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10003                 then
10004                         cf_add_1lib=
10005                         break
10006                 fi
10007         done
10008         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10009 done
10010 LIBS="$cf_add_libs"
10011
10012 fi
10013
10014                 if test "$cf_cv_utf8_lib" != no ; then
10015                         NCURSES_LIBUTF8=1
10016                 fi
10017         fi
10018
10019 # This is needed on Tru64 5.0 to declare mbstate_t
10020 echo "$as_me:10020: checking if we must include wchar.h to declare mbstate_t" >&5
10021 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10022 if test "${cf_cv_mbstate_t+set}" = set; then
10023   echo $ECHO_N "(cached) $ECHO_C" >&6
10024 else
10025
10026 cat >conftest.$ac_ext <<_ACEOF
10027 #line 10027 "configure"
10028 #include "confdefs.h"
10029
10030 #include <stdlib.h>
10031 #include <stdarg.h>
10032 #include <stdio.h>
10033 #ifdef HAVE_LIBUTF8_H
10034 #include <libutf8.h>
10035 #endif
10036 int
10037 main ()
10038 {
10039 mbstate_t state
10040   ;
10041   return 0;
10042 }
10043 _ACEOF
10044 rm -f conftest.$ac_objext
10045 if { (eval echo "$as_me:10045: \"$ac_compile\"") >&5
10046   (eval $ac_compile) 2>&5
10047   ac_status=$?
10048   echo "$as_me:10048: \$? = $ac_status" >&5
10049   (exit $ac_status); } &&
10050          { ac_try='test -s conftest.$ac_objext'
10051   { (eval echo "$as_me:10051: \"$ac_try\"") >&5
10052   (eval $ac_try) 2>&5
10053   ac_status=$?
10054   echo "$as_me:10054: \$? = $ac_status" >&5
10055   (exit $ac_status); }; }; then
10056   cf_cv_mbstate_t=no
10057 else
10058   echo "$as_me: failed program was:" >&5
10059 cat conftest.$ac_ext >&5
10060 cat >conftest.$ac_ext <<_ACEOF
10061 #line 10061 "configure"
10062 #include "confdefs.h"
10063
10064 #include <stdlib.h>
10065 #include <stdarg.h>
10066 #include <stdio.h>
10067 #include <wchar.h>
10068 #ifdef HAVE_LIBUTF8_H
10069 #include <libutf8.h>
10070 #endif
10071 int
10072 main ()
10073 {
10074 mbstate_t value
10075   ;
10076   return 0;
10077 }
10078 _ACEOF
10079 rm -f conftest.$ac_objext
10080 if { (eval echo "$as_me:10080: \"$ac_compile\"") >&5
10081   (eval $ac_compile) 2>&5
10082   ac_status=$?
10083   echo "$as_me:10083: \$? = $ac_status" >&5
10084   (exit $ac_status); } &&
10085          { ac_try='test -s conftest.$ac_objext'
10086   { (eval echo "$as_me:10086: \"$ac_try\"") >&5
10087   (eval $ac_try) 2>&5
10088   ac_status=$?
10089   echo "$as_me:10089: \$? = $ac_status" >&5
10090   (exit $ac_status); }; }; then
10091   cf_cv_mbstate_t=yes
10092 else
10093   echo "$as_me: failed program was:" >&5
10094 cat conftest.$ac_ext >&5
10095 cf_cv_mbstate_t=unknown
10096 fi
10097 rm -f conftest.$ac_objext conftest.$ac_ext
10098 fi
10099 rm -f conftest.$ac_objext conftest.$ac_ext
10100 fi
10101 echo "$as_me:10101: result: $cf_cv_mbstate_t" >&5
10102 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10103
10104 if test "$cf_cv_mbstate_t" = yes ; then
10105
10106 cat >>confdefs.h <<\EOF
10107 #define NEED_WCHAR_H 1
10108 EOF
10109
10110         NEED_WCHAR_H=1
10111 fi
10112
10113 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10114 if test "$cf_cv_mbstate_t" = unknown ; then
10115         NCURSES_MBSTATE_T=1
10116 fi
10117
10118 # This is needed on Tru64 5.0 to declare wchar_t
10119 echo "$as_me:10119: checking if we must include wchar.h to declare wchar_t" >&5
10120 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10121 if test "${cf_cv_wchar_t+set}" = set; then
10122   echo $ECHO_N "(cached) $ECHO_C" >&6
10123 else
10124
10125 cat >conftest.$ac_ext <<_ACEOF
10126 #line 10126 "configure"
10127 #include "confdefs.h"
10128
10129 #include <stdlib.h>
10130 #include <stdarg.h>
10131 #include <stdio.h>
10132 #ifdef HAVE_LIBUTF8_H
10133 #include <libutf8.h>
10134 #endif
10135 int
10136 main ()
10137 {
10138 wchar_t state
10139   ;
10140   return 0;
10141 }
10142 _ACEOF
10143 rm -f conftest.$ac_objext
10144 if { (eval echo "$as_me:10144: \"$ac_compile\"") >&5
10145   (eval $ac_compile) 2>&5
10146   ac_status=$?
10147   echo "$as_me:10147: \$? = $ac_status" >&5
10148   (exit $ac_status); } &&
10149          { ac_try='test -s conftest.$ac_objext'
10150   { (eval echo "$as_me:10150: \"$ac_try\"") >&5
10151   (eval $ac_try) 2>&5
10152   ac_status=$?
10153   echo "$as_me:10153: \$? = $ac_status" >&5
10154   (exit $ac_status); }; }; then
10155   cf_cv_wchar_t=no
10156 else
10157   echo "$as_me: failed program was:" >&5
10158 cat conftest.$ac_ext >&5
10159 cat >conftest.$ac_ext <<_ACEOF
10160 #line 10160 "configure"
10161 #include "confdefs.h"
10162
10163 #include <stdlib.h>
10164 #include <stdarg.h>
10165 #include <stdio.h>
10166 #include <wchar.h>
10167 #ifdef HAVE_LIBUTF8_H
10168 #include <libutf8.h>
10169 #endif
10170 int
10171 main ()
10172 {
10173 wchar_t value
10174   ;
10175   return 0;
10176 }
10177 _ACEOF
10178 rm -f conftest.$ac_objext
10179 if { (eval echo "$as_me:10179: \"$ac_compile\"") >&5
10180   (eval $ac_compile) 2>&5
10181   ac_status=$?
10182   echo "$as_me:10182: \$? = $ac_status" >&5
10183   (exit $ac_status); } &&
10184          { ac_try='test -s conftest.$ac_objext'
10185   { (eval echo "$as_me:10185: \"$ac_try\"") >&5
10186   (eval $ac_try) 2>&5
10187   ac_status=$?
10188   echo "$as_me:10188: \$? = $ac_status" >&5
10189   (exit $ac_status); }; }; then
10190   cf_cv_wchar_t=yes
10191 else
10192   echo "$as_me: failed program was:" >&5
10193 cat conftest.$ac_ext >&5
10194 cf_cv_wchar_t=unknown
10195 fi
10196 rm -f conftest.$ac_objext conftest.$ac_ext
10197 fi
10198 rm -f conftest.$ac_objext conftest.$ac_ext
10199 fi
10200 echo "$as_me:10200: result: $cf_cv_wchar_t" >&5
10201 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10202
10203 if test "$cf_cv_wchar_t" = yes ; then
10204
10205 cat >>confdefs.h <<\EOF
10206 #define NEED_WCHAR_H 1
10207 EOF
10208
10209         NEED_WCHAR_H=1
10210 fi
10211
10212 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10213 if test "$cf_cv_wchar_t" = unknown ; then
10214         NCURSES_WCHAR_T=1
10215 fi
10216
10217 # if we find wchar_t in either place, use substitution to provide a fallback.
10218 if test "$cf_cv_wchar_t" != unknown ; then
10219         NCURSES_OK_WCHAR_T=1
10220 fi
10221
10222 # This is needed on Tru64 5.0 to declare wint_t
10223 echo "$as_me:10223: checking if we must include wchar.h to declare wint_t" >&5
10224 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10225 if test "${cf_cv_wint_t+set}" = set; then
10226   echo $ECHO_N "(cached) $ECHO_C" >&6
10227 else
10228
10229 cat >conftest.$ac_ext <<_ACEOF
10230 #line 10230 "configure"
10231 #include "confdefs.h"
10232
10233 #include <stdlib.h>
10234 #include <stdarg.h>
10235 #include <stdio.h>
10236 #ifdef HAVE_LIBUTF8_H
10237 #include <libutf8.h>
10238 #endif
10239 int
10240 main ()
10241 {
10242 wint_t state
10243   ;
10244   return 0;
10245 }
10246 _ACEOF
10247 rm -f conftest.$ac_objext
10248 if { (eval echo "$as_me:10248: \"$ac_compile\"") >&5
10249   (eval $ac_compile) 2>&5
10250   ac_status=$?
10251   echo "$as_me:10251: \$? = $ac_status" >&5
10252   (exit $ac_status); } &&
10253          { ac_try='test -s conftest.$ac_objext'
10254   { (eval echo "$as_me:10254: \"$ac_try\"") >&5
10255   (eval $ac_try) 2>&5
10256   ac_status=$?
10257   echo "$as_me:10257: \$? = $ac_status" >&5
10258   (exit $ac_status); }; }; then
10259   cf_cv_wint_t=no
10260 else
10261   echo "$as_me: failed program was:" >&5
10262 cat conftest.$ac_ext >&5
10263 cat >conftest.$ac_ext <<_ACEOF
10264 #line 10264 "configure"
10265 #include "confdefs.h"
10266
10267 #include <stdlib.h>
10268 #include <stdarg.h>
10269 #include <stdio.h>
10270 #include <wchar.h>
10271 #ifdef HAVE_LIBUTF8_H
10272 #include <libutf8.h>
10273 #endif
10274 int
10275 main ()
10276 {
10277 wint_t value
10278   ;
10279   return 0;
10280 }
10281 _ACEOF
10282 rm -f conftest.$ac_objext
10283 if { (eval echo "$as_me:10283: \"$ac_compile\"") >&5
10284   (eval $ac_compile) 2>&5
10285   ac_status=$?
10286   echo "$as_me:10286: \$? = $ac_status" >&5
10287   (exit $ac_status); } &&
10288          { ac_try='test -s conftest.$ac_objext'
10289   { (eval echo "$as_me:10289: \"$ac_try\"") >&5
10290   (eval $ac_try) 2>&5
10291   ac_status=$?
10292   echo "$as_me:10292: \$? = $ac_status" >&5
10293   (exit $ac_status); }; }; then
10294   cf_cv_wint_t=yes
10295 else
10296   echo "$as_me: failed program was:" >&5
10297 cat conftest.$ac_ext >&5
10298 cf_cv_wint_t=unknown
10299 fi
10300 rm -f conftest.$ac_objext conftest.$ac_ext
10301 fi
10302 rm -f conftest.$ac_objext conftest.$ac_ext
10303 fi
10304 echo "$as_me:10304: result: $cf_cv_wint_t" >&5
10305 echo "${ECHO_T}$cf_cv_wint_t" >&6
10306
10307 if test "$cf_cv_wint_t" = yes ; then
10308
10309 cat >>confdefs.h <<\EOF
10310 #define NEED_WCHAR_H 1
10311 EOF
10312
10313         NEED_WCHAR_H=1
10314 fi
10315
10316 # if we do not find wint_t in either place, use substitution to provide a fallback.
10317 if test "$cf_cv_wint_t" = unknown ; then
10318         NCURSES_WINT_T=1
10319 fi
10320
10321 # if we find wint_t in either place, use substitution to provide a fallback.
10322 if test "$cf_cv_wint_t" != unknown ; then
10323         NCURSES_OK_WINT_T=1
10324 fi
10325
10326         if test "$NCURSES_MBSTATE_T" != 0; then
10327
10328 cat >>confdefs.h <<\EOF
10329 #define NEED_MBSTATE_T_DEF 1
10330 EOF
10331
10332         fi
10333 fi
10334
10335 ###   use option --disable-lp64 to allow long chtype
10336 echo "$as_me:10336: checking whether to enable _LP64 definition in curses.h" >&5
10337 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10338
10339 # Check whether --enable-lp64 or --disable-lp64 was given.
10340 if test "${enable_lp64+set}" = set; then
10341   enableval="$enable_lp64"
10342   with_lp64=$enableval
10343 else
10344   with_lp64=$cf_dft_with_lp64
10345 fi;
10346 echo "$as_me:10346: result: $with_lp64" >&5
10347 echo "${ECHO_T}$with_lp64" >&6
10348
10349 if test "x$with_lp64" = xyes ; then
10350         cf_cv_enable_lp64=1
10351 else
10352         cf_cv_enable_lp64=0
10353 fi
10354
10355 # Check whether --enable-largefile or --disable-largefile was given.
10356 if test "${enable_largefile+set}" = set; then
10357   enableval="$enable_largefile"
10358
10359 fi;
10360 if test "$enable_largefile" != no; then
10361
10362   echo "$as_me:10362: checking for special C compiler options needed for large files" >&5
10363 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10364 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10365   echo $ECHO_N "(cached) $ECHO_C" >&6
10366 else
10367   ac_cv_sys_largefile_CC=no
10368      if test "$GCC" != yes; then
10369        ac_save_CC=$CC
10370        while :; do
10371          # IRIX 6.2 and later do not support large files by default,
10372          # so use the C compiler's -n32 option if that helps.
10373          cat >conftest.$ac_ext <<_ACEOF
10374 #line 10374 "configure"
10375 #include "confdefs.h"
10376 #include <sys/types.h>
10377  /* Check that off_t can represent 2**63 - 1 correctly.
10378     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10379     since some C++ compilers masquerading as C compilers
10380     incorrectly reject 9223372036854775807.  */
10381 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10382   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10383                        && LARGE_OFF_T % 2147483647 == 1)
10384                       ? 1 : -1];
10385 int
10386 main ()
10387 {
10388
10389   ;
10390   return 0;
10391 }
10392 _ACEOF
10393          rm -f conftest.$ac_objext
10394 if { (eval echo "$as_me:10394: \"$ac_compile\"") >&5
10395   (eval $ac_compile) 2>&5
10396   ac_status=$?
10397   echo "$as_me:10397: \$? = $ac_status" >&5
10398   (exit $ac_status); } &&
10399          { ac_try='test -s conftest.$ac_objext'
10400   { (eval echo "$as_me:10400: \"$ac_try\"") >&5
10401   (eval $ac_try) 2>&5
10402   ac_status=$?
10403   echo "$as_me:10403: \$? = $ac_status" >&5
10404   (exit $ac_status); }; }; then
10405   break
10406 else
10407   echo "$as_me: failed program was:" >&5
10408 cat conftest.$ac_ext >&5
10409 fi
10410 rm -f conftest.$ac_objext
10411          CC="$CC -n32"
10412          rm -f conftest.$ac_objext
10413 if { (eval echo "$as_me:10413: \"$ac_compile\"") >&5
10414   (eval $ac_compile) 2>&5
10415   ac_status=$?
10416   echo "$as_me:10416: \$? = $ac_status" >&5
10417   (exit $ac_status); } &&
10418          { ac_try='test -s conftest.$ac_objext'
10419   { (eval echo "$as_me:10419: \"$ac_try\"") >&5
10420   (eval $ac_try) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit $ac_status); }; }; then
10424   ac_cv_sys_largefile_CC=' -n32'; break
10425 else
10426   echo "$as_me: failed program was:" >&5
10427 cat conftest.$ac_ext >&5
10428 fi
10429 rm -f conftest.$ac_objext
10430          break
10431        done
10432        CC=$ac_save_CC
10433        rm -f conftest.$ac_ext
10434     fi
10435 fi
10436 echo "$as_me:10436: result: $ac_cv_sys_largefile_CC" >&5
10437 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10438   if test "$ac_cv_sys_largefile_CC" != no; then
10439     CC=$CC$ac_cv_sys_largefile_CC
10440   fi
10441
10442   echo "$as_me:10442: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10443 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10444 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10445   echo $ECHO_N "(cached) $ECHO_C" >&6
10446 else
10447   while :; do
10448   ac_cv_sys_file_offset_bits=no
10449   cat >conftest.$ac_ext <<_ACEOF
10450 #line 10450 "configure"
10451 #include "confdefs.h"
10452 #include <sys/types.h>
10453  /* Check that off_t can represent 2**63 - 1 correctly.
10454     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10455     since some C++ compilers masquerading as C compilers
10456     incorrectly reject 9223372036854775807.  */
10457 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10458   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10459                        && LARGE_OFF_T % 2147483647 == 1)
10460                       ? 1 : -1];
10461 int
10462 main ()
10463 {
10464
10465   ;
10466   return 0;
10467 }
10468 _ACEOF
10469 rm -f conftest.$ac_objext
10470 if { (eval echo "$as_me:10470: \"$ac_compile\"") >&5
10471   (eval $ac_compile) 2>&5
10472   ac_status=$?
10473   echo "$as_me:10473: \$? = $ac_status" >&5
10474   (exit $ac_status); } &&
10475          { ac_try='test -s conftest.$ac_objext'
10476   { (eval echo "$as_me:10476: \"$ac_try\"") >&5
10477   (eval $ac_try) 2>&5
10478   ac_status=$?
10479   echo "$as_me:10479: \$? = $ac_status" >&5
10480   (exit $ac_status); }; }; then
10481   break
10482 else
10483   echo "$as_me: failed program was:" >&5
10484 cat conftest.$ac_ext >&5
10485 fi
10486 rm -f conftest.$ac_objext conftest.$ac_ext
10487   cat >conftest.$ac_ext <<_ACEOF
10488 #line 10488 "configure"
10489 #include "confdefs.h"
10490 #define _FILE_OFFSET_BITS 64
10491 #include <sys/types.h>
10492  /* Check that off_t can represent 2**63 - 1 correctly.
10493     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10494     since some C++ compilers masquerading as C compilers
10495     incorrectly reject 9223372036854775807.  */
10496 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10497   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10498                        && LARGE_OFF_T % 2147483647 == 1)
10499                       ? 1 : -1];
10500 int
10501 main ()
10502 {
10503
10504   ;
10505   return 0;
10506 }
10507 _ACEOF
10508 rm -f conftest.$ac_objext
10509 if { (eval echo "$as_me:10509: \"$ac_compile\"") >&5
10510   (eval $ac_compile) 2>&5
10511   ac_status=$?
10512   echo "$as_me:10512: \$? = $ac_status" >&5
10513   (exit $ac_status); } &&
10514          { ac_try='test -s conftest.$ac_objext'
10515   { (eval echo "$as_me:10515: \"$ac_try\"") >&5
10516   (eval $ac_try) 2>&5
10517   ac_status=$?
10518   echo "$as_me:10518: \$? = $ac_status" >&5
10519   (exit $ac_status); }; }; then
10520   ac_cv_sys_file_offset_bits=64; break
10521 else
10522   echo "$as_me: failed program was:" >&5
10523 cat conftest.$ac_ext >&5
10524 fi
10525 rm -f conftest.$ac_objext conftest.$ac_ext
10526   break
10527 done
10528 fi
10529 echo "$as_me:10529: result: $ac_cv_sys_file_offset_bits" >&5
10530 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10531 if test "$ac_cv_sys_file_offset_bits" != no; then
10532
10533 cat >>confdefs.h <<EOF
10534 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10535 EOF
10536
10537 fi
10538 rm -rf conftest*
10539   echo "$as_me:10539: checking for _LARGE_FILES value needed for large files" >&5
10540 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10541 if test "${ac_cv_sys_large_files+set}" = set; then
10542   echo $ECHO_N "(cached) $ECHO_C" >&6
10543 else
10544   while :; do
10545   ac_cv_sys_large_files=no
10546   cat >conftest.$ac_ext <<_ACEOF
10547 #line 10547 "configure"
10548 #include "confdefs.h"
10549 #include <sys/types.h>
10550  /* Check that off_t can represent 2**63 - 1 correctly.
10551     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10552     since some C++ compilers masquerading as C compilers
10553     incorrectly reject 9223372036854775807.  */
10554 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10555   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10556                        && LARGE_OFF_T % 2147483647 == 1)
10557                       ? 1 : -1];
10558 int
10559 main ()
10560 {
10561
10562   ;
10563   return 0;
10564 }
10565 _ACEOF
10566 rm -f conftest.$ac_objext
10567 if { (eval echo "$as_me:10567: \"$ac_compile\"") >&5
10568   (eval $ac_compile) 2>&5
10569   ac_status=$?
10570   echo "$as_me:10570: \$? = $ac_status" >&5
10571   (exit $ac_status); } &&
10572          { ac_try='test -s conftest.$ac_objext'
10573   { (eval echo "$as_me:10573: \"$ac_try\"") >&5
10574   (eval $ac_try) 2>&5
10575   ac_status=$?
10576   echo "$as_me:10576: \$? = $ac_status" >&5
10577   (exit $ac_status); }; }; then
10578   break
10579 else
10580   echo "$as_me: failed program was:" >&5
10581 cat conftest.$ac_ext >&5
10582 fi
10583 rm -f conftest.$ac_objext conftest.$ac_ext
10584   cat >conftest.$ac_ext <<_ACEOF
10585 #line 10585 "configure"
10586 #include "confdefs.h"
10587 #define _LARGE_FILES 1
10588 #include <sys/types.h>
10589  /* Check that off_t can represent 2**63 - 1 correctly.
10590     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10591     since some C++ compilers masquerading as C compilers
10592     incorrectly reject 9223372036854775807.  */
10593 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10594   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10595                        && LARGE_OFF_T % 2147483647 == 1)
10596                       ? 1 : -1];
10597 int
10598 main ()
10599 {
10600
10601   ;
10602   return 0;
10603 }
10604 _ACEOF
10605 rm -f conftest.$ac_objext
10606 if { (eval echo "$as_me:10606: \"$ac_compile\"") >&5
10607   (eval $ac_compile) 2>&5
10608   ac_status=$?
10609   echo "$as_me:10609: \$? = $ac_status" >&5
10610   (exit $ac_status); } &&
10611          { ac_try='test -s conftest.$ac_objext'
10612   { (eval echo "$as_me:10612: \"$ac_try\"") >&5
10613   (eval $ac_try) 2>&5
10614   ac_status=$?
10615   echo "$as_me:10615: \$? = $ac_status" >&5
10616   (exit $ac_status); }; }; then
10617   ac_cv_sys_large_files=1; break
10618 else
10619   echo "$as_me: failed program was:" >&5
10620 cat conftest.$ac_ext >&5
10621 fi
10622 rm -f conftest.$ac_objext conftest.$ac_ext
10623   break
10624 done
10625 fi
10626 echo "$as_me:10626: result: $ac_cv_sys_large_files" >&5
10627 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10628 if test "$ac_cv_sys_large_files" != no; then
10629
10630 cat >>confdefs.h <<EOF
10631 #define _LARGE_FILES $ac_cv_sys_large_files
10632 EOF
10633
10634 fi
10635 rm -rf conftest*
10636 fi
10637
10638         if test "$enable_largefile" != no ; then
10639         echo "$as_me:10639: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10640 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10641 if test "${ac_cv_sys_largefile_source+set}" = set; then
10642   echo $ECHO_N "(cached) $ECHO_C" >&6
10643 else
10644   while :; do
10645   ac_cv_sys_largefile_source=no
10646   cat >conftest.$ac_ext <<_ACEOF
10647 #line 10647 "configure"
10648 #include "confdefs.h"
10649 #include <stdio.h>
10650 int
10651 main ()
10652 {
10653 return !fseeko;
10654   ;
10655   return 0;
10656 }
10657 _ACEOF
10658 rm -f conftest.$ac_objext
10659 if { (eval echo "$as_me:10659: \"$ac_compile\"") >&5
10660   (eval $ac_compile) 2>&5
10661   ac_status=$?
10662   echo "$as_me:10662: \$? = $ac_status" >&5
10663   (exit $ac_status); } &&
10664          { ac_try='test -s conftest.$ac_objext'
10665   { (eval echo "$as_me:10665: \"$ac_try\"") >&5
10666   (eval $ac_try) 2>&5
10667   ac_status=$?
10668   echo "$as_me:10668: \$? = $ac_status" >&5
10669   (exit $ac_status); }; }; then
10670   break
10671 else
10672   echo "$as_me: failed program was:" >&5
10673 cat conftest.$ac_ext >&5
10674 fi
10675 rm -f conftest.$ac_objext conftest.$ac_ext
10676   cat >conftest.$ac_ext <<_ACEOF
10677 #line 10677 "configure"
10678 #include "confdefs.h"
10679 #define _LARGEFILE_SOURCE 1
10680 #include <stdio.h>
10681 int
10682 main ()
10683 {
10684 return !fseeko;
10685   ;
10686   return 0;
10687 }
10688 _ACEOF
10689 rm -f conftest.$ac_objext
10690 if { (eval echo "$as_me:10690: \"$ac_compile\"") >&5
10691   (eval $ac_compile) 2>&5
10692   ac_status=$?
10693   echo "$as_me:10693: \$? = $ac_status" >&5
10694   (exit $ac_status); } &&
10695          { ac_try='test -s conftest.$ac_objext'
10696   { (eval echo "$as_me:10696: \"$ac_try\"") >&5
10697   (eval $ac_try) 2>&5
10698   ac_status=$?
10699   echo "$as_me:10699: \$? = $ac_status" >&5
10700   (exit $ac_status); }; }; then
10701   ac_cv_sys_largefile_source=1; break
10702 else
10703   echo "$as_me: failed program was:" >&5
10704 cat conftest.$ac_ext >&5
10705 fi
10706 rm -f conftest.$ac_objext conftest.$ac_ext
10707   break
10708 done
10709 fi
10710 echo "$as_me:10710: result: $ac_cv_sys_largefile_source" >&5
10711 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10712 if test "$ac_cv_sys_largefile_source" != no; then
10713
10714 cat >>confdefs.h <<EOF
10715 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10716 EOF
10717
10718 fi
10719 rm -rf conftest*
10720
10721 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10722 # in glibc 2.1.3, but that breaks too many other things.
10723 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10724 echo "$as_me:10724: checking for fseeko" >&5
10725 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10726 if test "${ac_cv_func_fseeko+set}" = set; then
10727   echo $ECHO_N "(cached) $ECHO_C" >&6
10728 else
10729   cat >conftest.$ac_ext <<_ACEOF
10730 #line 10730 "configure"
10731 #include "confdefs.h"
10732 #include <stdio.h>
10733 int
10734 main ()
10735 {
10736 return fseeko && fseeko (stdin, 0, 0);
10737   ;
10738   return 0;
10739 }
10740 _ACEOF
10741 rm -f conftest.$ac_objext conftest$ac_exeext
10742 if { (eval echo "$as_me:10742: \"$ac_link\"") >&5
10743   (eval $ac_link) 2>&5
10744   ac_status=$?
10745   echo "$as_me:10745: \$? = $ac_status" >&5
10746   (exit $ac_status); } &&
10747          { ac_try='test -s conftest$ac_exeext'
10748   { (eval echo "$as_me:10748: \"$ac_try\"") >&5
10749   (eval $ac_try) 2>&5
10750   ac_status=$?
10751   echo "$as_me:10751: \$? = $ac_status" >&5
10752   (exit $ac_status); }; }; then
10753   ac_cv_func_fseeko=yes
10754 else
10755   echo "$as_me: failed program was:" >&5
10756 cat conftest.$ac_ext >&5
10757 ac_cv_func_fseeko=no
10758 fi
10759 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10760 fi
10761 echo "$as_me:10761: result: $ac_cv_func_fseeko" >&5
10762 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10763 if test $ac_cv_func_fseeko = yes; then
10764
10765 cat >>confdefs.h <<\EOF
10766 #define HAVE_FSEEKO 1
10767 EOF
10768
10769 fi
10770
10771         # Normally we would collect these definitions in the config.h,
10772         # but (like _XOPEN_SOURCE), some environments rely on having these
10773         # defined before any of the system headers are included.  Another
10774         # case comes up with C++, e.g., on AIX the compiler compiles the
10775         # header files by themselves before looking at the body files it is
10776         # told to compile.  For ncurses, those header files do not include
10777         # the config.h
10778         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10779         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10780         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10781
10782         echo "$as_me:10782: checking whether to use struct dirent64" >&5
10783 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10784 if test "${cf_cv_struct_dirent64+set}" = set; then
10785   echo $ECHO_N "(cached) $ECHO_C" >&6
10786 else
10787
10788                 cat >conftest.$ac_ext <<_ACEOF
10789 #line 10789 "configure"
10790 #include "confdefs.h"
10791
10792 #include <sys/types.h>
10793 #include <dirent.h>
10794
10795 int
10796 main ()
10797 {
10798
10799                 /* if transitional largefile support is setup, this is true */
10800                 extern struct dirent64 * readdir(DIR *);
10801                 struct dirent64 *x = readdir((DIR *)0);
10802                 struct dirent *y = readdir((DIR *)0);
10803                 int z = x - y;
10804
10805   ;
10806   return 0;
10807 }
10808 _ACEOF
10809 rm -f conftest.$ac_objext
10810 if { (eval echo "$as_me:10810: \"$ac_compile\"") >&5
10811   (eval $ac_compile) 2>&5
10812   ac_status=$?
10813   echo "$as_me:10813: \$? = $ac_status" >&5
10814   (exit $ac_status); } &&
10815          { ac_try='test -s conftest.$ac_objext'
10816   { (eval echo "$as_me:10816: \"$ac_try\"") >&5
10817   (eval $ac_try) 2>&5
10818   ac_status=$?
10819   echo "$as_me:10819: \$? = $ac_status" >&5
10820   (exit $ac_status); }; }; then
10821   cf_cv_struct_dirent64=yes
10822 else
10823   echo "$as_me: failed program was:" >&5
10824 cat conftest.$ac_ext >&5
10825 cf_cv_struct_dirent64=no
10826 fi
10827 rm -f conftest.$ac_objext conftest.$ac_ext
10828
10829 fi
10830 echo "$as_me:10830: result: $cf_cv_struct_dirent64" >&5
10831 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10832         test "$cf_cv_struct_dirent64" = yes &&
10833 cat >>confdefs.h <<\EOF
10834 #define HAVE_STRUCT_DIRENT64 1
10835 EOF
10836
10837         fi
10838
10839 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10840 echo "$as_me:10840: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10841 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10842
10843 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10844 if test "${enable_tparm_varargs+set}" = set; then
10845   enableval="$enable_tparm_varargs"
10846   with_tparm_varargs=$enableval
10847 else
10848   with_tparm_varargs=yes
10849 fi;
10850 echo "$as_me:10850: result: $with_tparm_varargs" >&5
10851 echo "${ECHO_T}$with_tparm_varargs" >&6
10852 NCURSES_TPARM_VARARGS=0
10853 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10854
10855 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10856 if test "$with_ticlib" != no ; then
10857 echo "$as_me:10857: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10858 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10859
10860 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10861 if test "${enable_tic_depends+set}" = set; then
10862   enableval="$enable_tic_depends"
10863   with_tic_depends=$enableval
10864 else
10865   with_tic_depends=yes
10866 fi;
10867 echo "$as_me:10867: result: $with_tic_depends" >&5
10868 echo "${ECHO_T}$with_tic_depends" >&6
10869 else
10870         with_tic_depends=no
10871 fi
10872
10873 ###   use option --with-bool to override bool's type
10874 echo "$as_me:10874: checking for type of bool" >&5
10875 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10876
10877 # Check whether --with-bool or --without-bool was given.
10878 if test "${with_bool+set}" = set; then
10879   withval="$with_bool"
10880   NCURSES_BOOL="$withval"
10881 else
10882   NCURSES_BOOL=auto
10883 fi;
10884 echo "$as_me:10884: result: $NCURSES_BOOL" >&5
10885 echo "${ECHO_T}$NCURSES_BOOL" >&6
10886
10887 echo "$as_me:10887: checking for alternate terminal capabilities file" >&5
10888 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10889
10890 # Check whether --with-caps or --without-caps was given.
10891 if test "${with_caps+set}" = set; then
10892   withval="$with_caps"
10893   TERMINFO_CAPS=Caps.$withval
10894 else
10895   TERMINFO_CAPS=Caps
10896 fi;
10897 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10898 echo "$as_me:10898: result: $TERMINFO_CAPS" >&5
10899 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10900
10901 ###   use option --with-chtype to override chtype's type
10902 echo "$as_me:10902: checking for type of chtype" >&5
10903 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10904
10905 # Check whether --with-chtype or --without-chtype was given.
10906 if test "${with_chtype+set}" = set; then
10907   withval="$with_chtype"
10908   NCURSES_CHTYPE="$withval"
10909 else
10910   NCURSES_CHTYPE=$cf_dft_chtype
10911 fi;
10912 echo "$as_me:10912: result: $NCURSES_CHTYPE" >&5
10913 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10914
10915 ###   use option --with-ospeed to override ospeed's type
10916 echo "$as_me:10916: checking for type of ospeed" >&5
10917 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10918
10919 # Check whether --with-ospeed or --without-ospeed was given.
10920 if test "${with_ospeed+set}" = set; then
10921   withval="$with_ospeed"
10922   NCURSES_OSPEED="$withval"
10923 else
10924   NCURSES_OSPEED=short
10925 fi;
10926 echo "$as_me:10926: result: $NCURSES_OSPEED" >&5
10927 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10928
10929 ###   use option --with-mmask-t to override mmask_t's type
10930 echo "$as_me:10930: checking for type of mmask_t" >&5
10931 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10932
10933 # Check whether --with-mmask-t or --without-mmask-t was given.
10934 if test "${with_mmask_t+set}" = set; then
10935   withval="$with_mmask_t"
10936   NCURSES_MMASK_T="$withval"
10937 else
10938   NCURSES_MMASK_T=$cf_dft_mmask_t
10939 fi;
10940 echo "$as_me:10940: result: $NCURSES_MMASK_T" >&5
10941 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10942
10943 ###   use option --with-ccharw-max to override CCHARW_MAX size
10944 echo "$as_me:10944: checking for size CCHARW_MAX" >&5
10945 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10946
10947 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10948 if test "${with_ccharw_max+set}" = set; then
10949   withval="$with_ccharw_max"
10950   NCURSES_CCHARW_MAX="$withval"
10951 else
10952   NCURSES_CCHARW_MAX=5
10953 fi;
10954 echo "$as_me:10954: result: $NCURSES_CCHARW_MAX" >&5
10955 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10956
10957 ###   use option --with-tparm-arg to override tparm's argument type
10958 echo "$as_me:10958: checking for type of tparm args" >&5
10959 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10960
10961 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10962 if test "${with_tparm_arg+set}" = set; then
10963   withval="$with_tparm_arg"
10964   NCURSES_TPARM_ARG="$withval"
10965 else
10966   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
10967 fi;
10968 echo "$as_me:10968: result: $NCURSES_TPARM_ARG" >&5
10969 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10970
10971 ### Enable compiling-in rcs id's
10972 echo "$as_me:10972: checking if RCS identifiers should be compiled-in" >&5
10973 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10974
10975 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10976 if test "${with_rcs_ids+set}" = set; then
10977   withval="$with_rcs_ids"
10978   with_rcs_ids=$withval
10979 else
10980   with_rcs_ids=no
10981 fi;
10982 echo "$as_me:10982: result: $with_rcs_ids" >&5
10983 echo "${ECHO_T}$with_rcs_ids" >&6
10984 test "x$with_rcs_ids" = xyes &&
10985 cat >>confdefs.h <<\EOF
10986 #define USE_RCS_IDS 1
10987 EOF
10988
10989 ###############################################################################
10990
10991 echo "$as_me:10991: checking format of man-pages" >&5
10992 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10993
10994 # Check whether --with-manpage-format or --without-manpage-format was given.
10995 if test "${with_manpage_format+set}" = set; then
10996   withval="$with_manpage_format"
10997   MANPAGE_FORMAT=$withval
10998 else
10999   MANPAGE_FORMAT=unknown
11000 fi;
11001
11002 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11003 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11004
11005 cf_unknown=
11006
11007 case $MANPAGE_FORMAT in
11008 (unknown)
11009         if test -z "$MANPATH" ; then
11010                 MANPATH="/usr/man:/usr/share/man"
11011         fi
11012
11013         # look for the 'date' man-page (it's most likely to be installed!)
11014         MANPAGE_FORMAT=
11015         cf_preform=no
11016         cf_catonly=yes
11017         cf_example=date
11018
11019         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11020         for cf_dir in $MANPATH; do
11021                 test -z "$cf_dir" && cf_dir=/usr/man
11022                 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
11023                 do
11024                         cf_test=`echo $cf_name | sed -e 's/*//'`
11025                         if test "x$cf_test" = "x$cf_name" ; then
11026
11027                                 case "$cf_name" in
11028                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11029                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11030                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11031                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11032                                 esac
11033
11034                                 case "$cf_name" in
11035                                 ($cf_dir/man*)
11036                                         cf_catonly=no
11037                                         ;;
11038                                 ($cf_dir/cat*)
11039                                         cf_preform=yes
11040                                         ;;
11041                                 esac
11042                                 break
11043                         fi
11044
11045                         # if we found a match in either man* or cat*, stop looking
11046                         if test -n "$MANPAGE_FORMAT" ; then
11047                                 cf_found=no
11048                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11049                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11050                                 case "$cf_name" in
11051                                 ($cf_dir/cat*)
11052                                         cf_found=yes
11053                                         ;;
11054                                 esac
11055                                 test $cf_found=yes && break
11056                         fi
11057                 done
11058                 # only check the first directory in $MANPATH where we find manpages
11059                 if test -n "$MANPAGE_FORMAT" ; then
11060                         break
11061                 fi
11062         done
11063         # if we did not find the example, just assume it is normal
11064         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11065         IFS="$ac_save_ifs"
11066         ;;
11067 (*)
11068         for cf_option in $MANPAGE_FORMAT; do
11069         case $cf_option in
11070         (gzip|compress|BSDI|normal|formatted|catonly)
11071                 ;;
11072         (*)
11073                 cf_unknown="$cf_unknown $cf_option"
11074                 ;;
11075         esac
11076         done
11077         ;;
11078 esac
11079
11080 echo "$as_me:11080: result: $MANPAGE_FORMAT" >&5
11081 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11082 if test -n "$cf_unknown" ; then
11083         { echo "$as_me:11083: WARNING: Unexpected manpage-format $cf_unknown" >&5
11084 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11085 fi
11086
11087 echo "$as_me:11087: checking for manpage renaming" >&5
11088 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11089
11090 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11091 if test "${with_manpage_renames+set}" = set; then
11092   withval="$with_manpage_renames"
11093   MANPAGE_RENAMES=$withval
11094 else
11095   MANPAGE_RENAMES=yes
11096 fi;
11097
11098 case ".$MANPAGE_RENAMES" in
11099 (.no)
11100         ;;
11101 (.|.yes)
11102         # Debian 'man' program?
11103         if test -f /etc/debian_version ; then
11104                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11105         else
11106                 MANPAGE_RENAMES=no
11107         fi
11108         ;;
11109 esac
11110
11111 if test "$MANPAGE_RENAMES" != no ; then
11112         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11113                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11114         elif test ! -f $MANPAGE_RENAMES ; then
11115                 { { echo "$as_me:11115: error: not a filename: $MANPAGE_RENAMES" >&5
11116 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11117    { (exit 1); exit 1; }; }
11118         fi
11119
11120         test ! -d man && mkdir man
11121
11122         # Construct a sed-script to perform renaming within man-pages
11123         if test -n "$MANPAGE_RENAMES" ; then
11124                 test ! -d man && mkdir man
11125                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11126         fi
11127 fi
11128
11129 echo "$as_me:11129: result: $MANPAGE_RENAMES" >&5
11130 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11131
11132 echo "$as_me:11132: checking if manpage aliases will be installed" >&5
11133 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11134
11135 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11136 if test "${with_manpage_aliases+set}" = set; then
11137   withval="$with_manpage_aliases"
11138   MANPAGE_ALIASES=$withval
11139 else
11140   MANPAGE_ALIASES=yes
11141 fi;
11142
11143 echo "$as_me:11143: result: $MANPAGE_ALIASES" >&5
11144 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11145
11146 case "x$LN_S" in
11147 (xln*)
11148         cf_use_symlinks=yes
11149         ;;
11150 (*)
11151         cf_use_symlinks=no
11152         ;;
11153 esac
11154
11155 MANPAGE_SYMLINKS=no
11156 if test "$MANPAGE_ALIASES" = yes ; then
11157 echo "$as_me:11157: checking if manpage symlinks should be used" >&5
11158 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11159
11160 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11161 if test "${with_manpage_symlinks+set}" = set; then
11162   withval="$with_manpage_symlinks"
11163   MANPAGE_SYMLINKS=$withval
11164 else
11165   MANPAGE_SYMLINKS=$cf_use_symlinks
11166 fi;
11167
11168 if test "$$cf_use_symlinks" = no; then
11169 if test "$MANPAGE_SYMLINKS" = yes ; then
11170         { echo "$as_me:11170: WARNING: cannot make symlinks" >&5
11171 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11172         MANPAGE_SYMLINKS=no
11173 fi
11174 fi
11175
11176 echo "$as_me:11176: result: $MANPAGE_SYMLINKS" >&5
11177 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11178 fi
11179
11180 echo "$as_me:11180: checking for manpage tbl" >&5
11181 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11182
11183 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11184 if test "${with_manpage_tbl+set}" = set; then
11185   withval="$with_manpage_tbl"
11186   MANPAGE_TBL=$withval
11187 else
11188   MANPAGE_TBL=no
11189 fi;
11190
11191 echo "$as_me:11191: result: $MANPAGE_TBL" >&5
11192 echo "${ECHO_T}$MANPAGE_TBL" >&6
11193
11194 if test "$prefix" = "NONE" ; then
11195         cf_prefix="$ac_default_prefix"
11196 else
11197         cf_prefix="$prefix"
11198 fi
11199
11200 case "$MANPAGE_FORMAT" in
11201 (*catonly*)
11202         cf_format=yes
11203         cf_inboth=no
11204         ;;
11205 (*formatted*)
11206         cf_format=yes
11207         cf_inboth=yes
11208         ;;
11209 (*)
11210         cf_format=no
11211         cf_inboth=no
11212         ;;
11213 esac
11214
11215 test ! -d man && mkdir man
11216
11217 cf_so_strip=
11218 cf_compress=
11219 case "$MANPAGE_FORMAT" in
11220 (*compress*)
11221         cf_so_strip="Z"
11222         cf_compress=compress
11223         ;;
11224 (*gzip*)
11225         cf_so_strip="gz"
11226         cf_compress=gzip
11227         ;;
11228 esac
11229
11230 cf_edit_man=./edit_man.sh
11231 cf_man_alias=`pwd`/man_alias.sed
11232
11233 cat >$cf_edit_man <<CF_EOF
11234 #! $SHELL
11235 # this script is generated by the configure-script CF_MAN_PAGES macro.
11236
11237 prefix="$cf_prefix"
11238 datarootdir="$datarootdir"
11239 datadir="$datadir"
11240
11241 NCURSES_MAJOR="$NCURSES_MAJOR"
11242 NCURSES_MINOR="$NCURSES_MINOR"
11243 NCURSES_PATCH="$NCURSES_PATCH"
11244
11245 NCURSES_OSPEED="$NCURSES_OSPEED"
11246 TERMINFO="$TERMINFO"
11247
11248 INSTALL="$INSTALL"
11249 INSTALL_DATA="$INSTALL_DATA"
11250
11251 transform="$program_transform_name"
11252
11253 TMP=\${TMPDIR:=/tmp}/man\$\$
11254 trap "rm -f \$TMP" 0 1 2 5 15
11255
11256 form=\$1
11257 shift || exit 1
11258
11259 verb=\$1
11260 shift || exit 1
11261
11262 mandir=\$1
11263 shift || exit 1
11264
11265 srcdir=\$1
11266 top_srcdir=\$srcdir/..
11267 shift || exit 1
11268
11269 if test "\$form" = normal ; then
11270         if test "$cf_format" = yes ; then
11271         if test "$cf_inboth" = no ; then
11272                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11273                 exit $?
11274         fi
11275         fi
11276         cf_subdir=\$mandir/man
11277         cf_tables=$MANPAGE_TBL
11278 else
11279         cf_subdir=\$mandir/cat
11280         cf_tables=yes
11281 fi
11282
11283 # process the list of source-files
11284 for i in \$* ; do
11285 case \$i in
11286 (*.orig|*.rej) ;;
11287 (*.[0-9]*)
11288         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11289         if test \$verb = installing ; then
11290         if test ! -d \$cf_subdir\${section} ; then
11291                 mkdir -p \$cf_subdir\$section
11292         fi
11293         fi
11294
11295         # replace variables in man page
11296         if test ! -f $cf_man_alias ; then
11297 cat >>$cf_man_alias <<-CF_EOF2
11298                 s,@DATADIR@,\$datadir,g
11299                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11300                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11301                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11302                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11303                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11304                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11305 CF_EOF
11306
11307         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11308         do
11309                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11310                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11311 cat >>$cf_edit_man <<-CF_EOF
11312                 s,@$cf_NAME@,$cf_name,g
11313 CF_EOF
11314         done
11315
11316 cat >>$cf_edit_man <<CF_EOF
11317 CF_EOF2
11318                 echo "...made $cf_man_alias"
11319         fi
11320
11321         aliases=
11322         cf_source=\`basename \$i\`
11323         inalias=\$cf_source
11324         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11325         if test ! -f \$inalias ; then
11326                 echo .. skipped \$cf_source
11327                 continue
11328         fi
11329 CF_EOF
11330
11331 if test "$MANPAGE_ALIASES" != no ; then
11332 cat >>$cf_edit_man <<CF_EOF
11333         nCurses=ignore.3x
11334         test $with_curses_h = yes && nCurses=ncurses.3x
11335         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11336 CF_EOF
11337 fi
11338
11339 if test "$MANPAGE_RENAMES" = no ; then
11340 cat >>$cf_edit_man <<CF_EOF
11341         # perform program transformations for section 1 man pages
11342         if test \$section = 1 ; then
11343                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11344         else
11345                 cf_target=\$cf_subdir\${section}/\$cf_source
11346         fi
11347 CF_EOF
11348 else
11349 cat >>$cf_edit_man <<CF_EOF
11350         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11351         if test -z "\$cf_target" ; then
11352                 echo '? missing rename for '\$cf_source
11353                 cf_target="\$cf_source"
11354         fi
11355         cf_target="\$cf_subdir\${section}/\${cf_target}"
11356
11357 CF_EOF
11358 fi
11359
11360 cat >>$cf_edit_man <<CF_EOF
11361         sed     -f $cf_man_alias \\
11362 CF_EOF
11363
11364 if test -f $MANPAGE_RENAMES ; then
11365 cat >>$cf_edit_man <<CF_EOF
11366                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11367 CF_EOF
11368 else
11369 cat >>$cf_edit_man <<CF_EOF
11370                 < \$i >\$TMP
11371 CF_EOF
11372 fi
11373
11374 cat >>$cf_edit_man <<CF_EOF
11375 if test \$cf_tables = yes ; then
11376         tbl \$TMP >\$TMP.out
11377         mv \$TMP.out \$TMP
11378 fi
11379 CF_EOF
11380
11381 if test $with_overwrite != yes ; then
11382 cat >>$cf_edit_man <<CF_EOF
11383         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11384         mv \$TMP.out \$TMP
11385 CF_EOF
11386 fi
11387
11388 if test $with_curses_h != yes ; then
11389 cat >>$cf_edit_man <<CF_EOF
11390         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11391         mv \$TMP.out \$TMP
11392 CF_EOF
11393 fi
11394
11395 cat >>$cf_edit_man <<CF_EOF
11396         if test \$form = format ; then
11397                 nroff -man \$TMP >\$TMP.out
11398                 mv \$TMP.out \$TMP
11399         fi
11400 CF_EOF
11401
11402 if test -n "$cf_compress" ; then
11403 cat >>$cf_edit_man <<CF_EOF
11404         if test \$verb = installing ; then
11405         if ( $cf_compress -f \$TMP )
11406         then
11407                 mv \$TMP.$cf_so_strip \$TMP
11408         fi
11409         fi
11410         cf_target="\$cf_target.$cf_so_strip"
11411 CF_EOF
11412 fi
11413
11414 case "$MANPAGE_FORMAT" in
11415 (*BSDI*)
11416 cat >>$cf_edit_man <<CF_EOF
11417         if test \$form = format ; then
11418                 # BSDI installs only .0 suffixes in the cat directories
11419                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11420         fi
11421 CF_EOF
11422   ;;
11423 esac
11424
11425 cat >>$cf_edit_man <<CF_EOF
11426         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11427         if test \$verb = installing ; then
11428                 echo \$verb \$cf_target
11429                 \$INSTALL_DATA \$TMP \$cf_target
11430                 test -d \$cf_subdir\${section} &&
11431                 test -n "\$aliases" && (
11432                         cd \$cf_subdir\${section} && (
11433                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11434                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11435                                 cf_target=\`basename \$cf_target\`
11436                                 for cf_alias in \$aliases
11437                                 do
11438                                         if test \$section = 1 ; then
11439                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11440                                         fi
11441
11442                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11443                                                 if test -f \$cf_alias\${suffix} ; then
11444                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11445                                                         then
11446                                                                 continue
11447                                                         fi
11448                                                 fi
11449                                                 echo .. \$verb alias \$cf_alias\${suffix}
11450 CF_EOF
11451 case "x$LN_S" in
11452 (*-f)
11453 cat >>$cf_edit_man <<CF_EOF
11454                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11455 CF_EOF
11456         ;;
11457 (*)
11458 cat >>$cf_edit_man <<CF_EOF
11459                                                 rm -f \$cf_alias\${suffix}
11460                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11461 CF_EOF
11462         ;;
11463 esac
11464 cat >>$cf_edit_man <<CF_EOF
11465                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11466                                                 echo ".so \$cf_source" >\$TMP
11467 CF_EOF
11468 if test -n "$cf_compress" ; then
11469 cat >>$cf_edit_man <<CF_EOF
11470                                                 if test -n "$cf_so_strip" ; then
11471                                                         $cf_compress -f \$TMP
11472                                                         mv \$TMP.$cf_so_strip \$TMP
11473                                                 fi
11474 CF_EOF
11475 fi
11476 cat >>$cf_edit_man <<CF_EOF
11477                                                 echo .. \$verb alias \$cf_alias\${suffix}
11478                                                 rm -f \$cf_alias\${suffix}
11479                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11480                                         fi
11481                                 done
11482                         )
11483                 )
11484         elif test \$verb = removing ; then
11485                 test -f \$cf_target && (
11486                         echo \$verb \$cf_target
11487                         rm -f \$cf_target
11488                 )
11489                 test -d \$cf_subdir\${section} &&
11490                 test -n "\$aliases" && (
11491                         cd \$cf_subdir\${section} && (
11492                                 for cf_alias in \$aliases
11493                                 do
11494                                         if test \$section = 1 ; then
11495                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11496                                         fi
11497
11498                                         echo .. \$verb alias \$cf_alias\${suffix}
11499                                         rm -f \$cf_alias\${suffix}
11500                                 done
11501                         )
11502                 )
11503         else
11504 #               echo ".hy 0"
11505                 cat \$TMP
11506         fi
11507         ;;
11508 esac
11509 done
11510
11511 if test $cf_inboth = yes ; then
11512 if test \$form != format ; then
11513         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11514 fi
11515 fi
11516
11517 exit 0
11518 CF_EOF
11519 chmod 755 $cf_edit_man
11520
11521 ###############################################################################
11522
11523 ### Note that some functions (such as const) are normally disabled anyway.
11524 echo "$as_me:11524: checking if you want to build with function extensions" >&5
11525 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11526
11527 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11528 if test "${enable_ext_funcs+set}" = set; then
11529   enableval="$enable_ext_funcs"
11530   with_ext_funcs=$enableval
11531 else
11532   with_ext_funcs=yes
11533 fi;
11534 echo "$as_me:11534: result: $with_ext_funcs" >&5
11535 echo "${ECHO_T}$with_ext_funcs" >&6
11536 if test "x$with_ext_funcs" = xyes ; then
11537         NCURSES_EXT_FUNCS=1
11538
11539 cat >>confdefs.h <<\EOF
11540 #define HAVE_ASSUME_DEFAULT_COLORS 1
11541 EOF
11542
11543 cat >>confdefs.h <<\EOF
11544 #define HAVE_CURSES_VERSION 1
11545 EOF
11546
11547 cat >>confdefs.h <<\EOF
11548 #define HAVE_HAS_KEY 1
11549 EOF
11550
11551 cat >>confdefs.h <<\EOF
11552 #define HAVE_RESIZETERM 1
11553 EOF
11554
11555 cat >>confdefs.h <<\EOF
11556 #define HAVE_RESIZE_TERM 1
11557 EOF
11558
11559 cat >>confdefs.h <<\EOF
11560 #define HAVE_TERM_ENTRY_H 1
11561 EOF
11562
11563 cat >>confdefs.h <<\EOF
11564 #define HAVE_USE_DEFAULT_COLORS 1
11565 EOF
11566
11567 cat >>confdefs.h <<\EOF
11568 #define HAVE_USE_SCREEN 1
11569 EOF
11570
11571 cat >>confdefs.h <<\EOF
11572 #define HAVE_USE_WINDOW 1
11573 EOF
11574
11575 cat >>confdefs.h <<\EOF
11576 #define HAVE_WRESIZE 1
11577 EOF
11578
11579 cat >>confdefs.h <<\EOF
11580 #define NCURSES_EXT_FUNCS 1
11581 EOF
11582
11583         GENERATED_EXT_FUNCS=generated
11584 else
11585         NCURSES_EXT_FUNCS=0
11586         GENERATED_EXT_FUNCS=
11587 fi
11588
11589 echo "$as_me:11589: checking if you want to build with SCREEN extensions" >&5
11590 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11591
11592 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11593 if test "${enable_sp_funcs+set}" = set; then
11594   enableval="$enable_sp_funcs"
11595   with_sp_funcs=$enableval
11596 else
11597   with_sp_funcs=$cf_dft_ext_spfuncs
11598 fi;
11599 echo "$as_me:11599: result: $with_sp_funcs" >&5
11600 echo "${ECHO_T}$with_sp_funcs" >&6
11601 if test "x$with_sp_funcs" = xyes ; then
11602         NCURSES_SP_FUNCS=1
11603
11604 cat >>confdefs.h <<\EOF
11605 #define NCURSES_SP_FUNCS 1
11606 EOF
11607
11608         GENERATED_SP_FUNCS=generated
11609 else
11610         NCURSES_SP_FUNCS=0
11611         GENERATED_SP_FUNCS=
11612 fi
11613
11614 echo "$as_me:11614: checking if you want to build with terminal-driver" >&5
11615 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11616
11617 # Check whether --enable-term-driver or --disable-term-driver was given.
11618 if test "${enable_term_driver+set}" = set; then
11619   enableval="$enable_term_driver"
11620   with_term_driver=$enableval
11621 else
11622   with_term_driver=no
11623 fi;
11624 echo "$as_me:11624: result: $with_term_driver" >&5
11625 echo "${ECHO_T}$with_term_driver" >&6
11626 if test "x$with_term_driver" = xyes ; then
11627
11628 cat >>confdefs.h <<\EOF
11629 #define USE_TERM_DRIVER 1
11630 EOF
11631
11632         if test "x$with_termlib" != xno ; then
11633                 { { echo "$as_me:11633: error: The term-driver option conflicts with the termlib option" >&5
11634 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11635    { (exit 1); exit 1; }; }
11636         fi
11637         if test "x$with_sp_funcs" != xyes ; then
11638                 { { echo "$as_me:11638: error: The term-driver option relies upon sp-funcs" >&5
11639 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11640    { (exit 1); exit 1; }; }
11641         fi
11642 fi
11643
11644 ###   use option --enable-const to turn on use of const beyond that in XSI.
11645 echo "$as_me:11645: checking for extended use of const keyword" >&5
11646 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11647
11648 # Check whether --enable-const or --disable-const was given.
11649 if test "${enable_const+set}" = set; then
11650   enableval="$enable_const"
11651   with_ext_const=$enableval
11652 else
11653   with_ext_const=$cf_dft_ext_const
11654 fi;
11655 echo "$as_me:11655: result: $with_ext_const" >&5
11656 echo "${ECHO_T}$with_ext_const" >&6
11657 NCURSES_CONST='/*nothing*/'
11658 if test "x$with_ext_const" = xyes ; then
11659         NCURSES_CONST=const
11660 fi
11661
11662 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11663 echo "$as_me:11663: checking if you want to use extended colors" >&5
11664 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11665
11666 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11667 if test "${enable_ext_colors+set}" = set; then
11668   enableval="$enable_ext_colors"
11669   with_ext_colors=$enableval
11670 else
11671   with_ext_colors=$cf_dft_ext_colors
11672 fi;
11673 echo "$as_me:11673: result: $with_ext_colors" >&5
11674 echo "${ECHO_T}$with_ext_colors" >&6
11675 NCURSES_EXT_COLORS=0
11676 if test "x$with_ext_colors" = xyes ; then
11677         if test "x$with_widec" != xyes ; then
11678                 { echo "$as_me:11678: WARNING: This option applies only to wide-character library" >&5
11679 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11680         else
11681                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11682
11683 if test "${with_abi_version+set}" != set; then
11684         case $cf_cv_rel_version in
11685         (5.*)
11686                 cf_cv_rel_version=6.0
11687                 cf_cv_abi_version=6
11688                 { echo "$as_me:11688: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11689 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11690                 ;;
11691         esac
11692 fi
11693
11694                 NCURSES_EXT_COLORS=1
11695
11696 cat >>confdefs.h <<\EOF
11697 #define NCURSES_EXT_COLORS 1
11698 EOF
11699
11700         fi
11701 fi
11702
11703 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11704 echo "$as_me:11704: checking if you want to use extended mouse encoding" >&5
11705 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11706
11707 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11708 if test "${enable_ext_mouse+set}" = set; then
11709   enableval="$enable_ext_mouse"
11710   with_ext_mouse=$enableval
11711 else
11712   with_ext_mouse=$cf_dft_ext_mouse
11713 fi;
11714 echo "$as_me:11714: result: $with_ext_mouse" >&5
11715 echo "${ECHO_T}$with_ext_mouse" >&6
11716 NCURSES_MOUSE_VERSION=1
11717 if test "x$with_ext_mouse" = xyes ; then
11718         NCURSES_MOUSE_VERSION=2
11719
11720 if test "${with_abi_version+set}" != set; then
11721         case $cf_cv_rel_version in
11722         (5.*)
11723                 cf_cv_rel_version=6.0
11724                 cf_cv_abi_version=6
11725                 { echo "$as_me:11725: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11726 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11727                 ;;
11728         esac
11729 fi
11730
11731 fi
11732
11733 ###   use option --enable-ext-putwin to turn on extended screendumps
11734 echo "$as_me:11734: checking if you want to use extended putwin/screendump" >&5
11735 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11736
11737 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11738 if test "${enable_ext_putwin+set}" = set; then
11739   enableval="$enable_ext_putwin"
11740   with_ext_putwin=$enableval
11741 else
11742   with_ext_putwin=$cf_dft_ext_putwin
11743 fi;
11744 echo "$as_me:11744: result: $with_ext_putwin" >&5
11745 echo "${ECHO_T}$with_ext_putwin" >&6
11746 if test "x$with_ext_putwin" = xyes ; then
11747
11748 cat >>confdefs.h <<\EOF
11749 #define NCURSES_EXT_PUTWIN 1
11750 EOF
11751
11752 fi
11753
11754 echo "$as_me:11754: checking if you want \$NCURSES_NO_PADDING code" >&5
11755 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11756
11757 # Check whether --enable-no-padding or --disable-no-padding was given.
11758 if test "${enable_no_padding+set}" = set; then
11759   enableval="$enable_no_padding"
11760   with_no_padding=$enableval
11761 else
11762   with_no_padding=$with_ext_funcs
11763 fi;
11764 echo "$as_me:11764: result: $with_no_padding" >&5
11765 echo "${ECHO_T}$with_no_padding" >&6
11766 test "x$with_no_padding" = xyes &&
11767 cat >>confdefs.h <<\EOF
11768 #define NCURSES_NO_PADDING 1
11769 EOF
11770
11771 echo "$as_me:11771: checking for ANSI C header files" >&5
11772 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11773 if test "${ac_cv_header_stdc+set}" = set; then
11774   echo $ECHO_N "(cached) $ECHO_C" >&6
11775 else
11776   cat >conftest.$ac_ext <<_ACEOF
11777 #line 11777 "configure"
11778 #include "confdefs.h"
11779 #include <stdlib.h>
11780 #include <stdarg.h>
11781 #include <string.h>
11782 #include <float.h>
11783
11784 _ACEOF
11785 if { (eval echo "$as_me:11785: \"$ac_cpp conftest.$ac_ext\"") >&5
11786   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11787   ac_status=$?
11788   egrep -v '^ *\+' conftest.er1 >conftest.err
11789   rm -f conftest.er1
11790   cat conftest.err >&5
11791   echo "$as_me:11791: \$? = $ac_status" >&5
11792   (exit $ac_status); } >/dev/null; then
11793   if test -s conftest.err; then
11794     ac_cpp_err=$ac_c_preproc_warn_flag
11795   else
11796     ac_cpp_err=
11797   fi
11798 else
11799   ac_cpp_err=yes
11800 fi
11801 if test -z "$ac_cpp_err"; then
11802   ac_cv_header_stdc=yes
11803 else
11804   echo "$as_me: failed program was:" >&5
11805   cat conftest.$ac_ext >&5
11806   ac_cv_header_stdc=no
11807 fi
11808 rm -f conftest.err conftest.$ac_ext
11809
11810 if test $ac_cv_header_stdc = yes; then
11811   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11812   cat >conftest.$ac_ext <<_ACEOF
11813 #line 11813 "configure"
11814 #include "confdefs.h"
11815 #include <string.h>
11816
11817 _ACEOF
11818 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11819   egrep "memchr" >/dev/null 2>&1; then
11820   :
11821 else
11822   ac_cv_header_stdc=no
11823 fi
11824 rm -rf conftest*
11825
11826 fi
11827
11828 if test $ac_cv_header_stdc = yes; then
11829   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11830   cat >conftest.$ac_ext <<_ACEOF
11831 #line 11831 "configure"
11832 #include "confdefs.h"
11833 #include <stdlib.h>
11834
11835 _ACEOF
11836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11837   egrep "free" >/dev/null 2>&1; then
11838   :
11839 else
11840   ac_cv_header_stdc=no
11841 fi
11842 rm -rf conftest*
11843
11844 fi
11845
11846 if test $ac_cv_header_stdc = yes; then
11847   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11848   if test "$cross_compiling" = yes; then
11849   :
11850 else
11851   cat >conftest.$ac_ext <<_ACEOF
11852 #line 11852 "configure"
11853 #include "confdefs.h"
11854 #include <ctype.h>
11855 #if ((' ' & 0x0FF) == 0x020)
11856 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11857 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11858 #else
11859 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11860                      || ('j' <= (c) && (c) <= 'r') \
11861                      || ('s' <= (c) && (c) <= 'z'))
11862 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11863 #endif
11864
11865 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11866 int
11867 main ()
11868 {
11869   int i;
11870   for (i = 0; i < 256; i++)
11871     if (XOR (islower (i), ISLOWER (i))
11872         || toupper (i) != TOUPPER (i))
11873       $ac_main_return(2);
11874   $ac_main_return (0);
11875 }
11876 _ACEOF
11877 rm -f conftest$ac_exeext
11878 if { (eval echo "$as_me:11878: \"$ac_link\"") >&5
11879   (eval $ac_link) 2>&5
11880   ac_status=$?
11881   echo "$as_me:11881: \$? = $ac_status" >&5
11882   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11883   { (eval echo "$as_me:11883: \"$ac_try\"") >&5
11884   (eval $ac_try) 2>&5
11885   ac_status=$?
11886   echo "$as_me:11886: \$? = $ac_status" >&5
11887   (exit $ac_status); }; }; then
11888   :
11889 else
11890   echo "$as_me: program exited with status $ac_status" >&5
11891 echo "$as_me: failed program was:" >&5
11892 cat conftest.$ac_ext >&5
11893 ac_cv_header_stdc=no
11894 fi
11895 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11896 fi
11897 fi
11898 fi
11899 echo "$as_me:11899: result: $ac_cv_header_stdc" >&5
11900 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11901 if test $ac_cv_header_stdc = yes; then
11902
11903 cat >>confdefs.h <<\EOF
11904 #define STDC_HEADERS 1
11905 EOF
11906
11907 fi
11908
11909 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11910
11911 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11912                   inttypes.h stdint.h unistd.h
11913 do
11914 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11915 echo "$as_me:11915: checking for $ac_header" >&5
11916 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11917 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11918   echo $ECHO_N "(cached) $ECHO_C" >&6
11919 else
11920   cat >conftest.$ac_ext <<_ACEOF
11921 #line 11921 "configure"
11922 #include "confdefs.h"
11923 $ac_includes_default
11924 #include <$ac_header>
11925 _ACEOF
11926 rm -f conftest.$ac_objext
11927 if { (eval echo "$as_me:11927: \"$ac_compile\"") >&5
11928   (eval $ac_compile) 2>&5
11929   ac_status=$?
11930   echo "$as_me:11930: \$? = $ac_status" >&5
11931   (exit $ac_status); } &&
11932          { ac_try='test -s conftest.$ac_objext'
11933   { (eval echo "$as_me:11933: \"$ac_try\"") >&5
11934   (eval $ac_try) 2>&5
11935   ac_status=$?
11936   echo "$as_me:11936: \$? = $ac_status" >&5
11937   (exit $ac_status); }; }; then
11938   eval "$as_ac_Header=yes"
11939 else
11940   echo "$as_me: failed program was:" >&5
11941 cat conftest.$ac_ext >&5
11942 eval "$as_ac_Header=no"
11943 fi
11944 rm -f conftest.$ac_objext conftest.$ac_ext
11945 fi
11946 echo "$as_me:11946: result: `eval echo '${'$as_ac_Header'}'`" >&5
11947 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11948 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11949   cat >>confdefs.h <<EOF
11950 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11951 EOF
11952
11953 fi
11954 done
11955
11956 echo "$as_me:11956: checking for signed char" >&5
11957 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11958 if test "${ac_cv_type_signed_char+set}" = set; then
11959   echo $ECHO_N "(cached) $ECHO_C" >&6
11960 else
11961   cat >conftest.$ac_ext <<_ACEOF
11962 #line 11962 "configure"
11963 #include "confdefs.h"
11964 $ac_includes_default
11965 int
11966 main ()
11967 {
11968 if ((signed char *) 0)
11969   return 0;
11970 if (sizeof (signed char))
11971   return 0;
11972   ;
11973   return 0;
11974 }
11975 _ACEOF
11976 rm -f conftest.$ac_objext
11977 if { (eval echo "$as_me:11977: \"$ac_compile\"") >&5
11978   (eval $ac_compile) 2>&5
11979   ac_status=$?
11980   echo "$as_me:11980: \$? = $ac_status" >&5
11981   (exit $ac_status); } &&
11982          { ac_try='test -s conftest.$ac_objext'
11983   { (eval echo "$as_me:11983: \"$ac_try\"") >&5
11984   (eval $ac_try) 2>&5
11985   ac_status=$?
11986   echo "$as_me:11986: \$? = $ac_status" >&5
11987   (exit $ac_status); }; }; then
11988   ac_cv_type_signed_char=yes
11989 else
11990   echo "$as_me: failed program was:" >&5
11991 cat conftest.$ac_ext >&5
11992 ac_cv_type_signed_char=no
11993 fi
11994 rm -f conftest.$ac_objext conftest.$ac_ext
11995 fi
11996 echo "$as_me:11996: result: $ac_cv_type_signed_char" >&5
11997 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11998
11999 echo "$as_me:11999: checking size of signed char" >&5
12000 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12001 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12002   echo $ECHO_N "(cached) $ECHO_C" >&6
12003 else
12004   if test "$ac_cv_type_signed_char" = yes; then
12005   if test "$cross_compiling" = yes; then
12006   # Depending upon the size, compute the lo and hi bounds.
12007 cat >conftest.$ac_ext <<_ACEOF
12008 #line 12008 "configure"
12009 #include "confdefs.h"
12010 $ac_includes_default
12011 int
12012 main ()
12013 {
12014 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12015   ;
12016   return 0;
12017 }
12018 _ACEOF
12019 rm -f conftest.$ac_objext
12020 if { (eval echo "$as_me:12020: \"$ac_compile\"") >&5
12021   (eval $ac_compile) 2>&5
12022   ac_status=$?
12023   echo "$as_me:12023: \$? = $ac_status" >&5
12024   (exit $ac_status); } &&
12025          { ac_try='test -s conftest.$ac_objext'
12026   { (eval echo "$as_me:12026: \"$ac_try\"") >&5
12027   (eval $ac_try) 2>&5
12028   ac_status=$?
12029   echo "$as_me:12029: \$? = $ac_status" >&5
12030   (exit $ac_status); }; }; then
12031   ac_lo=0 ac_mid=0
12032   while :; do
12033     cat >conftest.$ac_ext <<_ACEOF
12034 #line 12034 "configure"
12035 #include "confdefs.h"
12036 $ac_includes_default
12037 int
12038 main ()
12039 {
12040 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12041   ;
12042   return 0;
12043 }
12044 _ACEOF
12045 rm -f conftest.$ac_objext
12046 if { (eval echo "$as_me:12046: \"$ac_compile\"") >&5
12047   (eval $ac_compile) 2>&5
12048   ac_status=$?
12049   echo "$as_me:12049: \$? = $ac_status" >&5
12050   (exit $ac_status); } &&
12051          { ac_try='test -s conftest.$ac_objext'
12052   { (eval echo "$as_me:12052: \"$ac_try\"") >&5
12053   (eval $ac_try) 2>&5
12054   ac_status=$?
12055   echo "$as_me:12055: \$? = $ac_status" >&5
12056   (exit $ac_status); }; }; then
12057   ac_hi=$ac_mid; break
12058 else
12059   echo "$as_me: failed program was:" >&5
12060 cat conftest.$ac_ext >&5
12061 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12062 fi
12063 rm -f conftest.$ac_objext conftest.$ac_ext
12064   done
12065 else
12066   echo "$as_me: failed program was:" >&5
12067 cat conftest.$ac_ext >&5
12068 ac_hi=-1 ac_mid=-1
12069   while :; do
12070     cat >conftest.$ac_ext <<_ACEOF
12071 #line 12071 "configure"
12072 #include "confdefs.h"
12073 $ac_includes_default
12074 int
12075 main ()
12076 {
12077 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12078   ;
12079   return 0;
12080 }
12081 _ACEOF
12082 rm -f conftest.$ac_objext
12083 if { (eval echo "$as_me:12083: \"$ac_compile\"") >&5
12084   (eval $ac_compile) 2>&5
12085   ac_status=$?
12086   echo "$as_me:12086: \$? = $ac_status" >&5
12087   (exit $ac_status); } &&
12088          { ac_try='test -s conftest.$ac_objext'
12089   { (eval echo "$as_me:12089: \"$ac_try\"") >&5
12090   (eval $ac_try) 2>&5
12091   ac_status=$?
12092   echo "$as_me:12092: \$? = $ac_status" >&5
12093   (exit $ac_status); }; }; then
12094   ac_lo=$ac_mid; break
12095 else
12096   echo "$as_me: failed program was:" >&5
12097 cat conftest.$ac_ext >&5
12098 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12099 fi
12100 rm -f conftest.$ac_objext conftest.$ac_ext
12101   done
12102 fi
12103 rm -f conftest.$ac_objext conftest.$ac_ext
12104 # Binary search between lo and hi bounds.
12105 while test "x$ac_lo" != "x$ac_hi"; do
12106   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12107   cat >conftest.$ac_ext <<_ACEOF
12108 #line 12108 "configure"
12109 #include "confdefs.h"
12110 $ac_includes_default
12111 int
12112 main ()
12113 {
12114 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12115   ;
12116   return 0;
12117 }
12118 _ACEOF
12119 rm -f conftest.$ac_objext
12120 if { (eval echo "$as_me:12120: \"$ac_compile\"") >&5
12121   (eval $ac_compile) 2>&5
12122   ac_status=$?
12123   echo "$as_me:12123: \$? = $ac_status" >&5
12124   (exit $ac_status); } &&
12125          { ac_try='test -s conftest.$ac_objext'
12126   { (eval echo "$as_me:12126: \"$ac_try\"") >&5
12127   (eval $ac_try) 2>&5
12128   ac_status=$?
12129   echo "$as_me:12129: \$? = $ac_status" >&5
12130   (exit $ac_status); }; }; then
12131   ac_hi=$ac_mid
12132 else
12133   echo "$as_me: failed program was:" >&5
12134 cat conftest.$ac_ext >&5
12135 ac_lo=`expr $ac_mid + 1`
12136 fi
12137 rm -f conftest.$ac_objext conftest.$ac_ext
12138 done
12139 ac_cv_sizeof_signed_char=$ac_lo
12140 else
12141   if test "$cross_compiling" = yes; then
12142   { { echo "$as_me:12142: error: cannot run test program while cross compiling" >&5
12143 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12144    { (exit 1); exit 1; }; }
12145 else
12146   cat >conftest.$ac_ext <<_ACEOF
12147 #line 12147 "configure"
12148 #include "confdefs.h"
12149 $ac_includes_default
12150 int
12151 main ()
12152 {
12153 FILE *f = fopen ("conftest.val", "w");
12154 if (!f)
12155   $ac_main_return (1);
12156 fprintf (f, "%d", (sizeof (signed char)));
12157 fclose (f);
12158   ;
12159   return 0;
12160 }
12161 _ACEOF
12162 rm -f conftest$ac_exeext
12163 if { (eval echo "$as_me:12163: \"$ac_link\"") >&5
12164   (eval $ac_link) 2>&5
12165   ac_status=$?
12166   echo "$as_me:12166: \$? = $ac_status" >&5
12167   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12168   { (eval echo "$as_me:12168: \"$ac_try\"") >&5
12169   (eval $ac_try) 2>&5
12170   ac_status=$?
12171   echo "$as_me:12171: \$? = $ac_status" >&5
12172   (exit $ac_status); }; }; then
12173   ac_cv_sizeof_signed_char=`cat conftest.val`
12174 else
12175   echo "$as_me: program exited with status $ac_status" >&5
12176 echo "$as_me: failed program was:" >&5
12177 cat conftest.$ac_ext >&5
12178 fi
12179 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12180 fi
12181 fi
12182 rm -f conftest.val
12183 else
12184   ac_cv_sizeof_signed_char=0
12185 fi
12186 fi
12187 echo "$as_me:12187: result: $ac_cv_sizeof_signed_char" >&5
12188 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12189 cat >>confdefs.h <<EOF
12190 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12191 EOF
12192
12193 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12194         NCURSES_SBOOL="signed char"
12195 else
12196         NCURSES_SBOOL="char"
12197 fi
12198 echo "$as_me:12198: checking if you want to use signed Boolean array in term.h" >&5
12199 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12200
12201 # Check whether --enable-signed-char or --disable-signed-char was given.
12202 if test "${enable_signed_char+set}" = set; then
12203   enableval="$enable_signed_char"
12204   with_signed_char=$enableval
12205 else
12206   with_signed_char=no
12207 fi;
12208 echo "$as_me:12208: result: $with_signed_char" >&5
12209 echo "${ECHO_T}$with_signed_char" >&6
12210 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12211
12212 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12213 echo "$as_me:12213: checking if you want SIGWINCH handler" >&5
12214 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12215
12216 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12217 if test "${enable_sigwinch+set}" = set; then
12218   enableval="$enable_sigwinch"
12219   with_sigwinch=$enableval
12220 else
12221   with_sigwinch=$with_ext_funcs
12222 fi;
12223 echo "$as_me:12223: result: $with_sigwinch" >&5
12224 echo "${ECHO_T}$with_sigwinch" >&6
12225 test "x$with_sigwinch" = xyes &&
12226 cat >>confdefs.h <<\EOF
12227 #define USE_SIGWINCH 1
12228 EOF
12229
12230 ###   use option --enable-tcap-names to allow user to define new capabilities
12231 echo "$as_me:12231: checking if you want user-definable terminal capabilities like termcap" >&5
12232 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12233
12234 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12235 if test "${enable_tcap_names+set}" = set; then
12236   enableval="$enable_tcap_names"
12237   with_tcap_names=$enableval
12238 else
12239   with_tcap_names=$with_ext_funcs
12240 fi;
12241 echo "$as_me:12241: result: $with_tcap_names" >&5
12242 echo "${ECHO_T}$with_tcap_names" >&6
12243 NCURSES_XNAMES=0
12244 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12245
12246 ###############################################################################
12247 # These options are relatively safe to experiment with.
12248
12249 echo "$as_me:12249: checking if you want all development code" >&5
12250 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12251
12252 # Check whether --with-develop or --without-develop was given.
12253 if test "${with_develop+set}" = set; then
12254   withval="$with_develop"
12255   with_develop=$withval
12256 else
12257   with_develop=no
12258 fi;
12259 echo "$as_me:12259: result: $with_develop" >&5
12260 echo "${ECHO_T}$with_develop" >&6
12261
12262 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12263 echo "$as_me:12263: checking if you want hard-tabs code" >&5
12264 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12265
12266 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12267 if test "${enable_hard_tabs+set}" = set; then
12268   enableval="$enable_hard_tabs"
12269
12270 else
12271   enable_hard_tabs=$with_develop
12272 fi;
12273 echo "$as_me:12273: result: $enable_hard_tabs" >&5
12274 echo "${ECHO_T}$enable_hard_tabs" >&6
12275 test "x$enable_hard_tabs" = xyes &&
12276 cat >>confdefs.h <<\EOF
12277 #define USE_HARD_TABS 1
12278 EOF
12279
12280 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12281 echo "$as_me:12281: checking if you want limited support for xmc" >&5
12282 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12283
12284 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12285 if test "${enable_xmc_glitch+set}" = set; then
12286   enableval="$enable_xmc_glitch"
12287
12288 else
12289   enable_xmc_glitch=$with_develop
12290 fi;
12291 echo "$as_me:12291: result: $enable_xmc_glitch" >&5
12292 echo "${ECHO_T}$enable_xmc_glitch" >&6
12293 test "x$enable_xmc_glitch" = xyes &&
12294 cat >>confdefs.h <<\EOF
12295 #define USE_XMC_SUPPORT 1
12296 EOF
12297
12298 ###############################################################################
12299 # These are just experimental, probably should not be in a package:
12300
12301 echo "$as_me:12301: checking if you do not want to assume colors are white-on-black" >&5
12302 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12303
12304 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12305 if test "${enable_assumed_color+set}" = set; then
12306   enableval="$enable_assumed_color"
12307   with_assumed_color=$enableval
12308 else
12309   with_assumed_color=yes
12310 fi;
12311 echo "$as_me:12311: result: $with_assumed_color" >&5
12312 echo "${ECHO_T}$with_assumed_color" >&6
12313 test "x$with_assumed_color" = xyes &&
12314 cat >>confdefs.h <<\EOF
12315 #define USE_ASSUMED_COLOR 1
12316 EOF
12317
12318 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12319 echo "$as_me:12319: checking if you want hashmap scrolling-optimization code" >&5
12320 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12321
12322 # Check whether --enable-hashmap or --disable-hashmap was given.
12323 if test "${enable_hashmap+set}" = set; then
12324   enableval="$enable_hashmap"
12325   with_hashmap=$enableval
12326 else
12327   with_hashmap=yes
12328 fi;
12329 echo "$as_me:12329: result: $with_hashmap" >&5
12330 echo "${ECHO_T}$with_hashmap" >&6
12331 test "x$with_hashmap" = xyes &&
12332 cat >>confdefs.h <<\EOF
12333 #define USE_HASHMAP 1
12334 EOF
12335
12336 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12337 echo "$as_me:12337: checking if you want colorfgbg code" >&5
12338 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12339
12340 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12341 if test "${enable_colorfgbg+set}" = set; then
12342   enableval="$enable_colorfgbg"
12343   with_colorfgbg=$enableval
12344 else
12345   with_colorfgbg=no
12346 fi;
12347 echo "$as_me:12347: result: $with_colorfgbg" >&5
12348 echo "${ECHO_T}$with_colorfgbg" >&6
12349 test "x$with_colorfgbg" = xyes &&
12350 cat >>confdefs.h <<\EOF
12351 #define USE_COLORFGBG 1
12352 EOF
12353
12354 ###   use option --enable-interop to turn on use of bindings used for interop
12355 echo "$as_me:12355: checking if you want interop bindings" >&5
12356 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12357
12358 # Check whether --enable-interop or --disable-interop was given.
12359 if test "${enable_interop+set}" = set; then
12360   enableval="$enable_interop"
12361   with_exp_interop=$enableval
12362 else
12363   with_exp_interop=$cf_dft_interop
12364 fi;
12365 echo "$as_me:12365: result: $with_exp_interop" >&5
12366 echo "${ECHO_T}$with_exp_interop" >&6
12367
12368 NCURSES_INTEROP_FUNCS=0
12369 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12370
12371 # This is still experimental (20080329), but should ultimately be moved to
12372 # the script-block --with-normal, etc.
12373
12374 echo "$as_me:12374: checking if you want to link with the pthread library" >&5
12375 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12376
12377 # Check whether --with-pthread or --without-pthread was given.
12378 if test "${with_pthread+set}" = set; then
12379   withval="$with_pthread"
12380   with_pthread=$withval
12381 else
12382   with_pthread=no
12383 fi;
12384 echo "$as_me:12384: result: $with_pthread" >&5
12385 echo "${ECHO_T}$with_pthread" >&6
12386
12387 if test "$with_pthread" != no ; then
12388         echo "$as_me:12388: checking for pthread.h" >&5
12389 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12390 if test "${ac_cv_header_pthread_h+set}" = set; then
12391   echo $ECHO_N "(cached) $ECHO_C" >&6
12392 else
12393   cat >conftest.$ac_ext <<_ACEOF
12394 #line 12394 "configure"
12395 #include "confdefs.h"
12396 #include <pthread.h>
12397 _ACEOF
12398 if { (eval echo "$as_me:12398: \"$ac_cpp conftest.$ac_ext\"") >&5
12399   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12400   ac_status=$?
12401   egrep -v '^ *\+' conftest.er1 >conftest.err
12402   rm -f conftest.er1
12403   cat conftest.err >&5
12404   echo "$as_me:12404: \$? = $ac_status" >&5
12405   (exit $ac_status); } >/dev/null; then
12406   if test -s conftest.err; then
12407     ac_cpp_err=$ac_c_preproc_warn_flag
12408   else
12409     ac_cpp_err=
12410   fi
12411 else
12412   ac_cpp_err=yes
12413 fi
12414 if test -z "$ac_cpp_err"; then
12415   ac_cv_header_pthread_h=yes
12416 else
12417   echo "$as_me: failed program was:" >&5
12418   cat conftest.$ac_ext >&5
12419   ac_cv_header_pthread_h=no
12420 fi
12421 rm -f conftest.err conftest.$ac_ext
12422 fi
12423 echo "$as_me:12423: result: $ac_cv_header_pthread_h" >&5
12424 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12425 if test $ac_cv_header_pthread_h = yes; then
12426
12427 cat >>confdefs.h <<\EOF
12428 #define HAVE_PTHREADS_H 1
12429 EOF
12430
12431         for cf_lib_pthread in pthread c_r
12432         do
12433             echo "$as_me:12433: checking if we can link with the $cf_lib_pthread library" >&5
12434 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12435             cf_save_LIBS="$LIBS"
12436
12437 cf_add_libs="-l$cf_lib_pthread"
12438 # Filter out duplicates - this happens with badly-designed ".pc" files...
12439 for cf_add_1lib in $LIBS
12440 do
12441         for cf_add_2lib in $cf_add_libs
12442         do
12443                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12444                 then
12445                         cf_add_1lib=
12446                         break
12447                 fi
12448         done
12449         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12450 done
12451 LIBS="$cf_add_libs"
12452
12453             cat >conftest.$ac_ext <<_ACEOF
12454 #line 12454 "configure"
12455 #include "confdefs.h"
12456
12457 #include <pthread.h>
12458
12459 int
12460 main ()
12461 {
12462
12463                 int rc = pthread_create(0,0,0,0);
12464                 int r2 = pthread_mutexattr_settype(0, 0);
12465
12466   ;
12467   return 0;
12468 }
12469 _ACEOF
12470 rm -f conftest.$ac_objext conftest$ac_exeext
12471 if { (eval echo "$as_me:12471: \"$ac_link\"") >&5
12472   (eval $ac_link) 2>&5
12473   ac_status=$?
12474   echo "$as_me:12474: \$? = $ac_status" >&5
12475   (exit $ac_status); } &&
12476          { ac_try='test -s conftest$ac_exeext'
12477   { (eval echo "$as_me:12477: \"$ac_try\"") >&5
12478   (eval $ac_try) 2>&5
12479   ac_status=$?
12480   echo "$as_me:12480: \$? = $ac_status" >&5
12481   (exit $ac_status); }; }; then
12482   with_pthread=yes
12483 else
12484   echo "$as_me: failed program was:" >&5
12485 cat conftest.$ac_ext >&5
12486 with_pthread=no
12487 fi
12488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12489             LIBS="$cf_save_LIBS"
12490             echo "$as_me:12490: result: $with_pthread" >&5
12491 echo "${ECHO_T}$with_pthread" >&6
12492             test "$with_pthread" = yes && break
12493         done
12494
12495         if test "$with_pthread" = yes ; then
12496
12497 cf_add_libs="-l$cf_lib_pthread"
12498 # Filter out duplicates - this happens with badly-designed ".pc" files...
12499 for cf_add_1lib in $LIBS
12500 do
12501         for cf_add_2lib in $cf_add_libs
12502         do
12503                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12504                 then
12505                         cf_add_1lib=
12506                         break
12507                 fi
12508         done
12509         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12510 done
12511 LIBS="$cf_add_libs"
12512
12513 cat >>confdefs.h <<\EOF
12514 #define HAVE_LIBPTHREADS 1
12515 EOF
12516
12517         else
12518             { { echo "$as_me:12518: error: Cannot link with pthread library" >&5
12519 echo "$as_me: error: Cannot link with pthread library" >&2;}
12520    { (exit 1); exit 1; }; }
12521         fi
12522
12523 fi
12524
12525 fi
12526
12527 if test "x$with_pthread" != xno; then
12528         echo "$as_me:12528: checking for pthread_kill" >&5
12529 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12530 if test "${ac_cv_func_pthread_kill+set}" = set; then
12531   echo $ECHO_N "(cached) $ECHO_C" >&6
12532 else
12533   cat >conftest.$ac_ext <<_ACEOF
12534 #line 12534 "configure"
12535 #include "confdefs.h"
12536 /* System header to define __stub macros and hopefully few prototypes,
12537     which can conflict with char pthread_kill (); below.  */
12538 #include <assert.h>
12539 /* Override any gcc2 internal prototype to avoid an error.  */
12540 #ifdef __cplusplus
12541 extern "C"
12542 #endif
12543 /* We use char because int might match the return type of a gcc2
12544    builtin and then its argument prototype would still apply.  */
12545 char pthread_kill ();
12546 char (*f) ();
12547
12548 int
12549 main ()
12550 {
12551 /* The GNU C library defines this for functions which it implements
12552     to always fail with ENOSYS.  Some functions are actually named
12553     something starting with __ and the normal name is an alias.  */
12554 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12555 choke me
12556 #else
12557 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12558 #endif
12559
12560   ;
12561   return 0;
12562 }
12563 _ACEOF
12564 rm -f conftest.$ac_objext conftest$ac_exeext
12565 if { (eval echo "$as_me:12565: \"$ac_link\"") >&5
12566   (eval $ac_link) 2>&5
12567   ac_status=$?
12568   echo "$as_me:12568: \$? = $ac_status" >&5
12569   (exit $ac_status); } &&
12570          { ac_try='test -s conftest$ac_exeext'
12571   { (eval echo "$as_me:12571: \"$ac_try\"") >&5
12572   (eval $ac_try) 2>&5
12573   ac_status=$?
12574   echo "$as_me:12574: \$? = $ac_status" >&5
12575   (exit $ac_status); }; }; then
12576   ac_cv_func_pthread_kill=yes
12577 else
12578   echo "$as_me: failed program was:" >&5
12579 cat conftest.$ac_ext >&5
12580 ac_cv_func_pthread_kill=no
12581 fi
12582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12583 fi
12584 echo "$as_me:12584: result: $ac_cv_func_pthread_kill" >&5
12585 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12586 if test $ac_cv_func_pthread_kill = yes; then
12587
12588                 echo "$as_me:12588: checking if you want to allow EINTR in wgetch with pthreads" >&5
12589 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12590
12591 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12592 if test "${enable_pthreads_eintr+set}" = set; then
12593   enableval="$enable_pthreads_eintr"
12594   use_pthreads_eintr=$enableval
12595 else
12596   use_pthreads_eintr=no
12597 fi;
12598                 echo "$as_me:12598: result: $use_pthreads_eintr" >&5
12599 echo "${ECHO_T}$use_pthreads_eintr" >&6
12600                 if test "x$use_pthreads_eintr" = xyes ; then
12601
12602 cat >>confdefs.h <<\EOF
12603 #define USE_PTHREADS_EINTR 1
12604 EOF
12605
12606                 fi
12607 fi
12608
12609         echo "$as_me:12609: checking if you want to use weak-symbols for pthreads" >&5
12610 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12611
12612 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12613 if test "${enable_weak_symbols+set}" = set; then
12614   enableval="$enable_weak_symbols"
12615   use_weak_symbols=$enableval
12616 else
12617   use_weak_symbols=no
12618 fi;
12619         echo "$as_me:12619: result: $use_weak_symbols" >&5
12620 echo "${ECHO_T}$use_weak_symbols" >&6
12621         if test "x$use_weak_symbols" = xyes ; then
12622
12623 echo "$as_me:12623: checking if $CC supports weak symbols" >&5
12624 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12625 if test "${cf_cv_weak_symbols+set}" = set; then
12626   echo $ECHO_N "(cached) $ECHO_C" >&6
12627 else
12628
12629 cat >conftest.$ac_ext <<_ACEOF
12630 #line 12630 "configure"
12631 #include "confdefs.h"
12632
12633 #include <stdio.h>
12634 int
12635 main ()
12636 {
12637
12638 #if defined(__GNUC__)
12639 #  if defined __USE_ISOC99
12640 #    define _cat_pragma(exp)    _Pragma(#exp)
12641 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12642 #  else
12643 #    define _weak_pragma(exp)
12644 #  endif
12645 #  define _declare(name)        __extension__ extern __typeof__(name) name
12646 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12647 #endif
12648
12649 weak_symbol(fopen);
12650
12651   ;
12652   return 0;
12653 }
12654 _ACEOF
12655 rm -f conftest.$ac_objext
12656 if { (eval echo "$as_me:12656: \"$ac_compile\"") >&5
12657   (eval $ac_compile) 2>&5
12658   ac_status=$?
12659   echo "$as_me:12659: \$? = $ac_status" >&5
12660   (exit $ac_status); } &&
12661          { ac_try='test -s conftest.$ac_objext'
12662   { (eval echo "$as_me:12662: \"$ac_try\"") >&5
12663   (eval $ac_try) 2>&5
12664   ac_status=$?
12665   echo "$as_me:12665: \$? = $ac_status" >&5
12666   (exit $ac_status); }; }; then
12667   cf_cv_weak_symbols=yes
12668 else
12669   echo "$as_me: failed program was:" >&5
12670 cat conftest.$ac_ext >&5
12671 cf_cv_weak_symbols=no
12672 fi
12673 rm -f conftest.$ac_objext conftest.$ac_ext
12674
12675 fi
12676 echo "$as_me:12676: result: $cf_cv_weak_symbols" >&5
12677 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12678
12679         else
12680                 cf_cv_weak_symbols=no
12681         fi
12682
12683         if test "x$cf_cv_weak_symbols" = xyes ; then
12684
12685 cat >>confdefs.h <<\EOF
12686 #define USE_WEAK_SYMBOLS 1
12687 EOF
12688
12689         fi
12690 fi
12691
12692 PTHREAD=
12693 if test "x$with_pthread" = "xyes" ; then
12694
12695 cat >>confdefs.h <<\EOF
12696 #define USE_PTHREADS 1
12697 EOF
12698
12699         enable_reentrant=yes
12700         if test "x$cf_cv_weak_symbols" = xyes ; then
12701                 PTHREAD=-lpthread
12702         fi
12703 fi
12704
12705 # Reentrant code has to be opaque; there's little advantage to making ncurses
12706 # opaque outside of that, so there is no --enable-opaque option.  We can use
12707 # this option without --with-pthreads, but this will be always set for
12708 # pthreads.
12709 echo "$as_me:12709: checking if you want reentrant code" >&5
12710 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12711
12712 # Check whether --enable-reentrant or --disable-reentrant was given.
12713 if test "${enable_reentrant+set}" = set; then
12714   enableval="$enable_reentrant"
12715   with_reentrant=$enableval
12716 else
12717   with_reentrant=no
12718 fi;
12719 echo "$as_me:12719: result: $with_reentrant" >&5
12720 echo "${ECHO_T}$with_reentrant" >&6
12721 if test "x$with_reentrant" = xyes ; then
12722         cf_cv_enable_reentrant=1
12723         cf_cv_enable_opaque="NCURSES_INTERNALS"
12724         NCURSES_OPAQUE=1
12725         NCURSES_SIZE_T=int
12726         if test "x$cf_cv_weak_symbols" = xyes ; then
12727
12728 # remove pthread library from $LIBS
12729 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12730
12731 cf_add_libs="-lpthread"
12732 # Filter out duplicates - this happens with badly-designed ".pc" files...
12733 for cf_add_1lib in $TEST_LIBS
12734 do
12735         for cf_add_2lib in $cf_add_libs
12736         do
12737                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12738                 then
12739                         cf_add_1lib=
12740                         break
12741                 fi
12742         done
12743         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12744 done
12745 TEST_LIBS="$cf_add_libs"
12746
12747 cf_add_libs="-lpthread"
12748 # Filter out duplicates - this happens with badly-designed ".pc" files...
12749 for cf_add_1lib in $TEST_LIBS2
12750 do
12751         for cf_add_2lib in $cf_add_libs
12752         do
12753                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12754                 then
12755                         cf_add_1lib=
12756                         break
12757                 fi
12758         done
12759         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12760 done
12761 TEST_LIBS2="$cf_add_libs"
12762
12763         else
12764                 # when not using weak symbols but with_reentrant,
12765                 # add 't' to the library suffix on all platforms
12766                 # except cygwin, where we only do that if ALSO
12767                 # compiling with full thread support.
12768                 case "$host" in
12769                 (*cygwin* | *msys*)
12770                         if test "$with_pthread" = "yes" ; then
12771                                 if test "x$disable_lib_suffixes" = "xno" ; then
12772                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12773                                 fi
12774                         fi ;;
12775                 (*)
12776                         if test "x$disable_lib_suffixes" = "xno" ; then
12777                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12778                         fi
12779                         ;;
12780                 esac
12781         fi
12782
12783 cat >>confdefs.h <<\EOF
12784 #define USE_REENTRANT 1
12785 EOF
12786
12787 if test "${with_abi_version+set}" != set; then
12788         case $cf_cv_rel_version in
12789         (5.*)
12790                 cf_cv_rel_version=6.0
12791                 cf_cv_abi_version=6
12792                 { echo "$as_me:12792: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12793 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12794                 ;;
12795         esac
12796 fi
12797
12798 else
12799         cf_cv_enable_reentrant=0
12800         cf_cv_enable_opaque="NCURSES_OPAQUE"
12801         NCURSES_OPAQUE=0
12802         NCURSES_SIZE_T=short
12803 fi
12804
12805 ### Allow using a different wrap-prefix
12806 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12807         echo "$as_me:12807: checking for prefix used to wrap public variables" >&5
12808 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12809
12810 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12811 if test "${with_wrap_prefix+set}" = set; then
12812   withval="$with_wrap_prefix"
12813   NCURSES_WRAP_PREFIX=$withval
12814 else
12815   NCURSES_WRAP_PREFIX=_nc_
12816 fi;
12817         echo "$as_me:12817: result: $NCURSES_WRAP_PREFIX" >&5
12818 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12819 else
12820         NCURSES_WRAP_PREFIX=_nc_
12821 fi
12822
12823 cat >>confdefs.h <<EOF
12824 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12825 EOF
12826
12827 echo "$as_me:12827: checking if you want experimental safe-sprintf code" >&5
12828 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12829
12830 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12831 if test "${enable_safe_sprintf+set}" = set; then
12832   enableval="$enable_safe_sprintf"
12833   with_safe_sprintf=$enableval
12834 else
12835   with_safe_sprintf=no
12836 fi;
12837 echo "$as_me:12837: result: $with_safe_sprintf" >&5
12838 echo "${ECHO_T}$with_safe_sprintf" >&6
12839 test "x$with_safe_sprintf" = xyes &&
12840 cat >>confdefs.h <<\EOF
12841 #define USE_SAFE_SPRINTF 1
12842 EOF
12843
12844 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12845 # when hashmap is used scroll hints are useless
12846 if test "$with_hashmap" = no ; then
12847 echo "$as_me:12847: checking if you want to experiment without scrolling-hints code" >&5
12848 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12849
12850 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12851 if test "${enable_scroll_hints+set}" = set; then
12852   enableval="$enable_scroll_hints"
12853   with_scroll_hints=$enableval
12854 else
12855   with_scroll_hints=yes
12856 fi;
12857 echo "$as_me:12857: result: $with_scroll_hints" >&5
12858 echo "${ECHO_T}$with_scroll_hints" >&6
12859 test "x$with_scroll_hints" = xyes &&
12860 cat >>confdefs.h <<\EOF
12861 #define USE_SCROLL_HINTS 1
12862 EOF
12863
12864 fi
12865
12866 echo "$as_me:12866: checking if you want wgetch-events code" >&5
12867 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
12868
12869 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12870 if test "${enable_wgetch_events+set}" = set; then
12871   enableval="$enable_wgetch_events"
12872   with_wgetch_events=$enableval
12873 else
12874   with_wgetch_events=no
12875 fi;
12876 echo "$as_me:12876: result: $with_wgetch_events" >&5
12877 echo "${ECHO_T}$with_wgetch_events" >&6
12878 test "x$with_wgetch_events" = xyes &&
12879 cat >>confdefs.h <<\EOF
12880 #define NCURSES_WGETCH_EVENTS 1
12881 EOF
12882
12883 ###############################################################################
12884
12885 ###     use option --disable-echo to suppress full display compiling commands
12886
12887 echo "$as_me:12887: checking if you want to see long compiling messages" >&5
12888 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12889
12890 # Check whether --enable-echo or --disable-echo was given.
12891 if test "${enable_echo+set}" = set; then
12892   enableval="$enable_echo"
12893   test "$enableval" != no && enableval=yes
12894         if test "$enableval" != "yes" ; then
12895
12896         ECHO_LT='--silent'
12897         ECHO_LD='@echo linking $@;'
12898         RULE_CC='@echo compiling $<'
12899         SHOW_CC='@echo compiling $@'
12900         ECHO_CC='@'
12901
12902         else
12903
12904         ECHO_LT=''
12905         ECHO_LD=''
12906         RULE_CC=''
12907         SHOW_CC=''
12908         ECHO_CC=''
12909
12910         fi
12911 else
12912   enableval=yes
12913
12914         ECHO_LT=''
12915         ECHO_LD=''
12916         RULE_CC=''
12917         SHOW_CC=''
12918         ECHO_CC=''
12919
12920 fi;
12921 echo "$as_me:12921: result: $enableval" >&5
12922 echo "${ECHO_T}$enableval" >&6
12923
12924 if test "x$enable_echo" = xyes; then
12925         ECHO_LINK=
12926 else
12927         ECHO_LINK='@ echo linking $@ ... ;'
12928         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12929         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12930 fi
12931
12932 ###     use option --enable-warnings to turn on all gcc warnings
12933 echo "$as_me:12933: checking if you want to see compiler warnings" >&5
12934 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12935
12936 # Check whether --enable-warnings or --disable-warnings was given.
12937 if test "${enable_warnings+set}" = set; then
12938   enableval="$enable_warnings"
12939   with_warnings=$enableval
12940 fi;
12941 echo "$as_me:12941: result: $with_warnings" >&5
12942 echo "${ECHO_T}$with_warnings" >&6
12943
12944 if test "x$with_warnings" = "xyes"; then
12945
12946         ADAFLAGS="$ADAFLAGS -gnatg"
12947
12948 INTEL_COMPILER=no
12949
12950 if test "$GCC" = yes ; then
12951         case $host_os in
12952         (linux*|gnu*)
12953                 echo "$as_me:12953: checking if this is really Intel C compiler" >&5
12954 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12955                 cf_save_CFLAGS="$CFLAGS"
12956                 CFLAGS="$CFLAGS -no-gcc"
12957                 cat >conftest.$ac_ext <<_ACEOF
12958 #line 12958 "configure"
12959 #include "confdefs.h"
12960
12961 int
12962 main ()
12963 {
12964
12965 #ifdef __INTEL_COMPILER
12966 #else
12967 make an error
12968 #endif
12969
12970   ;
12971   return 0;
12972 }
12973 _ACEOF
12974 rm -f conftest.$ac_objext
12975 if { (eval echo "$as_me:12975: \"$ac_compile\"") >&5
12976   (eval $ac_compile) 2>&5
12977   ac_status=$?
12978   echo "$as_me:12978: \$? = $ac_status" >&5
12979   (exit $ac_status); } &&
12980          { ac_try='test -s conftest.$ac_objext'
12981   { (eval echo "$as_me:12981: \"$ac_try\"") >&5
12982   (eval $ac_try) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit $ac_status); }; }; then
12986   INTEL_COMPILER=yes
12987 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12988
12989 else
12990   echo "$as_me: failed program was:" >&5
12991 cat conftest.$ac_ext >&5
12992 fi
12993 rm -f conftest.$ac_objext conftest.$ac_ext
12994                 CFLAGS="$cf_save_CFLAGS"
12995                 echo "$as_me:12995: result: $INTEL_COMPILER" >&5
12996 echo "${ECHO_T}$INTEL_COMPILER" >&6
12997                 ;;
12998         esac
12999 fi
13000
13001 CLANG_COMPILER=no
13002
13003 if test "$GCC" = yes ; then
13004         echo "$as_me:13004: checking if this is really Clang C compiler" >&5
13005 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13006         cf_save_CFLAGS="$CFLAGS"
13007         CFLAGS="$CFLAGS -Qunused-arguments"
13008         cat >conftest.$ac_ext <<_ACEOF
13009 #line 13009 "configure"
13010 #include "confdefs.h"
13011
13012 int
13013 main ()
13014 {
13015
13016 #ifdef __clang__
13017 #else
13018 make an error
13019 #endif
13020
13021   ;
13022   return 0;
13023 }
13024 _ACEOF
13025 rm -f conftest.$ac_objext
13026 if { (eval echo "$as_me:13026: \"$ac_compile\"") >&5
13027   (eval $ac_compile) 2>&5
13028   ac_status=$?
13029   echo "$as_me:13029: \$? = $ac_status" >&5
13030   (exit $ac_status); } &&
13031          { ac_try='test -s conftest.$ac_objext'
13032   { (eval echo "$as_me:13032: \"$ac_try\"") >&5
13033   (eval $ac_try) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit $ac_status); }; }; then
13037   CLANG_COMPILER=yes
13038 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13039
13040 else
13041   echo "$as_me: failed program was:" >&5
13042 cat conftest.$ac_ext >&5
13043 fi
13044 rm -f conftest.$ac_objext conftest.$ac_ext
13045         CFLAGS="$cf_save_CFLAGS"
13046         echo "$as_me:13046: result: $CLANG_COMPILER" >&5
13047 echo "${ECHO_T}$CLANG_COMPILER" >&6
13048 fi
13049
13050 cat > conftest.$ac_ext <<EOF
13051 #line 13051 "${as_me:-configure}"
13052 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13053 EOF
13054
13055 if test "$INTEL_COMPILER" = yes
13056 then
13057 # The "-wdXXX" options suppress warnings:
13058 # remark #1419: external declaration in primary source file
13059 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13060 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13061 # remark #193: zero used for undefined preprocessing identifier
13062 # remark #593: variable "curs_sb_left_arrow" was set but never used
13063 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13064 # remark #869: parameter "tw" was never referenced
13065 # remark #981: operands are evaluated in unspecified order
13066 # warning #279: controlling expression is constant
13067
13068         { echo "$as_me:13068: checking for $CC warning options..." >&5
13069 echo "$as_me: checking for $CC warning options..." >&6;}
13070         cf_save_CFLAGS="$CFLAGS"
13071         EXTRA_CFLAGS="-Wall"
13072         for cf_opt in \
13073                 wd1419 \
13074                 wd1683 \
13075                 wd1684 \
13076                 wd193 \
13077                 wd593 \
13078                 wd279 \
13079                 wd810 \
13080                 wd869 \
13081                 wd981
13082         do
13083                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13084                 if { (eval echo "$as_me:13084: \"$ac_compile\"") >&5
13085   (eval $ac_compile) 2>&5
13086   ac_status=$?
13087   echo "$as_me:13087: \$? = $ac_status" >&5
13088   (exit $ac_status); }; then
13089                         test -n "$verbose" && echo "$as_me:13089: result: ... -$cf_opt" >&5
13090 echo "${ECHO_T}... -$cf_opt" >&6
13091                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13092                 fi
13093         done
13094         CFLAGS="$cf_save_CFLAGS"
13095
13096 elif test "$GCC" = yes
13097 then
13098         { echo "$as_me:13098: checking for $CC warning options..." >&5
13099 echo "$as_me: checking for $CC warning options..." >&6;}
13100         cf_save_CFLAGS="$CFLAGS"
13101         EXTRA_CFLAGS=
13102         cf_warn_CONST=""
13103         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13104         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13105         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13106         for cf_opt in W Wall \
13107                 Wbad-function-cast \
13108                 Wcast-align \
13109                 Wcast-qual \
13110                 Wdeclaration-after-statement \
13111                 Wextra \
13112                 Winline \
13113                 Wmissing-declarations \
13114                 Wmissing-prototypes \
13115                 Wnested-externs \
13116                 Wpointer-arith \
13117                 Wshadow \
13118                 Wstrict-prototypes \
13119                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13120         do
13121                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13122                 if { (eval echo "$as_me:13122: \"$ac_compile\"") >&5
13123   (eval $ac_compile) 2>&5
13124   ac_status=$?
13125   echo "$as_me:13125: \$? = $ac_status" >&5
13126   (exit $ac_status); }; then
13127                         test -n "$verbose" && echo "$as_me:13127: result: ... -$cf_opt" >&5
13128 echo "${ECHO_T}... -$cf_opt" >&6
13129                         case $cf_opt in
13130                         (Wcast-qual)
13131                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13132                                 ;;
13133                         (Winline)
13134                                 case $GCC_VERSION in
13135                                 ([34].*)
13136                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13137
13138 echo "${as_me:-configure}:13138: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13139
13140                                         continue;;
13141                                 esac
13142                                 ;;
13143                         (Wpointer-arith)
13144                                 case $GCC_VERSION in
13145                                 ([12].*)
13146                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13147
13148 echo "${as_me:-configure}:13148: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13149
13150                                         continue;;
13151                                 esac
13152                                 ;;
13153                         esac
13154                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13155                 fi
13156         done
13157         CFLAGS="$cf_save_CFLAGS"
13158 fi
13159 rm -rf conftest*
13160
13161         if test "x$cf_with_cxx" = xyes ; then
13162
13163 INTEL_CPLUSPLUS=no
13164
13165 if test "$GCC" = yes ; then
13166         case $host_os in
13167         (linux*|gnu*)
13168                 echo "$as_me:13168: checking if this is really Intel C++ compiler" >&5
13169 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13170                 cf_save_CFLAGS="$CXXFLAGS"
13171                 CXXFLAGS="$CXXFLAGS -no-gcc"
13172                 cat >conftest.$ac_ext <<_ACEOF
13173 #line 13173 "configure"
13174 #include "confdefs.h"
13175
13176 int
13177 main ()
13178 {
13179
13180 #ifdef __INTEL_COMPILER
13181 #else
13182 make an error
13183 #endif
13184
13185   ;
13186   return 0;
13187 }
13188 _ACEOF
13189 rm -f conftest.$ac_objext
13190 if { (eval echo "$as_me:13190: \"$ac_compile\"") >&5
13191   (eval $ac_compile) 2>&5
13192   ac_status=$?
13193   echo "$as_me:13193: \$? = $ac_status" >&5
13194   (exit $ac_status); } &&
13195          { ac_try='test -s conftest.$ac_objext'
13196   { (eval echo "$as_me:13196: \"$ac_try\"") >&5
13197   (eval $ac_try) 2>&5
13198   ac_status=$?
13199   echo "$as_me:13199: \$? = $ac_status" >&5
13200   (exit $ac_status); }; }; then
13201   INTEL_CPLUSPLUS=yes
13202 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13203
13204 else
13205   echo "$as_me: failed program was:" >&5
13206 cat conftest.$ac_ext >&5
13207 fi
13208 rm -f conftest.$ac_objext conftest.$ac_ext
13209                 CXXFLAGS="$cf_save_CFLAGS"
13210                 echo "$as_me:13210: result: $INTEL_CPLUSPLUS" >&5
13211 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13212                 ;;
13213         esac
13214 fi
13215
13216 CLANG_CPLUSPLUS=no
13217
13218 if test "$GCC" = yes ; then
13219         echo "$as_me:13219: checking if this is really Clang C++ compiler" >&5
13220 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13221         cf_save_CFLAGS="$CXXFLAGS"
13222         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13223         cat >conftest.$ac_ext <<_ACEOF
13224 #line 13224 "configure"
13225 #include "confdefs.h"
13226
13227 int
13228 main ()
13229 {
13230
13231 #ifdef __clang__
13232 #else
13233 make an error
13234 #endif
13235
13236   ;
13237   return 0;
13238 }
13239 _ACEOF
13240 rm -f conftest.$ac_objext
13241 if { (eval echo "$as_me:13241: \"$ac_compile\"") >&5
13242   (eval $ac_compile) 2>&5
13243   ac_status=$?
13244   echo "$as_me:13244: \$? = $ac_status" >&5
13245   (exit $ac_status); } &&
13246          { ac_try='test -s conftest.$ac_objext'
13247   { (eval echo "$as_me:13247: \"$ac_try\"") >&5
13248   (eval $ac_try) 2>&5
13249   ac_status=$?
13250   echo "$as_me:13250: \$? = $ac_status" >&5
13251   (exit $ac_status); }; }; then
13252   CLANG_CPLUSPLUS=yes
13253 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13254
13255 else
13256   echo "$as_me: failed program was:" >&5
13257 cat conftest.$ac_ext >&5
13258 fi
13259 rm -f conftest.$ac_objext conftest.$ac_ext
13260         CXXFLAGS="$cf_save_CFLAGS"
13261         echo "$as_me:13261: result: $CLANG_CPLUSPLUS" >&5
13262 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13263 fi
13264
13265 ac_ext=cc
13266 ac_cpp='$CXXCPP $CPPFLAGS'
13267 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13268 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13269 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13270 ac_main_return=return
13271
13272 cat > conftest.$ac_ext <<EOF
13273 #line 13273 "configure"
13274 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13275 EOF
13276
13277 if test "$INTEL_CPLUSPLUS" = yes
13278 then
13279 # The "-wdXXX" options suppress warnings:
13280 # remark #1419: external declaration in primary source file
13281 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13282 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13283 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13284 # remark #193: zero used for undefined preprocessing identifier
13285 # remark #593: variable "curs_sb_left_arrow" was set but never used
13286 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13287 # remark #869: parameter "tw" was never referenced
13288 # remark #981: operands are evaluated in unspecified order
13289 # warning #269: invalid format string conversion
13290
13291         { echo "$as_me:13291: checking for $CC warning options..." >&5
13292 echo "$as_me: checking for $CC warning options..." >&6;}
13293         cf_save_CXXFLAGS="$CXXFLAGS"
13294         EXTRA_CXXFLAGS="-Wall"
13295         for cf_opt in \
13296                 wd1419 \
13297                 wd1682 \
13298                 wd1683 \
13299                 wd1684 \
13300                 wd193 \
13301                 wd279 \
13302                 wd593 \
13303                 wd810 \
13304                 wd869 \
13305                 wd981
13306         do
13307                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13308                 if { (eval echo "$as_me:13308: \"$ac_compile\"") >&5
13309   (eval $ac_compile) 2>&5
13310   ac_status=$?
13311   echo "$as_me:13311: \$? = $ac_status" >&5
13312   (exit $ac_status); }; then
13313                         test -n "$verbose" && echo "$as_me:13313: result: ... -$cf_opt" >&5
13314 echo "${ECHO_T}... -$cf_opt" >&6
13315                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13316                 fi
13317         done
13318         CXXFLAGS="$cf_save_CXXFLAGS"
13319
13320 elif test "$GXX" = yes
13321 then
13322         { echo "$as_me:13322: checking for $CXX warning options..." >&5
13323 echo "$as_me: checking for $CXX warning options..." >&6;}
13324         cf_save_CXXFLAGS="$CXXFLAGS"
13325         EXTRA_CXXFLAGS="-W -Wall"
13326         cf_gxx_extra_warnings=""
13327         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13328         case "$GCC_VERSION" in
13329         ([1-2].*)
13330                 ;;
13331         (*)
13332                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13333                 ;;
13334         esac
13335         for cf_opt in \
13336                 Wabi \
13337                 fabi-version=0 \
13338                 Wextra \
13339                 Wignored-qualifiers \
13340                 Wlogical-op \
13341                 Woverloaded-virtual \
13342                 Wsign-promo \
13343                 Wsynth \
13344                 Wold-style-cast \
13345                 Wcast-align \
13346                 Wcast-qual \
13347                 Wpointer-arith \
13348                 Wshadow \
13349                 Wundef $cf_gxx_extra_warnings Wno-unused
13350         do
13351                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13352                 if { (eval echo "$as_me:13352: \"$ac_compile\"") >&5
13353   (eval $ac_compile) 2>&5
13354   ac_status=$?
13355   echo "$as_me:13355: \$? = $ac_status" >&5
13356   (exit $ac_status); }; then
13357                         test -n "$verbose" && echo "$as_me:13357: result: ... -$cf_opt" >&5
13358 echo "${ECHO_T}... -$cf_opt" >&6
13359                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13360                 else
13361                         test -n "$verbose" && echo "$as_me:13361: result: ... no -$cf_opt" >&5
13362 echo "${ECHO_T}... no -$cf_opt" >&6
13363                 fi
13364         done
13365         CXXFLAGS="$cf_save_CXXFLAGS"
13366 fi
13367
13368 rm -rf conftest*
13369 ac_ext=c
13370 ac_cpp='$CPP $CPPFLAGS'
13371 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13372 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13373 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13374 ac_main_return=return
13375
13376         fi
13377 fi
13378
13379 if test "$GCC" = yes
13380 then
13381 cat > conftest.i <<EOF
13382 #ifndef GCC_PRINTF
13383 #define GCC_PRINTF 0
13384 #endif
13385 #ifndef GCC_SCANF
13386 #define GCC_SCANF 0
13387 #endif
13388 #ifndef GCC_NORETURN
13389 #define GCC_NORETURN /* nothing */
13390 #endif
13391 #ifndef GCC_UNUSED
13392 #define GCC_UNUSED /* nothing */
13393 #endif
13394 EOF
13395 if test "$GCC" = yes
13396 then
13397         { echo "$as_me:13397: checking for $CC __attribute__ directives..." >&5
13398 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13399 cat > conftest.$ac_ext <<EOF
13400 #line 13400 "${as_me:-configure}"
13401 #include "confdefs.h"
13402 #include "conftest.h"
13403 #include "conftest.i"
13404 #if     GCC_PRINTF
13405 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13406 #else
13407 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13408 #endif
13409 #if     GCC_SCANF
13410 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13411 #else
13412 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13413 #endif
13414 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13415 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13416 extern void foo(void) GCC_NORETURN;
13417 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13418 EOF
13419         cf_printf_attribute=no
13420         cf_scanf_attribute=no
13421         for cf_attribute in scanf printf unused noreturn
13422         do
13423
13424 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13425
13426                 cf_directive="__attribute__(($cf_attribute))"
13427                 echo "checking for $CC $cf_directive" 1>&5
13428
13429                 case $cf_attribute in
13430                 (printf)
13431                         cf_printf_attribute=yes
13432                         cat >conftest.h <<EOF
13433 #define GCC_$cf_ATTRIBUTE 1
13434 EOF
13435                         ;;
13436                 (scanf)
13437                         cf_scanf_attribute=yes
13438                         cat >conftest.h <<EOF
13439 #define GCC_$cf_ATTRIBUTE 1
13440 EOF
13441                         ;;
13442                 (*)
13443                         cat >conftest.h <<EOF
13444 #define GCC_$cf_ATTRIBUTE $cf_directive
13445 EOF
13446                         ;;
13447                 esac
13448
13449                 if { (eval echo "$as_me:13449: \"$ac_compile\"") >&5
13450   (eval $ac_compile) 2>&5
13451   ac_status=$?
13452   echo "$as_me:13452: \$? = $ac_status" >&5
13453   (exit $ac_status); }; then
13454                         test -n "$verbose" && echo "$as_me:13454: result: ... $cf_attribute" >&5
13455 echo "${ECHO_T}... $cf_attribute" >&6
13456                         cat conftest.h >>confdefs.h
13457                         case $cf_attribute in
13458                         (noreturn)
13459
13460 cat >>confdefs.h <<EOF
13461 #define GCC_NORETURN $cf_directive
13462 EOF
13463
13464                                 ;;
13465                         (printf)
13466                                 cf_value='/* nothing */'
13467                                 if test "$cf_printf_attribute" != no ; then
13468                                         cf_value='__attribute__((format(printf,fmt,var)))'
13469
13470 cat >>confdefs.h <<\EOF
13471 #define GCC_PRINTF 1
13472 EOF
13473
13474                                 fi
13475
13476 cat >>confdefs.h <<EOF
13477 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13478 EOF
13479
13480                                 ;;
13481                         (scanf)
13482                                 cf_value='/* nothing */'
13483                                 if test "$cf_scanf_attribute" != no ; then
13484                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13485
13486 cat >>confdefs.h <<\EOF
13487 #define GCC_SCANF 1
13488 EOF
13489
13490                                 fi
13491
13492 cat >>confdefs.h <<EOF
13493 #define GCC_SCANFLIKE(fmt,var) $cf_value
13494 EOF
13495
13496                                 ;;
13497                         (unused)
13498
13499 cat >>confdefs.h <<EOF
13500 #define GCC_UNUSED $cf_directive
13501 EOF
13502
13503                                 ;;
13504                         esac
13505                 fi
13506         done
13507 else
13508         fgrep define conftest.i >>confdefs.h
13509 fi
13510 rm -rf conftest*
13511 fi
13512
13513 echo "$as_me:13513: checking if you want to work around bogus compiler/loader warnings" >&5
13514 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13515
13516 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13517 if test "${enable_string_hacks+set}" = set; then
13518   enableval="$enable_string_hacks"
13519   with_string_hacks=$enableval
13520 else
13521   with_string_hacks=no
13522 fi;
13523 echo "$as_me:13523: result: $with_string_hacks" >&5
13524 echo "${ECHO_T}$with_string_hacks" >&6
13525
13526 if test "x$with_string_hacks" = "xyes"; then
13527
13528 cat >>confdefs.h <<\EOF
13529 #define USE_STRING_HACKS 1
13530 EOF
13531
13532         { echo "$as_me:13532: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13533 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13534
13535 for ac_func in strlcat strlcpy snprintf
13536 do
13537 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13538 echo "$as_me:13538: checking for $ac_func" >&5
13539 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13540 if eval "test \"\${$as_ac_var+set}\" = set"; then
13541   echo $ECHO_N "(cached) $ECHO_C" >&6
13542 else
13543   cat >conftest.$ac_ext <<_ACEOF
13544 #line 13544 "configure"
13545 #include "confdefs.h"
13546 /* System header to define __stub macros and hopefully few prototypes,
13547     which can conflict with char $ac_func (); below.  */
13548 #include <assert.h>
13549 /* Override any gcc2 internal prototype to avoid an error.  */
13550 #ifdef __cplusplus
13551 extern "C"
13552 #endif
13553 /* We use char because int might match the return type of a gcc2
13554    builtin and then its argument prototype would still apply.  */
13555 char $ac_func ();
13556 char (*f) ();
13557
13558 int
13559 main ()
13560 {
13561 /* The GNU C library defines this for functions which it implements
13562     to always fail with ENOSYS.  Some functions are actually named
13563     something starting with __ and the normal name is an alias.  */
13564 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13565 choke me
13566 #else
13567 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13568 #endif
13569
13570   ;
13571   return 0;
13572 }
13573 _ACEOF
13574 rm -f conftest.$ac_objext conftest$ac_exeext
13575 if { (eval echo "$as_me:13575: \"$ac_link\"") >&5
13576   (eval $ac_link) 2>&5
13577   ac_status=$?
13578   echo "$as_me:13578: \$? = $ac_status" >&5
13579   (exit $ac_status); } &&
13580          { ac_try='test -s conftest$ac_exeext'
13581   { (eval echo "$as_me:13581: \"$ac_try\"") >&5
13582   (eval $ac_try) 2>&5
13583   ac_status=$?
13584   echo "$as_me:13584: \$? = $ac_status" >&5
13585   (exit $ac_status); }; }; then
13586   eval "$as_ac_var=yes"
13587 else
13588   echo "$as_me: failed program was:" >&5
13589 cat conftest.$ac_ext >&5
13590 eval "$as_ac_var=no"
13591 fi
13592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13593 fi
13594 echo "$as_me:13594: result: `eval echo '${'$as_ac_var'}'`" >&5
13595 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13596 if test `eval echo '${'$as_ac_var'}'` = yes; then
13597   cat >>confdefs.h <<EOF
13598 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13599 EOF
13600
13601 fi
13602 done
13603
13604 fi
13605
13606 ###     use option --enable-assertions to turn on generation of assertion code
13607 echo "$as_me:13607: checking if you want to enable runtime assertions" >&5
13608 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13609
13610 # Check whether --enable-assertions or --disable-assertions was given.
13611 if test "${enable_assertions+set}" = set; then
13612   enableval="$enable_assertions"
13613   with_assertions=$enableval
13614 else
13615   with_assertions=no
13616 fi;
13617 echo "$as_me:13617: result: $with_assertions" >&5
13618 echo "${ECHO_T}$with_assertions" >&6
13619 if test -n "$GCC"
13620 then
13621         if test "$with_assertions" = no
13622         then
13623                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13624         else
13625
13626         ADAFLAGS="$ADAFLAGS -gnata"
13627
13628         fi
13629 fi
13630
13631 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13632
13633 echo "$as_me:13633: checking if you want to use dmalloc for testing" >&5
13634 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13635
13636 # Check whether --with-dmalloc or --without-dmalloc was given.
13637 if test "${with_dmalloc+set}" = set; then
13638   withval="$with_dmalloc"
13639
13640 cat >>confdefs.h <<EOF
13641 #define USE_DMALLOC 1
13642 EOF
13643
13644         : ${with_cflags:=-g}
13645         : ${with_no_leaks:=yes}
13646          with_dmalloc=yes
13647 else
13648   with_dmalloc=
13649 fi;
13650 echo "$as_me:13650: result: ${with_dmalloc:-no}" >&5
13651 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13652
13653 case .$with_cflags in
13654 (.*-g*)
13655         case .$CFLAGS in
13656         (.*-g*)
13657                 ;;
13658         (*)
13659
13660 cf_fix_cppflags=no
13661 cf_new_cflags=
13662 cf_new_cppflags=
13663 cf_new_extra_cppflags=
13664
13665 for cf_add_cflags in -g
13666 do
13667 case $cf_fix_cppflags in
13668 (no)
13669         case $cf_add_cflags in
13670         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13671                 case $cf_add_cflags in
13672                 (-D*)
13673                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13674
13675                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13676                                 && test -z "${cf_tst_cflags}" \
13677                                 && cf_fix_cppflags=yes
13678
13679                         if test $cf_fix_cppflags = yes ; then
13680                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13681                                 continue
13682                         elif test "${cf_tst_cflags}" = "\"'" ; then
13683                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13684                                 continue
13685                         fi
13686                         ;;
13687                 esac
13688                 case "$CPPFLAGS" in
13689                 (*$cf_add_cflags)
13690                         ;;
13691                 (*)
13692                         case $cf_add_cflags in
13693                         (-D*)
13694                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13695
13696 CPPFLAGS=`echo "$CPPFLAGS" | \
13697         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13698                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13699
13700                                 ;;
13701                         esac
13702                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13703                         ;;
13704                 esac
13705                 ;;
13706         (*)
13707                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13708                 ;;
13709         esac
13710         ;;
13711 (yes)
13712         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13713
13714         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13715
13716         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13717                 && test -z "${cf_tst_cflags}" \
13718                 && cf_fix_cppflags=no
13719         ;;
13720 esac
13721 done
13722
13723 if test -n "$cf_new_cflags" ; then
13724
13725         CFLAGS="$CFLAGS $cf_new_cflags"
13726 fi
13727
13728 if test -n "$cf_new_cppflags" ; then
13729
13730         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13731 fi
13732
13733 if test -n "$cf_new_extra_cppflags" ; then
13734
13735         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13736 fi
13737
13738                 ;;
13739         esac
13740         ;;
13741 esac
13742
13743 if test "$with_dmalloc" = yes ; then
13744         echo "$as_me:13744: checking for dmalloc.h" >&5
13745 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13746 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13747   echo $ECHO_N "(cached) $ECHO_C" >&6
13748 else
13749   cat >conftest.$ac_ext <<_ACEOF
13750 #line 13750 "configure"
13751 #include "confdefs.h"
13752 #include <dmalloc.h>
13753 _ACEOF
13754 if { (eval echo "$as_me:13754: \"$ac_cpp conftest.$ac_ext\"") >&5
13755   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13756   ac_status=$?
13757   egrep -v '^ *\+' conftest.er1 >conftest.err
13758   rm -f conftest.er1
13759   cat conftest.err >&5
13760   echo "$as_me:13760: \$? = $ac_status" >&5
13761   (exit $ac_status); } >/dev/null; then
13762   if test -s conftest.err; then
13763     ac_cpp_err=$ac_c_preproc_warn_flag
13764   else
13765     ac_cpp_err=
13766   fi
13767 else
13768   ac_cpp_err=yes
13769 fi
13770 if test -z "$ac_cpp_err"; then
13771   ac_cv_header_dmalloc_h=yes
13772 else
13773   echo "$as_me: failed program was:" >&5
13774   cat conftest.$ac_ext >&5
13775   ac_cv_header_dmalloc_h=no
13776 fi
13777 rm -f conftest.err conftest.$ac_ext
13778 fi
13779 echo "$as_me:13779: result: $ac_cv_header_dmalloc_h" >&5
13780 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13781 if test $ac_cv_header_dmalloc_h = yes; then
13782
13783 echo "$as_me:13783: checking for dmalloc_debug in -ldmalloc" >&5
13784 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13785 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13786   echo $ECHO_N "(cached) $ECHO_C" >&6
13787 else
13788   ac_check_lib_save_LIBS=$LIBS
13789 LIBS="-ldmalloc  $LIBS"
13790 cat >conftest.$ac_ext <<_ACEOF
13791 #line 13791 "configure"
13792 #include "confdefs.h"
13793
13794 /* Override any gcc2 internal prototype to avoid an error.  */
13795 #ifdef __cplusplus
13796 extern "C"
13797 #endif
13798 /* We use char because int might match the return type of a gcc2
13799    builtin and then its argument prototype would still apply.  */
13800 char dmalloc_debug ();
13801 int
13802 main ()
13803 {
13804 dmalloc_debug ();
13805   ;
13806   return 0;
13807 }
13808 _ACEOF
13809 rm -f conftest.$ac_objext conftest$ac_exeext
13810 if { (eval echo "$as_me:13810: \"$ac_link\"") >&5
13811   (eval $ac_link) 2>&5
13812   ac_status=$?
13813   echo "$as_me:13813: \$? = $ac_status" >&5
13814   (exit $ac_status); } &&
13815          { ac_try='test -s conftest$ac_exeext'
13816   { (eval echo "$as_me:13816: \"$ac_try\"") >&5
13817   (eval $ac_try) 2>&5
13818   ac_status=$?
13819   echo "$as_me:13819: \$? = $ac_status" >&5
13820   (exit $ac_status); }; }; then
13821   ac_cv_lib_dmalloc_dmalloc_debug=yes
13822 else
13823   echo "$as_me: failed program was:" >&5
13824 cat conftest.$ac_ext >&5
13825 ac_cv_lib_dmalloc_dmalloc_debug=no
13826 fi
13827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13828 LIBS=$ac_check_lib_save_LIBS
13829 fi
13830 echo "$as_me:13830: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13831 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13832 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13833   cat >>confdefs.h <<EOF
13834 #define HAVE_LIBDMALLOC 1
13835 EOF
13836
13837   LIBS="-ldmalloc $LIBS"
13838
13839 fi
13840
13841 fi
13842
13843 fi
13844
13845 echo "$as_me:13845: checking if you want to use dbmalloc for testing" >&5
13846 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13847
13848 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13849 if test "${with_dbmalloc+set}" = set; then
13850   withval="$with_dbmalloc"
13851
13852 cat >>confdefs.h <<EOF
13853 #define USE_DBMALLOC 1
13854 EOF
13855
13856         : ${with_cflags:=-g}
13857         : ${with_no_leaks:=yes}
13858          with_dbmalloc=yes
13859 else
13860   with_dbmalloc=
13861 fi;
13862 echo "$as_me:13862: result: ${with_dbmalloc:-no}" >&5
13863 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13864
13865 case .$with_cflags in
13866 (.*-g*)
13867         case .$CFLAGS in
13868         (.*-g*)
13869                 ;;
13870         (*)
13871
13872 cf_fix_cppflags=no
13873 cf_new_cflags=
13874 cf_new_cppflags=
13875 cf_new_extra_cppflags=
13876
13877 for cf_add_cflags in -g
13878 do
13879 case $cf_fix_cppflags in
13880 (no)
13881         case $cf_add_cflags in
13882         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13883                 case $cf_add_cflags in
13884                 (-D*)
13885                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13886
13887                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13888                                 && test -z "${cf_tst_cflags}" \
13889                                 && cf_fix_cppflags=yes
13890
13891                         if test $cf_fix_cppflags = yes ; then
13892                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13893                                 continue
13894                         elif test "${cf_tst_cflags}" = "\"'" ; then
13895                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13896                                 continue
13897                         fi
13898                         ;;
13899                 esac
13900                 case "$CPPFLAGS" in
13901                 (*$cf_add_cflags)
13902                         ;;
13903                 (*)
13904                         case $cf_add_cflags in
13905                         (-D*)
13906                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13907
13908 CPPFLAGS=`echo "$CPPFLAGS" | \
13909         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13910                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13911
13912                                 ;;
13913                         esac
13914                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13915                         ;;
13916                 esac
13917                 ;;
13918         (*)
13919                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13920                 ;;
13921         esac
13922         ;;
13923 (yes)
13924         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13925
13926         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13927
13928         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13929                 && test -z "${cf_tst_cflags}" \
13930                 && cf_fix_cppflags=no
13931         ;;
13932 esac
13933 done
13934
13935 if test -n "$cf_new_cflags" ; then
13936
13937         CFLAGS="$CFLAGS $cf_new_cflags"
13938 fi
13939
13940 if test -n "$cf_new_cppflags" ; then
13941
13942         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13943 fi
13944
13945 if test -n "$cf_new_extra_cppflags" ; then
13946
13947         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13948 fi
13949
13950                 ;;
13951         esac
13952         ;;
13953 esac
13954
13955 if test "$with_dbmalloc" = yes ; then
13956         echo "$as_me:13956: checking for dbmalloc.h" >&5
13957 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13958 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13959   echo $ECHO_N "(cached) $ECHO_C" >&6
13960 else
13961   cat >conftest.$ac_ext <<_ACEOF
13962 #line 13962 "configure"
13963 #include "confdefs.h"
13964 #include <dbmalloc.h>
13965 _ACEOF
13966 if { (eval echo "$as_me:13966: \"$ac_cpp conftest.$ac_ext\"") >&5
13967   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13968   ac_status=$?
13969   egrep -v '^ *\+' conftest.er1 >conftest.err
13970   rm -f conftest.er1
13971   cat conftest.err >&5
13972   echo "$as_me:13972: \$? = $ac_status" >&5
13973   (exit $ac_status); } >/dev/null; then
13974   if test -s conftest.err; then
13975     ac_cpp_err=$ac_c_preproc_warn_flag
13976   else
13977     ac_cpp_err=
13978   fi
13979 else
13980   ac_cpp_err=yes
13981 fi
13982 if test -z "$ac_cpp_err"; then
13983   ac_cv_header_dbmalloc_h=yes
13984 else
13985   echo "$as_me: failed program was:" >&5
13986   cat conftest.$ac_ext >&5
13987   ac_cv_header_dbmalloc_h=no
13988 fi
13989 rm -f conftest.err conftest.$ac_ext
13990 fi
13991 echo "$as_me:13991: result: $ac_cv_header_dbmalloc_h" >&5
13992 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13993 if test $ac_cv_header_dbmalloc_h = yes; then
13994
13995 echo "$as_me:13995: checking for debug_malloc in -ldbmalloc" >&5
13996 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13997 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13998   echo $ECHO_N "(cached) $ECHO_C" >&6
13999 else
14000   ac_check_lib_save_LIBS=$LIBS
14001 LIBS="-ldbmalloc  $LIBS"
14002 cat >conftest.$ac_ext <<_ACEOF
14003 #line 14003 "configure"
14004 #include "confdefs.h"
14005
14006 /* Override any gcc2 internal prototype to avoid an error.  */
14007 #ifdef __cplusplus
14008 extern "C"
14009 #endif
14010 /* We use char because int might match the return type of a gcc2
14011    builtin and then its argument prototype would still apply.  */
14012 char debug_malloc ();
14013 int
14014 main ()
14015 {
14016 debug_malloc ();
14017   ;
14018   return 0;
14019 }
14020 _ACEOF
14021 rm -f conftest.$ac_objext conftest$ac_exeext
14022 if { (eval echo "$as_me:14022: \"$ac_link\"") >&5
14023   (eval $ac_link) 2>&5
14024   ac_status=$?
14025   echo "$as_me:14025: \$? = $ac_status" >&5
14026   (exit $ac_status); } &&
14027          { ac_try='test -s conftest$ac_exeext'
14028   { (eval echo "$as_me:14028: \"$ac_try\"") >&5
14029   (eval $ac_try) 2>&5
14030   ac_status=$?
14031   echo "$as_me:14031: \$? = $ac_status" >&5
14032   (exit $ac_status); }; }; then
14033   ac_cv_lib_dbmalloc_debug_malloc=yes
14034 else
14035   echo "$as_me: failed program was:" >&5
14036 cat conftest.$ac_ext >&5
14037 ac_cv_lib_dbmalloc_debug_malloc=no
14038 fi
14039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14040 LIBS=$ac_check_lib_save_LIBS
14041 fi
14042 echo "$as_me:14042: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14043 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14044 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14045   cat >>confdefs.h <<EOF
14046 #define HAVE_LIBDBMALLOC 1
14047 EOF
14048
14049   LIBS="-ldbmalloc $LIBS"
14050
14051 fi
14052
14053 fi
14054
14055 fi
14056
14057 echo "$as_me:14057: checking if you want to use valgrind for testing" >&5
14058 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14059
14060 # Check whether --with-valgrind or --without-valgrind was given.
14061 if test "${with_valgrind+set}" = set; then
14062   withval="$with_valgrind"
14063
14064 cat >>confdefs.h <<EOF
14065 #define USE_VALGRIND 1
14066 EOF
14067
14068         : ${with_cflags:=-g}
14069         : ${with_no_leaks:=yes}
14070          with_valgrind=yes
14071 else
14072   with_valgrind=
14073 fi;
14074 echo "$as_me:14074: result: ${with_valgrind:-no}" >&5
14075 echo "${ECHO_T}${with_valgrind:-no}" >&6
14076
14077 case .$with_cflags in
14078 (.*-g*)
14079         case .$CFLAGS in
14080         (.*-g*)
14081                 ;;
14082         (*)
14083
14084 cf_fix_cppflags=no
14085 cf_new_cflags=
14086 cf_new_cppflags=
14087 cf_new_extra_cppflags=
14088
14089 for cf_add_cflags in -g
14090 do
14091 case $cf_fix_cppflags in
14092 (no)
14093         case $cf_add_cflags in
14094         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14095                 case $cf_add_cflags in
14096                 (-D*)
14097                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14098
14099                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14100                                 && test -z "${cf_tst_cflags}" \
14101                                 && cf_fix_cppflags=yes
14102
14103                         if test $cf_fix_cppflags = yes ; then
14104                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14105                                 continue
14106                         elif test "${cf_tst_cflags}" = "\"'" ; then
14107                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14108                                 continue
14109                         fi
14110                         ;;
14111                 esac
14112                 case "$CPPFLAGS" in
14113                 (*$cf_add_cflags)
14114                         ;;
14115                 (*)
14116                         case $cf_add_cflags in
14117                         (-D*)
14118                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14119
14120 CPPFLAGS=`echo "$CPPFLAGS" | \
14121         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14122                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14123
14124                                 ;;
14125                         esac
14126                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14127                         ;;
14128                 esac
14129                 ;;
14130         (*)
14131                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14132                 ;;
14133         esac
14134         ;;
14135 (yes)
14136         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14137
14138         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14139
14140         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14141                 && test -z "${cf_tst_cflags}" \
14142                 && cf_fix_cppflags=no
14143         ;;
14144 esac
14145 done
14146
14147 if test -n "$cf_new_cflags" ; then
14148
14149         CFLAGS="$CFLAGS $cf_new_cflags"
14150 fi
14151
14152 if test -n "$cf_new_cppflags" ; then
14153
14154         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14155 fi
14156
14157 if test -n "$cf_new_extra_cppflags" ; then
14158
14159         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14160 fi
14161
14162                 ;;
14163         esac
14164         ;;
14165 esac
14166
14167 echo "$as_me:14167: checking if you want to perform memory-leak testing" >&5
14168 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14169
14170 # Check whether --enable-leaks or --disable-leaks was given.
14171 if test "${enable_leaks+set}" = set; then
14172   enableval="$enable_leaks"
14173   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14174 else
14175   : ${with_no_leaks:=no}
14176 fi;
14177 echo "$as_me:14177: result: $with_no_leaks" >&5
14178 echo "${ECHO_T}$with_no_leaks" >&6
14179
14180 if test "$with_no_leaks" = yes ; then
14181
14182 cat >>confdefs.h <<\EOF
14183 #define NO_LEAKS 1
14184 EOF
14185
14186 cat >>confdefs.h <<\EOF
14187 #define YY_NO_LEAKS 1
14188 EOF
14189
14190 fi
14191
14192 cat >>confdefs.h <<\EOF
14193 #define HAVE_NC_ALLOC_H 1
14194 EOF
14195
14196 ###     use option --enable-expanded to generate certain macros as functions
14197
14198 # Check whether --enable-expanded or --disable-expanded was given.
14199 if test "${enable_expanded+set}" = set; then
14200   enableval="$enable_expanded"
14201   test "x$enableval" = xyes &&
14202 cat >>confdefs.h <<\EOF
14203 #define NCURSES_EXPANDED 1
14204 EOF
14205
14206 fi;
14207
14208 ###     use option --disable-macros to suppress macros in favor of functions
14209
14210 # Check whether --enable-macros or --disable-macros was given.
14211 if test "${enable_macros+set}" = set; then
14212   enableval="$enable_macros"
14213   test "$enableval" = no &&
14214 cat >>confdefs.h <<\EOF
14215 #define NCURSES_NOMACROS 1
14216 EOF
14217
14218 fi;
14219
14220 # Normally we only add trace() to the debug-library.  Allow this to be
14221 # extended to all models of the ncurses library:
14222 cf_all_traces=no
14223 case "$CFLAGS $CPPFLAGS" in
14224 (*-DTRACE*)
14225         cf_all_traces=yes
14226         ;;
14227 esac
14228
14229 echo "$as_me:14229: checking whether to add trace feature to all models" >&5
14230 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14231
14232 # Check whether --with-trace or --without-trace was given.
14233 if test "${with_trace+set}" = set; then
14234   withval="$with_trace"
14235   cf_with_trace=$withval
14236 else
14237   cf_with_trace=$cf_all_traces
14238 fi;
14239 echo "$as_me:14239: result: $cf_with_trace" >&5
14240 echo "${ECHO_T}$cf_with_trace" >&6
14241
14242 if test "x$cf_with_trace" = xyes ; then
14243         LIB_TRACING=all
14244         ADA_TRACE=TRUE
14245
14246 cf_fix_cppflags=no
14247 cf_new_cflags=
14248 cf_new_cppflags=
14249 cf_new_extra_cppflags=
14250
14251 for cf_add_cflags in -DTRACE
14252 do
14253 case $cf_fix_cppflags in
14254 (no)
14255         case $cf_add_cflags in
14256         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14257                 case $cf_add_cflags in
14258                 (-D*)
14259                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14260
14261                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14262                                 && test -z "${cf_tst_cflags}" \
14263                                 && cf_fix_cppflags=yes
14264
14265                         if test $cf_fix_cppflags = yes ; then
14266                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14267                                 continue
14268                         elif test "${cf_tst_cflags}" = "\"'" ; then
14269                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14270                                 continue
14271                         fi
14272                         ;;
14273                 esac
14274                 case "$CPPFLAGS" in
14275                 (*$cf_add_cflags)
14276                         ;;
14277                 (*)
14278                         case $cf_add_cflags in
14279                         (-D*)
14280                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14281
14282 CPPFLAGS=`echo "$CPPFLAGS" | \
14283         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14284                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14285
14286                                 ;;
14287                         esac
14288                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14289                         ;;
14290                 esac
14291                 ;;
14292         (*)
14293                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14294                 ;;
14295         esac
14296         ;;
14297 (yes)
14298         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14299
14300         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14301
14302         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14303                 && test -z "${cf_tst_cflags}" \
14304                 && cf_fix_cppflags=no
14305         ;;
14306 esac
14307 done
14308
14309 if test -n "$cf_new_cflags" ; then
14310
14311         CFLAGS="$CFLAGS $cf_new_cflags"
14312 fi
14313
14314 if test -n "$cf_new_cppflags" ; then
14315
14316         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14317 fi
14318
14319 if test -n "$cf_new_extra_cppflags" ; then
14320
14321         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14322 fi
14323
14324 else
14325         LIB_TRACING=DEBUG
14326         ADA_TRACE=FALSE
14327 fi
14328
14329 echo "$as_me:14329: checking if we want to use GNAT projects" >&5
14330 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14331
14332 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14333 if test "${enable_gnat_projects+set}" = set; then
14334   enableval="$enable_gnat_projects"
14335   test "$enableval" != no && enableval=yes
14336         if test "$enableval" != "yes" ; then
14337     enable_gnat_projects=no
14338         else
14339                 enable_gnat_projects=yes
14340         fi
14341 else
14342   enableval=yes
14343         enable_gnat_projects=yes
14344
14345 fi;
14346 echo "$as_me:14346: result: $enable_gnat_projects" >&5
14347 echo "${ECHO_T}$enable_gnat_projects" >&6
14348
14349 ###     Checks for libraries.
14350 case $cf_cv_system_name in
14351 (*mingw32*|*mingw64*)
14352         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14353         LIBS=" -lpsapi $LIBS"
14354         ;;
14355 (*)
14356 echo "$as_me:14356: checking for gettimeofday" >&5
14357 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14358 if test "${ac_cv_func_gettimeofday+set}" = set; then
14359   echo $ECHO_N "(cached) $ECHO_C" >&6
14360 else
14361   cat >conftest.$ac_ext <<_ACEOF
14362 #line 14362 "configure"
14363 #include "confdefs.h"
14364 /* System header to define __stub macros and hopefully few prototypes,
14365     which can conflict with char gettimeofday (); below.  */
14366 #include <assert.h>
14367 /* Override any gcc2 internal prototype to avoid an error.  */
14368 #ifdef __cplusplus
14369 extern "C"
14370 #endif
14371 /* We use char because int might match the return type of a gcc2
14372    builtin and then its argument prototype would still apply.  */
14373 char gettimeofday ();
14374 char (*f) ();
14375
14376 int
14377 main ()
14378 {
14379 /* The GNU C library defines this for functions which it implements
14380     to always fail with ENOSYS.  Some functions are actually named
14381     something starting with __ and the normal name is an alias.  */
14382 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14383 choke me
14384 #else
14385 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14386 #endif
14387
14388   ;
14389   return 0;
14390 }
14391 _ACEOF
14392 rm -f conftest.$ac_objext conftest$ac_exeext
14393 if { (eval echo "$as_me:14393: \"$ac_link\"") >&5
14394   (eval $ac_link) 2>&5
14395   ac_status=$?
14396   echo "$as_me:14396: \$? = $ac_status" >&5
14397   (exit $ac_status); } &&
14398          { ac_try='test -s conftest$ac_exeext'
14399   { (eval echo "$as_me:14399: \"$ac_try\"") >&5
14400   (eval $ac_try) 2>&5
14401   ac_status=$?
14402   echo "$as_me:14402: \$? = $ac_status" >&5
14403   (exit $ac_status); }; }; then
14404   ac_cv_func_gettimeofday=yes
14405 else
14406   echo "$as_me: failed program was:" >&5
14407 cat conftest.$ac_ext >&5
14408 ac_cv_func_gettimeofday=no
14409 fi
14410 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14411 fi
14412 echo "$as_me:14412: result: $ac_cv_func_gettimeofday" >&5
14413 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14414 if test $ac_cv_func_gettimeofday = yes; then
14415
14416 cat >>confdefs.h <<\EOF
14417 #define HAVE_GETTIMEOFDAY 1
14418 EOF
14419
14420 else
14421
14422 echo "$as_me:14422: checking for gettimeofday in -lbsd" >&5
14423 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14424 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14425   echo $ECHO_N "(cached) $ECHO_C" >&6
14426 else
14427   ac_check_lib_save_LIBS=$LIBS
14428 LIBS="-lbsd  $LIBS"
14429 cat >conftest.$ac_ext <<_ACEOF
14430 #line 14430 "configure"
14431 #include "confdefs.h"
14432
14433 /* Override any gcc2 internal prototype to avoid an error.  */
14434 #ifdef __cplusplus
14435 extern "C"
14436 #endif
14437 /* We use char because int might match the return type of a gcc2
14438    builtin and then its argument prototype would still apply.  */
14439 char gettimeofday ();
14440 int
14441 main ()
14442 {
14443 gettimeofday ();
14444   ;
14445   return 0;
14446 }
14447 _ACEOF
14448 rm -f conftest.$ac_objext conftest$ac_exeext
14449 if { (eval echo "$as_me:14449: \"$ac_link\"") >&5
14450   (eval $ac_link) 2>&5
14451   ac_status=$?
14452   echo "$as_me:14452: \$? = $ac_status" >&5
14453   (exit $ac_status); } &&
14454          { ac_try='test -s conftest$ac_exeext'
14455   { (eval echo "$as_me:14455: \"$ac_try\"") >&5
14456   (eval $ac_try) 2>&5
14457   ac_status=$?
14458   echo "$as_me:14458: \$? = $ac_status" >&5
14459   (exit $ac_status); }; }; then
14460   ac_cv_lib_bsd_gettimeofday=yes
14461 else
14462   echo "$as_me: failed program was:" >&5
14463 cat conftest.$ac_ext >&5
14464 ac_cv_lib_bsd_gettimeofday=no
14465 fi
14466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14467 LIBS=$ac_check_lib_save_LIBS
14468 fi
14469 echo "$as_me:14469: result: $ac_cv_lib_bsd_gettimeofday" >&5
14470 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14471 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14472
14473 cat >>confdefs.h <<\EOF
14474 #define HAVE_GETTIMEOFDAY 1
14475 EOF
14476
14477 cf_add_libs="-lbsd"
14478 # Filter out duplicates - this happens with badly-designed ".pc" files...
14479 for cf_add_1lib in $LIBS
14480 do
14481         for cf_add_2lib in $cf_add_libs
14482         do
14483                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14484                 then
14485                         cf_add_1lib=
14486                         break
14487                 fi
14488         done
14489         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14490 done
14491 LIBS="$cf_add_libs"
14492
14493 fi
14494
14495 fi
14496         ;;
14497 esac
14498
14499 echo "$as_me:14499: checking if -lm needed for math functions" >&5
14500 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14501 if test "${cf_cv_need_libm+set}" = set; then
14502   echo $ECHO_N "(cached) $ECHO_C" >&6
14503 else
14504
14505         cat >conftest.$ac_ext <<_ACEOF
14506 #line 14506 "configure"
14507 #include "confdefs.h"
14508
14509         #include <stdio.h>
14510         #include <math.h>
14511
14512 int
14513 main ()
14514 {
14515 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14516   ;
14517   return 0;
14518 }
14519 _ACEOF
14520 rm -f conftest.$ac_objext conftest$ac_exeext
14521 if { (eval echo "$as_me:14521: \"$ac_link\"") >&5
14522   (eval $ac_link) 2>&5
14523   ac_status=$?
14524   echo "$as_me:14524: \$? = $ac_status" >&5
14525   (exit $ac_status); } &&
14526          { ac_try='test -s conftest$ac_exeext'
14527   { (eval echo "$as_me:14527: \"$ac_try\"") >&5
14528   (eval $ac_try) 2>&5
14529   ac_status=$?
14530   echo "$as_me:14530: \$? = $ac_status" >&5
14531   (exit $ac_status); }; }; then
14532   cf_cv_need_libm=no
14533 else
14534   echo "$as_me: failed program was:" >&5
14535 cat conftest.$ac_ext >&5
14536 cf_cv_need_libm=yes
14537 fi
14538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14539 fi
14540 echo "$as_me:14540: result: $cf_cv_need_libm" >&5
14541 echo "${ECHO_T}$cf_cv_need_libm" >&6
14542 if test "$cf_cv_need_libm" = yes
14543 then
14544 MATH_LIB=-lm
14545 fi
14546
14547 ###     Checks for header files.
14548 echo "$as_me:14548: checking for ANSI C header files" >&5
14549 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14550 if test "${ac_cv_header_stdc+set}" = set; then
14551   echo $ECHO_N "(cached) $ECHO_C" >&6
14552 else
14553   cat >conftest.$ac_ext <<_ACEOF
14554 #line 14554 "configure"
14555 #include "confdefs.h"
14556 #include <stdlib.h>
14557 #include <stdarg.h>
14558 #include <string.h>
14559 #include <float.h>
14560
14561 _ACEOF
14562 if { (eval echo "$as_me:14562: \"$ac_cpp conftest.$ac_ext\"") >&5
14563   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14564   ac_status=$?
14565   egrep -v '^ *\+' conftest.er1 >conftest.err
14566   rm -f conftest.er1
14567   cat conftest.err >&5
14568   echo "$as_me:14568: \$? = $ac_status" >&5
14569   (exit $ac_status); } >/dev/null; then
14570   if test -s conftest.err; then
14571     ac_cpp_err=$ac_c_preproc_warn_flag
14572   else
14573     ac_cpp_err=
14574   fi
14575 else
14576   ac_cpp_err=yes
14577 fi
14578 if test -z "$ac_cpp_err"; then
14579   ac_cv_header_stdc=yes
14580 else
14581   echo "$as_me: failed program was:" >&5
14582   cat conftest.$ac_ext >&5
14583   ac_cv_header_stdc=no
14584 fi
14585 rm -f conftest.err conftest.$ac_ext
14586
14587 if test $ac_cv_header_stdc = yes; then
14588   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14589   cat >conftest.$ac_ext <<_ACEOF
14590 #line 14590 "configure"
14591 #include "confdefs.h"
14592 #include <string.h>
14593
14594 _ACEOF
14595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14596   egrep "memchr" >/dev/null 2>&1; then
14597   :
14598 else
14599   ac_cv_header_stdc=no
14600 fi
14601 rm -rf conftest*
14602
14603 fi
14604
14605 if test $ac_cv_header_stdc = yes; then
14606   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14607   cat >conftest.$ac_ext <<_ACEOF
14608 #line 14608 "configure"
14609 #include "confdefs.h"
14610 #include <stdlib.h>
14611
14612 _ACEOF
14613 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14614   egrep "free" >/dev/null 2>&1; then
14615   :
14616 else
14617   ac_cv_header_stdc=no
14618 fi
14619 rm -rf conftest*
14620
14621 fi
14622
14623 if test $ac_cv_header_stdc = yes; then
14624   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14625   if test "$cross_compiling" = yes; then
14626   :
14627 else
14628   cat >conftest.$ac_ext <<_ACEOF
14629 #line 14629 "configure"
14630 #include "confdefs.h"
14631 #include <ctype.h>
14632 #if ((' ' & 0x0FF) == 0x020)
14633 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14634 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14635 #else
14636 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14637                      || ('j' <= (c) && (c) <= 'r') \
14638                      || ('s' <= (c) && (c) <= 'z'))
14639 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14640 #endif
14641
14642 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14643 int
14644 main ()
14645 {
14646   int i;
14647   for (i = 0; i < 256; i++)
14648     if (XOR (islower (i), ISLOWER (i))
14649         || toupper (i) != TOUPPER (i))
14650       $ac_main_return(2);
14651   $ac_main_return (0);
14652 }
14653 _ACEOF
14654 rm -f conftest$ac_exeext
14655 if { (eval echo "$as_me:14655: \"$ac_link\"") >&5
14656   (eval $ac_link) 2>&5
14657   ac_status=$?
14658   echo "$as_me:14658: \$? = $ac_status" >&5
14659   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14660   { (eval echo "$as_me:14660: \"$ac_try\"") >&5
14661   (eval $ac_try) 2>&5
14662   ac_status=$?
14663   echo "$as_me:14663: \$? = $ac_status" >&5
14664   (exit $ac_status); }; }; then
14665   :
14666 else
14667   echo "$as_me: program exited with status $ac_status" >&5
14668 echo "$as_me: failed program was:" >&5
14669 cat conftest.$ac_ext >&5
14670 ac_cv_header_stdc=no
14671 fi
14672 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14673 fi
14674 fi
14675 fi
14676 echo "$as_me:14676: result: $ac_cv_header_stdc" >&5
14677 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14678 if test $ac_cv_header_stdc = yes; then
14679
14680 cat >>confdefs.h <<\EOF
14681 #define STDC_HEADERS 1
14682 EOF
14683
14684 fi
14685
14686 ac_header_dirent=no
14687 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14688   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14689 echo "$as_me:14689: checking for $ac_hdr that defines DIR" >&5
14690 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14691 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14692   echo $ECHO_N "(cached) $ECHO_C" >&6
14693 else
14694   cat >conftest.$ac_ext <<_ACEOF
14695 #line 14695 "configure"
14696 #include "confdefs.h"
14697 #include <sys/types.h>
14698 #include <$ac_hdr>
14699
14700 int
14701 main ()
14702 {
14703 if ((DIR *) 0)
14704 return 0;
14705   ;
14706   return 0;
14707 }
14708 _ACEOF
14709 rm -f conftest.$ac_objext
14710 if { (eval echo "$as_me:14710: \"$ac_compile\"") >&5
14711   (eval $ac_compile) 2>&5
14712   ac_status=$?
14713   echo "$as_me:14713: \$? = $ac_status" >&5
14714   (exit $ac_status); } &&
14715          { ac_try='test -s conftest.$ac_objext'
14716   { (eval echo "$as_me:14716: \"$ac_try\"") >&5
14717   (eval $ac_try) 2>&5
14718   ac_status=$?
14719   echo "$as_me:14719: \$? = $ac_status" >&5
14720   (exit $ac_status); }; }; then
14721   eval "$as_ac_Header=yes"
14722 else
14723   echo "$as_me: failed program was:" >&5
14724 cat conftest.$ac_ext >&5
14725 eval "$as_ac_Header=no"
14726 fi
14727 rm -f conftest.$ac_objext conftest.$ac_ext
14728 fi
14729 echo "$as_me:14729: result: `eval echo '${'$as_ac_Header'}'`" >&5
14730 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14731 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14732   cat >>confdefs.h <<EOF
14733 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14734 EOF
14735
14736 ac_header_dirent=$ac_hdr; break
14737 fi
14738
14739 done
14740 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14741 if test $ac_header_dirent = dirent.h; then
14742   echo "$as_me:14742: checking for opendir in -ldir" >&5
14743 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14744 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14745   echo $ECHO_N "(cached) $ECHO_C" >&6
14746 else
14747   ac_check_lib_save_LIBS=$LIBS
14748 LIBS="-ldir  $LIBS"
14749 cat >conftest.$ac_ext <<_ACEOF
14750 #line 14750 "configure"
14751 #include "confdefs.h"
14752
14753 /* Override any gcc2 internal prototype to avoid an error.  */
14754 #ifdef __cplusplus
14755 extern "C"
14756 #endif
14757 /* We use char because int might match the return type of a gcc2
14758    builtin and then its argument prototype would still apply.  */
14759 char opendir ();
14760 int
14761 main ()
14762 {
14763 opendir ();
14764   ;
14765   return 0;
14766 }
14767 _ACEOF
14768 rm -f conftest.$ac_objext conftest$ac_exeext
14769 if { (eval echo "$as_me:14769: \"$ac_link\"") >&5
14770   (eval $ac_link) 2>&5
14771   ac_status=$?
14772   echo "$as_me:14772: \$? = $ac_status" >&5
14773   (exit $ac_status); } &&
14774          { ac_try='test -s conftest$ac_exeext'
14775   { (eval echo "$as_me:14775: \"$ac_try\"") >&5
14776   (eval $ac_try) 2>&5
14777   ac_status=$?
14778   echo "$as_me:14778: \$? = $ac_status" >&5
14779   (exit $ac_status); }; }; then
14780   ac_cv_lib_dir_opendir=yes
14781 else
14782   echo "$as_me: failed program was:" >&5
14783 cat conftest.$ac_ext >&5
14784 ac_cv_lib_dir_opendir=no
14785 fi
14786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14787 LIBS=$ac_check_lib_save_LIBS
14788 fi
14789 echo "$as_me:14789: result: $ac_cv_lib_dir_opendir" >&5
14790 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14791 if test $ac_cv_lib_dir_opendir = yes; then
14792   LIBS="$LIBS -ldir"
14793 fi
14794
14795 else
14796   echo "$as_me:14796: checking for opendir in -lx" >&5
14797 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14798 if test "${ac_cv_lib_x_opendir+set}" = set; then
14799   echo $ECHO_N "(cached) $ECHO_C" >&6
14800 else
14801   ac_check_lib_save_LIBS=$LIBS
14802 LIBS="-lx  $LIBS"
14803 cat >conftest.$ac_ext <<_ACEOF
14804 #line 14804 "configure"
14805 #include "confdefs.h"
14806
14807 /* Override any gcc2 internal prototype to avoid an error.  */
14808 #ifdef __cplusplus
14809 extern "C"
14810 #endif
14811 /* We use char because int might match the return type of a gcc2
14812    builtin and then its argument prototype would still apply.  */
14813 char opendir ();
14814 int
14815 main ()
14816 {
14817 opendir ();
14818   ;
14819   return 0;
14820 }
14821 _ACEOF
14822 rm -f conftest.$ac_objext conftest$ac_exeext
14823 if { (eval echo "$as_me:14823: \"$ac_link\"") >&5
14824   (eval $ac_link) 2>&5
14825   ac_status=$?
14826   echo "$as_me:14826: \$? = $ac_status" >&5
14827   (exit $ac_status); } &&
14828          { ac_try='test -s conftest$ac_exeext'
14829   { (eval echo "$as_me:14829: \"$ac_try\"") >&5
14830   (eval $ac_try) 2>&5
14831   ac_status=$?
14832   echo "$as_me:14832: \$? = $ac_status" >&5
14833   (exit $ac_status); }; }; then
14834   ac_cv_lib_x_opendir=yes
14835 else
14836   echo "$as_me: failed program was:" >&5
14837 cat conftest.$ac_ext >&5
14838 ac_cv_lib_x_opendir=no
14839 fi
14840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14841 LIBS=$ac_check_lib_save_LIBS
14842 fi
14843 echo "$as_me:14843: result: $ac_cv_lib_x_opendir" >&5
14844 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14845 if test $ac_cv_lib_x_opendir = yes; then
14846   LIBS="$LIBS -lx"
14847 fi
14848
14849 fi
14850
14851 echo "$as_me:14851: checking whether time.h and sys/time.h may both be included" >&5
14852 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14853 if test "${ac_cv_header_time+set}" = set; then
14854   echo $ECHO_N "(cached) $ECHO_C" >&6
14855 else
14856   cat >conftest.$ac_ext <<_ACEOF
14857 #line 14857 "configure"
14858 #include "confdefs.h"
14859 #include <sys/types.h>
14860 #include <sys/time.h>
14861 #include <time.h>
14862
14863 int
14864 main ()
14865 {
14866 if ((struct tm *) 0)
14867 return 0;
14868   ;
14869   return 0;
14870 }
14871 _ACEOF
14872 rm -f conftest.$ac_objext
14873 if { (eval echo "$as_me:14873: \"$ac_compile\"") >&5
14874   (eval $ac_compile) 2>&5
14875   ac_status=$?
14876   echo "$as_me:14876: \$? = $ac_status" >&5
14877   (exit $ac_status); } &&
14878          { ac_try='test -s conftest.$ac_objext'
14879   { (eval echo "$as_me:14879: \"$ac_try\"") >&5
14880   (eval $ac_try) 2>&5
14881   ac_status=$?
14882   echo "$as_me:14882: \$? = $ac_status" >&5
14883   (exit $ac_status); }; }; then
14884   ac_cv_header_time=yes
14885 else
14886   echo "$as_me: failed program was:" >&5
14887 cat conftest.$ac_ext >&5
14888 ac_cv_header_time=no
14889 fi
14890 rm -f conftest.$ac_objext conftest.$ac_ext
14891 fi
14892 echo "$as_me:14892: result: $ac_cv_header_time" >&5
14893 echo "${ECHO_T}$ac_cv_header_time" >&6
14894 if test $ac_cv_header_time = yes; then
14895
14896 cat >>confdefs.h <<\EOF
14897 #define TIME_WITH_SYS_TIME 1
14898 EOF
14899
14900 fi
14901
14902 cf_regex_func=no
14903
14904 cf_regex_libs="regex re"
14905 case $host_os in
14906 (mingw*)
14907         cf_regex_libs="gnurx $cf_regex_libs"
14908         ;;
14909 esac
14910
14911 echo "$as_me:14911: checking for regcomp" >&5
14912 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14913 if test "${ac_cv_func_regcomp+set}" = set; then
14914   echo $ECHO_N "(cached) $ECHO_C" >&6
14915 else
14916   cat >conftest.$ac_ext <<_ACEOF
14917 #line 14917 "configure"
14918 #include "confdefs.h"
14919 /* System header to define __stub macros and hopefully few prototypes,
14920     which can conflict with char regcomp (); below.  */
14921 #include <assert.h>
14922 /* Override any gcc2 internal prototype to avoid an error.  */
14923 #ifdef __cplusplus
14924 extern "C"
14925 #endif
14926 /* We use char because int might match the return type of a gcc2
14927    builtin and then its argument prototype would still apply.  */
14928 char regcomp ();
14929 char (*f) ();
14930
14931 int
14932 main ()
14933 {
14934 /* The GNU C library defines this for functions which it implements
14935     to always fail with ENOSYS.  Some functions are actually named
14936     something starting with __ and the normal name is an alias.  */
14937 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14938 choke me
14939 #else
14940 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14941 #endif
14942
14943   ;
14944   return 0;
14945 }
14946 _ACEOF
14947 rm -f conftest.$ac_objext conftest$ac_exeext
14948 if { (eval echo "$as_me:14948: \"$ac_link\"") >&5
14949   (eval $ac_link) 2>&5
14950   ac_status=$?
14951   echo "$as_me:14951: \$? = $ac_status" >&5
14952   (exit $ac_status); } &&
14953          { ac_try='test -s conftest$ac_exeext'
14954   { (eval echo "$as_me:14954: \"$ac_try\"") >&5
14955   (eval $ac_try) 2>&5
14956   ac_status=$?
14957   echo "$as_me:14957: \$? = $ac_status" >&5
14958   (exit $ac_status); }; }; then
14959   ac_cv_func_regcomp=yes
14960 else
14961   echo "$as_me: failed program was:" >&5
14962 cat conftest.$ac_ext >&5
14963 ac_cv_func_regcomp=no
14964 fi
14965 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14966 fi
14967 echo "$as_me:14967: result: $ac_cv_func_regcomp" >&5
14968 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14969 if test $ac_cv_func_regcomp = yes; then
14970   cf_regex_func=regcomp
14971 else
14972
14973         for cf_regex_lib in $cf_regex_libs
14974         do
14975                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14976 echo "$as_me:14976: checking for regcomp in -l$cf_regex_lib" >&5
14977 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14978 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14979   echo $ECHO_N "(cached) $ECHO_C" >&6
14980 else
14981   ac_check_lib_save_LIBS=$LIBS
14982 LIBS="-l$cf_regex_lib  $LIBS"
14983 cat >conftest.$ac_ext <<_ACEOF
14984 #line 14984 "configure"
14985 #include "confdefs.h"
14986
14987 /* Override any gcc2 internal prototype to avoid an error.  */
14988 #ifdef __cplusplus
14989 extern "C"
14990 #endif
14991 /* We use char because int might match the return type of a gcc2
14992    builtin and then its argument prototype would still apply.  */
14993 char regcomp ();
14994 int
14995 main ()
14996 {
14997 regcomp ();
14998   ;
14999   return 0;
15000 }
15001 _ACEOF
15002 rm -f conftest.$ac_objext conftest$ac_exeext
15003 if { (eval echo "$as_me:15003: \"$ac_link\"") >&5
15004   (eval $ac_link) 2>&5
15005   ac_status=$?
15006   echo "$as_me:15006: \$? = $ac_status" >&5
15007   (exit $ac_status); } &&
15008          { ac_try='test -s conftest$ac_exeext'
15009   { (eval echo "$as_me:15009: \"$ac_try\"") >&5
15010   (eval $ac_try) 2>&5
15011   ac_status=$?
15012   echo "$as_me:15012: \$? = $ac_status" >&5
15013   (exit $ac_status); }; }; then
15014   eval "$as_ac_Lib=yes"
15015 else
15016   echo "$as_me: failed program was:" >&5
15017 cat conftest.$ac_ext >&5
15018 eval "$as_ac_Lib=no"
15019 fi
15020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15021 LIBS=$ac_check_lib_save_LIBS
15022 fi
15023 echo "$as_me:15023: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15024 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15025 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15026
15027 cf_add_libs="-l$cf_regex_lib"
15028 # Filter out duplicates - this happens with badly-designed ".pc" files...
15029 for cf_add_1lib in $LIBS
15030 do
15031         for cf_add_2lib in $cf_add_libs
15032         do
15033                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15034                 then
15035                         cf_add_1lib=
15036                         break
15037                 fi
15038         done
15039         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15040 done
15041 LIBS="$cf_add_libs"
15042
15043                                 cf_regex_func=regcomp
15044                                 break
15045 fi
15046
15047         done
15048
15049 fi
15050
15051 if test "$cf_regex_func" = no ; then
15052         echo "$as_me:15052: checking for compile" >&5
15053 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15054 if test "${ac_cv_func_compile+set}" = set; then
15055   echo $ECHO_N "(cached) $ECHO_C" >&6
15056 else
15057   cat >conftest.$ac_ext <<_ACEOF
15058 #line 15058 "configure"
15059 #include "confdefs.h"
15060 /* System header to define __stub macros and hopefully few prototypes,
15061     which can conflict with char compile (); below.  */
15062 #include <assert.h>
15063 /* Override any gcc2 internal prototype to avoid an error.  */
15064 #ifdef __cplusplus
15065 extern "C"
15066 #endif
15067 /* We use char because int might match the return type of a gcc2
15068    builtin and then its argument prototype would still apply.  */
15069 char compile ();
15070 char (*f) ();
15071
15072 int
15073 main ()
15074 {
15075 /* The GNU C library defines this for functions which it implements
15076     to always fail with ENOSYS.  Some functions are actually named
15077     something starting with __ and the normal name is an alias.  */
15078 #if defined (__stub_compile) || defined (__stub___compile)
15079 choke me
15080 #else
15081 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15082 #endif
15083
15084   ;
15085   return 0;
15086 }
15087 _ACEOF
15088 rm -f conftest.$ac_objext conftest$ac_exeext
15089 if { (eval echo "$as_me:15089: \"$ac_link\"") >&5
15090   (eval $ac_link) 2>&5
15091   ac_status=$?
15092   echo "$as_me:15092: \$? = $ac_status" >&5
15093   (exit $ac_status); } &&
15094          { ac_try='test -s conftest$ac_exeext'
15095   { (eval echo "$as_me:15095: \"$ac_try\"") >&5
15096   (eval $ac_try) 2>&5
15097   ac_status=$?
15098   echo "$as_me:15098: \$? = $ac_status" >&5
15099   (exit $ac_status); }; }; then
15100   ac_cv_func_compile=yes
15101 else
15102   echo "$as_me: failed program was:" >&5
15103 cat conftest.$ac_ext >&5
15104 ac_cv_func_compile=no
15105 fi
15106 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15107 fi
15108 echo "$as_me:15108: result: $ac_cv_func_compile" >&5
15109 echo "${ECHO_T}$ac_cv_func_compile" >&6
15110 if test $ac_cv_func_compile = yes; then
15111   cf_regex_func=compile
15112 else
15113
15114                 echo "$as_me:15114: checking for compile in -lgen" >&5
15115 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15116 if test "${ac_cv_lib_gen_compile+set}" = set; then
15117   echo $ECHO_N "(cached) $ECHO_C" >&6
15118 else
15119   ac_check_lib_save_LIBS=$LIBS
15120 LIBS="-lgen  $LIBS"
15121 cat >conftest.$ac_ext <<_ACEOF
15122 #line 15122 "configure"
15123 #include "confdefs.h"
15124
15125 /* Override any gcc2 internal prototype to avoid an error.  */
15126 #ifdef __cplusplus
15127 extern "C"
15128 #endif
15129 /* We use char because int might match the return type of a gcc2
15130    builtin and then its argument prototype would still apply.  */
15131 char compile ();
15132 int
15133 main ()
15134 {
15135 compile ();
15136   ;
15137   return 0;
15138 }
15139 _ACEOF
15140 rm -f conftest.$ac_objext conftest$ac_exeext
15141 if { (eval echo "$as_me:15141: \"$ac_link\"") >&5
15142   (eval $ac_link) 2>&5
15143   ac_status=$?
15144   echo "$as_me:15144: \$? = $ac_status" >&5
15145   (exit $ac_status); } &&
15146          { ac_try='test -s conftest$ac_exeext'
15147   { (eval echo "$as_me:15147: \"$ac_try\"") >&5
15148   (eval $ac_try) 2>&5
15149   ac_status=$?
15150   echo "$as_me:15150: \$? = $ac_status" >&5
15151   (exit $ac_status); }; }; then
15152   ac_cv_lib_gen_compile=yes
15153 else
15154   echo "$as_me: failed program was:" >&5
15155 cat conftest.$ac_ext >&5
15156 ac_cv_lib_gen_compile=no
15157 fi
15158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15159 LIBS=$ac_check_lib_save_LIBS
15160 fi
15161 echo "$as_me:15161: result: $ac_cv_lib_gen_compile" >&5
15162 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15163 if test $ac_cv_lib_gen_compile = yes; then
15164
15165 cf_add_libs="-lgen"
15166 # Filter out duplicates - this happens with badly-designed ".pc" files...
15167 for cf_add_1lib in $LIBS
15168 do
15169         for cf_add_2lib in $cf_add_libs
15170         do
15171                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15172                 then
15173                         cf_add_1lib=
15174                         break
15175                 fi
15176         done
15177         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15178 done
15179 LIBS="$cf_add_libs"
15180
15181                                 cf_regex_func=compile
15182 fi
15183
15184 fi
15185
15186 fi
15187
15188 if test "$cf_regex_func" = no ; then
15189         { echo "$as_me:15189: WARNING: cannot find regular expression library" >&5
15190 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15191 fi
15192
15193 echo "$as_me:15193: checking for regular-expression headers" >&5
15194 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15195 if test "${cf_cv_regex_hdrs+set}" = set; then
15196   echo $ECHO_N "(cached) $ECHO_C" >&6
15197 else
15198
15199 cf_cv_regex_hdrs=no
15200 case $cf_regex_func in
15201 (compile)
15202         for cf_regex_hdr in regexp.h regexpr.h
15203         do
15204                 cat >conftest.$ac_ext <<_ACEOF
15205 #line 15205 "configure"
15206 #include "confdefs.h"
15207 #include <$cf_regex_hdr>
15208 int
15209 main ()
15210 {
15211
15212                         char *p = compile("", "", "", 0);
15213                         int x = step("", "");
15214
15215   ;
15216   return 0;
15217 }
15218 _ACEOF
15219 rm -f conftest.$ac_objext conftest$ac_exeext
15220 if { (eval echo "$as_me:15220: \"$ac_link\"") >&5
15221   (eval $ac_link) 2>&5
15222   ac_status=$?
15223   echo "$as_me:15223: \$? = $ac_status" >&5
15224   (exit $ac_status); } &&
15225          { ac_try='test -s conftest$ac_exeext'
15226   { (eval echo "$as_me:15226: \"$ac_try\"") >&5
15227   (eval $ac_try) 2>&5
15228   ac_status=$?
15229   echo "$as_me:15229: \$? = $ac_status" >&5
15230   (exit $ac_status); }; }; then
15231
15232                         cf_cv_regex_hdrs=$cf_regex_hdr
15233                         break
15234
15235 else
15236   echo "$as_me: failed program was:" >&5
15237 cat conftest.$ac_ext >&5
15238 fi
15239 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15240         done
15241         ;;
15242 (*)
15243         for cf_regex_hdr in regex.h
15244         do
15245                 cat >conftest.$ac_ext <<_ACEOF
15246 #line 15246 "configure"
15247 #include "confdefs.h"
15248 #include <sys/types.h>
15249 #include <$cf_regex_hdr>
15250 int
15251 main ()
15252 {
15253
15254                         regex_t *p;
15255                         int x = regcomp(p, "", 0);
15256                         int y = regexec(p, "", 0, 0, 0);
15257                         regfree(p);
15258
15259   ;
15260   return 0;
15261 }
15262 _ACEOF
15263 rm -f conftest.$ac_objext conftest$ac_exeext
15264 if { (eval echo "$as_me:15264: \"$ac_link\"") >&5
15265   (eval $ac_link) 2>&5
15266   ac_status=$?
15267   echo "$as_me:15267: \$? = $ac_status" >&5
15268   (exit $ac_status); } &&
15269          { ac_try='test -s conftest$ac_exeext'
15270   { (eval echo "$as_me:15270: \"$ac_try\"") >&5
15271   (eval $ac_try) 2>&5
15272   ac_status=$?
15273   echo "$as_me:15273: \$? = $ac_status" >&5
15274   (exit $ac_status); }; }; then
15275
15276                         cf_cv_regex_hdrs=$cf_regex_hdr
15277                         break
15278
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_exeext conftest.$ac_ext
15284         done
15285         ;;
15286 esac
15287
15288 fi
15289 echo "$as_me:15289: result: $cf_cv_regex_hdrs" >&5
15290 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15291
15292 case $cf_cv_regex_hdrs in
15293         (no)            { echo "$as_me:15293: WARNING: no regular expression header found" >&5
15294 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15295         (regex.h)
15296 cat >>confdefs.h <<\EOF
15297 #define HAVE_REGEX_H_FUNCS 1
15298 EOF
15299  ;;
15300         (regexp.h)
15301 cat >>confdefs.h <<\EOF
15302 #define HAVE_REGEXP_H_FUNCS 1
15303 EOF
15304  ;;
15305         (regexpr.h)
15306 cat >>confdefs.h <<\EOF
15307 #define HAVE_REGEXPR_H_FUNCS 1
15308 EOF
15309  ;;
15310 esac
15311
15312 for ac_header in \
15313 fcntl.h \
15314 getopt.h \
15315 limits.h \
15316 locale.h \
15317 math.h \
15318 poll.h \
15319 sys/bsdtypes.h \
15320 sys/ioctl.h \
15321 sys/param.h \
15322 sys/poll.h \
15323 sys/select.h \
15324 sys/time.h \
15325 sys/times.h \
15326 ttyent.h \
15327 unistd.h \
15328 wctype.h \
15329
15330 do
15331 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15332 echo "$as_me:15332: checking for $ac_header" >&5
15333 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15334 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15335   echo $ECHO_N "(cached) $ECHO_C" >&6
15336 else
15337   cat >conftest.$ac_ext <<_ACEOF
15338 #line 15338 "configure"
15339 #include "confdefs.h"
15340 #include <$ac_header>
15341 _ACEOF
15342 if { (eval echo "$as_me:15342: \"$ac_cpp conftest.$ac_ext\"") >&5
15343   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15344   ac_status=$?
15345   egrep -v '^ *\+' conftest.er1 >conftest.err
15346   rm -f conftest.er1
15347   cat conftest.err >&5
15348   echo "$as_me:15348: \$? = $ac_status" >&5
15349   (exit $ac_status); } >/dev/null; then
15350   if test -s conftest.err; then
15351     ac_cpp_err=$ac_c_preproc_warn_flag
15352   else
15353     ac_cpp_err=
15354   fi
15355 else
15356   ac_cpp_err=yes
15357 fi
15358 if test -z "$ac_cpp_err"; then
15359   eval "$as_ac_Header=yes"
15360 else
15361   echo "$as_me: failed program was:" >&5
15362   cat conftest.$ac_ext >&5
15363   eval "$as_ac_Header=no"
15364 fi
15365 rm -f conftest.err conftest.$ac_ext
15366 fi
15367 echo "$as_me:15367: result: `eval echo '${'$as_ac_Header'}'`" >&5
15368 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15369 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15370   cat >>confdefs.h <<EOF
15371 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15372 EOF
15373
15374 fi
15375 done
15376
15377 for ac_header in unistd.h getopt.h
15378 do
15379 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15380 echo "$as_me:15380: checking for $ac_header" >&5
15381 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15382 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15383   echo $ECHO_N "(cached) $ECHO_C" >&6
15384 else
15385   cat >conftest.$ac_ext <<_ACEOF
15386 #line 15386 "configure"
15387 #include "confdefs.h"
15388 #include <$ac_header>
15389 _ACEOF
15390 if { (eval echo "$as_me:15390: \"$ac_cpp conftest.$ac_ext\"") >&5
15391   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15392   ac_status=$?
15393   egrep -v '^ *\+' conftest.er1 >conftest.err
15394   rm -f conftest.er1
15395   cat conftest.err >&5
15396   echo "$as_me:15396: \$? = $ac_status" >&5
15397   (exit $ac_status); } >/dev/null; then
15398   if test -s conftest.err; then
15399     ac_cpp_err=$ac_c_preproc_warn_flag
15400   else
15401     ac_cpp_err=
15402   fi
15403 else
15404   ac_cpp_err=yes
15405 fi
15406 if test -z "$ac_cpp_err"; then
15407   eval "$as_ac_Header=yes"
15408 else
15409   echo "$as_me: failed program was:" >&5
15410   cat conftest.$ac_ext >&5
15411   eval "$as_ac_Header=no"
15412 fi
15413 rm -f conftest.err conftest.$ac_ext
15414 fi
15415 echo "$as_me:15415: result: `eval echo '${'$as_ac_Header'}'`" >&5
15416 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15417 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15418   cat >>confdefs.h <<EOF
15419 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15420 EOF
15421
15422 fi
15423 done
15424
15425 echo "$as_me:15425: checking for header declaring getopt variables" >&5
15426 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15427 if test "${cf_cv_getopt_header+set}" = set; then
15428   echo $ECHO_N "(cached) $ECHO_C" >&6
15429 else
15430
15431 cf_cv_getopt_header=none
15432 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15433 do
15434 cat >conftest.$ac_ext <<_ACEOF
15435 #line 15435 "configure"
15436 #include "confdefs.h"
15437
15438 #include <$cf_header>
15439 int
15440 main ()
15441 {
15442 int x = optind; char *y = optarg
15443   ;
15444   return 0;
15445 }
15446 _ACEOF
15447 rm -f conftest.$ac_objext
15448 if { (eval echo "$as_me:15448: \"$ac_compile\"") >&5
15449   (eval $ac_compile) 2>&5
15450   ac_status=$?
15451   echo "$as_me:15451: \$? = $ac_status" >&5
15452   (exit $ac_status); } &&
15453          { ac_try='test -s conftest.$ac_objext'
15454   { (eval echo "$as_me:15454: \"$ac_try\"") >&5
15455   (eval $ac_try) 2>&5
15456   ac_status=$?
15457   echo "$as_me:15457: \$? = $ac_status" >&5
15458   (exit $ac_status); }; }; then
15459   cf_cv_getopt_header=$cf_header
15460  break
15461 else
15462   echo "$as_me: failed program was:" >&5
15463 cat conftest.$ac_ext >&5
15464 fi
15465 rm -f conftest.$ac_objext conftest.$ac_ext
15466 done
15467
15468 fi
15469 echo "$as_me:15469: result: $cf_cv_getopt_header" >&5
15470 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15471 if test $cf_cv_getopt_header != none ; then
15472
15473 cat >>confdefs.h <<\EOF
15474 #define HAVE_GETOPT_HEADER 1
15475 EOF
15476
15477 fi
15478 if test $cf_cv_getopt_header = getopt.h ; then
15479
15480 cat >>confdefs.h <<\EOF
15481 #define NEED_GETOPT_H 1
15482 EOF
15483
15484 fi
15485
15486 # check for ISC (this may also define _POSIX_SOURCE)
15487 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15488 if test "x$ISC" = xyes ; then
15489
15490 echo "$as_me:15490: checking for main in -lcposix" >&5
15491 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15492 if test "${ac_cv_lib_cposix_main+set}" = set; then
15493   echo $ECHO_N "(cached) $ECHO_C" >&6
15494 else
15495   ac_check_lib_save_LIBS=$LIBS
15496 LIBS="-lcposix  $LIBS"
15497 cat >conftest.$ac_ext <<_ACEOF
15498 #line 15498 "configure"
15499 #include "confdefs.h"
15500
15501 int
15502 main ()
15503 {
15504 main ();
15505   ;
15506   return 0;
15507 }
15508 _ACEOF
15509 rm -f conftest.$ac_objext conftest$ac_exeext
15510 if { (eval echo "$as_me:15510: \"$ac_link\"") >&5
15511   (eval $ac_link) 2>&5
15512   ac_status=$?
15513   echo "$as_me:15513: \$? = $ac_status" >&5
15514   (exit $ac_status); } &&
15515          { ac_try='test -s conftest$ac_exeext'
15516   { (eval echo "$as_me:15516: \"$ac_try\"") >&5
15517   (eval $ac_try) 2>&5
15518   ac_status=$?
15519   echo "$as_me:15519: \$? = $ac_status" >&5
15520   (exit $ac_status); }; }; then
15521   ac_cv_lib_cposix_main=yes
15522 else
15523   echo "$as_me: failed program was:" >&5
15524 cat conftest.$ac_ext >&5
15525 ac_cv_lib_cposix_main=no
15526 fi
15527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15528 LIBS=$ac_check_lib_save_LIBS
15529 fi
15530 echo "$as_me:15530: result: $ac_cv_lib_cposix_main" >&5
15531 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15532 if test $ac_cv_lib_cposix_main = yes; then
15533   cat >>confdefs.h <<EOF
15534 #define HAVE_LIBCPOSIX 1
15535 EOF
15536
15537   LIBS="-lcposix $LIBS"
15538
15539 fi
15540
15541         echo "$as_me:15541: checking for bzero in -linet" >&5
15542 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15543 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15544   echo $ECHO_N "(cached) $ECHO_C" >&6
15545 else
15546   ac_check_lib_save_LIBS=$LIBS
15547 LIBS="-linet  $LIBS"
15548 cat >conftest.$ac_ext <<_ACEOF
15549 #line 15549 "configure"
15550 #include "confdefs.h"
15551
15552 /* Override any gcc2 internal prototype to avoid an error.  */
15553 #ifdef __cplusplus
15554 extern "C"
15555 #endif
15556 /* We use char because int might match the return type of a gcc2
15557    builtin and then its argument prototype would still apply.  */
15558 char bzero ();
15559 int
15560 main ()
15561 {
15562 bzero ();
15563   ;
15564   return 0;
15565 }
15566 _ACEOF
15567 rm -f conftest.$ac_objext conftest$ac_exeext
15568 if { (eval echo "$as_me:15568: \"$ac_link\"") >&5
15569   (eval $ac_link) 2>&5
15570   ac_status=$?
15571   echo "$as_me:15571: \$? = $ac_status" >&5
15572   (exit $ac_status); } &&
15573          { ac_try='test -s conftest$ac_exeext'
15574   { (eval echo "$as_me:15574: \"$ac_try\"") >&5
15575   (eval $ac_try) 2>&5
15576   ac_status=$?
15577   echo "$as_me:15577: \$? = $ac_status" >&5
15578   (exit $ac_status); }; }; then
15579   ac_cv_lib_inet_bzero=yes
15580 else
15581   echo "$as_me: failed program was:" >&5
15582 cat conftest.$ac_ext >&5
15583 ac_cv_lib_inet_bzero=no
15584 fi
15585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15586 LIBS=$ac_check_lib_save_LIBS
15587 fi
15588 echo "$as_me:15588: result: $ac_cv_lib_inet_bzero" >&5
15589 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15590 if test $ac_cv_lib_inet_bzero = yes; then
15591
15592 cf_add_libs="-linet"
15593 # Filter out duplicates - this happens with badly-designed ".pc" files...
15594 for cf_add_1lib in $LIBS
15595 do
15596         for cf_add_2lib in $cf_add_libs
15597         do
15598                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15599                 then
15600                         cf_add_1lib=
15601                         break
15602                 fi
15603         done
15604         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15605 done
15606 LIBS="$cf_add_libs"
15607
15608 fi
15609 fi
15610
15611 echo "$as_me:15611: checking if sys/time.h works with sys/select.h" >&5
15612 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15613 if test "${cf_cv_sys_time_select+set}" = set; then
15614   echo $ECHO_N "(cached) $ECHO_C" >&6
15615 else
15616
15617 cat >conftest.$ac_ext <<_ACEOF
15618 #line 15618 "configure"
15619 #include "confdefs.h"
15620
15621 #include <sys/types.h>
15622 #ifdef HAVE_SYS_TIME_H
15623 #include <sys/time.h>
15624 #endif
15625 #ifdef HAVE_SYS_SELECT_H
15626 #include <sys/select.h>
15627 #endif
15628
15629 int
15630 main ()
15631 {
15632
15633   ;
15634   return 0;
15635 }
15636 _ACEOF
15637 rm -f conftest.$ac_objext
15638 if { (eval echo "$as_me:15638: \"$ac_compile\"") >&5
15639   (eval $ac_compile) 2>&5
15640   ac_status=$?
15641   echo "$as_me:15641: \$? = $ac_status" >&5
15642   (exit $ac_status); } &&
15643          { ac_try='test -s conftest.$ac_objext'
15644   { (eval echo "$as_me:15644: \"$ac_try\"") >&5
15645   (eval $ac_try) 2>&5
15646   ac_status=$?
15647   echo "$as_me:15647: \$? = $ac_status" >&5
15648   (exit $ac_status); }; }; then
15649   cf_cv_sys_time_select=yes
15650 else
15651   echo "$as_me: failed program was:" >&5
15652 cat conftest.$ac_ext >&5
15653 cf_cv_sys_time_select=no
15654 fi
15655 rm -f conftest.$ac_objext conftest.$ac_ext
15656
15657 fi
15658
15659 echo "$as_me:15659: result: $cf_cv_sys_time_select" >&5
15660 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15661 test "$cf_cv_sys_time_select" = yes &&
15662 cat >>confdefs.h <<\EOF
15663 #define HAVE_SYS_TIME_SELECT 1
15664 EOF
15665
15666 ###     checks for compiler characteristics
15667 ac_ext=c
15668 ac_cpp='$CPP $CPPFLAGS'
15669 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15670 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15671 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15672 ac_main_return=return
15673
15674 echo "$as_me:15674: checking for an ANSI C-conforming const" >&5
15675 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15676 if test "${ac_cv_c_const+set}" = set; then
15677   echo $ECHO_N "(cached) $ECHO_C" >&6
15678 else
15679   cat >conftest.$ac_ext <<_ACEOF
15680 #line 15680 "configure"
15681 #include "confdefs.h"
15682
15683 int
15684 main ()
15685 {
15686 /* FIXME: Include the comments suggested by Paul. */
15687 #ifndef __cplusplus
15688   /* Ultrix mips cc rejects this.  */
15689   typedef int charset[2];
15690   const charset x;
15691   /* SunOS 4.1.1 cc rejects this.  */
15692   char const *const *ccp;
15693   char **p;
15694   /* NEC SVR4.0.2 mips cc rejects this.  */
15695   struct point {int x, y;};
15696   static struct point const zero = {0,0};
15697   /* AIX XL C 1.02.0.0 rejects this.
15698      It does not let you subtract one const X* pointer from another in
15699      an arm of an if-expression whose if-part is not a constant
15700      expression */
15701   const char *g = "string";
15702   ccp = &g + (g ? g-g : 0);
15703   /* HPUX 7.0 cc rejects these. */
15704   ++ccp;
15705   p = (char**) ccp;
15706   ccp = (char const *const *) p;
15707   { /* SCO 3.2v4 cc rejects this.  */
15708     char *t;
15709     char const *s = 0 ? (char *) 0 : (char const *) 0;
15710
15711     *t++ = 0;
15712   }
15713   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15714     int x[] = {25, 17};
15715     const int *foo = &x[0];
15716     ++foo;
15717   }
15718   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15719     typedef const int *iptr;
15720     iptr p = 0;
15721     ++p;
15722   }
15723   { /* AIX XL C 1.02.0.0 rejects this saying
15724        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15725     struct s { int j; const int *ap[3]; };
15726     struct s *b; b->j = 5;
15727   }
15728   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15729     const int foo = 10;
15730   }
15731 #endif
15732
15733   ;
15734   return 0;
15735 }
15736 _ACEOF
15737 rm -f conftest.$ac_objext
15738 if { (eval echo "$as_me:15738: \"$ac_compile\"") >&5
15739   (eval $ac_compile) 2>&5
15740   ac_status=$?
15741   echo "$as_me:15741: \$? = $ac_status" >&5
15742   (exit $ac_status); } &&
15743          { ac_try='test -s conftest.$ac_objext'
15744   { (eval echo "$as_me:15744: \"$ac_try\"") >&5
15745   (eval $ac_try) 2>&5
15746   ac_status=$?
15747   echo "$as_me:15747: \$? = $ac_status" >&5
15748   (exit $ac_status); }; }; then
15749   ac_cv_c_const=yes
15750 else
15751   echo "$as_me: failed program was:" >&5
15752 cat conftest.$ac_ext >&5
15753 ac_cv_c_const=no
15754 fi
15755 rm -f conftest.$ac_objext conftest.$ac_ext
15756 fi
15757 echo "$as_me:15757: result: $ac_cv_c_const" >&5
15758 echo "${ECHO_T}$ac_cv_c_const" >&6
15759 if test $ac_cv_c_const = no; then
15760
15761 cat >>confdefs.h <<\EOF
15762 #define const
15763 EOF
15764
15765 fi
15766
15767 echo "$as_me:15767: checking for inline" >&5
15768 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15769 if test "${ac_cv_c_inline+set}" = set; then
15770   echo $ECHO_N "(cached) $ECHO_C" >&6
15771 else
15772   ac_cv_c_inline=no
15773 for ac_kw in inline __inline__ __inline; do
15774   cat >conftest.$ac_ext <<_ACEOF
15775 #line 15775 "configure"
15776 #include "confdefs.h"
15777 #ifndef __cplusplus
15778 static $ac_kw int static_foo () {return 0; }
15779 $ac_kw int foo () {return 0; }
15780 #endif
15781
15782 _ACEOF
15783 rm -f conftest.$ac_objext
15784 if { (eval echo "$as_me:15784: \"$ac_compile\"") >&5
15785   (eval $ac_compile) 2>&5
15786   ac_status=$?
15787   echo "$as_me:15787: \$? = $ac_status" >&5
15788   (exit $ac_status); } &&
15789          { ac_try='test -s conftest.$ac_objext'
15790   { (eval echo "$as_me:15790: \"$ac_try\"") >&5
15791   (eval $ac_try) 2>&5
15792   ac_status=$?
15793   echo "$as_me:15793: \$? = $ac_status" >&5
15794   (exit $ac_status); }; }; then
15795   ac_cv_c_inline=$ac_kw; break
15796 else
15797   echo "$as_me: failed program was:" >&5
15798 cat conftest.$ac_ext >&5
15799 fi
15800 rm -f conftest.$ac_objext conftest.$ac_ext
15801 done
15802
15803 fi
15804 echo "$as_me:15804: result: $ac_cv_c_inline" >&5
15805 echo "${ECHO_T}$ac_cv_c_inline" >&6
15806 case $ac_cv_c_inline in
15807   inline | yes) ;;
15808   no)
15809 cat >>confdefs.h <<\EOF
15810 #define inline
15811 EOF
15812  ;;
15813   *)  cat >>confdefs.h <<EOF
15814 #define inline $ac_cv_c_inline
15815 EOF
15816  ;;
15817 esac
15818
15819 NCURSES_INLINE=
15820 if test "$ac_cv_c_inline" != no ; then
15821         NCURSES_INLINE=inline
15822         if test "$INTEL_COMPILER" = yes
15823         then
15824                 :
15825         elif test "$CLANG_COMPILER" = yes
15826         then
15827                 :
15828         elif test "$GCC" = yes
15829         then
15830                 echo "$as_me:15830: checking if $CC supports options to tune inlining" >&5
15831 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15832 if test "${cf_cv_gcc_inline+set}" = set; then
15833   echo $ECHO_N "(cached) $ECHO_C" >&6
15834 else
15835
15836                 cf_save_CFLAGS=$CFLAGS
15837                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15838                 cat >conftest.$ac_ext <<_ACEOF
15839 #line 15839 "configure"
15840 #include "confdefs.h"
15841 inline int foo(void) { return 1; }
15842 int
15843 main ()
15844 {
15845 ${cf_cv_main_return:-return} foo()
15846   ;
15847   return 0;
15848 }
15849 _ACEOF
15850 rm -f conftest.$ac_objext
15851 if { (eval echo "$as_me:15851: \"$ac_compile\"") >&5
15852   (eval $ac_compile) 2>&5
15853   ac_status=$?
15854   echo "$as_me:15854: \$? = $ac_status" >&5
15855   (exit $ac_status); } &&
15856          { ac_try='test -s conftest.$ac_objext'
15857   { (eval echo "$as_me:15857: \"$ac_try\"") >&5
15858   (eval $ac_try) 2>&5
15859   ac_status=$?
15860   echo "$as_me:15860: \$? = $ac_status" >&5
15861   (exit $ac_status); }; }; then
15862   cf_cv_gcc_inline=yes
15863 else
15864   echo "$as_me: failed program was:" >&5
15865 cat conftest.$ac_ext >&5
15866 cf_cv_gcc_inline=no
15867 fi
15868 rm -f conftest.$ac_objext conftest.$ac_ext
15869                 CFLAGS=$cf_save_CFLAGS
15870
15871 fi
15872 echo "$as_me:15872: result: $cf_cv_gcc_inline" >&5
15873 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15874                 if test "$cf_cv_gcc_inline" = yes ; then
15875
15876 cf_fix_cppflags=no
15877 cf_new_cflags=
15878 cf_new_cppflags=
15879 cf_new_extra_cppflags=
15880
15881 for cf_add_cflags in --param max-inline-insns-single=1200
15882 do
15883 case $cf_fix_cppflags in
15884 (no)
15885         case $cf_add_cflags in
15886         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15887                 case $cf_add_cflags in
15888                 (-D*)
15889                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15890
15891                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15892                                 && test -z "${cf_tst_cflags}" \
15893                                 && cf_fix_cppflags=yes
15894
15895                         if test $cf_fix_cppflags = yes ; then
15896                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15897                                 continue
15898                         elif test "${cf_tst_cflags}" = "\"'" ; then
15899                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15900                                 continue
15901                         fi
15902                         ;;
15903                 esac
15904                 case "$CPPFLAGS" in
15905                 (*$cf_add_cflags)
15906                         ;;
15907                 (*)
15908                         case $cf_add_cflags in
15909                         (-D*)
15910                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15911
15912 CPPFLAGS=`echo "$CPPFLAGS" | \
15913         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15914                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15915
15916                                 ;;
15917                         esac
15918                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15919                         ;;
15920                 esac
15921                 ;;
15922         (*)
15923                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15924                 ;;
15925         esac
15926         ;;
15927 (yes)
15928         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15929
15930         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15931
15932         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15933                 && test -z "${cf_tst_cflags}" \
15934                 && cf_fix_cppflags=no
15935         ;;
15936 esac
15937 done
15938
15939 if test -n "$cf_new_cflags" ; then
15940
15941         CFLAGS="$CFLAGS $cf_new_cflags"
15942 fi
15943
15944 if test -n "$cf_new_cppflags" ; then
15945
15946         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15947 fi
15948
15949 if test -n "$cf_new_extra_cppflags" ; then
15950
15951         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15952 fi
15953
15954                 fi
15955         fi
15956 fi
15957
15958 echo "$as_me:15958: checking for signal global datatype" >&5
15959 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15960 if test "${cf_cv_sig_atomic_t+set}" = set; then
15961   echo $ECHO_N "(cached) $ECHO_C" >&6
15962 else
15963
15964         for cf_type in \
15965                 "volatile sig_atomic_t" \
15966                 "sig_atomic_t" \
15967                 "int"
15968         do
15969         cat >conftest.$ac_ext <<_ACEOF
15970 #line 15970 "configure"
15971 #include "confdefs.h"
15972
15973 #include <sys/types.h>
15974 #include <signal.h>
15975 #include <stdio.h>
15976
15977 extern $cf_type x;
15978 $cf_type x;
15979 static void handler(int sig)
15980 {
15981         x = 5;
15982 }
15983 int
15984 main ()
15985 {
15986 signal(SIGINT, handler);
15987                  x = 1
15988   ;
15989   return 0;
15990 }
15991 _ACEOF
15992 rm -f conftest.$ac_objext
15993 if { (eval echo "$as_me:15993: \"$ac_compile\"") >&5
15994   (eval $ac_compile) 2>&5
15995   ac_status=$?
15996   echo "$as_me:15996: \$? = $ac_status" >&5
15997   (exit $ac_status); } &&
15998          { ac_try='test -s conftest.$ac_objext'
15999   { (eval echo "$as_me:15999: \"$ac_try\"") >&5
16000   (eval $ac_try) 2>&5
16001   ac_status=$?
16002   echo "$as_me:16002: \$? = $ac_status" >&5
16003   (exit $ac_status); }; }; then
16004   cf_cv_sig_atomic_t=$cf_type
16005 else
16006   echo "$as_me: failed program was:" >&5
16007 cat conftest.$ac_ext >&5
16008 cf_cv_sig_atomic_t=no
16009 fi
16010 rm -f conftest.$ac_objext conftest.$ac_ext
16011                 test "$cf_cv_sig_atomic_t" != no && break
16012         done
16013
16014 fi
16015
16016 echo "$as_me:16016: result: $cf_cv_sig_atomic_t" >&5
16017 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16018 test "$cf_cv_sig_atomic_t" != no &&
16019 cat >>confdefs.h <<EOF
16020 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16021 EOF
16022
16023 if test $NCURSES_CHTYPE = auto ; then
16024
16025 echo "$as_me:16025: checking for type of chtype" >&5
16026 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16027 if test "${cf_cv_typeof_chtype+set}" = set; then
16028   echo $ECHO_N "(cached) $ECHO_C" >&6
16029 else
16030
16031                 if test "$cross_compiling" = yes; then
16032   cf_cv_typeof_chtype=long
16033 else
16034   cat >conftest.$ac_ext <<_ACEOF
16035 #line 16035 "configure"
16036 #include "confdefs.h"
16037
16038 #define WANT_BITS 31
16039 #include <stdio.h>
16040 int main()
16041 {
16042         FILE *fp = fopen("cf_test.out", "w");
16043         if (fp != 0) {
16044                 char *result = "long";
16045                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16046                         int n;
16047                         unsigned int x, y;
16048                         for (n = 0; n < WANT_BITS; n++) {
16049                                 x = (1 << n);
16050                                 y = (x >> n);
16051                                 if (y != 1 || x == 0) {
16052                                         x = 0;
16053                                         break;
16054                                 }
16055                         }
16056                         /*
16057                          * If x is nonzero, an int is big enough for the bits
16058                          * that we want.
16059                          */
16060                         result = (x != 0) ? "int" : "long";
16061                 }
16062                 fputs(result, fp);
16063                 fclose(fp);
16064         }
16065         ${cf_cv_main_return:-return}(0);
16066 }
16067
16068 _ACEOF
16069 rm -f conftest$ac_exeext
16070 if { (eval echo "$as_me:16070: \"$ac_link\"") >&5
16071   (eval $ac_link) 2>&5
16072   ac_status=$?
16073   echo "$as_me:16073: \$? = $ac_status" >&5
16074   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16075   { (eval echo "$as_me:16075: \"$ac_try\"") >&5
16076   (eval $ac_try) 2>&5
16077   ac_status=$?
16078   echo "$as_me:16078: \$? = $ac_status" >&5
16079   (exit $ac_status); }; }; then
16080   cf_cv_typeof_chtype=`cat cf_test.out`
16081 else
16082   echo "$as_me: program exited with status $ac_status" >&5
16083 echo "$as_me: failed program was:" >&5
16084 cat conftest.$ac_ext >&5
16085 cf_cv_typeof_chtype=long
16086 fi
16087 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16088 fi
16089                 rm -f cf_test.out
16090
16091 fi
16092
16093 echo "$as_me:16093: result: $cf_cv_typeof_chtype" >&5
16094 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16095
16096 cat >>confdefs.h <<EOF
16097 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16098 EOF
16099
16100 else
16101         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16102 fi
16103 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16104
16105 echo "$as_me:16105: checking if unsigned literals are legal" >&5
16106 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16107 if test "${cf_cv_unsigned_literals+set}" = set; then
16108   echo $ECHO_N "(cached) $ECHO_C" >&6
16109 else
16110
16111         cat >conftest.$ac_ext <<_ACEOF
16112 #line 16112 "configure"
16113 #include "confdefs.h"
16114
16115 int
16116 main ()
16117 {
16118 long x = 1L + 1UL + 1U + 1
16119   ;
16120   return 0;
16121 }
16122 _ACEOF
16123 rm -f conftest.$ac_objext
16124 if { (eval echo "$as_me:16124: \"$ac_compile\"") >&5
16125   (eval $ac_compile) 2>&5
16126   ac_status=$?
16127   echo "$as_me:16127: \$? = $ac_status" >&5
16128   (exit $ac_status); } &&
16129          { ac_try='test -s conftest.$ac_objext'
16130   { (eval echo "$as_me:16130: \"$ac_try\"") >&5
16131   (eval $ac_try) 2>&5
16132   ac_status=$?
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); }; }; then
16135   cf_cv_unsigned_literals=yes
16136 else
16137   echo "$as_me: failed program was:" >&5
16138 cat conftest.$ac_ext >&5
16139 cf_cv_unsigned_literals=no
16140 fi
16141 rm -f conftest.$ac_objext conftest.$ac_ext
16142
16143 fi
16144
16145 echo "$as_me:16145: result: $cf_cv_unsigned_literals" >&5
16146 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16147
16148 cf_cv_1UL="1"
16149 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16150 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16151
16152 if test $NCURSES_MMASK_T = auto ; then
16153         cf_cv_typeof_mmask_t=long
16154 else
16155         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16156 fi
16157 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16158
16159 ###     Checks for external-data
16160
16161 echo "$as_me:16161: checking if external errno is declared" >&5
16162 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16163 if test "${cf_cv_dcl_errno+set}" = set; then
16164   echo $ECHO_N "(cached) $ECHO_C" >&6
16165 else
16166
16167         cat >conftest.$ac_ext <<_ACEOF
16168 #line 16168 "configure"
16169 #include "confdefs.h"
16170
16171 #ifdef HAVE_STDLIB_H
16172 #include <stdlib.h>
16173 #endif
16174 #include <stdio.h>
16175 #include <sys/types.h>
16176 #include <errno.h>
16177 int
16178 main ()
16179 {
16180 int x = (int) errno
16181   ;
16182   return 0;
16183 }
16184 _ACEOF
16185 rm -f conftest.$ac_objext
16186 if { (eval echo "$as_me:16186: \"$ac_compile\"") >&5
16187   (eval $ac_compile) 2>&5
16188   ac_status=$?
16189   echo "$as_me:16189: \$? = $ac_status" >&5
16190   (exit $ac_status); } &&
16191          { ac_try='test -s conftest.$ac_objext'
16192   { (eval echo "$as_me:16192: \"$ac_try\"") >&5
16193   (eval $ac_try) 2>&5
16194   ac_status=$?
16195   echo "$as_me:16195: \$? = $ac_status" >&5
16196   (exit $ac_status); }; }; then
16197   cf_cv_dcl_errno=yes
16198 else
16199   echo "$as_me: failed program was:" >&5
16200 cat conftest.$ac_ext >&5
16201 cf_cv_dcl_errno=no
16202 fi
16203 rm -f conftest.$ac_objext conftest.$ac_ext
16204
16205 fi
16206 echo "$as_me:16206: result: $cf_cv_dcl_errno" >&5
16207 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16208
16209 if test "$cf_cv_dcl_errno" = no ; then
16210
16211 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16212
16213         cat >>confdefs.h <<EOF
16214 #define $cf_result 1
16215 EOF
16216
16217 fi
16218
16219 # It's possible (for near-UNIX clones) that the data doesn't exist
16220
16221 echo "$as_me:16221: checking if external errno exists" >&5
16222 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16223 if test "${cf_cv_have_errno+set}" = set; then
16224   echo $ECHO_N "(cached) $ECHO_C" >&6
16225 else
16226
16227         cat >conftest.$ac_ext <<_ACEOF
16228 #line 16228 "configure"
16229 #include "confdefs.h"
16230
16231 #undef errno
16232 extern int errno;
16233
16234 int
16235 main ()
16236 {
16237 errno = 2
16238   ;
16239   return 0;
16240 }
16241 _ACEOF
16242 rm -f conftest.$ac_objext conftest$ac_exeext
16243 if { (eval echo "$as_me:16243: \"$ac_link\"") >&5
16244   (eval $ac_link) 2>&5
16245   ac_status=$?
16246   echo "$as_me:16246: \$? = $ac_status" >&5
16247   (exit $ac_status); } &&
16248          { ac_try='test -s conftest$ac_exeext'
16249   { (eval echo "$as_me:16249: \"$ac_try\"") >&5
16250   (eval $ac_try) 2>&5
16251   ac_status=$?
16252   echo "$as_me:16252: \$? = $ac_status" >&5
16253   (exit $ac_status); }; }; then
16254   cf_cv_have_errno=yes
16255 else
16256   echo "$as_me: failed program was:" >&5
16257 cat conftest.$ac_ext >&5
16258 cf_cv_have_errno=no
16259 fi
16260 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16261
16262 fi
16263 echo "$as_me:16263: result: $cf_cv_have_errno" >&5
16264 echo "${ECHO_T}$cf_cv_have_errno" >&6
16265
16266 if test "$cf_cv_have_errno" = yes ; then
16267
16268 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16269
16270         cat >>confdefs.h <<EOF
16271 #define $cf_result 1
16272 EOF
16273
16274 fi
16275
16276 echo "$as_me:16276: checking if data-only library module links" >&5
16277 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16278 if test "${cf_cv_link_dataonly+set}" = set; then
16279   echo $ECHO_N "(cached) $ECHO_C" >&6
16280 else
16281
16282         rm -f conftest.a
16283         cat >conftest.$ac_ext <<EOF
16284 #line 16284 "configure"
16285 int     testdata[3] = { 123, 456, 789 };
16286 EOF
16287         if { (eval echo "$as_me:16287: \"$ac_compile\"") >&5
16288   (eval $ac_compile) 2>&5
16289   ac_status=$?
16290   echo "$as_me:16290: \$? = $ac_status" >&5
16291   (exit $ac_status); } ; then
16292                 mv conftest.o data.o && \
16293                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16294         fi
16295         rm -f conftest.$ac_ext data.o
16296         cat >conftest.$ac_ext <<EOF
16297 #line 16297 "configure"
16298 int     testfunc()
16299 {
16300 #if defined(NeXT)
16301         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16302 #else
16303         extern int testdata[3];
16304         return testdata[0] == 123
16305            &&  testdata[1] == 456
16306            &&  testdata[2] == 789;
16307 #endif
16308 }
16309 EOF
16310         if { (eval echo "$as_me:16310: \"$ac_compile\"") >&5
16311   (eval $ac_compile) 2>&5
16312   ac_status=$?
16313   echo "$as_me:16313: \$? = $ac_status" >&5
16314   (exit $ac_status); }; then
16315                 mv conftest.o func.o && \
16316                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16317         fi
16318         rm -f conftest.$ac_ext func.o
16319         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16320         cf_saveLIBS="$LIBS"
16321         LIBS="conftest.a $LIBS"
16322         if test "$cross_compiling" = yes; then
16323   cf_cv_link_dataonly=unknown
16324 else
16325   cat >conftest.$ac_ext <<_ACEOF
16326 #line 16326 "configure"
16327 #include "confdefs.h"
16328
16329         int main()
16330         {
16331                 extern int testfunc();
16332                 ${cf_cv_main_return:-return} (!testfunc());
16333         }
16334
16335 _ACEOF
16336 rm -f conftest$ac_exeext
16337 if { (eval echo "$as_me:16337: \"$ac_link\"") >&5
16338   (eval $ac_link) 2>&5
16339   ac_status=$?
16340   echo "$as_me:16340: \$? = $ac_status" >&5
16341   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16342   { (eval echo "$as_me:16342: \"$ac_try\"") >&5
16343   (eval $ac_try) 2>&5
16344   ac_status=$?
16345   echo "$as_me:16345: \$? = $ac_status" >&5
16346   (exit $ac_status); }; }; then
16347   cf_cv_link_dataonly=yes
16348 else
16349   echo "$as_me: program exited with status $ac_status" >&5
16350 echo "$as_me: failed program was:" >&5
16351 cat conftest.$ac_ext >&5
16352 cf_cv_link_dataonly=no
16353 fi
16354 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16355 fi
16356         LIBS="$cf_saveLIBS"
16357
16358 fi
16359
16360 echo "$as_me:16360: result: $cf_cv_link_dataonly" >&5
16361 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16362
16363 if test "$cf_cv_link_dataonly" = no ; then
16364
16365 cat >>confdefs.h <<\EOF
16366 #define BROKEN_LINKER 1
16367 EOF
16368
16369         BROKEN_LINKER=1
16370 fi
16371
16372 ###     Checks for library functions.
16373
16374 for ac_func in \
16375 getcwd \
16376 getegid \
16377 geteuid \
16378 getopt \
16379 getttynam \
16380 issetugid \
16381 poll \
16382 putenv \
16383 remove \
16384 select \
16385 setbuf \
16386 setbuffer \
16387 setenv \
16388 setvbuf \
16389 sigaction \
16390 sigvec \
16391 strdup \
16392 strstr \
16393 tcgetpgrp \
16394 times \
16395 vsnprintf \
16396
16397 do
16398 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16399 echo "$as_me:16399: checking for $ac_func" >&5
16400 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16401 if eval "test \"\${$as_ac_var+set}\" = set"; then
16402   echo $ECHO_N "(cached) $ECHO_C" >&6
16403 else
16404   cat >conftest.$ac_ext <<_ACEOF
16405 #line 16405 "configure"
16406 #include "confdefs.h"
16407 /* System header to define __stub macros and hopefully few prototypes,
16408     which can conflict with char $ac_func (); below.  */
16409 #include <assert.h>
16410 /* Override any gcc2 internal prototype to avoid an error.  */
16411 #ifdef __cplusplus
16412 extern "C"
16413 #endif
16414 /* We use char because int might match the return type of a gcc2
16415    builtin and then its argument prototype would still apply.  */
16416 char $ac_func ();
16417 char (*f) ();
16418
16419 int
16420 main ()
16421 {
16422 /* The GNU C library defines this for functions which it implements
16423     to always fail with ENOSYS.  Some functions are actually named
16424     something starting with __ and the normal name is an alias.  */
16425 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16426 choke me
16427 #else
16428 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16429 #endif
16430
16431   ;
16432   return 0;
16433 }
16434 _ACEOF
16435 rm -f conftest.$ac_objext conftest$ac_exeext
16436 if { (eval echo "$as_me:16436: \"$ac_link\"") >&5
16437   (eval $ac_link) 2>&5
16438   ac_status=$?
16439   echo "$as_me:16439: \$? = $ac_status" >&5
16440   (exit $ac_status); } &&
16441          { ac_try='test -s conftest$ac_exeext'
16442   { (eval echo "$as_me:16442: \"$ac_try\"") >&5
16443   (eval $ac_try) 2>&5
16444   ac_status=$?
16445   echo "$as_me:16445: \$? = $ac_status" >&5
16446   (exit $ac_status); }; }; then
16447   eval "$as_ac_var=yes"
16448 else
16449   echo "$as_me: failed program was:" >&5
16450 cat conftest.$ac_ext >&5
16451 eval "$as_ac_var=no"
16452 fi
16453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16454 fi
16455 echo "$as_me:16455: result: `eval echo '${'$as_ac_var'}'`" >&5
16456 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16457 if test `eval echo '${'$as_ac_var'}'` = yes; then
16458   cat >>confdefs.h <<EOF
16459 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16460 EOF
16461
16462 fi
16463 done
16464
16465 if test "x$ac_cv_func_getopt" = xno &&
16466    test "x$cf_with_progs$cf_with_tests" != xnono; then
16467         { { echo "$as_me:16467: error: getopt is required for building programs" >&5
16468 echo "$as_me: error: getopt is required for building programs" >&2;}
16469    { (exit 1); exit 1; }; }
16470 fi
16471
16472 if test "x$with_getcap" = "xyes" ; then
16473
16474 echo "$as_me:16474: checking for terminal-capability database functions" >&5
16475 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16476 if test "${cf_cv_cgetent+set}" = set; then
16477   echo $ECHO_N "(cached) $ECHO_C" >&6
16478 else
16479
16480 cat >conftest.$ac_ext <<_ACEOF
16481 #line 16481 "configure"
16482 #include "confdefs.h"
16483
16484 #include <stdlib.h>
16485 int
16486 main ()
16487 {
16488
16489         char temp[128];
16490         char *buf = temp;
16491         char *db_array = temp;
16492         cgetent(&buf, &db_array, "vt100");
16493         cgetcap(buf, "tc", '=');
16494         cgetmatch(buf, "tc");
16495
16496   ;
16497   return 0;
16498 }
16499 _ACEOF
16500 rm -f conftest.$ac_objext conftest$ac_exeext
16501 if { (eval echo "$as_me:16501: \"$ac_link\"") >&5
16502   (eval $ac_link) 2>&5
16503   ac_status=$?
16504   echo "$as_me:16504: \$? = $ac_status" >&5
16505   (exit $ac_status); } &&
16506          { ac_try='test -s conftest$ac_exeext'
16507   { (eval echo "$as_me:16507: \"$ac_try\"") >&5
16508   (eval $ac_try) 2>&5
16509   ac_status=$?
16510   echo "$as_me:16510: \$? = $ac_status" >&5
16511   (exit $ac_status); }; }; then
16512   cf_cv_cgetent=yes
16513 else
16514   echo "$as_me: failed program was:" >&5
16515 cat conftest.$ac_ext >&5
16516 cf_cv_cgetent=no
16517 fi
16518 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16519
16520 fi
16521 echo "$as_me:16521: result: $cf_cv_cgetent" >&5
16522 echo "${ECHO_T}$cf_cv_cgetent" >&6
16523
16524 if test "$cf_cv_cgetent" = yes
16525 then
16526
16527 cat >>confdefs.h <<\EOF
16528 #define HAVE_BSD_CGETENT 1
16529 EOF
16530
16531 echo "$as_me:16531: checking if cgetent uses const parameter" >&5
16532 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16533 if test "${cf_cv_cgetent_const+set}" = set; then
16534   echo $ECHO_N "(cached) $ECHO_C" >&6
16535 else
16536
16537 cat >conftest.$ac_ext <<_ACEOF
16538 #line 16538 "configure"
16539 #include "confdefs.h"
16540
16541 #include <stdlib.h>
16542 int
16543 main ()
16544 {
16545
16546         char temp[128];
16547         char *buf = temp;
16548 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16549         const char *db_array = temp;
16550         cgetent(&buf, &db_array, "vt100");
16551 #endif
16552         cgetcap(buf, "tc", '=');
16553         cgetmatch(buf, "tc");
16554
16555   ;
16556   return 0;
16557 }
16558 _ACEOF
16559 rm -f conftest.$ac_objext conftest$ac_exeext
16560 if { (eval echo "$as_me:16560: \"$ac_link\"") >&5
16561   (eval $ac_link) 2>&5
16562   ac_status=$?
16563   echo "$as_me:16563: \$? = $ac_status" >&5
16564   (exit $ac_status); } &&
16565          { ac_try='test -s conftest$ac_exeext'
16566   { (eval echo "$as_me:16566: \"$ac_try\"") >&5
16567   (eval $ac_try) 2>&5
16568   ac_status=$?
16569   echo "$as_me:16569: \$? = $ac_status" >&5
16570   (exit $ac_status); }; }; then
16571   cf_cv_cgetent_const=yes
16572 else
16573   echo "$as_me: failed program was:" >&5
16574 cat conftest.$ac_ext >&5
16575 cf_cv_cgetent_const=no
16576 fi
16577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16578
16579 fi
16580 echo "$as_me:16580: result: $cf_cv_cgetent_const" >&5
16581 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16582         if test "$cf_cv_cgetent_const" = yes
16583         then
16584
16585 cat >>confdefs.h <<EOF
16586 #define CGETENT_CONST const
16587 EOF
16588
16589         fi
16590 fi
16591
16592 fi
16593
16594 echo "$as_me:16594: checking for isascii" >&5
16595 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16596 if test "${cf_cv_have_isascii+set}" = set; then
16597   echo $ECHO_N "(cached) $ECHO_C" >&6
16598 else
16599
16600         cat >conftest.$ac_ext <<_ACEOF
16601 #line 16601 "configure"
16602 #include "confdefs.h"
16603 #include <ctype.h>
16604 int
16605 main ()
16606 {
16607 int x = isascii(' ')
16608   ;
16609   return 0;
16610 }
16611 _ACEOF
16612 rm -f conftest.$ac_objext conftest$ac_exeext
16613 if { (eval echo "$as_me:16613: \"$ac_link\"") >&5
16614   (eval $ac_link) 2>&5
16615   ac_status=$?
16616   echo "$as_me:16616: \$? = $ac_status" >&5
16617   (exit $ac_status); } &&
16618          { ac_try='test -s conftest$ac_exeext'
16619   { (eval echo "$as_me:16619: \"$ac_try\"") >&5
16620   (eval $ac_try) 2>&5
16621   ac_status=$?
16622   echo "$as_me:16622: \$? = $ac_status" >&5
16623   (exit $ac_status); }; }; then
16624   cf_cv_have_isascii=yes
16625 else
16626   echo "$as_me: failed program was:" >&5
16627 cat conftest.$ac_ext >&5
16628 cf_cv_have_isascii=no
16629 fi
16630 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16631
16632 fi
16633 echo "$as_me:16633: result: $cf_cv_have_isascii" >&5
16634 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16635 test "$cf_cv_have_isascii" = yes &&
16636 cat >>confdefs.h <<\EOF
16637 #define HAVE_ISASCII 1
16638 EOF
16639
16640 if test "$ac_cv_func_sigaction" = yes; then
16641 echo "$as_me:16641: checking whether sigaction needs _POSIX_SOURCE" >&5
16642 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16643 cat >conftest.$ac_ext <<_ACEOF
16644 #line 16644 "configure"
16645 #include "confdefs.h"
16646
16647 #include <sys/types.h>
16648 #include <signal.h>
16649 int
16650 main ()
16651 {
16652 struct sigaction act
16653   ;
16654   return 0;
16655 }
16656 _ACEOF
16657 rm -f conftest.$ac_objext
16658 if { (eval echo "$as_me:16658: \"$ac_compile\"") >&5
16659   (eval $ac_compile) 2>&5
16660   ac_status=$?
16661   echo "$as_me:16661: \$? = $ac_status" >&5
16662   (exit $ac_status); } &&
16663          { ac_try='test -s conftest.$ac_objext'
16664   { (eval echo "$as_me:16664: \"$ac_try\"") >&5
16665   (eval $ac_try) 2>&5
16666   ac_status=$?
16667   echo "$as_me:16667: \$? = $ac_status" >&5
16668   (exit $ac_status); }; }; then
16669   sigact_bad=no
16670 else
16671   echo "$as_me: failed program was:" >&5
16672 cat conftest.$ac_ext >&5
16673
16674 cat >conftest.$ac_ext <<_ACEOF
16675 #line 16675 "configure"
16676 #include "confdefs.h"
16677
16678 #define _POSIX_SOURCE
16679 #include <sys/types.h>
16680 #include <signal.h>
16681 int
16682 main ()
16683 {
16684 struct sigaction act
16685   ;
16686   return 0;
16687 }
16688 _ACEOF
16689 rm -f conftest.$ac_objext
16690 if { (eval echo "$as_me:16690: \"$ac_compile\"") >&5
16691   (eval $ac_compile) 2>&5
16692   ac_status=$?
16693   echo "$as_me:16693: \$? = $ac_status" >&5
16694   (exit $ac_status); } &&
16695          { ac_try='test -s conftest.$ac_objext'
16696   { (eval echo "$as_me:16696: \"$ac_try\"") >&5
16697   (eval $ac_try) 2>&5
16698   ac_status=$?
16699   echo "$as_me:16699: \$? = $ac_status" >&5
16700   (exit $ac_status); }; }; then
16701   sigact_bad=yes
16702
16703 cat >>confdefs.h <<\EOF
16704 #define _POSIX_SOURCE 1
16705 EOF
16706
16707 else
16708   echo "$as_me: failed program was:" >&5
16709 cat conftest.$ac_ext >&5
16710 sigact_bad=unknown
16711 fi
16712 rm -f conftest.$ac_objext conftest.$ac_ext
16713 fi
16714 rm -f conftest.$ac_objext conftest.$ac_ext
16715 echo "$as_me:16715: result: $sigact_bad" >&5
16716 echo "${ECHO_T}$sigact_bad" >&6
16717 fi
16718
16719 echo "$as_me:16719: checking if nanosleep really works" >&5
16720 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16721 if test "${cf_cv_func_nanosleep+set}" = set; then
16722   echo $ECHO_N "(cached) $ECHO_C" >&6
16723 else
16724
16725 if test "$cross_compiling" = yes; then
16726   cf_cv_func_nanosleep=unknown
16727 else
16728   cat >conftest.$ac_ext <<_ACEOF
16729 #line 16729 "configure"
16730 #include "confdefs.h"
16731
16732 #include <stdio.h>
16733 #include <errno.h>
16734 #include <time.h>
16735
16736 #ifdef HAVE_SYS_TIME_H
16737 #include <sys/time.h>
16738 #endif
16739
16740 int main() {
16741         struct timespec ts1, ts2;
16742         int code;
16743         ts1.tv_sec  = 0;
16744         ts1.tv_nsec = 750000000;
16745         ts2.tv_sec  = 0;
16746         ts2.tv_nsec = 0;
16747         errno = 0;
16748         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16749         ${cf_cv_main_return:-return}(code != 0);
16750 }
16751
16752 _ACEOF
16753 rm -f conftest$ac_exeext
16754 if { (eval echo "$as_me:16754: \"$ac_link\"") >&5
16755   (eval $ac_link) 2>&5
16756   ac_status=$?
16757   echo "$as_me:16757: \$? = $ac_status" >&5
16758   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16759   { (eval echo "$as_me:16759: \"$ac_try\"") >&5
16760   (eval $ac_try) 2>&5
16761   ac_status=$?
16762   echo "$as_me:16762: \$? = $ac_status" >&5
16763   (exit $ac_status); }; }; then
16764   cf_cv_func_nanosleep=yes
16765 else
16766   echo "$as_me: program exited with status $ac_status" >&5
16767 echo "$as_me: failed program was:" >&5
16768 cat conftest.$ac_ext >&5
16769 cf_cv_func_nanosleep=no
16770 fi
16771 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16772 fi
16773 fi
16774 echo "$as_me:16774: result: $cf_cv_func_nanosleep" >&5
16775 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16776
16777 test "$cf_cv_func_nanosleep" = "yes" &&
16778 cat >>confdefs.h <<\EOF
16779 #define HAVE_NANOSLEEP 1
16780 EOF
16781
16782 for ac_header in \
16783 termio.h \
16784 termios.h \
16785 unistd.h \
16786
16787 do
16788 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16789 echo "$as_me:16789: checking for $ac_header" >&5
16790 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16791 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16792   echo $ECHO_N "(cached) $ECHO_C" >&6
16793 else
16794   cat >conftest.$ac_ext <<_ACEOF
16795 #line 16795 "configure"
16796 #include "confdefs.h"
16797 #include <$ac_header>
16798 _ACEOF
16799 if { (eval echo "$as_me:16799: \"$ac_cpp conftest.$ac_ext\"") >&5
16800   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16801   ac_status=$?
16802   egrep -v '^ *\+' conftest.er1 >conftest.err
16803   rm -f conftest.er1
16804   cat conftest.err >&5
16805   echo "$as_me:16805: \$? = $ac_status" >&5
16806   (exit $ac_status); } >/dev/null; then
16807   if test -s conftest.err; then
16808     ac_cpp_err=$ac_c_preproc_warn_flag
16809   else
16810     ac_cpp_err=
16811   fi
16812 else
16813   ac_cpp_err=yes
16814 fi
16815 if test -z "$ac_cpp_err"; then
16816   eval "$as_ac_Header=yes"
16817 else
16818   echo "$as_me: failed program was:" >&5
16819   cat conftest.$ac_ext >&5
16820   eval "$as_ac_Header=no"
16821 fi
16822 rm -f conftest.err conftest.$ac_ext
16823 fi
16824 echo "$as_me:16824: result: `eval echo '${'$as_ac_Header'}'`" >&5
16825 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16826 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16827   cat >>confdefs.h <<EOF
16828 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16829 EOF
16830
16831 fi
16832 done
16833
16834 if test "$ISC" = yes ; then
16835
16836 for ac_header in sys/termio.h
16837 do
16838 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16839 echo "$as_me:16839: checking for $ac_header" >&5
16840 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16841 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16842   echo $ECHO_N "(cached) $ECHO_C" >&6
16843 else
16844   cat >conftest.$ac_ext <<_ACEOF
16845 #line 16845 "configure"
16846 #include "confdefs.h"
16847 #include <$ac_header>
16848 _ACEOF
16849 if { (eval echo "$as_me:16849: \"$ac_cpp conftest.$ac_ext\"") >&5
16850   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16851   ac_status=$?
16852   egrep -v '^ *\+' conftest.er1 >conftest.err
16853   rm -f conftest.er1
16854   cat conftest.err >&5
16855   echo "$as_me:16855: \$? = $ac_status" >&5
16856   (exit $ac_status); } >/dev/null; then
16857   if test -s conftest.err; then
16858     ac_cpp_err=$ac_c_preproc_warn_flag
16859   else
16860     ac_cpp_err=
16861   fi
16862 else
16863   ac_cpp_err=yes
16864 fi
16865 if test -z "$ac_cpp_err"; then
16866   eval "$as_ac_Header=yes"
16867 else
16868   echo "$as_me: failed program was:" >&5
16869   cat conftest.$ac_ext >&5
16870   eval "$as_ac_Header=no"
16871 fi
16872 rm -f conftest.err conftest.$ac_ext
16873 fi
16874 echo "$as_me:16874: result: `eval echo '${'$as_ac_Header'}'`" >&5
16875 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16876 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16877   cat >>confdefs.h <<EOF
16878 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16879 EOF
16880
16881 fi
16882 done
16883
16884 fi
16885 if test "$ac_cv_header_termios_h" = yes ; then
16886         case "$CFLAGS $CPPFLAGS" in
16887         (*-D_POSIX_SOURCE*)
16888                 termios_bad=dunno ;;
16889         (*)     termios_bad=maybe ;;
16890         esac
16891         if test "$termios_bad" = maybe ; then
16892         echo "$as_me:16892: checking whether termios.h needs _POSIX_SOURCE" >&5
16893 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16894         cat >conftest.$ac_ext <<_ACEOF
16895 #line 16895 "configure"
16896 #include "confdefs.h"
16897 #include <termios.h>
16898 int
16899 main ()
16900 {
16901 struct termios foo; int x = foo.c_iflag
16902   ;
16903   return 0;
16904 }
16905 _ACEOF
16906 rm -f conftest.$ac_objext
16907 if { (eval echo "$as_me:16907: \"$ac_compile\"") >&5
16908   (eval $ac_compile) 2>&5
16909   ac_status=$?
16910   echo "$as_me:16910: \$? = $ac_status" >&5
16911   (exit $ac_status); } &&
16912          { ac_try='test -s conftest.$ac_objext'
16913   { (eval echo "$as_me:16913: \"$ac_try\"") >&5
16914   (eval $ac_try) 2>&5
16915   ac_status=$?
16916   echo "$as_me:16916: \$? = $ac_status" >&5
16917   (exit $ac_status); }; }; then
16918   termios_bad=no
16919 else
16920   echo "$as_me: failed program was:" >&5
16921 cat conftest.$ac_ext >&5
16922
16923                 cat >conftest.$ac_ext <<_ACEOF
16924 #line 16924 "configure"
16925 #include "confdefs.h"
16926
16927 #define _POSIX_SOURCE
16928 #include <termios.h>
16929 int
16930 main ()
16931 {
16932 struct termios foo; int x = foo.c_iflag
16933   ;
16934   return 0;
16935 }
16936 _ACEOF
16937 rm -f conftest.$ac_objext
16938 if { (eval echo "$as_me:16938: \"$ac_compile\"") >&5
16939   (eval $ac_compile) 2>&5
16940   ac_status=$?
16941   echo "$as_me:16941: \$? = $ac_status" >&5
16942   (exit $ac_status); } &&
16943          { ac_try='test -s conftest.$ac_objext'
16944   { (eval echo "$as_me:16944: \"$ac_try\"") >&5
16945   (eval $ac_try) 2>&5
16946   ac_status=$?
16947   echo "$as_me:16947: \$? = $ac_status" >&5
16948   (exit $ac_status); }; }; then
16949   termios_bad=unknown
16950 else
16951   echo "$as_me: failed program was:" >&5
16952 cat conftest.$ac_ext >&5
16953 termios_bad=yes
16954 cat >>confdefs.h <<\EOF
16955 #define _POSIX_SOURCE 1
16956 EOF
16957
16958 fi
16959 rm -f conftest.$ac_objext conftest.$ac_ext
16960
16961 fi
16962 rm -f conftest.$ac_objext conftest.$ac_ext
16963         echo "$as_me:16963: result: $termios_bad" >&5
16964 echo "${ECHO_T}$termios_bad" >&6
16965         fi
16966 fi
16967
16968 echo "$as_me:16968: checking for tcgetattr" >&5
16969 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16970 if test "${cf_cv_have_tcgetattr+set}" = set; then
16971   echo $ECHO_N "(cached) $ECHO_C" >&6
16972 else
16973
16974 cat >conftest.$ac_ext <<_ACEOF
16975 #line 16975 "configure"
16976 #include "confdefs.h"
16977
16978 #include <sys/types.h>
16979 #ifdef HAVE_UNISTD_H
16980 #include <unistd.h>
16981 #endif
16982 #ifdef HAVE_TERMIOS_H
16983 #include <termios.h>
16984 #define TTY struct termios
16985 #else
16986 #ifdef HAVE_TERMIO_H
16987 #include <termio.h>
16988 #define TTY struct termio
16989 #endif
16990 #endif
16991
16992 int
16993 main ()
16994 {
16995
16996 TTY foo;
16997 tcgetattr(1, &foo);
16998   ;
16999   return 0;
17000 }
17001 _ACEOF
17002 rm -f conftest.$ac_objext conftest$ac_exeext
17003 if { (eval echo "$as_me:17003: \"$ac_link\"") >&5
17004   (eval $ac_link) 2>&5
17005   ac_status=$?
17006   echo "$as_me:17006: \$? = $ac_status" >&5
17007   (exit $ac_status); } &&
17008          { ac_try='test -s conftest$ac_exeext'
17009   { (eval echo "$as_me:17009: \"$ac_try\"") >&5
17010   (eval $ac_try) 2>&5
17011   ac_status=$?
17012   echo "$as_me:17012: \$? = $ac_status" >&5
17013   (exit $ac_status); }; }; then
17014   cf_cv_have_tcgetattr=yes
17015 else
17016   echo "$as_me: failed program was:" >&5
17017 cat conftest.$ac_ext >&5
17018 cf_cv_have_tcgetattr=no
17019 fi
17020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17021 fi
17022 echo "$as_me:17022: result: $cf_cv_have_tcgetattr" >&5
17023 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17024 test "$cf_cv_have_tcgetattr" = yes &&
17025 cat >>confdefs.h <<\EOF
17026 #define HAVE_TCGETATTR 1
17027 EOF
17028
17029 echo "$as_me:17029: checking for vsscanf function or workaround" >&5
17030 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17031 if test "${cf_cv_func_vsscanf+set}" = set; then
17032   echo $ECHO_N "(cached) $ECHO_C" >&6
17033 else
17034
17035 cat >conftest.$ac_ext <<_ACEOF
17036 #line 17036 "configure"
17037 #include "confdefs.h"
17038
17039 #include <stdarg.h>
17040 #include <stdio.h>
17041 int
17042 main ()
17043 {
17044
17045         va_list ap;
17046         vsscanf("from", "%d", ap)
17047   ;
17048   return 0;
17049 }
17050 _ACEOF
17051 rm -f conftest.$ac_objext conftest$ac_exeext
17052 if { (eval echo "$as_me:17052: \"$ac_link\"") >&5
17053   (eval $ac_link) 2>&5
17054   ac_status=$?
17055   echo "$as_me:17055: \$? = $ac_status" >&5
17056   (exit $ac_status); } &&
17057          { ac_try='test -s conftest$ac_exeext'
17058   { (eval echo "$as_me:17058: \"$ac_try\"") >&5
17059   (eval $ac_try) 2>&5
17060   ac_status=$?
17061   echo "$as_me:17061: \$? = $ac_status" >&5
17062   (exit $ac_status); }; }; then
17063   cf_cv_func_vsscanf=vsscanf
17064 else
17065   echo "$as_me: failed program was:" >&5
17066 cat conftest.$ac_ext >&5
17067
17068 cat >conftest.$ac_ext <<_ACEOF
17069 #line 17069 "configure"
17070 #include "confdefs.h"
17071
17072 #include <stdarg.h>
17073 #include <stdio.h>
17074 int
17075 main ()
17076 {
17077
17078         FILE strbuf;
17079         char *str = "from";
17080
17081         strbuf._flag = _IOREAD;
17082         strbuf._ptr = strbuf._base = (unsigned char *) str;
17083         strbuf._cnt = strlen(str);
17084         strbuf._file = _NFILE;
17085         return (vfscanf(&strbuf, "%d", ap))
17086   ;
17087   return 0;
17088 }
17089 _ACEOF
17090 rm -f conftest.$ac_objext conftest$ac_exeext
17091 if { (eval echo "$as_me:17091: \"$ac_link\"") >&5
17092   (eval $ac_link) 2>&5
17093   ac_status=$?
17094   echo "$as_me:17094: \$? = $ac_status" >&5
17095   (exit $ac_status); } &&
17096          { ac_try='test -s conftest$ac_exeext'
17097   { (eval echo "$as_me:17097: \"$ac_try\"") >&5
17098   (eval $ac_try) 2>&5
17099   ac_status=$?
17100   echo "$as_me:17100: \$? = $ac_status" >&5
17101   (exit $ac_status); }; }; then
17102   cf_cv_func_vsscanf=vfscanf
17103 else
17104   echo "$as_me: failed program was:" >&5
17105 cat conftest.$ac_ext >&5
17106
17107 cat >conftest.$ac_ext <<_ACEOF
17108 #line 17108 "configure"
17109 #include "confdefs.h"
17110
17111 #include <stdarg.h>
17112 #include <stdio.h>
17113 int
17114 main ()
17115 {
17116
17117         FILE strbuf;
17118         char *str = "from";
17119
17120         strbuf._flag = _IOREAD;
17121         strbuf._ptr = strbuf._base = (unsigned char *) str;
17122         strbuf._cnt = strlen(str);
17123         strbuf._file = _NFILE;
17124         return (_doscan(&strbuf, "%d", ap))
17125   ;
17126   return 0;
17127 }
17128 _ACEOF
17129 rm -f conftest.$ac_objext conftest$ac_exeext
17130 if { (eval echo "$as_me:17130: \"$ac_link\"") >&5
17131   (eval $ac_link) 2>&5
17132   ac_status=$?
17133   echo "$as_me:17133: \$? = $ac_status" >&5
17134   (exit $ac_status); } &&
17135          { ac_try='test -s conftest$ac_exeext'
17136   { (eval echo "$as_me:17136: \"$ac_try\"") >&5
17137   (eval $ac_try) 2>&5
17138   ac_status=$?
17139   echo "$as_me:17139: \$? = $ac_status" >&5
17140   (exit $ac_status); }; }; then
17141   cf_cv_func_vsscanf=_doscan
17142 else
17143   echo "$as_me: failed program was:" >&5
17144 cat conftest.$ac_ext >&5
17145
17146 cf_cv_func_vsscanf=no
17147 fi
17148 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17149 fi
17150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17151 fi
17152 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17153 fi
17154 echo "$as_me:17154: result: $cf_cv_func_vsscanf" >&5
17155 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17156
17157 case $cf_cv_func_vsscanf in
17158 (vsscanf)
17159 cat >>confdefs.h <<\EOF
17160 #define HAVE_VSSCANF 1
17161 EOF
17162 ;;
17163 (vfscanf)
17164 cat >>confdefs.h <<\EOF
17165 #define HAVE_VFSCANF 1
17166 EOF
17167 ;;
17168 (_doscan)
17169 cat >>confdefs.h <<\EOF
17170 #define HAVE__DOSCAN 1
17171 EOF
17172 ;;
17173 esac
17174
17175 echo "$as_me:17175: checking for working mkstemp" >&5
17176 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17177 if test "${cf_cv_func_mkstemp+set}" = set; then
17178   echo $ECHO_N "(cached) $ECHO_C" >&6
17179 else
17180
17181 rm -rf conftest*
17182 if test "$cross_compiling" = yes; then
17183   cf_cv_func_mkstemp=maybe
17184 else
17185   cat >conftest.$ac_ext <<_ACEOF
17186 #line 17186 "configure"
17187 #include "confdefs.h"
17188
17189 #include <sys/types.h>
17190 #include <stdlib.h>
17191 #include <stdio.h>
17192 #include <string.h>
17193 #include <sys/stat.h>
17194 int main()
17195 {
17196         char *tmpl = "conftestXXXXXX";
17197         char name[2][80];
17198         int n;
17199         int result = 0;
17200         int fd;
17201         struct stat sb;
17202
17203         umask(077);
17204         for (n = 0; n < 2; ++n) {
17205                 strcpy(name[n], tmpl);
17206                 if ((fd = mkstemp(name[n])) >= 0) {
17207                         if (!strcmp(name[n], tmpl)
17208                          || stat(name[n], &sb) != 0
17209                          || (sb.st_mode & S_IFMT) != S_IFREG
17210                          || (sb.st_mode & 077) != 0) {
17211                                 result = 1;
17212                         }
17213                         close(fd);
17214                 }
17215         }
17216         if (result == 0
17217          && !strcmp(name[0], name[1]))
17218                 result = 1;
17219         ${cf_cv_main_return:-return}(result);
17220 }
17221
17222 _ACEOF
17223 rm -f conftest$ac_exeext
17224 if { (eval echo "$as_me:17224: \"$ac_link\"") >&5
17225   (eval $ac_link) 2>&5
17226   ac_status=$?
17227   echo "$as_me:17227: \$? = $ac_status" >&5
17228   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17229   { (eval echo "$as_me:17229: \"$ac_try\"") >&5
17230   (eval $ac_try) 2>&5
17231   ac_status=$?
17232   echo "$as_me:17232: \$? = $ac_status" >&5
17233   (exit $ac_status); }; }; then
17234   cf_cv_func_mkstemp=yes
17235
17236 else
17237   echo "$as_me: program exited with status $ac_status" >&5
17238 echo "$as_me: failed program was:" >&5
17239 cat conftest.$ac_ext >&5
17240 cf_cv_func_mkstemp=no
17241
17242 fi
17243 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17244 fi
17245
17246 fi
17247 echo "$as_me:17247: result: $cf_cv_func_mkstemp" >&5
17248 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17249 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17250         echo "$as_me:17250: checking for mkstemp" >&5
17251 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17252 if test "${ac_cv_func_mkstemp+set}" = set; then
17253   echo $ECHO_N "(cached) $ECHO_C" >&6
17254 else
17255   cat >conftest.$ac_ext <<_ACEOF
17256 #line 17256 "configure"
17257 #include "confdefs.h"
17258 /* System header to define __stub macros and hopefully few prototypes,
17259     which can conflict with char mkstemp (); below.  */
17260 #include <assert.h>
17261 /* Override any gcc2 internal prototype to avoid an error.  */
17262 #ifdef __cplusplus
17263 extern "C"
17264 #endif
17265 /* We use char because int might match the return type of a gcc2
17266    builtin and then its argument prototype would still apply.  */
17267 char mkstemp ();
17268 char (*f) ();
17269
17270 int
17271 main ()
17272 {
17273 /* The GNU C library defines this for functions which it implements
17274     to always fail with ENOSYS.  Some functions are actually named
17275     something starting with __ and the normal name is an alias.  */
17276 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17277 choke me
17278 #else
17279 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17280 #endif
17281
17282   ;
17283   return 0;
17284 }
17285 _ACEOF
17286 rm -f conftest.$ac_objext conftest$ac_exeext
17287 if { (eval echo "$as_me:17287: \"$ac_link\"") >&5
17288   (eval $ac_link) 2>&5
17289   ac_status=$?
17290   echo "$as_me:17290: \$? = $ac_status" >&5
17291   (exit $ac_status); } &&
17292          { ac_try='test -s conftest$ac_exeext'
17293   { (eval echo "$as_me:17293: \"$ac_try\"") >&5
17294   (eval $ac_try) 2>&5
17295   ac_status=$?
17296   echo "$as_me:17296: \$? = $ac_status" >&5
17297   (exit $ac_status); }; }; then
17298   ac_cv_func_mkstemp=yes
17299 else
17300   echo "$as_me: failed program was:" >&5
17301 cat conftest.$ac_ext >&5
17302 ac_cv_func_mkstemp=no
17303 fi
17304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17305 fi
17306 echo "$as_me:17306: result: $ac_cv_func_mkstemp" >&5
17307 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17308
17309 fi
17310 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17311
17312 cat >>confdefs.h <<\EOF
17313 #define HAVE_MKSTEMP 1
17314 EOF
17315
17316 fi
17317
17318 # setup for prototype of fallback for vsscanf()
17319
17320 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17321         HAVE_VSSCANF=1
17322 else
17323         HAVE_VSSCANF=0
17324 fi
17325
17326 if test "x$cross_compiling" = xyes ; then
17327         { echo "$as_me:17327: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17328 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17329 else
17330         echo "$as_me:17330: checking whether setvbuf arguments are reversed" >&5
17331 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17332 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17333   echo $ECHO_N "(cached) $ECHO_C" >&6
17334 else
17335   if test "$cross_compiling" = yes; then
17336   { { echo "$as_me:17336: error: cannot run test program while cross compiling" >&5
17337 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17338    { (exit 1); exit 1; }; }
17339 else
17340   cat >conftest.$ac_ext <<_ACEOF
17341 #line 17341 "configure"
17342 #include "confdefs.h"
17343 #include <stdio.h>
17344 /* If setvbuf has the reversed format, exit 0. */
17345 int
17346 main ()
17347 {
17348   /* This call has the arguments reversed.
17349      A reversed system may check and see that the address of main
17350      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17351   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17352     $ac_main_return(1);
17353   putc('\r', stdout);
17354   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17355 }
17356 _ACEOF
17357 rm -f conftest$ac_exeext
17358 if { (eval echo "$as_me:17358: \"$ac_link\"") >&5
17359   (eval $ac_link) 2>&5
17360   ac_status=$?
17361   echo "$as_me:17361: \$? = $ac_status" >&5
17362   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17363   { (eval echo "$as_me:17363: \"$ac_try\"") >&5
17364   (eval $ac_try) 2>&5
17365   ac_status=$?
17366   echo "$as_me:17366: \$? = $ac_status" >&5
17367   (exit $ac_status); }; }; then
17368   ac_cv_func_setvbuf_reversed=yes
17369 else
17370   echo "$as_me: program exited with status $ac_status" >&5
17371 echo "$as_me: failed program was:" >&5
17372 cat conftest.$ac_ext >&5
17373 ac_cv_func_setvbuf_reversed=no
17374 fi
17375 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17376 fi
17377 rm -f core core.* *.core
17378 fi
17379 echo "$as_me:17379: result: $ac_cv_func_setvbuf_reversed" >&5
17380 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17381 if test $ac_cv_func_setvbuf_reversed = yes; then
17382
17383 cat >>confdefs.h <<\EOF
17384 #define SETVBUF_REVERSED 1
17385 EOF
17386
17387 fi
17388
17389 fi
17390 echo "$as_me:17390: checking for intptr_t" >&5
17391 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17392 if test "${ac_cv_type_intptr_t+set}" = set; then
17393   echo $ECHO_N "(cached) $ECHO_C" >&6
17394 else
17395   cat >conftest.$ac_ext <<_ACEOF
17396 #line 17396 "configure"
17397 #include "confdefs.h"
17398 $ac_includes_default
17399 int
17400 main ()
17401 {
17402 if ((intptr_t *) 0)
17403   return 0;
17404 if (sizeof (intptr_t))
17405   return 0;
17406   ;
17407   return 0;
17408 }
17409 _ACEOF
17410 rm -f conftest.$ac_objext
17411 if { (eval echo "$as_me:17411: \"$ac_compile\"") >&5
17412   (eval $ac_compile) 2>&5
17413   ac_status=$?
17414   echo "$as_me:17414: \$? = $ac_status" >&5
17415   (exit $ac_status); } &&
17416          { ac_try='test -s conftest.$ac_objext'
17417   { (eval echo "$as_me:17417: \"$ac_try\"") >&5
17418   (eval $ac_try) 2>&5
17419   ac_status=$?
17420   echo "$as_me:17420: \$? = $ac_status" >&5
17421   (exit $ac_status); }; }; then
17422   ac_cv_type_intptr_t=yes
17423 else
17424   echo "$as_me: failed program was:" >&5
17425 cat conftest.$ac_ext >&5
17426 ac_cv_type_intptr_t=no
17427 fi
17428 rm -f conftest.$ac_objext conftest.$ac_ext
17429 fi
17430 echo "$as_me:17430: result: $ac_cv_type_intptr_t" >&5
17431 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17432 if test $ac_cv_type_intptr_t = yes; then
17433   :
17434 else
17435
17436 cat >>confdefs.h <<EOF
17437 #define intptr_t long
17438 EOF
17439
17440 fi
17441
17442 echo "$as_me:17442: checking for ssize_t" >&5
17443 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17444 if test "${ac_cv_type_ssize_t+set}" = set; then
17445   echo $ECHO_N "(cached) $ECHO_C" >&6
17446 else
17447   cat >conftest.$ac_ext <<_ACEOF
17448 #line 17448 "configure"
17449 #include "confdefs.h"
17450 $ac_includes_default
17451 int
17452 main ()
17453 {
17454 if ((ssize_t *) 0)
17455   return 0;
17456 if (sizeof (ssize_t))
17457   return 0;
17458   ;
17459   return 0;
17460 }
17461 _ACEOF
17462 rm -f conftest.$ac_objext
17463 if { (eval echo "$as_me:17463: \"$ac_compile\"") >&5
17464   (eval $ac_compile) 2>&5
17465   ac_status=$?
17466   echo "$as_me:17466: \$? = $ac_status" >&5
17467   (exit $ac_status); } &&
17468          { ac_try='test -s conftest.$ac_objext'
17469   { (eval echo "$as_me:17469: \"$ac_try\"") >&5
17470   (eval $ac_try) 2>&5
17471   ac_status=$?
17472   echo "$as_me:17472: \$? = $ac_status" >&5
17473   (exit $ac_status); }; }; then
17474   ac_cv_type_ssize_t=yes
17475 else
17476   echo "$as_me: failed program was:" >&5
17477 cat conftest.$ac_ext >&5
17478 ac_cv_type_ssize_t=no
17479 fi
17480 rm -f conftest.$ac_objext conftest.$ac_ext
17481 fi
17482 echo "$as_me:17482: result: $ac_cv_type_ssize_t" >&5
17483 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17484 if test $ac_cv_type_ssize_t = yes; then
17485   :
17486 else
17487
17488 cat >>confdefs.h <<EOF
17489 #define ssize_t int
17490 EOF
17491
17492 fi
17493
17494 echo "$as_me:17494: checking for type sigaction_t" >&5
17495 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17496 if test "${cf_cv_type_sigaction+set}" = set; then
17497   echo $ECHO_N "(cached) $ECHO_C" >&6
17498 else
17499
17500         cat >conftest.$ac_ext <<_ACEOF
17501 #line 17501 "configure"
17502 #include "confdefs.h"
17503
17504 #include <signal.h>
17505 int
17506 main ()
17507 {
17508 sigaction_t x
17509   ;
17510   return 0;
17511 }
17512 _ACEOF
17513 rm -f conftest.$ac_objext
17514 if { (eval echo "$as_me:17514: \"$ac_compile\"") >&5
17515   (eval $ac_compile) 2>&5
17516   ac_status=$?
17517   echo "$as_me:17517: \$? = $ac_status" >&5
17518   (exit $ac_status); } &&
17519          { ac_try='test -s conftest.$ac_objext'
17520   { (eval echo "$as_me:17520: \"$ac_try\"") >&5
17521   (eval $ac_try) 2>&5
17522   ac_status=$?
17523   echo "$as_me:17523: \$? = $ac_status" >&5
17524   (exit $ac_status); }; }; then
17525   cf_cv_type_sigaction=yes
17526 else
17527   echo "$as_me: failed program was:" >&5
17528 cat conftest.$ac_ext >&5
17529 cf_cv_type_sigaction=no
17530 fi
17531 rm -f conftest.$ac_objext conftest.$ac_ext
17532 fi
17533
17534 echo "$as_me:17534: result: $cf_cv_type_sigaction" >&5
17535 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17536 test "$cf_cv_type_sigaction" = yes &&
17537 cat >>confdefs.h <<\EOF
17538 #define HAVE_TYPE_SIGACTION 1
17539 EOF
17540
17541 echo "$as_me:17541: checking declaration of size-change" >&5
17542 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17543 if test "${cf_cv_sizechange+set}" = set; then
17544   echo $ECHO_N "(cached) $ECHO_C" >&6
17545 else
17546
17547         cf_cv_sizechange=unknown
17548         cf_save_CPPFLAGS="$CPPFLAGS"
17549
17550 for cf_opts in "" "NEED_PTEM_H"
17551 do
17552
17553         CPPFLAGS="$cf_save_CPPFLAGS"
17554         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17555         cat >conftest.$ac_ext <<_ACEOF
17556 #line 17556 "configure"
17557 #include "confdefs.h"
17558 #include <sys/types.h>
17559 #ifdef HAVE_TERMIOS_H
17560 #include <termios.h>
17561 #else
17562 #ifdef HAVE_TERMIO_H
17563 #include <termio.h>
17564 #endif
17565 #endif
17566 #ifdef NEED_PTEM_H
17567 /* This is a workaround for SCO:  they neglected to define struct winsize in
17568  * termios.h -- it's only in termio.h and ptem.h
17569  */
17570 #include        <sys/stream.h>
17571 #include        <sys/ptem.h>
17572 #endif
17573 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17574 #include <sys/ioctl.h>
17575 #endif
17576
17577 int
17578 main ()
17579 {
17580
17581 #ifdef TIOCGSIZE
17582         struct ttysize win;     /* FIXME: what system is this? */
17583         int y = win.ts_lines;
17584         int x = win.ts_cols;
17585 #else
17586 #ifdef TIOCGWINSZ
17587         struct winsize win;
17588         int y = win.ws_row;
17589         int x = win.ws_col;
17590 #else
17591         no TIOCGSIZE or TIOCGWINSZ
17592 #endif /* TIOCGWINSZ */
17593 #endif /* TIOCGSIZE */
17594
17595   ;
17596   return 0;
17597 }
17598 _ACEOF
17599 rm -f conftest.$ac_objext
17600 if { (eval echo "$as_me:17600: \"$ac_compile\"") >&5
17601   (eval $ac_compile) 2>&5
17602   ac_status=$?
17603   echo "$as_me:17603: \$? = $ac_status" >&5
17604   (exit $ac_status); } &&
17605          { ac_try='test -s conftest.$ac_objext'
17606   { (eval echo "$as_me:17606: \"$ac_try\"") >&5
17607   (eval $ac_try) 2>&5
17608   ac_status=$?
17609   echo "$as_me:17609: \$? = $ac_status" >&5
17610   (exit $ac_status); }; }; then
17611   cf_cv_sizechange=yes
17612 else
17613   echo "$as_me: failed program was:" >&5
17614 cat conftest.$ac_ext >&5
17615 cf_cv_sizechange=no
17616 fi
17617 rm -f conftest.$ac_objext conftest.$ac_ext
17618
17619         CPPFLAGS="$cf_save_CPPFLAGS"
17620         if test "$cf_cv_sizechange" = yes ; then
17621                 echo "size-change succeeded ($cf_opts)" >&5
17622                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17623                 break
17624         fi
17625 done
17626
17627 fi
17628 echo "$as_me:17628: result: $cf_cv_sizechange" >&5
17629 echo "${ECHO_T}$cf_cv_sizechange" >&6
17630 if test "$cf_cv_sizechange" != no ; then
17631
17632 cat >>confdefs.h <<\EOF
17633 #define HAVE_SIZECHANGE 1
17634 EOF
17635
17636         case $cf_cv_sizechange in
17637         (NEED*)
17638                 cat >>confdefs.h <<EOF
17639 #define $cf_cv_sizechange  1
17640 EOF
17641
17642                 ;;
17643         esac
17644 fi
17645
17646 echo "$as_me:17646: checking for memmove" >&5
17647 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17648 if test "${ac_cv_func_memmove+set}" = set; then
17649   echo $ECHO_N "(cached) $ECHO_C" >&6
17650 else
17651   cat >conftest.$ac_ext <<_ACEOF
17652 #line 17652 "configure"
17653 #include "confdefs.h"
17654 /* System header to define __stub macros and hopefully few prototypes,
17655     which can conflict with char memmove (); below.  */
17656 #include <assert.h>
17657 /* Override any gcc2 internal prototype to avoid an error.  */
17658 #ifdef __cplusplus
17659 extern "C"
17660 #endif
17661 /* We use char because int might match the return type of a gcc2
17662    builtin and then its argument prototype would still apply.  */
17663 char memmove ();
17664 char (*f) ();
17665
17666 int
17667 main ()
17668 {
17669 /* The GNU C library defines this for functions which it implements
17670     to always fail with ENOSYS.  Some functions are actually named
17671     something starting with __ and the normal name is an alias.  */
17672 #if defined (__stub_memmove) || defined (__stub___memmove)
17673 choke me
17674 #else
17675 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17676 #endif
17677
17678   ;
17679   return 0;
17680 }
17681 _ACEOF
17682 rm -f conftest.$ac_objext conftest$ac_exeext
17683 if { (eval echo "$as_me:17683: \"$ac_link\"") >&5
17684   (eval $ac_link) 2>&5
17685   ac_status=$?
17686   echo "$as_me:17686: \$? = $ac_status" >&5
17687   (exit $ac_status); } &&
17688          { ac_try='test -s conftest$ac_exeext'
17689   { (eval echo "$as_me:17689: \"$ac_try\"") >&5
17690   (eval $ac_try) 2>&5
17691   ac_status=$?
17692   echo "$as_me:17692: \$? = $ac_status" >&5
17693   (exit $ac_status); }; }; then
17694   ac_cv_func_memmove=yes
17695 else
17696   echo "$as_me: failed program was:" >&5
17697 cat conftest.$ac_ext >&5
17698 ac_cv_func_memmove=no
17699 fi
17700 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17701 fi
17702 echo "$as_me:17702: result: $ac_cv_func_memmove" >&5
17703 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17704 if test $ac_cv_func_memmove = yes; then
17705   :
17706 else
17707
17708 echo "$as_me:17708: checking for bcopy" >&5
17709 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17710 if test "${ac_cv_func_bcopy+set}" = set; then
17711   echo $ECHO_N "(cached) $ECHO_C" >&6
17712 else
17713   cat >conftest.$ac_ext <<_ACEOF
17714 #line 17714 "configure"
17715 #include "confdefs.h"
17716 /* System header to define __stub macros and hopefully few prototypes,
17717     which can conflict with char bcopy (); below.  */
17718 #include <assert.h>
17719 /* Override any gcc2 internal prototype to avoid an error.  */
17720 #ifdef __cplusplus
17721 extern "C"
17722 #endif
17723 /* We use char because int might match the return type of a gcc2
17724    builtin and then its argument prototype would still apply.  */
17725 char bcopy ();
17726 char (*f) ();
17727
17728 int
17729 main ()
17730 {
17731 /* The GNU C library defines this for functions which it implements
17732     to always fail with ENOSYS.  Some functions are actually named
17733     something starting with __ and the normal name is an alias.  */
17734 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17735 choke me
17736 #else
17737 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17738 #endif
17739
17740   ;
17741   return 0;
17742 }
17743 _ACEOF
17744 rm -f conftest.$ac_objext conftest$ac_exeext
17745 if { (eval echo "$as_me:17745: \"$ac_link\"") >&5
17746   (eval $ac_link) 2>&5
17747   ac_status=$?
17748   echo "$as_me:17748: \$? = $ac_status" >&5
17749   (exit $ac_status); } &&
17750          { ac_try='test -s conftest$ac_exeext'
17751   { (eval echo "$as_me:17751: \"$ac_try\"") >&5
17752   (eval $ac_try) 2>&5
17753   ac_status=$?
17754   echo "$as_me:17754: \$? = $ac_status" >&5
17755   (exit $ac_status); }; }; then
17756   ac_cv_func_bcopy=yes
17757 else
17758   echo "$as_me: failed program was:" >&5
17759 cat conftest.$ac_ext >&5
17760 ac_cv_func_bcopy=no
17761 fi
17762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17763 fi
17764 echo "$as_me:17764: result: $ac_cv_func_bcopy" >&5
17765 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17766 if test $ac_cv_func_bcopy = yes; then
17767
17768         echo "$as_me:17768: checking if bcopy does overlapping moves" >&5
17769 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17770 if test "${cf_cv_good_bcopy+set}" = set; then
17771   echo $ECHO_N "(cached) $ECHO_C" >&6
17772 else
17773
17774                 if test "$cross_compiling" = yes; then
17775   cf_cv_good_bcopy=unknown
17776 else
17777   cat >conftest.$ac_ext <<_ACEOF
17778 #line 17778 "configure"
17779 #include "confdefs.h"
17780
17781 int main() {
17782         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17783         char temp[40];
17784         bcopy(data, temp, sizeof(data));
17785         bcopy(temp+10, temp, 15);
17786         bcopy(temp+5, temp+15, 10);
17787         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17788 }
17789
17790 _ACEOF
17791 rm -f conftest$ac_exeext
17792 if { (eval echo "$as_me:17792: \"$ac_link\"") >&5
17793   (eval $ac_link) 2>&5
17794   ac_status=$?
17795   echo "$as_me:17795: \$? = $ac_status" >&5
17796   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17797   { (eval echo "$as_me:17797: \"$ac_try\"") >&5
17798   (eval $ac_try) 2>&5
17799   ac_status=$?
17800   echo "$as_me:17800: \$? = $ac_status" >&5
17801   (exit $ac_status); }; }; then
17802   cf_cv_good_bcopy=yes
17803 else
17804   echo "$as_me: program exited with status $ac_status" >&5
17805 echo "$as_me: failed program was:" >&5
17806 cat conftest.$ac_ext >&5
17807 cf_cv_good_bcopy=no
17808 fi
17809 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17810 fi
17811
17812 fi
17813 echo "$as_me:17813: result: $cf_cv_good_bcopy" >&5
17814 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17815
17816 else
17817   cf_cv_good_bcopy=no
17818 fi
17819
17820         if test "$cf_cv_good_bcopy" = yes ; then
17821
17822 cat >>confdefs.h <<\EOF
17823 #define USE_OK_BCOPY 1
17824 EOF
17825
17826         else
17827
17828 cat >>confdefs.h <<\EOF
17829 #define USE_MY_MEMMOVE 1
17830 EOF
17831
17832         fi
17833
17834 fi
17835
17836 tty 2>&1 >/dev/null || {
17837 for ac_func in posix_openpt
17838 do
17839 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17840 echo "$as_me:17840: checking for $ac_func" >&5
17841 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17842 if eval "test \"\${$as_ac_var+set}\" = set"; then
17843   echo $ECHO_N "(cached) $ECHO_C" >&6
17844 else
17845   cat >conftest.$ac_ext <<_ACEOF
17846 #line 17846 "configure"
17847 #include "confdefs.h"
17848 /* System header to define __stub macros and hopefully few prototypes,
17849     which can conflict with char $ac_func (); below.  */
17850 #include <assert.h>
17851 /* Override any gcc2 internal prototype to avoid an error.  */
17852 #ifdef __cplusplus
17853 extern "C"
17854 #endif
17855 /* We use char because int might match the return type of a gcc2
17856    builtin and then its argument prototype would still apply.  */
17857 char $ac_func ();
17858 char (*f) ();
17859
17860 int
17861 main ()
17862 {
17863 /* The GNU C library defines this for functions which it implements
17864     to always fail with ENOSYS.  Some functions are actually named
17865     something starting with __ and the normal name is an alias.  */
17866 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17867 choke me
17868 #else
17869 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17870 #endif
17871
17872   ;
17873   return 0;
17874 }
17875 _ACEOF
17876 rm -f conftest.$ac_objext conftest$ac_exeext
17877 if { (eval echo "$as_me:17877: \"$ac_link\"") >&5
17878   (eval $ac_link) 2>&5
17879   ac_status=$?
17880   echo "$as_me:17880: \$? = $ac_status" >&5
17881   (exit $ac_status); } &&
17882          { ac_try='test -s conftest$ac_exeext'
17883   { (eval echo "$as_me:17883: \"$ac_try\"") >&5
17884   (eval $ac_try) 2>&5
17885   ac_status=$?
17886   echo "$as_me:17886: \$? = $ac_status" >&5
17887   (exit $ac_status); }; }; then
17888   eval "$as_ac_var=yes"
17889 else
17890   echo "$as_me: failed program was:" >&5
17891 cat conftest.$ac_ext >&5
17892 eval "$as_ac_var=no"
17893 fi
17894 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17895 fi
17896 echo "$as_me:17896: result: `eval echo '${'$as_ac_var'}'`" >&5
17897 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17898 if test `eval echo '${'$as_ac_var'}'` = yes; then
17899   cat >>confdefs.h <<EOF
17900 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17901 EOF
17902
17903 fi
17904 done
17905  }
17906 echo "$as_me:17906: checking if poll really works" >&5
17907 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17908 if test "${cf_cv_working_poll+set}" = set; then
17909   echo $ECHO_N "(cached) $ECHO_C" >&6
17910 else
17911
17912 if test "$cross_compiling" = yes; then
17913   cf_cv_working_poll=unknown
17914 else
17915   cat >conftest.$ac_ext <<_ACEOF
17916 #line 17916 "configure"
17917 #include "confdefs.h"
17918
17919 #include <stdlib.h>
17920 #include <stdio.h>
17921 #include <unistd.h>
17922 #include <fcntl.h>
17923 #ifdef HAVE_POLL_H
17924 #include <poll.h>
17925 #else
17926 #include <sys/poll.h>
17927 #endif
17928 int main(void) {
17929         struct pollfd myfds;
17930         int ret;
17931
17932         /* check for Darwin bug with respect to "devices" */
17933         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17934         if (myfds.fd < 0)
17935                 myfds.fd = 0;
17936         myfds.events = POLLIN;
17937         myfds.revents = 0;
17938
17939         ret = poll(&myfds, 1, 100);
17940
17941         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17942                 ret = -1;
17943         } else {
17944                 int fd = 0;
17945                 if (!isatty(fd)) {
17946                         fd = open("/dev/tty", 2);       /* O_RDWR */
17947                 }
17948 #ifdef HAVE_POSIX_OPENPT
17949                 if (fd < 0) {
17950                         fd = posix_openpt(O_RDWR);
17951                 }
17952 #endif
17953
17954                 if (fd >= 0) {
17955                         /* also check with standard input */
17956                         myfds.fd = fd;
17957                         myfds.events = POLLIN;
17958                         myfds.revents = 0;
17959                         ret = poll(&myfds, 1, 100);
17960                 } else {
17961                         ret = -1;
17962                 }
17963         }
17964         ${cf_cv_main_return:-return}(ret < 0);
17965 }
17966 _ACEOF
17967 rm -f conftest$ac_exeext
17968 if { (eval echo "$as_me:17968: \"$ac_link\"") >&5
17969   (eval $ac_link) 2>&5
17970   ac_status=$?
17971   echo "$as_me:17971: \$? = $ac_status" >&5
17972   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17973   { (eval echo "$as_me:17973: \"$ac_try\"") >&5
17974   (eval $ac_try) 2>&5
17975   ac_status=$?
17976   echo "$as_me:17976: \$? = $ac_status" >&5
17977   (exit $ac_status); }; }; then
17978   cf_cv_working_poll=yes
17979 else
17980   echo "$as_me: program exited with status $ac_status" >&5
17981 echo "$as_me: failed program was:" >&5
17982 cat conftest.$ac_ext >&5
17983 cf_cv_working_poll=no
17984 fi
17985 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17986 fi
17987 fi
17988 echo "$as_me:17988: result: $cf_cv_working_poll" >&5
17989 echo "${ECHO_T}$cf_cv_working_poll" >&6
17990 test "$cf_cv_working_poll" = "yes" &&
17991 cat >>confdefs.h <<\EOF
17992 #define HAVE_WORKING_POLL 1
17993 EOF
17994
17995 echo "$as_me:17995: checking for va_copy" >&5
17996 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17997 if test "${cf_cv_have_va_copy+set}" = set; then
17998   echo $ECHO_N "(cached) $ECHO_C" >&6
17999 else
18000
18001 cat >conftest.$ac_ext <<_ACEOF
18002 #line 18002 "configure"
18003 #include "confdefs.h"
18004
18005 #include <stdarg.h>
18006
18007 int
18008 main ()
18009 {
18010
18011         static va_list dst;
18012         static va_list src;
18013         va_copy(dst, src)
18014   ;
18015   return 0;
18016 }
18017 _ACEOF
18018 rm -f conftest.$ac_objext conftest$ac_exeext
18019 if { (eval echo "$as_me:18019: \"$ac_link\"") >&5
18020   (eval $ac_link) 2>&5
18021   ac_status=$?
18022   echo "$as_me:18022: \$? = $ac_status" >&5
18023   (exit $ac_status); } &&
18024          { ac_try='test -s conftest$ac_exeext'
18025   { (eval echo "$as_me:18025: \"$ac_try\"") >&5
18026   (eval $ac_try) 2>&5
18027   ac_status=$?
18028   echo "$as_me:18028: \$? = $ac_status" >&5
18029   (exit $ac_status); }; }; then
18030   cf_cv_have_va_copy=yes
18031 else
18032   echo "$as_me: failed program was:" >&5
18033 cat conftest.$ac_ext >&5
18034 cf_cv_have_va_copy=no
18035 fi
18036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18037 fi
18038 echo "$as_me:18038: result: $cf_cv_have_va_copy" >&5
18039 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18040
18041 test "$cf_cv_have_va_copy" = yes &&
18042 cat >>confdefs.h <<\EOF
18043 #define HAVE_VA_COPY 1
18044 EOF
18045
18046 echo "$as_me:18046: checking for __va_copy" >&5
18047 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18048 if test "${cf_cv_have___va_copy+set}" = set; then
18049   echo $ECHO_N "(cached) $ECHO_C" >&6
18050 else
18051
18052 cat >conftest.$ac_ext <<_ACEOF
18053 #line 18053 "configure"
18054 #include "confdefs.h"
18055
18056 #include <stdarg.h>
18057
18058 int
18059 main ()
18060 {
18061
18062         static va_list dst;
18063         static va_list src;
18064         __va_copy(dst, src)
18065   ;
18066   return 0;
18067 }
18068 _ACEOF
18069 rm -f conftest.$ac_objext conftest$ac_exeext
18070 if { (eval echo "$as_me:18070: \"$ac_link\"") >&5
18071   (eval $ac_link) 2>&5
18072   ac_status=$?
18073   echo "$as_me:18073: \$? = $ac_status" >&5
18074   (exit $ac_status); } &&
18075          { ac_try='test -s conftest$ac_exeext'
18076   { (eval echo "$as_me:18076: \"$ac_try\"") >&5
18077   (eval $ac_try) 2>&5
18078   ac_status=$?
18079   echo "$as_me:18079: \$? = $ac_status" >&5
18080   (exit $ac_status); }; }; then
18081   cf_cv_have___va_copy=yes
18082 else
18083   echo "$as_me: failed program was:" >&5
18084 cat conftest.$ac_ext >&5
18085 cf_cv_have___va_copy=no
18086 fi
18087 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18088 fi
18089 echo "$as_me:18089: result: $cf_cv_have___va_copy" >&5
18090 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18091
18092 test "$cf_cv_have___va_copy" = yes &&
18093 cat >>confdefs.h <<\EOF
18094 #define HAVE___VA_COPY 1
18095 EOF
18096
18097 echo "$as_me:18097: checking for pid_t" >&5
18098 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18099 if test "${ac_cv_type_pid_t+set}" = set; then
18100   echo $ECHO_N "(cached) $ECHO_C" >&6
18101 else
18102   cat >conftest.$ac_ext <<_ACEOF
18103 #line 18103 "configure"
18104 #include "confdefs.h"
18105 $ac_includes_default
18106 int
18107 main ()
18108 {
18109 if ((pid_t *) 0)
18110   return 0;
18111 if (sizeof (pid_t))
18112   return 0;
18113   ;
18114   return 0;
18115 }
18116 _ACEOF
18117 rm -f conftest.$ac_objext
18118 if { (eval echo "$as_me:18118: \"$ac_compile\"") >&5
18119   (eval $ac_compile) 2>&5
18120   ac_status=$?
18121   echo "$as_me:18121: \$? = $ac_status" >&5
18122   (exit $ac_status); } &&
18123          { ac_try='test -s conftest.$ac_objext'
18124   { (eval echo "$as_me:18124: \"$ac_try\"") >&5
18125   (eval $ac_try) 2>&5
18126   ac_status=$?
18127   echo "$as_me:18127: \$? = $ac_status" >&5
18128   (exit $ac_status); }; }; then
18129   ac_cv_type_pid_t=yes
18130 else
18131   echo "$as_me: failed program was:" >&5
18132 cat conftest.$ac_ext >&5
18133 ac_cv_type_pid_t=no
18134 fi
18135 rm -f conftest.$ac_objext conftest.$ac_ext
18136 fi
18137 echo "$as_me:18137: result: $ac_cv_type_pid_t" >&5
18138 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18139 if test $ac_cv_type_pid_t = yes; then
18140   :
18141 else
18142
18143 cat >>confdefs.h <<EOF
18144 #define pid_t int
18145 EOF
18146
18147 fi
18148
18149 for ac_header in unistd.h vfork.h
18150 do
18151 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18152 echo "$as_me:18152: checking for $ac_header" >&5
18153 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18154 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18155   echo $ECHO_N "(cached) $ECHO_C" >&6
18156 else
18157   cat >conftest.$ac_ext <<_ACEOF
18158 #line 18158 "configure"
18159 #include "confdefs.h"
18160 #include <$ac_header>
18161 _ACEOF
18162 if { (eval echo "$as_me:18162: \"$ac_cpp conftest.$ac_ext\"") >&5
18163   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18164   ac_status=$?
18165   egrep -v '^ *\+' conftest.er1 >conftest.err
18166   rm -f conftest.er1
18167   cat conftest.err >&5
18168   echo "$as_me:18168: \$? = $ac_status" >&5
18169   (exit $ac_status); } >/dev/null; then
18170   if test -s conftest.err; then
18171     ac_cpp_err=$ac_c_preproc_warn_flag
18172   else
18173     ac_cpp_err=
18174   fi
18175 else
18176   ac_cpp_err=yes
18177 fi
18178 if test -z "$ac_cpp_err"; then
18179   eval "$as_ac_Header=yes"
18180 else
18181   echo "$as_me: failed program was:" >&5
18182   cat conftest.$ac_ext >&5
18183   eval "$as_ac_Header=no"
18184 fi
18185 rm -f conftest.err conftest.$ac_ext
18186 fi
18187 echo "$as_me:18187: result: `eval echo '${'$as_ac_Header'}'`" >&5
18188 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18189 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18190   cat >>confdefs.h <<EOF
18191 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18192 EOF
18193
18194 fi
18195 done
18196
18197 for ac_func in fork vfork
18198 do
18199 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18200 echo "$as_me:18200: checking for $ac_func" >&5
18201 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18202 if eval "test \"\${$as_ac_var+set}\" = set"; then
18203   echo $ECHO_N "(cached) $ECHO_C" >&6
18204 else
18205   cat >conftest.$ac_ext <<_ACEOF
18206 #line 18206 "configure"
18207 #include "confdefs.h"
18208 /* System header to define __stub macros and hopefully few prototypes,
18209     which can conflict with char $ac_func (); below.  */
18210 #include <assert.h>
18211 /* Override any gcc2 internal prototype to avoid an error.  */
18212 #ifdef __cplusplus
18213 extern "C"
18214 #endif
18215 /* We use char because int might match the return type of a gcc2
18216    builtin and then its argument prototype would still apply.  */
18217 char $ac_func ();
18218 char (*f) ();
18219
18220 int
18221 main ()
18222 {
18223 /* The GNU C library defines this for functions which it implements
18224     to always fail with ENOSYS.  Some functions are actually named
18225     something starting with __ and the normal name is an alias.  */
18226 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18227 choke me
18228 #else
18229 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18230 #endif
18231
18232   ;
18233   return 0;
18234 }
18235 _ACEOF
18236 rm -f conftest.$ac_objext conftest$ac_exeext
18237 if { (eval echo "$as_me:18237: \"$ac_link\"") >&5
18238   (eval $ac_link) 2>&5
18239   ac_status=$?
18240   echo "$as_me:18240: \$? = $ac_status" >&5
18241   (exit $ac_status); } &&
18242          { ac_try='test -s conftest$ac_exeext'
18243   { (eval echo "$as_me:18243: \"$ac_try\"") >&5
18244   (eval $ac_try) 2>&5
18245   ac_status=$?
18246   echo "$as_me:18246: \$? = $ac_status" >&5
18247   (exit $ac_status); }; }; then
18248   eval "$as_ac_var=yes"
18249 else
18250   echo "$as_me: failed program was:" >&5
18251 cat conftest.$ac_ext >&5
18252 eval "$as_ac_var=no"
18253 fi
18254 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18255 fi
18256 echo "$as_me:18256: result: `eval echo '${'$as_ac_var'}'`" >&5
18257 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18258 if test `eval echo '${'$as_ac_var'}'` = yes; then
18259   cat >>confdefs.h <<EOF
18260 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18261 EOF
18262
18263 fi
18264 done
18265
18266 ac_cv_func_fork_works=$ac_cv_func_fork
18267 if test "x$ac_cv_func_fork" = xyes; then
18268   echo "$as_me:18268: checking for working fork" >&5
18269 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18270 if test "${ac_cv_func_fork_works+set}" = set; then
18271   echo $ECHO_N "(cached) $ECHO_C" >&6
18272 else
18273   if test "$cross_compiling" = yes; then
18274   ac_cv_func_fork_works=cross
18275 else
18276   cat >conftest.$ac_ext <<_ACEOF
18277 /* By Rüdiger Kuhlmann. */
18278       #include <sys/types.h>
18279       #if HAVE_UNISTD_H
18280       # include <unistd.h>
18281       #endif
18282       /* Some systems only have a dummy stub for fork() */
18283       int main ()
18284       {
18285         if (fork() < 0)
18286           $ac_main_return (1);
18287         $ac_main_return (0);
18288       }
18289 _ACEOF
18290 rm -f conftest$ac_exeext
18291 if { (eval echo "$as_me:18291: \"$ac_link\"") >&5
18292   (eval $ac_link) 2>&5
18293   ac_status=$?
18294   echo "$as_me:18294: \$? = $ac_status" >&5
18295   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18296   { (eval echo "$as_me:18296: \"$ac_try\"") >&5
18297   (eval $ac_try) 2>&5
18298   ac_status=$?
18299   echo "$as_me:18299: \$? = $ac_status" >&5
18300   (exit $ac_status); }; }; then
18301   ac_cv_func_fork_works=yes
18302 else
18303   echo "$as_me: program exited with status $ac_status" >&5
18304 echo "$as_me: failed program was:" >&5
18305 cat conftest.$ac_ext >&5
18306 ac_cv_func_fork_works=no
18307 fi
18308 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18309 fi
18310 fi
18311 echo "$as_me:18311: result: $ac_cv_func_fork_works" >&5
18312 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18313
18314 fi
18315 if test "x$ac_cv_func_fork_works" = xcross; then
18316   case $host in
18317     *-*-amigaos* | *-*-msdosdjgpp*)
18318       # Override, as these systems have only a dummy fork() stub
18319       ac_cv_func_fork_works=no
18320       ;;
18321     *)
18322       ac_cv_func_fork_works=yes
18323       ;;
18324   esac
18325   { echo "$as_me:18325: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18326 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18327 fi
18328 ac_cv_func_vfork_works=$ac_cv_func_vfork
18329 if test "x$ac_cv_func_vfork" = xyes; then
18330   echo "$as_me:18330: checking for working vfork" >&5
18331 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18332 if test "${ac_cv_func_vfork_works+set}" = set; then
18333   echo $ECHO_N "(cached) $ECHO_C" >&6
18334 else
18335   if test "$cross_compiling" = yes; then
18336   ac_cv_func_vfork_works=cross
18337 else
18338   cat >conftest.$ac_ext <<_ACEOF
18339 #line 18339 "configure"
18340 #include "confdefs.h"
18341 /* Thanks to Paul Eggert for this test.  */
18342 #include <stdio.h>
18343 #include <sys/types.h>
18344 #include <sys/stat.h>
18345 #if HAVE_UNISTD_H
18346 # include <unistd.h>
18347 #endif
18348 #if HAVE_VFORK_H
18349 # include <vfork.h>
18350 #endif
18351 /* On some sparc systems, changes by the child to local and incoming
18352    argument registers are propagated back to the parent.  The compiler
18353    is told about this with #include <vfork.h>, but some compilers
18354    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18355    static variable whose address is put into a register that is
18356    clobbered by the vfork.  */
18357 static
18358 #ifdef __cplusplus
18359 sparc_address_test (int arg)
18360 # else
18361 sparc_address_test (arg) int arg;
18362 #endif
18363 {
18364   static pid_t child;
18365   if (!child) {
18366     child = vfork ();
18367     if (child < 0) {
18368       perror ("vfork");
18369       _exit(2);
18370     }
18371     if (!child) {
18372       arg = getpid();
18373       write(-1, "", 0);
18374       _exit (arg);
18375     }
18376   }
18377 }
18378
18379 int
18380 main ()
18381 {
18382   pid_t parent = getpid ();
18383   pid_t child;
18384
18385   sparc_address_test ();
18386
18387   child = vfork ();
18388
18389   if (child == 0) {
18390     /* Here is another test for sparc vfork register problems.  This
18391        test uses lots of local variables, at least as many local
18392        variables as main has allocated so far including compiler
18393        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18394        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18395        reuse the register of parent for one of the local variables,
18396        since it will think that parent can't possibly be used any more
18397        in this routine.  Assigning to the local variable will thus
18398        munge parent in the parent process.  */
18399     pid_t
18400       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18401       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18402     /* Convince the compiler that p..p7 are live; otherwise, it might
18403        use the same hardware register for all 8 local variables.  */
18404     if (p != p1 || p != p2 || p != p3 || p != p4
18405         || p != p5 || p != p6 || p != p7)
18406       _exit(1);
18407
18408     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18409        from child file descriptors.  If the child closes a descriptor
18410        before it execs or exits, this munges the parent's descriptor
18411        as well.  Test for this by closing stdout in the child.  */
18412     _exit(close(fileno(stdout)) != 0);
18413   } else {
18414     int status;
18415     struct stat st;
18416
18417     while (wait(&status) != child)
18418       ;
18419     $ac_main_return(
18420          /* Was there some problem with vforking?  */
18421          child < 0
18422
18423          /* Did the child fail?  (This shouldn't happen.)  */
18424          || status
18425
18426          /* Did the vfork/compiler bug occur?  */
18427          || parent != getpid()
18428
18429          /* Did the file descriptor bug occur?  */
18430          || fstat(fileno(stdout), &st) != 0
18431          );
18432   }
18433 }
18434 _ACEOF
18435 rm -f conftest$ac_exeext
18436 if { (eval echo "$as_me:18436: \"$ac_link\"") >&5
18437   (eval $ac_link) 2>&5
18438   ac_status=$?
18439   echo "$as_me:18439: \$? = $ac_status" >&5
18440   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18441   { (eval echo "$as_me:18441: \"$ac_try\"") >&5
18442   (eval $ac_try) 2>&5
18443   ac_status=$?
18444   echo "$as_me:18444: \$? = $ac_status" >&5
18445   (exit $ac_status); }; }; then
18446   ac_cv_func_vfork_works=yes
18447 else
18448   echo "$as_me: program exited with status $ac_status" >&5
18449 echo "$as_me: failed program was:" >&5
18450 cat conftest.$ac_ext >&5
18451 ac_cv_func_vfork_works=no
18452 fi
18453 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18454 fi
18455 fi
18456 echo "$as_me:18456: result: $ac_cv_func_vfork_works" >&5
18457 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18458
18459 fi;
18460 if test "x$ac_cv_func_fork_works" = xcross; then
18461   ac_cv_func_vfork_works=ac_cv_func_vfork
18462   { echo "$as_me:18462: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18463 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18464 fi
18465
18466 if test "x$ac_cv_func_vfork_works" = xyes; then
18467
18468 cat >>confdefs.h <<\EOF
18469 #define HAVE_WORKING_VFORK 1
18470 EOF
18471
18472 else
18473
18474 cat >>confdefs.h <<\EOF
18475 #define vfork fork
18476 EOF
18477
18478 fi
18479 if test "x$ac_cv_func_fork_works" = xyes; then
18480
18481 cat >>confdefs.h <<\EOF
18482 #define HAVE_WORKING_FORK 1
18483 EOF
18484
18485 fi
18486
18487 # special check for test/ditto.c
18488
18489 echo "$as_me:18489: checking for openpty in -lutil" >&5
18490 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18491 if test "${ac_cv_lib_util_openpty+set}" = set; then
18492   echo $ECHO_N "(cached) $ECHO_C" >&6
18493 else
18494   ac_check_lib_save_LIBS=$LIBS
18495 LIBS="-lutil  $LIBS"
18496 cat >conftest.$ac_ext <<_ACEOF
18497 #line 18497 "configure"
18498 #include "confdefs.h"
18499
18500 /* Override any gcc2 internal prototype to avoid an error.  */
18501 #ifdef __cplusplus
18502 extern "C"
18503 #endif
18504 /* We use char because int might match the return type of a gcc2
18505    builtin and then its argument prototype would still apply.  */
18506 char openpty ();
18507 int
18508 main ()
18509 {
18510 openpty ();
18511   ;
18512   return 0;
18513 }
18514 _ACEOF
18515 rm -f conftest.$ac_objext conftest$ac_exeext
18516 if { (eval echo "$as_me:18516: \"$ac_link\"") >&5
18517   (eval $ac_link) 2>&5
18518   ac_status=$?
18519   echo "$as_me:18519: \$? = $ac_status" >&5
18520   (exit $ac_status); } &&
18521          { ac_try='test -s conftest$ac_exeext'
18522   { (eval echo "$as_me:18522: \"$ac_try\"") >&5
18523   (eval $ac_try) 2>&5
18524   ac_status=$?
18525   echo "$as_me:18525: \$? = $ac_status" >&5
18526   (exit $ac_status); }; }; then
18527   ac_cv_lib_util_openpty=yes
18528 else
18529   echo "$as_me: failed program was:" >&5
18530 cat conftest.$ac_ext >&5
18531 ac_cv_lib_util_openpty=no
18532 fi
18533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18534 LIBS=$ac_check_lib_save_LIBS
18535 fi
18536 echo "$as_me:18536: result: $ac_cv_lib_util_openpty" >&5
18537 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18538 if test $ac_cv_lib_util_openpty = yes; then
18539   cf_cv_lib_util=yes
18540 else
18541   cf_cv_lib_util=no
18542 fi
18543
18544 echo "$as_me:18544: checking for openpty header" >&5
18545 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18546 if test "${cf_cv_func_openpty+set}" = set; then
18547   echo $ECHO_N "(cached) $ECHO_C" >&6
18548 else
18549
18550         cf_save_LIBS="$LIBS"
18551         test $cf_cv_lib_util = yes && {
18552 cf_add_libs="-lutil"
18553 # Filter out duplicates - this happens with badly-designed ".pc" files...
18554 for cf_add_1lib in $LIBS
18555 do
18556         for cf_add_2lib in $cf_add_libs
18557         do
18558                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18559                 then
18560                         cf_add_1lib=
18561                         break
18562                 fi
18563         done
18564         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18565 done
18566 LIBS="$cf_add_libs"
18567  }
18568         for cf_header in pty.h libutil.h util.h
18569         do
18570         cat >conftest.$ac_ext <<_ACEOF
18571 #line 18571 "configure"
18572 #include "confdefs.h"
18573
18574 #include <$cf_header>
18575
18576 int
18577 main ()
18578 {
18579
18580         int x = openpty((int *)0, (int *)0, (char *)0,
18581                                    (struct termios *)0, (struct winsize *)0);
18582
18583   ;
18584   return 0;
18585 }
18586 _ACEOF
18587 rm -f conftest.$ac_objext conftest$ac_exeext
18588 if { (eval echo "$as_me:18588: \"$ac_link\"") >&5
18589   (eval $ac_link) 2>&5
18590   ac_status=$?
18591   echo "$as_me:18591: \$? = $ac_status" >&5
18592   (exit $ac_status); } &&
18593          { ac_try='test -s conftest$ac_exeext'
18594   { (eval echo "$as_me:18594: \"$ac_try\"") >&5
18595   (eval $ac_try) 2>&5
18596   ac_status=$?
18597   echo "$as_me:18597: \$? = $ac_status" >&5
18598   (exit $ac_status); }; }; then
18599
18600                 cf_cv_func_openpty=$cf_header
18601                 break
18602
18603 else
18604   echo "$as_me: failed program was:" >&5
18605 cat conftest.$ac_ext >&5
18606
18607                 cf_cv_func_openpty=no
18608
18609 fi
18610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18611         done
18612         LIBS="$cf_save_LIBS"
18613
18614 fi
18615 echo "$as_me:18615: result: $cf_cv_func_openpty" >&5
18616 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18617
18618 if test "$cf_cv_func_openpty" != no ; then
18619
18620 cat >>confdefs.h <<EOF
18621 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18622 EOF
18623
18624 cat >>confdefs.h <<\EOF
18625 #define USE_XTERM_PTY 1
18626 EOF
18627
18628         if test "x$cf_cv_lib_util" = xyes ; then
18629
18630 cf_add_libs="-lutil"
18631 # Filter out duplicates - this happens with badly-designed ".pc" files...
18632 for cf_add_1lib in $TEST_LIBS
18633 do
18634         for cf_add_2lib in $cf_add_libs
18635         do
18636                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18637                 then
18638                         cf_add_1lib=
18639                         break
18640                 fi
18641         done
18642         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18643 done
18644 TEST_LIBS="$cf_add_libs"
18645
18646         fi
18647 fi
18648
18649 if test "$with_hashed_db" != no ; then
18650
18651 cat >>confdefs.h <<\EOF
18652 #define USE_HASHED_DB 1
18653 EOF
18654
18655 case $with_hashed_db in
18656 (yes|*able*)
18657         ;;
18658 (*)
18659         if test -d "$with_hashed_db" ; then
18660
18661 if test -n "$with_hashed_db/include" ; then
18662   for cf_add_incdir in $with_hashed_db/include
18663   do
18664         while test $cf_add_incdir != /usr/include
18665         do
18666           if test -d $cf_add_incdir
18667           then
18668                 cf_have_incdir=no
18669                 if test -n "$CFLAGS$CPPFLAGS" ; then
18670                   # a loop is needed to ensure we can add subdirs of existing dirs
18671                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18672                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18673                           cf_have_incdir=yes; break
18674                         fi
18675                   done
18676                 fi
18677
18678                 if test "$cf_have_incdir" = no ; then
18679                   if test "$cf_add_incdir" = /usr/local/include ; then
18680                         if test "$GCC" = yes
18681                         then
18682                           cf_save_CPPFLAGS=$CPPFLAGS
18683                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18684                           cat >conftest.$ac_ext <<_ACEOF
18685 #line 18685 "configure"
18686 #include "confdefs.h"
18687 #include <stdio.h>
18688 int
18689 main ()
18690 {
18691 printf("Hello")
18692   ;
18693   return 0;
18694 }
18695 _ACEOF
18696 rm -f conftest.$ac_objext
18697 if { (eval echo "$as_me:18697: \"$ac_compile\"") >&5
18698   (eval $ac_compile) 2>&5
18699   ac_status=$?
18700   echo "$as_me:18700: \$? = $ac_status" >&5
18701   (exit $ac_status); } &&
18702          { ac_try='test -s conftest.$ac_objext'
18703   { (eval echo "$as_me:18703: \"$ac_try\"") >&5
18704   (eval $ac_try) 2>&5
18705   ac_status=$?
18706   echo "$as_me:18706: \$? = $ac_status" >&5
18707   (exit $ac_status); }; }; then
18708   :
18709 else
18710   echo "$as_me: failed program was:" >&5
18711 cat conftest.$ac_ext >&5
18712 cf_have_incdir=yes
18713 fi
18714 rm -f conftest.$ac_objext conftest.$ac_ext
18715                           CPPFLAGS=$cf_save_CPPFLAGS
18716                         fi
18717                   fi
18718                 fi
18719
18720                 if test "$cf_have_incdir" = no ; then
18721                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18722
18723 echo "${as_me:-configure}:18723: testing adding $cf_add_incdir to include-path ..." 1>&5
18724
18725                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18726
18727                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18728                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18729                   cf_add_incdir="$cf_top_incdir"
18730                 else
18731                   break
18732                 fi
18733           else
18734                 break
18735           fi
18736         done
18737   done
18738 fi
18739
18740 if test -n "$with_hashed_db/lib" ; then
18741         for cf_add_libdir in $with_hashed_db/lib
18742         do
18743                 if test $cf_add_libdir = /usr/lib ; then
18744                         :
18745                 elif test -d $cf_add_libdir
18746                 then
18747                         cf_have_libdir=no
18748                         if test -n "$LDFLAGS$LIBS" ; then
18749                                 # a loop is needed to ensure we can add subdirs of existing dirs
18750                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18751                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18752                                                 cf_have_libdir=yes; break
18753                                         fi
18754                                 done
18755                         fi
18756                         if test "$cf_have_libdir" = no ; then
18757                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18758
18759 echo "${as_me:-configure}:18759: testing adding $cf_add_libdir to library-path ..." 1>&5
18760
18761                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18762                         fi
18763                 fi
18764         done
18765 fi
18766
18767         else
18768                 case "$with_hashed_db" in
18769                 (./*|../*|/*)
18770                         { echo "$as_me:18770: WARNING: no such directory $with_hashed_db" >&5
18771 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18772                         ;;
18773                 (*)
18774
18775 cf_search=
18776
18777 test "x$prefix" != "xNONE" && \
18778 test -d "$prefix" && \
18779  {
18780         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18781         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18782         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18783         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18784         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18785         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18786 }
18787
18788 for cf_subdir_prefix in \
18789         /usr \
18790         /usr/local \
18791         /usr/pkg \
18792         /opt \
18793         /opt/local \
18794         $HOME
18795 do
18796
18797 test "x$cf_subdir_prefix" != "x$prefix" && \
18798 test -d "$cf_subdir_prefix" && \
18799 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18800         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18801         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18802         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18803         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18804         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18805         test -d $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db"
18806 }
18807
18808 done
18809
18810         for cf_item in $cf_search
18811         do
18812                 case $cf_item in
18813                 (*/$with_hashed_db)
18814
18815 if test -n "$cf_item" ; then
18816   for cf_add_incdir in $cf_item
18817   do
18818         while test $cf_add_incdir != /usr/include
18819         do
18820           if test -d $cf_add_incdir
18821           then
18822                 cf_have_incdir=no
18823                 if test -n "$CFLAGS$CPPFLAGS" ; then
18824                   # a loop is needed to ensure we can add subdirs of existing dirs
18825                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18826                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18827                           cf_have_incdir=yes; break
18828                         fi
18829                   done
18830                 fi
18831
18832                 if test "$cf_have_incdir" = no ; then
18833                   if test "$cf_add_incdir" = /usr/local/include ; then
18834                         if test "$GCC" = yes
18835                         then
18836                           cf_save_CPPFLAGS=$CPPFLAGS
18837                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18838                           cat >conftest.$ac_ext <<_ACEOF
18839 #line 18839 "configure"
18840 #include "confdefs.h"
18841 #include <stdio.h>
18842 int
18843 main ()
18844 {
18845 printf("Hello")
18846   ;
18847   return 0;
18848 }
18849 _ACEOF
18850 rm -f conftest.$ac_objext
18851 if { (eval echo "$as_me:18851: \"$ac_compile\"") >&5
18852   (eval $ac_compile) 2>&5
18853   ac_status=$?
18854   echo "$as_me:18854: \$? = $ac_status" >&5
18855   (exit $ac_status); } &&
18856          { ac_try='test -s conftest.$ac_objext'
18857   { (eval echo "$as_me:18857: \"$ac_try\"") >&5
18858   (eval $ac_try) 2>&5
18859   ac_status=$?
18860   echo "$as_me:18860: \$? = $ac_status" >&5
18861   (exit $ac_status); }; }; then
18862   :
18863 else
18864   echo "$as_me: failed program was:" >&5
18865 cat conftest.$ac_ext >&5
18866 cf_have_incdir=yes
18867 fi
18868 rm -f conftest.$ac_objext conftest.$ac_ext
18869                           CPPFLAGS=$cf_save_CPPFLAGS
18870                         fi
18871                   fi
18872                 fi
18873
18874                 if test "$cf_have_incdir" = no ; then
18875                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18876
18877 echo "${as_me:-configure}:18877: testing adding $cf_add_incdir to include-path ..." 1>&5
18878
18879                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18880
18881                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18882                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18883                   cf_add_incdir="$cf_top_incdir"
18884                 else
18885                   break
18886                 fi
18887           else
18888                 break
18889           fi
18890         done
18891   done
18892 fi
18893
18894                         ;;
18895                 esac
18896         done
18897
18898 cf_search=
18899
18900 test "x$prefix" != "xNONE" && \
18901 test -d "$prefix" && \
18902  {
18903         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18904         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18905         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18906         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18907         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18908         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18909 }
18910
18911 for cf_subdir_prefix in \
18912         /usr \
18913         /usr/local \
18914         /usr/pkg \
18915         /opt \
18916         /opt/local \
18917         $HOME
18918 do
18919
18920 test "x$cf_subdir_prefix" != "x$prefix" && \
18921 test -d "$cf_subdir_prefix" && \
18922 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18923         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18924         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18925         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18926         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18927         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18928         test -d $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db"
18929 }
18930
18931 done
18932
18933         for cf_item in $cf_search
18934         do
18935                 case $cf_item in
18936                 (*/$with_hashed_db)
18937
18938 if test -n "$cf_item" ; then
18939         for cf_add_libdir in $cf_item
18940         do
18941                 if test $cf_add_libdir = /usr/lib ; then
18942                         :
18943                 elif test -d $cf_add_libdir
18944                 then
18945                         cf_have_libdir=no
18946                         if test -n "$LDFLAGS$LIBS" ; then
18947                                 # a loop is needed to ensure we can add subdirs of existing dirs
18948                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18949                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18950                                                 cf_have_libdir=yes; break
18951                                         fi
18952                                 done
18953                         fi
18954                         if test "$cf_have_libdir" = no ; then
18955                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18956
18957 echo "${as_me:-configure}:18957: testing adding $cf_add_libdir to library-path ..." 1>&5
18958
18959                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18960                         fi
18961                 fi
18962         done
18963 fi
18964
18965                         ;;
18966                 esac
18967         done
18968
18969                         ;;
18970                 esac
18971         fi
18972 esac
18973
18974 echo "$as_me:18974: checking for db.h" >&5
18975 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18976 if test "${ac_cv_header_db_h+set}" = set; then
18977   echo $ECHO_N "(cached) $ECHO_C" >&6
18978 else
18979   cat >conftest.$ac_ext <<_ACEOF
18980 #line 18980 "configure"
18981 #include "confdefs.h"
18982 #include <db.h>
18983 _ACEOF
18984 if { (eval echo "$as_me:18984: \"$ac_cpp conftest.$ac_ext\"") >&5
18985   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18986   ac_status=$?
18987   egrep -v '^ *\+' conftest.er1 >conftest.err
18988   rm -f conftest.er1
18989   cat conftest.err >&5
18990   echo "$as_me:18990: \$? = $ac_status" >&5
18991   (exit $ac_status); } >/dev/null; then
18992   if test -s conftest.err; then
18993     ac_cpp_err=$ac_c_preproc_warn_flag
18994   else
18995     ac_cpp_err=
18996   fi
18997 else
18998   ac_cpp_err=yes
18999 fi
19000 if test -z "$ac_cpp_err"; then
19001   ac_cv_header_db_h=yes
19002 else
19003   echo "$as_me: failed program was:" >&5
19004   cat conftest.$ac_ext >&5
19005   ac_cv_header_db_h=no
19006 fi
19007 rm -f conftest.err conftest.$ac_ext
19008 fi
19009 echo "$as_me:19009: result: $ac_cv_header_db_h" >&5
19010 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19011 if test $ac_cv_header_db_h = yes; then
19012
19013 echo "$as_me:19013: checking for version of db" >&5
19014 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19015 if test "${cf_cv_hashed_db_version+set}" = set; then
19016   echo $ECHO_N "(cached) $ECHO_C" >&6
19017 else
19018
19019 cf_cv_hashed_db_version=unknown
19020
19021 for cf_db_version in 1 2 3 4 5 6
19022 do
19023
19024 echo "${as_me:-configure}:19024: testing checking for db version $cf_db_version ..." 1>&5
19025
19026         cat >conftest.$ac_ext <<_ACEOF
19027 #line 19027 "configure"
19028 #include "confdefs.h"
19029
19030 $ac_includes_default
19031 #include <db.h>
19032
19033 #ifdef DB_VERSION_MAJOR
19034         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19035 #if $cf_db_version == DB_VERSION_MAJOR
19036         /* ok */
19037 #else
19038         make an error
19039 #endif
19040 #else
19041 #if $cf_db_version == 1
19042         /* ok: assuming this is DB 1.8.5 */
19043 #else
19044         make an error
19045 #endif
19046 #endif
19047
19048 int
19049 main ()
19050 {
19051 DBT *foo = 0
19052   ;
19053   return 0;
19054 }
19055 _ACEOF
19056 rm -f conftest.$ac_objext
19057 if { (eval echo "$as_me:19057: \"$ac_compile\"") >&5
19058   (eval $ac_compile) 2>&5
19059   ac_status=$?
19060   echo "$as_me:19060: \$? = $ac_status" >&5
19061   (exit $ac_status); } &&
19062          { ac_try='test -s conftest.$ac_objext'
19063   { (eval echo "$as_me:19063: \"$ac_try\"") >&5
19064   (eval $ac_try) 2>&5
19065   ac_status=$?
19066   echo "$as_me:19066: \$? = $ac_status" >&5
19067   (exit $ac_status); }; }; then
19068
19069         cf_cv_hashed_db_version=$cf_db_version
19070         break
19071
19072 else
19073   echo "$as_me: failed program was:" >&5
19074 cat conftest.$ac_ext >&5
19075 fi
19076 rm -f conftest.$ac_objext conftest.$ac_ext
19077 done
19078
19079 fi
19080 echo "$as_me:19080: result: $cf_cv_hashed_db_version" >&5
19081 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19082
19083 if test "$cf_cv_hashed_db_version" = unknown ; then
19084         { { echo "$as_me:19084: error: Cannot determine version of db" >&5
19085 echo "$as_me: error: Cannot determine version of db" >&2;}
19086    { (exit 1); exit 1; }; }
19087 else
19088
19089 echo "$as_me:19089: checking for db libraries" >&5
19090 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19091 if test "${cf_cv_hashed_db_libs+set}" = set; then
19092   echo $ECHO_N "(cached) $ECHO_C" >&6
19093 else
19094
19095 cf_cv_hashed_db_libs=unknown
19096 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19097 do
19098         cf_save_libs="$LIBS"
19099         if test -n "$cf_db_libs"; then
19100
19101 cf_add_libs="-l$cf_db_libs"
19102 # Filter out duplicates - this happens with badly-designed ".pc" files...
19103 for cf_add_1lib in $LIBS
19104 do
19105         for cf_add_2lib in $cf_add_libs
19106         do
19107                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19108                 then
19109                         cf_add_1lib=
19110                         break
19111                 fi
19112         done
19113         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19114 done
19115 LIBS="$cf_add_libs"
19116
19117         fi
19118
19119 echo "${as_me:-configure}:19119: testing checking for library "$cf_db_libs" ..." 1>&5
19120
19121         cat >conftest.$ac_ext <<_ACEOF
19122 #line 19122 "configure"
19123 #include "confdefs.h"
19124
19125 $ac_includes_default
19126 #include <db.h>
19127
19128 int
19129 main ()
19130 {
19131
19132         char *path = "/tmp/foo";
19133 #ifdef DB_VERSION_MAJOR
19134 #if DB_VERSION_MAJOR >= 4
19135         DB *result = 0;
19136         db_create(&result, NULL, 0);
19137         result->open(result,
19138                 NULL,
19139                 path,
19140                 path,
19141                 DB_HASH,
19142                 DB_CREATE,
19143                 0644);
19144 #elif DB_VERSION_MAJOR >= 3
19145         DB *result = 0;
19146         db_create(&result, NULL, 0);
19147         result->open(result,
19148                 path,
19149                 path,
19150                 DB_HASH,
19151                 DB_CREATE,
19152                 0644);
19153 #elif DB_VERSION_MAJOR >= 2
19154         DB *result = 0;
19155         db_open(path,
19156                 DB_HASH,
19157                 DB_CREATE,
19158                 0644,
19159                 (DB_ENV *) 0,
19160                 (DB_INFO *) 0,
19161                 &result);
19162 #endif /* DB_VERSION_MAJOR */
19163 #else
19164         DB *result = dbopen(path,
19165                      2,
19166                      0644,
19167                      DB_HASH,
19168                      0);
19169 #endif
19170         ${cf_cv_main_return:-return}(result != 0)
19171
19172   ;
19173   return 0;
19174 }
19175 _ACEOF
19176 rm -f conftest.$ac_objext conftest$ac_exeext
19177 if { (eval echo "$as_me:19177: \"$ac_link\"") >&5
19178   (eval $ac_link) 2>&5
19179   ac_status=$?
19180   echo "$as_me:19180: \$? = $ac_status" >&5
19181   (exit $ac_status); } &&
19182          { ac_try='test -s conftest$ac_exeext'
19183   { (eval echo "$as_me:19183: \"$ac_try\"") >&5
19184   (eval $ac_try) 2>&5
19185   ac_status=$?
19186   echo "$as_me:19186: \$? = $ac_status" >&5
19187   (exit $ac_status); }; }; then
19188
19189         if test -n "$cf_db_libs" ; then
19190                 cf_cv_hashed_db_libs=$cf_db_libs
19191         else
19192                 cf_cv_hashed_db_libs=default
19193         fi
19194         LIBS="$cf_save_libs"
19195         break
19196
19197 else
19198   echo "$as_me: failed program was:" >&5
19199 cat conftest.$ac_ext >&5
19200 fi
19201 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19202         LIBS="$cf_save_libs"
19203 done
19204
19205 fi
19206 echo "$as_me:19206: result: $cf_cv_hashed_db_libs" >&5
19207 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19208
19209         if test "$cf_cv_hashed_db_libs" = unknown ; then
19210                 { { echo "$as_me:19210: error: Cannot determine library for db" >&5
19211 echo "$as_me: error: Cannot determine library for db" >&2;}
19212    { (exit 1); exit 1; }; }
19213         elif test "$cf_cv_hashed_db_libs" != default ; then
19214
19215 cf_add_libs="-l$cf_cv_hashed_db_libs"
19216 # Filter out duplicates - this happens with badly-designed ".pc" files...
19217 for cf_add_1lib in $LIBS
19218 do
19219         for cf_add_2lib in $cf_add_libs
19220         do
19221                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19222                 then
19223                         cf_add_1lib=
19224                         break
19225                 fi
19226         done
19227         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19228 done
19229 LIBS="$cf_add_libs"
19230
19231         fi
19232 fi
19233
19234 else
19235
19236         { { echo "$as_me:19236: error: Cannot find db.h" >&5
19237 echo "$as_me: error: Cannot find db.h" >&2;}
19238    { (exit 1); exit 1; }; }
19239
19240 fi
19241
19242 fi
19243
19244 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19245         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19246         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19247 fi
19248
19249 # Just in case, check if the C compiler has a bool type.
19250
19251 echo "$as_me:19251: checking if we should include stdbool.h" >&5
19252 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19253
19254 if test "${cf_cv_header_stdbool_h+set}" = set; then
19255   echo $ECHO_N "(cached) $ECHO_C" >&6
19256 else
19257
19258         cat >conftest.$ac_ext <<_ACEOF
19259 #line 19259 "configure"
19260 #include "confdefs.h"
19261
19262 int
19263 main ()
19264 {
19265 bool foo = false
19266   ;
19267   return 0;
19268 }
19269 _ACEOF
19270 rm -f conftest.$ac_objext
19271 if { (eval echo "$as_me:19271: \"$ac_compile\"") >&5
19272   (eval $ac_compile) 2>&5
19273   ac_status=$?
19274   echo "$as_me:19274: \$? = $ac_status" >&5
19275   (exit $ac_status); } &&
19276          { ac_try='test -s conftest.$ac_objext'
19277   { (eval echo "$as_me:19277: \"$ac_try\"") >&5
19278   (eval $ac_try) 2>&5
19279   ac_status=$?
19280   echo "$as_me:19280: \$? = $ac_status" >&5
19281   (exit $ac_status); }; }; then
19282   cf_cv_header_stdbool_h=0
19283 else
19284   echo "$as_me: failed program was:" >&5
19285 cat conftest.$ac_ext >&5
19286 cat >conftest.$ac_ext <<_ACEOF
19287 #line 19287 "configure"
19288 #include "confdefs.h"
19289
19290 #ifndef __BEOS__
19291 #include <stdbool.h>
19292 #endif
19293
19294 int
19295 main ()
19296 {
19297 bool foo = false
19298   ;
19299   return 0;
19300 }
19301 _ACEOF
19302 rm -f conftest.$ac_objext
19303 if { (eval echo "$as_me:19303: \"$ac_compile\"") >&5
19304   (eval $ac_compile) 2>&5
19305   ac_status=$?
19306   echo "$as_me:19306: \$? = $ac_status" >&5
19307   (exit $ac_status); } &&
19308          { ac_try='test -s conftest.$ac_objext'
19309   { (eval echo "$as_me:19309: \"$ac_try\"") >&5
19310   (eval $ac_try) 2>&5
19311   ac_status=$?
19312   echo "$as_me:19312: \$? = $ac_status" >&5
19313   (exit $ac_status); }; }; then
19314   cf_cv_header_stdbool_h=1
19315 else
19316   echo "$as_me: failed program was:" >&5
19317 cat conftest.$ac_ext >&5
19318 cf_cv_header_stdbool_h=0
19319 fi
19320 rm -f conftest.$ac_objext conftest.$ac_ext
19321 fi
19322 rm -f conftest.$ac_objext conftest.$ac_ext
19323 fi
19324
19325 if test "$cf_cv_header_stdbool_h" = 1
19326 then    echo "$as_me:19326: result: yes" >&5
19327 echo "${ECHO_T}yes" >&6
19328 else    echo "$as_me:19328: result: no" >&5
19329 echo "${ECHO_T}no" >&6
19330 fi
19331
19332 echo "$as_me:19332: checking for builtin bool type" >&5
19333 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19334
19335 if test "${cf_cv_cc_bool_type+set}" = set; then
19336   echo $ECHO_N "(cached) $ECHO_C" >&6
19337 else
19338
19339         cat >conftest.$ac_ext <<_ACEOF
19340 #line 19340 "configure"
19341 #include "confdefs.h"
19342
19343 #include <stdio.h>
19344 #include <sys/types.h>
19345
19346 int
19347 main ()
19348 {
19349 bool x = false
19350   ;
19351   return 0;
19352 }
19353 _ACEOF
19354 rm -f conftest.$ac_objext
19355 if { (eval echo "$as_me:19355: \"$ac_compile\"") >&5
19356   (eval $ac_compile) 2>&5
19357   ac_status=$?
19358   echo "$as_me:19358: \$? = $ac_status" >&5
19359   (exit $ac_status); } &&
19360          { ac_try='test -s conftest.$ac_objext'
19361   { (eval echo "$as_me:19361: \"$ac_try\"") >&5
19362   (eval $ac_try) 2>&5
19363   ac_status=$?
19364   echo "$as_me:19364: \$? = $ac_status" >&5
19365   (exit $ac_status); }; }; then
19366   cf_cv_cc_bool_type=1
19367 else
19368   echo "$as_me: failed program was:" >&5
19369 cat conftest.$ac_ext >&5
19370 cf_cv_cc_bool_type=0
19371 fi
19372 rm -f conftest.$ac_objext conftest.$ac_ext
19373
19374 fi
19375
19376 if test "$cf_cv_cc_bool_type" = 1
19377 then    echo "$as_me:19377: result: yes" >&5
19378 echo "${ECHO_T}yes" >&6
19379 else    echo "$as_me:19379: result: no" >&5
19380 echo "${ECHO_T}no" >&6
19381 fi
19382
19383 # Check for C++ compiler characteristics (and ensure that it's there!)
19384 if test -n "$CXX" ; then
19385         ac_ext=cc
19386 ac_cpp='$CXXCPP $CPPFLAGS'
19387 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19388 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19389 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19390 ac_main_return=return
19391
19392 if test -n "$GXX" ; then
19393
19394         cf_save="$LIBS"
19395         LIBS="$LIBS $CXXLIBS"
19396         echo "$as_me:19396: checking if we already have C++ library" >&5
19397 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
19398         cat >conftest.$ac_ext <<_ACEOF
19399 #line 19399 "configure"
19400 #include "confdefs.h"
19401
19402                         #include <iostream>
19403 int
19404 main ()
19405 {
19406
19407                         std::cout << "Hello World!" << std::endl;
19408   ;
19409   return 0;
19410 }
19411 _ACEOF
19412 rm -f conftest.$ac_objext conftest$ac_exeext
19413 if { (eval echo "$as_me:19413: \"$ac_link\"") >&5
19414   (eval $ac_link) 2>&5
19415   ac_status=$?
19416   echo "$as_me:19416: \$? = $ac_status" >&5
19417   (exit $ac_status); } &&
19418          { ac_try='test -s conftest$ac_exeext'
19419   { (eval echo "$as_me:19419: \"$ac_try\"") >&5
19420   (eval $ac_try) 2>&5
19421   ac_status=$?
19422   echo "$as_me:19422: \$? = $ac_status" >&5
19423   (exit $ac_status); }; }; then
19424   cf_have_libstdcpp=yes
19425 else
19426   echo "$as_me: failed program was:" >&5
19427 cat conftest.$ac_ext >&5
19428 cf_have_libstdcpp=no
19429 fi
19430 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19431         echo "$as_me:19431: result: $cf_have_libstdcpp" >&5
19432 echo "${ECHO_T}$cf_have_libstdcpp" >&6
19433         LIBS="$cf_save"
19434
19435         if test $cf_have_libstdcpp != yes
19436         then
19437                 case $cf_cv_system_name in
19438                 (os2*)
19439                         cf_stdcpp_libname=stdcpp
19440                         ;;
19441                 (*)
19442                         cf_stdcpp_libname=stdc++
19443                         ;;
19444                 esac
19445
19446                 echo "$as_me:19446: checking for library $cf_stdcpp_libname" >&5
19447 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19448 if test "${cf_cv_libstdcpp+set}" = set; then
19449   echo $ECHO_N "(cached) $ECHO_C" >&6
19450 else
19451
19452                         cf_save="$LIBS"
19453                         LIBS="$LIBS $CXXLIBS"
19454
19455 cf_add_libs="-l$cf_stdcpp_libname"
19456 # Filter out duplicates - this happens with badly-designed ".pc" files...
19457 for cf_add_1lib in $LIBS
19458 do
19459         for cf_add_2lib in $cf_add_libs
19460         do
19461                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19462                 then
19463                         cf_add_1lib=
19464                         break
19465                 fi
19466         done
19467         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19468 done
19469 LIBS="$cf_add_libs"
19470
19471                 cat >conftest.$ac_ext <<_ACEOF
19472 #line 19472 "configure"
19473 #include "confdefs.h"
19474
19475                                 #include <iostream>
19476 int
19477 main ()
19478 {
19479
19480                                 std::cout << "Hello World!" << std::endl;
19481   ;
19482   return 0;
19483 }
19484 _ACEOF
19485 rm -f conftest.$ac_objext conftest$ac_exeext
19486 if { (eval echo "$as_me:19486: \"$ac_link\"") >&5
19487   (eval $ac_link) 2>&5
19488   ac_status=$?
19489   echo "$as_me:19489: \$? = $ac_status" >&5
19490   (exit $ac_status); } &&
19491          { ac_try='test -s conftest$ac_exeext'
19492   { (eval echo "$as_me:19492: \"$ac_try\"") >&5
19493   (eval $ac_try) 2>&5
19494   ac_status=$?
19495   echo "$as_me:19495: \$? = $ac_status" >&5
19496   (exit $ac_status); }; }; then
19497   cf_cv_libstdcpp=yes
19498 else
19499   echo "$as_me: failed program was:" >&5
19500 cat conftest.$ac_ext >&5
19501 cf_cv_libstdcpp=no
19502 fi
19503 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19504                         LIBS="$cf_save"
19505
19506 fi
19507 echo "$as_me:19507: result: $cf_cv_libstdcpp" >&5
19508 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19509                 test "$cf_cv_libstdcpp" = yes && {
19510 cf_add_libs="-l$cf_stdcpp_libname"
19511 # Filter out duplicates - this happens with badly-designed ".pc" files...
19512 for cf_add_1lib in $CXXLIBS
19513 do
19514         for cf_add_2lib in $cf_add_libs
19515         do
19516                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19517                 then
19518                         cf_add_1lib=
19519                         break
19520                 fi
19521         done
19522         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19523 done
19524 CXXLIBS="$cf_add_libs"
19525  }
19526         fi
19527 fi
19528
19529         echo "$as_me:19529: checking whether $CXX understands -c and -o together" >&5
19530 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19531 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19532   echo $ECHO_N "(cached) $ECHO_C" >&6
19533 else
19534
19535 cat > conftest.$ac_ext <<CF_EOF
19536 #include <stdio.h>
19537 int main()
19538 {
19539         ${cf_cv_main_return:-return}(0);
19540 }
19541 CF_EOF
19542 # We do the test twice because some compilers refuse to overwrite an
19543 # existing .o file with -o, though they will create one.
19544 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19545 if { (eval echo "$as_me:19545: \"$ac_try\"") >&5
19546   (eval $ac_try) 2>&5
19547   ac_status=$?
19548   echo "$as_me:19548: \$? = $ac_status" >&5
19549   (exit $ac_status); } &&
19550   test -f conftest2.$ac_objext && { (eval echo "$as_me:19550: \"$ac_try\"") >&5
19551   (eval $ac_try) 2>&5
19552   ac_status=$?
19553   echo "$as_me:19553: \$? = $ac_status" >&5
19554   (exit $ac_status); };
19555 then
19556   eval cf_cv_prog_CXX_c_o=yes
19557 else
19558   eval cf_cv_prog_CXX_c_o=no
19559 fi
19560 rm -rf conftest*
19561
19562 fi
19563 if test $cf_cv_prog_CXX_c_o = yes; then
19564   echo "$as_me:19564: result: yes" >&5
19565 echo "${ECHO_T}yes" >&6
19566 else
19567   echo "$as_me:19567: result: no" >&5
19568 echo "${ECHO_T}no" >&6
19569 fi
19570
19571         case $GXX_VERSION in
19572         (1*|2.0-6*)
19573                 cf_cxx_library=yes
19574                 ;;
19575         (*-2.7*|2.7*)
19576
19577 cf_cxx_library=unknown
19578 case $cf_cv_system_name in
19579 (os2*)
19580         cf_gpp_libname=gpp
19581         ;;
19582 (*)
19583         cf_gpp_libname=g++
19584         ;;
19585 esac
19586 if test "$GXX" = yes; then
19587         echo "$as_me:19587: checking for lib$cf_gpp_libname" >&5
19588 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19589         cf_save="$LIBS"
19590
19591 cf_add_libs="-l$cf_gpp_libname"
19592 # Filter out duplicates - this happens with badly-designed ".pc" files...
19593 for cf_add_1lib in $LIBS
19594 do
19595         for cf_add_2lib in $cf_add_libs
19596         do
19597                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19598                 then
19599                         cf_add_1lib=
19600                         break
19601                 fi
19602         done
19603         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19604 done
19605 LIBS="$cf_add_libs"
19606
19607         cat >conftest.$ac_ext <<_ACEOF
19608 #line 19608 "configure"
19609 #include "confdefs.h"
19610
19611 #include <$cf_gpp_libname/builtin.h>
19612
19613 int
19614 main ()
19615 {
19616 two_arg_error_handler_t foo2 = lib_error_handler
19617   ;
19618   return 0;
19619 }
19620 _ACEOF
19621 rm -f conftest.$ac_objext conftest$ac_exeext
19622 if { (eval echo "$as_me:19622: \"$ac_link\"") >&5
19623   (eval $ac_link) 2>&5
19624   ac_status=$?
19625   echo "$as_me:19625: \$? = $ac_status" >&5
19626   (exit $ac_status); } &&
19627          { ac_try='test -s conftest$ac_exeext'
19628   { (eval echo "$as_me:19628: \"$ac_try\"") >&5
19629   (eval $ac_try) 2>&5
19630   ac_status=$?
19631   echo "$as_me:19631: \$? = $ac_status" >&5
19632   (exit $ac_status); }; }; then
19633   cf_cxx_library=yes
19634
19635 cf_add_libs="-l$cf_gpp_libname"
19636 # Filter out duplicates - this happens with badly-designed ".pc" files...
19637 for cf_add_1lib in $CXXLIBS
19638 do
19639         for cf_add_2lib in $cf_add_libs
19640         do
19641                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19642                 then
19643                         cf_add_1lib=
19644                         break
19645                 fi
19646         done
19647         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19648 done
19649 CXXLIBS="$cf_add_libs"
19650
19651          if test "$cf_gpp_libname" = cpp ; then
19652
19653 cat >>confdefs.h <<\EOF
19654 #define HAVE_GPP_BUILTIN_H 1
19655 EOF
19656
19657          else
19658
19659 cat >>confdefs.h <<\EOF
19660 #define HAVE_GXX_BUILTIN_H 1
19661 EOF
19662
19663          fi
19664 else
19665   echo "$as_me: failed program was:" >&5
19666 cat conftest.$ac_ext >&5
19667 cat >conftest.$ac_ext <<_ACEOF
19668 #line 19668 "configure"
19669 #include "confdefs.h"
19670
19671 #include <builtin.h>
19672
19673 int
19674 main ()
19675 {
19676 two_arg_error_handler_t foo2 = lib_error_handler
19677   ;
19678   return 0;
19679 }
19680 _ACEOF
19681 rm -f conftest.$ac_objext conftest$ac_exeext
19682 if { (eval echo "$as_me:19682: \"$ac_link\"") >&5
19683   (eval $ac_link) 2>&5
19684   ac_status=$?
19685   echo "$as_me:19685: \$? = $ac_status" >&5
19686   (exit $ac_status); } &&
19687          { ac_try='test -s conftest$ac_exeext'
19688   { (eval echo "$as_me:19688: \"$ac_try\"") >&5
19689   (eval $ac_try) 2>&5
19690   ac_status=$?
19691   echo "$as_me:19691: \$? = $ac_status" >&5
19692   (exit $ac_status); }; }; then
19693   cf_cxx_library=yes
19694
19695 cf_add_libs="-l$cf_gpp_libname"
19696 # Filter out duplicates - this happens with badly-designed ".pc" files...
19697 for cf_add_1lib in $CXXLIBS
19698 do
19699         for cf_add_2lib in $cf_add_libs
19700         do
19701                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19702                 then
19703                         cf_add_1lib=
19704                         break
19705                 fi
19706         done
19707         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19708 done
19709 CXXLIBS="$cf_add_libs"
19710
19711 cat >>confdefs.h <<\EOF
19712 #define HAVE_BUILTIN_H 1
19713 EOF
19714
19715 else
19716   echo "$as_me: failed program was:" >&5
19717 cat conftest.$ac_ext >&5
19718 cf_cxx_library=no
19719 fi
19720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19721 fi
19722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19723         LIBS="$cf_save"
19724         echo "$as_me:19724: result: $cf_cxx_library" >&5
19725 echo "${ECHO_T}$cf_cxx_library" >&6
19726 fi
19727
19728                 ;;
19729         (*)
19730                 cf_cxx_library=no
19731                 ;;
19732         esac
19733
19734         ac_ext=cc
19735 ac_cpp='$CXXCPP $CPPFLAGS'
19736 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19737 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19738 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19739 ac_main_return=return
19740 echo "$as_me:19740: checking how to run the C++ preprocessor" >&5
19741 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19742 if test -z "$CXXCPP"; then
19743   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19744   echo $ECHO_N "(cached) $ECHO_C" >&6
19745 else
19746       # Double quotes because CXXCPP needs to be expanded
19747     for CXXCPP in "$CXX -E" "/lib/cpp"
19748     do
19749       ac_preproc_ok=false
19750 for ac_cxx_preproc_warn_flag in '' yes
19751 do
19752   # Use a header file that comes with gcc, so configuring glibc
19753   # with a fresh cross-compiler works.
19754   # On the NeXT, cc -E runs the code through the compiler's parser,
19755   # not just through cpp. "Syntax error" is here to catch this case.
19756   cat >conftest.$ac_ext <<_ACEOF
19757 #line 19757 "configure"
19758 #include "confdefs.h"
19759 #include <assert.h>
19760                      Syntax error
19761 _ACEOF
19762 if { (eval echo "$as_me:19762: \"$ac_cpp conftest.$ac_ext\"") >&5
19763   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19764   ac_status=$?
19765   egrep -v '^ *\+' conftest.er1 >conftest.err
19766   rm -f conftest.er1
19767   cat conftest.err >&5
19768   echo "$as_me:19768: \$? = $ac_status" >&5
19769   (exit $ac_status); } >/dev/null; then
19770   if test -s conftest.err; then
19771     ac_cpp_err=$ac_cxx_preproc_warn_flag
19772   else
19773     ac_cpp_err=
19774   fi
19775 else
19776   ac_cpp_err=yes
19777 fi
19778 if test -z "$ac_cpp_err"; then
19779   :
19780 else
19781   echo "$as_me: failed program was:" >&5
19782   cat conftest.$ac_ext >&5
19783   # Broken: fails on valid input.
19784 continue
19785 fi
19786 rm -f conftest.err conftest.$ac_ext
19787
19788   # OK, works on sane cases.  Now check whether non-existent headers
19789   # can be detected and how.
19790   cat >conftest.$ac_ext <<_ACEOF
19791 #line 19791 "configure"
19792 #include "confdefs.h"
19793 #include <ac_nonexistent.h>
19794 _ACEOF
19795 if { (eval echo "$as_me:19795: \"$ac_cpp conftest.$ac_ext\"") >&5
19796   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19797   ac_status=$?
19798   egrep -v '^ *\+' conftest.er1 >conftest.err
19799   rm -f conftest.er1
19800   cat conftest.err >&5
19801   echo "$as_me:19801: \$? = $ac_status" >&5
19802   (exit $ac_status); } >/dev/null; then
19803   if test -s conftest.err; then
19804     ac_cpp_err=$ac_cxx_preproc_warn_flag
19805   else
19806     ac_cpp_err=
19807   fi
19808 else
19809   ac_cpp_err=yes
19810 fi
19811 if test -z "$ac_cpp_err"; then
19812   # Broken: success on invalid input.
19813 continue
19814 else
19815   echo "$as_me: failed program was:" >&5
19816   cat conftest.$ac_ext >&5
19817   # Passes both tests.
19818 ac_preproc_ok=:
19819 break
19820 fi
19821 rm -f conftest.err conftest.$ac_ext
19822
19823 done
19824 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19825 rm -f conftest.err conftest.$ac_ext
19826 if $ac_preproc_ok; then
19827   break
19828 fi
19829
19830     done
19831     ac_cv_prog_CXXCPP=$CXXCPP
19832
19833 fi
19834   CXXCPP=$ac_cv_prog_CXXCPP
19835 else
19836   ac_cv_prog_CXXCPP=$CXXCPP
19837 fi
19838 echo "$as_me:19838: result: $CXXCPP" >&5
19839 echo "${ECHO_T}$CXXCPP" >&6
19840 ac_preproc_ok=false
19841 for ac_cxx_preproc_warn_flag in '' yes
19842 do
19843   # Use a header file that comes with gcc, so configuring glibc
19844   # with a fresh cross-compiler works.
19845   # On the NeXT, cc -E runs the code through the compiler's parser,
19846   # not just through cpp. "Syntax error" is here to catch this case.
19847   cat >conftest.$ac_ext <<_ACEOF
19848 #line 19848 "configure"
19849 #include "confdefs.h"
19850 #include <assert.h>
19851                      Syntax error
19852 _ACEOF
19853 if { (eval echo "$as_me:19853: \"$ac_cpp conftest.$ac_ext\"") >&5
19854   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19855   ac_status=$?
19856   egrep -v '^ *\+' conftest.er1 >conftest.err
19857   rm -f conftest.er1
19858   cat conftest.err >&5
19859   echo "$as_me:19859: \$? = $ac_status" >&5
19860   (exit $ac_status); } >/dev/null; then
19861   if test -s conftest.err; then
19862     ac_cpp_err=$ac_cxx_preproc_warn_flag
19863   else
19864     ac_cpp_err=
19865   fi
19866 else
19867   ac_cpp_err=yes
19868 fi
19869 if test -z "$ac_cpp_err"; then
19870   :
19871 else
19872   echo "$as_me: failed program was:" >&5
19873   cat conftest.$ac_ext >&5
19874   # Broken: fails on valid input.
19875 continue
19876 fi
19877 rm -f conftest.err conftest.$ac_ext
19878
19879   # OK, works on sane cases.  Now check whether non-existent headers
19880   # can be detected and how.
19881   cat >conftest.$ac_ext <<_ACEOF
19882 #line 19882 "configure"
19883 #include "confdefs.h"
19884 #include <ac_nonexistent.h>
19885 _ACEOF
19886 if { (eval echo "$as_me:19886: \"$ac_cpp conftest.$ac_ext\"") >&5
19887   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19888   ac_status=$?
19889   egrep -v '^ *\+' conftest.er1 >conftest.err
19890   rm -f conftest.er1
19891   cat conftest.err >&5
19892   echo "$as_me:19892: \$? = $ac_status" >&5
19893   (exit $ac_status); } >/dev/null; then
19894   if test -s conftest.err; then
19895     ac_cpp_err=$ac_cxx_preproc_warn_flag
19896   else
19897     ac_cpp_err=
19898   fi
19899 else
19900   ac_cpp_err=yes
19901 fi
19902 if test -z "$ac_cpp_err"; then
19903   # Broken: success on invalid input.
19904 continue
19905 else
19906   echo "$as_me: failed program was:" >&5
19907   cat conftest.$ac_ext >&5
19908   # Passes both tests.
19909 ac_preproc_ok=:
19910 break
19911 fi
19912 rm -f conftest.err conftest.$ac_ext
19913
19914 done
19915 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19916 rm -f conftest.err conftest.$ac_ext
19917 if $ac_preproc_ok; then
19918   :
19919 else
19920   { { echo "$as_me:19920: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19921 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19922    { (exit 1); exit 1; }; }
19923 fi
19924
19925 ac_ext=cc
19926 ac_cpp='$CXXCPP $CPPFLAGS'
19927 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19928 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19929 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19930 ac_main_return=return
19931
19932 for ac_header in typeinfo
19933 do
19934 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19935 echo "$as_me:19935: checking for $ac_header" >&5
19936 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19937 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19938   echo $ECHO_N "(cached) $ECHO_C" >&6
19939 else
19940   cat >conftest.$ac_ext <<_ACEOF
19941 #line 19941 "configure"
19942 #include "confdefs.h"
19943 #include <$ac_header>
19944 _ACEOF
19945 if { (eval echo "$as_me:19945: \"$ac_cpp conftest.$ac_ext\"") >&5
19946   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19947   ac_status=$?
19948   egrep -v '^ *\+' conftest.er1 >conftest.err
19949   rm -f conftest.er1
19950   cat conftest.err >&5
19951   echo "$as_me:19951: \$? = $ac_status" >&5
19952   (exit $ac_status); } >/dev/null; then
19953   if test -s conftest.err; then
19954     ac_cpp_err=$ac_cxx_preproc_warn_flag
19955   else
19956     ac_cpp_err=
19957   fi
19958 else
19959   ac_cpp_err=yes
19960 fi
19961 if test -z "$ac_cpp_err"; then
19962   eval "$as_ac_Header=yes"
19963 else
19964   echo "$as_me: failed program was:" >&5
19965   cat conftest.$ac_ext >&5
19966   eval "$as_ac_Header=no"
19967 fi
19968 rm -f conftest.err conftest.$ac_ext
19969 fi
19970 echo "$as_me:19970: result: `eval echo '${'$as_ac_Header'}'`" >&5
19971 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19972 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19973   cat >>confdefs.h <<EOF
19974 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19975 EOF
19976
19977 fi
19978 done
19979
19980 for ac_header in iostream
19981 do
19982 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19983 echo "$as_me:19983: checking for $ac_header" >&5
19984 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19985 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19986   echo $ECHO_N "(cached) $ECHO_C" >&6
19987 else
19988   cat >conftest.$ac_ext <<_ACEOF
19989 #line 19989 "configure"
19990 #include "confdefs.h"
19991 #include <$ac_header>
19992 _ACEOF
19993 if { (eval echo "$as_me:19993: \"$ac_cpp conftest.$ac_ext\"") >&5
19994   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19995   ac_status=$?
19996   egrep -v '^ *\+' conftest.er1 >conftest.err
19997   rm -f conftest.er1
19998   cat conftest.err >&5
19999   echo "$as_me:19999: \$? = $ac_status" >&5
20000   (exit $ac_status); } >/dev/null; then
20001   if test -s conftest.err; then
20002     ac_cpp_err=$ac_cxx_preproc_warn_flag
20003   else
20004     ac_cpp_err=
20005   fi
20006 else
20007   ac_cpp_err=yes
20008 fi
20009 if test -z "$ac_cpp_err"; then
20010   eval "$as_ac_Header=yes"
20011 else
20012   echo "$as_me: failed program was:" >&5
20013   cat conftest.$ac_ext >&5
20014   eval "$as_ac_Header=no"
20015 fi
20016 rm -f conftest.err conftest.$ac_ext
20017 fi
20018 echo "$as_me:20018: result: `eval echo '${'$as_ac_Header'}'`" >&5
20019 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20020 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20021   cat >>confdefs.h <<EOF
20022 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20023 EOF
20024
20025 fi
20026 done
20027
20028 if test x"$ac_cv_header_iostream" = xyes ; then
20029         echo "$as_me:20029: checking if iostream uses std-namespace" >&5
20030 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20031         cat >conftest.$ac_ext <<_ACEOF
20032 #line 20032 "configure"
20033 #include "confdefs.h"
20034
20035 #include <iostream>
20036 using std::endl;
20037 using std::cerr;
20038 int
20039 main ()
20040 {
20041
20042 cerr << "testing" << endl;
20043
20044   ;
20045   return 0;
20046 }
20047 _ACEOF
20048 rm -f conftest.$ac_objext
20049 if { (eval echo "$as_me:20049: \"$ac_compile\"") >&5
20050   (eval $ac_compile) 2>&5
20051   ac_status=$?
20052   echo "$as_me:20052: \$? = $ac_status" >&5
20053   (exit $ac_status); } &&
20054          { ac_try='test -s conftest.$ac_objext'
20055   { (eval echo "$as_me:20055: \"$ac_try\"") >&5
20056   (eval $ac_try) 2>&5
20057   ac_status=$?
20058   echo "$as_me:20058: \$? = $ac_status" >&5
20059   (exit $ac_status); }; }; then
20060   cf_iostream_namespace=yes
20061 else
20062   echo "$as_me: failed program was:" >&5
20063 cat conftest.$ac_ext >&5
20064 cf_iostream_namespace=no
20065 fi
20066 rm -f conftest.$ac_objext conftest.$ac_ext
20067         echo "$as_me:20067: result: $cf_iostream_namespace" >&5
20068 echo "${ECHO_T}$cf_iostream_namespace" >&6
20069         if test "$cf_iostream_namespace" = yes ; then
20070
20071 cat >>confdefs.h <<\EOF
20072 #define IOSTREAM_NAMESPACE 1
20073 EOF
20074
20075         fi
20076 fi
20077
20078 echo "$as_me:20078: checking if we should include stdbool.h" >&5
20079 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20080
20081 if test "${cf_cv_header_stdbool_h+set}" = set; then
20082   echo $ECHO_N "(cached) $ECHO_C" >&6
20083 else
20084
20085         cat >conftest.$ac_ext <<_ACEOF
20086 #line 20086 "configure"
20087 #include "confdefs.h"
20088
20089 int
20090 main ()
20091 {
20092 bool foo = false
20093   ;
20094   return 0;
20095 }
20096 _ACEOF
20097 rm -f conftest.$ac_objext
20098 if { (eval echo "$as_me:20098: \"$ac_compile\"") >&5
20099   (eval $ac_compile) 2>&5
20100   ac_status=$?
20101   echo "$as_me:20101: \$? = $ac_status" >&5
20102   (exit $ac_status); } &&
20103          { ac_try='test -s conftest.$ac_objext'
20104   { (eval echo "$as_me:20104: \"$ac_try\"") >&5
20105   (eval $ac_try) 2>&5
20106   ac_status=$?
20107   echo "$as_me:20107: \$? = $ac_status" >&5
20108   (exit $ac_status); }; }; then
20109   cf_cv_header_stdbool_h=0
20110 else
20111   echo "$as_me: failed program was:" >&5
20112 cat conftest.$ac_ext >&5
20113 cat >conftest.$ac_ext <<_ACEOF
20114 #line 20114 "configure"
20115 #include "confdefs.h"
20116
20117 #ifndef __BEOS__
20118 #include <stdbool.h>
20119 #endif
20120
20121 int
20122 main ()
20123 {
20124 bool foo = false
20125   ;
20126   return 0;
20127 }
20128 _ACEOF
20129 rm -f conftest.$ac_objext
20130 if { (eval echo "$as_me:20130: \"$ac_compile\"") >&5
20131   (eval $ac_compile) 2>&5
20132   ac_status=$?
20133   echo "$as_me:20133: \$? = $ac_status" >&5
20134   (exit $ac_status); } &&
20135          { ac_try='test -s conftest.$ac_objext'
20136   { (eval echo "$as_me:20136: \"$ac_try\"") >&5
20137   (eval $ac_try) 2>&5
20138   ac_status=$?
20139   echo "$as_me:20139: \$? = $ac_status" >&5
20140   (exit $ac_status); }; }; then
20141   cf_cv_header_stdbool_h=1
20142 else
20143   echo "$as_me: failed program was:" >&5
20144 cat conftest.$ac_ext >&5
20145 cf_cv_header_stdbool_h=0
20146 fi
20147 rm -f conftest.$ac_objext conftest.$ac_ext
20148 fi
20149 rm -f conftest.$ac_objext conftest.$ac_ext
20150 fi
20151
20152 if test "$cf_cv_header_stdbool_h" = 1
20153 then    echo "$as_me:20153: result: yes" >&5
20154 echo "${ECHO_T}yes" >&6
20155 else    echo "$as_me:20155: result: no" >&5
20156 echo "${ECHO_T}no" >&6
20157 fi
20158
20159 echo "$as_me:20159: checking for builtin bool type" >&5
20160 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20161
20162 if test "${cf_cv_builtin_bool+set}" = set; then
20163   echo $ECHO_N "(cached) $ECHO_C" >&6
20164 else
20165
20166         cat >conftest.$ac_ext <<_ACEOF
20167 #line 20167 "configure"
20168 #include "confdefs.h"
20169
20170 #include <stdio.h>
20171 #include <sys/types.h>
20172
20173 int
20174 main ()
20175 {
20176 bool x = false
20177   ;
20178   return 0;
20179 }
20180 _ACEOF
20181 rm -f conftest.$ac_objext
20182 if { (eval echo "$as_me:20182: \"$ac_compile\"") >&5
20183   (eval $ac_compile) 2>&5
20184   ac_status=$?
20185   echo "$as_me:20185: \$? = $ac_status" >&5
20186   (exit $ac_status); } &&
20187          { ac_try='test -s conftest.$ac_objext'
20188   { (eval echo "$as_me:20188: \"$ac_try\"") >&5
20189   (eval $ac_try) 2>&5
20190   ac_status=$?
20191   echo "$as_me:20191: \$? = $ac_status" >&5
20192   (exit $ac_status); }; }; then
20193   cf_cv_builtin_bool=1
20194 else
20195   echo "$as_me: failed program was:" >&5
20196 cat conftest.$ac_ext >&5
20197 cf_cv_builtin_bool=0
20198 fi
20199 rm -f conftest.$ac_objext conftest.$ac_ext
20200
20201 fi
20202
20203 if test "$cf_cv_builtin_bool" = 1
20204 then    echo "$as_me:20204: result: yes" >&5
20205 echo "${ECHO_T}yes" >&6
20206 else    echo "$as_me:20206: result: no" >&5
20207 echo "${ECHO_T}no" >&6
20208 fi
20209
20210 echo "$as_me:20210: checking for size of bool" >&5
20211 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20212 if test "${cf_cv_type_of_bool+set}" = set; then
20213   echo $ECHO_N "(cached) $ECHO_C" >&6
20214 else
20215
20216         rm -f cf_test.out
20217         if test "$cross_compiling" = yes; then
20218   cf_cv_type_of_bool=unknown
20219 else
20220   cat >conftest.$ac_ext <<_ACEOF
20221 #line 20221 "configure"
20222 #include "confdefs.h"
20223
20224 #include <stdlib.h>
20225 #include <stdio.h>
20226
20227 #if defined(__cplusplus)
20228
20229 #ifdef HAVE_GXX_BUILTIN_H
20230 #include <g++/builtin.h>
20231 #elif HAVE_GPP_BUILTIN_H
20232 #include <gpp/builtin.h>
20233 #elif HAVE_BUILTIN_H
20234 #include <builtin.h>
20235 #endif
20236
20237 #else
20238
20239 #if $cf_cv_header_stdbool_h
20240 #include <stdbool.h>
20241 #endif
20242
20243 #endif
20244
20245 int main()
20246 {
20247         FILE *fp = fopen("cf_test.out", "w");
20248         if (fp != 0) {
20249                 bool x = true;
20250                 if ((bool)(-x) >= 0)
20251                         fputs("unsigned ", fp);
20252                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20253                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20254                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20255                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20256                 fclose(fp);
20257         }
20258         ${cf_cv_main_return:-return}(0);
20259 }
20260
20261 _ACEOF
20262 rm -f conftest$ac_exeext
20263 if { (eval echo "$as_me:20263: \"$ac_link\"") >&5
20264   (eval $ac_link) 2>&5
20265   ac_status=$?
20266   echo "$as_me:20266: \$? = $ac_status" >&5
20267   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20268   { (eval echo "$as_me:20268: \"$ac_try\"") >&5
20269   (eval $ac_try) 2>&5
20270   ac_status=$?
20271   echo "$as_me:20271: \$? = $ac_status" >&5
20272   (exit $ac_status); }; }; then
20273   cf_cv_type_of_bool=`cat cf_test.out`
20274                  if test -z "$cf_cv_type_of_bool"; then
20275                    cf_cv_type_of_bool=unknown
20276                  fi
20277 else
20278   echo "$as_me: program exited with status $ac_status" >&5
20279 echo "$as_me: failed program was:" >&5
20280 cat conftest.$ac_ext >&5
20281 cf_cv_type_of_bool=unknown
20282 fi
20283 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20284 fi
20285
20286 fi
20287
20288         rm -f cf_test.out
20289 echo "$as_me:20289: result: $cf_cv_type_of_bool" >&5
20290 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20291 if test "$cf_cv_type_of_bool" = unknown ; then
20292         case .$NCURSES_BOOL in
20293         (.auto|.) NCURSES_BOOL=unsigned;;
20294         esac
20295         { echo "$as_me:20295: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20296 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20297         cf_cv_type_of_bool=$NCURSES_BOOL
20298 fi
20299
20300 echo "$as_me:20300: checking for special defines needed for etip.h" >&5
20301 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20302 cf_save_CXXFLAGS="$CXXFLAGS"
20303 cf_result="none"
20304
20305 # etip.h includes ncurses.h which includes ncurses_dll.h
20306 # But ncurses_dll.h is generated - fix here.
20307 test -d include || mkdir include
20308 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
20309
20310 for cf_math in "" MATH_H
20311 do
20312 for cf_excp in "" MATH_EXCEPTION
20313 do
20314         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20315         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20316         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20317 cat >conftest.$ac_ext <<_ACEOF
20318 #line 20318 "configure"
20319 #include "confdefs.h"
20320
20321 #include <etip.h.in>
20322
20323 int
20324 main ()
20325 {
20326
20327   ;
20328   return 0;
20329 }
20330 _ACEOF
20331 rm -f conftest.$ac_objext
20332 if { (eval echo "$as_me:20332: \"$ac_compile\"") >&5
20333   (eval $ac_compile) 2>&5
20334   ac_status=$?
20335   echo "$as_me:20335: \$? = $ac_status" >&5
20336   (exit $ac_status); } &&
20337          { ac_try='test -s conftest.$ac_objext'
20338   { (eval echo "$as_me:20338: \"$ac_try\"") >&5
20339   (eval $ac_try) 2>&5
20340   ac_status=$?
20341   echo "$as_me:20341: \$? = $ac_status" >&5
20342   (exit $ac_status); }; }; then
20343
20344         test -n "$cf_math" && cat >>confdefs.h <<EOF
20345 #define ETIP_NEEDS_${cf_math} 1
20346 EOF
20347
20348         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20349 #define ETIP_NEEDS_${cf_excp} 1
20350 EOF
20351
20352         cf_result="$cf_math $cf_excp"
20353         break 2
20354
20355 else
20356   echo "$as_me: failed program was:" >&5
20357 cat conftest.$ac_ext >&5
20358 fi
20359 rm -f conftest.$ac_objext conftest.$ac_ext
20360 done
20361 done
20362 echo "$as_me:20362: result: $cf_result" >&5
20363 echo "${ECHO_T}$cf_result" >&6
20364 CXXFLAGS="$cf_save_CXXFLAGS"
20365
20366 if test -n "$CXX"; then
20367 echo "$as_me:20367: checking if $CXX accepts parameter initialization" >&5
20368 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20369 if test "${cf_cv_cpp_param_init+set}" = set; then
20370   echo $ECHO_N "(cached) $ECHO_C" >&6
20371 else
20372
20373         ac_ext=cc
20374 ac_cpp='$CXXCPP $CPPFLAGS'
20375 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20376 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20377 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20378 ac_main_return=return
20379
20380         if test "$cross_compiling" = yes; then
20381   cf_cv_cpp_param_init=unknown
20382 else
20383   cat >conftest.$ac_ext <<_ACEOF
20384 #line 20384 "configure"
20385 #include "confdefs.h"
20386
20387 class TEST {
20388 private:
20389         int value;
20390 public:
20391         TEST(int x = 1);
20392         ~TEST();
20393 };
20394
20395 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20396 {
20397         value = x;
20398 }
20399 int main() { }
20400
20401 _ACEOF
20402 rm -f conftest$ac_exeext
20403 if { (eval echo "$as_me:20403: \"$ac_link\"") >&5
20404   (eval $ac_link) 2>&5
20405   ac_status=$?
20406   echo "$as_me:20406: \$? = $ac_status" >&5
20407   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20408   { (eval echo "$as_me:20408: \"$ac_try\"") >&5
20409   (eval $ac_try) 2>&5
20410   ac_status=$?
20411   echo "$as_me:20411: \$? = $ac_status" >&5
20412   (exit $ac_status); }; }; then
20413   cf_cv_cpp_param_init=yes
20414 else
20415   echo "$as_me: program exited with status $ac_status" >&5
20416 echo "$as_me: failed program was:" >&5
20417 cat conftest.$ac_ext >&5
20418 cf_cv_cpp_param_init=no
20419 fi
20420 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20421 fi
20422         ac_ext=cc
20423 ac_cpp='$CXXCPP $CPPFLAGS'
20424 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20425 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20426 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20427 ac_main_return=return
20428
20429 fi
20430 echo "$as_me:20430: result: $cf_cv_cpp_param_init" >&5
20431 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20432 fi
20433 test "$cf_cv_cpp_param_init" = yes &&
20434 cat >>confdefs.h <<\EOF
20435 #define CPP_HAS_PARAM_INIT 1
20436 EOF
20437
20438 if test -n "$CXX"; then
20439
20440 echo "$as_me:20440: checking if $CXX accepts static_cast" >&5
20441 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20442 if test "${cf_cv_cpp_static_cast+set}" = set; then
20443   echo $ECHO_N "(cached) $ECHO_C" >&6
20444 else
20445
20446         ac_ext=cc
20447 ac_cpp='$CXXCPP $CPPFLAGS'
20448 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20449 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20450 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20451 ac_main_return=return
20452
20453         cat >conftest.$ac_ext <<_ACEOF
20454 #line 20454 "configure"
20455 #include "confdefs.h"
20456
20457 class NCursesPanel
20458 {
20459 public:
20460   NCursesPanel(int nlines,
20461                int ncols,
20462                int begin_y = 0,
20463                int begin_x = 0)
20464   {
20465   }
20466   NCursesPanel();
20467   ~NCursesPanel();
20468 };
20469
20470 template<class T> class NCursesUserPanel : public NCursesPanel
20471 {
20472 public:
20473   NCursesUserPanel (int nlines,
20474                     int ncols,
20475                     int begin_y = 0,
20476                     int begin_x = 0,
20477                     const T* p_UserData = static_cast<T*>(0))
20478     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20479   {
20480   };
20481   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20482   {
20483   };
20484
20485   virtual ~NCursesUserPanel() {};
20486 };
20487
20488 int
20489 main ()
20490 {
20491
20492         const char* p_UserData = static_cast<char*>(0)
20493   ;
20494   return 0;
20495 }
20496 _ACEOF
20497 rm -f conftest.$ac_objext
20498 if { (eval echo "$as_me:20498: \"$ac_compile\"") >&5
20499   (eval $ac_compile) 2>&5
20500   ac_status=$?
20501   echo "$as_me:20501: \$? = $ac_status" >&5
20502   (exit $ac_status); } &&
20503          { ac_try='test -s conftest.$ac_objext'
20504   { (eval echo "$as_me:20504: \"$ac_try\"") >&5
20505   (eval $ac_try) 2>&5
20506   ac_status=$?
20507   echo "$as_me:20507: \$? = $ac_status" >&5
20508   (exit $ac_status); }; }; then
20509   cf_cv_cpp_static_cast=yes
20510 else
20511   echo "$as_me: failed program was:" >&5
20512 cat conftest.$ac_ext >&5
20513 cf_cv_cpp_static_cast=no
20514 fi
20515 rm -f conftest.$ac_objext conftest.$ac_ext
20516
20517         ac_ext=cc
20518 ac_cpp='$CXXCPP $CPPFLAGS'
20519 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20520 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20521 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20522 ac_main_return=return
20523
20524 fi
20525 echo "$as_me:20525: result: $cf_cv_cpp_static_cast" >&5
20526 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20527
20528 fi
20529
20530 test "$cf_cv_cpp_static_cast" = yes &&
20531 cat >>confdefs.h <<\EOF
20532 #define CPP_HAS_STATIC_CAST 1
20533 EOF
20534
20535         CXX_AR='$(AR)'
20536         CXX_ARFLAGS='$(ARFLAGS)'
20537         case $cf_cv_system_name in
20538         (irix*)
20539             if test "$GXX" != yes ; then
20540                 CXX_AR='$(CXX)'
20541                 CXX_ARFLAGS='-ar -o'
20542             fi
20543             ;;
20544         (sco3.2v5*)
20545             CXXLDFLAGS="-u main"
20546             ;;
20547         (solaris2*)
20548             if test "$GXX" != yes ; then
20549                 CXX_AR='$(CXX)'
20550                 CXX_ARFLAGS='-xar -o'
20551             fi
20552             ;;
20553         esac
20554
20555 else
20556         cf_cxx_library=no
20557         cf_cv_builtin_bool=1
20558
20559         # Just because we are not configuring against C++ right now does not
20560         # mean that a user will not want to use C++.  Some distributors disable
20561         # the C++ portion of this configuration as a shortcut (or just to avoid
20562         # compiling the demo in the c++ directory).  So we need a reasonable
20563         # default for the 'bool' type.
20564         #
20565         # Caveat: since the storage of the bool type is not standardized, it
20566         # may change.
20567
20568         if test "$NCURSES_BOOL" != auto ; then
20569                 cf_cv_type_of_bool=$NCURSES_BOOL
20570                 cf_cv_header_stdbool_h=0
20571         else
20572                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20573
20574 echo "$as_me:20574: checking for size of bool" >&5
20575 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20576 if test "${cf_cv_type_of_bool+set}" = set; then
20577   echo $ECHO_N "(cached) $ECHO_C" >&6
20578 else
20579
20580         rm -f cf_test.out
20581         if test "$cross_compiling" = yes; then
20582   cf_cv_type_of_bool=unknown
20583 else
20584   cat >conftest.$ac_ext <<_ACEOF
20585 #line 20585 "configure"
20586 #include "confdefs.h"
20587
20588 #include <stdlib.h>
20589 #include <stdio.h>
20590
20591 #if defined(__cplusplus)
20592
20593 #ifdef HAVE_GXX_BUILTIN_H
20594 #include <g++/builtin.h>
20595 #elif HAVE_GPP_BUILTIN_H
20596 #include <gpp/builtin.h>
20597 #elif HAVE_BUILTIN_H
20598 #include <builtin.h>
20599 #endif
20600
20601 #else
20602
20603 #if $cf_cv_header_stdbool_h
20604 #include <stdbool.h>
20605 #endif
20606
20607 #endif
20608
20609 int main()
20610 {
20611         FILE *fp = fopen("cf_test.out", "w");
20612         if (fp != 0) {
20613                 bool x = true;
20614                 if ((bool)(-x) >= 0)
20615                         fputs("unsigned ", fp);
20616                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20617                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20618                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20619                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20620                 fclose(fp);
20621         }
20622         ${cf_cv_main_return:-return}(0);
20623 }
20624
20625 _ACEOF
20626 rm -f conftest$ac_exeext
20627 if { (eval echo "$as_me:20627: \"$ac_link\"") >&5
20628   (eval $ac_link) 2>&5
20629   ac_status=$?
20630   echo "$as_me:20630: \$? = $ac_status" >&5
20631   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20632   { (eval echo "$as_me:20632: \"$ac_try\"") >&5
20633   (eval $ac_try) 2>&5
20634   ac_status=$?
20635   echo "$as_me:20635: \$? = $ac_status" >&5
20636   (exit $ac_status); }; }; then
20637   cf_cv_type_of_bool=`cat cf_test.out`
20638                  if test -z "$cf_cv_type_of_bool"; then
20639                    cf_cv_type_of_bool=unknown
20640                  fi
20641 else
20642   echo "$as_me: program exited with status $ac_status" >&5
20643 echo "$as_me: failed program was:" >&5
20644 cat conftest.$ac_ext >&5
20645 cf_cv_type_of_bool=unknown
20646 fi
20647 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20648 fi
20649
20650 fi
20651
20652         rm -f cf_test.out
20653 echo "$as_me:20653: result: $cf_cv_type_of_bool" >&5
20654 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20655 if test "$cf_cv_type_of_bool" = unknown ; then
20656         case .$NCURSES_BOOL in
20657         (.auto|.) NCURSES_BOOL=unsigned;;
20658         esac
20659         { echo "$as_me:20659: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20660 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20661         cf_cv_type_of_bool=$NCURSES_BOOL
20662 fi
20663
20664                 else
20665                         echo "$as_me:20665: checking for fallback type of bool" >&5
20666 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20667                         case "$host_cpu" in
20668                         (i?86)  cf_cv_type_of_bool=char ;;
20669                         (*)     cf_cv_type_of_bool=int  ;;
20670                         esac
20671                         echo "$as_me:20671: result: $cf_cv_type_of_bool" >&5
20672 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20673                 fi
20674         fi
20675 fi
20676
20677 # If the C compiler did not declare bool, and we did not determine that the C++
20678 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20679 # ncurses library use the same type as C++ bool.  Note that this allows one to
20680 # specify the type of bool in a configure-script option and postpone
20681 # integration with the C++ compiler provided that the types are compatible.
20682 USE_CXX_BOOL=1
20683 if test $cf_cv_cc_bool_type = 1
20684 then
20685         # oops: C has a bool.  Unlikely, but C++ could differ.
20686         USE_CXX_BOOL=0
20687 elif test $cf_cv_builtin_bool = 0
20688 then
20689         # C++ has no bool
20690         USE_CXX_BOOL=0
20691 else
20692         # this is the normal case
20693         USE_CXX_BOOL='defined(__cplusplus)'
20694 fi
20695
20696 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20697
20698         if test "$cf_with_ada" != "no" ; then
20699                 if test "$with_libtool" != "no"; then
20700                         { echo "$as_me:20700: WARNING: libtool does not support Ada - disabling feature" >&5
20701 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20702                         cf_with_ada=no
20703                 fi
20704         fi
20705
20706         if test "$cf_with_ada" != "no" ; then
20707
20708 cf_ada_make=gnatmake
20709 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20710 set dummy $cf_ada_make; ac_word=$2
20711 echo "$as_me:20711: checking for $ac_word" >&5
20712 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20713 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20714   echo $ECHO_N "(cached) $ECHO_C" >&6
20715 else
20716   if test -n "$gnat_exists"; then
20717   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20718 else
20719   ac_save_IFS=$IFS; IFS=$ac_path_separator
20720 ac_dummy="$PATH"
20721 for ac_dir in $ac_dummy; do
20722   IFS=$ac_save_IFS
20723   test -z "$ac_dir" && ac_dir=.
20724   $as_executable_p "$ac_dir/$ac_word" || continue
20725 ac_cv_prog_gnat_exists="yes"
20726 echo "$as_me:20726: found $ac_dir/$ac_word" >&5
20727 break
20728 done
20729
20730   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20731 fi
20732 fi
20733 gnat_exists=$ac_cv_prog_gnat_exists
20734 if test -n "$gnat_exists"; then
20735   echo "$as_me:20735: result: $gnat_exists" >&5
20736 echo "${ECHO_T}$gnat_exists" >&6
20737 else
20738   echo "$as_me:20738: result: no" >&5
20739 echo "${ECHO_T}no" >&6
20740 fi
20741
20742 if test "$ac_cv_prog_gnat_exists" = no; then
20743         cf_ada_make=
20744         cf_cv_prog_gnat_correct=no
20745 else
20746
20747 echo "$as_me:20747: checking for gnat version" >&5
20748 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20749 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20750         grep '[0-9].[0-9][0-9]*' |\
20751         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20752 echo "$as_me:20752: result: $cf_gnat_version" >&5
20753 echo "${ECHO_T}$cf_gnat_version" >&6
20754
20755 case $cf_gnat_version in
20756 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20757         cf_cv_prog_gnat_correct=yes
20758         ;;
20759 (*)
20760         { echo "$as_me:20760: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20761 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20762         cf_cv_prog_gnat_correct=no
20763         ;;
20764 esac
20765
20766         # Extract the first word of "m4", so it can be a program name with args.
20767 set dummy m4; ac_word=$2
20768 echo "$as_me:20768: checking for $ac_word" >&5
20769 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20770 if test "${ac_cv_prog_M4_exists+set}" = set; then
20771   echo $ECHO_N "(cached) $ECHO_C" >&6
20772 else
20773   if test -n "$M4_exists"; then
20774   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20775 else
20776   ac_save_IFS=$IFS; IFS=$ac_path_separator
20777 ac_dummy="$PATH"
20778 for ac_dir in $ac_dummy; do
20779   IFS=$ac_save_IFS
20780   test -z "$ac_dir" && ac_dir=.
20781   $as_executable_p "$ac_dir/$ac_word" || continue
20782 ac_cv_prog_M4_exists="yes"
20783 echo "$as_me:20783: found $ac_dir/$ac_word" >&5
20784 break
20785 done
20786
20787   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20788 fi
20789 fi
20790 M4_exists=$ac_cv_prog_M4_exists
20791 if test -n "$M4_exists"; then
20792   echo "$as_me:20792: result: $M4_exists" >&5
20793 echo "${ECHO_T}$M4_exists" >&6
20794 else
20795   echo "$as_me:20795: result: no" >&5
20796 echo "${ECHO_T}no" >&6
20797 fi
20798
20799         if test "$ac_cv_prog_M4_exists" = no; then
20800                 cf_cv_prog_gnat_correct=no
20801                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20802         fi
20803         if test "$cf_cv_prog_gnat_correct" = yes; then
20804                 echo "$as_me:20804: checking if GNAT works" >&5
20805 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20806
20807 rm -rf conftest* *~conftest*
20808 cat >>conftest.ads <<CF_EOF
20809 procedure conftest;
20810 CF_EOF
20811 cat >>conftest.adb <<CF_EOF
20812 with Text_IO;
20813 with GNAT.OS_Lib;
20814 procedure conftest is
20815 begin
20816    Text_IO.Put ("Hello World");
20817    Text_IO.New_Line;
20818    GNAT.OS_Lib.OS_Exit (0);
20819 end conftest;
20820 CF_EOF
20821 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20822    if ( ./conftest 1>&5 2>&1 ) ; then
20823       cf_cv_prog_gnat_correct=yes
20824    else
20825       cf_cv_prog_gnat_correct=no
20826    fi
20827 else
20828    cf_cv_prog_gnat_correct=no
20829 fi
20830 rm -rf conftest* *~conftest*
20831
20832                 echo "$as_me:20832: result: $cf_cv_prog_gnat_correct" >&5
20833 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20834         fi
20835 fi
20836
20837                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20838
20839         ADAFLAGS="$ADAFLAGS -gnatpn"
20840
20841         echo "$as_me:20841: checking optimization options for ADAFLAGS" >&5
20842 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20843         case "$CFLAGS" in
20844         (*-g*)
20845
20846         ADAFLAGS="$ADAFLAGS -g"
20847
20848                 ;;
20849         esac
20850         case "$CFLAGS" in
20851         (*-O*)
20852                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20853
20854         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20855
20856                 ;;
20857         esac
20858         echo "$as_me:20858: result: $ADAFLAGS" >&5
20859 echo "${ECHO_T}$ADAFLAGS" >&6
20860
20861 echo "$as_me:20861: checking if GNATPREP supports -T option" >&5
20862 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20863 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20864   echo $ECHO_N "(cached) $ECHO_C" >&6
20865 else
20866
20867 cf_cv_gnatprep_opt_t=no
20868 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20869
20870 fi
20871 echo "$as_me:20871: result: $cf_cv_gnatprep_opt_t" >&5
20872 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20873 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20874
20875 echo "$as_me:20875: checking if GNAT supports generics" >&5
20876 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20877 case $cf_gnat_version in
20878 (3.[1-9]*|[4-9].*)
20879         cf_gnat_generics=yes
20880         ;;
20881 (*)
20882         cf_gnat_generics=no
20883         ;;
20884 esac
20885 echo "$as_me:20885: result: $cf_gnat_generics" >&5
20886 echo "${ECHO_T}$cf_gnat_generics" >&6
20887
20888 if test "$cf_gnat_generics" = yes
20889 then
20890         cf_compile_generics=generics
20891         cf_generic_objects="\${GENOBJS}"
20892 else
20893         cf_compile_generics=
20894         cf_generic_objects=
20895 fi
20896
20897 echo "$as_me:20897: checking if GNAT supports SIGINT" >&5
20898 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20899 if test "${cf_cv_gnat_sigint+set}" = set; then
20900   echo $ECHO_N "(cached) $ECHO_C" >&6
20901 else
20902
20903 rm -rf conftest* *~conftest*
20904 cat >>conftest.ads <<CF_EOF
20905 with Ada.Interrupts.Names;
20906
20907 package ConfTest is
20908
20909    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20910    pragma Unreserve_All_Interrupts;
20911    pragma Warnings (On);
20912
20913    protected Process is
20914       procedure Stop;
20915       function Continue return Boolean;
20916       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20917    private
20918       Done : Boolean := False;
20919    end Process;
20920
20921 end ConfTest;
20922 CF_EOF
20923 cat >>conftest.adb <<CF_EOF
20924 package body ConfTest is
20925    protected body Process is
20926       procedure Stop is
20927       begin
20928          Done := True;
20929       end Stop;
20930       function Continue return Boolean is
20931       begin
20932          return not Done;
20933       end Continue;
20934    end Process;
20935 end ConfTest;
20936 CF_EOF
20937 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20938       cf_cv_gnat_sigint=yes
20939 else
20940    cf_cv_gnat_sigint=no
20941 fi
20942 rm -rf conftest* *~conftest*
20943
20944 fi
20945 echo "$as_me:20945: result: $cf_cv_gnat_sigint" >&5
20946 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20947
20948 if test $cf_cv_gnat_sigint = yes ; then
20949         USE_GNAT_SIGINT=""
20950 else
20951         USE_GNAT_SIGINT="#"
20952 fi
20953
20954 cf_gnat_libraries=no
20955 cf_gnat_projects=no
20956
20957 if test "$enable_gnat_projects" != no ; then
20958 echo "$as_me:20958: checking if GNAT supports project files" >&5
20959 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20960 case $cf_gnat_version in
20961 (3.[0-9]*)
20962         ;;
20963 (*)
20964         case $cf_cv_system_name in
20965         (cygwin*|msys*)
20966                 ;;
20967         (*)
20968                 mkdir conftest.src conftest.bin conftest.lib
20969                 cd conftest.src
20970                 rm -rf conftest* *~conftest*
20971                 cat >>library.gpr <<CF_EOF
20972 project Library is
20973   Kind := External ("LIB_KIND");
20974   for Library_Name use "ConfTest";
20975   for Object_Dir use ".";
20976   for Library_ALI_Dir use External("LIBRARY_DIR");
20977   for Library_Version use External ("SONAME");
20978   for Library_Kind use Kind;
20979   for Library_Dir use External("BUILD_DIR");
20980   Source_Dir := External ("SOURCE_DIR");
20981   for Source_Dirs use (Source_Dir);
20982 end Library;
20983 CF_EOF
20984                 cat >>confpackage.ads <<CF_EOF
20985 package ConfPackage is
20986    procedure conftest;
20987 end ConfPackage;
20988 CF_EOF
20989                 cat >>confpackage.adb <<CF_EOF
20990 with Text_IO;
20991 package body ConfPackage is
20992    procedure conftest is
20993    begin
20994       Text_IO.Put ("Hello World");
20995       Text_IO.New_Line;
20996    end conftest;
20997 end ConfPackage;
20998 CF_EOF
20999                 if ( $cf_ada_make $ADAFLAGS \
21000                                 -Plibrary.gpr \
21001                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21002                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21003                                 -XSOURCE_DIR=`pwd` \
21004                                 -XSONAME=libConfTest.so.1 \
21005                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21006                         cf_gnat_projects=yes
21007                 fi
21008                 cd ..
21009                 if test -f conftest.lib/confpackage.ali
21010                 then
21011                         cf_gnat_libraries=yes
21012                 fi
21013                 rm -rf conftest* *~conftest*
21014                 ;;
21015         esac
21016         ;;
21017 esac
21018 echo "$as_me:21018: result: $cf_gnat_projects" >&5
21019 echo "${ECHO_T}$cf_gnat_projects" >&6
21020 fi # enable_gnat_projects
21021
21022 if test $cf_gnat_projects = yes
21023 then
21024         echo "$as_me:21024: checking if GNAT supports libraries" >&5
21025 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21026         echo "$as_me:21026: result: $cf_gnat_libraries" >&5
21027 echo "${ECHO_T}$cf_gnat_libraries" >&6
21028 fi
21029
21030 if test "$cf_gnat_projects" = yes
21031 then
21032         USE_OLD_MAKERULES="#"
21033         USE_GNAT_PROJECTS=""
21034 else
21035         USE_OLD_MAKERULES=""
21036         USE_GNAT_PROJECTS="#"
21037 fi
21038
21039 if test "$cf_gnat_libraries" = yes
21040 then
21041         USE_GNAT_LIBRARIES=""
21042 else
21043         USE_GNAT_LIBRARIES="#"
21044 fi
21045
21046 echo "$as_me:21046: checking for ada-compiler" >&5
21047 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21048
21049 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21050 if test "${with_ada_compiler+set}" = set; then
21051   withval="$with_ada_compiler"
21052   cf_ada_compiler=$withval
21053 else
21054   cf_ada_compiler=gnatmake
21055 fi;
21056
21057 echo "$as_me:21057: result: $cf_ada_compiler" >&5
21058 echo "${ECHO_T}$cf_ada_compiler" >&6
21059
21060                         cf_ada_package=terminal_interface
21061
21062 echo "$as_me:21062: checking for ada-include" >&5
21063 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21064
21065 # Check whether --with-ada-include or --without-ada-include was given.
21066 if test "${with_ada_include+set}" = set; then
21067   withval="$with_ada_include"
21068
21069 else
21070   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21071 fi; if test -n "$prefix/share/ada/adainclude" ; then
21072
21073 if test "x$prefix" != xNONE; then
21074         cf_path_syntax="$prefix"
21075 else
21076         cf_path_syntax="$ac_default_prefix"
21077 fi
21078
21079 case ".$withval" in
21080 (.\$\(*\)*|.\'*\'*)
21081         ;;
21082 (..|./*|.\\*)
21083         ;;
21084 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21085         ;;
21086 (.\${*prefix}*|.\${*dir}*)
21087         eval withval="$withval"
21088         case ".$withval" in
21089         (.NONE/*)
21090                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21091                 ;;
21092         esac
21093         ;;
21094 (.no|.NONE/*)
21095         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21096         ;;
21097 (*)
21098         { { echo "$as_me:21098: error: expected a pathname, not \"$withval\"" >&5
21099 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21100    { (exit 1); exit 1; }; }
21101         ;;
21102 esac
21103
21104 fi
21105 eval ADA_INCLUDE="$withval"
21106
21107 echo "$as_me:21107: result: $ADA_INCLUDE" >&5
21108 echo "${ECHO_T}$ADA_INCLUDE" >&6
21109
21110 echo "$as_me:21110: checking for ada-objects" >&5
21111 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21112
21113 # Check whether --with-ada-objects or --without-ada-objects was given.
21114 if test "${with_ada_objects+set}" = set; then
21115   withval="$with_ada_objects"
21116
21117 else
21118   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21119 fi; if test -n "$prefix/lib/ada/adalib" ; then
21120
21121 if test "x$prefix" != xNONE; then
21122         cf_path_syntax="$prefix"
21123 else
21124         cf_path_syntax="$ac_default_prefix"
21125 fi
21126
21127 case ".$withval" in
21128 (.\$\(*\)*|.\'*\'*)
21129         ;;
21130 (..|./*|.\\*)
21131         ;;
21132 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21133         ;;
21134 (.\${*prefix}*|.\${*dir}*)
21135         eval withval="$withval"
21136         case ".$withval" in
21137         (.NONE/*)
21138                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21139                 ;;
21140         esac
21141         ;;
21142 (.no|.NONE/*)
21143         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21144         ;;
21145 (*)
21146         { { echo "$as_me:21146: error: expected a pathname, not \"$withval\"" >&5
21147 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21148    { (exit 1); exit 1; }; }
21149         ;;
21150 esac
21151
21152 fi
21153 eval ADA_OBJECTS="$withval"
21154
21155 echo "$as_me:21155: result: $ADA_OBJECTS" >&5
21156 echo "${ECHO_T}$ADA_OBJECTS" >&6
21157
21158 echo "$as_me:21158: checking if an Ada95 shared-library should be built" >&5
21159 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21160
21161 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21162 if test "${with_ada_sharedlib+set}" = set; then
21163   withval="$with_ada_sharedlib"
21164   with_ada_sharedlib=$withval
21165 else
21166   with_ada_sharedlib=no
21167 fi;
21168 echo "$as_me:21168: result: $with_ada_sharedlib" >&5
21169 echo "${ECHO_T}$with_ada_sharedlib" >&6
21170
21171 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21172 MAKE_ADA_SHAREDLIB="#"
21173
21174 if test "x$with_ada_sharedlib" != xno
21175 then
21176         MAKE_ADA_SHAREDLIB=
21177         if test "x$with_ada_sharedlib" != xyes
21178         then
21179                 ADA_SHAREDLIB="$with_ada_sharedlib"
21180         fi
21181 fi
21182
21183                 fi
21184         fi
21185 else
21186         cf_with_ada=no
21187 fi
21188
21189 # do this "late" to avoid conflict with header-checks
21190 if test "x$with_widec" = xyes ; then
21191         echo "$as_me:21191: checking for wchar_t" >&5
21192 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21193 if test "${ac_cv_type_wchar_t+set}" = set; then
21194   echo $ECHO_N "(cached) $ECHO_C" >&6
21195 else
21196   cat >conftest.$ac_ext <<_ACEOF
21197 #line 21197 "configure"
21198 #include "confdefs.h"
21199 $ac_includes_default
21200 int
21201 main ()
21202 {
21203 if ((wchar_t *) 0)
21204   return 0;
21205 if (sizeof (wchar_t))
21206   return 0;
21207   ;
21208   return 0;
21209 }
21210 _ACEOF
21211 rm -f conftest.$ac_objext
21212 if { (eval echo "$as_me:21212: \"$ac_compile\"") >&5
21213   (eval $ac_compile) 2>&5
21214   ac_status=$?
21215   echo "$as_me:21215: \$? = $ac_status" >&5
21216   (exit $ac_status); } &&
21217          { ac_try='test -s conftest.$ac_objext'
21218   { (eval echo "$as_me:21218: \"$ac_try\"") >&5
21219   (eval $ac_try) 2>&5
21220   ac_status=$?
21221   echo "$as_me:21221: \$? = $ac_status" >&5
21222   (exit $ac_status); }; }; then
21223   ac_cv_type_wchar_t=yes
21224 else
21225   echo "$as_me: failed program was:" >&5
21226 cat conftest.$ac_ext >&5
21227 ac_cv_type_wchar_t=no
21228 fi
21229 rm -f conftest.$ac_objext conftest.$ac_ext
21230 fi
21231 echo "$as_me:21231: result: $ac_cv_type_wchar_t" >&5
21232 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21233
21234 echo "$as_me:21234: checking size of wchar_t" >&5
21235 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21236 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21237   echo $ECHO_N "(cached) $ECHO_C" >&6
21238 else
21239   if test "$ac_cv_type_wchar_t" = yes; then
21240   if test "$cross_compiling" = yes; then
21241   # Depending upon the size, compute the lo and hi bounds.
21242 cat >conftest.$ac_ext <<_ACEOF
21243 #line 21243 "configure"
21244 #include "confdefs.h"
21245 $ac_includes_default
21246 int
21247 main ()
21248 {
21249 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21250   ;
21251   return 0;
21252 }
21253 _ACEOF
21254 rm -f conftest.$ac_objext
21255 if { (eval echo "$as_me:21255: \"$ac_compile\"") >&5
21256   (eval $ac_compile) 2>&5
21257   ac_status=$?
21258   echo "$as_me:21258: \$? = $ac_status" >&5
21259   (exit $ac_status); } &&
21260          { ac_try='test -s conftest.$ac_objext'
21261   { (eval echo "$as_me:21261: \"$ac_try\"") >&5
21262   (eval $ac_try) 2>&5
21263   ac_status=$?
21264   echo "$as_me:21264: \$? = $ac_status" >&5
21265   (exit $ac_status); }; }; then
21266   ac_lo=0 ac_mid=0
21267   while :; do
21268     cat >conftest.$ac_ext <<_ACEOF
21269 #line 21269 "configure"
21270 #include "confdefs.h"
21271 $ac_includes_default
21272 int
21273 main ()
21274 {
21275 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21276   ;
21277   return 0;
21278 }
21279 _ACEOF
21280 rm -f conftest.$ac_objext
21281 if { (eval echo "$as_me:21281: \"$ac_compile\"") >&5
21282   (eval $ac_compile) 2>&5
21283   ac_status=$?
21284   echo "$as_me:21284: \$? = $ac_status" >&5
21285   (exit $ac_status); } &&
21286          { ac_try='test -s conftest.$ac_objext'
21287   { (eval echo "$as_me:21287: \"$ac_try\"") >&5
21288   (eval $ac_try) 2>&5
21289   ac_status=$?
21290   echo "$as_me:21290: \$? = $ac_status" >&5
21291   (exit $ac_status); }; }; then
21292   ac_hi=$ac_mid; break
21293 else
21294   echo "$as_me: failed program was:" >&5
21295 cat conftest.$ac_ext >&5
21296 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21297 fi
21298 rm -f conftest.$ac_objext conftest.$ac_ext
21299   done
21300 else
21301   echo "$as_me: failed program was:" >&5
21302 cat conftest.$ac_ext >&5
21303 ac_hi=-1 ac_mid=-1
21304   while :; do
21305     cat >conftest.$ac_ext <<_ACEOF
21306 #line 21306 "configure"
21307 #include "confdefs.h"
21308 $ac_includes_default
21309 int
21310 main ()
21311 {
21312 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21313   ;
21314   return 0;
21315 }
21316 _ACEOF
21317 rm -f conftest.$ac_objext
21318 if { (eval echo "$as_me:21318: \"$ac_compile\"") >&5
21319   (eval $ac_compile) 2>&5
21320   ac_status=$?
21321   echo "$as_me:21321: \$? = $ac_status" >&5
21322   (exit $ac_status); } &&
21323          { ac_try='test -s conftest.$ac_objext'
21324   { (eval echo "$as_me:21324: \"$ac_try\"") >&5
21325   (eval $ac_try) 2>&5
21326   ac_status=$?
21327   echo "$as_me:21327: \$? = $ac_status" >&5
21328   (exit $ac_status); }; }; then
21329   ac_lo=$ac_mid; break
21330 else
21331   echo "$as_me: failed program was:" >&5
21332 cat conftest.$ac_ext >&5
21333 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21334 fi
21335 rm -f conftest.$ac_objext conftest.$ac_ext
21336   done
21337 fi
21338 rm -f conftest.$ac_objext conftest.$ac_ext
21339 # Binary search between lo and hi bounds.
21340 while test "x$ac_lo" != "x$ac_hi"; do
21341   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21342   cat >conftest.$ac_ext <<_ACEOF
21343 #line 21343 "configure"
21344 #include "confdefs.h"
21345 $ac_includes_default
21346 int
21347 main ()
21348 {
21349 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21350   ;
21351   return 0;
21352 }
21353 _ACEOF
21354 rm -f conftest.$ac_objext
21355 if { (eval echo "$as_me:21355: \"$ac_compile\"") >&5
21356   (eval $ac_compile) 2>&5
21357   ac_status=$?
21358   echo "$as_me:21358: \$? = $ac_status" >&5
21359   (exit $ac_status); } &&
21360          { ac_try='test -s conftest.$ac_objext'
21361   { (eval echo "$as_me:21361: \"$ac_try\"") >&5
21362   (eval $ac_try) 2>&5
21363   ac_status=$?
21364   echo "$as_me:21364: \$? = $ac_status" >&5
21365   (exit $ac_status); }; }; then
21366   ac_hi=$ac_mid
21367 else
21368   echo "$as_me: failed program was:" >&5
21369 cat conftest.$ac_ext >&5
21370 ac_lo=`expr $ac_mid + 1`
21371 fi
21372 rm -f conftest.$ac_objext conftest.$ac_ext
21373 done
21374 ac_cv_sizeof_wchar_t=$ac_lo
21375 else
21376   if test "$cross_compiling" = yes; then
21377   { { echo "$as_me:21377: error: cannot run test program while cross compiling" >&5
21378 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21379    { (exit 1); exit 1; }; }
21380 else
21381   cat >conftest.$ac_ext <<_ACEOF
21382 #line 21382 "configure"
21383 #include "confdefs.h"
21384 $ac_includes_default
21385 int
21386 main ()
21387 {
21388 FILE *f = fopen ("conftest.val", "w");
21389 if (!f)
21390   $ac_main_return (1);
21391 fprintf (f, "%d", (sizeof (wchar_t)));
21392 fclose (f);
21393   ;
21394   return 0;
21395 }
21396 _ACEOF
21397 rm -f conftest$ac_exeext
21398 if { (eval echo "$as_me:21398: \"$ac_link\"") >&5
21399   (eval $ac_link) 2>&5
21400   ac_status=$?
21401   echo "$as_me:21401: \$? = $ac_status" >&5
21402   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21403   { (eval echo "$as_me:21403: \"$ac_try\"") >&5
21404   (eval $ac_try) 2>&5
21405   ac_status=$?
21406   echo "$as_me:21406: \$? = $ac_status" >&5
21407   (exit $ac_status); }; }; then
21408   ac_cv_sizeof_wchar_t=`cat conftest.val`
21409 else
21410   echo "$as_me: program exited with status $ac_status" >&5
21411 echo "$as_me: failed program was:" >&5
21412 cat conftest.$ac_ext >&5
21413 fi
21414 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21415 fi
21416 fi
21417 rm -f conftest.val
21418 else
21419   ac_cv_sizeof_wchar_t=0
21420 fi
21421 fi
21422 echo "$as_me:21422: result: $ac_cv_sizeof_wchar_t" >&5
21423 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21424 cat >>confdefs.h <<EOF
21425 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21426 EOF
21427
21428 fi
21429
21430 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21431 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21432 ###
21433 ### ticlib modules may be a separate library, otherwise contained in termlib.
21434 ### termlib modules may be a separate library, otherwise contained in ncurses.
21435 ###
21436 ### The of "+" or " " between the tokens controls the way the script
21437 ### chooses to split module lists into libraries.
21438 ###
21439 ### (see CF_LIB_RULES).
21440 echo "$as_me:21440: checking for library subsets" >&5
21441 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21442 LIB_SUBSETS=
21443
21444 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21445         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21446         if test "$with_ticlib" != no ; then
21447                 LIB_SUBSETS="${LIB_SUBSETS} "
21448         else
21449                 LIB_SUBSETS="${LIB_SUBSETS}+"
21450         fi
21451 fi
21452
21453 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21454 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21455
21456 if test "$with_termlib" != no ; then
21457         LIB_SUBSETS="${LIB_SUBSETS} "
21458 else
21459         LIB_SUBSETS="${LIB_SUBSETS}+"
21460 fi
21461
21462 LIB_SUBSETS="${LIB_SUBSETS}base"
21463
21464 # Most term-driver calls are to tinfo, but some like init_pair are to the
21465 # base library (so it resides in base).
21466 if test "$with_term_driver" != no ; then
21467         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21468         case $cf_cv_system_name in
21469         (*mingw32*|*mingw64*)
21470                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21471                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21472                 ;;
21473         (*)
21474                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21475                 ;;
21476         esac
21477 fi
21478
21479 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21480 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21481
21482 echo "$as_me:21482: result: $LIB_SUBSETS" >&5
21483 echo "${ECHO_T}$LIB_SUBSETS" >&6
21484
21485 ### Construct the list of include-directories to be generated
21486
21487 if test "$srcdir" != "."; then
21488         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21489 fi
21490 CPPFLAGS="-I../include $CPPFLAGS"
21491 if test "$srcdir" != "."; then
21492         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21493 fi
21494 CPPFLAGS="-I. $CPPFLAGS"
21495
21496 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21497 if test "$srcdir" != "."; then
21498         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21499 fi
21500 if test "$GCC" != yes; then
21501         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21502 elif test "$includedir" != "/usr/include"; then
21503         if test "$includedir" = '${prefix}/include' ; then
21504                 if test x$prefix != x/usr ; then
21505                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21506                 fi
21507         else
21508                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21509         fi
21510 fi
21511
21512 ### Build up pieces for makefile rules
21513 echo "$as_me:21513: checking default library suffix" >&5
21514 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21515
21516         case $DFT_LWR_MODEL in
21517         (libtool) DFT_ARG_SUFFIX=''   ;;
21518         (normal)  DFT_ARG_SUFFIX=''   ;;
21519         (debug)   DFT_ARG_SUFFIX='_g' ;;
21520         (profile) DFT_ARG_SUFFIX='_p' ;;
21521         (shared)  DFT_ARG_SUFFIX=''   ;;
21522         esac
21523         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21524 echo "$as_me:21524: result: $DFT_ARG_SUFFIX" >&5
21525 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21526
21527 echo "$as_me:21527: checking default library-dependency suffix" >&5
21528 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21529
21530         case X$DFT_LWR_MODEL in
21531         (Xlibtool)
21532                 DFT_LIB_SUFFIX='.la'
21533                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21534                 ;;
21535         (Xdebug)
21536                 DFT_LIB_SUFFIX='_g.a'
21537                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21538                 ;;
21539         (Xprofile)
21540                 DFT_LIB_SUFFIX='_p.a'
21541                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21542                 ;;
21543         (Xshared)
21544                 case $cf_cv_system_name in
21545                 (aix[5-7]*)
21546                         DFT_LIB_SUFFIX='.so'
21547                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21548                         ;;
21549                 (cygwin*|msys*|mingw*)
21550                         DFT_LIB_SUFFIX='.dll'
21551                         DFT_DEP_SUFFIX='.dll.a'
21552                         ;;
21553                 (darwin*)
21554                         DFT_LIB_SUFFIX='.dylib'
21555                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21556                         ;;
21557                 (hpux*)
21558                         case $target in
21559                         (ia64*)
21560                                 DFT_LIB_SUFFIX='.so'
21561                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21562                                 ;;
21563                         (*)
21564                                 DFT_LIB_SUFFIX='.sl'
21565                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21566                                 ;;
21567                         esac
21568                         ;;
21569                 (*)
21570                         DFT_LIB_SUFFIX='.so'
21571                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21572                         ;;
21573                 esac
21574                 ;;
21575         (*)
21576                 DFT_LIB_SUFFIX='.a'
21577                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21578                 ;;
21579         esac
21580         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21581         then
21582                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21583                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21584         fi
21585 echo "$as_me:21585: result: $DFT_DEP_SUFFIX" >&5
21586 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21587
21588 echo "$as_me:21588: checking default object directory" >&5
21589 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21590
21591         case $DFT_LWR_MODEL in
21592         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21593         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21594         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21595         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21596         (shared)
21597                 case $cf_cv_system_name in
21598                 (cygwin|msys)
21599                         DFT_OBJ_SUBDIR='objects' ;;
21600                 (*)
21601                         DFT_OBJ_SUBDIR='obj_s' ;;
21602                 esac
21603         esac
21604 echo "$as_me:21604: result: $DFT_OBJ_SUBDIR" >&5
21605 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21606
21607 if test "x$cf_with_cxx" = xyes ; then
21608 echo "$as_me:21608: checking c++ library-dependency suffix" >&5
21609 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21610 if test "$with_libtool" != "no"; then
21611         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21612         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21613 elif test "$with_shared_cxx" != "no"; then
21614         # also for g++ users...
21615         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21616 else
21617         # we normally make a static library because C/C++ library rules differ
21618
21619         case Xnormal in
21620         (Xlibtool)
21621                 CXX_LIB_SUFFIX='.la'
21622                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21623                 ;;
21624         (Xdebug)
21625                 CXX_LIB_SUFFIX='_g.a'
21626                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21627                 ;;
21628         (Xprofile)
21629                 CXX_LIB_SUFFIX='_p.a'
21630                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21631                 ;;
21632         (Xshared)
21633                 case $cf_cv_system_name in
21634                 (aix[5-7]*)
21635                         CXX_LIB_SUFFIX='.so'
21636                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21637                         ;;
21638                 (cygwin*|msys*|mingw*)
21639                         CXX_LIB_SUFFIX='.dll'
21640                         CXX_DEP_SUFFIX='.dll.a'
21641                         ;;
21642                 (darwin*)
21643                         CXX_LIB_SUFFIX='.dylib'
21644                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21645                         ;;
21646                 (hpux*)
21647                         case $target in
21648                         (ia64*)
21649                                 CXX_LIB_SUFFIX='.so'
21650                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21651                                 ;;
21652                         (*)
21653                                 CXX_LIB_SUFFIX='.sl'
21654                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21655                                 ;;
21656                         esac
21657                         ;;
21658                 (*)
21659                         CXX_LIB_SUFFIX='.so'
21660                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21661                         ;;
21662                 esac
21663                 ;;
21664         (*)
21665                 CXX_LIB_SUFFIX='.a'
21666                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21667                 ;;
21668         esac
21669         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21670         then
21671                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21672                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21673         fi
21674
21675 fi
21676 echo "$as_me:21676: result: $CXX_LIB_SUFFIX" >&5
21677 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21678
21679 fi
21680
21681 # do not want -ldl in build except as needed for -lncurses dependency
21682 if test "x$with_dlsym" = xyes ; then
21683 if test $DFT_LWR_MODEL = shared || \
21684    test $DFT_LWR_MODEL = libtool ; then
21685
21686 # remove dl library from $LIBS
21687 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21688
21689 fi
21690 fi
21691 ### Set up low-level terminfo dependencies for makefiles.
21692
21693 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21694 # do not need libdl
21695 TICS_LIST=
21696 if test "x$with_dlsym" = xyes ; then
21697
21698 # remove dl library from $SHLIB_LIST
21699 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21700
21701 fi
21702
21703 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21704 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21705 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21706 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21707 then
21708         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21709 fi
21710
21711 if test "$with_ticlib" != no ; then
21712
21713         if test "x$with_ticlib" != xyes ; then
21714                 TICS_NAME=$with_ticlib
21715                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21716                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21717                 TICS_LIB_SUFFIX="${with_ticlib}"
21718         else
21719                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21720                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21721                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21722         fi
21723         TICS_LDFLAGS="-L${LIB_DIR}"
21724         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21725 else
21726         TICS_LDFLAGS="-L${LIB_DIR}"
21727         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21728 fi
21729
21730 if test "$with_termlib" != no ; then
21731
21732         if test "x$with_termlib" != xyes ; then
21733                 TINFO_NAME=$with_termlib
21734                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21735                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21736                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21737                 TINFO_LIB_SUFFIX="${with_termlib}"
21738         else
21739                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21740                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21741                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21742                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21743         fi
21744
21745         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21746         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21747         if test "$DFT_LWR_MODEL" = "libtool"; then
21748                 TEST_ARGS="${TEST_DEPS}"
21749                 TEST_ARG2="${TEST_DEP2}"
21750                 TINFO_LDFLAGS="-L${LIB_DIR}"
21751                 TINFO_LIBS="$TEST_ARGS"
21752                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21753                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21754         else
21755                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21756                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21757                 if test "x$with_term_driver" != xno ; then
21758                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21759                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21760                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21761                 else
21762                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21763                         TINFO_LIBS="$TEST_ARGS"
21764                 fi
21765                 TINFO_LDFLAGS="-L${LIB_DIR}"
21766                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21767         fi
21768 else
21769         # the next lines are needed for linking libtic over libncurses
21770         TINFO_NAME=${LIB_NAME}
21771         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21772         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21773         if test "x$with_tic_depends" = xyes ; then
21774                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21775         else
21776                 TICS_LIST="$SHLIB_LIST"
21777         fi
21778
21779         TINFO_LDFLAGS="-L${LIB_DIR}"
21780         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21781 fi
21782
21783 if test "$DFT_LWR_MODEL" = shared ; then
21784         case $cf_cv_system_name in
21785         (cygwin*|msys*)
21786                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21787                 TINFO_SUFFIX=.dll
21788                 ;;
21789         esac
21790 fi
21791
21792 if test "x$with_dlsym" = xyes ; then
21793
21794 # remove dl library from $TICS_LIST
21795 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21796
21797 fi
21798
21799 if test "$DFT_LWR_MODEL" = "libtool"; then
21800         OBJEXT=lo
21801 fi
21802
21803 # needed for Ada95
21804 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21805
21806 case $DFT_LWR_MODEL in
21807 (normal|debug|profile)
21808
21809 if test "$GCC" = yes ; then
21810         case $cf_cv_system_name in
21811         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
21812                 LDFLAGS_STATIC=
21813                 LDFLAGS_SHARED=
21814                 ;;
21815         (*)     # normally, except when broken
21816                 LDFLAGS_STATIC=-static
21817                 LDFLAGS_SHARED=-dynamic
21818                 ;;
21819         esac
21820 else
21821         case $cf_cv_system_name in
21822         (aix[4-7]*)     # from ld manpage
21823                 LDFLAGS_STATIC=-bstatic
21824                 LDFLAGS_SHARED=-bdynamic
21825                 ;;
21826         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
21827                 # We could also use just "archive" and "shared".
21828                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21829                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21830                 ;;
21831         (irix*)         # from ld manpage IRIX64
21832                 LDFLAGS_STATIC=-Bstatic
21833                 LDFLAGS_SHARED=-Bdynamic
21834                 ;;
21835         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
21836                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21837                 LDFLAGS_STATIC=-noso
21838                 LDFLAGS_SHARED=-so_archive
21839                 ;;
21840         (solaris2*)
21841                 LDFLAGS_STATIC=-Bstatic
21842                 LDFLAGS_SHARED=-Bdynamic
21843                 ;;
21844         esac
21845 fi
21846
21847 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21848 then
21849         echo "$as_me:21849: checking if linker supports switching between static/dynamic" >&5
21850 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21851
21852         rm -f libconftest.a
21853         cat >conftest.$ac_ext <<EOF
21854 #line 21854 "configure"
21855 #include <stdio.h>
21856 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21857 EOF
21858         if { (eval echo "$as_me:21858: \"$ac_compile\"") >&5
21859   (eval $ac_compile) 2>&5
21860   ac_status=$?
21861   echo "$as_me:21861: \$? = $ac_status" >&5
21862   (exit $ac_status); } ; then
21863                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21864                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21865         fi
21866         rm -f conftest.*
21867
21868         cf_save_LIBS="$LIBS"
21869
21870         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21871         cat >conftest.$ac_ext <<_ACEOF
21872 #line 21872 "configure"
21873 #include "confdefs.h"
21874
21875 #line 21875 "configure"
21876 #include <stdio.h>
21877 int cf_ldflags_static(FILE *fp);
21878
21879 int
21880 main ()
21881 {
21882
21883         return cf_ldflags_static(stdin);
21884
21885   ;
21886   return 0;
21887 }
21888 _ACEOF
21889 rm -f conftest.$ac_objext conftest$ac_exeext
21890 if { (eval echo "$as_me:21890: \"$ac_link\"") >&5
21891   (eval $ac_link) 2>&5
21892   ac_status=$?
21893   echo "$as_me:21893: \$? = $ac_status" >&5
21894   (exit $ac_status); } &&
21895          { ac_try='test -s conftest$ac_exeext'
21896   { (eval echo "$as_me:21896: \"$ac_try\"") >&5
21897   (eval $ac_try) 2>&5
21898   ac_status=$?
21899   echo "$as_me:21899: \$? = $ac_status" >&5
21900   (exit $ac_status); }; }; then
21901
21902         # some linkers simply ignore the -dynamic
21903         case x`file conftest$ac_exeext 2>/dev/null` in
21904         (*static*)
21905                 cf_ldflags_static=no
21906                 ;;
21907         (*)
21908                 cf_ldflags_static=yes
21909                 ;;
21910         esac
21911
21912 else
21913   echo "$as_me: failed program was:" >&5
21914 cat conftest.$ac_ext >&5
21915 cf_ldflags_static=no
21916 fi
21917 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21918
21919         rm -f libconftest.*
21920         LIBS="$cf_save_LIBS"
21921
21922         echo "$as_me:21922: result: $cf_ldflags_static" >&5
21923 echo "${ECHO_T}$cf_ldflags_static" >&6
21924
21925         if test $cf_ldflags_static != yes
21926         then
21927                 LDFLAGS_STATIC=
21928                 LDFLAGS_SHARED=
21929         fi
21930 else
21931         LDFLAGS_STATIC=
21932         LDFLAGS_SHARED=
21933 fi
21934
21935         ;;
21936 esac
21937
21938 echo "$as_me:21938: checking where we will install curses.h" >&5
21939 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21940
21941 includesubdir=
21942 if test "$with_overwrite" = no && \
21943  ( test "x$includedir" = 'x${prefix}/include' || \
21944    test "x$includedir" = "x${prefix}/include" )
21945 then
21946         includesubdir="/ncurses${USE_LIB_SUFFIX}"
21947 fi
21948 echo "$as_me:21948: result: ${includedir}${includesubdir}" >&5
21949 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21950
21951 ### Resolve a conflict between normal and wide-curses by forcing applications
21952 ### that will need libutf8 to add it to their configure script.
21953 if test "$with_overwrite" != no ; then
21954 if test "$NCURSES_LIBUTF8" = 1 ; then
21955         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21956         { echo "$as_me:21956: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21957 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21958 fi
21959 fi
21960 WITH_OVERWRITE=$with_overwrite
21961
21962 # used to separate tack out of the tree
21963 NCURSES_TREE=
21964
21965 ### predefined stuff for the test programs
21966
21967 cat >>confdefs.h <<\EOF
21968 #define HAVE_SLK_COLOR 1
21969 EOF
21970
21971 ### Construct the list of subdirectories for which we'll customize makefiles
21972 ### with the appropriate compile-rules.
21973
21974 echo "$as_me:21974: checking for src modules" >&5
21975 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21976
21977 # dependencies and linker-arguments for test-programs
21978 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21979 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21980 if test "$DFT_LWR_MODEL" = "libtool"; then
21981         TEST_ARGS="${TEST_DEPS}"
21982         TEST_ARG2="${TEST_DEP2}"
21983 else
21984         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21985         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
21986 fi
21987
21988 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
21989 cf_cv_src_modules=
21990 for cf_dir in $modules_to_build
21991 do
21992         if test -f $srcdir/$cf_dir/modules; then
21993
21994                 # We may/may not have tack in the distribution, though the
21995                 # makefile is.
21996                 if test $cf_dir = tack ; then
21997                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21998                                 continue
21999                         fi
22000                 fi
22001
22002                 if test -z "$cf_cv_src_modules"; then
22003                         cf_cv_src_modules=$cf_dir
22004                 else
22005                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22006                 fi
22007
22008                 # Make the ncurses_cfg.h file record the library interface files as
22009                 # well.  These are header files that are the same name as their
22010                 # directory.  Ncurses is the only library that does not follow
22011                 # that pattern.
22012                 if test $cf_dir = tack ; then
22013                         continue
22014                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22015
22016 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22017
22018                         cat >>confdefs.h <<EOF
22019 #define HAVE_${cf_have_include}_H 1
22020 EOF
22021
22022                         cat >>confdefs.h <<EOF
22023 #define HAVE_LIB${cf_have_include} 1
22024 EOF
22025
22026                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22027                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22028                         if test "$DFT_LWR_MODEL" = "libtool"; then
22029                                 TEST_ARGS="${TEST_DEPS}"
22030                                 TEST_ARG2="${TEST_DEP2}"
22031                         else
22032                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22033                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22034                         fi
22035                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22036                 fi
22037         fi
22038 done
22039 echo "$as_me:22039: result: $cf_cv_src_modules" >&5
22040 echo "${ECHO_T}$cf_cv_src_modules" >&6
22041
22042 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22043 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22044
22045 SRC_SUBDIRS=
22046 if test "x$cf_with_manpages" != xno ; then
22047         SRC_SUBDIRS="$SRC_SUBDIRS man"
22048 fi
22049 SRC_SUBDIRS="$SRC_SUBDIRS include"
22050 for cf_dir in $cf_cv_src_modules
22051 do
22052         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22053 done
22054 if test "x$cf_with_tests" != "xno" ; then
22055         SRC_SUBDIRS="$SRC_SUBDIRS test"
22056 fi
22057 # always make this, to install the ncurses-config script
22058 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22059 if test "$cf_with_cxx_binding" != no; then
22060         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22061         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22062 fi
22063
22064 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22065 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22066
22067 ADA_SUBDIRS=
22068 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22069         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22070         ADA_SUBDIRS="gen src"
22071         if test "x$cf_with_tests" != "xno" ; then
22072                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22073         fi
22074 fi
22075
22076 SUB_MAKEFILES=
22077 for cf_dir in $SRC_SUBDIRS
22078 do
22079         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22080 done
22081
22082 if test -n "$ADA_SUBDIRS"; then
22083         for cf_dir in $ADA_SUBDIRS
22084         do
22085                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22086         done
22087
22088 fi
22089
22090 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22091    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22092    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22093 fi
22094
22095 DIRS_TO_MAKE="lib"
22096 for cf_item in $cf_list_models
22097 do
22098
22099         case $cf_item in
22100         (libtool) cf_subdir='obj_lo'  ;;
22101         (normal)  cf_subdir='objects' ;;
22102         (debug)   cf_subdir='obj_g' ;;
22103         (profile) cf_subdir='obj_p' ;;
22104         (shared)
22105                 case $cf_cv_system_name in
22106                 (cygwin|msys)
22107                         cf_subdir='objects' ;;
22108                 (*)
22109                         cf_subdir='obj_s' ;;
22110                 esac
22111         esac
22112
22113         for cf_item2 in $DIRS_TO_MAKE
22114         do
22115                 test $cf_item2 = $cf_subdir && break
22116         done
22117         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22118 done
22119 for cf_dir in $DIRS_TO_MAKE
22120 do
22121         test ! -d $cf_dir && mkdir $cf_dir
22122 done
22123
22124 # symbols that differ when compiling Ada95 by itself.
22125 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22126
22127 # values to use as strings
22128
22129 cat >>confdefs.h <<EOF
22130 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22131 EOF
22132
22133 cat >>confdefs.h <<EOF
22134 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22135 EOF
22136
22137 ### Now that we're done running tests, add the compiler-warnings, if any
22138
22139 cf_fix_cppflags=no
22140 cf_new_cflags=
22141 cf_new_cppflags=
22142 cf_new_extra_cppflags=
22143
22144 for cf_add_cflags in $EXTRA_CFLAGS
22145 do
22146 case $cf_fix_cppflags in
22147 (no)
22148         case $cf_add_cflags in
22149         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22150                 case $cf_add_cflags in
22151                 (-D*)
22152                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22153
22154                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22155                                 && test -z "${cf_tst_cflags}" \
22156                                 && cf_fix_cppflags=yes
22157
22158                         if test $cf_fix_cppflags = yes ; then
22159                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22160                                 continue
22161                         elif test "${cf_tst_cflags}" = "\"'" ; then
22162                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22163                                 continue
22164                         fi
22165                         ;;
22166                 esac
22167                 case "$CPPFLAGS" in
22168                 (*$cf_add_cflags)
22169                         ;;
22170                 (*)
22171                         case $cf_add_cflags in
22172                         (-D*)
22173                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22174
22175 CPPFLAGS=`echo "$CPPFLAGS" | \
22176         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22177                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22178
22179                                 ;;
22180                         esac
22181                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22182                         ;;
22183                 esac
22184                 ;;
22185         (*)
22186                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22187                 ;;
22188         esac
22189         ;;
22190 (yes)
22191         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22192
22193         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22194
22195         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22196                 && test -z "${cf_tst_cflags}" \
22197                 && cf_fix_cppflags=no
22198         ;;
22199 esac
22200 done
22201
22202 if test -n "$cf_new_cflags" ; then
22203
22204         CFLAGS="$CFLAGS $cf_new_cflags"
22205 fi
22206
22207 if test -n "$cf_new_cppflags" ; then
22208
22209         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22210 fi
22211
22212 if test -n "$cf_new_extra_cppflags" ; then
22213
22214         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22215 fi
22216
22217 ### Define substitutions for header files to avoid name-pollution
22218
22219 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22220         HAVE_TCGETATTR=1
22221 else
22222         HAVE_TCGETATTR=0
22223 fi
22224
22225 if test "x$ac_cv_header_stdint_h" = xyes ; then
22226         HAVE_STDINT_H=1
22227 else
22228         HAVE_STDINT_H=0
22229 fi
22230
22231 if test "x$ac_cv_header_termio_h" = xyes ; then
22232         HAVE_TERMIO_H=1
22233 else
22234         HAVE_TERMIO_H=0
22235 fi
22236
22237 if test "x$ac_cv_header_termios_h" = xyes ; then
22238         HAVE_TERMIOS_H=1
22239 else
22240         HAVE_TERMIOS_H=0
22241 fi
22242
22243 ################################################################################
22244 test "x$use_database" = xyes && \
22245 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22246
22247 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22248 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22249
22250 if test "x$enable_pc_files" = xyes ; then \
22251 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22252 MAKE_PC_FILES=
22253 else
22254 MAKE_PC_FILES="#"
22255 fi
22256
22257 # Extract the first word of "tic", so it can be a program name with args.
22258 set dummy tic; ac_word=$2
22259 echo "$as_me:22259: checking for $ac_word" >&5
22260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22261 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22262   echo $ECHO_N "(cached) $ECHO_C" >&6
22263 else
22264   case $TIC_PATH in
22265   [\\/]* | ?:[\\/]*)
22266   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22267   ;;
22268   *)
22269   ac_save_IFS=$IFS; IFS=$ac_path_separator
22270 ac_dummy="$PATH:/usr/local/ncurses/bin"
22271 for ac_dir in $ac_dummy; do
22272   IFS=$ac_save_IFS
22273   test -z "$ac_dir" && ac_dir=.
22274   if $as_executable_p "$ac_dir/$ac_word"; then
22275    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22276    echo "$as_me:22276: found $ac_dir/$ac_word" >&5
22277    break
22278 fi
22279 done
22280
22281   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22282   ;;
22283 esac
22284 fi
22285 TIC_PATH=$ac_cv_path_TIC_PATH
22286
22287 if test -n "$TIC_PATH"; then
22288   echo "$as_me:22288: result: $TIC_PATH" >&5
22289 echo "${ECHO_T}$TIC_PATH" >&6
22290 else
22291   echo "$as_me:22291: result: no" >&5
22292 echo "${ECHO_T}no" >&6
22293 fi
22294
22295 if test -n "$FALLBACK_LIST"
22296 then
22297         if test "$TIC_PATH" = unknown
22298         then
22299                 { echo "$as_me:22299: WARNING: no tic program found for fallbacks" >&5
22300 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22301         fi
22302 fi
22303
22304 if test "x$cf_with_tests" != xno ; then
22305         MAKE_TESTS=
22306 else
22307         MAKE_TESTS="#"
22308 fi
22309
22310 ADAHTML_DIR=../../doc/html/ada
22311
22312 # these could be configurable, but are not currently
22313 PANEL_NAME=panel
22314 MENU_NAME=menu
22315 FORM_NAME=form
22316 CXX_NAME=ncurses++
22317
22318 # workaround for g++ versus Solaris (20131116)
22319 case $cf_cv_system_name in
22320 (solaris2*)
22321         case "x$CPPFLAGS" in
22322         (*-D_XOPEN_SOURCE_EXTENDED*)
22323                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22324
22325 echo "${as_me:-configure}:22325: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22326
22327                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22328                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22329                 ;;
22330         esac
22331         ;;
22332 esac
22333
22334 # Help to automatically enable the extended curses features when using either
22335 # the *-config or the ".pc" files by adding defines.
22336 echo "$as_me:22336: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22337 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22338 PKG_CFLAGS=
22339 for cf_loop1 in $CPPFLAGS_after_XOPEN
22340 do
22341         cf_found=no
22342         for cf_loop2 in $CPPFLAGS_before_XOPEN
22343         do
22344                 if test "x$cf_loop1" = "x$cf_loop2"
22345                 then
22346                         cf_found=yes
22347                         break
22348                 fi
22349         done
22350         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22351 done
22352 echo "$as_me:22352: result: $PKG_CFLAGS" >&5
22353 echo "${ECHO_T}$PKG_CFLAGS" >&6
22354
22355 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22356 case "x$NCURSES_OSPEED" in
22357 (*short*)
22358         cf_compatible=1
22359         ;;
22360 (*)
22361         cf_compatible=0
22362         ;;
22363 esac
22364
22365 cat >>confdefs.h <<EOF
22366 #define NCURSES_OSPEED_COMPAT $cf_compatible
22367 EOF
22368
22369 case "x$cf_cv_typeof_chtype" in
22370 (xshort|xint|xlong)
22371         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22372         ;;
22373 esac
22374
22375 case "x$cf_cv_typeof_mmask_t" in
22376 (xshort|xint|xlong)
22377         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22378         ;;
22379 esac
22380
22381 # substitute into misc/Makefile to suppress
22382 # (un)install.data from the
22383 # (un)install rules.
22384 if test "x$cf_with_db_install" = "xno"; then
22385         MISC_INSTALL_DATA=
22386         MISC_UNINSTALL_DATA=
22387 else
22388         MISC_INSTALL_DATA=install.data
22389         MISC_UNINSTALL_DATA=uninstall.data
22390 fi
22391
22392 SUB_SCRIPTS=
22393
22394 if test -n "$PACKAGE"
22395 then
22396         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22397         export PACKAGE
22398         echo "package: $PACKAGE"
22399 fi
22400
22401 UNALTERED_SYMS=
22402 cf_filter_syms=no
22403
22404 if test -n "$RESULTING_SYMS"
22405 then
22406         cf_filter_syms=$cf_dft_filter_syms
22407         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22408
22409 echo "${as_me:-configure}:22409: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22410
22411 fi
22412
22413 if test "x$WILDCARD_SYMS" = xno
22414 then
22415         cf_filter_syms=yes
22416 fi
22417
22418 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22419 if test $cf_filter_syms = yes
22420 then
22421         RESULTING_SYMS=resulting.map
22422 fi
22423
22424 if test "x$cross_compiling" = xyes ; then
22425         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22426 else
22427         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22428 fi
22429
22430 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"
22431 ac_config_commands="$ac_config_commands default"
22432 cat >confcache <<\_ACEOF
22433 # This file is a shell script that caches the results of configure
22434 # tests run on this system so they can be shared between configure
22435 # scripts and configure runs, see configure's option --config-cache.
22436 # It is not useful on other systems.  If it contains results you don't
22437 # want to keep, you may remove or edit it.
22438 #
22439 # config.status only pays attention to the cache file if you give it
22440 # the --recheck option to rerun configure.
22441 #
22442 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22443 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22444 # following values.
22445
22446 _ACEOF
22447
22448 # The following way of writing the cache mishandles newlines in values,
22449 # but we know of no workaround that is simple, portable, and efficient.
22450 # So, don't put newlines in cache variables' values.
22451 # Ultrix sh set writes to stderr and can't be redirected directly,
22452 # and sets the high bit in the cache file unless we assign to the vars.
22453 {
22454   (set) 2>&1 |
22455     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22456     *ac_space=\ *)
22457       # `set' does not quote correctly, so add quotes (double-quote
22458       # substitution turns \\\\ into \\, and sed turns \\ into \).
22459       sed -n \
22460         "s/'/'\\\\''/g;
22461           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22462       ;;
22463     *)
22464       # `set' quotes correctly as required by POSIX, so do not add quotes.
22465       sed -n \
22466         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22467       ;;
22468     esac;
22469 } |
22470   sed '
22471      t clear
22472      : clear
22473      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22474      t end
22475      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22476      : end' >>confcache
22477 if cmp -s $cache_file confcache; then :; else
22478   if test -w $cache_file; then
22479     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22480     cat confcache >$cache_file
22481   else
22482     echo "not updating unwritable cache $cache_file"
22483   fi
22484 fi
22485 rm -f confcache
22486
22487 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22488 # Let make expand exec_prefix.
22489 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22490
22491 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22492 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22493 # trailing colons and then remove the whole line if VPATH becomes empty
22494 # (actually we leave an empty line to preserve line numbers).
22495 if test "x$srcdir" = x.; then
22496   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22497 s/:*\$(srcdir):*/:/;
22498 s/:*\${srcdir}:*/:/;
22499 s/:*@srcdir@:*/:/;
22500 s/^\([^=]*=[    ]*\):*/\1/;
22501 s/:*$//;
22502 s/^[^=]*=[      ]*$//;
22503 }'
22504 fi
22505
22506 DEFS=-DHAVE_CONFIG_H
22507
22508 : ${CONFIG_STATUS=./config.status}
22509 ac_clean_files_save=$ac_clean_files
22510 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22511 { echo "$as_me:22511: creating $CONFIG_STATUS" >&5
22512 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22513 cat >$CONFIG_STATUS <<_ACEOF
22514 #! $SHELL
22515 # Generated automatically by configure.
22516 # Run this file to recreate the current configuration.
22517 # Compiler output produced by configure, useful for debugging
22518 # configure, is in config.log if it exists.
22519
22520 debug=false
22521 SHELL=\${CONFIG_SHELL-$SHELL}
22522 ac_cs_invocation="\$0 \$@"
22523
22524 _ACEOF
22525
22526 cat >>$CONFIG_STATUS <<\_ACEOF
22527 # Be Bourne compatible
22528 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22529   emulate sh
22530   NULLCMD=:
22531 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22532   set -o posix
22533 fi
22534
22535 # Name of the executable.
22536 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22537
22538 if expr a : '\(a\)' >/dev/null 2>&1; then
22539   as_expr=expr
22540 else
22541   as_expr=false
22542 fi
22543
22544 rm -f conf$$ conf$$.exe conf$$.file
22545 echo >conf$$.file
22546 if ln -s conf$$.file conf$$ 2>/dev/null; then
22547   # We could just check for DJGPP; but this test a) works b) is more generic
22548   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22549   if test -f conf$$.exe; then
22550     # Don't use ln at all; we don't have any links
22551     as_ln_s='cp -p'
22552   else
22553     as_ln_s='ln -s'
22554   fi
22555 elif ln conf$$.file conf$$ 2>/dev/null; then
22556   as_ln_s=ln
22557 else
22558   as_ln_s='cp -p'
22559 fi
22560 rm -f conf$$ conf$$.exe conf$$.file
22561
22562 as_executable_p="test -f"
22563
22564 # Support unset when possible.
22565 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22566   as_unset=unset
22567 else
22568   as_unset=false
22569 fi
22570
22571 # NLS nuisances.
22572 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22573 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22574 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22575 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22576 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22577 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22578 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22579 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22580
22581 # IFS
22582 # We need space, tab and new line, in precisely that order.
22583 as_nl='
22584 '
22585 IFS="   $as_nl"
22586
22587 # CDPATH.
22588 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22589
22590 exec 6>&1
22591
22592 _ACEOF
22593
22594 # Files that config.status was made for.
22595 if test -n "$ac_config_files"; then
22596   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22597 fi
22598
22599 if test -n "$ac_config_headers"; then
22600   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22601 fi
22602
22603 if test -n "$ac_config_links"; then
22604   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22605 fi
22606
22607 if test -n "$ac_config_commands"; then
22608   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22609 fi
22610
22611 cat >>$CONFIG_STATUS <<\EOF
22612
22613 ac_cs_usage="\
22614 \`$as_me' instantiates files from templates according to the
22615 current configuration.
22616
22617 Usage: $0 [OPTIONS] [FILE]...
22618
22619   -h, --help       print this help, then exit
22620   -V, --version    print version number, then exit
22621   -d, --debug      don't remove temporary files
22622       --recheck    update $as_me by reconfiguring in the same conditions
22623   --file=FILE[:TEMPLATE]
22624                    instantiate the configuration file FILE
22625   --header=FILE[:TEMPLATE]
22626                    instantiate the configuration header FILE
22627
22628 Configuration files:
22629 $config_files
22630
22631 Configuration headers:
22632 $config_headers
22633
22634 Configuration commands:
22635 $config_commands
22636
22637 Report bugs to <dickey@invisible-island.net>."
22638 EOF
22639
22640 cat >>$CONFIG_STATUS <<EOF
22641 ac_cs_version="\\
22642 config.status
22643 configured by $0, generated by GNU Autoconf 2.52.20150926,
22644   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22645
22646 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22647 Free Software Foundation, Inc.
22648 This config.status script is free software; the Free Software Foundation
22649 gives unlimited permission to copy, distribute and modify it."
22650 srcdir=$srcdir
22651 INSTALL="$INSTALL"
22652 EOF
22653
22654 cat >>$CONFIG_STATUS <<\EOF
22655 # If no file are specified by the user, then we need to provide default
22656 # value.  By we need to know if files were specified by the user.
22657 ac_need_defaults=:
22658 while test $# != 0
22659 do
22660   case $1 in
22661   --*=*)
22662     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22663     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22664     shift
22665     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22666     shift
22667     ;;
22668   -*);;
22669   *) # This is not an option, so the user has probably given explicit
22670      # arguments.
22671      ac_need_defaults=false;;
22672   esac
22673
22674   case $1 in
22675   # Handling of the options.
22676 EOF
22677 cat >>$CONFIG_STATUS <<EOF
22678   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22679     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22680     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22681 EOF
22682 cat >>$CONFIG_STATUS <<\EOF
22683   --version | --vers* | -V )
22684     echo "$ac_cs_version"; exit 0 ;;
22685   --he | --h)
22686     # Conflict between --help and --header
22687     { { echo "$as_me:22687: error: ambiguous option: $1
22688 Try \`$0 --help' for more information." >&5
22689 echo "$as_me: error: ambiguous option: $1
22690 Try \`$0 --help' for more information." >&2;}
22691    { (exit 1); exit 1; }; };;
22692   --help | --hel | -h )
22693     echo "$ac_cs_usage"; exit 0 ;;
22694   --debug | --d* | -d )
22695     debug=: ;;
22696   --file | --fil | --fi | --f )
22697     shift
22698     CONFIG_FILES="$CONFIG_FILES $1"
22699     ac_need_defaults=false;;
22700   --header | --heade | --head | --hea )
22701     shift
22702     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22703     ac_need_defaults=false;;
22704
22705   # This is an error.
22706   -*) { { echo "$as_me:22706: error: unrecognized option: $1
22707 Try \`$0 --help' for more information." >&5
22708 echo "$as_me: error: unrecognized option: $1
22709 Try \`$0 --help' for more information." >&2;}
22710    { (exit 1); exit 1; }; } ;;
22711
22712   *) ac_config_targets="$ac_config_targets $1" ;;
22713
22714   esac
22715   shift
22716 done
22717
22718 exec 5>>config.log
22719 cat >&5 << _ACEOF
22720
22721 ## ----------------------- ##
22722 ## Running config.status.  ##
22723 ## ----------------------- ##
22724
22725 This file was extended by $as_me 2.52.20150926, executed with
22726   CONFIG_FILES    = $CONFIG_FILES
22727   CONFIG_HEADERS  = $CONFIG_HEADERS
22728   CONFIG_LINKS    = $CONFIG_LINKS
22729   CONFIG_COMMANDS = $CONFIG_COMMANDS
22730   > $ac_cs_invocation
22731 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22732
22733 _ACEOF
22734 EOF
22735
22736 cat >>$CONFIG_STATUS <<EOF
22737 #
22738 # INIT-COMMANDS section.
22739 #
22740
22741 ### Special initialization commands, used to pass information from the
22742 ### configuration-run into config.status
22743
22744 AWK="$AWK"
22745 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22746 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22747 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22748 ECHO_LD="$ECHO_LD"
22749 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22750 LDCONFIG="$LDCONFIG"
22751 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22752 LIB_NAME="$LIB_NAME"
22753 LIB_PREFIX="$LIB_PREFIX"
22754 LIB_SUBSETS="$LIB_SUBSETS"
22755 LIB_SUFFIX="$LIB_SUFFIX"
22756 LIB_TRACING="$LIB_TRACING"
22757 LN_S="$LN_S"
22758 MAKE_TERMINFO="$MAKE_TERMINFO"
22759 NCURSES_MAJOR="$NCURSES_MAJOR"
22760 NCURSES_MINOR="$NCURSES_MINOR"
22761 NCURSES_OSPEED="$NCURSES_OSPEED"
22762 NCURSES_PATCH="$NCURSES_PATCH"
22763 SRC_SUBDIRS="$SRC_SUBDIRS"
22764 TERMINFO="$TERMINFO"
22765 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22766 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22767 TICS_NAME="$TICS_NAME"
22768 TIC_PATH="$TIC_PATH"
22769 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22770 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22771 TINFO_NAME="$TINFO_NAME"
22772 TINFO_SUFFIX="$TINFO_SUFFIX"
22773 UNALTERED_SYMS="$UNALTERED_SYMS"
22774 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22775 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22776 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22777 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22778 WILDCARD_SYMS="$WILDCARD_SYMS"
22779 WITH_CURSES_H="$with_curses_h"
22780 WITH_ECHO="${enable_echo:=yes}"
22781 WITH_OVERWRITE="$with_overwrite"
22782 cf_LIST_MODELS="$cf_list_models"
22783 cf_cv_abi_version="$cf_cv_abi_version"
22784 cf_cv_do_relink="$cf_cv_do_relink"
22785 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22786 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22787 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22788 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22789 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22790 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22791 cf_cv_rel_version="$cf_cv_rel_version"
22792 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22793 cf_cv_shared_soname='$cf_cv_shared_soname'
22794 cf_cv_shlib_version="$cf_cv_shlib_version"
22795 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22796 cf_cv_system_name="$cf_cv_system_name"
22797 cf_cv_term_driver="$with_term_driver"
22798 cf_with_ada="$cf_with_ada"
22799 cf_with_cxx_binding="$cf_with_cxx_binding"
22800 cf_with_db_install="$cf_with_db_install"
22801 cf_with_manpages="$cf_with_manpages"
22802 cf_with_tests="$cf_with_tests"
22803 host="$host"
22804 target="$target"
22805 with_shared_cxx="$with_shared_cxx"
22806
22807 EOF
22808
22809 cat >>$CONFIG_STATUS <<\EOF
22810 for ac_config_target in $ac_config_targets
22811 do
22812   case "$ac_config_target" in
22813   # Handling of arguments.
22814   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22815   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22816   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22817   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22818   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22819   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22820   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22821   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22822   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22823   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22824   *) { { echo "$as_me:22824: error: invalid argument: $ac_config_target" >&5
22825 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22826    { (exit 1); exit 1; }; };;
22827   esac
22828 done
22829
22830 # If the user did not use the arguments to specify the items to instantiate,
22831 # then the envvar interface is used.  Set only those that are not.
22832 # We use the long form for the default assignment because of an extremely
22833 # bizarre bug on SunOS 4.1.3.
22834 if $ac_need_defaults; then
22835   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22836   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22837   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22838 fi
22839
22840 # Create a temporary directory, and hook for its removal unless debugging.
22841 $debug ||
22842 {
22843   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22844   trap '{ (exit 1); exit 1; }' 1 2 13 15
22845 }
22846
22847 # Create a (secure) tmp directory for tmp files.
22848 : ${TMPDIR=/tmp}
22849 {
22850   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22851   test -n "$tmp" && test -d "$tmp"
22852 }  ||
22853 {
22854   tmp=$TMPDIR/cs$$-$RANDOM
22855   (umask 077 && mkdir $tmp)
22856 } ||
22857 {
22858    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22859    { (exit 1); exit 1; }
22860 }
22861
22862 EOF
22863
22864 cat >>$CONFIG_STATUS <<EOF
22865
22866 #
22867 # CONFIG_FILES section.
22868 #
22869
22870 # No need to generate the scripts if there are no CONFIG_FILES.
22871 # This happens for instance when ./config.status config.h
22872 if test -n "\$CONFIG_FILES"; then
22873   # Protect against being on the right side of a sed subst in config.status.
22874   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22875    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22876 s,@SHELL@,$SHELL,;t t
22877 s,@exec_prefix@,$exec_prefix,;t t
22878 s,@prefix@,$prefix,;t t
22879 s,@program_transform_name@,$program_transform_name,;t t
22880 s,@bindir@,$bindir,;t t
22881 s,@sbindir@,$sbindir,;t t
22882 s,@libexecdir@,$libexecdir,;t t
22883 s,@datarootdir@,$datarootdir,;t t
22884 s,@datadir@,$datadir,;t t
22885 s,@sysconfdir@,$sysconfdir,;t t
22886 s,@sharedstatedir@,$sharedstatedir,;t t
22887 s,@localstatedir@,$localstatedir,;t t
22888 s,@libdir@,$libdir,;t t
22889 s,@includedir@,$includedir,;t t
22890 s,@oldincludedir@,$oldincludedir,;t t
22891 s,@infodir@,$infodir,;t t
22892 s,@mandir@,$mandir,;t t
22893 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22894 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22895 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22896 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22897 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22898 s,@build_alias@,$build_alias,;t t
22899 s,@host_alias@,$host_alias,;t t
22900 s,@target_alias@,$target_alias,;t t
22901 s,@ECHO_C@,$ECHO_C,;t t
22902 s,@ECHO_N@,$ECHO_N,;t t
22903 s,@ECHO_T@,$ECHO_T,;t t
22904 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22905 s,@DEFS@,$DEFS,;t t
22906 s,@LIBS@,$LIBS,;t t
22907 s,@top_builddir@,$top_builddir,;t t
22908 s,@EGREP@,$EGREP,;t t
22909 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22910 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22911 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22912 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22913 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22914 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22915 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22916 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22917 s,@VERSION@,$VERSION,;t t
22918 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22919 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22920 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22921 s,@PACKAGE@,$PACKAGE,;t t
22922 s,@build@,$build,;t t
22923 s,@build_cpu@,$build_cpu,;t t
22924 s,@build_vendor@,$build_vendor,;t t
22925 s,@build_os@,$build_os,;t t
22926 s,@host@,$host,;t t
22927 s,@host_cpu@,$host_cpu,;t t
22928 s,@host_vendor@,$host_vendor,;t t
22929 s,@host_os@,$host_os,;t t
22930 s,@target@,$target,;t t
22931 s,@target_cpu@,$target_cpu,;t t
22932 s,@target_vendor@,$target_vendor,;t t
22933 s,@target_os@,$target_os,;t t
22934 s,@CC@,$CC,;t t
22935 s,@CFLAGS@,$CFLAGS,;t t
22936 s,@LDFLAGS@,$LDFLAGS,;t t
22937 s,@CPPFLAGS@,$CPPFLAGS,;t t
22938 s,@ac_ct_CC@,$ac_ct_CC,;t t
22939 s,@EXEEXT@,$EXEEXT,;t t
22940 s,@OBJEXT@,$OBJEXT,;t t
22941 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22942 s,@CPP@,$CPP,;t t
22943 s,@LDCONFIG@,$LDCONFIG,;t t
22944 s,@CXX@,$CXX,;t t
22945 s,@CXXFLAGS@,$CXXFLAGS,;t t
22946 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22947 s,@AWK@,$AWK,;t t
22948 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22949 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22950 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22951 s,@LINT@,$LINT,;t t
22952 s,@LINT_OPTS@,$LINT_OPTS,;t t
22953 s,@LN_S@,$LN_S,;t t
22954 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22955 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22956 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22957 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22958 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22959 s,@SET_MAKE@,$SET_MAKE,;t t
22960 s,@CTAGS@,$CTAGS,;t t
22961 s,@ETAGS@,$ETAGS,;t t
22962 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22963 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22964 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22965 s,@RANLIB@,$RANLIB,;t t
22966 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22967 s,@LD@,$LD,;t t
22968 s,@ac_ct_LD@,$ac_ct_LD,;t t
22969 s,@AR@,$AR,;t t
22970 s,@ac_ct_AR@,$ac_ct_AR,;t t
22971 s,@NM@,$NM,;t t
22972 s,@ac_ct_NM@,$ac_ct_NM,;t t
22973 s,@ARFLAGS@,$ARFLAGS,;t t
22974 s,@DESTDIR@,$DESTDIR,;t t
22975 s,@BUILD_CC@,$BUILD_CC,;t t
22976 s,@BUILD_CPP@,$BUILD_CPP,;t t
22977 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22978 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22979 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22980 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22981 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22982 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22983 s,@cf_list_models@,$cf_list_models,;t t
22984 s,@ABI_VERSION@,$ABI_VERSION,;t t
22985 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22986 s,@LIBTOOL@,$LIBTOOL,;t t
22987 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22988 s,@LT_UNDEF@,$LT_UNDEF,;t t
22989 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22990 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22991 s,@LIB_CREATE@,$LIB_CREATE,;t t
22992 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22993 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22994 s,@LIB_PREP@,$LIB_PREP,;t t
22995 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22996 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22997 s,@LIB_LINK@,$LIB_LINK,;t t
22998 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22999 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23000 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23001 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23002 s,@TICS_NAME@,$TICS_NAME,;t t
23003 s,@TINFO_NAME@,$TINFO_NAME,;t t
23004 s,@LIB_NAME@,$LIB_NAME,;t t
23005 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23006 s,@CC_G_OPT@,$CC_G_OPT,;t t
23007 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23008 s,@LD_MODEL@,$LD_MODEL,;t t
23009 s,@shlibdir@,$shlibdir,;t t
23010 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23011 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23012 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23013 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23014 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23015 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23016 s,@LINK_PROGS@,$LINK_PROGS,;t t
23017 s,@LINK_TESTS@,$LINK_TESTS,;t t
23018 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23019 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23020 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23021 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23022 s,@RPATH_LIST@,$RPATH_LIST,;t t
23023 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23024 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23025 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23026 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23027 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23028 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23029 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23030 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23031 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23032 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23033 s,@XTERM_KBS@,$XTERM_KBS,;t t
23034 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23035 s,@TERMINFO@,$TERMINFO,;t t
23036 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23037 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23038 s,@TERMPATH@,$TERMPATH,;t t
23039 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23040 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23041 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23042 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23043 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23044 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23045 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23046 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23047 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23048 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23049 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23050 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23051 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23052 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23053 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23054 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23055 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23056 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23057 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23058 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23059 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23060 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23061 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23062 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23063 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23064 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23065 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23066 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23067 s,@PTHREAD@,$PTHREAD,;t t
23068 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23069 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23070 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23071 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23072 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23073 s,@ECHO_LT@,$ECHO_LT,;t t
23074 s,@ECHO_LD@,$ECHO_LD,;t t
23075 s,@RULE_CC@,$RULE_CC,;t t
23076 s,@SHOW_CC@,$SHOW_CC,;t t
23077 s,@ECHO_CC@,$ECHO_CC,;t t
23078 s,@ECHO_LINK@,$ECHO_LINK,;t t
23079 s,@ADAFLAGS@,$ADAFLAGS,;t t
23080 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23081 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23082 s,@ADA_TRACE@,$ADA_TRACE,;t t
23083 s,@MATH_LIB@,$MATH_LIB,;t t
23084 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23085 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23086 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23087 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23088 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23089 s,@TEST_LIBS@,$TEST_LIBS,;t t
23090 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23091 s,@CXXCPP@,$CXXCPP,;t t
23092 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23093 s,@CXX_AR@,$CXX_AR,;t t
23094 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23095 s,@CXXLIBS@,$CXXLIBS,;t t
23096 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23097 s,@gnat_exists@,$gnat_exists,;t t
23098 s,@M4_exists@,$M4_exists,;t t
23099 s,@cf_ada_make@,$cf_ada_make,;t t
23100 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23101 s,@cf_compile_generics@,$cf_compile_generics,;t t
23102 s,@cf_generic_objects@,$cf_generic_objects,;t t
23103 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23104 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23105 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23106 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23107 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23108 s,@cf_ada_package@,$cf_ada_package,;t t
23109 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23110 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23111 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23112 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23113 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23114 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23115 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23116 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23117 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23118 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23119 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23120 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23121 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23122 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23123 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23124 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23125 s,@TICS_LIBS@,$TICS_LIBS,;t t
23126 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23127 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23128 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23129 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23130 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23131 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23132 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23133 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23134 s,@includesubdir@,$includesubdir,;t t
23135 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23136 s,@TICS_LIST@,$TICS_LIST,;t t
23137 s,@TINFO_LIST@,$TINFO_LIST,;t t
23138 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23139 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23140 s,@TEST_ARGS@,$TEST_ARGS,;t t
23141 s,@TEST_DEPS@,$TEST_DEPS,;t t
23142 s,@TEST_ARG2@,$TEST_ARG2,;t t
23143 s,@TEST_DEP2@,$TEST_DEP2,;t t
23144 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23145 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23146 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23147 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23148 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23149 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23150 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23151 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23152 s,@cross_compiling@,$cross_compiling,;t t
23153 s,@TIC_PATH@,$TIC_PATH,;t t
23154 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23155 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23156 s,@PANEL_NAME@,$PANEL_NAME,;t t
23157 s,@MENU_NAME@,$MENU_NAME,;t t
23158 s,@FORM_NAME@,$FORM_NAME,;t t
23159 s,@CXX_NAME@,$CXX_NAME,;t t
23160 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23161 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23162 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23163 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23164 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23165 CEOF
23166
23167 EOF
23168
23169   cat >>$CONFIG_STATUS <<\EOF
23170   # Split the substitutions into bite-sized pieces for seds with
23171   # small command number limits, like on Digital OSF/1 and HP-UX.
23172   ac_max_sed_lines=48
23173   ac_sed_frag=1 # Number of current file.
23174   ac_beg=1 # First line for current file.
23175   ac_end=$ac_max_sed_lines # Line after last line for current file.
23176   ac_more_lines=:
23177   ac_sed_cmds=
23178   while $ac_more_lines; do
23179     if test $ac_beg -gt 1; then
23180       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23181     else
23182       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23183     fi
23184     if test ! -s $tmp/subs.frag; then
23185       ac_more_lines=false
23186     else
23187       # The purpose of the label and of the branching condition is to
23188       # speed up the sed processing (if there are no `@' at all, there
23189       # is no need to browse any of the substitutions).
23190       # These are the two extra sed commands mentioned above.
23191       (echo ':t
23192   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23193       # It is possible to make a multiline substitution using escaped newlines.
23194       # Ensure that we do not split the substitution between script fragments.
23195       ac_BEG=$ac_end
23196       ac_END=`expr $ac_end + $ac_max_sed_lines`
23197       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23198       if test -s $tmp/subs.next; then
23199         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23200         if test ! -s $tmp/subs.edit; then
23201           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23202           if test ! -s $tmp/subs.edit; then
23203             if test $ac_beg -gt 1; then
23204               ac_end=`expr $ac_end - 1`
23205               continue
23206             fi
23207           fi
23208         fi
23209       fi
23210
23211       if test -z "$ac_sed_cmds"; then
23212         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23213       else
23214         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23215       fi
23216       ac_sed_frag=`expr $ac_sed_frag + 1`
23217       ac_beg=$ac_end
23218       ac_end=`expr $ac_end + $ac_max_sed_lines`
23219     fi
23220   done
23221   if test -z "$ac_sed_cmds"; then
23222     ac_sed_cmds=cat
23223   fi
23224 fi # test -n "$CONFIG_FILES"
23225
23226 EOF
23227 cat >>$CONFIG_STATUS <<\EOF
23228 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23229   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23230   case $ac_file in
23231   - | *:- | *:-:* ) # input from stdin
23232         cat >$tmp/stdin
23233         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23234         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23235   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23236         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23237   * )   ac_file_in=$ac_file.in ;;
23238   esac
23239
23240   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23241   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23242          X"$ac_file" : 'X\(//\)[^/]' \| \
23243          X"$ac_file" : 'X\(//\)$' \| \
23244          X"$ac_file" : 'X\(/\)' \| \
23245          .     : '\(.\)' 2>/dev/null ||
23246 echo X"$ac_file" |
23247     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23248           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23249           /^X\(\/\/\)$/{ s//\1/; q; }
23250           /^X\(\/\).*/{ s//\1/; q; }
23251           s/.*/./; q'`
23252   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23253     { case "$ac_dir" in
23254   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23255   *)                      as_incr_dir=.;;
23256 esac
23257 as_dummy="$ac_dir"
23258 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23259   case $as_mkdir_dir in
23260     # Skip DOS drivespec
23261     ?:) as_incr_dir=$as_mkdir_dir ;;
23262     *)
23263       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23264       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23265     ;;
23266   esac
23267 done; }
23268
23269     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23270     # A "../" for each directory in $ac_dir_suffix.
23271     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23272   else
23273     ac_dir_suffix= ac_dots=
23274   fi
23275
23276   case $srcdir in
23277   .)  ac_srcdir=.
23278       if test -z "$ac_dots"; then
23279          ac_top_srcdir=.
23280       else
23281          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23282       fi ;;
23283   [\\/]* | ?:[\\/]* )
23284       ac_srcdir=$srcdir$ac_dir_suffix;
23285       ac_top_srcdir=$srcdir ;;
23286   *) # Relative path.
23287     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23288     ac_top_srcdir=$ac_dots$srcdir ;;
23289   esac
23290
23291   case $INSTALL in
23292   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23293   *) ac_INSTALL=$ac_dots$INSTALL ;;
23294   esac
23295
23296   if test x"$ac_file" != x-; then
23297     { echo "$as_me:23297: creating $ac_file" >&5
23298 echo "$as_me: creating $ac_file" >&6;}
23299     rm -f "$ac_file"
23300   fi
23301   # Let's still pretend it is `configure' which instantiates (i.e., don't
23302   # use $as_me), people would be surprised to read:
23303   #    /* config.h.  Generated automatically by config.status.  */
23304   configure_input="Generated automatically from `echo $ac_file_in |
23305                                                  sed 's,.*/,,'` by configure."
23306
23307   # First look for the input files in the build tree, otherwise in the
23308   # src tree.
23309   ac_file_inputs=`IFS=:
23310     for f in $ac_file_in; do
23311       case $f in
23312       -) echo $tmp/stdin ;;
23313       [\\/$]*)
23314          # Absolute (can't be DOS-style, as IFS=:)
23315          test -f "$f" || { { echo "$as_me:23315: error: cannot find input file: $f" >&5
23316 echo "$as_me: error: cannot find input file: $f" >&2;}
23317    { (exit 1); exit 1; }; }
23318          echo $f;;
23319       *) # Relative
23320          if test -f "$f"; then
23321            # Build tree
23322            echo $f
23323          elif test -f "$srcdir/$f"; then
23324            # Source tree
23325            echo $srcdir/$f
23326          else
23327            # /dev/null tree
23328            { { echo "$as_me:23328: error: cannot find input file: $f" >&5
23329 echo "$as_me: error: cannot find input file: $f" >&2;}
23330    { (exit 1); exit 1; }; }
23331          fi;;
23332       esac
23333     done` || { (exit 1); exit 1; }
23334 EOF
23335 cat >>$CONFIG_STATUS <<\EOF
23336   ac_warn_datarootdir=no
23337   if test x"$ac_file" != x-; then
23338     for ac_item in $ac_file_inputs
23339     do
23340       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23341       if test -n "$ac_seen"; then
23342         ac_used=`grep '@datarootdir@' $ac_item`
23343         if test -z "$ac_used"; then
23344           { echo "$as_me:23344: WARNING: datarootdir was used implicitly but not set:
23345 $ac_seen" >&5
23346 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23347 $ac_seen" >&2;}
23348           ac_warn_datarootdir=yes
23349         fi
23350       fi
23351       ac_seen=`grep '${datarootdir}' $ac_item`
23352       if test -n "$ac_seen"; then
23353         { echo "$as_me:23353: WARNING: datarootdir was used explicitly but not set:
23354 $ac_seen" >&5
23355 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23356 $ac_seen" >&2;}
23357         ac_warn_datarootdir=yes
23358       fi
23359     done
23360   fi
23361
23362 if test "x$ac_warn_datarootdir" = xyes; then
23363   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23364 fi
23365
23366 EOF
23367 cat >>$CONFIG_STATUS <<EOF
23368   sed "$ac_vpsub
23369 $extrasub
23370 EOF
23371 cat >>$CONFIG_STATUS <<\EOF
23372 :t
23373 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23374 s,@configure_input@,$configure_input,;t t
23375 s,@srcdir@,$ac_srcdir,;t t
23376 s,@top_srcdir@,$ac_top_srcdir,;t t
23377 s,@INSTALL@,$ac_INSTALL,;t t
23378 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23379   rm -f $tmp/stdin
23380   if test x"$ac_file" != x-; then
23381     cp $tmp/out $ac_file
23382
23383     for ac_name in prefix exec_prefix datarootdir
23384     do
23385         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23386         if test -n "$ac_seen"; then
23387             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23388             if test -z "$ac_init"; then
23389               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23390               { echo "$as_me:23390: WARNING: Variable $ac_name is used but was not set:
23391 $ac_seen" >&5
23392 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23393 $ac_seen" >&2;}
23394             fi
23395         fi
23396     done
23397     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23398     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23399     if test -s $tmp/out; then
23400       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23401       { echo "$as_me:23401: WARNING: Some variables may not be substituted:
23402 $ac_seen" >&5
23403 echo "$as_me: WARNING: Some variables may not be substituted:
23404 $ac_seen" >&2;}
23405     fi
23406   else
23407     cat $tmp/out
23408   fi
23409   rm -f $tmp/out
23410
23411 done
23412 EOF
23413 cat >>$CONFIG_STATUS <<\EOF
23414
23415 #
23416 # CONFIG_HEADER section.
23417 #
23418
23419 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23420 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23421 #
23422 # ac_d sets the value in "#define NAME VALUE" lines.
23423 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23424 ac_dB='[        ].*$,\1#\2'
23425 ac_dC=' '
23426 ac_dD=',;t'
23427 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23428 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23429 ac_iB='\([      ]\),\1#\2define\3'
23430 ac_iC=' '
23431 ac_iD='\4,;t'
23432 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23433 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23434 ac_uB='$,\1#\2define\3'
23435 ac_uC=' '
23436 ac_uD=',;t'
23437
23438 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23439   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23440   case $ac_file in
23441   - | *:- | *:-:* ) # input from stdin
23442         cat >$tmp/stdin
23443         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23444         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23445   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23446         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23447   * )   ac_file_in=$ac_file.in ;;
23448   esac
23449
23450   test x"$ac_file" != x- && { echo "$as_me:23450: creating $ac_file" >&5
23451 echo "$as_me: creating $ac_file" >&6;}
23452
23453   # First look for the input files in the build tree, otherwise in the
23454   # src tree.
23455   ac_file_inputs=`IFS=:
23456     for f in $ac_file_in; do
23457       case $f in
23458       -) echo $tmp/stdin ;;
23459       [\\/$]*)
23460          # Absolute (can't be DOS-style, as IFS=:)
23461          test -f "$f" || { { echo "$as_me:23461: error: cannot find input file: $f" >&5
23462 echo "$as_me: error: cannot find input file: $f" >&2;}
23463    { (exit 1); exit 1; }; }
23464          echo $f;;
23465       *) # Relative
23466          if test -f "$f"; then
23467            # Build tree
23468            echo $f
23469          elif test -f "$srcdir/$f"; then
23470            # Source tree
23471            echo $srcdir/$f
23472          else
23473            # /dev/null tree
23474            { { echo "$as_me:23474: error: cannot find input file: $f" >&5
23475 echo "$as_me: error: cannot find input file: $f" >&2;}
23476    { (exit 1); exit 1; }; }
23477          fi;;
23478       esac
23479     done` || { (exit 1); exit 1; }
23480   # Remove the trailing spaces.
23481   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23482
23483 EOF
23484
23485 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23486 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23487 # be either 'cat' or 'sort'.
23488 cat confdefs.h | uniq >conftest.vals
23489
23490 # Break up conftest.vals because some shells have a limit on
23491 # the size of here documents, and old seds have small limits too.
23492
23493 rm -f conftest.tail
23494 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23495 while grep . conftest.vals >/dev/null
23496 do
23497   # Write chunks of a limited-size here document to conftest.frag.
23498   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23499   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23500   echo 'CEOF' >> $CONFIG_STATUS
23501   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23502   rm -f conftest.vals
23503   mv conftest.tail conftest.vals
23504 done
23505 rm -f conftest.vals
23506
23507 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23508 # marker @DEFS@.
23509 echo '  cat >> conftest.edit <<CEOF
23510 /@DEFS@/r conftest.frag
23511 /@DEFS@/d
23512 CEOF
23513 sed -f conftest.edit $tmp/in > $tmp/out
23514 rm -f $tmp/in
23515 mv $tmp/out $tmp/in
23516 rm -f conftest.edit conftest.frag
23517 ' >> $CONFIG_STATUS
23518
23519 cat >>$CONFIG_STATUS <<\EOF
23520   # Let's still pretend it is `configure' which instantiates (i.e., don't
23521   # use $as_me), people would be surprised to read:
23522   #    /* config.h.  Generated automatically by config.status.  */
23523   if test x"$ac_file" = x-; then
23524     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23525   else
23526     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23527   fi
23528   cat $tmp/in >>$tmp/config.h
23529   rm -f $tmp/in
23530   if test x"$ac_file" != x-; then
23531     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23532       { echo "$as_me:23532: $ac_file is unchanged" >&5
23533 echo "$as_me: $ac_file is unchanged" >&6;}
23534     else
23535       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23536          X"$ac_file" : 'X\(//\)[^/]' \| \
23537          X"$ac_file" : 'X\(//\)$' \| \
23538          X"$ac_file" : 'X\(/\)' \| \
23539          .     : '\(.\)' 2>/dev/null ||
23540 echo X"$ac_file" |
23541     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23542           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23543           /^X\(\/\/\)$/{ s//\1/; q; }
23544           /^X\(\/\).*/{ s//\1/; q; }
23545           s/.*/./; q'`
23546       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23547         { case "$ac_dir" in
23548   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23549   *)                      as_incr_dir=.;;
23550 esac
23551 as_dummy="$ac_dir"
23552 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23553   case $as_mkdir_dir in
23554     # Skip DOS drivespec
23555     ?:) as_incr_dir=$as_mkdir_dir ;;
23556     *)
23557       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23558       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23559     ;;
23560   esac
23561 done; }
23562
23563       fi
23564       rm -f $ac_file
23565       mv $tmp/config.h $ac_file
23566     fi
23567   else
23568     cat $tmp/config.h
23569     rm -f $tmp/config.h
23570   fi
23571 done
23572 EOF
23573 cat >>$CONFIG_STATUS <<\EOF
23574 #
23575 # CONFIG_COMMANDS section.
23576 #
23577 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23578   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23579   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23580
23581   case $ac_dest in
23582     default )
23583 if test "x$cf_with_tests" != xno ; then
23584
23585 for cf_dir in test
23586 do
23587         if test ! -d $srcdir/$cf_dir; then
23588                 continue
23589         elif test -f $srcdir/$cf_dir/programs; then
23590                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23591         fi
23592 done
23593
23594 fi
23595
23596 cf_prefix=$LIB_PREFIX
23597
23598 case $cf_cv_shlib_version in
23599 (cygdll|msysdll|mingw)
23600         TINFO_NAME=$TINFO_ARG_SUFFIX
23601         TINFO_SUFFIX=.dll
23602         ;;
23603 esac
23604
23605 if test -n "$TINFO_SUFFIX" ; then
23606         case $TINFO_SUFFIX in
23607         (tw*)
23608                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23609                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23610                 ;;
23611         (t*)
23612                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23613                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23614                 ;;
23615         (w*)
23616                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23617                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23618                 ;;
23619         esac
23620 fi
23621
23622 for cf_dir in $SRC_SUBDIRS
23623 do
23624         if test ! -d $srcdir/$cf_dir ; then
23625                 continue
23626         elif test -f $srcdir/$cf_dir/modules; then
23627
23628                 SHARED_LIB=
23629                 Libs_To_Make=
23630
23631                 cf_sed_options=
23632                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23633                 then
23634                         cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
23635                         cf_sed_options="$cf_sed_options -e \"/deprecated in ABI${cf_cv_abi_version}/d\""
23636                 fi
23637
23638                 if test "x$WILDCARD_SYMS" = xno
23639                 then
23640                         cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23641                 fi
23642
23643                 if test "x$cf_sed_options" != "x"
23644                 then
23645                         cat >>$cf_dir/Makefile <<CF_EOF
23646
23647 # Generated by CF_LIB_RULES
23648 resulting.map: $UNALTERED_SYMS
23649         sed $cf_sed_options < $UNALTERED_SYMS >\$@
23650
23651 distclean::
23652         rm -f resulting.map
23653 CF_EOF
23654                 fi
23655
23656                 for cf_item in $cf_LIST_MODELS
23657                 do
23658
23659         case X$cf_item in
23660         (Xlibtool)
23661                 cf_suffix='.la'
23662                 cf_depsuf=$cf_suffix
23663                 ;;
23664         (Xdebug)
23665                 cf_suffix='_g.a'
23666                 cf_depsuf=$cf_suffix
23667                 ;;
23668         (Xprofile)
23669                 cf_suffix='_p.a'
23670                 cf_depsuf=$cf_suffix
23671                 ;;
23672         (Xshared)
23673                 case $cf_cv_system_name in
23674                 (aix[5-7]*)
23675                         cf_suffix='.so'
23676                         cf_depsuf=$cf_suffix
23677                         ;;
23678                 (cygwin*|msys*|mingw*)
23679                         cf_suffix='.dll'
23680                         cf_depsuf='.dll.a'
23681                         ;;
23682                 (darwin*)
23683                         cf_suffix='.dylib'
23684                         cf_depsuf=$cf_suffix
23685                         ;;
23686                 (hpux*)
23687                         case $target in
23688                         (ia64*)
23689                                 cf_suffix='.so'
23690                                 cf_depsuf=$cf_suffix
23691                                 ;;
23692                         (*)
23693                                 cf_suffix='.sl'
23694                                 cf_depsuf=$cf_suffix
23695                                 ;;
23696                         esac
23697                         ;;
23698                 (*)
23699                         cf_suffix='.so'
23700                         cf_depsuf=$cf_suffix
23701                         ;;
23702                 esac
23703                 ;;
23704         (*)
23705                 cf_suffix='.a'
23706                 cf_depsuf=$cf_suffix
23707                 ;;
23708         esac
23709         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23710         then
23711                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23712                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23713         fi
23714
23715                         cf_libname=$cf_dir
23716                         test "$cf_dir" = c++ && cf_libname=ncurses++
23717                         if test $cf_item = shared ; then
23718                                 if test -n "${LIB_SUFFIX}"
23719                                 then
23720                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23721                                 else
23722                                         cf_shared_suffix="$cf_suffix"
23723                                 fi
23724                                 if test "$cf_cv_do_symlinks" = yes ; then
23725                                         cf_version_name=
23726
23727                                         case "$cf_cv_shlib_version" in
23728                                         (rel)
23729                                                 cf_version_name=REL_VERSION
23730                                                 ;;
23731                                         (abi)
23732                                                 cf_version_name=ABI_VERSION
23733                                                 ;;
23734                                         esac
23735
23736                                         if test -n "$cf_version_name"
23737                                         then
23738                                                 case "$cf_cv_system_name" in
23739                                                 (darwin*)
23740                                                         # "w", etc?
23741                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23742                                                         ;;
23743                                                 (*)
23744                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23745                                                         ;;
23746                                                 esac
23747                                         fi
23748                                         if test -n "${USE_LIB_SUFFIX}"
23749                                         then
23750                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23751                                         else
23752                                                 cf_shared_suffix="$cf_suffix"
23753                                         fi
23754                                 fi
23755                                 # cygwin needs import library, and has unique naming convention
23756                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23757                                 # use 'cyg' prefix for shared lib.
23758                                 case $cf_cv_shlib_version in
23759                                 (cygdll)
23760                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23761                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23762                                         ;;
23763                                 (msysdll)
23764                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23765                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23766                                         ;;
23767                                 (mingw)
23768                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23769                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
23770                                         ;;
23771                                 (*)
23772                                         cf_add_lib=
23773                                         ;;
23774                                 esac
23775                                 if test -n "$cf_add_lib"
23776                                 then
23777                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23778                                         continue
23779                                 fi
23780                         fi
23781                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23782                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23783                 done
23784
23785                 if test $cf_dir = ncurses ; then
23786                         cf_subsets="$LIB_SUBSETS"
23787                         cf_r_parts="$cf_subsets"
23788                         cf_liblist="$Libs_To_Make"
23789
23790                         while test -n "$cf_r_parts"
23791                         do
23792                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23793                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23794                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23795                                         cf_add_lib=
23796                                         case $cf_l_parts in
23797                                         (*termlib*)
23798                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23799                                                 ;;
23800                                         (*ticlib*)
23801                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23802                                                 ;;
23803                                         (*)
23804                                                 break
23805                                                 ;;
23806                                         esac
23807                                         if test -n "$cf_add_lib"; then
23808                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
23809                                         fi
23810                                 else
23811                                         break
23812                                 fi
23813                         done
23814                 else
23815                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23816                 fi
23817
23818                 if test $cf_dir = c++; then
23819                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23820                                 cf_list=
23821                                 for cf_item in $Libs_To_Make
23822                                 do
23823                                         case $cf_item in
23824                                         (*.a)
23825                                                 ;;
23826                                         (*)
23827                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23828                                                 ;;
23829                                         esac
23830                                         for cf_test in $cf_list
23831                                         do
23832                                                 if test "$cf_test" = "$cf_item"
23833                                                 then
23834                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23835                                                         cf_item=
23836                                                         break
23837                                                 fi
23838                                         done
23839                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23840                                 done
23841                                 Libs_To_Make="$cf_list"
23842                         fi
23843                 fi
23844
23845                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23846                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23847                         $cf_dir/Makefile >$cf_dir/Makefile.out
23848                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23849
23850                 $AWK -f $srcdir/mk-0th.awk \
23851                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23852                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23853
23854                 for cf_subset in $cf_subsets
23855                 do
23856                         cf_subdirs=
23857                         for cf_item in $cf_LIST_MODELS
23858                         do
23859
23860                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23861
23862 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23863
23864                         CXX_MODEL=$cf_ITEM
23865                         if test "$CXX_MODEL" = SHARED; then
23866                                 case $cf_cv_shlib_version in
23867                                 (cygdll|msysdll|mingw)
23868                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23869
23870 echo "${as_me:-configure}:23870: testing overriding CXX_MODEL to SHARED ..." 1>&5
23871
23872                                         with_shared_cxx=yes
23873                                         ;;
23874                                 (*)
23875                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23876                                         ;;
23877                                 esac
23878                         fi
23879
23880         case X$cf_item in
23881         (Xlibtool)
23882                 cf_suffix='.la'
23883                 cf_depsuf=$cf_suffix
23884                 ;;
23885         (Xdebug)
23886                 cf_suffix='_g.a'
23887                 cf_depsuf=$cf_suffix
23888                 ;;
23889         (Xprofile)
23890                 cf_suffix='_p.a'
23891                 cf_depsuf=$cf_suffix
23892                 ;;
23893         (Xshared)
23894                 case $cf_cv_system_name in
23895                 (aix[5-7]*)
23896                         cf_suffix='.so'
23897                         cf_depsuf=$cf_suffix
23898                         ;;
23899                 (cygwin*|msys*|mingw*)
23900                         cf_suffix='.dll'
23901                         cf_depsuf='.dll.a'
23902                         ;;
23903                 (darwin*)
23904                         cf_suffix='.dylib'
23905                         cf_depsuf=$cf_suffix
23906                         ;;
23907                 (hpux*)
23908                         case $target in
23909                         (ia64*)
23910                                 cf_suffix='.so'
23911                                 cf_depsuf=$cf_suffix
23912                                 ;;
23913                         (*)
23914                                 cf_suffix='.sl'
23915                                 cf_depsuf=$cf_suffix
23916                                 ;;
23917                         esac
23918                         ;;
23919                 (*)
23920                         cf_suffix='.so'
23921                         cf_depsuf=$cf_suffix
23922                         ;;
23923                 esac
23924                 ;;
23925         (*)
23926                 cf_suffix='.a'
23927                 cf_depsuf=$cf_suffix
23928                 ;;
23929         esac
23930         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23931         then
23932                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23933                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23934         fi
23935
23936         case $cf_item in
23937         (libtool) cf_subdir='obj_lo'  ;;
23938         (normal)  cf_subdir='objects' ;;
23939         (debug)   cf_subdir='obj_g' ;;
23940         (profile) cf_subdir='obj_p' ;;
23941         (shared)
23942                 case $cf_cv_system_name in
23943                 (cygwin|msys)
23944                         cf_subdir='objects' ;;
23945                 (*)
23946                         cf_subdir='obj_s' ;;
23947                 esac
23948         esac
23949
23950                         # Test for case where we build libtinfo with a different name.
23951                         cf_libname=$cf_dir
23952                         if test $cf_dir = ncurses ; then
23953                                 case $cf_subset in
23954                                 (*base*)
23955                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
23956                                         ;;
23957                                 (*termlib*)
23958                                         cf_libname=$TINFO_LIB_SUFFIX
23959                                         ;;
23960                                 (ticlib*)
23961                                         cf_libname=$TICS_LIB_SUFFIX
23962                                         ;;
23963                                 esac
23964                         elif test $cf_dir = c++ ; then
23965                                 cf_libname=ncurses++$USE_LIB_SUFFIX
23966                         else
23967                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
23968                         fi
23969                         if test -n "${USE_ARG_SUFFIX}" ; then
23970                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
23971                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
23972                         fi
23973
23974                         # These dependencies really are for development, not
23975                         # builds, but they are useful in porting, too.
23976                         cf_depend="../include/ncurses_cfg.h"
23977                         if test "$srcdir" = "."; then
23978                                 cf_reldir="."
23979                         else
23980                                 cf_reldir="\${srcdir}"
23981                         fi
23982
23983                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23984                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23985                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23986                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23987                         fi
23988
23989                         cf_dir_suffix=
23990                         old_cf_suffix="$cf_suffix"
23991                         if test "$cf_cv_shlib_version_infix" = yes ; then
23992                         if test -n "$USE_LIB_SUFFIX" ; then
23993                                 case $USE_LIB_SUFFIX in
23994                                 (tw*)
23995                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
23996                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
23997                                         cf_dir_suffix=tw$EXTRA_SUFFIX
23998                                         ;;
23999                                 (t*)
24000                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24001                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24002                                         cf_dir_suffix=t$EXTRA_SUFFIX
24003                                         ;;
24004                                 (w*)
24005                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24006                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24007                                         cf_dir_suffix=w$EXTRA_SUFFIX
24008                                         ;;
24009                                 (*)
24010                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24011                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24012                                         cf_dir_suffix=$EXTRA_SUFFIX
24013                                         ;;
24014                                 esac
24015                         fi
24016                         fi
24017
24018                         $AWK -f $srcdir/mk-1st.awk \
24019                                 name=${cf_libname}${cf_dir_suffix} \
24020                                 traces=$LIB_TRACING \
24021                                 MODEL=$cf_ITEM \
24022                                 CXX_MODEL=$CXX_MODEL \
24023                                 model=$cf_subdir \
24024                                 prefix=$cf_prefix \
24025                                 suffix=$cf_suffix \
24026                                 subset=$cf_subset \
24027                                 driver=$cf_cv_term_driver \
24028                                 SymLink="$LN_S" \
24029                                 TermlibRoot=$TINFO_NAME \
24030                                 TermlibSuffix=$TINFO_SUFFIX \
24031                                 ShlibVer=$cf_cv_shlib_version \
24032                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24033                                 ReLink=${cf_cv_do_relink:-no} \
24034                                 DoLinks=$cf_cv_do_symlinks \
24035                                 rmSoLocs=$cf_cv_rm_so_locs \
24036                                 ldconfig="$LDCONFIG" \
24037                                 overwrite=$WITH_OVERWRITE \
24038                                 depend="$cf_depend" \
24039                                 host="$host" \
24040                                 libtool_version="$LIBTOOL_VERSION" \
24041                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24042
24043                         cf_suffix="$old_cf_suffix"
24044
24045                         for cf_subdir2 in $cf_subdirs lib
24046                         do
24047                                 test $cf_subdir = $cf_subdir2 && break
24048                         done
24049                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24050                         $AWK -f $srcdir/mk-2nd.awk \
24051                                 name=$cf_dir \
24052                                 traces=$LIB_TRACING \
24053                                 MODEL=$cf_ITEM \
24054                                 model=$cf_subdir \
24055                                 subset=$cf_subset \
24056                                 srcdir=$srcdir \
24057                                 echo=$WITH_ECHO \
24058                                 crenames=$cf_cv_prog_CC_c_o \
24059                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24060                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24061                         cf_subdirs="$cf_subdirs $cf_subdir"
24062                         done
24063                 done
24064         fi
24065
24066         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24067 done
24068
24069 for cf_dir in $SRC_SUBDIRS
24070 do
24071         if test ! -d $srcdir/$cf_dir ; then
24072                 continue
24073         fi
24074
24075         if test -f $cf_dir/Makefile ; then
24076                 case "$cf_dir" in
24077                 (Ada95)
24078                         echo 'libs \' >> Makefile
24079                         echo 'install.libs \' >> Makefile
24080                         echo 'uninstall.libs ::' >> Makefile
24081                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24082                         ;;
24083                 esac
24084         fi
24085
24086         if test -f $srcdir/$cf_dir/modules; then
24087                 echo >> Makefile
24088                 if test -f $srcdir/$cf_dir/headers; then
24089 cat >> Makefile <<CF_EOF
24090 install.includes \\
24091 uninstall.includes \\
24092 CF_EOF
24093                 fi
24094 if test "$cf_dir" != "c++" ; then
24095 echo 'lint \' >> Makefile
24096 fi
24097 cat >> Makefile <<CF_EOF
24098 libs \\
24099 lintlib \\
24100 install.libs \\
24101 uninstall.libs \\
24102 install.$cf_dir \\
24103 uninstall.$cf_dir ::
24104         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24105 CF_EOF
24106         elif test -f $srcdir/$cf_dir/headers; then
24107 cat >> Makefile <<CF_EOF
24108
24109 libs \\
24110 install.libs \\
24111 uninstall.libs \\
24112 install.includes \\
24113 uninstall.includes ::
24114         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24115 CF_EOF
24116 fi
24117 done
24118
24119 if test "x$cf_with_db_install" = xyes; then
24120 cat >> Makefile <<CF_EOF
24121
24122 install.libs uninstall.libs \\
24123 install.data uninstall.data ::
24124 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24125 CF_EOF
24126 else
24127 cat >> Makefile <<CF_EOF
24128
24129 install.libs uninstall.libs ::
24130         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24131 CF_EOF
24132 fi
24133
24134 if test "x$cf_with_manpages" = xyes; then
24135 cat >> Makefile <<CF_EOF
24136
24137 install.man \\
24138 uninstall.man ::
24139         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24140 CF_EOF
24141 fi
24142
24143 cat >> Makefile <<CF_EOF
24144
24145 distclean ::
24146         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24147         rm -f headers.sh headers.sed mk_shared_lib.sh
24148         rm -f edit_man.* man_alias.*
24149         rm -rf \${DIRS_TO_MAKE}
24150 CF_EOF
24151
24152 # Special case: tack's manpage lives in its own directory.
24153 if test "x$cf_with_manpages" = xyes; then
24154 if test -d tack ; then
24155 if test -f $srcdir/$tack.h; then
24156 cat >> Makefile <<CF_EOF
24157
24158 install.man \\
24159 uninstall.man ::
24160         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24161 CF_EOF
24162 fi
24163 fi
24164 fi
24165
24166 rm -f headers.sed headers.sh
24167
24168 echo creating headers.sh
24169 cat >headers.sh <<CF_EOF
24170 #! $SHELL
24171 # This shell script is generated by the 'configure' script.  It is invoked in a
24172 # subdirectory of the build tree.  It generates a sed-script in the parent
24173 # directory that is used to adjust includes for header files that reside in a
24174 # subdirectory of /usr/include, etc.
24175 PRG=""
24176 while test \$# != 3
24177 do
24178 PRG="\$PRG \$1"; shift
24179 done
24180 DST=\$1
24181 REF=\$2
24182 SRC=\$3
24183 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24184 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24185 echo installing \$SRC in \$DST
24186 CF_EOF
24187
24188 if test $WITH_CURSES_H = yes; then
24189         cat >>headers.sh <<CF_EOF
24190 case \$DST in
24191 (/*/include/*)
24192         END=\`basename \$DST\`
24193         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24194         do
24195                 NAME=\`basename \$i\`
24196                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24197         done
24198         ;;
24199 (*)
24200         echo "" >> \$TMPSED
24201         ;;
24202 esac
24203 CF_EOF
24204
24205 else
24206         cat >>headers.sh <<CF_EOF
24207 case \$DST in
24208 (/*/include/*)
24209         END=\`basename \$DST\`
24210         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24211         do
24212                 NAME=\`basename \$i\`
24213                 if test "\$NAME" = "curses.h"
24214                 then
24215                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24216                         NAME=ncurses.h
24217                 fi
24218                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24219         done
24220         ;;
24221 (*)
24222         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24223         ;;
24224 esac
24225 CF_EOF
24226 fi
24227 cat >>headers.sh <<CF_EOF
24228 rm -f \$TMPSRC
24229 sed -f \$TMPSED \$SRC > \$TMPSRC
24230 NAME=\`basename \$SRC\`
24231 CF_EOF
24232 if test $WITH_CURSES_H != yes; then
24233         cat >>headers.sh <<CF_EOF
24234 test "\$NAME" = "curses.h" && NAME=ncurses.h
24235 CF_EOF
24236 fi
24237 cat >>headers.sh <<CF_EOF
24238 # Just in case someone gzip'd manpages, remove the conflicting copy.
24239 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24240
24241 eval \$PRG \$TMPSRC \$DST/\$NAME
24242 rm -f \$TMPSRC \$TMPSED
24243 CF_EOF
24244
24245 chmod 0755 headers.sh
24246
24247 for cf_dir in $SRC_SUBDIRS
24248 do
24249         if test ! -d $srcdir/$cf_dir ; then
24250                 continue
24251         fi
24252
24253         if test -f $srcdir/$cf_dir/headers; then
24254                 $AWK -f $srcdir/mk-hdr.awk \
24255                         subset="$LIB_SUBSETS" \
24256                         compat="$WITH_CURSES_H" \
24257                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24258         fi
24259
24260         if test -f $srcdir/$cf_dir/modules; then
24261                 if test "$cf_dir" != "c++" ; then
24262                         cat >>$cf_dir/Makefile <<"CF_EOF"
24263 depend : ${AUTO_SRC}
24264         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24265
24266 # DO NOT DELETE THIS LINE -- make depend depends on it.
24267 CF_EOF
24268                 fi
24269         fi
24270 done
24271
24272 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24273 if test -z "$USE_OLD_MAKERULES" ; then
24274         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24275 fi
24276 fi
24277  ;;
24278   esac
24279 done
24280 EOF
24281
24282 cat >>$CONFIG_STATUS <<\EOF
24283
24284 { (exit 0); exit 0; }
24285 EOF
24286 chmod +x $CONFIG_STATUS
24287 ac_clean_files=$ac_clean_files_save
24288
24289 # configure is writing to config.log, and then calls config.status.
24290 # config.status does its own redirection, appending to config.log.
24291 # Unfortunately, on DOS this fails, as config.log is still kept open
24292 # by configure, so config.status won't be able to write to it; its
24293 # output is simply discarded.  So we exec the FD to /dev/null,
24294 # effectively closing config.log, so it can be properly (re)opened and
24295 # appended to by config.status.  When coming back to configure, we
24296 # need to make the FD available again.
24297 if test "$no_create" != yes; then
24298   ac_cs_success=:
24299   exec 5>/dev/null
24300   $SHELL $CONFIG_STATUS || ac_cs_success=false
24301   exec 5>>config.log
24302   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24303   # would make configure fail if this is the last instruction.
24304   $ac_cs_success || { (exit 1); exit 1; }
24305 fi
24306 ${MAKE:-make} preinstall