]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.0 - patch 20151017
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.620 .
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*|os2*|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                 if test "$DFT_LWR_MODEL" = libtool; then
5128                         LIB_PREFIX='lib'
5129                 else
5130                         LIB_PREFIX=''
5131                 fi
5132                 ;;
5133         (*)     LIB_PREFIX='lib'
5134                 ;;
5135         esac
5136 cf_prefix=$LIB_PREFIX
5137
5138 elif test $with_lib_prefix = no
5139 then
5140         LIB_PREFIX=
5141 else
5142         LIB_PREFIX=$with_lib_prefix
5143 fi
5144
5145 LIB_SUFFIX=
5146
5147         echo "$as_me:5147: checking for PATH separator" >&5
5148 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5149         case $cf_cv_system_name in
5150         (os2*)  PATH_SEPARATOR=';'  ;;
5151         (*)     ${PATH_SEPARATOR:=':'}  ;;
5152         esac
5153
5154         echo "$as_me:5154: result: $PATH_SEPARATOR" >&5
5155 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5156
5157 ###############################################################################
5158
5159 echo "$as_me:5159: checking if you want to build a separate terminfo library" >&5
5160 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5161
5162 # Check whether --with-termlib or --without-termlib was given.
5163 if test "${with_termlib+set}" = set; then
5164   withval="$with_termlib"
5165   with_termlib=$withval
5166 else
5167   with_termlib=no
5168 fi;
5169 echo "$as_me:5169: result: $with_termlib" >&5
5170 echo "${ECHO_T}$with_termlib" >&6
5171
5172 echo "$as_me:5172: checking if you want to build a separate tic library" >&5
5173 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5174
5175 # Check whether --with-ticlib or --without-ticlib was given.
5176 if test "${with_ticlib+set}" = set; then
5177   withval="$with_ticlib"
5178   with_ticlib=$withval
5179 else
5180   with_ticlib=no
5181 fi;
5182 echo "$as_me:5182: result: $with_ticlib" >&5
5183 echo "${ECHO_T}$with_ticlib" >&6
5184
5185 ### Checks for special libraries, must be done up-front.
5186 SHLIB_LIST=""
5187
5188 echo "$as_me:5188: checking if you want to link with the GPM mouse library" >&5
5189 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5190
5191 # Check whether --with-gpm or --without-gpm was given.
5192 if test "${with_gpm+set}" = set; then
5193   withval="$with_gpm"
5194   with_gpm=$withval
5195 else
5196   with_gpm=maybe
5197 fi;
5198 echo "$as_me:5198: result: $with_gpm" >&5
5199 echo "${ECHO_T}$with_gpm" >&6
5200
5201 if test "$with_gpm" != no ; then
5202         echo "$as_me:5202: checking for gpm.h" >&5
5203 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5204 if test "${ac_cv_header_gpm_h+set}" = set; then
5205   echo $ECHO_N "(cached) $ECHO_C" >&6
5206 else
5207   cat >conftest.$ac_ext <<_ACEOF
5208 #line 5208 "configure"
5209 #include "confdefs.h"
5210 #include <gpm.h>
5211 _ACEOF
5212 if { (eval echo "$as_me:5212: \"$ac_cpp conftest.$ac_ext\"") >&5
5213   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5214   ac_status=$?
5215   egrep -v '^ *\+' conftest.er1 >conftest.err
5216   rm -f conftest.er1
5217   cat conftest.err >&5
5218   echo "$as_me:5218: \$? = $ac_status" >&5
5219   (exit $ac_status); } >/dev/null; then
5220   if test -s conftest.err; then
5221     ac_cpp_err=$ac_c_preproc_warn_flag
5222   else
5223     ac_cpp_err=
5224   fi
5225 else
5226   ac_cpp_err=yes
5227 fi
5228 if test -z "$ac_cpp_err"; then
5229   ac_cv_header_gpm_h=yes
5230 else
5231   echo "$as_me: failed program was:" >&5
5232   cat conftest.$ac_ext >&5
5233   ac_cv_header_gpm_h=no
5234 fi
5235 rm -f conftest.err conftest.$ac_ext
5236 fi
5237 echo "$as_me:5237: result: $ac_cv_header_gpm_h" >&5
5238 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5239 if test $ac_cv_header_gpm_h = yes; then
5240
5241 cat >>confdefs.h <<\EOF
5242 #define HAVE_GPM_H 1
5243 EOF
5244
5245                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5246                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5247
5248 echo "${as_me:-configure}:5248: testing assuming we really have GPM library ..." 1>&5
5249
5250 cat >>confdefs.h <<\EOF
5251 #define HAVE_LIBGPM 1
5252 EOF
5253
5254                 else
5255                         echo "$as_me:5255: checking for Gpm_Open in -lgpm" >&5
5256 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5257 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5258   echo $ECHO_N "(cached) $ECHO_C" >&6
5259 else
5260   ac_check_lib_save_LIBS=$LIBS
5261 LIBS="-lgpm  $LIBS"
5262 cat >conftest.$ac_ext <<_ACEOF
5263 #line 5263 "configure"
5264 #include "confdefs.h"
5265
5266 /* Override any gcc2 internal prototype to avoid an error.  */
5267 #ifdef __cplusplus
5268 extern "C"
5269 #endif
5270 /* We use char because int might match the return type of a gcc2
5271    builtin and then its argument prototype would still apply.  */
5272 char Gpm_Open ();
5273 int
5274 main ()
5275 {
5276 Gpm_Open ();
5277   ;
5278   return 0;
5279 }
5280 _ACEOF
5281 rm -f conftest.$ac_objext conftest$ac_exeext
5282 if { (eval echo "$as_me:5282: \"$ac_link\"") >&5
5283   (eval $ac_link) 2>&5
5284   ac_status=$?
5285   echo "$as_me:5285: \$? = $ac_status" >&5
5286   (exit $ac_status); } &&
5287          { ac_try='test -s conftest$ac_exeext'
5288   { (eval echo "$as_me:5288: \"$ac_try\"") >&5
5289   (eval $ac_try) 2>&5
5290   ac_status=$?
5291   echo "$as_me:5291: \$? = $ac_status" >&5
5292   (exit $ac_status); }; }; then
5293   ac_cv_lib_gpm_Gpm_Open=yes
5294 else
5295   echo "$as_me: failed program was:" >&5
5296 cat conftest.$ac_ext >&5
5297 ac_cv_lib_gpm_Gpm_Open=no
5298 fi
5299 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5300 LIBS=$ac_check_lib_save_LIBS
5301 fi
5302 echo "$as_me:5302: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5303 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5304 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5305   :
5306 else
5307
5308                                 { { echo "$as_me:5308: error: Cannot link with GPM library" >&5
5309 echo "$as_me: error: Cannot link with GPM library" >&2;}
5310    { (exit 1); exit 1; }; }
5311                 fi
5312                 with_gpm=yes
5313
5314 fi
5315
5316 else
5317
5318                 test "$with_gpm" != maybe && { echo "$as_me:5318: WARNING: Cannot find GPM header" >&5
5319 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5320                 with_gpm=no
5321
5322 fi
5323
5324 fi
5325
5326 if test "$with_gpm" != no ; then
5327         echo "$as_me:5327: checking if you want to load GPM dynamically" >&5
5328 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5329
5330 # Check whether --with-dlsym or --without-dlsym was given.
5331 if test "${with_dlsym+set}" = set; then
5332   withval="$with_dlsym"
5333   with_dlsym=$withval
5334 else
5335   with_dlsym=yes
5336 fi;
5337         echo "$as_me:5337: result: $with_dlsym" >&5
5338 echo "${ECHO_T}$with_dlsym" >&6
5339         if test "x$with_dlsym" = xyes ; then
5340
5341 cf_have_dlsym=no
5342 echo "$as_me:5342: checking for dlsym" >&5
5343 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5344 if test "${ac_cv_func_dlsym+set}" = set; then
5345   echo $ECHO_N "(cached) $ECHO_C" >&6
5346 else
5347   cat >conftest.$ac_ext <<_ACEOF
5348 #line 5348 "configure"
5349 #include "confdefs.h"
5350 /* System header to define __stub macros and hopefully few prototypes,
5351     which can conflict with char dlsym (); below.  */
5352 #include <assert.h>
5353 /* Override any gcc2 internal prototype to avoid an error.  */
5354 #ifdef __cplusplus
5355 extern "C"
5356 #endif
5357 /* We use char because int might match the return type of a gcc2
5358    builtin and then its argument prototype would still apply.  */
5359 char dlsym ();
5360 char (*f) ();
5361
5362 int
5363 main ()
5364 {
5365 /* The GNU C library defines this for functions which it implements
5366     to always fail with ENOSYS.  Some functions are actually named
5367     something starting with __ and the normal name is an alias.  */
5368 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5369 choke me
5370 #else
5371 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5372 #endif
5373
5374   ;
5375   return 0;
5376 }
5377 _ACEOF
5378 rm -f conftest.$ac_objext conftest$ac_exeext
5379 if { (eval echo "$as_me:5379: \"$ac_link\"") >&5
5380   (eval $ac_link) 2>&5
5381   ac_status=$?
5382   echo "$as_me:5382: \$? = $ac_status" >&5
5383   (exit $ac_status); } &&
5384          { ac_try='test -s conftest$ac_exeext'
5385   { (eval echo "$as_me:5385: \"$ac_try\"") >&5
5386   (eval $ac_try) 2>&5
5387   ac_status=$?
5388   echo "$as_me:5388: \$? = $ac_status" >&5
5389   (exit $ac_status); }; }; then
5390   ac_cv_func_dlsym=yes
5391 else
5392   echo "$as_me: failed program was:" >&5
5393 cat conftest.$ac_ext >&5
5394 ac_cv_func_dlsym=no
5395 fi
5396 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5397 fi
5398 echo "$as_me:5398: result: $ac_cv_func_dlsym" >&5
5399 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5400 if test $ac_cv_func_dlsym = yes; then
5401   cf_have_dlsym=yes
5402 else
5403
5404 cf_have_libdl=no
5405 echo "$as_me:5405: checking for dlsym in -ldl" >&5
5406 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5407 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5408   echo $ECHO_N "(cached) $ECHO_C" >&6
5409 else
5410   ac_check_lib_save_LIBS=$LIBS
5411 LIBS="-ldl  $LIBS"
5412 cat >conftest.$ac_ext <<_ACEOF
5413 #line 5413 "configure"
5414 #include "confdefs.h"
5415
5416 /* Override any gcc2 internal prototype to avoid an error.  */
5417 #ifdef __cplusplus
5418 extern "C"
5419 #endif
5420 /* We use char because int might match the return type of a gcc2
5421    builtin and then its argument prototype would still apply.  */
5422 char dlsym ();
5423 int
5424 main ()
5425 {
5426 dlsym ();
5427   ;
5428   return 0;
5429 }
5430 _ACEOF
5431 rm -f conftest.$ac_objext conftest$ac_exeext
5432 if { (eval echo "$as_me:5432: \"$ac_link\"") >&5
5433   (eval $ac_link) 2>&5
5434   ac_status=$?
5435   echo "$as_me:5435: \$? = $ac_status" >&5
5436   (exit $ac_status); } &&
5437          { ac_try='test -s conftest$ac_exeext'
5438   { (eval echo "$as_me:5438: \"$ac_try\"") >&5
5439   (eval $ac_try) 2>&5
5440   ac_status=$?
5441   echo "$as_me:5441: \$? = $ac_status" >&5
5442   (exit $ac_status); }; }; then
5443   ac_cv_lib_dl_dlsym=yes
5444 else
5445   echo "$as_me: failed program was:" >&5
5446 cat conftest.$ac_ext >&5
5447 ac_cv_lib_dl_dlsym=no
5448 fi
5449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5450 LIBS=$ac_check_lib_save_LIBS
5451 fi
5452 echo "$as_me:5452: result: $ac_cv_lib_dl_dlsym" >&5
5453 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5454 if test $ac_cv_lib_dl_dlsym = yes; then
5455
5456         cf_have_dlsym=yes
5457         cf_have_libdl=yes
5458 fi
5459
5460 fi
5461
5462 if test "$cf_have_dlsym" = yes ; then
5463         test "$cf_have_libdl" = yes && {
5464 cf_add_libs="-ldl"
5465 # Filter out duplicates - this happens with badly-designed ".pc" files...
5466 for cf_add_1lib in $LIBS
5467 do
5468         for cf_add_2lib in $cf_add_libs
5469         do
5470                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5471                 then
5472                         cf_add_1lib=
5473                         break
5474                 fi
5475         done
5476         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5477 done
5478 LIBS="$cf_add_libs"
5479  }
5480
5481         echo "$as_me:5481: checking whether able to link to dl*() functions" >&5
5482 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5483         cat >conftest.$ac_ext <<_ACEOF
5484 #line 5484 "configure"
5485 #include "confdefs.h"
5486 #include <dlfcn.h>
5487 int
5488 main ()
5489 {
5490
5491                 void *obj;
5492                 if ((obj = dlopen("filename", 0)) != 0) {
5493                         if (dlsym(obj, "symbolname") == 0) {
5494                         dlclose(obj);
5495                         }
5496                 }
5497   ;
5498   return 0;
5499 }
5500 _ACEOF
5501 rm -f conftest.$ac_objext conftest$ac_exeext
5502 if { (eval echo "$as_me:5502: \"$ac_link\"") >&5
5503   (eval $ac_link) 2>&5
5504   ac_status=$?
5505   echo "$as_me:5505: \$? = $ac_status" >&5
5506   (exit $ac_status); } &&
5507          { ac_try='test -s conftest$ac_exeext'
5508   { (eval echo "$as_me:5508: \"$ac_try\"") >&5
5509   (eval $ac_try) 2>&5
5510   ac_status=$?
5511   echo "$as_me:5511: \$? = $ac_status" >&5
5512   (exit $ac_status); }; }; then
5513
5514 cat >>confdefs.h <<\EOF
5515 #define HAVE_LIBDL 1
5516 EOF
5517
5518 else
5519   echo "$as_me: failed program was:" >&5
5520 cat conftest.$ac_ext >&5
5521
5522                 { { echo "$as_me:5522: error: Cannot link test program for libdl" >&5
5523 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5524    { (exit 1); exit 1; }; }
5525 fi
5526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5527         echo "$as_me:5527: result: ok" >&5
5528 echo "${ECHO_T}ok" >&6
5529 else
5530         { { echo "$as_me:5530: error: Cannot find dlsym function" >&5
5531 echo "$as_me: error: Cannot find dlsym function" >&2;}
5532    { (exit 1); exit 1; }; }
5533 fi
5534
5535                 if test "x$with_gpm" != xyes ; then
5536                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5537
5538 echo "${as_me:-configure}:5538: testing assuming soname for gpm is $with_gpm ..." 1>&5
5539
5540                         cf_cv_gpm_soname="$with_gpm"
5541                 else
5542
5543 echo "$as_me:5543: checking for soname of gpm library" >&5
5544 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5545 if test "${cf_cv_gpm_soname+set}" = set; then
5546   echo $ECHO_N "(cached) $ECHO_C" >&6
5547 else
5548
5549 cf_cv_gpm_soname=unknown
5550 if test "$cross_compiling" != yes ; then
5551 cat >conftest.$ac_ext <<CF_EOF
5552 #include <gpm.h>
5553 int main()
5554 {
5555 if (Gpm_Open(0,0)) Gpm_Close();
5556         ${cf_cv_main_return:-return}(0);
5557 }
5558 CF_EOF
5559 cf_save_LIBS="$LIBS"
5560
5561 cf_add_libs="-lgpm"
5562 # Filter out duplicates - this happens with badly-designed ".pc" files...
5563 for cf_add_1lib in $LIBS
5564 do
5565         for cf_add_2lib in $cf_add_libs
5566         do
5567                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5568                 then
5569                         cf_add_1lib=
5570                         break
5571                 fi
5572         done
5573         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5574 done
5575 LIBS="$cf_add_libs"
5576
5577         if { (eval echo "$as_me:5577: \"$ac_compile\"") >&5
5578   (eval $ac_compile) 2>&5
5579   ac_status=$?
5580   echo "$as_me:5580: \$? = $ac_status" >&5
5581   (exit $ac_status); } ; then
5582                 if { (eval echo "$as_me:5582: \"$ac_link\"") >&5
5583   (eval $ac_link) 2>&5
5584   ac_status=$?
5585   echo "$as_me:5585: \$? = $ac_status" >&5
5586   (exit $ac_status); } ; then
5587                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5588                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5589                 fi
5590         fi
5591 rm -rf conftest*
5592 LIBS="$cf_save_LIBS"
5593 fi
5594
5595 fi
5596 echo "$as_me:5596: result: $cf_cv_gpm_soname" >&5
5597 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5598
5599                 fi
5600                 test "$cf_cv_gpm_soname" != "unknown" &&
5601 cat >>confdefs.h <<EOF
5602 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5603 EOF
5604
5605                 SHLIB_LIST="-ldl $SHLIB_LIST"
5606         else
5607                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5608
5609 cf_add_libs="-lgpm"
5610 # Filter out duplicates - this happens with badly-designed ".pc" files...
5611 for cf_add_1lib in $TEST_LIBS
5612 do
5613         for cf_add_2lib in $cf_add_libs
5614         do
5615                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5616                 then
5617                         cf_add_1lib=
5618                         break
5619                 fi
5620         done
5621         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5622 done
5623 TEST_LIBS="$cf_add_libs"
5624
5625         fi
5626
5627 cat >>confdefs.h <<\EOF
5628 #define HAVE_LIBGPM 1
5629 EOF
5630
5631 echo "$as_me:5631: checking for Gpm_Wgetch in -lgpm" >&5
5632 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5633 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5634   echo $ECHO_N "(cached) $ECHO_C" >&6
5635 else
5636   ac_check_lib_save_LIBS=$LIBS
5637 LIBS="-lgpm  $LIBS"
5638 cat >conftest.$ac_ext <<_ACEOF
5639 #line 5639 "configure"
5640 #include "confdefs.h"
5641
5642 /* Override any gcc2 internal prototype to avoid an error.  */
5643 #ifdef __cplusplus
5644 extern "C"
5645 #endif
5646 /* We use char because int might match the return type of a gcc2
5647    builtin and then its argument prototype would still apply.  */
5648 char Gpm_Wgetch ();
5649 int
5650 main ()
5651 {
5652 Gpm_Wgetch ();
5653   ;
5654   return 0;
5655 }
5656 _ACEOF
5657 rm -f conftest.$ac_objext conftest$ac_exeext
5658 if { (eval echo "$as_me:5658: \"$ac_link\"") >&5
5659   (eval $ac_link) 2>&5
5660   ac_status=$?
5661   echo "$as_me:5661: \$? = $ac_status" >&5
5662   (exit $ac_status); } &&
5663          { ac_try='test -s conftest$ac_exeext'
5664   { (eval echo "$as_me:5664: \"$ac_try\"") >&5
5665   (eval $ac_try) 2>&5
5666   ac_status=$?
5667   echo "$as_me:5667: \$? = $ac_status" >&5
5668   (exit $ac_status); }; }; then
5669   ac_cv_lib_gpm_Gpm_Wgetch=yes
5670 else
5671   echo "$as_me: failed program was:" >&5
5672 cat conftest.$ac_ext >&5
5673 ac_cv_lib_gpm_Gpm_Wgetch=no
5674 fi
5675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5676 LIBS=$ac_check_lib_save_LIBS
5677 fi
5678 echo "$as_me:5678: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5679 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5680 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5681
5682 echo "$as_me:5682: checking if GPM is weakly bound to curses library" >&5
5683 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5684 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5685   echo $ECHO_N "(cached) $ECHO_C" >&6
5686 else
5687
5688 cf_cv_check_gpm_wgetch=unknown
5689 if test "$cross_compiling" != yes ; then
5690
5691 cat >conftest.$ac_ext <<CF_EOF
5692 #include <gpm.h>
5693 int main()
5694 {
5695         Gpm_Wgetch();
5696         ${cf_cv_main_return:-return}(0);
5697 }
5698 CF_EOF
5699
5700         cf_save_LIBS="$LIBS"
5701         # This only works if we can look at the symbol table.  If a shared
5702         # library is stripped for install, we cannot use that.  So we're forced
5703         # to rely on the static library, noting that some packagers may not
5704         # include it.
5705         LIBS="-static -lgpm -dynamic $LIBS"
5706         if { (eval echo "$as_me:5706: \"$ac_compile\"") >&5
5707   (eval $ac_compile) 2>&5
5708   ac_status=$?
5709   echo "$as_me:5709: \$? = $ac_status" >&5
5710   (exit $ac_status); } ; then
5711                 if { (eval echo "$as_me:5711: \"$ac_link\"") >&5
5712   (eval $ac_link) 2>&5
5713   ac_status=$?
5714   echo "$as_me:5714: \$? = $ac_status" >&5
5715   (exit $ac_status); } ; then
5716                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5717                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5718                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5719                 fi
5720         fi
5721         rm -rf conftest*
5722         LIBS="$cf_save_LIBS"
5723 fi
5724
5725 fi
5726 echo "$as_me:5726: result: $cf_cv_check_gpm_wgetch" >&5
5727 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5728
5729 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5730         { echo "$as_me:5730: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5731 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5732 fi
5733
5734 fi
5735
5736 fi
5737
5738 # not everyone has "test -c"
5739 if test -c /dev/sysmouse 2>/dev/null ; then
5740 echo "$as_me:5740: checking if you want to use sysmouse" >&5
5741 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5742
5743 # Check whether --with-sysmouse or --without-sysmouse was given.
5744 if test "${with_sysmouse+set}" = set; then
5745   withval="$with_sysmouse"
5746   cf_with_sysmouse=$withval
5747 else
5748   cf_with_sysmouse=maybe
5749 fi;
5750         if test "$cf_with_sysmouse" != no ; then
5751         cat >conftest.$ac_ext <<_ACEOF
5752 #line 5752 "configure"
5753 #include "confdefs.h"
5754
5755 #include <osreldate.h>
5756 #if (__FreeBSD_version >= 400017)
5757 #include <sys/consio.h>
5758 #include <sys/fbio.h>
5759 #else
5760 #include <machine/console.h>
5761 #endif
5762
5763 int
5764 main ()
5765 {
5766
5767         struct mouse_info the_mouse;
5768         ioctl(0, CONS_MOUSECTL, &the_mouse);
5769
5770   ;
5771   return 0;
5772 }
5773 _ACEOF
5774 rm -f conftest.$ac_objext
5775 if { (eval echo "$as_me:5775: \"$ac_compile\"") >&5
5776   (eval $ac_compile) 2>&5
5777   ac_status=$?
5778   echo "$as_me:5778: \$? = $ac_status" >&5
5779   (exit $ac_status); } &&
5780          { ac_try='test -s conftest.$ac_objext'
5781   { (eval echo "$as_me:5781: \"$ac_try\"") >&5
5782   (eval $ac_try) 2>&5
5783   ac_status=$?
5784   echo "$as_me:5784: \$? = $ac_status" >&5
5785   (exit $ac_status); }; }; then
5786   cf_with_sysmouse=yes
5787 else
5788   echo "$as_me: failed program was:" >&5
5789 cat conftest.$ac_ext >&5
5790 cf_with_sysmouse=no
5791 fi
5792 rm -f conftest.$ac_objext conftest.$ac_ext
5793         fi
5794 echo "$as_me:5794: result: $cf_with_sysmouse" >&5
5795 echo "${ECHO_T}$cf_with_sysmouse" >&6
5796 test "$cf_with_sysmouse" = yes &&
5797 cat >>confdefs.h <<\EOF
5798 #define USE_SYSMOUSE 1
5799 EOF
5800
5801 fi
5802
5803 if test X"$CC_G_OPT" = X"" ; then
5804         CC_G_OPT='-g'
5805         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5806 fi
5807
5808 if test X"$CXX_G_OPT" = X"" ; then
5809         CXX_G_OPT='-g'
5810         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5811 fi
5812
5813 echo "$as_me:5813: checking for default loader flags" >&5
5814 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5815 case $DFT_LWR_MODEL in
5816 (libtool) LD_MODEL=''   ;;
5817 (normal)  LD_MODEL=''   ;;
5818 (debug)   LD_MODEL=$CC_G_OPT ;;
5819 (profile) LD_MODEL='-pg';;
5820 (shared)  LD_MODEL=''   ;;
5821 esac
5822 echo "$as_me:5822: result: $LD_MODEL" >&5
5823 echo "${ECHO_T}$LD_MODEL" >&6
5824
5825 case $DFT_LWR_MODEL in
5826 (shared)
5827
5828 echo "$as_me:5828: checking if rpath option should be used" >&5
5829 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5830
5831 # Check whether --enable-rpath or --disable-rpath was given.
5832 if test "${enable_rpath+set}" = set; then
5833   enableval="$enable_rpath"
5834   cf_cv_enable_rpath=$enableval
5835 else
5836   cf_cv_enable_rpath=no
5837 fi;
5838 echo "$as_me:5838: result: $cf_cv_enable_rpath" >&5
5839 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5840
5841 echo "$as_me:5841: checking if shared libraries should be relinked during install" >&5
5842 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5843
5844 # Check whether --enable-relink or --disable-relink was given.
5845 if test "${enable_relink+set}" = set; then
5846   enableval="$enable_relink"
5847   cf_cv_do_relink=$enableval
5848 else
5849   cf_cv_do_relink=yes
5850 fi;
5851 echo "$as_me:5851: result: $cf_cv_do_relink" >&5
5852 echo "${ECHO_T}$cf_cv_do_relink" >&6
5853         ;;
5854 esac
5855
5856 # we will build libraries one-level down.
5857 rel_builddir=..
5858
5859 LD_RPATH_OPT=
5860 echo "$as_me:5860: checking for an rpath option" >&5
5861 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5862 case $cf_cv_system_name in
5863 (irix*)
5864         if test "$GCC" = yes; then
5865                 LD_RPATH_OPT="-Wl,-rpath,"
5866         else
5867                 LD_RPATH_OPT="-rpath "
5868         fi
5869         ;;
5870 (linux*|gnu*|k*bsd*-gnu)
5871         LD_RPATH_OPT="-Wl,-rpath,"
5872         ;;
5873 (openbsd[2-9].*|mirbsd*)
5874         LD_RPATH_OPT="-Wl,-rpath,"
5875         ;;
5876 (dragonfly*|freebsd*)
5877         LD_RPATH_OPT="-rpath "
5878         ;;
5879 (netbsd*)
5880         LD_RPATH_OPT="-Wl,-rpath,"
5881         ;;
5882 (osf*|mls+*)
5883         LD_RPATH_OPT="-rpath "
5884         ;;
5885 (solaris2*)
5886         LD_RPATH_OPT="-R"
5887         ;;
5888 (*)
5889         ;;
5890 esac
5891 echo "$as_me:5891: result: $LD_RPATH_OPT" >&5
5892 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5893
5894 case "x$LD_RPATH_OPT" in
5895 (x-R*)
5896         echo "$as_me:5896: checking if we need a space after rpath option" >&5
5897 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5898         cf_save_LIBS="$LIBS"
5899
5900 cf_add_libs="${LD_RPATH_OPT}$libdir"
5901 # Filter out duplicates - this happens with badly-designed ".pc" files...
5902 for cf_add_1lib in $LIBS
5903 do
5904         for cf_add_2lib in $cf_add_libs
5905         do
5906                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5907                 then
5908                         cf_add_1lib=
5909                         break
5910                 fi
5911         done
5912         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5913 done
5914 LIBS="$cf_add_libs"
5915
5916         cat >conftest.$ac_ext <<_ACEOF
5917 #line 5917 "configure"
5918 #include "confdefs.h"
5919
5920 int
5921 main ()
5922 {
5923
5924   ;
5925   return 0;
5926 }
5927 _ACEOF
5928 rm -f conftest.$ac_objext conftest$ac_exeext
5929 if { (eval echo "$as_me:5929: \"$ac_link\"") >&5
5930   (eval $ac_link) 2>&5
5931   ac_status=$?
5932   echo "$as_me:5932: \$? = $ac_status" >&5
5933   (exit $ac_status); } &&
5934          { ac_try='test -s conftest$ac_exeext'
5935   { (eval echo "$as_me:5935: \"$ac_try\"") >&5
5936   (eval $ac_try) 2>&5
5937   ac_status=$?
5938   echo "$as_me:5938: \$? = $ac_status" >&5
5939   (exit $ac_status); }; }; then
5940   cf_rpath_space=no
5941 else
5942   echo "$as_me: failed program was:" >&5
5943 cat conftest.$ac_ext >&5
5944 cf_rpath_space=yes
5945 fi
5946 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5947         LIBS="$cf_save_LIBS"
5948         echo "$as_me:5948: result: $cf_rpath_space" >&5
5949 echo "${ECHO_T}$cf_rpath_space" >&6
5950         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5951         ;;
5952 esac
5953
5954         RM_SHARED_OPTS=
5955         LOCAL_LDFLAGS=
5956         LOCAL_LDFLAGS2=
5957         LD_SHARED_OPTS=
5958         INSTALL_LIB="-m 644"
5959         : ${rel_builddir:=.}
5960
5961         shlibdir=$libdir
5962
5963         MAKE_DLLS="#"
5964
5965         cf_cv_do_symlinks=no
5966         cf_ld_rpath_opt=
5967         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5968
5969         echo "$as_me:5969: checking if release/abi version should be used for shared libs" >&5
5970 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5971
5972 # Check whether --with-shlib-version or --without-shlib-version was given.
5973 if test "${with_shlib_version+set}" = set; then
5974   withval="$with_shlib_version"
5975   test -z "$withval" && withval=auto
5976         case $withval in
5977         (yes)
5978                 cf_cv_shlib_version=auto
5979                 ;;
5980         (rel|abi|auto)
5981                 cf_cv_shlib_version=$withval
5982                 ;;
5983         (*)
5984                 echo "$as_me:5984: result: $withval" >&5
5985 echo "${ECHO_T}$withval" >&6
5986                 { { echo "$as_me:5986: error: option value must be one of: rel, abi, or auto" >&5
5987 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5988    { (exit 1); exit 1; }; }
5989                 ;;
5990         esac
5991
5992 else
5993   cf_cv_shlib_version=auto
5994 fi;
5995         echo "$as_me:5995: result: $cf_cv_shlib_version" >&5
5996 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5997
5998         cf_cv_rm_so_locs=no
5999         cf_try_cflags=
6000
6001         # Some less-capable ports of gcc support only -fpic
6002         CC_SHARED_OPTS=
6003         if test "$GCC" = yes
6004         then
6005                 echo "$as_me:6005: checking which $CC option to use" >&5
6006 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6007                 cf_save_CFLAGS="$CFLAGS"
6008                 for CC_SHARED_OPTS in -fPIC -fpic ''
6009                 do
6010                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6011                         cat >conftest.$ac_ext <<_ACEOF
6012 #line 6012 "configure"
6013 #include "confdefs.h"
6014 #include <stdio.h>
6015 int
6016 main ()
6017 {
6018 int x = 1
6019   ;
6020   return 0;
6021 }
6022 _ACEOF
6023 rm -f conftest.$ac_objext
6024 if { (eval echo "$as_me:6024: \"$ac_compile\"") >&5
6025   (eval $ac_compile) 2>&5
6026   ac_status=$?
6027   echo "$as_me:6027: \$? = $ac_status" >&5
6028   (exit $ac_status); } &&
6029          { ac_try='test -s conftest.$ac_objext'
6030   { (eval echo "$as_me:6030: \"$ac_try\"") >&5
6031   (eval $ac_try) 2>&5
6032   ac_status=$?
6033   echo "$as_me:6033: \$? = $ac_status" >&5
6034   (exit $ac_status); }; }; then
6035   break
6036 else
6037   echo "$as_me: failed program was:" >&5
6038 cat conftest.$ac_ext >&5
6039 fi
6040 rm -f conftest.$ac_objext conftest.$ac_ext
6041                 done
6042                 echo "$as_me:6042: result: $CC_SHARED_OPTS" >&5
6043 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6044                 CFLAGS="$cf_save_CFLAGS"
6045         fi
6046
6047         cf_cv_shlib_version_infix=no
6048
6049         case $cf_cv_system_name in
6050         (aix4.3-9*|aix[5-7]*)
6051                 if test "$GCC" = yes; then
6052                         CC_SHARED_OPTS='-Wl,-brtl'
6053                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6054                 else
6055                         CC_SHARED_OPTS='-brtl'
6056                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6057                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6058                 fi
6059                 ;;
6060         (beos*)
6061                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6062                 ;;
6063         (cygwin*)
6064                 CC_SHARED_OPTS=
6065                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6066                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6067                 cf_cv_shlib_version=cygdll
6068                 cf_cv_shlib_version_infix=cygdll
6069                 shlibdir=$bindir
6070                 MAKE_DLLS=
6071                 cat >mk_shared_lib.sh <<-CF_EOF
6072                 #!$SHELL
6073                 SHARED_LIB=\$1
6074                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6075                 shift
6076                 cat <<-EOF
6077                 Linking shared library
6078                 ** SHARED_LIB \$SHARED_LIB
6079                 ** IMPORT_LIB \$IMPORT_LIB
6080 EOF
6081                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6082 CF_EOF
6083                 chmod +x mk_shared_lib.sh
6084                 ;;
6085         (msys*)
6086                 CC_SHARED_OPTS=
6087                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6088                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6089                 cf_cv_shlib_version=msysdll
6090                 cf_cv_shlib_version_infix=msysdll
6091                 shlibdir=$bindir
6092                 MAKE_DLLS=
6093                 cat >mk_shared_lib.sh <<-CF_EOF
6094                 #!$SHELL
6095                 SHARED_LIB=\$1
6096                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6097                 shift
6098                 cat <<-EOF
6099                 Linking shared library
6100                 ** SHARED_LIB \$SHARED_LIB
6101                 ** IMPORT_LIB \$IMPORT_LIB
6102 EOF
6103                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6104 CF_EOF
6105                 chmod +x mk_shared_lib.sh
6106                 ;;
6107         (darwin*)
6108                 cf_try_cflags="no-cpp-precomp"
6109                 CC_SHARED_OPTS="-dynamic"
6110                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6111                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6112                 cf_cv_shlib_version_infix=yes
6113                 echo "$as_me:6113: checking if ld -search_paths_first works" >&5
6114 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6115 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6116   echo $ECHO_N "(cached) $ECHO_C" >&6
6117 else
6118
6119                         cf_save_LDFLAGS=$LDFLAGS
6120                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6121                         cat >conftest.$ac_ext <<_ACEOF
6122 #line 6122 "configure"
6123 #include "confdefs.h"
6124
6125 int
6126 main ()
6127 {
6128 int i;
6129   ;
6130   return 0;
6131 }
6132 _ACEOF
6133 rm -f conftest.$ac_objext conftest$ac_exeext
6134 if { (eval echo "$as_me:6134: \"$ac_link\"") >&5
6135   (eval $ac_link) 2>&5
6136   ac_status=$?
6137   echo "$as_me:6137: \$? = $ac_status" >&5
6138   (exit $ac_status); } &&
6139          { ac_try='test -s conftest$ac_exeext'
6140   { (eval echo "$as_me:6140: \"$ac_try\"") >&5
6141   (eval $ac_try) 2>&5
6142   ac_status=$?
6143   echo "$as_me:6143: \$? = $ac_status" >&5
6144   (exit $ac_status); }; }; then
6145   cf_cv_ldflags_search_paths_first=yes
6146 else
6147   echo "$as_me: failed program was:" >&5
6148 cat conftest.$ac_ext >&5
6149 cf_cv_ldflags_search_paths_first=no
6150 fi
6151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6152                                 LDFLAGS=$cf_save_LDFLAGS
6153 fi
6154 echo "$as_me:6154: result: $cf_cv_ldflags_search_paths_first" >&5
6155 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6156                 if test $cf_cv_ldflags_search_paths_first = yes; then
6157                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6158                 fi
6159                 ;;
6160         (hpux[7-8]*)
6161                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6162                 if test "$GCC" != yes; then
6163                         CC_SHARED_OPTS='+Z'
6164                 fi
6165                 MK_SHARED_LIB='${LD} -b -o $@'
6166                 INSTALL_LIB="-m 555"
6167                 ;;
6168         (hpux*)
6169                 # (tested with gcc 2.7.2 -- I don't have c89)
6170                 if test "$GCC" = yes; then
6171                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6172                 else
6173                         CC_SHARED_OPTS='+Z'
6174                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6175                 fi
6176                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6177                 # HP-UX shared libraries must be executable, and should be
6178                 # readonly to exploit a quirk in the memory manager.
6179                 INSTALL_LIB="-m 555"
6180                 ;;
6181         (interix*)
6182                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6183                 if test "$cf_cv_shlib_version" = rel; then
6184                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6185                 else
6186                         cf_shared_soname='`basename `'
6187                 fi
6188                 CC_SHARED_OPTS=
6189                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6190                 ;;
6191         (irix*)
6192                 if test "$cf_cv_enable_rpath" = yes ; then
6193                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6194                 fi
6195                 # tested with IRIX 5.2 and 'cc'.
6196                 if test "$GCC" != yes; then
6197                         CC_SHARED_OPTS='-KPIC'
6198                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6199                 else
6200                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6201                 fi
6202                 cf_cv_rm_so_locs=yes
6203                 ;;
6204         (linux*|gnu*|k*bsd*-gnu)
6205                 if test "$DFT_LWR_MODEL" = "shared" ; then
6206                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6207                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6208                 fi
6209                 if test "$cf_cv_enable_rpath" = yes ; then
6210                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6211                 fi
6212
6213         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6214         if test "$cf_cv_shlib_version" = rel; then
6215                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6216         else
6217                 cf_cv_shared_soname='`basename $@`'
6218         fi
6219
6220                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6221                 ;;
6222         (mingw*)
6223                 cf_cv_shlib_version=mingw
6224                 cf_cv_shlib_version_infix=mingw
6225                 shlibdir=$bindir
6226                 MAKE_DLLS=
6227                 if test "$DFT_LWR_MODEL" = "shared" ; then
6228                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6229                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6230                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6231                 fi
6232                 CC_SHARED_OPTS=
6233                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6234                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6235                 cat >mk_shared_lib.sh <<-CF_EOF
6236                 #!$SHELL
6237                 SHARED_LIB=\$1
6238                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6239                 shift
6240                 cat <<-EOF
6241                 Linking shared library
6242                 ** SHARED_LIB \$SHARED_LIB
6243                 ** IMPORT_LIB \$IMPORT_LIB
6244 EOF
6245                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6246 CF_EOF
6247                 chmod +x mk_shared_lib.sh
6248                 ;;
6249         (openbsd[2-9].*|mirbsd*)
6250                 if test "$DFT_LWR_MODEL" = "shared" ; then
6251                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6252                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6253                 fi
6254                 if test "$cf_cv_enable_rpath" = yes ; then
6255                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6256                 fi
6257                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6258
6259         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6260         if test "$cf_cv_shlib_version" = rel; then
6261                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6262         else
6263                 cf_cv_shared_soname='`basename $@`'
6264         fi
6265
6266                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6267                 ;;
6268         (nto-qnx*|openbsd*|freebsd[12].*)
6269                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6270                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6271                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6272                 ;;
6273         (dragonfly*|freebsd*)
6274                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6275                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6276                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6277                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6278                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6279                 fi
6280
6281         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6282         if test "$cf_cv_shlib_version" = rel; then
6283                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6284         else
6285                 cf_cv_shared_soname='`basename $@`'
6286         fi
6287
6288                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6289                 ;;
6290         (netbsd*)
6291                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6292                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6293                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6294                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6295                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6296                         if test "$cf_cv_shlib_version" = auto; then
6297                         if test -f /usr/libexec/ld.elf_so; then
6298                                 cf_cv_shlib_version=abi
6299                         else
6300                                 cf_cv_shlib_version=rel
6301                         fi
6302                         fi
6303
6304         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6305         if test "$cf_cv_shlib_version" = rel; then
6306                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6307         else
6308                 cf_cv_shared_soname='`basename $@`'
6309         fi
6310
6311                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6312                 else
6313                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6314                 fi
6315                 ;;
6316         (osf*|mls+*)
6317                 # tested with OSF/1 V3.2 and 'cc'
6318                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6319                 # link with shared libs).
6320                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6321                 case $host_os in
6322                 (osf4*)
6323                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6324                         ;;
6325                 esac
6326                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6327                 if test "$DFT_LWR_MODEL" = "shared" ; then
6328                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6329                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6330                 fi
6331                 cf_cv_rm_so_locs=yes
6332                 ;;
6333         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6334                 # tested with osr5.0.5
6335                 if test "$GCC" != yes; then
6336                         CC_SHARED_OPTS='-belf -KPIC'
6337                 fi
6338                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6339                 if test "$cf_cv_enable_rpath" = yes ; then
6340                         # only way is to set LD_RUN_PATH but no switch for it
6341                         RUN_PATH=$libdir
6342                 fi
6343                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6344                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6345                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6346                 ;;
6347         (sunos4*)
6348                 # tested with SunOS 4.1.1 and gcc 2.7.0
6349                 if test "$GCC" != yes; then
6350                         CC_SHARED_OPTS='-KPIC'
6351                 fi
6352                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6353                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6354                 ;;
6355         (solaris2*)
6356                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6357                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6358                 if test "$DFT_LWR_MODEL" = "shared" ; then
6359                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6360                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6361                 fi
6362                 if test "$cf_cv_enable_rpath" = yes ; then
6363                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6364                 fi
6365
6366         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6367         if test "$cf_cv_shlib_version" = rel; then
6368                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6369         else
6370                 cf_cv_shared_soname='`basename $@`'
6371         fi
6372
6373                 if test "$GCC" != yes; then
6374                         cf_save_CFLAGS="$CFLAGS"
6375                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6376                         do
6377                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6378                                 cat >conftest.$ac_ext <<_ACEOF
6379 #line 6379 "configure"
6380 #include "confdefs.h"
6381 #include <stdio.h>
6382 int
6383 main ()
6384 {
6385 printf("Hello\n");
6386   ;
6387   return 0;
6388 }
6389 _ACEOF
6390 rm -f conftest.$ac_objext
6391 if { (eval echo "$as_me:6391: \"$ac_compile\"") >&5
6392   (eval $ac_compile) 2>&5
6393   ac_status=$?
6394   echo "$as_me:6394: \$? = $ac_status" >&5
6395   (exit $ac_status); } &&
6396          { ac_try='test -s conftest.$ac_objext'
6397   { (eval echo "$as_me:6397: \"$ac_try\"") >&5
6398   (eval $ac_try) 2>&5
6399   ac_status=$?
6400   echo "$as_me:6400: \$? = $ac_status" >&5
6401   (exit $ac_status); }; }; then
6402   break
6403 else
6404   echo "$as_me: failed program was:" >&5
6405 cat conftest.$ac_ext >&5
6406 fi
6407 rm -f conftest.$ac_objext conftest.$ac_ext
6408                         done
6409                         CFLAGS="$cf_save_CFLAGS"
6410                         CC_SHARED_OPTS=$cf_shared_opts
6411                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6412                 else
6413                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6414                 fi
6415                 ;;
6416         (sysv5uw7*|unix_sv*)
6417                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6418                 if test "$GCC" != yes; then
6419                         CC_SHARED_OPTS='-KPIC'
6420                 fi
6421                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6422                 ;;
6423         (*)
6424                 CC_SHARED_OPTS='unknown'
6425                 MK_SHARED_LIB='echo unknown'
6426                 ;;
6427         esac
6428
6429         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6430         case "$cf_cv_shlib_version" in
6431         (rel|abi)
6432                 case "$MK_SHARED_LIB" in
6433                 (*'-o $@')
6434                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6435                         ;;
6436                 (*)
6437                         { echo "$as_me:6437: WARNING: ignored --with-shlib-version" >&5
6438 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6439                         ;;
6440                 esac
6441                 ;;
6442         esac
6443
6444         if test -n "$cf_try_cflags"
6445         then
6446 cat > conftest.$ac_ext <<EOF
6447 #line 6447 "${as_me:-configure}"
6448 #include <stdio.h>
6449 int main(int argc, char *argv[])
6450 {
6451         printf("hello\n");
6452         return (argv[argc-1] == 0) ;
6453 }
6454 EOF
6455                 cf_save_CFLAGS="$CFLAGS"
6456                 for cf_opt in $cf_try_cflags
6457                 do
6458                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6459                         echo "$as_me:6459: checking if CFLAGS option -$cf_opt works" >&5
6460 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6461                         if { (eval echo "$as_me:6461: \"$ac_compile\"") >&5
6462   (eval $ac_compile) 2>&5
6463   ac_status=$?
6464   echo "$as_me:6464: \$? = $ac_status" >&5
6465   (exit $ac_status); }; then
6466                                 echo "$as_me:6466: result: yes" >&5
6467 echo "${ECHO_T}yes" >&6
6468                                 cf_save_CFLAGS="$CFLAGS"
6469                         else
6470                                 echo "$as_me:6470: result: no" >&5
6471 echo "${ECHO_T}no" >&6
6472                         fi
6473                 done
6474                 CFLAGS="$cf_save_CFLAGS"
6475         fi
6476
6477         # RPATH_LIST is a colon-separated list of directories
6478         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6479         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6480
6481         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6482
6483         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6484
6485 echo "${as_me:-configure}:6485: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6486
6487         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6488
6489 echo "${as_me:-configure}:6489: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6490
6491 for model in $cf_list_models; do
6492         case $model in
6493         (libtool)
6494
6495 echo "$as_me:6495: checking for additional libtool options" >&5
6496 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6497
6498 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6499 if test "${with_libtool_opts+set}" = set; then
6500   withval="$with_libtool_opts"
6501   with_libtool_opts=$withval
6502 else
6503   with_libtool_opts=no
6504 fi;
6505 echo "$as_me:6505: result: $with_libtool_opts" >&5
6506 echo "${ECHO_T}$with_libtool_opts" >&6
6507
6508 case .$with_libtool_opts in
6509 (.yes|.no|.)
6510         ;;
6511 (*)
6512         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6513         ;;
6514 esac
6515
6516 echo "$as_me:6516: checking if exported-symbols file should be used" >&5
6517 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6518
6519 # Check whether --with-export-syms or --without-export-syms was given.
6520 if test "${with_export_syms+set}" = set; then
6521   withval="$with_export_syms"
6522   with_export_syms=$withval
6523 else
6524   with_export_syms=no
6525 fi;
6526 if test "x$with_export_syms" = xyes
6527 then
6528         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6529
6530 fi
6531 echo "$as_me:6531: result: $with_export_syms" >&5
6532 echo "${ECHO_T}$with_export_syms" >&6
6533 if test "x$with_export_syms" != xno
6534 then
6535         EXPORT_SYMS="-export-symbols $with_export_syms"
6536
6537 fi
6538
6539                 ;;
6540         (shared)
6541                 if test "$CC_SHARED_OPTS" = "unknown"; then
6542                         { { echo "$as_me:6542: error: Shared libraries are not supported in this version" >&5
6543 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6544    { (exit 1); exit 1; }; }
6545                 fi
6546
6547 echo "$as_me:6547: checking if versioned-symbols file should be used" >&5
6548 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6549
6550 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6551 if test "${with_versioned_syms+set}" = set; then
6552   withval="$with_versioned_syms"
6553   with_versioned_syms=$withval
6554 else
6555   with_versioned_syms=no
6556 fi;
6557 if test "x$with_versioned_syms" = xyes
6558 then
6559         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6560
6561 fi
6562 echo "$as_me:6562: result: $with_versioned_syms" >&5
6563 echo "${ECHO_T}$with_versioned_syms" >&6
6564
6565 RESULTING_SYMS=
6566 VERSIONED_SYMS=
6567 WILDCARD_SYMS=
6568
6569 if test "x$with_versioned_syms" != xno
6570 then
6571         RESULTING_SYMS=$with_versioned_syms
6572         case "x$MK_SHARED_LIB" in
6573         (*-Wl,*)
6574                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6575                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6576                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6577
6578 echo "${as_me:-configure}:6578: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6579
6580                 ;;
6581         (*-dy\ *)
6582                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6583                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6584                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6585
6586 echo "${as_me:-configure}:6586: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6587
6588                 ;;
6589         (*)
6590                 { echo "$as_me:6590: WARNING: this system does not support versioned-symbols" >&5
6591 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6592                 ;;
6593         esac
6594
6595         # Linux ld can selectively override scope, e.g., of symbols beginning with
6596         # "_" by first declaring some as global, and then using a wildcard to
6597         # declare the others as local.  Some other loaders cannot do this.  Check
6598         # by constructing a (very) simple shared library and inspecting its
6599         # symbols.
6600         if test "x$VERSIONED_SYMS" != "x"
6601         then
6602                 echo "$as_me:6602: checking if wildcards can be used to selectively omit symbols" >&5
6603 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6604                 WILDCARD_SYMS=no
6605
6606                 # make sources
6607                 rm -f conftest.*
6608
6609                 cat >conftest.ver <<EOF
6610 module_1.0 {
6611 global:
6612         globalf1;
6613 local:
6614         localf1;
6615 };
6616 module_2.0 {
6617 global:
6618         globalf2;
6619 local:
6620         localf2;
6621         _*;
6622 } module_1.0;
6623 submodule_1.0 {
6624 global:
6625         subglobalf1;
6626         _ismissing;
6627 local:
6628         sublocalf1;
6629 };
6630 submodule_2.0 {
6631 global:
6632         subglobalf2;
6633 local:
6634         sublocalf2;
6635         _*;
6636 } submodule_1.0;
6637 EOF
6638                 cat >conftest.$ac_ext <<EOF
6639 #line 6639 "configure"
6640 int     _ismissing(void) { return 1; }
6641 int     _localf1(void) { return 1; }
6642 int     _localf2(void) { return 2; }
6643 int     globalf1(void) { return 1; }
6644 int     globalf2(void) { return 2; }
6645 int     _sublocalf1(void) { return 1; }
6646 int     _sublocalf2(void) { return 2; }
6647 int     subglobalf1(void) { return 1; }
6648 int     subglobalf2(void) { return 2; }
6649 EOF
6650                 cat >conftest.mk <<EOF
6651 CC=${CC}
6652 CFLAGS=${CFLAGS}
6653 CPPFLAGS=${CPPFLAGS}
6654 LDFLAGS=${LDFLAGS}
6655 LIBS=${LIBS}
6656 VERSIONED_SYMS=${VERSIONED_SYMS}
6657 RESULTING_SYMS=conftest.ver
6658 MK_SHARED_LIB=${MK_SHARED_LIB}
6659 conftest.so: conftest.$ac_cv_objext
6660                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6661 EOF
6662
6663                 # compile source, make library
6664                 if make -f conftest.mk 2>&5 >/dev/null
6665                 then
6666                         # test for missing symbol
6667                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ]T[     ]'`
6668                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6669                 fi
6670                 echo "$as_me:6670: result: $WILDCARD_SYMS" >&5
6671 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6672                 rm -f conftest.*
6673         fi
6674 fi
6675
6676                 ;;
6677         esac
6678 done
6679
6680 # pretend that ncurses==ncursesw==ncursest
6681 echo "$as_me:6681: checking if you want to disable library suffixes" >&5
6682 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6683
6684 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6685 if test "${enable_lib_suffixes+set}" = set; then
6686   enableval="$enable_lib_suffixes"
6687   test "$enableval" != no && enableval=yes
6688         if test "$enableval" != "yes" ; then
6689     disable_lib_suffixes=yes
6690         else
6691                 disable_lib_suffixes=no
6692         fi
6693 else
6694   enableval=yes
6695         disable_lib_suffixes=no
6696
6697 fi;
6698 echo "$as_me:6698: result: $disable_lib_suffixes" >&5
6699 echo "${ECHO_T}$disable_lib_suffixes" >&6
6700
6701 ### If we're building with rpath, try to link non-standard libs that way too.
6702 if test "$DFT_LWR_MODEL" = "shared"; then
6703
6704 echo "$as_me:6704: checking if rpath-hack should be disabled" >&5
6705 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6706
6707 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6708 if test "${enable_rpath_hack+set}" = set; then
6709   enableval="$enable_rpath_hack"
6710   test "$enableval" != no && enableval=yes
6711         if test "$enableval" != "yes" ; then
6712     cf_disable_rpath_hack=yes
6713         else
6714                 cf_disable_rpath_hack=no
6715         fi
6716 else
6717   enableval=yes
6718         cf_disable_rpath_hack=no
6719
6720 fi;
6721 echo "$as_me:6721: result: $cf_disable_rpath_hack" >&5
6722 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6723 if test "$cf_disable_rpath_hack" = no ; then
6724
6725 echo "$as_me:6725: checking for updated LDFLAGS" >&5
6726 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6727 if test -n "$LD_RPATH_OPT" ; then
6728         echo "$as_me:6728: result: maybe" >&5
6729 echo "${ECHO_T}maybe" >&6
6730
6731         for ac_prog in ldd
6732 do
6733   # Extract the first word of "$ac_prog", so it can be a program name with args.
6734 set dummy $ac_prog; ac_word=$2
6735 echo "$as_me:6735: checking for $ac_word" >&5
6736 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6737 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6738   echo $ECHO_N "(cached) $ECHO_C" >&6
6739 else
6740   if test -n "$cf_ldd_prog"; then
6741   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6742 else
6743   ac_save_IFS=$IFS; IFS=$ac_path_separator
6744 ac_dummy="$PATH"
6745 for ac_dir in $ac_dummy; do
6746   IFS=$ac_save_IFS
6747   test -z "$ac_dir" && ac_dir=.
6748   $as_executable_p "$ac_dir/$ac_word" || continue
6749 ac_cv_prog_cf_ldd_prog="$ac_prog"
6750 echo "$as_me:6750: found $ac_dir/$ac_word" >&5
6751 break
6752 done
6753
6754 fi
6755 fi
6756 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6757 if test -n "$cf_ldd_prog"; then
6758   echo "$as_me:6758: result: $cf_ldd_prog" >&5
6759 echo "${ECHO_T}$cf_ldd_prog" >&6
6760 else
6761   echo "$as_me:6761: result: no" >&5
6762 echo "${ECHO_T}no" >&6
6763 fi
6764
6765   test -n "$cf_ldd_prog" && break
6766 done
6767 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6768
6769         cf_rpath_list="/usr/lib /lib"
6770         if test "$cf_ldd_prog" != no
6771         then
6772                 cf_rpath_oops=
6773
6774 cat >conftest.$ac_ext <<_ACEOF
6775 #line 6775 "configure"
6776 #include "confdefs.h"
6777 #include <stdio.h>
6778 int
6779 main ()
6780 {
6781 printf("Hello");
6782   ;
6783   return 0;
6784 }
6785 _ACEOF
6786 rm -f conftest.$ac_objext conftest$ac_exeext
6787 if { (eval echo "$as_me:6787: \"$ac_link\"") >&5
6788   (eval $ac_link) 2>&5
6789   ac_status=$?
6790   echo "$as_me:6790: \$? = $ac_status" >&5
6791   (exit $ac_status); } &&
6792          { ac_try='test -s conftest$ac_exeext'
6793   { (eval echo "$as_me:6793: \"$ac_try\"") >&5
6794   (eval $ac_try) 2>&5
6795   ac_status=$?
6796   echo "$as_me:6796: \$? = $ac_status" >&5
6797   (exit $ac_status); }; }; then
6798   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6799                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6800 else
6801   echo "$as_me: failed program was:" >&5
6802 cat conftest.$ac_ext >&5
6803 fi
6804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6805
6806                 # If we passed the link-test, but get a "not found" on a given library,
6807                 # this could be due to inept reconfiguration of gcc to make it only
6808                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6809                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6810                 # /usr/local libraries.
6811                 if test -n "$cf_rpath_oops"
6812                 then
6813                         for cf_rpath_src in $cf_rpath_oops
6814                         do
6815                                 for cf_rpath_dir in \
6816                                         /usr/local \
6817                                         /usr/pkg \
6818                                         /opt/sfw
6819                                 do
6820                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6821                                         then
6822                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6823
6824 echo "${as_me:-configure}:6824: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6825
6826                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6827                                                 break
6828                                         fi
6829                                 done
6830                         done
6831                 fi
6832         fi
6833
6834         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6835
6836 echo "${as_me:-configure}:6836: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6837
6838 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6839
6840 echo "${as_me:-configure}:6840: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6841
6842 cf_rpath_dst=
6843 for cf_rpath_src in $LDFLAGS
6844 do
6845         case $cf_rpath_src in
6846         (-L*)
6847
6848                 # check if this refers to a directory which we will ignore
6849                 cf_rpath_skip=no
6850                 if test -n "$cf_rpath_list"
6851                 then
6852                         for cf_rpath_item in $cf_rpath_list
6853                         do
6854                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6855                                 then
6856                                         cf_rpath_skip=yes
6857                                         break
6858                                 fi
6859                         done
6860                 fi
6861
6862                 if test "$cf_rpath_skip" = no
6863                 then
6864                         # transform the option
6865                         if test "$LD_RPATH_OPT" = "-R " ; then
6866                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6867                         else
6868                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6869                         fi
6870
6871                         # if we have not already added this, add it now
6872                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6873                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6874                         then
6875                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6876
6877 echo "${as_me:-configure}:6877: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6878
6879                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6880                         fi
6881                 fi
6882                 ;;
6883         esac
6884         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6885 done
6886 LDFLAGS=$cf_rpath_dst
6887
6888 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6889
6890 echo "${as_me:-configure}:6890: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6891
6892 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6893
6894 echo "${as_me:-configure}:6894: testing ...checking LIBS $LIBS ..." 1>&5
6895
6896 cf_rpath_dst=
6897 for cf_rpath_src in $LIBS
6898 do
6899         case $cf_rpath_src in
6900         (-L*)
6901
6902                 # check if this refers to a directory which we will ignore
6903                 cf_rpath_skip=no
6904                 if test -n "$cf_rpath_list"
6905                 then
6906                         for cf_rpath_item in $cf_rpath_list
6907                         do
6908                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6909                                 then
6910                                         cf_rpath_skip=yes
6911                                         break
6912                                 fi
6913                         done
6914                 fi
6915
6916                 if test "$cf_rpath_skip" = no
6917                 then
6918                         # transform the option
6919                         if test "$LD_RPATH_OPT" = "-R " ; then
6920                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6921                         else
6922                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6923                         fi
6924
6925                         # if we have not already added this, add it now
6926                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6927                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6928                         then
6929                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6930
6931 echo "${as_me:-configure}:6931: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6932
6933                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6934                         fi
6935                 fi
6936                 ;;
6937         esac
6938         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6939 done
6940 LIBS=$cf_rpath_dst
6941
6942 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6943
6944 echo "${as_me:-configure}:6944: testing ...checked LIBS $LIBS ..." 1>&5
6945
6946         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6947
6948 echo "${as_me:-configure}:6948: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6949
6950 else
6951         echo "$as_me:6951: result: no" >&5
6952 echo "${ECHO_T}no" >&6
6953 fi
6954
6955 fi
6956
6957 fi
6958
6959 ###############################################################################
6960
6961 ###     use option --with-extra-suffix to append suffix to headers and libraries
6962 echo "$as_me:6962: checking if you wish to append extra suffix to header/library paths" >&5
6963 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
6964 EXTRA_SUFFIX=
6965
6966 # Check whether --with-extra-suffix or --without-extra-suffix was given.
6967 if test "${with_extra_suffix+set}" = set; then
6968   withval="$with_extra_suffix"
6969   case x$withval in
6970         (no)
6971                 ;;
6972         (xyes|x)
6973                 EXTRA_SUFFIX=$cf_cv_abi_version
6974                 ;;
6975         (*)
6976                 EXTRA_SUFFIX=$withval
6977                 ;;
6978         esac
6979
6980 fi;
6981 echo "$as_me:6981: result: $EXTRA_SUFFIX" >&5
6982 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
6983
6984 ###     use option --disable-overwrite to leave out the link to -lcurses
6985 echo "$as_me:6985: checking if you wish to install ncurses overwriting curses" >&5
6986 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6987
6988 # Check whether --enable-overwrite or --disable-overwrite was given.
6989 if test "${enable_overwrite+set}" = set; then
6990   enableval="$enable_overwrite"
6991   with_overwrite=$enableval
6992 else
6993   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6994 fi;
6995 echo "$as_me:6995: result: $with_overwrite" >&5
6996 echo "${ECHO_T}$with_overwrite" >&6
6997
6998 echo "$as_me:6998: checking if external terminfo-database is used" >&5
6999 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7000
7001 # Check whether --enable-database or --disable-database was given.
7002 if test "${enable_database+set}" = set; then
7003   enableval="$enable_database"
7004   use_database=$enableval
7005 else
7006   use_database=yes
7007 fi;
7008 echo "$as_me:7008: result: $use_database" >&5
7009 echo "${ECHO_T}$use_database" >&6
7010
7011 case $host_os in
7012 (os2*)
7013         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7014         ;;
7015 (*)
7016         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7017         ;;
7018 esac
7019
7020 NCURSES_USE_DATABASE=0
7021 if test "$use_database" != no ; then
7022         NCURSES_USE_DATABASE=1
7023
7024         echo "$as_me:7024: checking which terminfo source-file will be installed" >&5
7025 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7026
7027 # Check whether --with-database or --without-database was given.
7028 if test "${with_database+set}" = set; then
7029   withval="$with_database"
7030   TERMINFO_SRC=$withval
7031 fi;
7032         echo "$as_me:7032: result: $TERMINFO_SRC" >&5
7033 echo "${ECHO_T}$TERMINFO_SRC" >&6
7034
7035         echo "$as_me:7035: checking whether to use hashed database instead of directory/tree" >&5
7036 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7037
7038 # Check whether --with-hashed-db or --without-hashed-db was given.
7039 if test "${with_hashed_db+set}" = set; then
7040   withval="$with_hashed_db"
7041
7042 else
7043   with_hashed_db=no
7044 fi;
7045         echo "$as_me:7045: result: $with_hashed_db" >&5
7046 echo "${ECHO_T}$with_hashed_db" >&6
7047 else
7048         with_hashed_db=no
7049 fi
7050
7051 echo "$as_me:7051: checking for list of fallback descriptions" >&5
7052 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7053
7054 # Check whether --with-fallbacks or --without-fallbacks was given.
7055 if test "${with_fallbacks+set}" = set; then
7056   withval="$with_fallbacks"
7057   with_fallback=$withval
7058 else
7059   with_fallback=
7060 fi;
7061 echo "$as_me:7061: result: $with_fallback" >&5
7062 echo "${ECHO_T}$with_fallback" >&6
7063 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7064
7065 echo "$as_me:7065: checking if you want modern xterm or antique" >&5
7066 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7067
7068 # Check whether --with-xterm-new or --without-xterm-new was given.
7069 if test "${with_xterm_new+set}" = set; then
7070   withval="$with_xterm_new"
7071   with_xterm_new=$withval
7072 else
7073   with_xterm_new=yes
7074 fi;
7075 case $with_xterm_new in
7076 (no) with_xterm_new=xterm-old;;
7077 (*)      with_xterm_new=xterm-new;;
7078 esac
7079 echo "$as_me:7079: result: $with_xterm_new" >&5
7080 echo "${ECHO_T}$with_xterm_new" >&6
7081 WHICH_XTERM=$with_xterm_new
7082
7083 echo "$as_me:7083: checking if xterm backspace sends BS or DEL" >&5
7084 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7085
7086 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7087 if test "${with_xterm_kbs+set}" = set; then
7088   withval="$with_xterm_kbs"
7089   with_xterm_kbs=$withval
7090 else
7091   with_xterm_kbs=BS
7092 fi;
7093 case x$with_xterm_kbs in
7094 (xyes|xno|xBS|xbs|x8)
7095         with_xterm_kbs=BS
7096         ;;
7097 (xDEL|xdel|x127)
7098         with_xterm_kbs=DEL
7099         ;;
7100 (*)
7101         with_xterm_kbs=$withval
7102         ;;
7103 esac
7104 echo "$as_me:7104: result: $with_xterm_kbs" >&5
7105 echo "${ECHO_T}$with_xterm_kbs" >&6
7106 XTERM_KBS=$with_xterm_kbs
7107
7108 MAKE_TERMINFO=
7109 if test "$use_database" = no ; then
7110         TERMINFO="${datadir}/terminfo"
7111         MAKE_TERMINFO="#"
7112 else
7113
7114 echo "$as_me:7114: checking for list of terminfo directories" >&5
7115 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7116
7117 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7118 if test "${with_terminfo_dirs+set}" = set; then
7119   withval="$with_terminfo_dirs"
7120
7121 else
7122   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7123 fi;
7124 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7125 cf_dst_path=
7126 for cf_src_path in $withval
7127 do
7128
7129 if test "x$prefix" != xNONE; then
7130         cf_path_syntax="$prefix"
7131 else
7132         cf_path_syntax="$ac_default_prefix"
7133 fi
7134
7135 case ".$cf_src_path" in
7136 (.\$\(*\)*|.\'*\'*)
7137         ;;
7138 (..|./*|.\\*)
7139         ;;
7140 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7141         ;;
7142 (.\${*prefix}*|.\${*dir}*)
7143         eval cf_src_path="$cf_src_path"
7144         case ".$cf_src_path" in
7145         (.NONE/*)
7146                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7147                 ;;
7148         esac
7149         ;;
7150 (.no|.NONE/*)
7151         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7152         ;;
7153 (*)
7154         { { echo "$as_me:7154: error: expected a pathname, not \"$cf_src_path\"" >&5
7155 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7156    { (exit 1); exit 1; }; }
7157         ;;
7158 esac
7159
7160   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7161   cf_dst_path="${cf_dst_path}${cf_src_path}"
7162 done
7163 IFS="$ac_save_ifs"
7164
7165 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7166 # so we have to check/work around.  We do prefer the result of "eval"...
7167 eval cf_dst_eval="$cf_dst_path"
7168 case "x$cf_dst_eval" in
7169 (xNONE*)
7170         TERMINFO_DIRS=$cf_dst_path
7171         ;;
7172 (*)
7173         TERMINFO_DIRS="$cf_dst_eval"
7174         ;;
7175 esac
7176
7177 echo "$as_me:7177: result: $TERMINFO_DIRS" >&5
7178 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7179 test -n "$TERMINFO_DIRS" &&
7180 cat >>confdefs.h <<EOF
7181 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7182 EOF
7183
7184 echo "$as_me:7184: checking for default terminfo directory" >&5
7185 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7186
7187 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7188 if test "${with_default_terminfo_dir+set}" = set; then
7189   withval="$with_default_terminfo_dir"
7190
7191 else
7192   withval="${TERMINFO:-${datadir}/terminfo}"
7193 fi; if test -n "${datadir}/terminfo" ; then
7194
7195 if test "x$prefix" != xNONE; then
7196         cf_path_syntax="$prefix"
7197 else
7198         cf_path_syntax="$ac_default_prefix"
7199 fi
7200
7201 case ".$withval" in
7202 (.\$\(*\)*|.\'*\'*)
7203         ;;
7204 (..|./*|.\\*)
7205         ;;
7206 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7207         ;;
7208 (.\${*prefix}*|.\${*dir}*)
7209         eval withval="$withval"
7210         case ".$withval" in
7211         (.NONE/*)
7212                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7213                 ;;
7214         esac
7215         ;;
7216 (.no|.NONE/*)
7217         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7218         ;;
7219 (*)
7220         { { echo "$as_me:7220: error: expected a pathname, not \"$withval\"" >&5
7221 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7222    { (exit 1); exit 1; }; }
7223         ;;
7224 esac
7225
7226 fi
7227 eval TERMINFO="$withval"
7228
7229 echo "$as_me:7229: result: $TERMINFO" >&5
7230 echo "${ECHO_T}$TERMINFO" >&6
7231
7232 cat >>confdefs.h <<EOF
7233 #define TERMINFO "$TERMINFO"
7234 EOF
7235
7236 fi
7237
7238 ###     use option --disable-big-core to make tic run on small machines
7239 ###     We need 4Mb, check if we can allocate 50% more than that.
7240 echo "$as_me:7240: checking if big-core option selected" >&5
7241 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7242
7243 # Check whether --enable-big-core or --disable-big-core was given.
7244 if test "${enable_big_core+set}" = set; then
7245   enableval="$enable_big_core"
7246   with_big_core=$enableval
7247 else
7248   if test "$cross_compiling" = yes; then
7249   with_big_core=no
7250 else
7251   cat >conftest.$ac_ext <<_ACEOF
7252 #line 7252 "configure"
7253 #include "confdefs.h"
7254
7255 #include <stdlib.h>
7256 #include <string.h>
7257 int main() {
7258         unsigned long n = 6000000L;
7259         char *s = malloc(n);
7260         if (s != 0)
7261                 s[0] = s[n-1] = 0;
7262         ${cf_cv_main_return:-return}(s == 0);
7263 }
7264 _ACEOF
7265 rm -f conftest$ac_exeext
7266 if { (eval echo "$as_me:7266: \"$ac_link\"") >&5
7267   (eval $ac_link) 2>&5
7268   ac_status=$?
7269   echo "$as_me:7269: \$? = $ac_status" >&5
7270   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7271   { (eval echo "$as_me:7271: \"$ac_try\"") >&5
7272   (eval $ac_try) 2>&5
7273   ac_status=$?
7274   echo "$as_me:7274: \$? = $ac_status" >&5
7275   (exit $ac_status); }; }; then
7276   with_big_core=yes
7277 else
7278   echo "$as_me: program exited with status $ac_status" >&5
7279 echo "$as_me: failed program was:" >&5
7280 cat conftest.$ac_ext >&5
7281 with_big_core=no
7282 fi
7283 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7284 fi
7285 fi;
7286 echo "$as_me:7286: result: $with_big_core" >&5
7287 echo "${ECHO_T}$with_big_core" >&6
7288 test "x$with_big_core" = "xyes" &&
7289 cat >>confdefs.h <<\EOF
7290 #define HAVE_BIG_CORE 1
7291 EOF
7292
7293 ### ISO C only guarantees 512-char strings, we have tables which load faster
7294 ### when constructed using "big" strings.  More than the C compiler, the awk
7295 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7296 echo "$as_me:7296: checking if big-strings option selected" >&5
7297 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7298
7299 # Check whether --enable-big-strings or --disable-big-strings was given.
7300 if test "${enable_big_strings+set}" = set; then
7301   enableval="$enable_big_strings"
7302   with_big_strings=$enableval
7303 else
7304
7305         case x$AWK in
7306         (x)
7307                 eval with_big_strings=no
7308                 ;;
7309         (*)
7310                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7311                         | $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
7312                         eval with_big_strings=yes
7313                 else
7314                         eval with_big_strings=no
7315                 fi
7316                 ;;
7317         esac
7318
7319 fi;
7320 echo "$as_me:7320: result: $with_big_strings" >&5
7321 echo "${ECHO_T}$with_big_strings" >&6
7322
7323 USE_BIG_STRINGS=0
7324 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7325
7326 ###     use option --enable-termcap to compile in the termcap fallback support
7327 echo "$as_me:7327: checking if you want termcap-fallback support" >&5
7328 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7329
7330 # Check whether --enable-termcap or --disable-termcap was given.
7331 if test "${enable_termcap+set}" = set; then
7332   enableval="$enable_termcap"
7333   with_termcap=$enableval
7334 else
7335   with_termcap=no
7336 fi;
7337 echo "$as_me:7337: result: $with_termcap" >&5
7338 echo "${ECHO_T}$with_termcap" >&6
7339
7340 NCURSES_USE_TERMCAP=0
7341 if test "x$with_termcap" != "xyes" ; then
7342         if test "$use_database" = no ; then
7343                 if test -z "$with_fallback" ; then
7344                         { { echo "$as_me:7344: error: You have disabled the database w/o specifying fallbacks" >&5
7345 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7346    { (exit 1); exit 1; }; }
7347                 fi
7348         fi
7349
7350 cat >>confdefs.h <<\EOF
7351 #define PURE_TERMINFO 1
7352 EOF
7353
7354 else
7355
7356         if test "$with_ticlib" != no ; then
7357                 { { echo "$as_me:7357: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7358 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7359    { (exit 1); exit 1; }; }
7360         fi
7361
7362         NCURSES_USE_TERMCAP=1
7363         echo "$as_me:7363: checking for list of termcap files" >&5
7364 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7365
7366 # Check whether --with-termpath or --without-termpath was given.
7367 if test "${with_termpath+set}" = set; then
7368   withval="$with_termpath"
7369
7370 else
7371   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7372 fi;
7373 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7374 cf_dst_path=
7375 for cf_src_path in $withval
7376 do
7377
7378 if test "x$prefix" != xNONE; then
7379         cf_path_syntax="$prefix"
7380 else
7381         cf_path_syntax="$ac_default_prefix"
7382 fi
7383
7384 case ".$cf_src_path" in
7385 (.\$\(*\)*|.\'*\'*)
7386         ;;
7387 (..|./*|.\\*)
7388         ;;
7389 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7390         ;;
7391 (.\${*prefix}*|.\${*dir}*)
7392         eval cf_src_path="$cf_src_path"
7393         case ".$cf_src_path" in
7394         (.NONE/*)
7395                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7396                 ;;
7397         esac
7398         ;;
7399 (.no|.NONE/*)
7400         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7401         ;;
7402 (*)
7403         { { echo "$as_me:7403: error: expected a pathname, not \"$cf_src_path\"" >&5
7404 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7405    { (exit 1); exit 1; }; }
7406         ;;
7407 esac
7408
7409   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7410   cf_dst_path="${cf_dst_path}${cf_src_path}"
7411 done
7412 IFS="$ac_save_ifs"
7413
7414 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7415 # so we have to check/work around.  We do prefer the result of "eval"...
7416 eval cf_dst_eval="$cf_dst_path"
7417 case "x$cf_dst_eval" in
7418 (xNONE*)
7419         TERMPATH=$cf_dst_path
7420         ;;
7421 (*)
7422         TERMPATH="$cf_dst_eval"
7423         ;;
7424 esac
7425
7426         echo "$as_me:7426: result: $TERMPATH" >&5
7427 echo "${ECHO_T}$TERMPATH" >&6
7428         test -n "$TERMPATH" &&
7429 cat >>confdefs.h <<EOF
7430 #define TERMPATH "$TERMPATH"
7431 EOF
7432
7433         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7434         echo "$as_me:7434: checking if fast termcap-loader is needed" >&5
7435 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7436
7437 # Check whether --enable-getcap or --disable-getcap was given.
7438 if test "${enable_getcap+set}" = set; then
7439   enableval="$enable_getcap"
7440   with_getcap=$enableval
7441 else
7442   with_getcap=no
7443 fi;
7444         echo "$as_me:7444: result: $with_getcap" >&5
7445 echo "${ECHO_T}$with_getcap" >&6
7446         test "x$with_getcap" = "xyes" &&
7447 cat >>confdefs.h <<\EOF
7448 #define USE_GETCAP 1
7449 EOF
7450
7451         echo "$as_me:7451: checking if translated termcaps will be cached in ~/.terminfo" >&5
7452 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7453
7454 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7455 if test "${enable_getcap_cache+set}" = set; then
7456   enableval="$enable_getcap_cache"
7457   with_getcap_cache=$enableval
7458 else
7459   with_getcap_cache=no
7460 fi;
7461         echo "$as_me:7461: result: $with_getcap_cache" >&5
7462 echo "${ECHO_T}$with_getcap_cache" >&6
7463         test "x$with_getcap_cache" = "xyes" &&
7464 cat >>confdefs.h <<\EOF
7465 #define USE_GETCAP_CACHE 1
7466 EOF
7467
7468 fi
7469
7470 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7471 echo "$as_me:7471: checking if ~/.terminfo is wanted" >&5
7472 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7473
7474 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7475 if test "${enable_home_terminfo+set}" = set; then
7476   enableval="$enable_home_terminfo"
7477   with_home_terminfo=$enableval
7478 else
7479   with_home_terminfo=yes
7480 fi;
7481 echo "$as_me:7481: result: $with_home_terminfo" >&5
7482 echo "${ECHO_T}$with_home_terminfo" >&6
7483 test "x$with_home_terminfo" = "xyes" &&
7484 cat >>confdefs.h <<\EOF
7485 #define USE_HOME_TERMINFO 1
7486 EOF
7487
7488 echo "$as_me:7488: checking if you want to use restricted environment when running as root" >&5
7489 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7490
7491 # Check whether --enable-root-environ or --disable-root-environ was given.
7492 if test "${enable_root_environ+set}" = set; then
7493   enableval="$enable_root_environ"
7494   with_root_environ=$enableval
7495 else
7496   with_root_environ=yes
7497 fi;
7498 echo "$as_me:7498: result: $with_root_environ" >&5
7499 echo "${ECHO_T}$with_root_environ" >&6
7500 test "x$with_root_environ" = xyes &&
7501 cat >>confdefs.h <<\EOF
7502 #define USE_ROOT_ENVIRON 1
7503 EOF
7504
7505 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7506 ###   to reduce storage requirements for the terminfo database.
7507
7508 for ac_func in \
7509         remove \
7510         unlink
7511 do
7512 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7513 echo "$as_me:7513: checking for $ac_func" >&5
7514 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7515 if eval "test \"\${$as_ac_var+set}\" = set"; then
7516   echo $ECHO_N "(cached) $ECHO_C" >&6
7517 else
7518   cat >conftest.$ac_ext <<_ACEOF
7519 #line 7519 "configure"
7520 #include "confdefs.h"
7521 /* System header to define __stub macros and hopefully few prototypes,
7522     which can conflict with char $ac_func (); below.  */
7523 #include <assert.h>
7524 /* Override any gcc2 internal prototype to avoid an error.  */
7525 #ifdef __cplusplus
7526 extern "C"
7527 #endif
7528 /* We use char because int might match the return type of a gcc2
7529    builtin and then its argument prototype would still apply.  */
7530 char $ac_func ();
7531 char (*f) ();
7532
7533 int
7534 main ()
7535 {
7536 /* The GNU C library defines this for functions which it implements
7537     to always fail with ENOSYS.  Some functions are actually named
7538     something starting with __ and the normal name is an alias.  */
7539 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7540 choke me
7541 #else
7542 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7543 #endif
7544
7545   ;
7546   return 0;
7547 }
7548 _ACEOF
7549 rm -f conftest.$ac_objext conftest$ac_exeext
7550 if { (eval echo "$as_me:7550: \"$ac_link\"") >&5
7551   (eval $ac_link) 2>&5
7552   ac_status=$?
7553   echo "$as_me:7553: \$? = $ac_status" >&5
7554   (exit $ac_status); } &&
7555          { ac_try='test -s conftest$ac_exeext'
7556   { (eval echo "$as_me:7556: \"$ac_try\"") >&5
7557   (eval $ac_try) 2>&5
7558   ac_status=$?
7559   echo "$as_me:7559: \$? = $ac_status" >&5
7560   (exit $ac_status); }; }; then
7561   eval "$as_ac_var=yes"
7562 else
7563   echo "$as_me: failed program was:" >&5
7564 cat conftest.$ac_ext >&5
7565 eval "$as_ac_var=no"
7566 fi
7567 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7568 fi
7569 echo "$as_me:7569: result: `eval echo '${'$as_ac_var'}'`" >&5
7570 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7571 if test `eval echo '${'$as_ac_var'}'` = yes; then
7572   cat >>confdefs.h <<EOF
7573 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7574 EOF
7575
7576 fi
7577 done
7578
7579 if test "$cross_compiling" = yes ; then
7580
7581 for ac_func in \
7582                 link \
7583                 symlink
7584 do
7585 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7586 echo "$as_me:7586: checking for $ac_func" >&5
7587 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7588 if eval "test \"\${$as_ac_var+set}\" = set"; then
7589   echo $ECHO_N "(cached) $ECHO_C" >&6
7590 else
7591   cat >conftest.$ac_ext <<_ACEOF
7592 #line 7592 "configure"
7593 #include "confdefs.h"
7594 /* System header to define __stub macros and hopefully few prototypes,
7595     which can conflict with char $ac_func (); below.  */
7596 #include <assert.h>
7597 /* Override any gcc2 internal prototype to avoid an error.  */
7598 #ifdef __cplusplus
7599 extern "C"
7600 #endif
7601 /* We use char because int might match the return type of a gcc2
7602    builtin and then its argument prototype would still apply.  */
7603 char $ac_func ();
7604 char (*f) ();
7605
7606 int
7607 main ()
7608 {
7609 /* The GNU C library defines this for functions which it implements
7610     to always fail with ENOSYS.  Some functions are actually named
7611     something starting with __ and the normal name is an alias.  */
7612 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7613 choke me
7614 #else
7615 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7616 #endif
7617
7618   ;
7619   return 0;
7620 }
7621 _ACEOF
7622 rm -f conftest.$ac_objext conftest$ac_exeext
7623 if { (eval echo "$as_me:7623: \"$ac_link\"") >&5
7624   (eval $ac_link) 2>&5
7625   ac_status=$?
7626   echo "$as_me:7626: \$? = $ac_status" >&5
7627   (exit $ac_status); } &&
7628          { ac_try='test -s conftest$ac_exeext'
7629   { (eval echo "$as_me:7629: \"$ac_try\"") >&5
7630   (eval $ac_try) 2>&5
7631   ac_status=$?
7632   echo "$as_me:7632: \$? = $ac_status" >&5
7633   (exit $ac_status); }; }; then
7634   eval "$as_ac_var=yes"
7635 else
7636   echo "$as_me: failed program was:" >&5
7637 cat conftest.$ac_ext >&5
7638 eval "$as_ac_var=no"
7639 fi
7640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7641 fi
7642 echo "$as_me:7642: result: `eval echo '${'$as_ac_var'}'`" >&5
7643 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7644 if test `eval echo '${'$as_ac_var'}'` = yes; then
7645   cat >>confdefs.h <<EOF
7646 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7647 EOF
7648
7649 fi
7650 done
7651
7652 else
7653         echo "$as_me:7653: checking if link/symlink functions work" >&5
7654 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7655 if test "${cf_cv_link_funcs+set}" = set; then
7656   echo $ECHO_N "(cached) $ECHO_C" >&6
7657 else
7658
7659                 cf_cv_link_funcs=
7660                 for cf_func in link symlink ; do
7661                         if test "$cross_compiling" = yes; then
7662
7663                         eval 'ac_cv_func_'$cf_func'=error'
7664 else
7665   cat >conftest.$ac_ext <<_ACEOF
7666 #line 7666 "configure"
7667 #include "confdefs.h"
7668
7669 #include <sys/types.h>
7670 #include <sys/stat.h>
7671 #ifdef HAVE_UNISTD_H
7672 #include <unistd.h>
7673 #endif
7674 int main()
7675 {
7676         int fail = 0;
7677         char *src = "config.log";
7678         char *dst = "conftest.chk";
7679         struct stat src_sb;
7680         struct stat dst_sb;
7681
7682         stat(src, &src_sb);
7683         fail = ($cf_func("config.log", "conftest.chk") < 0)
7684             || (stat(dst, &dst_sb) < 0)
7685             || (dst_sb.st_mtime != src_sb.st_mtime);
7686 #ifdef HAVE_UNLINK
7687         unlink(dst);
7688 #else
7689         remove(dst);
7690 #endif
7691         ${cf_cv_main_return:-return} (fail);
7692 }
7693
7694 _ACEOF
7695 rm -f conftest$ac_exeext
7696 if { (eval echo "$as_me:7696: \"$ac_link\"") >&5
7697   (eval $ac_link) 2>&5
7698   ac_status=$?
7699   echo "$as_me:7699: \$? = $ac_status" >&5
7700   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7701   { (eval echo "$as_me:7701: \"$ac_try\"") >&5
7702   (eval $ac_try) 2>&5
7703   ac_status=$?
7704   echo "$as_me:7704: \$? = $ac_status" >&5
7705   (exit $ac_status); }; }; then
7706
7707                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7708                         eval 'ac_cv_func_'$cf_func'=yes'
7709 else
7710   echo "$as_me: program exited with status $ac_status" >&5
7711 echo "$as_me: failed program was:" >&5
7712 cat conftest.$ac_ext >&5
7713
7714                         eval 'ac_cv_func_'$cf_func'=no'
7715 fi
7716 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7717 fi
7718                 done
7719                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7720
7721 fi
7722 echo "$as_me:7722: result: $cf_cv_link_funcs" >&5
7723 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7724         test "$ac_cv_func_link"    = yes &&
7725 cat >>confdefs.h <<\EOF
7726 #define HAVE_LINK 1
7727 EOF
7728
7729         test "$ac_cv_func_symlink" = yes &&
7730 cat >>confdefs.h <<\EOF
7731 #define HAVE_SYMLINK 1
7732 EOF
7733
7734 fi
7735
7736 with_links=no
7737 with_symlinks=no
7738
7739 # soft links (symbolic links) are useful for some systems where hard links do
7740 # not work, or to make it simpler to copy terminfo trees around.
7741 if test "x$ac_cv_func_symlink" = xyes ; then
7742         echo "$as_me:7742: checking if tic should use symbolic links" >&5
7743 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7744
7745 # Check whether --enable-symlinks or --disable-symlinks was given.
7746 if test "${enable_symlinks+set}" = set; then
7747   enableval="$enable_symlinks"
7748   with_symlinks=$enableval
7749 else
7750   with_symlinks=no
7751 fi;
7752         echo "$as_me:7752: result: $with_symlinks" >&5
7753 echo "${ECHO_T}$with_symlinks" >&6
7754 fi
7755
7756 # If we have hard links and did not choose to use soft links instead, there is
7757 # no reason to make this choice optional - use the hard links.
7758 if test "$with_symlinks" = no ; then
7759         echo "$as_me:7759: checking if tic should use hard links" >&5
7760 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7761         if test "x$ac_cv_func_link" = xyes ; then
7762                 with_links=yes
7763         else
7764                 with_links=no
7765         fi
7766         echo "$as_me:7766: result: $with_links" >&5
7767 echo "${ECHO_T}$with_links" >&6
7768 fi
7769
7770 test "x$with_links" = xyes &&
7771 cat >>confdefs.h <<\EOF
7772 #define USE_LINKS 1
7773 EOF
7774
7775 test "x$with_symlinks" = xyes &&
7776 cat >>confdefs.h <<\EOF
7777 #define USE_SYMLINKS 1
7778 EOF
7779
7780 ###   use option --enable-broken-linker to force on use of broken-linker support
7781 echo "$as_me:7781: checking if you want broken-linker support code" >&5
7782 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7783
7784 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7785 if test "${enable_broken_linker+set}" = set; then
7786   enableval="$enable_broken_linker"
7787   with_broken_linker=$enableval
7788 else
7789   with_broken_linker=${BROKEN_LINKER:-no}
7790 fi;
7791 echo "$as_me:7791: result: $with_broken_linker" >&5
7792 echo "${ECHO_T}$with_broken_linker" >&6
7793
7794 BROKEN_LINKER=0
7795 if test "x$with_broken_linker" = xyes ; then
7796
7797 cat >>confdefs.h <<\EOF
7798 #define BROKEN_LINKER 1
7799 EOF
7800
7801         BROKEN_LINKER=1
7802 elif test "$DFT_LWR_MODEL" = shared ; then
7803         case $cf_cv_system_name in
7804         (cygwin*)
7805
7806 cat >>confdefs.h <<\EOF
7807 #define BROKEN_LINKER 1
7808 EOF
7809
7810                 BROKEN_LINKER=1
7811                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7812
7813 echo "${as_me:-configure}:7813: testing cygwin linker is broken anyway ..." 1>&5
7814
7815                 ;;
7816         esac
7817 fi
7818
7819 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7820 echo "$as_me:7820: checking if tputs should process BSD-style prefix padding" >&5
7821 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7822
7823 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7824 if test "${enable_bsdpad+set}" = set; then
7825   enableval="$enable_bsdpad"
7826   with_bsdpad=$enableval
7827 else
7828   with_bsdpad=no
7829 fi;
7830 echo "$as_me:7830: result: $with_bsdpad" >&5
7831 echo "${ECHO_T}$with_bsdpad" >&6
7832 test "x$with_bsdpad" = xyes &&
7833 cat >>confdefs.h <<\EOF
7834 #define BSD_TPUTS 1
7835 EOF
7836
7837 ###   use option --enable-widec to turn on use of wide-character support
7838 NCURSES_CH_T=chtype
7839 NCURSES_LIBUTF8=0
7840
7841 NEED_WCHAR_H=0
7842 NCURSES_MBSTATE_T=0
7843 NCURSES_WCHAR_T=0
7844 NCURSES_WINT_T=0
7845
7846 # Check to define _XOPEN_SOURCE "automatically"
7847 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7848
7849 cf_XOPEN_SOURCE=500
7850 cf_POSIX_C_SOURCE=199506L
7851 cf_xopen_source=
7852
7853 case $host_os in
7854 (aix[4-7]*)
7855         cf_xopen_source="-D_ALL_SOURCE"
7856         ;;
7857 (cygwin|msys)
7858         cf_XOPEN_SOURCE=600
7859         ;;
7860 (darwin[0-8].*)
7861         cf_xopen_source="-D_APPLE_C_SOURCE"
7862         ;;
7863 (darwin*)
7864         cf_xopen_source="-D_DARWIN_C_SOURCE"
7865         cf_XOPEN_SOURCE=
7866         ;;
7867 (freebsd*|dragonfly*)
7868         # 5.x headers associate
7869         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7870         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7871         cf_POSIX_C_SOURCE=200112L
7872         cf_XOPEN_SOURCE=600
7873         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7874         ;;
7875 (hpux11*)
7876         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7877         ;;
7878 (hpux*)
7879         cf_xopen_source="-D_HPUX_SOURCE"
7880         ;;
7881 (irix[56].*)
7882         cf_xopen_source="-D_SGI_SOURCE"
7883         cf_XOPEN_SOURCE=
7884         ;;
7885 (linux*|gnu*|mint*|k*bsd*-gnu)
7886
7887 echo "$as_me:7887: checking if we must define _GNU_SOURCE" >&5
7888 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7889 if test "${cf_cv_gnu_source+set}" = set; then
7890   echo $ECHO_N "(cached) $ECHO_C" >&6
7891 else
7892
7893 cat >conftest.$ac_ext <<_ACEOF
7894 #line 7894 "configure"
7895 #include "confdefs.h"
7896 #include <sys/types.h>
7897 int
7898 main ()
7899 {
7900
7901 #ifndef _XOPEN_SOURCE
7902 make an error
7903 #endif
7904   ;
7905   return 0;
7906 }
7907 _ACEOF
7908 rm -f conftest.$ac_objext
7909 if { (eval echo "$as_me:7909: \"$ac_compile\"") >&5
7910   (eval $ac_compile) 2>&5
7911   ac_status=$?
7912   echo "$as_me:7912: \$? = $ac_status" >&5
7913   (exit $ac_status); } &&
7914          { ac_try='test -s conftest.$ac_objext'
7915   { (eval echo "$as_me:7915: \"$ac_try\"") >&5
7916   (eval $ac_try) 2>&5
7917   ac_status=$?
7918   echo "$as_me:7918: \$? = $ac_status" >&5
7919   (exit $ac_status); }; }; then
7920   cf_cv_gnu_source=no
7921 else
7922   echo "$as_me: failed program was:" >&5
7923 cat conftest.$ac_ext >&5
7924 cf_save="$CPPFLAGS"
7925          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7926          cat >conftest.$ac_ext <<_ACEOF
7927 #line 7927 "configure"
7928 #include "confdefs.h"
7929 #include <sys/types.h>
7930 int
7931 main ()
7932 {
7933
7934 #ifdef _XOPEN_SOURCE
7935 make an error
7936 #endif
7937   ;
7938   return 0;
7939 }
7940 _ACEOF
7941 rm -f conftest.$ac_objext
7942 if { (eval echo "$as_me:7942: \"$ac_compile\"") >&5
7943   (eval $ac_compile) 2>&5
7944   ac_status=$?
7945   echo "$as_me:7945: \$? = $ac_status" >&5
7946   (exit $ac_status); } &&
7947          { ac_try='test -s conftest.$ac_objext'
7948   { (eval echo "$as_me:7948: \"$ac_try\"") >&5
7949   (eval $ac_try) 2>&5
7950   ac_status=$?
7951   echo "$as_me:7951: \$? = $ac_status" >&5
7952   (exit $ac_status); }; }; then
7953   cf_cv_gnu_source=no
7954 else
7955   echo "$as_me: failed program was:" >&5
7956 cat conftest.$ac_ext >&5
7957 cf_cv_gnu_source=yes
7958 fi
7959 rm -f conftest.$ac_objext conftest.$ac_ext
7960         CPPFLAGS="$cf_save"
7961
7962 fi
7963 rm -f conftest.$ac_objext conftest.$ac_ext
7964
7965 fi
7966 echo "$as_me:7966: result: $cf_cv_gnu_source" >&5
7967 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7968 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7969
7970         ;;
7971 (minix*)
7972         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7973         ;;
7974 (mirbsd*)
7975         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7976         cf_XOPEN_SOURCE=
7977
7978 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7979
7980 cf_save_CFLAGS="$CFLAGS"
7981 cf_save_CPPFLAGS="$CPPFLAGS"
7982
7983 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7984         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7985                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7986
7987 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7988         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7989                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7990
7991 echo "$as_me:7991: checking if we should define _POSIX_C_SOURCE" >&5
7992 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7993 if test "${cf_cv_posix_c_source+set}" = set; then
7994   echo $ECHO_N "(cached) $ECHO_C" >&6
7995 else
7996
7997 echo "${as_me:-configure}:7997: testing if the symbol is already defined go no further ..." 1>&5
7998
7999         cat >conftest.$ac_ext <<_ACEOF
8000 #line 8000 "configure"
8001 #include "confdefs.h"
8002 #include <sys/types.h>
8003 int
8004 main ()
8005 {
8006
8007 #ifndef _POSIX_C_SOURCE
8008 make an error
8009 #endif
8010   ;
8011   return 0;
8012 }
8013 _ACEOF
8014 rm -f conftest.$ac_objext
8015 if { (eval echo "$as_me:8015: \"$ac_compile\"") >&5
8016   (eval $ac_compile) 2>&5
8017   ac_status=$?
8018   echo "$as_me:8018: \$? = $ac_status" >&5
8019   (exit $ac_status); } &&
8020          { ac_try='test -s conftest.$ac_objext'
8021   { (eval echo "$as_me:8021: \"$ac_try\"") >&5
8022   (eval $ac_try) 2>&5
8023   ac_status=$?
8024   echo "$as_me:8024: \$? = $ac_status" >&5
8025   (exit $ac_status); }; }; then
8026   cf_cv_posix_c_source=no
8027 else
8028   echo "$as_me: failed program was:" >&5
8029 cat conftest.$ac_ext >&5
8030 cf_want_posix_source=no
8031          case .$cf_POSIX_C_SOURCE in
8032          (.[12]??*)
8033                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8034                 ;;
8035          (.2)
8036                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8037                 cf_want_posix_source=yes
8038                 ;;
8039          (.*)
8040                 cf_want_posix_source=yes
8041                 ;;
8042          esac
8043          if test "$cf_want_posix_source" = yes ; then
8044                 cat >conftest.$ac_ext <<_ACEOF
8045 #line 8045 "configure"
8046 #include "confdefs.h"
8047 #include <sys/types.h>
8048 int
8049 main ()
8050 {
8051
8052 #ifdef _POSIX_SOURCE
8053 make an error
8054 #endif
8055   ;
8056   return 0;
8057 }
8058 _ACEOF
8059 rm -f conftest.$ac_objext
8060 if { (eval echo "$as_me:8060: \"$ac_compile\"") >&5
8061   (eval $ac_compile) 2>&5
8062   ac_status=$?
8063   echo "$as_me:8063: \$? = $ac_status" >&5
8064   (exit $ac_status); } &&
8065          { ac_try='test -s conftest.$ac_objext'
8066   { (eval echo "$as_me:8066: \"$ac_try\"") >&5
8067   (eval $ac_try) 2>&5
8068   ac_status=$?
8069   echo "$as_me:8069: \$? = $ac_status" >&5
8070   (exit $ac_status); }; }; then
8071   :
8072 else
8073   echo "$as_me: failed program was:" >&5
8074 cat conftest.$ac_ext >&5
8075 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8076 fi
8077 rm -f conftest.$ac_objext conftest.$ac_ext
8078          fi
8079
8080 echo "${as_me:-configure}:8080: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8081
8082          CFLAGS="$cf_trim_CFLAGS"
8083          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8084
8085 echo "${as_me:-configure}:8085: testing if the second compile does not leave our definition intact error ..." 1>&5
8086
8087          cat >conftest.$ac_ext <<_ACEOF
8088 #line 8088 "configure"
8089 #include "confdefs.h"
8090 #include <sys/types.h>
8091 int
8092 main ()
8093 {
8094
8095 #ifndef _POSIX_C_SOURCE
8096 make an error
8097 #endif
8098   ;
8099   return 0;
8100 }
8101 _ACEOF
8102 rm -f conftest.$ac_objext
8103 if { (eval echo "$as_me:8103: \"$ac_compile\"") >&5
8104   (eval $ac_compile) 2>&5
8105   ac_status=$?
8106   echo "$as_me:8106: \$? = $ac_status" >&5
8107   (exit $ac_status); } &&
8108          { ac_try='test -s conftest.$ac_objext'
8109   { (eval echo "$as_me:8109: \"$ac_try\"") >&5
8110   (eval $ac_try) 2>&5
8111   ac_status=$?
8112   echo "$as_me:8112: \$? = $ac_status" >&5
8113   (exit $ac_status); }; }; then
8114   :
8115 else
8116   echo "$as_me: failed program was:" >&5
8117 cat conftest.$ac_ext >&5
8118 cf_cv_posix_c_source=no
8119 fi
8120 rm -f conftest.$ac_objext conftest.$ac_ext
8121          CFLAGS="$cf_save_CFLAGS"
8122          CPPFLAGS="$cf_save_CPPFLAGS"
8123
8124 fi
8125 rm -f conftest.$ac_objext conftest.$ac_ext
8126
8127 fi
8128 echo "$as_me:8128: result: $cf_cv_posix_c_source" >&5
8129 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8130
8131 if test "$cf_cv_posix_c_source" != no ; then
8132         CFLAGS="$cf_trim_CFLAGS"
8133         CPPFLAGS="$cf_trim_CPPFLAGS"
8134
8135 cf_fix_cppflags=no
8136 cf_new_cflags=
8137 cf_new_cppflags=
8138 cf_new_extra_cppflags=
8139
8140 for cf_add_cflags in $cf_cv_posix_c_source
8141 do
8142 case $cf_fix_cppflags in
8143 (no)
8144         case $cf_add_cflags in
8145         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8146                 case $cf_add_cflags in
8147                 (-D*)
8148                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8149
8150                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8151                                 && test -z "${cf_tst_cflags}" \
8152                                 && cf_fix_cppflags=yes
8153
8154                         if test $cf_fix_cppflags = yes ; then
8155                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8156                                 continue
8157                         elif test "${cf_tst_cflags}" = "\"'" ; then
8158                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8159                                 continue
8160                         fi
8161                         ;;
8162                 esac
8163                 case "$CPPFLAGS" in
8164                 (*$cf_add_cflags)
8165                         ;;
8166                 (*)
8167                         case $cf_add_cflags in
8168                         (-D*)
8169                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8170
8171 CPPFLAGS=`echo "$CPPFLAGS" | \
8172         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8173                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8174
8175                                 ;;
8176                         esac
8177                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8178                         ;;
8179                 esac
8180                 ;;
8181         (*)
8182                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8183                 ;;
8184         esac
8185         ;;
8186 (yes)
8187         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8188
8189         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8190
8191         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8192                 && test -z "${cf_tst_cflags}" \
8193                 && cf_fix_cppflags=no
8194         ;;
8195 esac
8196 done
8197
8198 if test -n "$cf_new_cflags" ; then
8199
8200         CFLAGS="$CFLAGS $cf_new_cflags"
8201 fi
8202
8203 if test -n "$cf_new_cppflags" ; then
8204
8205         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8206 fi
8207
8208 if test -n "$cf_new_extra_cppflags" ; then
8209
8210         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8211 fi
8212
8213 fi
8214
8215         ;;
8216 (netbsd*)
8217         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8218         ;;
8219 (openbsd[4-9]*)
8220         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8221         cf_xopen_source="-D_BSD_SOURCE"
8222         cf_XOPEN_SOURCE=600
8223         ;;
8224 (openbsd*)
8225         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8226         ;;
8227 (os2*)
8228         cf_XOPEN_SOURCE=
8229         ;;
8230 (osf[45]*)
8231         cf_xopen_source="-D_OSF_SOURCE"
8232         ;;
8233 (nto-qnx*)
8234         cf_xopen_source="-D_QNX_SOURCE"
8235         ;;
8236 (sco*)
8237         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8238         ;;
8239 (solaris2.*)
8240         cf_xopen_source="-D__EXTENSIONS__"
8241         cf_cv_xopen_source=broken
8242         ;;
8243 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8244         cf_XOPEN_SOURCE=
8245         cf_POSIX_C_SOURCE=
8246         ;;
8247 (*)
8248
8249 echo "$as_me:8249: checking if we should define _XOPEN_SOURCE" >&5
8250 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8251 if test "${cf_cv_xopen_source+set}" = set; then
8252   echo $ECHO_N "(cached) $ECHO_C" >&6
8253 else
8254
8255         cat >conftest.$ac_ext <<_ACEOF
8256 #line 8256 "configure"
8257 #include "confdefs.h"
8258
8259 #include <stdlib.h>
8260 #include <string.h>
8261 #include <sys/types.h>
8262
8263 int
8264 main ()
8265 {
8266
8267 #ifndef _XOPEN_SOURCE
8268 make an error
8269 #endif
8270   ;
8271   return 0;
8272 }
8273 _ACEOF
8274 rm -f conftest.$ac_objext
8275 if { (eval echo "$as_me:8275: \"$ac_compile\"") >&5
8276   (eval $ac_compile) 2>&5
8277   ac_status=$?
8278   echo "$as_me:8278: \$? = $ac_status" >&5
8279   (exit $ac_status); } &&
8280          { ac_try='test -s conftest.$ac_objext'
8281   { (eval echo "$as_me:8281: \"$ac_try\"") >&5
8282   (eval $ac_try) 2>&5
8283   ac_status=$?
8284   echo "$as_me:8284: \$? = $ac_status" >&5
8285   (exit $ac_status); }; }; then
8286   cf_cv_xopen_source=no
8287 else
8288   echo "$as_me: failed program was:" >&5
8289 cat conftest.$ac_ext >&5
8290 cf_save="$CPPFLAGS"
8291          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8292          cat >conftest.$ac_ext <<_ACEOF
8293 #line 8293 "configure"
8294 #include "confdefs.h"
8295
8296 #include <stdlib.h>
8297 #include <string.h>
8298 #include <sys/types.h>
8299
8300 int
8301 main ()
8302 {
8303
8304 #ifdef _XOPEN_SOURCE
8305 make an error
8306 #endif
8307   ;
8308   return 0;
8309 }
8310 _ACEOF
8311 rm -f conftest.$ac_objext
8312 if { (eval echo "$as_me:8312: \"$ac_compile\"") >&5
8313   (eval $ac_compile) 2>&5
8314   ac_status=$?
8315   echo "$as_me:8315: \$? = $ac_status" >&5
8316   (exit $ac_status); } &&
8317          { ac_try='test -s conftest.$ac_objext'
8318   { (eval echo "$as_me:8318: \"$ac_try\"") >&5
8319   (eval $ac_try) 2>&5
8320   ac_status=$?
8321   echo "$as_me:8321: \$? = $ac_status" >&5
8322   (exit $ac_status); }; }; then
8323   cf_cv_xopen_source=no
8324 else
8325   echo "$as_me: failed program was:" >&5
8326 cat conftest.$ac_ext >&5
8327 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8328 fi
8329 rm -f conftest.$ac_objext conftest.$ac_ext
8330         CPPFLAGS="$cf_save"
8331
8332 fi
8333 rm -f conftest.$ac_objext conftest.$ac_ext
8334
8335 fi
8336 echo "$as_me:8336: result: $cf_cv_xopen_source" >&5
8337 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8338
8339 if test "$cf_cv_xopen_source" != no ; then
8340
8341 CFLAGS=`echo "$CFLAGS" | \
8342         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8343                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8344
8345 CPPFLAGS=`echo "$CPPFLAGS" | \
8346         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8347                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8348
8349         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8350
8351 cf_fix_cppflags=no
8352 cf_new_cflags=
8353 cf_new_cppflags=
8354 cf_new_extra_cppflags=
8355
8356 for cf_add_cflags in $cf_temp_xopen_source
8357 do
8358 case $cf_fix_cppflags in
8359 (no)
8360         case $cf_add_cflags in
8361         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8362                 case $cf_add_cflags in
8363                 (-D*)
8364                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8365
8366                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8367                                 && test -z "${cf_tst_cflags}" \
8368                                 && cf_fix_cppflags=yes
8369
8370                         if test $cf_fix_cppflags = yes ; then
8371                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8372                                 continue
8373                         elif test "${cf_tst_cflags}" = "\"'" ; then
8374                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8375                                 continue
8376                         fi
8377                         ;;
8378                 esac
8379                 case "$CPPFLAGS" in
8380                 (*$cf_add_cflags)
8381                         ;;
8382                 (*)
8383                         case $cf_add_cflags in
8384                         (-D*)
8385                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8386
8387 CPPFLAGS=`echo "$CPPFLAGS" | \
8388         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8389                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8390
8391                                 ;;
8392                         esac
8393                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8394                         ;;
8395                 esac
8396                 ;;
8397         (*)
8398                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8399                 ;;
8400         esac
8401         ;;
8402 (yes)
8403         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8404
8405         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8406
8407         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8408                 && test -z "${cf_tst_cflags}" \
8409                 && cf_fix_cppflags=no
8410         ;;
8411 esac
8412 done
8413
8414 if test -n "$cf_new_cflags" ; then
8415
8416         CFLAGS="$CFLAGS $cf_new_cflags"
8417 fi
8418
8419 if test -n "$cf_new_cppflags" ; then
8420
8421         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8422 fi
8423
8424 if test -n "$cf_new_extra_cppflags" ; then
8425
8426         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8427 fi
8428
8429 fi
8430
8431 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8432
8433 cf_save_CFLAGS="$CFLAGS"
8434 cf_save_CPPFLAGS="$CPPFLAGS"
8435
8436 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8437         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8438                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8439
8440 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8441         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8442                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8443
8444 echo "$as_me:8444: checking if we should define _POSIX_C_SOURCE" >&5
8445 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8446 if test "${cf_cv_posix_c_source+set}" = set; then
8447   echo $ECHO_N "(cached) $ECHO_C" >&6
8448 else
8449
8450 echo "${as_me:-configure}:8450: testing if the symbol is already defined go no further ..." 1>&5
8451
8452         cat >conftest.$ac_ext <<_ACEOF
8453 #line 8453 "configure"
8454 #include "confdefs.h"
8455 #include <sys/types.h>
8456 int
8457 main ()
8458 {
8459
8460 #ifndef _POSIX_C_SOURCE
8461 make an error
8462 #endif
8463   ;
8464   return 0;
8465 }
8466 _ACEOF
8467 rm -f conftest.$ac_objext
8468 if { (eval echo "$as_me:8468: \"$ac_compile\"") >&5
8469   (eval $ac_compile) 2>&5
8470   ac_status=$?
8471   echo "$as_me:8471: \$? = $ac_status" >&5
8472   (exit $ac_status); } &&
8473          { ac_try='test -s conftest.$ac_objext'
8474   { (eval echo "$as_me:8474: \"$ac_try\"") >&5
8475   (eval $ac_try) 2>&5
8476   ac_status=$?
8477   echo "$as_me:8477: \$? = $ac_status" >&5
8478   (exit $ac_status); }; }; then
8479   cf_cv_posix_c_source=no
8480 else
8481   echo "$as_me: failed program was:" >&5
8482 cat conftest.$ac_ext >&5
8483 cf_want_posix_source=no
8484          case .$cf_POSIX_C_SOURCE in
8485          (.[12]??*)
8486                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8487                 ;;
8488          (.2)
8489                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8490                 cf_want_posix_source=yes
8491                 ;;
8492          (.*)
8493                 cf_want_posix_source=yes
8494                 ;;
8495          esac
8496          if test "$cf_want_posix_source" = yes ; then
8497                 cat >conftest.$ac_ext <<_ACEOF
8498 #line 8498 "configure"
8499 #include "confdefs.h"
8500 #include <sys/types.h>
8501 int
8502 main ()
8503 {
8504
8505 #ifdef _POSIX_SOURCE
8506 make an error
8507 #endif
8508   ;
8509   return 0;
8510 }
8511 _ACEOF
8512 rm -f conftest.$ac_objext
8513 if { (eval echo "$as_me:8513: \"$ac_compile\"") >&5
8514   (eval $ac_compile) 2>&5
8515   ac_status=$?
8516   echo "$as_me:8516: \$? = $ac_status" >&5
8517   (exit $ac_status); } &&
8518          { ac_try='test -s conftest.$ac_objext'
8519   { (eval echo "$as_me:8519: \"$ac_try\"") >&5
8520   (eval $ac_try) 2>&5
8521   ac_status=$?
8522   echo "$as_me:8522: \$? = $ac_status" >&5
8523   (exit $ac_status); }; }; then
8524   :
8525 else
8526   echo "$as_me: failed program was:" >&5
8527 cat conftest.$ac_ext >&5
8528 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8529 fi
8530 rm -f conftest.$ac_objext conftest.$ac_ext
8531          fi
8532
8533 echo "${as_me:-configure}:8533: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8534
8535          CFLAGS="$cf_trim_CFLAGS"
8536          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8537
8538 echo "${as_me:-configure}:8538: testing if the second compile does not leave our definition intact error ..." 1>&5
8539
8540          cat >conftest.$ac_ext <<_ACEOF
8541 #line 8541 "configure"
8542 #include "confdefs.h"
8543 #include <sys/types.h>
8544 int
8545 main ()
8546 {
8547
8548 #ifndef _POSIX_C_SOURCE
8549 make an error
8550 #endif
8551   ;
8552   return 0;
8553 }
8554 _ACEOF
8555 rm -f conftest.$ac_objext
8556 if { (eval echo "$as_me:8556: \"$ac_compile\"") >&5
8557   (eval $ac_compile) 2>&5
8558   ac_status=$?
8559   echo "$as_me:8559: \$? = $ac_status" >&5
8560   (exit $ac_status); } &&
8561          { ac_try='test -s conftest.$ac_objext'
8562   { (eval echo "$as_me:8562: \"$ac_try\"") >&5
8563   (eval $ac_try) 2>&5
8564   ac_status=$?
8565   echo "$as_me:8565: \$? = $ac_status" >&5
8566   (exit $ac_status); }; }; then
8567   :
8568 else
8569   echo "$as_me: failed program was:" >&5
8570 cat conftest.$ac_ext >&5
8571 cf_cv_posix_c_source=no
8572 fi
8573 rm -f conftest.$ac_objext conftest.$ac_ext
8574          CFLAGS="$cf_save_CFLAGS"
8575          CPPFLAGS="$cf_save_CPPFLAGS"
8576
8577 fi
8578 rm -f conftest.$ac_objext conftest.$ac_ext
8579
8580 fi
8581 echo "$as_me:8581: result: $cf_cv_posix_c_source" >&5
8582 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8583
8584 if test "$cf_cv_posix_c_source" != no ; then
8585         CFLAGS="$cf_trim_CFLAGS"
8586         CPPFLAGS="$cf_trim_CPPFLAGS"
8587
8588 cf_fix_cppflags=no
8589 cf_new_cflags=
8590 cf_new_cppflags=
8591 cf_new_extra_cppflags=
8592
8593 for cf_add_cflags in $cf_cv_posix_c_source
8594 do
8595 case $cf_fix_cppflags in
8596 (no)
8597         case $cf_add_cflags in
8598         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8599                 case $cf_add_cflags in
8600                 (-D*)
8601                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8602
8603                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8604                                 && test -z "${cf_tst_cflags}" \
8605                                 && cf_fix_cppflags=yes
8606
8607                         if test $cf_fix_cppflags = yes ; then
8608                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8609                                 continue
8610                         elif test "${cf_tst_cflags}" = "\"'" ; then
8611                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8612                                 continue
8613                         fi
8614                         ;;
8615                 esac
8616                 case "$CPPFLAGS" in
8617                 (*$cf_add_cflags)
8618                         ;;
8619                 (*)
8620                         case $cf_add_cflags in
8621                         (-D*)
8622                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8623
8624 CPPFLAGS=`echo "$CPPFLAGS" | \
8625         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8626                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8627
8628                                 ;;
8629                         esac
8630                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8631                         ;;
8632                 esac
8633                 ;;
8634         (*)
8635                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8636                 ;;
8637         esac
8638         ;;
8639 (yes)
8640         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8641
8642         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8643
8644         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8645                 && test -z "${cf_tst_cflags}" \
8646                 && cf_fix_cppflags=no
8647         ;;
8648 esac
8649 done
8650
8651 if test -n "$cf_new_cflags" ; then
8652
8653         CFLAGS="$CFLAGS $cf_new_cflags"
8654 fi
8655
8656 if test -n "$cf_new_cppflags" ; then
8657
8658         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8659 fi
8660
8661 if test -n "$cf_new_extra_cppflags" ; then
8662
8663         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8664 fi
8665
8666 fi
8667
8668         ;;
8669 esac
8670
8671 if test -n "$cf_xopen_source" ; then
8672
8673 cf_fix_cppflags=no
8674 cf_new_cflags=
8675 cf_new_cppflags=
8676 cf_new_extra_cppflags=
8677
8678 for cf_add_cflags in $cf_xopen_source
8679 do
8680 case $cf_fix_cppflags in
8681 (no)
8682         case $cf_add_cflags in
8683         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8684                 case $cf_add_cflags in
8685                 (-D*)
8686                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8687
8688                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8689                                 && test -z "${cf_tst_cflags}" \
8690                                 && cf_fix_cppflags=yes
8691
8692                         if test $cf_fix_cppflags = yes ; then
8693                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8694                                 continue
8695                         elif test "${cf_tst_cflags}" = "\"'" ; then
8696                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8697                                 continue
8698                         fi
8699                         ;;
8700                 esac
8701                 case "$CPPFLAGS" in
8702                 (*$cf_add_cflags)
8703                         ;;
8704                 (*)
8705                         case $cf_add_cflags in
8706                         (-D*)
8707                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8708
8709 CPPFLAGS=`echo "$CPPFLAGS" | \
8710         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8711                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8712
8713                                 ;;
8714                         esac
8715                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8716                         ;;
8717                 esac
8718                 ;;
8719         (*)
8720                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8721                 ;;
8722         esac
8723         ;;
8724 (yes)
8725         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8726
8727         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8728
8729         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8730                 && test -z "${cf_tst_cflags}" \
8731                 && cf_fix_cppflags=no
8732         ;;
8733 esac
8734 done
8735
8736 if test -n "$cf_new_cflags" ; then
8737         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8738
8739 echo "${as_me:-configure}:8739: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8740
8741         CFLAGS="$CFLAGS $cf_new_cflags"
8742 fi
8743
8744 if test -n "$cf_new_cppflags" ; then
8745         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8746
8747 echo "${as_me:-configure}:8747: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8748
8749         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8750 fi
8751
8752 if test -n "$cf_new_extra_cppflags" ; then
8753         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8754
8755 echo "${as_me:-configure}:8755: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8756
8757         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8758 fi
8759
8760 fi
8761
8762 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8763         echo "$as_me:8763: checking if _XOPEN_SOURCE really is set" >&5
8764 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8765         cat >conftest.$ac_ext <<_ACEOF
8766 #line 8766 "configure"
8767 #include "confdefs.h"
8768 #include <stdlib.h>
8769 int
8770 main ()
8771 {
8772
8773 #ifndef _XOPEN_SOURCE
8774 make an error
8775 #endif
8776   ;
8777   return 0;
8778 }
8779 _ACEOF
8780 rm -f conftest.$ac_objext
8781 if { (eval echo "$as_me:8781: \"$ac_compile\"") >&5
8782   (eval $ac_compile) 2>&5
8783   ac_status=$?
8784   echo "$as_me:8784: \$? = $ac_status" >&5
8785   (exit $ac_status); } &&
8786          { ac_try='test -s conftest.$ac_objext'
8787   { (eval echo "$as_me:8787: \"$ac_try\"") >&5
8788   (eval $ac_try) 2>&5
8789   ac_status=$?
8790   echo "$as_me:8790: \$? = $ac_status" >&5
8791   (exit $ac_status); }; }; then
8792   cf_XOPEN_SOURCE_set=yes
8793 else
8794   echo "$as_me: failed program was:" >&5
8795 cat conftest.$ac_ext >&5
8796 cf_XOPEN_SOURCE_set=no
8797 fi
8798 rm -f conftest.$ac_objext conftest.$ac_ext
8799         echo "$as_me:8799: result: $cf_XOPEN_SOURCE_set" >&5
8800 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8801         if test $cf_XOPEN_SOURCE_set = yes
8802         then
8803                 cat >conftest.$ac_ext <<_ACEOF
8804 #line 8804 "configure"
8805 #include "confdefs.h"
8806 #include <stdlib.h>
8807 int
8808 main ()
8809 {
8810
8811 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8812 make an error
8813 #endif
8814   ;
8815   return 0;
8816 }
8817 _ACEOF
8818 rm -f conftest.$ac_objext
8819 if { (eval echo "$as_me:8819: \"$ac_compile\"") >&5
8820   (eval $ac_compile) 2>&5
8821   ac_status=$?
8822   echo "$as_me:8822: \$? = $ac_status" >&5
8823   (exit $ac_status); } &&
8824          { ac_try='test -s conftest.$ac_objext'
8825   { (eval echo "$as_me:8825: \"$ac_try\"") >&5
8826   (eval $ac_try) 2>&5
8827   ac_status=$?
8828   echo "$as_me:8828: \$? = $ac_status" >&5
8829   (exit $ac_status); }; }; then
8830   cf_XOPEN_SOURCE_set_ok=yes
8831 else
8832   echo "$as_me: failed program was:" >&5
8833 cat conftest.$ac_ext >&5
8834 cf_XOPEN_SOURCE_set_ok=no
8835 fi
8836 rm -f conftest.$ac_objext conftest.$ac_ext
8837                 if test $cf_XOPEN_SOURCE_set_ok = no
8838                 then
8839                         { echo "$as_me:8839: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8840 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8841                 fi
8842         else
8843
8844 echo "$as_me:8844: checking if we should define _XOPEN_SOURCE" >&5
8845 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8846 if test "${cf_cv_xopen_source+set}" = set; then
8847   echo $ECHO_N "(cached) $ECHO_C" >&6
8848 else
8849
8850         cat >conftest.$ac_ext <<_ACEOF
8851 #line 8851 "configure"
8852 #include "confdefs.h"
8853
8854 #include <stdlib.h>
8855 #include <string.h>
8856 #include <sys/types.h>
8857
8858 int
8859 main ()
8860 {
8861
8862 #ifndef _XOPEN_SOURCE
8863 make an error
8864 #endif
8865   ;
8866   return 0;
8867 }
8868 _ACEOF
8869 rm -f conftest.$ac_objext
8870 if { (eval echo "$as_me:8870: \"$ac_compile\"") >&5
8871   (eval $ac_compile) 2>&5
8872   ac_status=$?
8873   echo "$as_me:8873: \$? = $ac_status" >&5
8874   (exit $ac_status); } &&
8875          { ac_try='test -s conftest.$ac_objext'
8876   { (eval echo "$as_me:8876: \"$ac_try\"") >&5
8877   (eval $ac_try) 2>&5
8878   ac_status=$?
8879   echo "$as_me:8879: \$? = $ac_status" >&5
8880   (exit $ac_status); }; }; then
8881   cf_cv_xopen_source=no
8882 else
8883   echo "$as_me: failed program was:" >&5
8884 cat conftest.$ac_ext >&5
8885 cf_save="$CPPFLAGS"
8886          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8887          cat >conftest.$ac_ext <<_ACEOF
8888 #line 8888 "configure"
8889 #include "confdefs.h"
8890
8891 #include <stdlib.h>
8892 #include <string.h>
8893 #include <sys/types.h>
8894
8895 int
8896 main ()
8897 {
8898
8899 #ifdef _XOPEN_SOURCE
8900 make an error
8901 #endif
8902   ;
8903   return 0;
8904 }
8905 _ACEOF
8906 rm -f conftest.$ac_objext
8907 if { (eval echo "$as_me:8907: \"$ac_compile\"") >&5
8908   (eval $ac_compile) 2>&5
8909   ac_status=$?
8910   echo "$as_me:8910: \$? = $ac_status" >&5
8911   (exit $ac_status); } &&
8912          { ac_try='test -s conftest.$ac_objext'
8913   { (eval echo "$as_me:8913: \"$ac_try\"") >&5
8914   (eval $ac_try) 2>&5
8915   ac_status=$?
8916   echo "$as_me:8916: \$? = $ac_status" >&5
8917   (exit $ac_status); }; }; then
8918   cf_cv_xopen_source=no
8919 else
8920   echo "$as_me: failed program was:" >&5
8921 cat conftest.$ac_ext >&5
8922 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8923 fi
8924 rm -f conftest.$ac_objext conftest.$ac_ext
8925         CPPFLAGS="$cf_save"
8926
8927 fi
8928 rm -f conftest.$ac_objext conftest.$ac_ext
8929
8930 fi
8931 echo "$as_me:8931: result: $cf_cv_xopen_source" >&5
8932 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8933
8934 if test "$cf_cv_xopen_source" != no ; then
8935
8936 CFLAGS=`echo "$CFLAGS" | \
8937         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8938                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8939
8940 CPPFLAGS=`echo "$CPPFLAGS" | \
8941         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8942                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8943
8944         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8945
8946 cf_fix_cppflags=no
8947 cf_new_cflags=
8948 cf_new_cppflags=
8949 cf_new_extra_cppflags=
8950
8951 for cf_add_cflags in $cf_temp_xopen_source
8952 do
8953 case $cf_fix_cppflags in
8954 (no)
8955         case $cf_add_cflags in
8956         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8957                 case $cf_add_cflags in
8958                 (-D*)
8959                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8960
8961                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8962                                 && test -z "${cf_tst_cflags}" \
8963                                 && cf_fix_cppflags=yes
8964
8965                         if test $cf_fix_cppflags = yes ; then
8966                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8967                                 continue
8968                         elif test "${cf_tst_cflags}" = "\"'" ; then
8969                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8970                                 continue
8971                         fi
8972                         ;;
8973                 esac
8974                 case "$CPPFLAGS" in
8975                 (*$cf_add_cflags)
8976                         ;;
8977                 (*)
8978                         case $cf_add_cflags in
8979                         (-D*)
8980                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8981
8982 CPPFLAGS=`echo "$CPPFLAGS" | \
8983         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8984                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8985
8986                                 ;;
8987                         esac
8988                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8989                         ;;
8990                 esac
8991                 ;;
8992         (*)
8993                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8994                 ;;
8995         esac
8996         ;;
8997 (yes)
8998         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8999
9000         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9001
9002         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9003                 && test -z "${cf_tst_cflags}" \
9004                 && cf_fix_cppflags=no
9005         ;;
9006 esac
9007 done
9008
9009 if test -n "$cf_new_cflags" ; then
9010
9011         CFLAGS="$CFLAGS $cf_new_cflags"
9012 fi
9013
9014 if test -n "$cf_new_cppflags" ; then
9015
9016         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9017 fi
9018
9019 if test -n "$cf_new_extra_cppflags" ; then
9020
9021         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9022 fi
9023
9024 fi
9025
9026         fi
9027 fi
9028
9029 CPPFLAGS_after_XOPEN="$CPPFLAGS"
9030
9031 # Work around breakage on OS X
9032
9033 echo "$as_me:9033: checking if SIGWINCH is defined" >&5
9034 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
9035 if test "${cf_cv_define_sigwinch+set}" = set; then
9036   echo $ECHO_N "(cached) $ECHO_C" >&6
9037 else
9038
9039         cat >conftest.$ac_ext <<_ACEOF
9040 #line 9040 "configure"
9041 #include "confdefs.h"
9042
9043 #include <sys/types.h>
9044 #include <sys/signal.h>
9045
9046 int
9047 main ()
9048 {
9049 int x = SIGWINCH
9050   ;
9051   return 0;
9052 }
9053 _ACEOF
9054 rm -f conftest.$ac_objext
9055 if { (eval echo "$as_me:9055: \"$ac_compile\"") >&5
9056   (eval $ac_compile) 2>&5
9057   ac_status=$?
9058   echo "$as_me:9058: \$? = $ac_status" >&5
9059   (exit $ac_status); } &&
9060          { ac_try='test -s conftest.$ac_objext'
9061   { (eval echo "$as_me:9061: \"$ac_try\"") >&5
9062   (eval $ac_try) 2>&5
9063   ac_status=$?
9064   echo "$as_me:9064: \$? = $ac_status" >&5
9065   (exit $ac_status); }; }; then
9066   cf_cv_define_sigwinch=yes
9067 else
9068   echo "$as_me: failed program was:" >&5
9069 cat conftest.$ac_ext >&5
9070 cat >conftest.$ac_ext <<_ACEOF
9071 #line 9071 "configure"
9072 #include "confdefs.h"
9073
9074 #undef _XOPEN_SOURCE
9075 #undef _POSIX_SOURCE
9076 #undef _POSIX_C_SOURCE
9077 #include <sys/types.h>
9078 #include <sys/signal.h>
9079
9080 int
9081 main ()
9082 {
9083 int x = SIGWINCH
9084   ;
9085   return 0;
9086 }
9087 _ACEOF
9088 rm -f conftest.$ac_objext
9089 if { (eval echo "$as_me:9089: \"$ac_compile\"") >&5
9090   (eval $ac_compile) 2>&5
9091   ac_status=$?
9092   echo "$as_me:9092: \$? = $ac_status" >&5
9093   (exit $ac_status); } &&
9094          { ac_try='test -s conftest.$ac_objext'
9095   { (eval echo "$as_me:9095: \"$ac_try\"") >&5
9096   (eval $ac_try) 2>&5
9097   ac_status=$?
9098   echo "$as_me:9098: \$? = $ac_status" >&5
9099   (exit $ac_status); }; }; then
9100   cf_cv_define_sigwinch=maybe
9101 else
9102   echo "$as_me: failed program was:" >&5
9103 cat conftest.$ac_ext >&5
9104 cf_cv_define_sigwinch=no
9105 fi
9106 rm -f conftest.$ac_objext conftest.$ac_ext
9107
9108 fi
9109 rm -f conftest.$ac_objext conftest.$ac_ext
9110
9111 fi
9112 echo "$as_me:9112: result: $cf_cv_define_sigwinch" >&5
9113 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9114
9115 if test "$cf_cv_define_sigwinch" = maybe ; then
9116 echo "$as_me:9116: checking for actual SIGWINCH definition" >&5
9117 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9118 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9119   echo $ECHO_N "(cached) $ECHO_C" >&6
9120 else
9121
9122 cf_cv_fixup_sigwinch=unknown
9123 cf_sigwinch=32
9124 while test $cf_sigwinch != 1
9125 do
9126         cat >conftest.$ac_ext <<_ACEOF
9127 #line 9127 "configure"
9128 #include "confdefs.h"
9129
9130 #undef _XOPEN_SOURCE
9131 #undef _POSIX_SOURCE
9132 #undef _POSIX_C_SOURCE
9133 #include <sys/types.h>
9134 #include <sys/signal.h>
9135
9136 int
9137 main ()
9138 {
9139
9140 #if SIGWINCH != $cf_sigwinch
9141 make an error
9142 #endif
9143 int x = SIGWINCH
9144   ;
9145   return 0;
9146 }
9147 _ACEOF
9148 rm -f conftest.$ac_objext
9149 if { (eval echo "$as_me:9149: \"$ac_compile\"") >&5
9150   (eval $ac_compile) 2>&5
9151   ac_status=$?
9152   echo "$as_me:9152: \$? = $ac_status" >&5
9153   (exit $ac_status); } &&
9154          { ac_try='test -s conftest.$ac_objext'
9155   { (eval echo "$as_me:9155: \"$ac_try\"") >&5
9156   (eval $ac_try) 2>&5
9157   ac_status=$?
9158   echo "$as_me:9158: \$? = $ac_status" >&5
9159   (exit $ac_status); }; }; then
9160   cf_cv_fixup_sigwinch=$cf_sigwinch
9161          break
9162 else
9163   echo "$as_me: failed program was:" >&5
9164 cat conftest.$ac_ext >&5
9165 fi
9166 rm -f conftest.$ac_objext conftest.$ac_ext
9167
9168 cf_sigwinch=`expr $cf_sigwinch - 1`
9169 done
9170
9171 fi
9172 echo "$as_me:9172: result: $cf_cv_fixup_sigwinch" >&5
9173 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9174
9175         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9176                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9177         fi
9178 fi
9179
9180 # Checks for CODESET support.
9181
9182 echo "$as_me:9182: checking for nl_langinfo and CODESET" >&5
9183 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9184 if test "${am_cv_langinfo_codeset+set}" = set; then
9185   echo $ECHO_N "(cached) $ECHO_C" >&6
9186 else
9187   cat >conftest.$ac_ext <<_ACEOF
9188 #line 9188 "configure"
9189 #include "confdefs.h"
9190 #include <langinfo.h>
9191 int
9192 main ()
9193 {
9194 char* cs = nl_langinfo(CODESET);
9195   ;
9196   return 0;
9197 }
9198 _ACEOF
9199 rm -f conftest.$ac_objext conftest$ac_exeext
9200 if { (eval echo "$as_me:9200: \"$ac_link\"") >&5
9201   (eval $ac_link) 2>&5
9202   ac_status=$?
9203   echo "$as_me:9203: \$? = $ac_status" >&5
9204   (exit $ac_status); } &&
9205          { ac_try='test -s conftest$ac_exeext'
9206   { (eval echo "$as_me:9206: \"$ac_try\"") >&5
9207   (eval $ac_try) 2>&5
9208   ac_status=$?
9209   echo "$as_me:9209: \$? = $ac_status" >&5
9210   (exit $ac_status); }; }; then
9211   am_cv_langinfo_codeset=yes
9212 else
9213   echo "$as_me: failed program was:" >&5
9214 cat conftest.$ac_ext >&5
9215 am_cv_langinfo_codeset=no
9216 fi
9217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9218
9219 fi
9220 echo "$as_me:9220: result: $am_cv_langinfo_codeset" >&5
9221 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9222         if test $am_cv_langinfo_codeset = yes; then
9223
9224 cat >>confdefs.h <<\EOF
9225 #define HAVE_LANGINFO_CODESET 1
9226 EOF
9227
9228         fi
9229
9230 # use these variables to work around a defect in gcc's fixincludes.
9231 NCURSES_OK_WCHAR_T=
9232 NCURSES_OK_WINT_T=
9233
9234 echo "$as_me:9234: checking if you want wide-character code" >&5
9235 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9236
9237 # Check whether --enable-widec or --disable-widec was given.
9238 if test "${enable_widec+set}" = set; then
9239   enableval="$enable_widec"
9240   with_widec=$enableval
9241 else
9242   with_widec=no
9243 fi;
9244 echo "$as_me:9244: result: $with_widec" >&5
9245 echo "${ECHO_T}$with_widec" >&6
9246 if test "x$with_widec" = xyes ; then
9247         if test "x$disable_lib_suffixes" = xno ; then
9248                 LIB_SUFFIX="w${LIB_SUFFIX}"
9249         fi
9250
9251 cat >>confdefs.h <<\EOF
9252 #define USE_WIDEC_SUPPORT 1
9253 EOF
9254
9255 cat >>confdefs.h <<\EOF
9256 #define NCURSES_WIDECHAR 1
9257 EOF
9258
9259 echo "$as_me:9259: checking if wchar.h can be used as is" >&5
9260 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9261 if test "${cf_cv_wchar_h_okay+set}" = set; then
9262   echo $ECHO_N "(cached) $ECHO_C" >&6
9263 else
9264
9265 cat >conftest.$ac_ext <<_ACEOF
9266 #line 9266 "configure"
9267 #include "confdefs.h"
9268
9269 #include <stdlib.h>
9270 #include <wchar.h>
9271
9272 int
9273 main ()
9274 {
9275
9276         wint_t foo = 0;
9277         int bar = iswpunct(foo)
9278   ;
9279   return 0;
9280 }
9281 _ACEOF
9282 rm -f conftest.$ac_objext
9283 if { (eval echo "$as_me:9283: \"$ac_compile\"") >&5
9284   (eval $ac_compile) 2>&5
9285   ac_status=$?
9286   echo "$as_me:9286: \$? = $ac_status" >&5
9287   (exit $ac_status); } &&
9288          { ac_try='test -s conftest.$ac_objext'
9289   { (eval echo "$as_me:9289: \"$ac_try\"") >&5
9290   (eval $ac_try) 2>&5
9291   ac_status=$?
9292   echo "$as_me:9292: \$? = $ac_status" >&5
9293   (exit $ac_status); }; }; then
9294   cf_cv_wchar_h_okay=yes
9295 else
9296   echo "$as_me: failed program was:" >&5
9297 cat conftest.$ac_ext >&5
9298 cf_cv_wchar_h_okay=no
9299 fi
9300 rm -f conftest.$ac_objext conftest.$ac_ext
9301 fi
9302 echo "$as_me:9302: result: $cf_cv_wchar_h_okay" >&5
9303 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9304
9305 if test $cf_cv_wchar_h_okay = no
9306 then
9307
9308 echo "$as_me:9308: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9309 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9310 cat >conftest.$ac_ext <<_ACEOF
9311 #line 9311 "configure"
9312 #include "confdefs.h"
9313 #include <sys/types.h>
9314
9315 int
9316 main ()
9317 {
9318
9319 #ifndef _XOPEN_SOURCE_EXTENDED
9320 make an error
9321 #endif
9322   ;
9323   return 0;
9324 }
9325 _ACEOF
9326 rm -f conftest.$ac_objext
9327 if { (eval echo "$as_me:9327: \"$ac_compile\"") >&5
9328   (eval $ac_compile) 2>&5
9329   ac_status=$?
9330   echo "$as_me:9330: \$? = $ac_status" >&5
9331   (exit $ac_status); } &&
9332          { ac_try='test -s conftest.$ac_objext'
9333   { (eval echo "$as_me:9333: \"$ac_try\"") >&5
9334   (eval $ac_try) 2>&5
9335   ac_status=$?
9336   echo "$as_me:9336: \$? = $ac_status" >&5
9337   (exit $ac_status); }; }; then
9338   cf_result=no
9339 else
9340   echo "$as_me: failed program was:" >&5
9341 cat conftest.$ac_ext >&5
9342 cf_result=yes
9343 fi
9344 rm -f conftest.$ac_objext conftest.$ac_ext
9345 echo "$as_me:9345: result: $cf_result" >&5
9346 echo "${ECHO_T}$cf_result" >&6
9347
9348 if test "$cf_result" = yes ; then
9349         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9350 elif test "x" != "x" ; then
9351         echo "$as_me:9351: checking checking for compatible value versus " >&5
9352 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9353         cat >conftest.$ac_ext <<_ACEOF
9354 #line 9354 "configure"
9355 #include "confdefs.h"
9356 #include <sys/types.h>
9357
9358 int
9359 main ()
9360 {
9361
9362 #if _XOPEN_SOURCE_EXTENDED- < 0
9363 make an error
9364 #endif
9365   ;
9366   return 0;
9367 }
9368 _ACEOF
9369 rm -f conftest.$ac_objext
9370 if { (eval echo "$as_me:9370: \"$ac_compile\"") >&5
9371   (eval $ac_compile) 2>&5
9372   ac_status=$?
9373   echo "$as_me:9373: \$? = $ac_status" >&5
9374   (exit $ac_status); } &&
9375          { ac_try='test -s conftest.$ac_objext'
9376   { (eval echo "$as_me:9376: \"$ac_try\"") >&5
9377   (eval $ac_try) 2>&5
9378   ac_status=$?
9379   echo "$as_me:9379: \$? = $ac_status" >&5
9380   (exit $ac_status); }; }; then
9381   cf_result=yes
9382 else
9383   echo "$as_me: failed program was:" >&5
9384 cat conftest.$ac_ext >&5
9385 cf_result=no
9386 fi
9387 rm -f conftest.$ac_objext conftest.$ac_ext
9388         echo "$as_me:9388: result: $cf_result" >&5
9389 echo "${ECHO_T}$cf_result" >&6
9390         if test "$cf_result" = no ; then
9391                 # perhaps we can override it - try...
9392                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9393         fi
9394 fi
9395
9396 fi
9397
9398         # with_overwrite=no
9399         NCURSES_CH_T=cchar_t
9400
9401 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9402 do
9403 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9404 echo "$as_me:9404: checking for $ac_func" >&5
9405 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9406 if eval "test \"\${$as_ac_var+set}\" = set"; then
9407   echo $ECHO_N "(cached) $ECHO_C" >&6
9408 else
9409   cat >conftest.$ac_ext <<_ACEOF
9410 #line 9410 "configure"
9411 #include "confdefs.h"
9412 /* System header to define __stub macros and hopefully few prototypes,
9413     which can conflict with char $ac_func (); below.  */
9414 #include <assert.h>
9415 /* Override any gcc2 internal prototype to avoid an error.  */
9416 #ifdef __cplusplus
9417 extern "C"
9418 #endif
9419 /* We use char because int might match the return type of a gcc2
9420    builtin and then its argument prototype would still apply.  */
9421 char $ac_func ();
9422 char (*f) ();
9423
9424 int
9425 main ()
9426 {
9427 /* The GNU C library defines this for functions which it implements
9428     to always fail with ENOSYS.  Some functions are actually named
9429     something starting with __ and the normal name is an alias.  */
9430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9431 choke me
9432 #else
9433 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9434 #endif
9435
9436   ;
9437   return 0;
9438 }
9439 _ACEOF
9440 rm -f conftest.$ac_objext conftest$ac_exeext
9441 if { (eval echo "$as_me:9441: \"$ac_link\"") >&5
9442   (eval $ac_link) 2>&5
9443   ac_status=$?
9444   echo "$as_me:9444: \$? = $ac_status" >&5
9445   (exit $ac_status); } &&
9446          { ac_try='test -s conftest$ac_exeext'
9447   { (eval echo "$as_me:9447: \"$ac_try\"") >&5
9448   (eval $ac_try) 2>&5
9449   ac_status=$?
9450   echo "$as_me:9450: \$? = $ac_status" >&5
9451   (exit $ac_status); }; }; then
9452   eval "$as_ac_var=yes"
9453 else
9454   echo "$as_me: failed program was:" >&5
9455 cat conftest.$ac_ext >&5
9456 eval "$as_ac_var=no"
9457 fi
9458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9459 fi
9460 echo "$as_me:9460: result: `eval echo '${'$as_ac_var'}'`" >&5
9461 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9462 if test `eval echo '${'$as_ac_var'}'` = yes; then
9463   cat >>confdefs.h <<EOF
9464 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9465 EOF
9466
9467 fi
9468 done
9469
9470         if test "x$ac_cv_func_putwc" != xyes ; then
9471
9472 echo "$as_me:9472: checking for multibyte character support" >&5
9473 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9474 if test "${cf_cv_utf8_lib+set}" = set; then
9475   echo $ECHO_N "(cached) $ECHO_C" >&6
9476 else
9477
9478         cf_save_LIBS="$LIBS"
9479         cat >conftest.$ac_ext <<_ACEOF
9480 #line 9480 "configure"
9481 #include "confdefs.h"
9482
9483 #include <stdlib.h>
9484 int
9485 main ()
9486 {
9487 putwc(0,0);
9488   ;
9489   return 0;
9490 }
9491 _ACEOF
9492 rm -f conftest.$ac_objext conftest$ac_exeext
9493 if { (eval echo "$as_me:9493: \"$ac_link\"") >&5
9494   (eval $ac_link) 2>&5
9495   ac_status=$?
9496   echo "$as_me:9496: \$? = $ac_status" >&5
9497   (exit $ac_status); } &&
9498          { ac_try='test -s conftest$ac_exeext'
9499   { (eval echo "$as_me:9499: \"$ac_try\"") >&5
9500   (eval $ac_try) 2>&5
9501   ac_status=$?
9502   echo "$as_me:9502: \$? = $ac_status" >&5
9503   (exit $ac_status); }; }; then
9504   cf_cv_utf8_lib=yes
9505 else
9506   echo "$as_me: failed program was:" >&5
9507 cat conftest.$ac_ext >&5
9508
9509 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9510 # will be set on completion of the AC_TRY_LINK below.
9511 cf_cv_header_path_utf8=
9512 cf_cv_library_path_utf8=
9513
9514 echo "${as_me:-configure}:9514: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9515
9516 cf_save_LIBS="$LIBS"
9517
9518 cat >conftest.$ac_ext <<_ACEOF
9519 #line 9519 "configure"
9520 #include "confdefs.h"
9521
9522 #include <libutf8.h>
9523 int
9524 main ()
9525 {
9526 putwc(0,0);
9527   ;
9528   return 0;
9529 }
9530 _ACEOF
9531 rm -f conftest.$ac_objext conftest$ac_exeext
9532 if { (eval echo "$as_me:9532: \"$ac_link\"") >&5
9533   (eval $ac_link) 2>&5
9534   ac_status=$?
9535   echo "$as_me:9535: \$? = $ac_status" >&5
9536   (exit $ac_status); } &&
9537          { ac_try='test -s conftest$ac_exeext'
9538   { (eval echo "$as_me:9538: \"$ac_try\"") >&5
9539   (eval $ac_try) 2>&5
9540   ac_status=$?
9541   echo "$as_me:9541: \$? = $ac_status" >&5
9542   (exit $ac_status); }; }; then
9543
9544         cf_cv_find_linkage_utf8=yes
9545         cf_cv_header_path_utf8=/usr/include
9546         cf_cv_library_path_utf8=/usr/lib
9547
9548 else
9549   echo "$as_me: failed program was:" >&5
9550 cat conftest.$ac_ext >&5
9551
9552 LIBS="-lutf8  $cf_save_LIBS"
9553
9554 cat >conftest.$ac_ext <<_ACEOF
9555 #line 9555 "configure"
9556 #include "confdefs.h"
9557
9558 #include <libutf8.h>
9559 int
9560 main ()
9561 {
9562 putwc(0,0);
9563   ;
9564   return 0;
9565 }
9566 _ACEOF
9567 rm -f conftest.$ac_objext conftest$ac_exeext
9568 if { (eval echo "$as_me:9568: \"$ac_link\"") >&5
9569   (eval $ac_link) 2>&5
9570   ac_status=$?
9571   echo "$as_me:9571: \$? = $ac_status" >&5
9572   (exit $ac_status); } &&
9573          { ac_try='test -s conftest$ac_exeext'
9574   { (eval echo "$as_me:9574: \"$ac_try\"") >&5
9575   (eval $ac_try) 2>&5
9576   ac_status=$?
9577   echo "$as_me:9577: \$? = $ac_status" >&5
9578   (exit $ac_status); }; }; then
9579
9580         cf_cv_find_linkage_utf8=yes
9581         cf_cv_header_path_utf8=/usr/include
9582         cf_cv_library_path_utf8=/usr/lib
9583         cf_cv_library_file_utf8="-lutf8"
9584
9585 else
9586   echo "$as_me: failed program was:" >&5
9587 cat conftest.$ac_ext >&5
9588
9589         cf_cv_find_linkage_utf8=no
9590         LIBS="$cf_save_LIBS"
9591
9592         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9593
9594 echo "${as_me:-configure}:9594: testing find linkage for utf8 library ..." 1>&5
9595
9596 echo "${as_me:-configure}:9596: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9597
9598         cf_save_CPPFLAGS="$CPPFLAGS"
9599         cf_test_CPPFLAGS="$CPPFLAGS"
9600
9601 cf_search=
9602
9603 # collect the current set of include-directories from compiler flags
9604 cf_header_path_list=""
9605 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9606         for cf_header_path in $CPPFLAGS $CFLAGS
9607         do
9608                 case $cf_header_path in
9609                 (-I*)
9610                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9611
9612 test "x$cf_header_path" != "xNONE" && \
9613 test -d "$cf_header_path" && \
9614  {
9615         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9616         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9617         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9618         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9619         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9620         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9621 }
9622
9623                         cf_header_path_list="$cf_header_path_list $cf_search"
9624                         ;;
9625                 esac
9626         done
9627 fi
9628
9629 # add the variations for the package we are looking for
9630
9631 cf_search=
9632
9633 test "x$prefix" != "xNONE" && \
9634 test -d "$prefix" && \
9635  {
9636         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9637         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9638         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9639         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9640         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9641         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9642 }
9643
9644 for cf_subdir_prefix in \
9645         /usr \
9646         /usr/local \
9647         /usr/pkg \
9648         /opt \
9649         /opt/local \
9650         $HOME
9651 do
9652
9653 test "x$cf_subdir_prefix" != "x$prefix" && \
9654 test -d "$cf_subdir_prefix" && \
9655 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9656         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9657         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9658         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9659         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9660         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9661         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9662 }
9663
9664 done
9665
9666 test "$includedir" != NONE && \
9667 test "$includedir" != "/usr/include" && \
9668 test -d "$includedir" && {
9669         test -d $includedir &&    cf_search="$cf_search $includedir"
9670         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9671 }
9672
9673 test "$oldincludedir" != NONE && \
9674 test "$oldincludedir" != "/usr/include" && \
9675 test -d "$oldincludedir" && {
9676         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9677         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9678 }
9679
9680 cf_search="$cf_search $cf_header_path_list"
9681
9682         for cf_cv_header_path_utf8 in $cf_search
9683         do
9684                 if test -d $cf_cv_header_path_utf8 ; then
9685                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9686
9687 echo "${as_me:-configure}:9687: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9688
9689                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9690                         cat >conftest.$ac_ext <<_ACEOF
9691 #line 9691 "configure"
9692 #include "confdefs.h"
9693
9694 #include <libutf8.h>
9695 int
9696 main ()
9697 {
9698 putwc(0,0);
9699   ;
9700   return 0;
9701 }
9702 _ACEOF
9703 rm -f conftest.$ac_objext
9704 if { (eval echo "$as_me:9704: \"$ac_compile\"") >&5
9705   (eval $ac_compile) 2>&5
9706   ac_status=$?
9707   echo "$as_me:9707: \$? = $ac_status" >&5
9708   (exit $ac_status); } &&
9709          { ac_try='test -s conftest.$ac_objext'
9710   { (eval echo "$as_me:9710: \"$ac_try\"") >&5
9711   (eval $ac_try) 2>&5
9712   ac_status=$?
9713   echo "$as_me:9713: \$? = $ac_status" >&5
9714   (exit $ac_status); }; }; then
9715
9716                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9717
9718 echo "${as_me:-configure}:9718: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9719
9720                                 cf_cv_find_linkage_utf8=maybe
9721                                 cf_test_CPPFLAGS="$CPPFLAGS"
9722                                 break
9723 else
9724   echo "$as_me: failed program was:" >&5
9725 cat conftest.$ac_ext >&5
9726
9727                                 CPPFLAGS="$cf_save_CPPFLAGS"
9728
9729 fi
9730 rm -f conftest.$ac_objext conftest.$ac_ext
9731                 fi
9732         done
9733
9734         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9735
9736 echo "${as_me:-configure}:9736: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9737
9738                 cf_save_LIBS="$LIBS"
9739                 cf_save_LDFLAGS="$LDFLAGS"
9740
9741                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9742
9743 cf_search=
9744 cf_library_path_list=""
9745 if test -n "${LDFLAGS}${LIBS}" ; then
9746         for cf_library_path in $LDFLAGS $LIBS
9747         do
9748                 case $cf_library_path in
9749                 (-L*)
9750                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9751
9752 test "x$cf_library_path" != "xNONE" && \
9753 test -d "$cf_library_path" && \
9754  {
9755         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9756         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9757         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9758         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9759         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9760         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9761 }
9762
9763                         cf_library_path_list="$cf_library_path_list $cf_search"
9764                         ;;
9765                 esac
9766         done
9767 fi
9768
9769 cf_search=
9770
9771 test "x$prefix" != "xNONE" && \
9772 test -d "$prefix" && \
9773  {
9774         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9775         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9776         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9777         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9778         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9779         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9780 }
9781
9782 for cf_subdir_prefix in \
9783         /usr \
9784         /usr/local \
9785         /usr/pkg \
9786         /opt \
9787         /opt/local \
9788         $HOME
9789 do
9790
9791 test "x$cf_subdir_prefix" != "x$prefix" && \
9792 test -d "$cf_subdir_prefix" && \
9793 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9794         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9795         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9796         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9797         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9798         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9799         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9800 }
9801
9802 done
9803
9804 cf_search="$cf_library_path_list $cf_search"
9805
9806                         for cf_cv_library_path_utf8 in $cf_search
9807                         do
9808                                 if test -d $cf_cv_library_path_utf8 ; then
9809                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
9810
9811 echo "${as_me:-configure}:9811: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9812
9813                                         CPPFLAGS="$cf_test_CPPFLAGS"
9814                                         LIBS="-lutf8  $cf_save_LIBS"
9815                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9816                                         cat >conftest.$ac_ext <<_ACEOF
9817 #line 9817 "configure"
9818 #include "confdefs.h"
9819
9820 #include <libutf8.h>
9821 int
9822 main ()
9823 {
9824 putwc(0,0);
9825   ;
9826   return 0;
9827 }
9828 _ACEOF
9829 rm -f conftest.$ac_objext conftest$ac_exeext
9830 if { (eval echo "$as_me:9830: \"$ac_link\"") >&5
9831   (eval $ac_link) 2>&5
9832   ac_status=$?
9833   echo "$as_me:9833: \$? = $ac_status" >&5
9834   (exit $ac_status); } &&
9835          { ac_try='test -s conftest$ac_exeext'
9836   { (eval echo "$as_me:9836: \"$ac_try\"") >&5
9837   (eval $ac_try) 2>&5
9838   ac_status=$?
9839   echo "$as_me:9839: \$? = $ac_status" >&5
9840   (exit $ac_status); }; }; then
9841
9842                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9843
9844 echo "${as_me:-configure}:9844: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9845
9846                                         cf_cv_find_linkage_utf8=yes
9847                                         cf_cv_library_file_utf8="-lutf8"
9848                                         break
9849 else
9850   echo "$as_me: failed program was:" >&5
9851 cat conftest.$ac_ext >&5
9852
9853                                         CPPFLAGS="$cf_save_CPPFLAGS"
9854                                         LIBS="$cf_save_LIBS"
9855                                         LDFLAGS="$cf_save_LDFLAGS"
9856
9857 fi
9858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9859                                 fi
9860                         done
9861                         CPPFLAGS="$cf_save_CPPFLAGS"
9862                         LDFLAGS="$cf_save_LDFLAGS"
9863                 fi
9864
9865         else
9866                 cf_cv_find_linkage_utf8=no
9867         fi
9868
9869 fi
9870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9871
9872 fi
9873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9874
9875 LIBS="$cf_save_LIBS"
9876
9877 if test "$cf_cv_find_linkage_utf8" = yes ; then
9878 cf_cv_utf8_lib=add-on
9879 else
9880 cf_cv_utf8_lib=no
9881 fi
9882
9883 fi
9884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9885 fi
9886 echo "$as_me:9886: result: $cf_cv_utf8_lib" >&5
9887 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9888
9889 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9890 # ncurses/ncursesw:
9891 if test "$cf_cv_utf8_lib" = "add-on" ; then
9892
9893 cat >>confdefs.h <<\EOF
9894 #define HAVE_LIBUTF8_H 1
9895 EOF
9896
9897 if test -n "$cf_cv_header_path_utf8" ; then
9898   for cf_add_incdir in $cf_cv_header_path_utf8
9899   do
9900         while test $cf_add_incdir != /usr/include
9901         do
9902           if test -d $cf_add_incdir
9903           then
9904                 cf_have_incdir=no
9905                 if test -n "$CFLAGS$CPPFLAGS" ; then
9906                   # a loop is needed to ensure we can add subdirs of existing dirs
9907                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9908                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9909                           cf_have_incdir=yes; break
9910                         fi
9911                   done
9912                 fi
9913
9914                 if test "$cf_have_incdir" = no ; then
9915                   if test "$cf_add_incdir" = /usr/local/include ; then
9916                         if test "$GCC" = yes
9917                         then
9918                           cf_save_CPPFLAGS=$CPPFLAGS
9919                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9920                           cat >conftest.$ac_ext <<_ACEOF
9921 #line 9921 "configure"
9922 #include "confdefs.h"
9923 #include <stdio.h>
9924 int
9925 main ()
9926 {
9927 printf("Hello")
9928   ;
9929   return 0;
9930 }
9931 _ACEOF
9932 rm -f conftest.$ac_objext
9933 if { (eval echo "$as_me:9933: \"$ac_compile\"") >&5
9934   (eval $ac_compile) 2>&5
9935   ac_status=$?
9936   echo "$as_me:9936: \$? = $ac_status" >&5
9937   (exit $ac_status); } &&
9938          { ac_try='test -s conftest.$ac_objext'
9939   { (eval echo "$as_me:9939: \"$ac_try\"") >&5
9940   (eval $ac_try) 2>&5
9941   ac_status=$?
9942   echo "$as_me:9942: \$? = $ac_status" >&5
9943   (exit $ac_status); }; }; then
9944   :
9945 else
9946   echo "$as_me: failed program was:" >&5
9947 cat conftest.$ac_ext >&5
9948 cf_have_incdir=yes
9949 fi
9950 rm -f conftest.$ac_objext conftest.$ac_ext
9951                           CPPFLAGS=$cf_save_CPPFLAGS
9952                         fi
9953                   fi
9954                 fi
9955
9956                 if test "$cf_have_incdir" = no ; then
9957                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9958
9959 echo "${as_me:-configure}:9959: testing adding $cf_add_incdir to include-path ..." 1>&5
9960
9961                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9962
9963                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9964                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9965                   cf_add_incdir="$cf_top_incdir"
9966                 else
9967                   break
9968                 fi
9969           else
9970                 break
9971           fi
9972         done
9973   done
9974 fi
9975
9976 if test -n "$cf_cv_library_path_utf8" ; then
9977         for cf_add_libdir in $cf_cv_library_path_utf8
9978         do
9979                 if test $cf_add_libdir = /usr/lib ; then
9980                         :
9981                 elif test -d $cf_add_libdir
9982                 then
9983                         cf_have_libdir=no
9984                         if test -n "$LDFLAGS$LIBS" ; then
9985                                 # a loop is needed to ensure we can add subdirs of existing dirs
9986                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
9987                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9988                                                 cf_have_libdir=yes; break
9989                                         fi
9990                                 done
9991                         fi
9992                         if test "$cf_have_libdir" = no ; then
9993                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9994
9995 echo "${as_me:-configure}:9995: testing adding $cf_add_libdir to library-path ..." 1>&5
9996
9997                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9998                         fi
9999                 fi
10000         done
10001 fi
10002
10003 cf_add_libs="$cf_cv_library_file_utf8"
10004 # Filter out duplicates - this happens with badly-designed ".pc" files...
10005 for cf_add_1lib in $LIBS
10006 do
10007         for cf_add_2lib in $cf_add_libs
10008         do
10009                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
10010                 then
10011                         cf_add_1lib=
10012                         break
10013                 fi
10014         done
10015         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10016 done
10017 LIBS="$cf_add_libs"
10018
10019 fi
10020
10021                 if test "$cf_cv_utf8_lib" != no ; then
10022                         NCURSES_LIBUTF8=1
10023                 fi
10024         fi
10025
10026 # This is needed on Tru64 5.0 to declare mbstate_t
10027 echo "$as_me:10027: checking if we must include wchar.h to declare mbstate_t" >&5
10028 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
10029 if test "${cf_cv_mbstate_t+set}" = set; then
10030   echo $ECHO_N "(cached) $ECHO_C" >&6
10031 else
10032
10033 cat >conftest.$ac_ext <<_ACEOF
10034 #line 10034 "configure"
10035 #include "confdefs.h"
10036
10037 #include <stdlib.h>
10038 #include <stdarg.h>
10039 #include <stdio.h>
10040 #ifdef HAVE_LIBUTF8_H
10041 #include <libutf8.h>
10042 #endif
10043 int
10044 main ()
10045 {
10046 mbstate_t state
10047   ;
10048   return 0;
10049 }
10050 _ACEOF
10051 rm -f conftest.$ac_objext
10052 if { (eval echo "$as_me:10052: \"$ac_compile\"") >&5
10053   (eval $ac_compile) 2>&5
10054   ac_status=$?
10055   echo "$as_me:10055: \$? = $ac_status" >&5
10056   (exit $ac_status); } &&
10057          { ac_try='test -s conftest.$ac_objext'
10058   { (eval echo "$as_me:10058: \"$ac_try\"") >&5
10059   (eval $ac_try) 2>&5
10060   ac_status=$?
10061   echo "$as_me:10061: \$? = $ac_status" >&5
10062   (exit $ac_status); }; }; then
10063   cf_cv_mbstate_t=no
10064 else
10065   echo "$as_me: failed program was:" >&5
10066 cat conftest.$ac_ext >&5
10067 cat >conftest.$ac_ext <<_ACEOF
10068 #line 10068 "configure"
10069 #include "confdefs.h"
10070
10071 #include <stdlib.h>
10072 #include <stdarg.h>
10073 #include <stdio.h>
10074 #include <wchar.h>
10075 #ifdef HAVE_LIBUTF8_H
10076 #include <libutf8.h>
10077 #endif
10078 int
10079 main ()
10080 {
10081 mbstate_t value
10082   ;
10083   return 0;
10084 }
10085 _ACEOF
10086 rm -f conftest.$ac_objext
10087 if { (eval echo "$as_me:10087: \"$ac_compile\"") >&5
10088   (eval $ac_compile) 2>&5
10089   ac_status=$?
10090   echo "$as_me:10090: \$? = $ac_status" >&5
10091   (exit $ac_status); } &&
10092          { ac_try='test -s conftest.$ac_objext'
10093   { (eval echo "$as_me:10093: \"$ac_try\"") >&5
10094   (eval $ac_try) 2>&5
10095   ac_status=$?
10096   echo "$as_me:10096: \$? = $ac_status" >&5
10097   (exit $ac_status); }; }; then
10098   cf_cv_mbstate_t=yes
10099 else
10100   echo "$as_me: failed program was:" >&5
10101 cat conftest.$ac_ext >&5
10102 cf_cv_mbstate_t=unknown
10103 fi
10104 rm -f conftest.$ac_objext conftest.$ac_ext
10105 fi
10106 rm -f conftest.$ac_objext conftest.$ac_ext
10107 fi
10108 echo "$as_me:10108: result: $cf_cv_mbstate_t" >&5
10109 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10110
10111 if test "$cf_cv_mbstate_t" = yes ; then
10112
10113 cat >>confdefs.h <<\EOF
10114 #define NEED_WCHAR_H 1
10115 EOF
10116
10117         NEED_WCHAR_H=1
10118 fi
10119
10120 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10121 if test "$cf_cv_mbstate_t" = unknown ; then
10122         NCURSES_MBSTATE_T=1
10123 fi
10124
10125 # This is needed on Tru64 5.0 to declare wchar_t
10126 echo "$as_me:10126: checking if we must include wchar.h to declare wchar_t" >&5
10127 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10128 if test "${cf_cv_wchar_t+set}" = set; then
10129   echo $ECHO_N "(cached) $ECHO_C" >&6
10130 else
10131
10132 cat >conftest.$ac_ext <<_ACEOF
10133 #line 10133 "configure"
10134 #include "confdefs.h"
10135
10136 #include <stdlib.h>
10137 #include <stdarg.h>
10138 #include <stdio.h>
10139 #ifdef HAVE_LIBUTF8_H
10140 #include <libutf8.h>
10141 #endif
10142 int
10143 main ()
10144 {
10145 wchar_t state
10146   ;
10147   return 0;
10148 }
10149 _ACEOF
10150 rm -f conftest.$ac_objext
10151 if { (eval echo "$as_me:10151: \"$ac_compile\"") >&5
10152   (eval $ac_compile) 2>&5
10153   ac_status=$?
10154   echo "$as_me:10154: \$? = $ac_status" >&5
10155   (exit $ac_status); } &&
10156          { ac_try='test -s conftest.$ac_objext'
10157   { (eval echo "$as_me:10157: \"$ac_try\"") >&5
10158   (eval $ac_try) 2>&5
10159   ac_status=$?
10160   echo "$as_me:10160: \$? = $ac_status" >&5
10161   (exit $ac_status); }; }; then
10162   cf_cv_wchar_t=no
10163 else
10164   echo "$as_me: failed program was:" >&5
10165 cat conftest.$ac_ext >&5
10166 cat >conftest.$ac_ext <<_ACEOF
10167 #line 10167 "configure"
10168 #include "confdefs.h"
10169
10170 #include <stdlib.h>
10171 #include <stdarg.h>
10172 #include <stdio.h>
10173 #include <wchar.h>
10174 #ifdef HAVE_LIBUTF8_H
10175 #include <libutf8.h>
10176 #endif
10177 int
10178 main ()
10179 {
10180 wchar_t value
10181   ;
10182   return 0;
10183 }
10184 _ACEOF
10185 rm -f conftest.$ac_objext
10186 if { (eval echo "$as_me:10186: \"$ac_compile\"") >&5
10187   (eval $ac_compile) 2>&5
10188   ac_status=$?
10189   echo "$as_me:10189: \$? = $ac_status" >&5
10190   (exit $ac_status); } &&
10191          { ac_try='test -s conftest.$ac_objext'
10192   { (eval echo "$as_me:10192: \"$ac_try\"") >&5
10193   (eval $ac_try) 2>&5
10194   ac_status=$?
10195   echo "$as_me:10195: \$? = $ac_status" >&5
10196   (exit $ac_status); }; }; then
10197   cf_cv_wchar_t=yes
10198 else
10199   echo "$as_me: failed program was:" >&5
10200 cat conftest.$ac_ext >&5
10201 cf_cv_wchar_t=unknown
10202 fi
10203 rm -f conftest.$ac_objext conftest.$ac_ext
10204 fi
10205 rm -f conftest.$ac_objext conftest.$ac_ext
10206 fi
10207 echo "$as_me:10207: result: $cf_cv_wchar_t" >&5
10208 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10209
10210 if test "$cf_cv_wchar_t" = yes ; then
10211
10212 cat >>confdefs.h <<\EOF
10213 #define NEED_WCHAR_H 1
10214 EOF
10215
10216         NEED_WCHAR_H=1
10217 fi
10218
10219 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10220 if test "$cf_cv_wchar_t" = unknown ; then
10221         NCURSES_WCHAR_T=1
10222 fi
10223
10224 # if we find wchar_t in either place, use substitution to provide a fallback.
10225 if test "$cf_cv_wchar_t" != unknown ; then
10226         NCURSES_OK_WCHAR_T=1
10227 fi
10228
10229 # This is needed on Tru64 5.0 to declare wint_t
10230 echo "$as_me:10230: checking if we must include wchar.h to declare wint_t" >&5
10231 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10232 if test "${cf_cv_wint_t+set}" = set; then
10233   echo $ECHO_N "(cached) $ECHO_C" >&6
10234 else
10235
10236 cat >conftest.$ac_ext <<_ACEOF
10237 #line 10237 "configure"
10238 #include "confdefs.h"
10239
10240 #include <stdlib.h>
10241 #include <stdarg.h>
10242 #include <stdio.h>
10243 #ifdef HAVE_LIBUTF8_H
10244 #include <libutf8.h>
10245 #endif
10246 int
10247 main ()
10248 {
10249 wint_t state
10250   ;
10251   return 0;
10252 }
10253 _ACEOF
10254 rm -f conftest.$ac_objext
10255 if { (eval echo "$as_me:10255: \"$ac_compile\"") >&5
10256   (eval $ac_compile) 2>&5
10257   ac_status=$?
10258   echo "$as_me:10258: \$? = $ac_status" >&5
10259   (exit $ac_status); } &&
10260          { ac_try='test -s conftest.$ac_objext'
10261   { (eval echo "$as_me:10261: \"$ac_try\"") >&5
10262   (eval $ac_try) 2>&5
10263   ac_status=$?
10264   echo "$as_me:10264: \$? = $ac_status" >&5
10265   (exit $ac_status); }; }; then
10266   cf_cv_wint_t=no
10267 else
10268   echo "$as_me: failed program was:" >&5
10269 cat conftest.$ac_ext >&5
10270 cat >conftest.$ac_ext <<_ACEOF
10271 #line 10271 "configure"
10272 #include "confdefs.h"
10273
10274 #include <stdlib.h>
10275 #include <stdarg.h>
10276 #include <stdio.h>
10277 #include <wchar.h>
10278 #ifdef HAVE_LIBUTF8_H
10279 #include <libutf8.h>
10280 #endif
10281 int
10282 main ()
10283 {
10284 wint_t value
10285   ;
10286   return 0;
10287 }
10288 _ACEOF
10289 rm -f conftest.$ac_objext
10290 if { (eval echo "$as_me:10290: \"$ac_compile\"") >&5
10291   (eval $ac_compile) 2>&5
10292   ac_status=$?
10293   echo "$as_me:10293: \$? = $ac_status" >&5
10294   (exit $ac_status); } &&
10295          { ac_try='test -s conftest.$ac_objext'
10296   { (eval echo "$as_me:10296: \"$ac_try\"") >&5
10297   (eval $ac_try) 2>&5
10298   ac_status=$?
10299   echo "$as_me:10299: \$? = $ac_status" >&5
10300   (exit $ac_status); }; }; then
10301   cf_cv_wint_t=yes
10302 else
10303   echo "$as_me: failed program was:" >&5
10304 cat conftest.$ac_ext >&5
10305 cf_cv_wint_t=unknown
10306 fi
10307 rm -f conftest.$ac_objext conftest.$ac_ext
10308 fi
10309 rm -f conftest.$ac_objext conftest.$ac_ext
10310 fi
10311 echo "$as_me:10311: result: $cf_cv_wint_t" >&5
10312 echo "${ECHO_T}$cf_cv_wint_t" >&6
10313
10314 if test "$cf_cv_wint_t" = yes ; then
10315
10316 cat >>confdefs.h <<\EOF
10317 #define NEED_WCHAR_H 1
10318 EOF
10319
10320         NEED_WCHAR_H=1
10321 fi
10322
10323 # if we do not find wint_t in either place, use substitution to provide a fallback.
10324 if test "$cf_cv_wint_t" = unknown ; then
10325         NCURSES_WINT_T=1
10326 fi
10327
10328 # if we find wint_t in either place, use substitution to provide a fallback.
10329 if test "$cf_cv_wint_t" != unknown ; then
10330         NCURSES_OK_WINT_T=1
10331 fi
10332
10333         if test "$NCURSES_MBSTATE_T" != 0; then
10334
10335 cat >>confdefs.h <<\EOF
10336 #define NEED_MBSTATE_T_DEF 1
10337 EOF
10338
10339         fi
10340 fi
10341
10342 ###   use option --disable-lp64 to allow long chtype
10343 echo "$as_me:10343: checking whether to enable _LP64 definition in curses.h" >&5
10344 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10345
10346 # Check whether --enable-lp64 or --disable-lp64 was given.
10347 if test "${enable_lp64+set}" = set; then
10348   enableval="$enable_lp64"
10349   with_lp64=$enableval
10350 else
10351   with_lp64=$cf_dft_with_lp64
10352 fi;
10353 echo "$as_me:10353: result: $with_lp64" >&5
10354 echo "${ECHO_T}$with_lp64" >&6
10355
10356 if test "x$with_lp64" = xyes ; then
10357         cf_cv_enable_lp64=1
10358 else
10359         cf_cv_enable_lp64=0
10360 fi
10361
10362 # Check whether --enable-largefile or --disable-largefile was given.
10363 if test "${enable_largefile+set}" = set; then
10364   enableval="$enable_largefile"
10365
10366 fi;
10367 if test "$enable_largefile" != no; then
10368
10369   echo "$as_me:10369: checking for special C compiler options needed for large files" >&5
10370 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10371 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10372   echo $ECHO_N "(cached) $ECHO_C" >&6
10373 else
10374   ac_cv_sys_largefile_CC=no
10375      if test "$GCC" != yes; then
10376        ac_save_CC=$CC
10377        while :; do
10378          # IRIX 6.2 and later do not support large files by default,
10379          # so use the C compiler's -n32 option if that helps.
10380          cat >conftest.$ac_ext <<_ACEOF
10381 #line 10381 "configure"
10382 #include "confdefs.h"
10383 #include <sys/types.h>
10384  /* Check that off_t can represent 2**63 - 1 correctly.
10385     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10386     since some C++ compilers masquerading as C compilers
10387     incorrectly reject 9223372036854775807.  */
10388 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10389   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10390                        && LARGE_OFF_T % 2147483647 == 1)
10391                       ? 1 : -1];
10392 int
10393 main ()
10394 {
10395
10396   ;
10397   return 0;
10398 }
10399 _ACEOF
10400          rm -f conftest.$ac_objext
10401 if { (eval echo "$as_me:10401: \"$ac_compile\"") >&5
10402   (eval $ac_compile) 2>&5
10403   ac_status=$?
10404   echo "$as_me:10404: \$? = $ac_status" >&5
10405   (exit $ac_status); } &&
10406          { ac_try='test -s conftest.$ac_objext'
10407   { (eval echo "$as_me:10407: \"$ac_try\"") >&5
10408   (eval $ac_try) 2>&5
10409   ac_status=$?
10410   echo "$as_me:10410: \$? = $ac_status" >&5
10411   (exit $ac_status); }; }; then
10412   break
10413 else
10414   echo "$as_me: failed program was:" >&5
10415 cat conftest.$ac_ext >&5
10416 fi
10417 rm -f conftest.$ac_objext
10418          CC="$CC -n32"
10419          rm -f conftest.$ac_objext
10420 if { (eval echo "$as_me:10420: \"$ac_compile\"") >&5
10421   (eval $ac_compile) 2>&5
10422   ac_status=$?
10423   echo "$as_me:10423: \$? = $ac_status" >&5
10424   (exit $ac_status); } &&
10425          { ac_try='test -s conftest.$ac_objext'
10426   { (eval echo "$as_me:10426: \"$ac_try\"") >&5
10427   (eval $ac_try) 2>&5
10428   ac_status=$?
10429   echo "$as_me:10429: \$? = $ac_status" >&5
10430   (exit $ac_status); }; }; then
10431   ac_cv_sys_largefile_CC=' -n32'; break
10432 else
10433   echo "$as_me: failed program was:" >&5
10434 cat conftest.$ac_ext >&5
10435 fi
10436 rm -f conftest.$ac_objext
10437          break
10438        done
10439        CC=$ac_save_CC
10440        rm -f conftest.$ac_ext
10441     fi
10442 fi
10443 echo "$as_me:10443: result: $ac_cv_sys_largefile_CC" >&5
10444 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10445   if test "$ac_cv_sys_largefile_CC" != no; then
10446     CC=$CC$ac_cv_sys_largefile_CC
10447   fi
10448
10449   echo "$as_me:10449: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10450 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10451 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10452   echo $ECHO_N "(cached) $ECHO_C" >&6
10453 else
10454   while :; do
10455   ac_cv_sys_file_offset_bits=no
10456   cat >conftest.$ac_ext <<_ACEOF
10457 #line 10457 "configure"
10458 #include "confdefs.h"
10459 #include <sys/types.h>
10460  /* Check that off_t can represent 2**63 - 1 correctly.
10461     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10462     since some C++ compilers masquerading as C compilers
10463     incorrectly reject 9223372036854775807.  */
10464 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10465   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10466                        && LARGE_OFF_T % 2147483647 == 1)
10467                       ? 1 : -1];
10468 int
10469 main ()
10470 {
10471
10472   ;
10473   return 0;
10474 }
10475 _ACEOF
10476 rm -f conftest.$ac_objext
10477 if { (eval echo "$as_me:10477: \"$ac_compile\"") >&5
10478   (eval $ac_compile) 2>&5
10479   ac_status=$?
10480   echo "$as_me:10480: \$? = $ac_status" >&5
10481   (exit $ac_status); } &&
10482          { ac_try='test -s conftest.$ac_objext'
10483   { (eval echo "$as_me:10483: \"$ac_try\"") >&5
10484   (eval $ac_try) 2>&5
10485   ac_status=$?
10486   echo "$as_me:10486: \$? = $ac_status" >&5
10487   (exit $ac_status); }; }; then
10488   break
10489 else
10490   echo "$as_me: failed program was:" >&5
10491 cat conftest.$ac_ext >&5
10492 fi
10493 rm -f conftest.$ac_objext conftest.$ac_ext
10494   cat >conftest.$ac_ext <<_ACEOF
10495 #line 10495 "configure"
10496 #include "confdefs.h"
10497 #define _FILE_OFFSET_BITS 64
10498 #include <sys/types.h>
10499  /* Check that off_t can represent 2**63 - 1 correctly.
10500     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10501     since some C++ compilers masquerading as C compilers
10502     incorrectly reject 9223372036854775807.  */
10503 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10504   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10505                        && LARGE_OFF_T % 2147483647 == 1)
10506                       ? 1 : -1];
10507 int
10508 main ()
10509 {
10510
10511   ;
10512   return 0;
10513 }
10514 _ACEOF
10515 rm -f conftest.$ac_objext
10516 if { (eval echo "$as_me:10516: \"$ac_compile\"") >&5
10517   (eval $ac_compile) 2>&5
10518   ac_status=$?
10519   echo "$as_me:10519: \$? = $ac_status" >&5
10520   (exit $ac_status); } &&
10521          { ac_try='test -s conftest.$ac_objext'
10522   { (eval echo "$as_me:10522: \"$ac_try\"") >&5
10523   (eval $ac_try) 2>&5
10524   ac_status=$?
10525   echo "$as_me:10525: \$? = $ac_status" >&5
10526   (exit $ac_status); }; }; then
10527   ac_cv_sys_file_offset_bits=64; break
10528 else
10529   echo "$as_me: failed program was:" >&5
10530 cat conftest.$ac_ext >&5
10531 fi
10532 rm -f conftest.$ac_objext conftest.$ac_ext
10533   break
10534 done
10535 fi
10536 echo "$as_me:10536: result: $ac_cv_sys_file_offset_bits" >&5
10537 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10538 if test "$ac_cv_sys_file_offset_bits" != no; then
10539
10540 cat >>confdefs.h <<EOF
10541 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10542 EOF
10543
10544 fi
10545 rm -rf conftest*
10546   echo "$as_me:10546: checking for _LARGE_FILES value needed for large files" >&5
10547 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10548 if test "${ac_cv_sys_large_files+set}" = set; then
10549   echo $ECHO_N "(cached) $ECHO_C" >&6
10550 else
10551   while :; do
10552   ac_cv_sys_large_files=no
10553   cat >conftest.$ac_ext <<_ACEOF
10554 #line 10554 "configure"
10555 #include "confdefs.h"
10556 #include <sys/types.h>
10557  /* Check that off_t can represent 2**63 - 1 correctly.
10558     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10559     since some C++ compilers masquerading as C compilers
10560     incorrectly reject 9223372036854775807.  */
10561 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10562   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10563                        && LARGE_OFF_T % 2147483647 == 1)
10564                       ? 1 : -1];
10565 int
10566 main ()
10567 {
10568
10569   ;
10570   return 0;
10571 }
10572 _ACEOF
10573 rm -f conftest.$ac_objext
10574 if { (eval echo "$as_me:10574: \"$ac_compile\"") >&5
10575   (eval $ac_compile) 2>&5
10576   ac_status=$?
10577   echo "$as_me:10577: \$? = $ac_status" >&5
10578   (exit $ac_status); } &&
10579          { ac_try='test -s conftest.$ac_objext'
10580   { (eval echo "$as_me:10580: \"$ac_try\"") >&5
10581   (eval $ac_try) 2>&5
10582   ac_status=$?
10583   echo "$as_me:10583: \$? = $ac_status" >&5
10584   (exit $ac_status); }; }; then
10585   break
10586 else
10587   echo "$as_me: failed program was:" >&5
10588 cat conftest.$ac_ext >&5
10589 fi
10590 rm -f conftest.$ac_objext conftest.$ac_ext
10591   cat >conftest.$ac_ext <<_ACEOF
10592 #line 10592 "configure"
10593 #include "confdefs.h"
10594 #define _LARGE_FILES 1
10595 #include <sys/types.h>
10596  /* Check that off_t can represent 2**63 - 1 correctly.
10597     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10598     since some C++ compilers masquerading as C compilers
10599     incorrectly reject 9223372036854775807.  */
10600 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10601   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10602                        && LARGE_OFF_T % 2147483647 == 1)
10603                       ? 1 : -1];
10604 int
10605 main ()
10606 {
10607
10608   ;
10609   return 0;
10610 }
10611 _ACEOF
10612 rm -f conftest.$ac_objext
10613 if { (eval echo "$as_me:10613: \"$ac_compile\"") >&5
10614   (eval $ac_compile) 2>&5
10615   ac_status=$?
10616   echo "$as_me:10616: \$? = $ac_status" >&5
10617   (exit $ac_status); } &&
10618          { ac_try='test -s conftest.$ac_objext'
10619   { (eval echo "$as_me:10619: \"$ac_try\"") >&5
10620   (eval $ac_try) 2>&5
10621   ac_status=$?
10622   echo "$as_me:10622: \$? = $ac_status" >&5
10623   (exit $ac_status); }; }; then
10624   ac_cv_sys_large_files=1; break
10625 else
10626   echo "$as_me: failed program was:" >&5
10627 cat conftest.$ac_ext >&5
10628 fi
10629 rm -f conftest.$ac_objext conftest.$ac_ext
10630   break
10631 done
10632 fi
10633 echo "$as_me:10633: result: $ac_cv_sys_large_files" >&5
10634 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10635 if test "$ac_cv_sys_large_files" != no; then
10636
10637 cat >>confdefs.h <<EOF
10638 #define _LARGE_FILES $ac_cv_sys_large_files
10639 EOF
10640
10641 fi
10642 rm -rf conftest*
10643 fi
10644
10645         if test "$enable_largefile" != no ; then
10646         echo "$as_me:10646: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10647 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10648 if test "${ac_cv_sys_largefile_source+set}" = set; then
10649   echo $ECHO_N "(cached) $ECHO_C" >&6
10650 else
10651   while :; do
10652   ac_cv_sys_largefile_source=no
10653   cat >conftest.$ac_ext <<_ACEOF
10654 #line 10654 "configure"
10655 #include "confdefs.h"
10656 #include <stdio.h>
10657 int
10658 main ()
10659 {
10660 return !fseeko;
10661   ;
10662   return 0;
10663 }
10664 _ACEOF
10665 rm -f conftest.$ac_objext
10666 if { (eval echo "$as_me:10666: \"$ac_compile\"") >&5
10667   (eval $ac_compile) 2>&5
10668   ac_status=$?
10669   echo "$as_me:10669: \$? = $ac_status" >&5
10670   (exit $ac_status); } &&
10671          { ac_try='test -s conftest.$ac_objext'
10672   { (eval echo "$as_me:10672: \"$ac_try\"") >&5
10673   (eval $ac_try) 2>&5
10674   ac_status=$?
10675   echo "$as_me:10675: \$? = $ac_status" >&5
10676   (exit $ac_status); }; }; then
10677   break
10678 else
10679   echo "$as_me: failed program was:" >&5
10680 cat conftest.$ac_ext >&5
10681 fi
10682 rm -f conftest.$ac_objext conftest.$ac_ext
10683   cat >conftest.$ac_ext <<_ACEOF
10684 #line 10684 "configure"
10685 #include "confdefs.h"
10686 #define _LARGEFILE_SOURCE 1
10687 #include <stdio.h>
10688 int
10689 main ()
10690 {
10691 return !fseeko;
10692   ;
10693   return 0;
10694 }
10695 _ACEOF
10696 rm -f conftest.$ac_objext
10697 if { (eval echo "$as_me:10697: \"$ac_compile\"") >&5
10698   (eval $ac_compile) 2>&5
10699   ac_status=$?
10700   echo "$as_me:10700: \$? = $ac_status" >&5
10701   (exit $ac_status); } &&
10702          { ac_try='test -s conftest.$ac_objext'
10703   { (eval echo "$as_me:10703: \"$ac_try\"") >&5
10704   (eval $ac_try) 2>&5
10705   ac_status=$?
10706   echo "$as_me:10706: \$? = $ac_status" >&5
10707   (exit $ac_status); }; }; then
10708   ac_cv_sys_largefile_source=1; break
10709 else
10710   echo "$as_me: failed program was:" >&5
10711 cat conftest.$ac_ext >&5
10712 fi
10713 rm -f conftest.$ac_objext conftest.$ac_ext
10714   break
10715 done
10716 fi
10717 echo "$as_me:10717: result: $ac_cv_sys_largefile_source" >&5
10718 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10719 if test "$ac_cv_sys_largefile_source" != no; then
10720
10721 cat >>confdefs.h <<EOF
10722 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10723 EOF
10724
10725 fi
10726 rm -rf conftest*
10727
10728 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10729 # in glibc 2.1.3, but that breaks too many other things.
10730 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10731 echo "$as_me:10731: checking for fseeko" >&5
10732 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10733 if test "${ac_cv_func_fseeko+set}" = set; then
10734   echo $ECHO_N "(cached) $ECHO_C" >&6
10735 else
10736   cat >conftest.$ac_ext <<_ACEOF
10737 #line 10737 "configure"
10738 #include "confdefs.h"
10739 #include <stdio.h>
10740 int
10741 main ()
10742 {
10743 return fseeko && fseeko (stdin, 0, 0);
10744   ;
10745   return 0;
10746 }
10747 _ACEOF
10748 rm -f conftest.$ac_objext conftest$ac_exeext
10749 if { (eval echo "$as_me:10749: \"$ac_link\"") >&5
10750   (eval $ac_link) 2>&5
10751   ac_status=$?
10752   echo "$as_me:10752: \$? = $ac_status" >&5
10753   (exit $ac_status); } &&
10754          { ac_try='test -s conftest$ac_exeext'
10755   { (eval echo "$as_me:10755: \"$ac_try\"") >&5
10756   (eval $ac_try) 2>&5
10757   ac_status=$?
10758   echo "$as_me:10758: \$? = $ac_status" >&5
10759   (exit $ac_status); }; }; then
10760   ac_cv_func_fseeko=yes
10761 else
10762   echo "$as_me: failed program was:" >&5
10763 cat conftest.$ac_ext >&5
10764 ac_cv_func_fseeko=no
10765 fi
10766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10767 fi
10768 echo "$as_me:10768: result: $ac_cv_func_fseeko" >&5
10769 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10770 if test $ac_cv_func_fseeko = yes; then
10771
10772 cat >>confdefs.h <<\EOF
10773 #define HAVE_FSEEKO 1
10774 EOF
10775
10776 fi
10777
10778         # Normally we would collect these definitions in the config.h,
10779         # but (like _XOPEN_SOURCE), some environments rely on having these
10780         # defined before any of the system headers are included.  Another
10781         # case comes up with C++, e.g., on AIX the compiler compiles the
10782         # header files by themselves before looking at the body files it is
10783         # told to compile.  For ncurses, those header files do not include
10784         # the config.h
10785         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10786         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10787         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10788
10789         echo "$as_me:10789: checking whether to use struct dirent64" >&5
10790 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10791 if test "${cf_cv_struct_dirent64+set}" = set; then
10792   echo $ECHO_N "(cached) $ECHO_C" >&6
10793 else
10794
10795                 cat >conftest.$ac_ext <<_ACEOF
10796 #line 10796 "configure"
10797 #include "confdefs.h"
10798
10799 #include <sys/types.h>
10800 #include <dirent.h>
10801
10802 int
10803 main ()
10804 {
10805
10806                 /* if transitional largefile support is setup, this is true */
10807                 extern struct dirent64 * readdir(DIR *);
10808                 struct dirent64 *x = readdir((DIR *)0);
10809                 struct dirent *y = readdir((DIR *)0);
10810                 int z = x - y;
10811
10812   ;
10813   return 0;
10814 }
10815 _ACEOF
10816 rm -f conftest.$ac_objext
10817 if { (eval echo "$as_me:10817: \"$ac_compile\"") >&5
10818   (eval $ac_compile) 2>&5
10819   ac_status=$?
10820   echo "$as_me:10820: \$? = $ac_status" >&5
10821   (exit $ac_status); } &&
10822          { ac_try='test -s conftest.$ac_objext'
10823   { (eval echo "$as_me:10823: \"$ac_try\"") >&5
10824   (eval $ac_try) 2>&5
10825   ac_status=$?
10826   echo "$as_me:10826: \$? = $ac_status" >&5
10827   (exit $ac_status); }; }; then
10828   cf_cv_struct_dirent64=yes
10829 else
10830   echo "$as_me: failed program was:" >&5
10831 cat conftest.$ac_ext >&5
10832 cf_cv_struct_dirent64=no
10833 fi
10834 rm -f conftest.$ac_objext conftest.$ac_ext
10835
10836 fi
10837 echo "$as_me:10837: result: $cf_cv_struct_dirent64" >&5
10838 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10839         test "$cf_cv_struct_dirent64" = yes &&
10840 cat >>confdefs.h <<\EOF
10841 #define HAVE_STRUCT_DIRENT64 1
10842 EOF
10843
10844         fi
10845
10846 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10847 echo "$as_me:10847: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10848 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10849
10850 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10851 if test "${enable_tparm_varargs+set}" = set; then
10852   enableval="$enable_tparm_varargs"
10853   with_tparm_varargs=$enableval
10854 else
10855   with_tparm_varargs=yes
10856 fi;
10857 echo "$as_me:10857: result: $with_tparm_varargs" >&5
10858 echo "${ECHO_T}$with_tparm_varargs" >&6
10859 NCURSES_TPARM_VARARGS=0
10860 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10861
10862 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10863 if test "$with_ticlib" != no ; then
10864 echo "$as_me:10864: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10865 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10866
10867 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10868 if test "${enable_tic_depends+set}" = set; then
10869   enableval="$enable_tic_depends"
10870   with_tic_depends=$enableval
10871 else
10872   with_tic_depends=yes
10873 fi;
10874 echo "$as_me:10874: result: $with_tic_depends" >&5
10875 echo "${ECHO_T}$with_tic_depends" >&6
10876 else
10877         with_tic_depends=no
10878 fi
10879
10880 ###   use option --with-bool to override bool's type
10881 echo "$as_me:10881: checking for type of bool" >&5
10882 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10883
10884 # Check whether --with-bool or --without-bool was given.
10885 if test "${with_bool+set}" = set; then
10886   withval="$with_bool"
10887   NCURSES_BOOL="$withval"
10888 else
10889   NCURSES_BOOL=auto
10890 fi;
10891 echo "$as_me:10891: result: $NCURSES_BOOL" >&5
10892 echo "${ECHO_T}$NCURSES_BOOL" >&6
10893
10894 echo "$as_me:10894: checking for alternate terminal capabilities file" >&5
10895 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10896
10897 # Check whether --with-caps or --without-caps was given.
10898 if test "${with_caps+set}" = set; then
10899   withval="$with_caps"
10900   TERMINFO_CAPS=Caps.$withval
10901 else
10902   TERMINFO_CAPS=Caps
10903 fi;
10904 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10905 echo "$as_me:10905: result: $TERMINFO_CAPS" >&5
10906 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10907
10908 ###   use option --with-chtype to override chtype's type
10909 echo "$as_me:10909: checking for type of chtype" >&5
10910 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10911
10912 # Check whether --with-chtype or --without-chtype was given.
10913 if test "${with_chtype+set}" = set; then
10914   withval="$with_chtype"
10915   NCURSES_CHTYPE="$withval"
10916 else
10917   NCURSES_CHTYPE=$cf_dft_chtype
10918 fi;
10919 echo "$as_me:10919: result: $NCURSES_CHTYPE" >&5
10920 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10921
10922 ###   use option --with-ospeed to override ospeed's type
10923 echo "$as_me:10923: checking for type of ospeed" >&5
10924 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10925
10926 # Check whether --with-ospeed or --without-ospeed was given.
10927 if test "${with_ospeed+set}" = set; then
10928   withval="$with_ospeed"
10929   NCURSES_OSPEED="$withval"
10930 else
10931   NCURSES_OSPEED=short
10932 fi;
10933 echo "$as_me:10933: result: $NCURSES_OSPEED" >&5
10934 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10935
10936 ###   use option --with-mmask-t to override mmask_t's type
10937 echo "$as_me:10937: checking for type of mmask_t" >&5
10938 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10939
10940 # Check whether --with-mmask-t or --without-mmask-t was given.
10941 if test "${with_mmask_t+set}" = set; then
10942   withval="$with_mmask_t"
10943   NCURSES_MMASK_T="$withval"
10944 else
10945   NCURSES_MMASK_T=$cf_dft_mmask_t
10946 fi;
10947 echo "$as_me:10947: result: $NCURSES_MMASK_T" >&5
10948 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10949
10950 ###   use option --with-ccharw-max to override CCHARW_MAX size
10951 echo "$as_me:10951: checking for size CCHARW_MAX" >&5
10952 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10953
10954 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10955 if test "${with_ccharw_max+set}" = set; then
10956   withval="$with_ccharw_max"
10957   NCURSES_CCHARW_MAX="$withval"
10958 else
10959   NCURSES_CCHARW_MAX=5
10960 fi;
10961 echo "$as_me:10961: result: $NCURSES_CCHARW_MAX" >&5
10962 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10963
10964 ###   use option --with-tparm-arg to override tparm's argument type
10965 echo "$as_me:10965: checking for type of tparm args" >&5
10966 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10967
10968 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10969 if test "${with_tparm_arg+set}" = set; then
10970   withval="$with_tparm_arg"
10971   NCURSES_TPARM_ARG="$withval"
10972 else
10973   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
10974 fi;
10975 echo "$as_me:10975: result: $NCURSES_TPARM_ARG" >&5
10976 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10977
10978 ### Enable compiling-in rcs id's
10979 echo "$as_me:10979: checking if RCS identifiers should be compiled-in" >&5
10980 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10981
10982 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10983 if test "${with_rcs_ids+set}" = set; then
10984   withval="$with_rcs_ids"
10985   with_rcs_ids=$withval
10986 else
10987   with_rcs_ids=no
10988 fi;
10989 echo "$as_me:10989: result: $with_rcs_ids" >&5
10990 echo "${ECHO_T}$with_rcs_ids" >&6
10991 test "x$with_rcs_ids" = xyes &&
10992 cat >>confdefs.h <<\EOF
10993 #define USE_RCS_IDS 1
10994 EOF
10995
10996 ###############################################################################
10997
10998 echo "$as_me:10998: checking format of man-pages" >&5
10999 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
11000
11001 # Check whether --with-manpage-format or --without-manpage-format was given.
11002 if test "${with_manpage_format+set}" = set; then
11003   withval="$with_manpage_format"
11004   MANPAGE_FORMAT=$withval
11005 else
11006   MANPAGE_FORMAT=unknown
11007 fi;
11008
11009 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
11010 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
11011
11012 cf_unknown=
11013
11014 case $MANPAGE_FORMAT in
11015 (unknown)
11016         if test -z "$MANPATH" ; then
11017                 MANPATH="/usr/man:/usr/share/man"
11018         fi
11019
11020         # look for the 'date' man-page (it's most likely to be installed!)
11021         MANPAGE_FORMAT=
11022         cf_preform=no
11023         cf_catonly=yes
11024         cf_example=date
11025
11026         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
11027         for cf_dir in $MANPATH; do
11028                 test -z "$cf_dir" && cf_dir=/usr/man
11029                 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
11030                 do
11031                         cf_test=`echo $cf_name | sed -e 's/*//'`
11032                         if test "x$cf_test" = "x$cf_name" ; then
11033
11034                                 case "$cf_name" in
11035                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11036                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11037                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11038                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11039                                 esac
11040
11041                                 case "$cf_name" in
11042                                 ($cf_dir/man*)
11043                                         cf_catonly=no
11044                                         ;;
11045                                 ($cf_dir/cat*)
11046                                         cf_preform=yes
11047                                         ;;
11048                                 esac
11049                                 break
11050                         fi
11051
11052                         # if we found a match in either man* or cat*, stop looking
11053                         if test -n "$MANPAGE_FORMAT" ; then
11054                                 cf_found=no
11055                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11056                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11057                                 case "$cf_name" in
11058                                 ($cf_dir/cat*)
11059                                         cf_found=yes
11060                                         ;;
11061                                 esac
11062                                 test $cf_found=yes && break
11063                         fi
11064                 done
11065                 # only check the first directory in $MANPATH where we find manpages
11066                 if test -n "$MANPAGE_FORMAT" ; then
11067                         break
11068                 fi
11069         done
11070         # if we did not find the example, just assume it is normal
11071         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11072         IFS="$ac_save_ifs"
11073         ;;
11074 (*)
11075         for cf_option in $MANPAGE_FORMAT; do
11076         case $cf_option in
11077         (gzip|compress|BSDI|normal|formatted|catonly)
11078                 ;;
11079         (*)
11080                 cf_unknown="$cf_unknown $cf_option"
11081                 ;;
11082         esac
11083         done
11084         ;;
11085 esac
11086
11087 echo "$as_me:11087: result: $MANPAGE_FORMAT" >&5
11088 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11089 if test -n "$cf_unknown" ; then
11090         { echo "$as_me:11090: WARNING: Unexpected manpage-format $cf_unknown" >&5
11091 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11092 fi
11093
11094 echo "$as_me:11094: checking for manpage renaming" >&5
11095 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11096
11097 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11098 if test "${with_manpage_renames+set}" = set; then
11099   withval="$with_manpage_renames"
11100   MANPAGE_RENAMES=$withval
11101 else
11102   MANPAGE_RENAMES=yes
11103 fi;
11104
11105 case ".$MANPAGE_RENAMES" in
11106 (.no)
11107         ;;
11108 (.|.yes)
11109         # Debian 'man' program?
11110         if test -f /etc/debian_version ; then
11111                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11112         else
11113                 MANPAGE_RENAMES=no
11114         fi
11115         ;;
11116 esac
11117
11118 if test "$MANPAGE_RENAMES" != no ; then
11119         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11120                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11121         elif test ! -f $MANPAGE_RENAMES ; then
11122                 { { echo "$as_me:11122: error: not a filename: $MANPAGE_RENAMES" >&5
11123 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11124    { (exit 1); exit 1; }; }
11125         fi
11126
11127         test ! -d man && mkdir man
11128
11129         # Construct a sed-script to perform renaming within man-pages
11130         if test -n "$MANPAGE_RENAMES" ; then
11131                 test ! -d man && mkdir man
11132                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11133         fi
11134 fi
11135
11136 echo "$as_me:11136: result: $MANPAGE_RENAMES" >&5
11137 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11138
11139 echo "$as_me:11139: checking if manpage aliases will be installed" >&5
11140 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11141
11142 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11143 if test "${with_manpage_aliases+set}" = set; then
11144   withval="$with_manpage_aliases"
11145   MANPAGE_ALIASES=$withval
11146 else
11147   MANPAGE_ALIASES=yes
11148 fi;
11149
11150 echo "$as_me:11150: result: $MANPAGE_ALIASES" >&5
11151 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11152
11153 case "x$LN_S" in
11154 (xln*)
11155         cf_use_symlinks=yes
11156         ;;
11157 (*)
11158         cf_use_symlinks=no
11159         ;;
11160 esac
11161
11162 MANPAGE_SYMLINKS=no
11163 if test "$MANPAGE_ALIASES" = yes ; then
11164 echo "$as_me:11164: checking if manpage symlinks should be used" >&5
11165 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11166
11167 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11168 if test "${with_manpage_symlinks+set}" = set; then
11169   withval="$with_manpage_symlinks"
11170   MANPAGE_SYMLINKS=$withval
11171 else
11172   MANPAGE_SYMLINKS=$cf_use_symlinks
11173 fi;
11174
11175 if test "$$cf_use_symlinks" = no; then
11176 if test "$MANPAGE_SYMLINKS" = yes ; then
11177         { echo "$as_me:11177: WARNING: cannot make symlinks" >&5
11178 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11179         MANPAGE_SYMLINKS=no
11180 fi
11181 fi
11182
11183 echo "$as_me:11183: result: $MANPAGE_SYMLINKS" >&5
11184 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11185 fi
11186
11187 echo "$as_me:11187: checking for manpage tbl" >&5
11188 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11189
11190 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11191 if test "${with_manpage_tbl+set}" = set; then
11192   withval="$with_manpage_tbl"
11193   MANPAGE_TBL=$withval
11194 else
11195   MANPAGE_TBL=no
11196 fi;
11197
11198 echo "$as_me:11198: result: $MANPAGE_TBL" >&5
11199 echo "${ECHO_T}$MANPAGE_TBL" >&6
11200
11201 if test "$prefix" = "NONE" ; then
11202         cf_prefix="$ac_default_prefix"
11203 else
11204         cf_prefix="$prefix"
11205 fi
11206
11207 case "$MANPAGE_FORMAT" in
11208 (*catonly*)
11209         cf_format=yes
11210         cf_inboth=no
11211         ;;
11212 (*formatted*)
11213         cf_format=yes
11214         cf_inboth=yes
11215         ;;
11216 (*)
11217         cf_format=no
11218         cf_inboth=no
11219         ;;
11220 esac
11221
11222 test ! -d man && mkdir man
11223
11224 cf_so_strip=
11225 cf_compress=
11226 case "$MANPAGE_FORMAT" in
11227 (*compress*)
11228         cf_so_strip="Z"
11229         cf_compress=compress
11230         ;;
11231 (*gzip*)
11232         cf_so_strip="gz"
11233         cf_compress=gzip
11234         ;;
11235 esac
11236
11237 cf_edit_man=./edit_man.sh
11238 cf_man_alias=`pwd`/man_alias.sed
11239
11240 cat >$cf_edit_man <<CF_EOF
11241 #! $SHELL
11242 # this script is generated by the configure-script CF_MAN_PAGES macro.
11243
11244 prefix="$cf_prefix"
11245 datarootdir="$datarootdir"
11246 datadir="$datadir"
11247
11248 NCURSES_MAJOR="$NCURSES_MAJOR"
11249 NCURSES_MINOR="$NCURSES_MINOR"
11250 NCURSES_PATCH="$NCURSES_PATCH"
11251
11252 NCURSES_OSPEED="$NCURSES_OSPEED"
11253 TERMINFO="$TERMINFO"
11254
11255 INSTALL="$INSTALL"
11256 INSTALL_DATA="$INSTALL_DATA"
11257
11258 transform="$program_transform_name"
11259
11260 TMP=\${TMPDIR:=/tmp}/man\$\$
11261 trap "rm -f \$TMP" 0 1 2 5 15
11262
11263 form=\$1
11264 shift || exit 1
11265
11266 verb=\$1
11267 shift || exit 1
11268
11269 mandir=\$1
11270 shift || exit 1
11271
11272 srcdir=\$1
11273 top_srcdir=\$srcdir/..
11274 shift || exit 1
11275
11276 if test "\$form" = normal ; then
11277         if test "$cf_format" = yes ; then
11278         if test "$cf_inboth" = no ; then
11279                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11280                 exit $?
11281         fi
11282         fi
11283         cf_subdir=\$mandir/man
11284         cf_tables=$MANPAGE_TBL
11285 else
11286         cf_subdir=\$mandir/cat
11287         cf_tables=yes
11288 fi
11289
11290 # process the list of source-files
11291 for i in \$* ; do
11292 case \$i in
11293 (*.orig|*.rej) ;;
11294 (*.[0-9]*)
11295         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11296         if test \$verb = installing ; then
11297         if test ! -d \$cf_subdir\${section} ; then
11298                 mkdir -p \$cf_subdir\$section
11299         fi
11300         fi
11301
11302         # replace variables in man page
11303         if test ! -f $cf_man_alias ; then
11304 cat >>$cf_man_alias <<-CF_EOF2
11305                 s,@DATADIR@,\$datadir,g
11306                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11307                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11308                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11309                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11310                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11311                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11312 CF_EOF
11313
11314         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11315         do
11316                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11317                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11318 cat >>$cf_edit_man <<-CF_EOF
11319                 s,@$cf_NAME@,$cf_name,g
11320 CF_EOF
11321         done
11322
11323 cat >>$cf_edit_man <<CF_EOF
11324 CF_EOF2
11325                 echo "...made $cf_man_alias"
11326         fi
11327
11328         aliases=
11329         cf_source=\`basename \$i\`
11330         inalias=\$cf_source
11331         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11332         if test ! -f \$inalias ; then
11333                 echo .. skipped \$cf_source
11334                 continue
11335         fi
11336 CF_EOF
11337
11338 if test "$MANPAGE_ALIASES" != no ; then
11339 cat >>$cf_edit_man <<CF_EOF
11340         nCurses=ignore.3x
11341         test $with_curses_h = yes && nCurses=ncurses.3x
11342         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11343 CF_EOF
11344 fi
11345
11346 if test "$MANPAGE_RENAMES" = no ; then
11347 cat >>$cf_edit_man <<CF_EOF
11348         # perform program transformations for section 1 man pages
11349         if test \$section = 1 ; then
11350                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11351         else
11352                 cf_target=\$cf_subdir\${section}/\$cf_source
11353         fi
11354 CF_EOF
11355 else
11356 cat >>$cf_edit_man <<CF_EOF
11357         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11358         if test -z "\$cf_target" ; then
11359                 echo '? missing rename for '\$cf_source
11360                 cf_target="\$cf_source"
11361         fi
11362         cf_target="\$cf_subdir\${section}/\${cf_target}"
11363
11364 CF_EOF
11365 fi
11366
11367 cat >>$cf_edit_man <<CF_EOF
11368         sed     -f $cf_man_alias \\
11369 CF_EOF
11370
11371 if test -f $MANPAGE_RENAMES ; then
11372 cat >>$cf_edit_man <<CF_EOF
11373                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11374 CF_EOF
11375 else
11376 cat >>$cf_edit_man <<CF_EOF
11377                 < \$i >\$TMP
11378 CF_EOF
11379 fi
11380
11381 cat >>$cf_edit_man <<CF_EOF
11382 if test \$cf_tables = yes ; then
11383         tbl \$TMP >\$TMP.out
11384         mv \$TMP.out \$TMP
11385 fi
11386 CF_EOF
11387
11388 if test $with_overwrite != yes ; then
11389 cat >>$cf_edit_man <<CF_EOF
11390         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11391         mv \$TMP.out \$TMP
11392 CF_EOF
11393 fi
11394
11395 if test $with_curses_h != yes ; then
11396 cat >>$cf_edit_man <<CF_EOF
11397         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11398         mv \$TMP.out \$TMP
11399 CF_EOF
11400 fi
11401
11402 cat >>$cf_edit_man <<CF_EOF
11403         if test \$form = format ; then
11404                 nroff -man \$TMP >\$TMP.out
11405                 mv \$TMP.out \$TMP
11406         fi
11407 CF_EOF
11408
11409 if test -n "$cf_compress" ; then
11410 cat >>$cf_edit_man <<CF_EOF
11411         if test \$verb = installing ; then
11412         if ( $cf_compress -f \$TMP )
11413         then
11414                 mv \$TMP.$cf_so_strip \$TMP
11415         fi
11416         fi
11417         cf_target="\$cf_target.$cf_so_strip"
11418 CF_EOF
11419 fi
11420
11421 case "$MANPAGE_FORMAT" in
11422 (*BSDI*)
11423 cat >>$cf_edit_man <<CF_EOF
11424         if test \$form = format ; then
11425                 # BSDI installs only .0 suffixes in the cat directories
11426                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11427         fi
11428 CF_EOF
11429   ;;
11430 esac
11431
11432 cat >>$cf_edit_man <<CF_EOF
11433         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11434         if test \$verb = installing ; then
11435                 echo \$verb \$cf_target
11436                 \$INSTALL_DATA \$TMP \$cf_target
11437                 test -d \$cf_subdir\${section} &&
11438                 test -n "\$aliases" && (
11439                         cd \$cf_subdir\${section} && (
11440                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11441                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11442                                 cf_target=\`basename \$cf_target\`
11443                                 for cf_alias in \$aliases
11444                                 do
11445                                         if test \$section = 1 ; then
11446                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11447                                         fi
11448
11449                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11450                                                 if test -f \$cf_alias\${suffix} ; then
11451                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11452                                                         then
11453                                                                 continue
11454                                                         fi
11455                                                 fi
11456                                                 echo .. \$verb alias \$cf_alias\${suffix}
11457 CF_EOF
11458 case "x$LN_S" in
11459 (*-f)
11460 cat >>$cf_edit_man <<CF_EOF
11461                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11462 CF_EOF
11463         ;;
11464 (*)
11465 cat >>$cf_edit_man <<CF_EOF
11466                                                 rm -f \$cf_alias\${suffix}
11467                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11468 CF_EOF
11469         ;;
11470 esac
11471 cat >>$cf_edit_man <<CF_EOF
11472                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11473                                                 echo ".so \$cf_source" >\$TMP
11474 CF_EOF
11475 if test -n "$cf_compress" ; then
11476 cat >>$cf_edit_man <<CF_EOF
11477                                                 if test -n "$cf_so_strip" ; then
11478                                                         $cf_compress -f \$TMP
11479                                                         mv \$TMP.$cf_so_strip \$TMP
11480                                                 fi
11481 CF_EOF
11482 fi
11483 cat >>$cf_edit_man <<CF_EOF
11484                                                 echo .. \$verb alias \$cf_alias\${suffix}
11485                                                 rm -f \$cf_alias\${suffix}
11486                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11487                                         fi
11488                                 done
11489                         )
11490                 )
11491         elif test \$verb = removing ; then
11492                 test -f \$cf_target && (
11493                         echo \$verb \$cf_target
11494                         rm -f \$cf_target
11495                 )
11496                 test -d \$cf_subdir\${section} &&
11497                 test -n "\$aliases" && (
11498                         cd \$cf_subdir\${section} && (
11499                                 for cf_alias in \$aliases
11500                                 do
11501                                         if test \$section = 1 ; then
11502                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11503                                         fi
11504
11505                                         echo .. \$verb alias \$cf_alias\${suffix}
11506                                         rm -f \$cf_alias\${suffix}
11507                                 done
11508                         )
11509                 )
11510         else
11511 #               echo ".hy 0"
11512                 cat \$TMP
11513         fi
11514         ;;
11515 esac
11516 done
11517
11518 if test $cf_inboth = yes ; then
11519 if test \$form != format ; then
11520         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
11521 fi
11522 fi
11523
11524 exit 0
11525 CF_EOF
11526 chmod 755 $cf_edit_man
11527
11528 ###############################################################################
11529
11530 ### Note that some functions (such as const) are normally disabled anyway.
11531 echo "$as_me:11531: checking if you want to build with function extensions" >&5
11532 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11533
11534 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11535 if test "${enable_ext_funcs+set}" = set; then
11536   enableval="$enable_ext_funcs"
11537   with_ext_funcs=$enableval
11538 else
11539   with_ext_funcs=yes
11540 fi;
11541 echo "$as_me:11541: result: $with_ext_funcs" >&5
11542 echo "${ECHO_T}$with_ext_funcs" >&6
11543 if test "x$with_ext_funcs" = xyes ; then
11544         NCURSES_EXT_FUNCS=1
11545
11546 cat >>confdefs.h <<\EOF
11547 #define HAVE_ASSUME_DEFAULT_COLORS 1
11548 EOF
11549
11550 cat >>confdefs.h <<\EOF
11551 #define HAVE_CURSES_VERSION 1
11552 EOF
11553
11554 cat >>confdefs.h <<\EOF
11555 #define HAVE_HAS_KEY 1
11556 EOF
11557
11558 cat >>confdefs.h <<\EOF
11559 #define HAVE_RESIZETERM 1
11560 EOF
11561
11562 cat >>confdefs.h <<\EOF
11563 #define HAVE_RESIZE_TERM 1
11564 EOF
11565
11566 cat >>confdefs.h <<\EOF
11567 #define HAVE_TERM_ENTRY_H 1
11568 EOF
11569
11570 cat >>confdefs.h <<\EOF
11571 #define HAVE_USE_DEFAULT_COLORS 1
11572 EOF
11573
11574 cat >>confdefs.h <<\EOF
11575 #define HAVE_USE_SCREEN 1
11576 EOF
11577
11578 cat >>confdefs.h <<\EOF
11579 #define HAVE_USE_WINDOW 1
11580 EOF
11581
11582 cat >>confdefs.h <<\EOF
11583 #define HAVE_WRESIZE 1
11584 EOF
11585
11586 cat >>confdefs.h <<\EOF
11587 #define NCURSES_EXT_FUNCS 1
11588 EOF
11589
11590         GENERATED_EXT_FUNCS=generated
11591 else
11592         NCURSES_EXT_FUNCS=0
11593         GENERATED_EXT_FUNCS=
11594 fi
11595
11596 echo "$as_me:11596: checking if you want to build with SCREEN extensions" >&5
11597 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11598
11599 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11600 if test "${enable_sp_funcs+set}" = set; then
11601   enableval="$enable_sp_funcs"
11602   with_sp_funcs=$enableval
11603 else
11604   with_sp_funcs=$cf_dft_ext_spfuncs
11605 fi;
11606 echo "$as_me:11606: result: $with_sp_funcs" >&5
11607 echo "${ECHO_T}$with_sp_funcs" >&6
11608 if test "x$with_sp_funcs" = xyes ; then
11609         NCURSES_SP_FUNCS=1
11610
11611 cat >>confdefs.h <<\EOF
11612 #define NCURSES_SP_FUNCS 1
11613 EOF
11614
11615         GENERATED_SP_FUNCS=generated
11616 else
11617         NCURSES_SP_FUNCS=0
11618         GENERATED_SP_FUNCS=
11619 fi
11620
11621 echo "$as_me:11621: checking if you want to build with terminal-driver" >&5
11622 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11623
11624 # Check whether --enable-term-driver or --disable-term-driver was given.
11625 if test "${enable_term_driver+set}" = set; then
11626   enableval="$enable_term_driver"
11627   with_term_driver=$enableval
11628 else
11629   with_term_driver=no
11630 fi;
11631 echo "$as_me:11631: result: $with_term_driver" >&5
11632 echo "${ECHO_T}$with_term_driver" >&6
11633 if test "x$with_term_driver" = xyes ; then
11634
11635 cat >>confdefs.h <<\EOF
11636 #define USE_TERM_DRIVER 1
11637 EOF
11638
11639         if test "x$with_termlib" != xno ; then
11640                 { { echo "$as_me:11640: error: The term-driver option conflicts with the termlib option" >&5
11641 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
11642    { (exit 1); exit 1; }; }
11643         fi
11644         if test "x$with_sp_funcs" != xyes ; then
11645                 { { echo "$as_me:11645: error: The term-driver option relies upon sp-funcs" >&5
11646 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11647    { (exit 1); exit 1; }; }
11648         fi
11649 fi
11650
11651 ###   use option --enable-const to turn on use of const beyond that in XSI.
11652 echo "$as_me:11652: checking for extended use of const keyword" >&5
11653 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11654
11655 # Check whether --enable-const or --disable-const was given.
11656 if test "${enable_const+set}" = set; then
11657   enableval="$enable_const"
11658   with_ext_const=$enableval
11659 else
11660   with_ext_const=$cf_dft_ext_const
11661 fi;
11662 echo "$as_me:11662: result: $with_ext_const" >&5
11663 echo "${ECHO_T}$with_ext_const" >&6
11664 NCURSES_CONST='/*nothing*/'
11665 if test "x$with_ext_const" = xyes ; then
11666         NCURSES_CONST=const
11667 fi
11668
11669 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11670 echo "$as_me:11670: checking if you want to use extended colors" >&5
11671 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11672
11673 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11674 if test "${enable_ext_colors+set}" = set; then
11675   enableval="$enable_ext_colors"
11676   with_ext_colors=$enableval
11677 else
11678   with_ext_colors=$cf_dft_ext_colors
11679 fi;
11680 echo "$as_me:11680: result: $with_ext_colors" >&5
11681 echo "${ECHO_T}$with_ext_colors" >&6
11682 NCURSES_EXT_COLORS=0
11683 if test "x$with_ext_colors" = xyes ; then
11684         if test "x$with_widec" != xyes ; then
11685                 { echo "$as_me:11685: WARNING: This option applies only to wide-character library" >&5
11686 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11687         else
11688                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11689
11690 if test "${with_abi_version+set}" != set; then
11691         case $cf_cv_rel_version in
11692         (5.*)
11693                 cf_cv_rel_version=6.0
11694                 cf_cv_abi_version=6
11695                 { echo "$as_me:11695: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11696 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11697                 ;;
11698         esac
11699 fi
11700
11701                 NCURSES_EXT_COLORS=1
11702
11703 cat >>confdefs.h <<\EOF
11704 #define NCURSES_EXT_COLORS 1
11705 EOF
11706
11707         fi
11708 fi
11709
11710 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11711 echo "$as_me:11711: checking if you want to use extended mouse encoding" >&5
11712 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11713
11714 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11715 if test "${enable_ext_mouse+set}" = set; then
11716   enableval="$enable_ext_mouse"
11717   with_ext_mouse=$enableval
11718 else
11719   with_ext_mouse=$cf_dft_ext_mouse
11720 fi;
11721 echo "$as_me:11721: result: $with_ext_mouse" >&5
11722 echo "${ECHO_T}$with_ext_mouse" >&6
11723 NCURSES_MOUSE_VERSION=1
11724 if test "x$with_ext_mouse" = xyes ; then
11725         NCURSES_MOUSE_VERSION=2
11726
11727 if test "${with_abi_version+set}" != set; then
11728         case $cf_cv_rel_version in
11729         (5.*)
11730                 cf_cv_rel_version=6.0
11731                 cf_cv_abi_version=6
11732                 { echo "$as_me:11732: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
11733 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
11734                 ;;
11735         esac
11736 fi
11737
11738 fi
11739
11740 ###   use option --enable-ext-putwin to turn on extended screendumps
11741 echo "$as_me:11741: checking if you want to use extended putwin/screendump" >&5
11742 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11743
11744 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11745 if test "${enable_ext_putwin+set}" = set; then
11746   enableval="$enable_ext_putwin"
11747   with_ext_putwin=$enableval
11748 else
11749   with_ext_putwin=$cf_dft_ext_putwin
11750 fi;
11751 echo "$as_me:11751: result: $with_ext_putwin" >&5
11752 echo "${ECHO_T}$with_ext_putwin" >&6
11753 if test "x$with_ext_putwin" = xyes ; then
11754
11755 cat >>confdefs.h <<\EOF
11756 #define NCURSES_EXT_PUTWIN 1
11757 EOF
11758
11759 fi
11760
11761 echo "$as_me:11761: checking if you want \$NCURSES_NO_PADDING code" >&5
11762 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11763
11764 # Check whether --enable-no-padding or --disable-no-padding was given.
11765 if test "${enable_no_padding+set}" = set; then
11766   enableval="$enable_no_padding"
11767   with_no_padding=$enableval
11768 else
11769   with_no_padding=$with_ext_funcs
11770 fi;
11771 echo "$as_me:11771: result: $with_no_padding" >&5
11772 echo "${ECHO_T}$with_no_padding" >&6
11773 test "x$with_no_padding" = xyes &&
11774 cat >>confdefs.h <<\EOF
11775 #define NCURSES_NO_PADDING 1
11776 EOF
11777
11778 echo "$as_me:11778: checking for ANSI C header files" >&5
11779 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11780 if test "${ac_cv_header_stdc+set}" = set; then
11781   echo $ECHO_N "(cached) $ECHO_C" >&6
11782 else
11783   cat >conftest.$ac_ext <<_ACEOF
11784 #line 11784 "configure"
11785 #include "confdefs.h"
11786 #include <stdlib.h>
11787 #include <stdarg.h>
11788 #include <string.h>
11789 #include <float.h>
11790
11791 _ACEOF
11792 if { (eval echo "$as_me:11792: \"$ac_cpp conftest.$ac_ext\"") >&5
11793   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11794   ac_status=$?
11795   egrep -v '^ *\+' conftest.er1 >conftest.err
11796   rm -f conftest.er1
11797   cat conftest.err >&5
11798   echo "$as_me:11798: \$? = $ac_status" >&5
11799   (exit $ac_status); } >/dev/null; then
11800   if test -s conftest.err; then
11801     ac_cpp_err=$ac_c_preproc_warn_flag
11802   else
11803     ac_cpp_err=
11804   fi
11805 else
11806   ac_cpp_err=yes
11807 fi
11808 if test -z "$ac_cpp_err"; then
11809   ac_cv_header_stdc=yes
11810 else
11811   echo "$as_me: failed program was:" >&5
11812   cat conftest.$ac_ext >&5
11813   ac_cv_header_stdc=no
11814 fi
11815 rm -f conftest.err conftest.$ac_ext
11816
11817 if test $ac_cv_header_stdc = yes; then
11818   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11819   cat >conftest.$ac_ext <<_ACEOF
11820 #line 11820 "configure"
11821 #include "confdefs.h"
11822 #include <string.h>
11823
11824 _ACEOF
11825 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11826   egrep "memchr" >/dev/null 2>&1; then
11827   :
11828 else
11829   ac_cv_header_stdc=no
11830 fi
11831 rm -rf conftest*
11832
11833 fi
11834
11835 if test $ac_cv_header_stdc = yes; then
11836   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11837   cat >conftest.$ac_ext <<_ACEOF
11838 #line 11838 "configure"
11839 #include "confdefs.h"
11840 #include <stdlib.h>
11841
11842 _ACEOF
11843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11844   egrep "free" >/dev/null 2>&1; then
11845   :
11846 else
11847   ac_cv_header_stdc=no
11848 fi
11849 rm -rf conftest*
11850
11851 fi
11852
11853 if test $ac_cv_header_stdc = yes; then
11854   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11855   if test "$cross_compiling" = yes; then
11856   :
11857 else
11858   cat >conftest.$ac_ext <<_ACEOF
11859 #line 11859 "configure"
11860 #include "confdefs.h"
11861 #include <ctype.h>
11862 #if ((' ' & 0x0FF) == 0x020)
11863 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11864 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11865 #else
11866 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11867                      || ('j' <= (c) && (c) <= 'r') \
11868                      || ('s' <= (c) && (c) <= 'z'))
11869 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11870 #endif
11871
11872 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11873 int
11874 main ()
11875 {
11876   int i;
11877   for (i = 0; i < 256; i++)
11878     if (XOR (islower (i), ISLOWER (i))
11879         || toupper (i) != TOUPPER (i))
11880       $ac_main_return(2);
11881   $ac_main_return (0);
11882 }
11883 _ACEOF
11884 rm -f conftest$ac_exeext
11885 if { (eval echo "$as_me:11885: \"$ac_link\"") >&5
11886   (eval $ac_link) 2>&5
11887   ac_status=$?
11888   echo "$as_me:11888: \$? = $ac_status" >&5
11889   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11890   { (eval echo "$as_me:11890: \"$ac_try\"") >&5
11891   (eval $ac_try) 2>&5
11892   ac_status=$?
11893   echo "$as_me:11893: \$? = $ac_status" >&5
11894   (exit $ac_status); }; }; then
11895   :
11896 else
11897   echo "$as_me: program exited with status $ac_status" >&5
11898 echo "$as_me: failed program was:" >&5
11899 cat conftest.$ac_ext >&5
11900 ac_cv_header_stdc=no
11901 fi
11902 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11903 fi
11904 fi
11905 fi
11906 echo "$as_me:11906: result: $ac_cv_header_stdc" >&5
11907 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11908 if test $ac_cv_header_stdc = yes; then
11909
11910 cat >>confdefs.h <<\EOF
11911 #define STDC_HEADERS 1
11912 EOF
11913
11914 fi
11915
11916 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11917
11918 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11919                   inttypes.h stdint.h unistd.h
11920 do
11921 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11922 echo "$as_me:11922: checking for $ac_header" >&5
11923 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11924 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11925   echo $ECHO_N "(cached) $ECHO_C" >&6
11926 else
11927   cat >conftest.$ac_ext <<_ACEOF
11928 #line 11928 "configure"
11929 #include "confdefs.h"
11930 $ac_includes_default
11931 #include <$ac_header>
11932 _ACEOF
11933 rm -f conftest.$ac_objext
11934 if { (eval echo "$as_me:11934: \"$ac_compile\"") >&5
11935   (eval $ac_compile) 2>&5
11936   ac_status=$?
11937   echo "$as_me:11937: \$? = $ac_status" >&5
11938   (exit $ac_status); } &&
11939          { ac_try='test -s conftest.$ac_objext'
11940   { (eval echo "$as_me:11940: \"$ac_try\"") >&5
11941   (eval $ac_try) 2>&5
11942   ac_status=$?
11943   echo "$as_me:11943: \$? = $ac_status" >&5
11944   (exit $ac_status); }; }; then
11945   eval "$as_ac_Header=yes"
11946 else
11947   echo "$as_me: failed program was:" >&5
11948 cat conftest.$ac_ext >&5
11949 eval "$as_ac_Header=no"
11950 fi
11951 rm -f conftest.$ac_objext conftest.$ac_ext
11952 fi
11953 echo "$as_me:11953: result: `eval echo '${'$as_ac_Header'}'`" >&5
11954 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11955 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11956   cat >>confdefs.h <<EOF
11957 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11958 EOF
11959
11960 fi
11961 done
11962
11963 echo "$as_me:11963: checking for signed char" >&5
11964 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11965 if test "${ac_cv_type_signed_char+set}" = set; then
11966   echo $ECHO_N "(cached) $ECHO_C" >&6
11967 else
11968   cat >conftest.$ac_ext <<_ACEOF
11969 #line 11969 "configure"
11970 #include "confdefs.h"
11971 $ac_includes_default
11972 int
11973 main ()
11974 {
11975 if ((signed char *) 0)
11976   return 0;
11977 if (sizeof (signed char))
11978   return 0;
11979   ;
11980   return 0;
11981 }
11982 _ACEOF
11983 rm -f conftest.$ac_objext
11984 if { (eval echo "$as_me:11984: \"$ac_compile\"") >&5
11985   (eval $ac_compile) 2>&5
11986   ac_status=$?
11987   echo "$as_me:11987: \$? = $ac_status" >&5
11988   (exit $ac_status); } &&
11989          { ac_try='test -s conftest.$ac_objext'
11990   { (eval echo "$as_me:11990: \"$ac_try\"") >&5
11991   (eval $ac_try) 2>&5
11992   ac_status=$?
11993   echo "$as_me:11993: \$? = $ac_status" >&5
11994   (exit $ac_status); }; }; then
11995   ac_cv_type_signed_char=yes
11996 else
11997   echo "$as_me: failed program was:" >&5
11998 cat conftest.$ac_ext >&5
11999 ac_cv_type_signed_char=no
12000 fi
12001 rm -f conftest.$ac_objext conftest.$ac_ext
12002 fi
12003 echo "$as_me:12003: result: $ac_cv_type_signed_char" >&5
12004 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12005
12006 echo "$as_me:12006: checking size of signed char" >&5
12007 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12008 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12009   echo $ECHO_N "(cached) $ECHO_C" >&6
12010 else
12011   if test "$ac_cv_type_signed_char" = yes; then
12012   if test "$cross_compiling" = yes; then
12013   # Depending upon the size, compute the lo and hi bounds.
12014 cat >conftest.$ac_ext <<_ACEOF
12015 #line 12015 "configure"
12016 #include "confdefs.h"
12017 $ac_includes_default
12018 int
12019 main ()
12020 {
12021 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
12022   ;
12023   return 0;
12024 }
12025 _ACEOF
12026 rm -f conftest.$ac_objext
12027 if { (eval echo "$as_me:12027: \"$ac_compile\"") >&5
12028   (eval $ac_compile) 2>&5
12029   ac_status=$?
12030   echo "$as_me:12030: \$? = $ac_status" >&5
12031   (exit $ac_status); } &&
12032          { ac_try='test -s conftest.$ac_objext'
12033   { (eval echo "$as_me:12033: \"$ac_try\"") >&5
12034   (eval $ac_try) 2>&5
12035   ac_status=$?
12036   echo "$as_me:12036: \$? = $ac_status" >&5
12037   (exit $ac_status); }; }; then
12038   ac_lo=0 ac_mid=0
12039   while :; do
12040     cat >conftest.$ac_ext <<_ACEOF
12041 #line 12041 "configure"
12042 #include "confdefs.h"
12043 $ac_includes_default
12044 int
12045 main ()
12046 {
12047 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12048   ;
12049   return 0;
12050 }
12051 _ACEOF
12052 rm -f conftest.$ac_objext
12053 if { (eval echo "$as_me:12053: \"$ac_compile\"") >&5
12054   (eval $ac_compile) 2>&5
12055   ac_status=$?
12056   echo "$as_me:12056: \$? = $ac_status" >&5
12057   (exit $ac_status); } &&
12058          { ac_try='test -s conftest.$ac_objext'
12059   { (eval echo "$as_me:12059: \"$ac_try\"") >&5
12060   (eval $ac_try) 2>&5
12061   ac_status=$?
12062   echo "$as_me:12062: \$? = $ac_status" >&5
12063   (exit $ac_status); }; }; then
12064   ac_hi=$ac_mid; break
12065 else
12066   echo "$as_me: failed program was:" >&5
12067 cat conftest.$ac_ext >&5
12068 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12069 fi
12070 rm -f conftest.$ac_objext conftest.$ac_ext
12071   done
12072 else
12073   echo "$as_me: failed program was:" >&5
12074 cat conftest.$ac_ext >&5
12075 ac_hi=-1 ac_mid=-1
12076   while :; do
12077     cat >conftest.$ac_ext <<_ACEOF
12078 #line 12078 "configure"
12079 #include "confdefs.h"
12080 $ac_includes_default
12081 int
12082 main ()
12083 {
12084 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
12085   ;
12086   return 0;
12087 }
12088 _ACEOF
12089 rm -f conftest.$ac_objext
12090 if { (eval echo "$as_me:12090: \"$ac_compile\"") >&5
12091   (eval $ac_compile) 2>&5
12092   ac_status=$?
12093   echo "$as_me:12093: \$? = $ac_status" >&5
12094   (exit $ac_status); } &&
12095          { ac_try='test -s conftest.$ac_objext'
12096   { (eval echo "$as_me:12096: \"$ac_try\"") >&5
12097   (eval $ac_try) 2>&5
12098   ac_status=$?
12099   echo "$as_me:12099: \$? = $ac_status" >&5
12100   (exit $ac_status); }; }; then
12101   ac_lo=$ac_mid; break
12102 else
12103   echo "$as_me: failed program was:" >&5
12104 cat conftest.$ac_ext >&5
12105 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12106 fi
12107 rm -f conftest.$ac_objext conftest.$ac_ext
12108   done
12109 fi
12110 rm -f conftest.$ac_objext conftest.$ac_ext
12111 # Binary search between lo and hi bounds.
12112 while test "x$ac_lo" != "x$ac_hi"; do
12113   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12114   cat >conftest.$ac_ext <<_ACEOF
12115 #line 12115 "configure"
12116 #include "confdefs.h"
12117 $ac_includes_default
12118 int
12119 main ()
12120 {
12121 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12122   ;
12123   return 0;
12124 }
12125 _ACEOF
12126 rm -f conftest.$ac_objext
12127 if { (eval echo "$as_me:12127: \"$ac_compile\"") >&5
12128   (eval $ac_compile) 2>&5
12129   ac_status=$?
12130   echo "$as_me:12130: \$? = $ac_status" >&5
12131   (exit $ac_status); } &&
12132          { ac_try='test -s conftest.$ac_objext'
12133   { (eval echo "$as_me:12133: \"$ac_try\"") >&5
12134   (eval $ac_try) 2>&5
12135   ac_status=$?
12136   echo "$as_me:12136: \$? = $ac_status" >&5
12137   (exit $ac_status); }; }; then
12138   ac_hi=$ac_mid
12139 else
12140   echo "$as_me: failed program was:" >&5
12141 cat conftest.$ac_ext >&5
12142 ac_lo=`expr $ac_mid + 1`
12143 fi
12144 rm -f conftest.$ac_objext conftest.$ac_ext
12145 done
12146 ac_cv_sizeof_signed_char=$ac_lo
12147 else
12148   if test "$cross_compiling" = yes; then
12149   { { echo "$as_me:12149: error: cannot run test program while cross compiling" >&5
12150 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12151    { (exit 1); exit 1; }; }
12152 else
12153   cat >conftest.$ac_ext <<_ACEOF
12154 #line 12154 "configure"
12155 #include "confdefs.h"
12156 $ac_includes_default
12157 int
12158 main ()
12159 {
12160 FILE *f = fopen ("conftest.val", "w");
12161 if (!f)
12162   $ac_main_return (1);
12163 fprintf (f, "%d", (sizeof (signed char)));
12164 fclose (f);
12165   ;
12166   return 0;
12167 }
12168 _ACEOF
12169 rm -f conftest$ac_exeext
12170 if { (eval echo "$as_me:12170: \"$ac_link\"") >&5
12171   (eval $ac_link) 2>&5
12172   ac_status=$?
12173   echo "$as_me:12173: \$? = $ac_status" >&5
12174   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12175   { (eval echo "$as_me:12175: \"$ac_try\"") >&5
12176   (eval $ac_try) 2>&5
12177   ac_status=$?
12178   echo "$as_me:12178: \$? = $ac_status" >&5
12179   (exit $ac_status); }; }; then
12180   ac_cv_sizeof_signed_char=`cat conftest.val`
12181 else
12182   echo "$as_me: program exited with status $ac_status" >&5
12183 echo "$as_me: failed program was:" >&5
12184 cat conftest.$ac_ext >&5
12185 fi
12186 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12187 fi
12188 fi
12189 rm -f conftest.val
12190 else
12191   ac_cv_sizeof_signed_char=0
12192 fi
12193 fi
12194 echo "$as_me:12194: result: $ac_cv_sizeof_signed_char" >&5
12195 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12196 cat >>confdefs.h <<EOF
12197 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12198 EOF
12199
12200 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12201         NCURSES_SBOOL="signed char"
12202 else
12203         NCURSES_SBOOL="char"
12204 fi
12205 echo "$as_me:12205: checking if you want to use signed Boolean array in term.h" >&5
12206 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12207
12208 # Check whether --enable-signed-char or --disable-signed-char was given.
12209 if test "${enable_signed_char+set}" = set; then
12210   enableval="$enable_signed_char"
12211   with_signed_char=$enableval
12212 else
12213   with_signed_char=no
12214 fi;
12215 echo "$as_me:12215: result: $with_signed_char" >&5
12216 echo "${ECHO_T}$with_signed_char" >&6
12217 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12218
12219 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12220 echo "$as_me:12220: checking if you want SIGWINCH handler" >&5
12221 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12222
12223 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12224 if test "${enable_sigwinch+set}" = set; then
12225   enableval="$enable_sigwinch"
12226   with_sigwinch=$enableval
12227 else
12228   with_sigwinch=$with_ext_funcs
12229 fi;
12230 echo "$as_me:12230: result: $with_sigwinch" >&5
12231 echo "${ECHO_T}$with_sigwinch" >&6
12232 test "x$with_sigwinch" = xyes &&
12233 cat >>confdefs.h <<\EOF
12234 #define USE_SIGWINCH 1
12235 EOF
12236
12237 ###   use option --enable-tcap-names to allow user to define new capabilities
12238 echo "$as_me:12238: checking if you want user-definable terminal capabilities like termcap" >&5
12239 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12240
12241 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12242 if test "${enable_tcap_names+set}" = set; then
12243   enableval="$enable_tcap_names"
12244   with_tcap_names=$enableval
12245 else
12246   with_tcap_names=$with_ext_funcs
12247 fi;
12248 echo "$as_me:12248: result: $with_tcap_names" >&5
12249 echo "${ECHO_T}$with_tcap_names" >&6
12250 NCURSES_XNAMES=0
12251 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12252
12253 ###############################################################################
12254 # These options are relatively safe to experiment with.
12255
12256 echo "$as_me:12256: checking if you want all development code" >&5
12257 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12258
12259 # Check whether --with-develop or --without-develop was given.
12260 if test "${with_develop+set}" = set; then
12261   withval="$with_develop"
12262   with_develop=$withval
12263 else
12264   with_develop=no
12265 fi;
12266 echo "$as_me:12266: result: $with_develop" >&5
12267 echo "${ECHO_T}$with_develop" >&6
12268
12269 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12270 echo "$as_me:12270: checking if you want hard-tabs code" >&5
12271 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12272
12273 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12274 if test "${enable_hard_tabs+set}" = set; then
12275   enableval="$enable_hard_tabs"
12276
12277 else
12278   enable_hard_tabs=$with_develop
12279 fi;
12280 echo "$as_me:12280: result: $enable_hard_tabs" >&5
12281 echo "${ECHO_T}$enable_hard_tabs" >&6
12282 test "x$enable_hard_tabs" = xyes &&
12283 cat >>confdefs.h <<\EOF
12284 #define USE_HARD_TABS 1
12285 EOF
12286
12287 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12288 echo "$as_me:12288: checking if you want limited support for xmc" >&5
12289 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12290
12291 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12292 if test "${enable_xmc_glitch+set}" = set; then
12293   enableval="$enable_xmc_glitch"
12294
12295 else
12296   enable_xmc_glitch=$with_develop
12297 fi;
12298 echo "$as_me:12298: result: $enable_xmc_glitch" >&5
12299 echo "${ECHO_T}$enable_xmc_glitch" >&6
12300 test "x$enable_xmc_glitch" = xyes &&
12301 cat >>confdefs.h <<\EOF
12302 #define USE_XMC_SUPPORT 1
12303 EOF
12304
12305 ###############################################################################
12306 # These are just experimental, probably should not be in a package:
12307
12308 echo "$as_me:12308: checking if you do not want to assume colors are white-on-black" >&5
12309 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12310
12311 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12312 if test "${enable_assumed_color+set}" = set; then
12313   enableval="$enable_assumed_color"
12314   with_assumed_color=$enableval
12315 else
12316   with_assumed_color=yes
12317 fi;
12318 echo "$as_me:12318: result: $with_assumed_color" >&5
12319 echo "${ECHO_T}$with_assumed_color" >&6
12320 test "x$with_assumed_color" = xyes &&
12321 cat >>confdefs.h <<\EOF
12322 #define USE_ASSUMED_COLOR 1
12323 EOF
12324
12325 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12326 echo "$as_me:12326: checking if you want hashmap scrolling-optimization code" >&5
12327 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12328
12329 # Check whether --enable-hashmap or --disable-hashmap was given.
12330 if test "${enable_hashmap+set}" = set; then
12331   enableval="$enable_hashmap"
12332   with_hashmap=$enableval
12333 else
12334   with_hashmap=yes
12335 fi;
12336 echo "$as_me:12336: result: $with_hashmap" >&5
12337 echo "${ECHO_T}$with_hashmap" >&6
12338 test "x$with_hashmap" = xyes &&
12339 cat >>confdefs.h <<\EOF
12340 #define USE_HASHMAP 1
12341 EOF
12342
12343 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12344 echo "$as_me:12344: checking if you want colorfgbg code" >&5
12345 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12346
12347 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12348 if test "${enable_colorfgbg+set}" = set; then
12349   enableval="$enable_colorfgbg"
12350   with_colorfgbg=$enableval
12351 else
12352   with_colorfgbg=no
12353 fi;
12354 echo "$as_me:12354: result: $with_colorfgbg" >&5
12355 echo "${ECHO_T}$with_colorfgbg" >&6
12356 test "x$with_colorfgbg" = xyes &&
12357 cat >>confdefs.h <<\EOF
12358 #define USE_COLORFGBG 1
12359 EOF
12360
12361 ###   use option --enable-interop to turn on use of bindings used for interop
12362 echo "$as_me:12362: checking if you want interop bindings" >&5
12363 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12364
12365 # Check whether --enable-interop or --disable-interop was given.
12366 if test "${enable_interop+set}" = set; then
12367   enableval="$enable_interop"
12368   with_exp_interop=$enableval
12369 else
12370   with_exp_interop=$cf_dft_interop
12371 fi;
12372 echo "$as_me:12372: result: $with_exp_interop" >&5
12373 echo "${ECHO_T}$with_exp_interop" >&6
12374
12375 NCURSES_INTEROP_FUNCS=0
12376 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12377
12378 # This is still experimental (20080329), but should ultimately be moved to
12379 # the script-block --with-normal, etc.
12380
12381 echo "$as_me:12381: checking if you want to link with the pthread library" >&5
12382 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12383
12384 # Check whether --with-pthread or --without-pthread was given.
12385 if test "${with_pthread+set}" = set; then
12386   withval="$with_pthread"
12387   with_pthread=$withval
12388 else
12389   with_pthread=no
12390 fi;
12391 echo "$as_me:12391: result: $with_pthread" >&5
12392 echo "${ECHO_T}$with_pthread" >&6
12393
12394 if test "$with_pthread" != no ; then
12395         echo "$as_me:12395: checking for pthread.h" >&5
12396 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12397 if test "${ac_cv_header_pthread_h+set}" = set; then
12398   echo $ECHO_N "(cached) $ECHO_C" >&6
12399 else
12400   cat >conftest.$ac_ext <<_ACEOF
12401 #line 12401 "configure"
12402 #include "confdefs.h"
12403 #include <pthread.h>
12404 _ACEOF
12405 if { (eval echo "$as_me:12405: \"$ac_cpp conftest.$ac_ext\"") >&5
12406   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12407   ac_status=$?
12408   egrep -v '^ *\+' conftest.er1 >conftest.err
12409   rm -f conftest.er1
12410   cat conftest.err >&5
12411   echo "$as_me:12411: \$? = $ac_status" >&5
12412   (exit $ac_status); } >/dev/null; then
12413   if test -s conftest.err; then
12414     ac_cpp_err=$ac_c_preproc_warn_flag
12415   else
12416     ac_cpp_err=
12417   fi
12418 else
12419   ac_cpp_err=yes
12420 fi
12421 if test -z "$ac_cpp_err"; then
12422   ac_cv_header_pthread_h=yes
12423 else
12424   echo "$as_me: failed program was:" >&5
12425   cat conftest.$ac_ext >&5
12426   ac_cv_header_pthread_h=no
12427 fi
12428 rm -f conftest.err conftest.$ac_ext
12429 fi
12430 echo "$as_me:12430: result: $ac_cv_header_pthread_h" >&5
12431 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12432 if test $ac_cv_header_pthread_h = yes; then
12433
12434 cat >>confdefs.h <<\EOF
12435 #define HAVE_PTHREADS_H 1
12436 EOF
12437
12438         for cf_lib_pthread in pthread c_r
12439         do
12440             echo "$as_me:12440: checking if we can link with the $cf_lib_pthread library" >&5
12441 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12442             cf_save_LIBS="$LIBS"
12443
12444 cf_add_libs="-l$cf_lib_pthread"
12445 # Filter out duplicates - this happens with badly-designed ".pc" files...
12446 for cf_add_1lib in $LIBS
12447 do
12448         for cf_add_2lib in $cf_add_libs
12449         do
12450                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12451                 then
12452                         cf_add_1lib=
12453                         break
12454                 fi
12455         done
12456         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12457 done
12458 LIBS="$cf_add_libs"
12459
12460             cat >conftest.$ac_ext <<_ACEOF
12461 #line 12461 "configure"
12462 #include "confdefs.h"
12463
12464 #include <pthread.h>
12465
12466 int
12467 main ()
12468 {
12469
12470                 int rc = pthread_create(0,0,0,0);
12471                 int r2 = pthread_mutexattr_settype(0, 0);
12472
12473   ;
12474   return 0;
12475 }
12476 _ACEOF
12477 rm -f conftest.$ac_objext conftest$ac_exeext
12478 if { (eval echo "$as_me:12478: \"$ac_link\"") >&5
12479   (eval $ac_link) 2>&5
12480   ac_status=$?
12481   echo "$as_me:12481: \$? = $ac_status" >&5
12482   (exit $ac_status); } &&
12483          { ac_try='test -s conftest$ac_exeext'
12484   { (eval echo "$as_me:12484: \"$ac_try\"") >&5
12485   (eval $ac_try) 2>&5
12486   ac_status=$?
12487   echo "$as_me:12487: \$? = $ac_status" >&5
12488   (exit $ac_status); }; }; then
12489   with_pthread=yes
12490 else
12491   echo "$as_me: failed program was:" >&5
12492 cat conftest.$ac_ext >&5
12493 with_pthread=no
12494 fi
12495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12496             LIBS="$cf_save_LIBS"
12497             echo "$as_me:12497: result: $with_pthread" >&5
12498 echo "${ECHO_T}$with_pthread" >&6
12499             test "$with_pthread" = yes && break
12500         done
12501
12502         if test "$with_pthread" = yes ; then
12503
12504 cf_add_libs="-l$cf_lib_pthread"
12505 # Filter out duplicates - this happens with badly-designed ".pc" files...
12506 for cf_add_1lib in $LIBS
12507 do
12508         for cf_add_2lib in $cf_add_libs
12509         do
12510                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12511                 then
12512                         cf_add_1lib=
12513                         break
12514                 fi
12515         done
12516         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12517 done
12518 LIBS="$cf_add_libs"
12519
12520 cat >>confdefs.h <<\EOF
12521 #define HAVE_LIBPTHREADS 1
12522 EOF
12523
12524         else
12525             { { echo "$as_me:12525: error: Cannot link with pthread library" >&5
12526 echo "$as_me: error: Cannot link with pthread library" >&2;}
12527    { (exit 1); exit 1; }; }
12528         fi
12529
12530 fi
12531
12532 fi
12533
12534 if test "x$with_pthread" != xno; then
12535         echo "$as_me:12535: checking for pthread_kill" >&5
12536 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12537 if test "${ac_cv_func_pthread_kill+set}" = set; then
12538   echo $ECHO_N "(cached) $ECHO_C" >&6
12539 else
12540   cat >conftest.$ac_ext <<_ACEOF
12541 #line 12541 "configure"
12542 #include "confdefs.h"
12543 /* System header to define __stub macros and hopefully few prototypes,
12544     which can conflict with char pthread_kill (); below.  */
12545 #include <assert.h>
12546 /* Override any gcc2 internal prototype to avoid an error.  */
12547 #ifdef __cplusplus
12548 extern "C"
12549 #endif
12550 /* We use char because int might match the return type of a gcc2
12551    builtin and then its argument prototype would still apply.  */
12552 char pthread_kill ();
12553 char (*f) ();
12554
12555 int
12556 main ()
12557 {
12558 /* The GNU C library defines this for functions which it implements
12559     to always fail with ENOSYS.  Some functions are actually named
12560     something starting with __ and the normal name is an alias.  */
12561 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12562 choke me
12563 #else
12564 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12565 #endif
12566
12567   ;
12568   return 0;
12569 }
12570 _ACEOF
12571 rm -f conftest.$ac_objext conftest$ac_exeext
12572 if { (eval echo "$as_me:12572: \"$ac_link\"") >&5
12573   (eval $ac_link) 2>&5
12574   ac_status=$?
12575   echo "$as_me:12575: \$? = $ac_status" >&5
12576   (exit $ac_status); } &&
12577          { ac_try='test -s conftest$ac_exeext'
12578   { (eval echo "$as_me:12578: \"$ac_try\"") >&5
12579   (eval $ac_try) 2>&5
12580   ac_status=$?
12581   echo "$as_me:12581: \$? = $ac_status" >&5
12582   (exit $ac_status); }; }; then
12583   ac_cv_func_pthread_kill=yes
12584 else
12585   echo "$as_me: failed program was:" >&5
12586 cat conftest.$ac_ext >&5
12587 ac_cv_func_pthread_kill=no
12588 fi
12589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12590 fi
12591 echo "$as_me:12591: result: $ac_cv_func_pthread_kill" >&5
12592 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12593 if test $ac_cv_func_pthread_kill = yes; then
12594
12595                 echo "$as_me:12595: checking if you want to allow EINTR in wgetch with pthreads" >&5
12596 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12597
12598 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12599 if test "${enable_pthreads_eintr+set}" = set; then
12600   enableval="$enable_pthreads_eintr"
12601   use_pthreads_eintr=$enableval
12602 else
12603   use_pthreads_eintr=no
12604 fi;
12605                 echo "$as_me:12605: result: $use_pthreads_eintr" >&5
12606 echo "${ECHO_T}$use_pthreads_eintr" >&6
12607                 if test "x$use_pthreads_eintr" = xyes ; then
12608
12609 cat >>confdefs.h <<\EOF
12610 #define USE_PTHREADS_EINTR 1
12611 EOF
12612
12613                 fi
12614 fi
12615
12616         echo "$as_me:12616: checking if you want to use weak-symbols for pthreads" >&5
12617 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12618
12619 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12620 if test "${enable_weak_symbols+set}" = set; then
12621   enableval="$enable_weak_symbols"
12622   use_weak_symbols=$enableval
12623 else
12624   use_weak_symbols=no
12625 fi;
12626         echo "$as_me:12626: result: $use_weak_symbols" >&5
12627 echo "${ECHO_T}$use_weak_symbols" >&6
12628         if test "x$use_weak_symbols" = xyes ; then
12629
12630 echo "$as_me:12630: checking if $CC supports weak symbols" >&5
12631 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12632 if test "${cf_cv_weak_symbols+set}" = set; then
12633   echo $ECHO_N "(cached) $ECHO_C" >&6
12634 else
12635
12636 cat >conftest.$ac_ext <<_ACEOF
12637 #line 12637 "configure"
12638 #include "confdefs.h"
12639
12640 #include <stdio.h>
12641 int
12642 main ()
12643 {
12644
12645 #if defined(__GNUC__)
12646 #  if defined __USE_ISOC99
12647 #    define _cat_pragma(exp)    _Pragma(#exp)
12648 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12649 #  else
12650 #    define _weak_pragma(exp)
12651 #  endif
12652 #  define _declare(name)        __extension__ extern __typeof__(name) name
12653 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12654 #endif
12655
12656 weak_symbol(fopen);
12657
12658   ;
12659   return 0;
12660 }
12661 _ACEOF
12662 rm -f conftest.$ac_objext
12663 if { (eval echo "$as_me:12663: \"$ac_compile\"") >&5
12664   (eval $ac_compile) 2>&5
12665   ac_status=$?
12666   echo "$as_me:12666: \$? = $ac_status" >&5
12667   (exit $ac_status); } &&
12668          { ac_try='test -s conftest.$ac_objext'
12669   { (eval echo "$as_me:12669: \"$ac_try\"") >&5
12670   (eval $ac_try) 2>&5
12671   ac_status=$?
12672   echo "$as_me:12672: \$? = $ac_status" >&5
12673   (exit $ac_status); }; }; then
12674   cf_cv_weak_symbols=yes
12675 else
12676   echo "$as_me: failed program was:" >&5
12677 cat conftest.$ac_ext >&5
12678 cf_cv_weak_symbols=no
12679 fi
12680 rm -f conftest.$ac_objext conftest.$ac_ext
12681
12682 fi
12683 echo "$as_me:12683: result: $cf_cv_weak_symbols" >&5
12684 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12685
12686         else
12687                 cf_cv_weak_symbols=no
12688         fi
12689
12690         if test "x$cf_cv_weak_symbols" = xyes ; then
12691
12692 cat >>confdefs.h <<\EOF
12693 #define USE_WEAK_SYMBOLS 1
12694 EOF
12695
12696         fi
12697 fi
12698
12699 PTHREAD=
12700 if test "x$with_pthread" = "xyes" ; then
12701
12702 cat >>confdefs.h <<\EOF
12703 #define USE_PTHREADS 1
12704 EOF
12705
12706         enable_reentrant=yes
12707         if test "x$cf_cv_weak_symbols" = xyes ; then
12708                 PTHREAD=-lpthread
12709         fi
12710 fi
12711
12712 # Reentrant code has to be opaque; there's little advantage to making ncurses
12713 # opaque outside of that, so there is no --enable-opaque option.  We can use
12714 # this option without --with-pthreads, but this will be always set for
12715 # pthreads.
12716 echo "$as_me:12716: checking if you want reentrant code" >&5
12717 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12718
12719 # Check whether --enable-reentrant or --disable-reentrant was given.
12720 if test "${enable_reentrant+set}" = set; then
12721   enableval="$enable_reentrant"
12722   with_reentrant=$enableval
12723 else
12724   with_reentrant=no
12725 fi;
12726 echo "$as_me:12726: result: $with_reentrant" >&5
12727 echo "${ECHO_T}$with_reentrant" >&6
12728 if test "x$with_reentrant" = xyes ; then
12729         cf_cv_enable_reentrant=1
12730         cf_cv_enable_opaque="NCURSES_INTERNALS"
12731         NCURSES_OPAQUE=1
12732         NCURSES_SIZE_T=int
12733         if test "x$cf_cv_weak_symbols" = xyes ; then
12734
12735 # remove pthread library from $LIBS
12736 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12737
12738 cf_add_libs="-lpthread"
12739 # Filter out duplicates - this happens with badly-designed ".pc" files...
12740 for cf_add_1lib in $TEST_LIBS
12741 do
12742         for cf_add_2lib in $cf_add_libs
12743         do
12744                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12745                 then
12746                         cf_add_1lib=
12747                         break
12748                 fi
12749         done
12750         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12751 done
12752 TEST_LIBS="$cf_add_libs"
12753
12754 cf_add_libs="-lpthread"
12755 # Filter out duplicates - this happens with badly-designed ".pc" files...
12756 for cf_add_1lib in $TEST_LIBS2
12757 do
12758         for cf_add_2lib in $cf_add_libs
12759         do
12760                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12761                 then
12762                         cf_add_1lib=
12763                         break
12764                 fi
12765         done
12766         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12767 done
12768 TEST_LIBS2="$cf_add_libs"
12769
12770         else
12771                 # when not using weak symbols but with_reentrant,
12772                 # add 't' to the library suffix on all platforms
12773                 # except cygwin, where we only do that if ALSO
12774                 # compiling with full thread support.
12775                 case "$host" in
12776                 (*cygwin* | *msys*)
12777                         if test "$with_pthread" = "yes" ; then
12778                                 if test "x$disable_lib_suffixes" = "xno" ; then
12779                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12780                                 fi
12781                         fi ;;
12782                 (*)
12783                         if test "x$disable_lib_suffixes" = "xno" ; then
12784                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12785                         fi
12786                         ;;
12787                 esac
12788         fi
12789
12790 cat >>confdefs.h <<\EOF
12791 #define USE_REENTRANT 1
12792 EOF
12793
12794 if test "${with_abi_version+set}" != set; then
12795         case $cf_cv_rel_version in
12796         (5.*)
12797                 cf_cv_rel_version=6.0
12798                 cf_cv_abi_version=6
12799                 { echo "$as_me:12799: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
12800 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
12801                 ;;
12802         esac
12803 fi
12804
12805 else
12806         cf_cv_enable_reentrant=0
12807         cf_cv_enable_opaque="NCURSES_OPAQUE"
12808         NCURSES_OPAQUE=0
12809         NCURSES_SIZE_T=short
12810 fi
12811
12812 ### Allow using a different wrap-prefix
12813 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12814         echo "$as_me:12814: checking for prefix used to wrap public variables" >&5
12815 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12816
12817 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12818 if test "${with_wrap_prefix+set}" = set; then
12819   withval="$with_wrap_prefix"
12820   NCURSES_WRAP_PREFIX=$withval
12821 else
12822   NCURSES_WRAP_PREFIX=_nc_
12823 fi;
12824         echo "$as_me:12824: result: $NCURSES_WRAP_PREFIX" >&5
12825 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12826 else
12827         NCURSES_WRAP_PREFIX=_nc_
12828 fi
12829
12830 cat >>confdefs.h <<EOF
12831 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12832 EOF
12833
12834 echo "$as_me:12834: checking if you want experimental safe-sprintf code" >&5
12835 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12836
12837 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12838 if test "${enable_safe_sprintf+set}" = set; then
12839   enableval="$enable_safe_sprintf"
12840   with_safe_sprintf=$enableval
12841 else
12842   with_safe_sprintf=no
12843 fi;
12844 echo "$as_me:12844: result: $with_safe_sprintf" >&5
12845 echo "${ECHO_T}$with_safe_sprintf" >&6
12846 test "x$with_safe_sprintf" = xyes &&
12847 cat >>confdefs.h <<\EOF
12848 #define USE_SAFE_SPRINTF 1
12849 EOF
12850
12851 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12852 # when hashmap is used scroll hints are useless
12853 if test "$with_hashmap" = no ; then
12854 echo "$as_me:12854: checking if you want to experiment without scrolling-hints code" >&5
12855 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12856
12857 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12858 if test "${enable_scroll_hints+set}" = set; then
12859   enableval="$enable_scroll_hints"
12860   with_scroll_hints=$enableval
12861 else
12862   with_scroll_hints=yes
12863 fi;
12864 echo "$as_me:12864: result: $with_scroll_hints" >&5
12865 echo "${ECHO_T}$with_scroll_hints" >&6
12866 test "x$with_scroll_hints" = xyes &&
12867 cat >>confdefs.h <<\EOF
12868 #define USE_SCROLL_HINTS 1
12869 EOF
12870
12871 fi
12872
12873 echo "$as_me:12873: checking if you want wgetch-events code" >&5
12874 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
12875
12876 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12877 if test "${enable_wgetch_events+set}" = set; then
12878   enableval="$enable_wgetch_events"
12879   with_wgetch_events=$enableval
12880 else
12881   with_wgetch_events=no
12882 fi;
12883 echo "$as_me:12883: result: $with_wgetch_events" >&5
12884 echo "${ECHO_T}$with_wgetch_events" >&6
12885 test "x$with_wgetch_events" = xyes &&
12886 cat >>confdefs.h <<\EOF
12887 #define NCURSES_WGETCH_EVENTS 1
12888 EOF
12889
12890 ###############################################################################
12891
12892 ###     use option --disable-echo to suppress full display compiling commands
12893
12894 echo "$as_me:12894: checking if you want to see long compiling messages" >&5
12895 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12896
12897 # Check whether --enable-echo or --disable-echo was given.
12898 if test "${enable_echo+set}" = set; then
12899   enableval="$enable_echo"
12900   test "$enableval" != no && enableval=yes
12901         if test "$enableval" != "yes" ; then
12902
12903         ECHO_LT='--silent'
12904         ECHO_LD='@echo linking $@;'
12905         RULE_CC='@echo compiling $<'
12906         SHOW_CC='@echo compiling $@'
12907         ECHO_CC='@'
12908
12909         else
12910
12911         ECHO_LT=''
12912         ECHO_LD=''
12913         RULE_CC=''
12914         SHOW_CC=''
12915         ECHO_CC=''
12916
12917         fi
12918 else
12919   enableval=yes
12920
12921         ECHO_LT=''
12922         ECHO_LD=''
12923         RULE_CC=''
12924         SHOW_CC=''
12925         ECHO_CC=''
12926
12927 fi;
12928 echo "$as_me:12928: result: $enableval" >&5
12929 echo "${ECHO_T}$enableval" >&6
12930
12931 if test "x$enable_echo" = xyes; then
12932         ECHO_LINK=
12933 else
12934         ECHO_LINK='@ echo linking $@ ... ;'
12935         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12936         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12937 fi
12938
12939 ###     use option --enable-warnings to turn on all gcc warnings
12940 echo "$as_me:12940: checking if you want to see compiler warnings" >&5
12941 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12942
12943 # Check whether --enable-warnings or --disable-warnings was given.
12944 if test "${enable_warnings+set}" = set; then
12945   enableval="$enable_warnings"
12946   with_warnings=$enableval
12947 fi;
12948 echo "$as_me:12948: result: $with_warnings" >&5
12949 echo "${ECHO_T}$with_warnings" >&6
12950
12951 if test "x$with_warnings" = "xyes"; then
12952
12953         ADAFLAGS="$ADAFLAGS -gnatg"
12954
12955 INTEL_COMPILER=no
12956
12957 if test "$GCC" = yes ; then
12958         case $host_os in
12959         (linux*|gnu*)
12960                 echo "$as_me:12960: checking if this is really Intel C compiler" >&5
12961 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12962                 cf_save_CFLAGS="$CFLAGS"
12963                 CFLAGS="$CFLAGS -no-gcc"
12964                 cat >conftest.$ac_ext <<_ACEOF
12965 #line 12965 "configure"
12966 #include "confdefs.h"
12967
12968 int
12969 main ()
12970 {
12971
12972 #ifdef __INTEL_COMPILER
12973 #else
12974 make an error
12975 #endif
12976
12977   ;
12978   return 0;
12979 }
12980 _ACEOF
12981 rm -f conftest.$ac_objext
12982 if { (eval echo "$as_me:12982: \"$ac_compile\"") >&5
12983   (eval $ac_compile) 2>&5
12984   ac_status=$?
12985   echo "$as_me:12985: \$? = $ac_status" >&5
12986   (exit $ac_status); } &&
12987          { ac_try='test -s conftest.$ac_objext'
12988   { (eval echo "$as_me:12988: \"$ac_try\"") >&5
12989   (eval $ac_try) 2>&5
12990   ac_status=$?
12991   echo "$as_me:12991: \$? = $ac_status" >&5
12992   (exit $ac_status); }; }; then
12993   INTEL_COMPILER=yes
12994 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12995
12996 else
12997   echo "$as_me: failed program was:" >&5
12998 cat conftest.$ac_ext >&5
12999 fi
13000 rm -f conftest.$ac_objext conftest.$ac_ext
13001                 CFLAGS="$cf_save_CFLAGS"
13002                 echo "$as_me:13002: result: $INTEL_COMPILER" >&5
13003 echo "${ECHO_T}$INTEL_COMPILER" >&6
13004                 ;;
13005         esac
13006 fi
13007
13008 CLANG_COMPILER=no
13009
13010 if test "$GCC" = yes ; then
13011         echo "$as_me:13011: checking if this is really Clang C compiler" >&5
13012 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
13013         cf_save_CFLAGS="$CFLAGS"
13014         CFLAGS="$CFLAGS -Qunused-arguments"
13015         cat >conftest.$ac_ext <<_ACEOF
13016 #line 13016 "configure"
13017 #include "confdefs.h"
13018
13019 int
13020 main ()
13021 {
13022
13023 #ifdef __clang__
13024 #else
13025 make an error
13026 #endif
13027
13028   ;
13029   return 0;
13030 }
13031 _ACEOF
13032 rm -f conftest.$ac_objext
13033 if { (eval echo "$as_me:13033: \"$ac_compile\"") >&5
13034   (eval $ac_compile) 2>&5
13035   ac_status=$?
13036   echo "$as_me:13036: \$? = $ac_status" >&5
13037   (exit $ac_status); } &&
13038          { ac_try='test -s conftest.$ac_objext'
13039   { (eval echo "$as_me:13039: \"$ac_try\"") >&5
13040   (eval $ac_try) 2>&5
13041   ac_status=$?
13042   echo "$as_me:13042: \$? = $ac_status" >&5
13043   (exit $ac_status); }; }; then
13044   CLANG_COMPILER=yes
13045 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13046
13047 else
13048   echo "$as_me: failed program was:" >&5
13049 cat conftest.$ac_ext >&5
13050 fi
13051 rm -f conftest.$ac_objext conftest.$ac_ext
13052         CFLAGS="$cf_save_CFLAGS"
13053         echo "$as_me:13053: result: $CLANG_COMPILER" >&5
13054 echo "${ECHO_T}$CLANG_COMPILER" >&6
13055 fi
13056
13057 cat > conftest.$ac_ext <<EOF
13058 #line 13058 "${as_me:-configure}"
13059 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13060 EOF
13061
13062 if test "$INTEL_COMPILER" = yes
13063 then
13064 # The "-wdXXX" options suppress warnings:
13065 # remark #1419: external declaration in primary source file
13066 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13067 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13068 # remark #193: zero used for undefined preprocessing identifier
13069 # remark #593: variable "curs_sb_left_arrow" was set but never used
13070 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13071 # remark #869: parameter "tw" was never referenced
13072 # remark #981: operands are evaluated in unspecified order
13073 # warning #279: controlling expression is constant
13074
13075         { echo "$as_me:13075: checking for $CC warning options..." >&5
13076 echo "$as_me: checking for $CC warning options..." >&6;}
13077         cf_save_CFLAGS="$CFLAGS"
13078         EXTRA_CFLAGS="-Wall"
13079         for cf_opt in \
13080                 wd1419 \
13081                 wd1683 \
13082                 wd1684 \
13083                 wd193 \
13084                 wd593 \
13085                 wd279 \
13086                 wd810 \
13087                 wd869 \
13088                 wd981
13089         do
13090                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13091                 if { (eval echo "$as_me:13091: \"$ac_compile\"") >&5
13092   (eval $ac_compile) 2>&5
13093   ac_status=$?
13094   echo "$as_me:13094: \$? = $ac_status" >&5
13095   (exit $ac_status); }; then
13096                         test -n "$verbose" && echo "$as_me:13096: result: ... -$cf_opt" >&5
13097 echo "${ECHO_T}... -$cf_opt" >&6
13098                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13099                 fi
13100         done
13101         CFLAGS="$cf_save_CFLAGS"
13102
13103 elif test "$GCC" = yes
13104 then
13105         { echo "$as_me:13105: checking for $CC warning options..." >&5
13106 echo "$as_me: checking for $CC warning options..." >&6;}
13107         cf_save_CFLAGS="$CFLAGS"
13108         EXTRA_CFLAGS=
13109         cf_warn_CONST=""
13110         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13111         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13112         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13113         for cf_opt in W Wall \
13114                 Wbad-function-cast \
13115                 Wcast-align \
13116                 Wcast-qual \
13117                 Wdeclaration-after-statement \
13118                 Wextra \
13119                 Winline \
13120                 Wmissing-declarations \
13121                 Wmissing-prototypes \
13122                 Wnested-externs \
13123                 Wpointer-arith \
13124                 Wshadow \
13125                 Wstrict-prototypes \
13126                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13127         do
13128                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13129                 if { (eval echo "$as_me:13129: \"$ac_compile\"") >&5
13130   (eval $ac_compile) 2>&5
13131   ac_status=$?
13132   echo "$as_me:13132: \$? = $ac_status" >&5
13133   (exit $ac_status); }; then
13134                         test -n "$verbose" && echo "$as_me:13134: result: ... -$cf_opt" >&5
13135 echo "${ECHO_T}... -$cf_opt" >&6
13136                         case $cf_opt in
13137                         (Wcast-qual)
13138                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13139                                 ;;
13140                         (Winline)
13141                                 case $GCC_VERSION in
13142                                 ([34].*)
13143                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13144
13145 echo "${as_me:-configure}:13145: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13146
13147                                         continue;;
13148                                 esac
13149                                 ;;
13150                         (Wpointer-arith)
13151                                 case $GCC_VERSION in
13152                                 ([12].*)
13153                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13154
13155 echo "${as_me:-configure}:13155: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13156
13157                                         continue;;
13158                                 esac
13159                                 ;;
13160                         esac
13161                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13162                 fi
13163         done
13164         CFLAGS="$cf_save_CFLAGS"
13165 fi
13166 rm -rf conftest*
13167
13168         if test "x$cf_with_cxx" = xyes ; then
13169
13170 INTEL_CPLUSPLUS=no
13171
13172 if test "$GCC" = yes ; then
13173         case $host_os in
13174         (linux*|gnu*)
13175                 echo "$as_me:13175: checking if this is really Intel C++ compiler" >&5
13176 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13177                 cf_save_CFLAGS="$CXXFLAGS"
13178                 CXXFLAGS="$CXXFLAGS -no-gcc"
13179                 cat >conftest.$ac_ext <<_ACEOF
13180 #line 13180 "configure"
13181 #include "confdefs.h"
13182
13183 int
13184 main ()
13185 {
13186
13187 #ifdef __INTEL_COMPILER
13188 #else
13189 make an error
13190 #endif
13191
13192   ;
13193   return 0;
13194 }
13195 _ACEOF
13196 rm -f conftest.$ac_objext
13197 if { (eval echo "$as_me:13197: \"$ac_compile\"") >&5
13198   (eval $ac_compile) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit $ac_status); } &&
13202          { ac_try='test -s conftest.$ac_objext'
13203   { (eval echo "$as_me:13203: \"$ac_try\"") >&5
13204   (eval $ac_try) 2>&5
13205   ac_status=$?
13206   echo "$as_me:13206: \$? = $ac_status" >&5
13207   (exit $ac_status); }; }; then
13208   INTEL_CPLUSPLUS=yes
13209 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13210
13211 else
13212   echo "$as_me: failed program was:" >&5
13213 cat conftest.$ac_ext >&5
13214 fi
13215 rm -f conftest.$ac_objext conftest.$ac_ext
13216                 CXXFLAGS="$cf_save_CFLAGS"
13217                 echo "$as_me:13217: result: $INTEL_CPLUSPLUS" >&5
13218 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13219                 ;;
13220         esac
13221 fi
13222
13223 CLANG_CPLUSPLUS=no
13224
13225 if test "$GCC" = yes ; then
13226         echo "$as_me:13226: checking if this is really Clang C++ compiler" >&5
13227 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13228         cf_save_CFLAGS="$CXXFLAGS"
13229         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13230         cat >conftest.$ac_ext <<_ACEOF
13231 #line 13231 "configure"
13232 #include "confdefs.h"
13233
13234 int
13235 main ()
13236 {
13237
13238 #ifdef __clang__
13239 #else
13240 make an error
13241 #endif
13242
13243   ;
13244   return 0;
13245 }
13246 _ACEOF
13247 rm -f conftest.$ac_objext
13248 if { (eval echo "$as_me:13248: \"$ac_compile\"") >&5
13249   (eval $ac_compile) 2>&5
13250   ac_status=$?
13251   echo "$as_me:13251: \$? = $ac_status" >&5
13252   (exit $ac_status); } &&
13253          { ac_try='test -s conftest.$ac_objext'
13254   { (eval echo "$as_me:13254: \"$ac_try\"") >&5
13255   (eval $ac_try) 2>&5
13256   ac_status=$?
13257   echo "$as_me:13257: \$? = $ac_status" >&5
13258   (exit $ac_status); }; }; then
13259   CLANG_CPLUSPLUS=yes
13260 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13261
13262 else
13263   echo "$as_me: failed program was:" >&5
13264 cat conftest.$ac_ext >&5
13265 fi
13266 rm -f conftest.$ac_objext conftest.$ac_ext
13267         CXXFLAGS="$cf_save_CFLAGS"
13268         echo "$as_me:13268: result: $CLANG_CPLUSPLUS" >&5
13269 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13270 fi
13271
13272 ac_ext=cc
13273 ac_cpp='$CXXCPP $CPPFLAGS'
13274 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13275 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13276 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13277 ac_main_return=return
13278
13279 cat > conftest.$ac_ext <<EOF
13280 #line 13280 "configure"
13281 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13282 EOF
13283
13284 if test "$INTEL_CPLUSPLUS" = yes
13285 then
13286 # The "-wdXXX" options suppress warnings:
13287 # remark #1419: external declaration in primary source file
13288 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13289 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13290 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13291 # remark #193: zero used for undefined preprocessing identifier
13292 # remark #593: variable "curs_sb_left_arrow" was set but never used
13293 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13294 # remark #869: parameter "tw" was never referenced
13295 # remark #981: operands are evaluated in unspecified order
13296 # warning #269: invalid format string conversion
13297
13298         { echo "$as_me:13298: checking for $CC warning options..." >&5
13299 echo "$as_me: checking for $CC warning options..." >&6;}
13300         cf_save_CXXFLAGS="$CXXFLAGS"
13301         EXTRA_CXXFLAGS="-Wall"
13302         for cf_opt in \
13303                 wd1419 \
13304                 wd1682 \
13305                 wd1683 \
13306                 wd1684 \
13307                 wd193 \
13308                 wd279 \
13309                 wd593 \
13310                 wd810 \
13311                 wd869 \
13312                 wd981
13313         do
13314                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13315                 if { (eval echo "$as_me:13315: \"$ac_compile\"") >&5
13316   (eval $ac_compile) 2>&5
13317   ac_status=$?
13318   echo "$as_me:13318: \$? = $ac_status" >&5
13319   (exit $ac_status); }; then
13320                         test -n "$verbose" && echo "$as_me:13320: result: ... -$cf_opt" >&5
13321 echo "${ECHO_T}... -$cf_opt" >&6
13322                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13323                 fi
13324         done
13325         CXXFLAGS="$cf_save_CXXFLAGS"
13326
13327 elif test "$GXX" = yes
13328 then
13329         { echo "$as_me:13329: checking for $CXX warning options..." >&5
13330 echo "$as_me: checking for $CXX warning options..." >&6;}
13331         cf_save_CXXFLAGS="$CXXFLAGS"
13332         EXTRA_CXXFLAGS="-W -Wall"
13333         cf_gxx_extra_warnings=""
13334         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13335         case "$GCC_VERSION" in
13336         ([1-2].*)
13337                 ;;
13338         (*)
13339                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13340                 ;;
13341         esac
13342         for cf_opt in \
13343                 Wabi \
13344                 fabi-version=0 \
13345                 Wextra \
13346                 Wignored-qualifiers \
13347                 Wlogical-op \
13348                 Woverloaded-virtual \
13349                 Wsign-promo \
13350                 Wsynth \
13351                 Wold-style-cast \
13352                 Wcast-align \
13353                 Wcast-qual \
13354                 Wpointer-arith \
13355                 Wshadow \
13356                 Wundef $cf_gxx_extra_warnings Wno-unused
13357         do
13358                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13359                 if { (eval echo "$as_me:13359: \"$ac_compile\"") >&5
13360   (eval $ac_compile) 2>&5
13361   ac_status=$?
13362   echo "$as_me:13362: \$? = $ac_status" >&5
13363   (exit $ac_status); }; then
13364                         test -n "$verbose" && echo "$as_me:13364: result: ... -$cf_opt" >&5
13365 echo "${ECHO_T}... -$cf_opt" >&6
13366                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13367                 else
13368                         test -n "$verbose" && echo "$as_me:13368: result: ... no -$cf_opt" >&5
13369 echo "${ECHO_T}... no -$cf_opt" >&6
13370                 fi
13371         done
13372         CXXFLAGS="$cf_save_CXXFLAGS"
13373 fi
13374
13375 rm -rf conftest*
13376 ac_ext=c
13377 ac_cpp='$CPP $CPPFLAGS'
13378 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13379 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13380 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13381 ac_main_return=return
13382
13383         fi
13384 fi
13385
13386 if test "$GCC" = yes
13387 then
13388 cat > conftest.i <<EOF
13389 #ifndef GCC_PRINTF
13390 #define GCC_PRINTF 0
13391 #endif
13392 #ifndef GCC_SCANF
13393 #define GCC_SCANF 0
13394 #endif
13395 #ifndef GCC_NORETURN
13396 #define GCC_NORETURN /* nothing */
13397 #endif
13398 #ifndef GCC_UNUSED
13399 #define GCC_UNUSED /* nothing */
13400 #endif
13401 EOF
13402 if test "$GCC" = yes
13403 then
13404         { echo "$as_me:13404: checking for $CC __attribute__ directives..." >&5
13405 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13406 cat > conftest.$ac_ext <<EOF
13407 #line 13407 "${as_me:-configure}"
13408 #include "confdefs.h"
13409 #include "conftest.h"
13410 #include "conftest.i"
13411 #if     GCC_PRINTF
13412 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13413 #else
13414 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13415 #endif
13416 #if     GCC_SCANF
13417 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13418 #else
13419 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13420 #endif
13421 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13422 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13423 extern void foo(void) GCC_NORETURN;
13424 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13425 EOF
13426         cf_printf_attribute=no
13427         cf_scanf_attribute=no
13428         for cf_attribute in scanf printf unused noreturn
13429         do
13430
13431 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13432
13433                 cf_directive="__attribute__(($cf_attribute))"
13434                 echo "checking for $CC $cf_directive" 1>&5
13435
13436                 case $cf_attribute in
13437                 (printf)
13438                         cf_printf_attribute=yes
13439                         cat >conftest.h <<EOF
13440 #define GCC_$cf_ATTRIBUTE 1
13441 EOF
13442                         ;;
13443                 (scanf)
13444                         cf_scanf_attribute=yes
13445                         cat >conftest.h <<EOF
13446 #define GCC_$cf_ATTRIBUTE 1
13447 EOF
13448                         ;;
13449                 (*)
13450                         cat >conftest.h <<EOF
13451 #define GCC_$cf_ATTRIBUTE $cf_directive
13452 EOF
13453                         ;;
13454                 esac
13455
13456                 if { (eval echo "$as_me:13456: \"$ac_compile\"") >&5
13457   (eval $ac_compile) 2>&5
13458   ac_status=$?
13459   echo "$as_me:13459: \$? = $ac_status" >&5
13460   (exit $ac_status); }; then
13461                         test -n "$verbose" && echo "$as_me:13461: result: ... $cf_attribute" >&5
13462 echo "${ECHO_T}... $cf_attribute" >&6
13463                         cat conftest.h >>confdefs.h
13464                         case $cf_attribute in
13465                         (noreturn)
13466
13467 cat >>confdefs.h <<EOF
13468 #define GCC_NORETURN $cf_directive
13469 EOF
13470
13471                                 ;;
13472                         (printf)
13473                                 cf_value='/* nothing */'
13474                                 if test "$cf_printf_attribute" != no ; then
13475                                         cf_value='__attribute__((format(printf,fmt,var)))'
13476
13477 cat >>confdefs.h <<\EOF
13478 #define GCC_PRINTF 1
13479 EOF
13480
13481                                 fi
13482
13483 cat >>confdefs.h <<EOF
13484 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13485 EOF
13486
13487                                 ;;
13488                         (scanf)
13489                                 cf_value='/* nothing */'
13490                                 if test "$cf_scanf_attribute" != no ; then
13491                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13492
13493 cat >>confdefs.h <<\EOF
13494 #define GCC_SCANF 1
13495 EOF
13496
13497                                 fi
13498
13499 cat >>confdefs.h <<EOF
13500 #define GCC_SCANFLIKE(fmt,var) $cf_value
13501 EOF
13502
13503                                 ;;
13504                         (unused)
13505
13506 cat >>confdefs.h <<EOF
13507 #define GCC_UNUSED $cf_directive
13508 EOF
13509
13510                                 ;;
13511                         esac
13512                 fi
13513         done
13514 else
13515         fgrep define conftest.i >>confdefs.h
13516 fi
13517 rm -rf conftest*
13518 fi
13519
13520 echo "$as_me:13520: checking if you want to work around bogus compiler/loader warnings" >&5
13521 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13522
13523 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13524 if test "${enable_string_hacks+set}" = set; then
13525   enableval="$enable_string_hacks"
13526   with_string_hacks=$enableval
13527 else
13528   with_string_hacks=no
13529 fi;
13530 echo "$as_me:13530: result: $with_string_hacks" >&5
13531 echo "${ECHO_T}$with_string_hacks" >&6
13532
13533 if test "x$with_string_hacks" = "xyes"; then
13534
13535 cat >>confdefs.h <<\EOF
13536 #define USE_STRING_HACKS 1
13537 EOF
13538
13539         { echo "$as_me:13539: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13540 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13541
13542 for ac_func in strlcat strlcpy snprintf
13543 do
13544 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13545 echo "$as_me:13545: checking for $ac_func" >&5
13546 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13547 if eval "test \"\${$as_ac_var+set}\" = set"; then
13548   echo $ECHO_N "(cached) $ECHO_C" >&6
13549 else
13550   cat >conftest.$ac_ext <<_ACEOF
13551 #line 13551 "configure"
13552 #include "confdefs.h"
13553 /* System header to define __stub macros and hopefully few prototypes,
13554     which can conflict with char $ac_func (); below.  */
13555 #include <assert.h>
13556 /* Override any gcc2 internal prototype to avoid an error.  */
13557 #ifdef __cplusplus
13558 extern "C"
13559 #endif
13560 /* We use char because int might match the return type of a gcc2
13561    builtin and then its argument prototype would still apply.  */
13562 char $ac_func ();
13563 char (*f) ();
13564
13565 int
13566 main ()
13567 {
13568 /* The GNU C library defines this for functions which it implements
13569     to always fail with ENOSYS.  Some functions are actually named
13570     something starting with __ and the normal name is an alias.  */
13571 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13572 choke me
13573 #else
13574 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13575 #endif
13576
13577   ;
13578   return 0;
13579 }
13580 _ACEOF
13581 rm -f conftest.$ac_objext conftest$ac_exeext
13582 if { (eval echo "$as_me:13582: \"$ac_link\"") >&5
13583   (eval $ac_link) 2>&5
13584   ac_status=$?
13585   echo "$as_me:13585: \$? = $ac_status" >&5
13586   (exit $ac_status); } &&
13587          { ac_try='test -s conftest$ac_exeext'
13588   { (eval echo "$as_me:13588: \"$ac_try\"") >&5
13589   (eval $ac_try) 2>&5
13590   ac_status=$?
13591   echo "$as_me:13591: \$? = $ac_status" >&5
13592   (exit $ac_status); }; }; then
13593   eval "$as_ac_var=yes"
13594 else
13595   echo "$as_me: failed program was:" >&5
13596 cat conftest.$ac_ext >&5
13597 eval "$as_ac_var=no"
13598 fi
13599 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13600 fi
13601 echo "$as_me:13601: result: `eval echo '${'$as_ac_var'}'`" >&5
13602 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13603 if test `eval echo '${'$as_ac_var'}'` = yes; then
13604   cat >>confdefs.h <<EOF
13605 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13606 EOF
13607
13608 fi
13609 done
13610
13611 fi
13612
13613 ###     use option --enable-assertions to turn on generation of assertion code
13614 echo "$as_me:13614: checking if you want to enable runtime assertions" >&5
13615 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13616
13617 # Check whether --enable-assertions or --disable-assertions was given.
13618 if test "${enable_assertions+set}" = set; then
13619   enableval="$enable_assertions"
13620   with_assertions=$enableval
13621 else
13622   with_assertions=no
13623 fi;
13624 echo "$as_me:13624: result: $with_assertions" >&5
13625 echo "${ECHO_T}$with_assertions" >&6
13626 if test -n "$GCC"
13627 then
13628         if test "$with_assertions" = no
13629         then
13630                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13631         else
13632
13633         ADAFLAGS="$ADAFLAGS -gnata"
13634
13635         fi
13636 fi
13637
13638 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13639
13640 echo "$as_me:13640: checking if you want to use dmalloc for testing" >&5
13641 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13642
13643 # Check whether --with-dmalloc or --without-dmalloc was given.
13644 if test "${with_dmalloc+set}" = set; then
13645   withval="$with_dmalloc"
13646
13647 cat >>confdefs.h <<EOF
13648 #define USE_DMALLOC 1
13649 EOF
13650
13651         : ${with_cflags:=-g}
13652         : ${with_no_leaks:=yes}
13653          with_dmalloc=yes
13654 else
13655   with_dmalloc=
13656 fi;
13657 echo "$as_me:13657: result: ${with_dmalloc:-no}" >&5
13658 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13659
13660 case .$with_cflags in
13661 (.*-g*)
13662         case .$CFLAGS in
13663         (.*-g*)
13664                 ;;
13665         (*)
13666
13667 cf_fix_cppflags=no
13668 cf_new_cflags=
13669 cf_new_cppflags=
13670 cf_new_extra_cppflags=
13671
13672 for cf_add_cflags in -g
13673 do
13674 case $cf_fix_cppflags in
13675 (no)
13676         case $cf_add_cflags in
13677         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13678                 case $cf_add_cflags in
13679                 (-D*)
13680                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13681
13682                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13683                                 && test -z "${cf_tst_cflags}" \
13684                                 && cf_fix_cppflags=yes
13685
13686                         if test $cf_fix_cppflags = yes ; then
13687                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13688                                 continue
13689                         elif test "${cf_tst_cflags}" = "\"'" ; then
13690                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13691                                 continue
13692                         fi
13693                         ;;
13694                 esac
13695                 case "$CPPFLAGS" in
13696                 (*$cf_add_cflags)
13697                         ;;
13698                 (*)
13699                         case $cf_add_cflags in
13700                         (-D*)
13701                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13702
13703 CPPFLAGS=`echo "$CPPFLAGS" | \
13704         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13705                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13706
13707                                 ;;
13708                         esac
13709                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13710                         ;;
13711                 esac
13712                 ;;
13713         (*)
13714                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13715                 ;;
13716         esac
13717         ;;
13718 (yes)
13719         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13720
13721         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13722
13723         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13724                 && test -z "${cf_tst_cflags}" \
13725                 && cf_fix_cppflags=no
13726         ;;
13727 esac
13728 done
13729
13730 if test -n "$cf_new_cflags" ; then
13731
13732         CFLAGS="$CFLAGS $cf_new_cflags"
13733 fi
13734
13735 if test -n "$cf_new_cppflags" ; then
13736
13737         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13738 fi
13739
13740 if test -n "$cf_new_extra_cppflags" ; then
13741
13742         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13743 fi
13744
13745                 ;;
13746         esac
13747         ;;
13748 esac
13749
13750 if test "$with_dmalloc" = yes ; then
13751         echo "$as_me:13751: checking for dmalloc.h" >&5
13752 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13753 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13754   echo $ECHO_N "(cached) $ECHO_C" >&6
13755 else
13756   cat >conftest.$ac_ext <<_ACEOF
13757 #line 13757 "configure"
13758 #include "confdefs.h"
13759 #include <dmalloc.h>
13760 _ACEOF
13761 if { (eval echo "$as_me:13761: \"$ac_cpp conftest.$ac_ext\"") >&5
13762   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13763   ac_status=$?
13764   egrep -v '^ *\+' conftest.er1 >conftest.err
13765   rm -f conftest.er1
13766   cat conftest.err >&5
13767   echo "$as_me:13767: \$? = $ac_status" >&5
13768   (exit $ac_status); } >/dev/null; then
13769   if test -s conftest.err; then
13770     ac_cpp_err=$ac_c_preproc_warn_flag
13771   else
13772     ac_cpp_err=
13773   fi
13774 else
13775   ac_cpp_err=yes
13776 fi
13777 if test -z "$ac_cpp_err"; then
13778   ac_cv_header_dmalloc_h=yes
13779 else
13780   echo "$as_me: failed program was:" >&5
13781   cat conftest.$ac_ext >&5
13782   ac_cv_header_dmalloc_h=no
13783 fi
13784 rm -f conftest.err conftest.$ac_ext
13785 fi
13786 echo "$as_me:13786: result: $ac_cv_header_dmalloc_h" >&5
13787 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13788 if test $ac_cv_header_dmalloc_h = yes; then
13789
13790 echo "$as_me:13790: checking for dmalloc_debug in -ldmalloc" >&5
13791 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13792 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13793   echo $ECHO_N "(cached) $ECHO_C" >&6
13794 else
13795   ac_check_lib_save_LIBS=$LIBS
13796 LIBS="-ldmalloc  $LIBS"
13797 cat >conftest.$ac_ext <<_ACEOF
13798 #line 13798 "configure"
13799 #include "confdefs.h"
13800
13801 /* Override any gcc2 internal prototype to avoid an error.  */
13802 #ifdef __cplusplus
13803 extern "C"
13804 #endif
13805 /* We use char because int might match the return type of a gcc2
13806    builtin and then its argument prototype would still apply.  */
13807 char dmalloc_debug ();
13808 int
13809 main ()
13810 {
13811 dmalloc_debug ();
13812   ;
13813   return 0;
13814 }
13815 _ACEOF
13816 rm -f conftest.$ac_objext conftest$ac_exeext
13817 if { (eval echo "$as_me:13817: \"$ac_link\"") >&5
13818   (eval $ac_link) 2>&5
13819   ac_status=$?
13820   echo "$as_me:13820: \$? = $ac_status" >&5
13821   (exit $ac_status); } &&
13822          { ac_try='test -s conftest$ac_exeext'
13823   { (eval echo "$as_me:13823: \"$ac_try\"") >&5
13824   (eval $ac_try) 2>&5
13825   ac_status=$?
13826   echo "$as_me:13826: \$? = $ac_status" >&5
13827   (exit $ac_status); }; }; then
13828   ac_cv_lib_dmalloc_dmalloc_debug=yes
13829 else
13830   echo "$as_me: failed program was:" >&5
13831 cat conftest.$ac_ext >&5
13832 ac_cv_lib_dmalloc_dmalloc_debug=no
13833 fi
13834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13835 LIBS=$ac_check_lib_save_LIBS
13836 fi
13837 echo "$as_me:13837: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13838 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13839 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13840   cat >>confdefs.h <<EOF
13841 #define HAVE_LIBDMALLOC 1
13842 EOF
13843
13844   LIBS="-ldmalloc $LIBS"
13845
13846 fi
13847
13848 fi
13849
13850 fi
13851
13852 echo "$as_me:13852: checking if you want to use dbmalloc for testing" >&5
13853 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13854
13855 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13856 if test "${with_dbmalloc+set}" = set; then
13857   withval="$with_dbmalloc"
13858
13859 cat >>confdefs.h <<EOF
13860 #define USE_DBMALLOC 1
13861 EOF
13862
13863         : ${with_cflags:=-g}
13864         : ${with_no_leaks:=yes}
13865          with_dbmalloc=yes
13866 else
13867   with_dbmalloc=
13868 fi;
13869 echo "$as_me:13869: result: ${with_dbmalloc:-no}" >&5
13870 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13871
13872 case .$with_cflags in
13873 (.*-g*)
13874         case .$CFLAGS in
13875         (.*-g*)
13876                 ;;
13877         (*)
13878
13879 cf_fix_cppflags=no
13880 cf_new_cflags=
13881 cf_new_cppflags=
13882 cf_new_extra_cppflags=
13883
13884 for cf_add_cflags in -g
13885 do
13886 case $cf_fix_cppflags in
13887 (no)
13888         case $cf_add_cflags in
13889         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13890                 case $cf_add_cflags in
13891                 (-D*)
13892                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13893
13894                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13895                                 && test -z "${cf_tst_cflags}" \
13896                                 && cf_fix_cppflags=yes
13897
13898                         if test $cf_fix_cppflags = yes ; then
13899                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13900                                 continue
13901                         elif test "${cf_tst_cflags}" = "\"'" ; then
13902                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13903                                 continue
13904                         fi
13905                         ;;
13906                 esac
13907                 case "$CPPFLAGS" in
13908                 (*$cf_add_cflags)
13909                         ;;
13910                 (*)
13911                         case $cf_add_cflags in
13912                         (-D*)
13913                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13914
13915 CPPFLAGS=`echo "$CPPFLAGS" | \
13916         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13917                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13918
13919                                 ;;
13920                         esac
13921                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13922                         ;;
13923                 esac
13924                 ;;
13925         (*)
13926                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13927                 ;;
13928         esac
13929         ;;
13930 (yes)
13931         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13932
13933         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13934
13935         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13936                 && test -z "${cf_tst_cflags}" \
13937                 && cf_fix_cppflags=no
13938         ;;
13939 esac
13940 done
13941
13942 if test -n "$cf_new_cflags" ; then
13943
13944         CFLAGS="$CFLAGS $cf_new_cflags"
13945 fi
13946
13947 if test -n "$cf_new_cppflags" ; then
13948
13949         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13950 fi
13951
13952 if test -n "$cf_new_extra_cppflags" ; then
13953
13954         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13955 fi
13956
13957                 ;;
13958         esac
13959         ;;
13960 esac
13961
13962 if test "$with_dbmalloc" = yes ; then
13963         echo "$as_me:13963: checking for dbmalloc.h" >&5
13964 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13965 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13966   echo $ECHO_N "(cached) $ECHO_C" >&6
13967 else
13968   cat >conftest.$ac_ext <<_ACEOF
13969 #line 13969 "configure"
13970 #include "confdefs.h"
13971 #include <dbmalloc.h>
13972 _ACEOF
13973 if { (eval echo "$as_me:13973: \"$ac_cpp conftest.$ac_ext\"") >&5
13974   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13975   ac_status=$?
13976   egrep -v '^ *\+' conftest.er1 >conftest.err
13977   rm -f conftest.er1
13978   cat conftest.err >&5
13979   echo "$as_me:13979: \$? = $ac_status" >&5
13980   (exit $ac_status); } >/dev/null; then
13981   if test -s conftest.err; then
13982     ac_cpp_err=$ac_c_preproc_warn_flag
13983   else
13984     ac_cpp_err=
13985   fi
13986 else
13987   ac_cpp_err=yes
13988 fi
13989 if test -z "$ac_cpp_err"; then
13990   ac_cv_header_dbmalloc_h=yes
13991 else
13992   echo "$as_me: failed program was:" >&5
13993   cat conftest.$ac_ext >&5
13994   ac_cv_header_dbmalloc_h=no
13995 fi
13996 rm -f conftest.err conftest.$ac_ext
13997 fi
13998 echo "$as_me:13998: result: $ac_cv_header_dbmalloc_h" >&5
13999 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
14000 if test $ac_cv_header_dbmalloc_h = yes; then
14001
14002 echo "$as_me:14002: checking for debug_malloc in -ldbmalloc" >&5
14003 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
14004 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
14005   echo $ECHO_N "(cached) $ECHO_C" >&6
14006 else
14007   ac_check_lib_save_LIBS=$LIBS
14008 LIBS="-ldbmalloc  $LIBS"
14009 cat >conftest.$ac_ext <<_ACEOF
14010 #line 14010 "configure"
14011 #include "confdefs.h"
14012
14013 /* Override any gcc2 internal prototype to avoid an error.  */
14014 #ifdef __cplusplus
14015 extern "C"
14016 #endif
14017 /* We use char because int might match the return type of a gcc2
14018    builtin and then its argument prototype would still apply.  */
14019 char debug_malloc ();
14020 int
14021 main ()
14022 {
14023 debug_malloc ();
14024   ;
14025   return 0;
14026 }
14027 _ACEOF
14028 rm -f conftest.$ac_objext conftest$ac_exeext
14029 if { (eval echo "$as_me:14029: \"$ac_link\"") >&5
14030   (eval $ac_link) 2>&5
14031   ac_status=$?
14032   echo "$as_me:14032: \$? = $ac_status" >&5
14033   (exit $ac_status); } &&
14034          { ac_try='test -s conftest$ac_exeext'
14035   { (eval echo "$as_me:14035: \"$ac_try\"") >&5
14036   (eval $ac_try) 2>&5
14037   ac_status=$?
14038   echo "$as_me:14038: \$? = $ac_status" >&5
14039   (exit $ac_status); }; }; then
14040   ac_cv_lib_dbmalloc_debug_malloc=yes
14041 else
14042   echo "$as_me: failed program was:" >&5
14043 cat conftest.$ac_ext >&5
14044 ac_cv_lib_dbmalloc_debug_malloc=no
14045 fi
14046 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14047 LIBS=$ac_check_lib_save_LIBS
14048 fi
14049 echo "$as_me:14049: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14050 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14051 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14052   cat >>confdefs.h <<EOF
14053 #define HAVE_LIBDBMALLOC 1
14054 EOF
14055
14056   LIBS="-ldbmalloc $LIBS"
14057
14058 fi
14059
14060 fi
14061
14062 fi
14063
14064 echo "$as_me:14064: checking if you want to use valgrind for testing" >&5
14065 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14066
14067 # Check whether --with-valgrind or --without-valgrind was given.
14068 if test "${with_valgrind+set}" = set; then
14069   withval="$with_valgrind"
14070
14071 cat >>confdefs.h <<EOF
14072 #define USE_VALGRIND 1
14073 EOF
14074
14075         : ${with_cflags:=-g}
14076         : ${with_no_leaks:=yes}
14077          with_valgrind=yes
14078 else
14079   with_valgrind=
14080 fi;
14081 echo "$as_me:14081: result: ${with_valgrind:-no}" >&5
14082 echo "${ECHO_T}${with_valgrind:-no}" >&6
14083
14084 case .$with_cflags in
14085 (.*-g*)
14086         case .$CFLAGS in
14087         (.*-g*)
14088                 ;;
14089         (*)
14090
14091 cf_fix_cppflags=no
14092 cf_new_cflags=
14093 cf_new_cppflags=
14094 cf_new_extra_cppflags=
14095
14096 for cf_add_cflags in -g
14097 do
14098 case $cf_fix_cppflags in
14099 (no)
14100         case $cf_add_cflags in
14101         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14102                 case $cf_add_cflags in
14103                 (-D*)
14104                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14105
14106                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14107                                 && test -z "${cf_tst_cflags}" \
14108                                 && cf_fix_cppflags=yes
14109
14110                         if test $cf_fix_cppflags = yes ; then
14111                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14112                                 continue
14113                         elif test "${cf_tst_cflags}" = "\"'" ; then
14114                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14115                                 continue
14116                         fi
14117                         ;;
14118                 esac
14119                 case "$CPPFLAGS" in
14120                 (*$cf_add_cflags)
14121                         ;;
14122                 (*)
14123                         case $cf_add_cflags in
14124                         (-D*)
14125                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14126
14127 CPPFLAGS=`echo "$CPPFLAGS" | \
14128         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14129                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14130
14131                                 ;;
14132                         esac
14133                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14134                         ;;
14135                 esac
14136                 ;;
14137         (*)
14138                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14139                 ;;
14140         esac
14141         ;;
14142 (yes)
14143         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14144
14145         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14146
14147         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14148                 && test -z "${cf_tst_cflags}" \
14149                 && cf_fix_cppflags=no
14150         ;;
14151 esac
14152 done
14153
14154 if test -n "$cf_new_cflags" ; then
14155
14156         CFLAGS="$CFLAGS $cf_new_cflags"
14157 fi
14158
14159 if test -n "$cf_new_cppflags" ; then
14160
14161         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14162 fi
14163
14164 if test -n "$cf_new_extra_cppflags" ; then
14165
14166         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14167 fi
14168
14169                 ;;
14170         esac
14171         ;;
14172 esac
14173
14174 echo "$as_me:14174: checking if you want to perform memory-leak testing" >&5
14175 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14176
14177 # Check whether --enable-leaks or --disable-leaks was given.
14178 if test "${enable_leaks+set}" = set; then
14179   enableval="$enable_leaks"
14180   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14181 else
14182   : ${with_no_leaks:=no}
14183 fi;
14184 echo "$as_me:14184: result: $with_no_leaks" >&5
14185 echo "${ECHO_T}$with_no_leaks" >&6
14186
14187 if test "$with_no_leaks" = yes ; then
14188
14189 cat >>confdefs.h <<\EOF
14190 #define NO_LEAKS 1
14191 EOF
14192
14193 cat >>confdefs.h <<\EOF
14194 #define YY_NO_LEAKS 1
14195 EOF
14196
14197 fi
14198
14199 cat >>confdefs.h <<\EOF
14200 #define HAVE_NC_ALLOC_H 1
14201 EOF
14202
14203 ###     use option --enable-expanded to generate certain macros as functions
14204
14205 # Check whether --enable-expanded or --disable-expanded was given.
14206 if test "${enable_expanded+set}" = set; then
14207   enableval="$enable_expanded"
14208   test "x$enableval" = xyes &&
14209 cat >>confdefs.h <<\EOF
14210 #define NCURSES_EXPANDED 1
14211 EOF
14212
14213 fi;
14214
14215 ###     use option --disable-macros to suppress macros in favor of functions
14216
14217 # Check whether --enable-macros or --disable-macros was given.
14218 if test "${enable_macros+set}" = set; then
14219   enableval="$enable_macros"
14220   test "$enableval" = no &&
14221 cat >>confdefs.h <<\EOF
14222 #define NCURSES_NOMACROS 1
14223 EOF
14224
14225 fi;
14226
14227 # Normally we only add trace() to the debug-library.  Allow this to be
14228 # extended to all models of the ncurses library:
14229 cf_all_traces=no
14230 case "$CFLAGS $CPPFLAGS" in
14231 (*-DTRACE*)
14232         cf_all_traces=yes
14233         ;;
14234 esac
14235
14236 echo "$as_me:14236: checking whether to add trace feature to all models" >&5
14237 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14238
14239 # Check whether --with-trace or --without-trace was given.
14240 if test "${with_trace+set}" = set; then
14241   withval="$with_trace"
14242   cf_with_trace=$withval
14243 else
14244   cf_with_trace=$cf_all_traces
14245 fi;
14246 echo "$as_me:14246: result: $cf_with_trace" >&5
14247 echo "${ECHO_T}$cf_with_trace" >&6
14248
14249 if test "x$cf_with_trace" = xyes ; then
14250         LIB_TRACING=all
14251         ADA_TRACE=TRUE
14252
14253 cf_fix_cppflags=no
14254 cf_new_cflags=
14255 cf_new_cppflags=
14256 cf_new_extra_cppflags=
14257
14258 for cf_add_cflags in -DTRACE
14259 do
14260 case $cf_fix_cppflags in
14261 (no)
14262         case $cf_add_cflags in
14263         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14264                 case $cf_add_cflags in
14265                 (-D*)
14266                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14267
14268                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14269                                 && test -z "${cf_tst_cflags}" \
14270                                 && cf_fix_cppflags=yes
14271
14272                         if test $cf_fix_cppflags = yes ; then
14273                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14274                                 continue
14275                         elif test "${cf_tst_cflags}" = "\"'" ; then
14276                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14277                                 continue
14278                         fi
14279                         ;;
14280                 esac
14281                 case "$CPPFLAGS" in
14282                 (*$cf_add_cflags)
14283                         ;;
14284                 (*)
14285                         case $cf_add_cflags in
14286                         (-D*)
14287                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14288
14289 CPPFLAGS=`echo "$CPPFLAGS" | \
14290         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14291                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14292
14293                                 ;;
14294                         esac
14295                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14296                         ;;
14297                 esac
14298                 ;;
14299         (*)
14300                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14301                 ;;
14302         esac
14303         ;;
14304 (yes)
14305         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14306
14307         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14308
14309         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14310                 && test -z "${cf_tst_cflags}" \
14311                 && cf_fix_cppflags=no
14312         ;;
14313 esac
14314 done
14315
14316 if test -n "$cf_new_cflags" ; then
14317
14318         CFLAGS="$CFLAGS $cf_new_cflags"
14319 fi
14320
14321 if test -n "$cf_new_cppflags" ; then
14322
14323         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14324 fi
14325
14326 if test -n "$cf_new_extra_cppflags" ; then
14327
14328         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14329 fi
14330
14331 else
14332         LIB_TRACING=DEBUG
14333         ADA_TRACE=FALSE
14334 fi
14335
14336 echo "$as_me:14336: checking if we want to use GNAT projects" >&5
14337 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14338
14339 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14340 if test "${enable_gnat_projects+set}" = set; then
14341   enableval="$enable_gnat_projects"
14342   test "$enableval" != no && enableval=yes
14343         if test "$enableval" != "yes" ; then
14344     enable_gnat_projects=no
14345         else
14346                 enable_gnat_projects=yes
14347         fi
14348 else
14349   enableval=yes
14350         enable_gnat_projects=yes
14351
14352 fi;
14353 echo "$as_me:14353: result: $enable_gnat_projects" >&5
14354 echo "${ECHO_T}$enable_gnat_projects" >&6
14355
14356 ###     Checks for libraries.
14357 case $cf_cv_system_name in
14358 (*mingw32*|*mingw64*)
14359         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14360         LIBS=" -lpsapi $LIBS"
14361         ;;
14362 (*)
14363 echo "$as_me:14363: checking for gettimeofday" >&5
14364 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14365 if test "${ac_cv_func_gettimeofday+set}" = set; then
14366   echo $ECHO_N "(cached) $ECHO_C" >&6
14367 else
14368   cat >conftest.$ac_ext <<_ACEOF
14369 #line 14369 "configure"
14370 #include "confdefs.h"
14371 /* System header to define __stub macros and hopefully few prototypes,
14372     which can conflict with char gettimeofday (); below.  */
14373 #include <assert.h>
14374 /* Override any gcc2 internal prototype to avoid an error.  */
14375 #ifdef __cplusplus
14376 extern "C"
14377 #endif
14378 /* We use char because int might match the return type of a gcc2
14379    builtin and then its argument prototype would still apply.  */
14380 char gettimeofday ();
14381 char (*f) ();
14382
14383 int
14384 main ()
14385 {
14386 /* The GNU C library defines this for functions which it implements
14387     to always fail with ENOSYS.  Some functions are actually named
14388     something starting with __ and the normal name is an alias.  */
14389 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14390 choke me
14391 #else
14392 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14393 #endif
14394
14395   ;
14396   return 0;
14397 }
14398 _ACEOF
14399 rm -f conftest.$ac_objext conftest$ac_exeext
14400 if { (eval echo "$as_me:14400: \"$ac_link\"") >&5
14401   (eval $ac_link) 2>&5
14402   ac_status=$?
14403   echo "$as_me:14403: \$? = $ac_status" >&5
14404   (exit $ac_status); } &&
14405          { ac_try='test -s conftest$ac_exeext'
14406   { (eval echo "$as_me:14406: \"$ac_try\"") >&5
14407   (eval $ac_try) 2>&5
14408   ac_status=$?
14409   echo "$as_me:14409: \$? = $ac_status" >&5
14410   (exit $ac_status); }; }; then
14411   ac_cv_func_gettimeofday=yes
14412 else
14413   echo "$as_me: failed program was:" >&5
14414 cat conftest.$ac_ext >&5
14415 ac_cv_func_gettimeofday=no
14416 fi
14417 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14418 fi
14419 echo "$as_me:14419: result: $ac_cv_func_gettimeofday" >&5
14420 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14421 if test $ac_cv_func_gettimeofday = yes; then
14422
14423 cat >>confdefs.h <<\EOF
14424 #define HAVE_GETTIMEOFDAY 1
14425 EOF
14426
14427 else
14428
14429 echo "$as_me:14429: checking for gettimeofday in -lbsd" >&5
14430 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14431 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14432   echo $ECHO_N "(cached) $ECHO_C" >&6
14433 else
14434   ac_check_lib_save_LIBS=$LIBS
14435 LIBS="-lbsd  $LIBS"
14436 cat >conftest.$ac_ext <<_ACEOF
14437 #line 14437 "configure"
14438 #include "confdefs.h"
14439
14440 /* Override any gcc2 internal prototype to avoid an error.  */
14441 #ifdef __cplusplus
14442 extern "C"
14443 #endif
14444 /* We use char because int might match the return type of a gcc2
14445    builtin and then its argument prototype would still apply.  */
14446 char gettimeofday ();
14447 int
14448 main ()
14449 {
14450 gettimeofday ();
14451   ;
14452   return 0;
14453 }
14454 _ACEOF
14455 rm -f conftest.$ac_objext conftest$ac_exeext
14456 if { (eval echo "$as_me:14456: \"$ac_link\"") >&5
14457   (eval $ac_link) 2>&5
14458   ac_status=$?
14459   echo "$as_me:14459: \$? = $ac_status" >&5
14460   (exit $ac_status); } &&
14461          { ac_try='test -s conftest$ac_exeext'
14462   { (eval echo "$as_me:14462: \"$ac_try\"") >&5
14463   (eval $ac_try) 2>&5
14464   ac_status=$?
14465   echo "$as_me:14465: \$? = $ac_status" >&5
14466   (exit $ac_status); }; }; then
14467   ac_cv_lib_bsd_gettimeofday=yes
14468 else
14469   echo "$as_me: failed program was:" >&5
14470 cat conftest.$ac_ext >&5
14471 ac_cv_lib_bsd_gettimeofday=no
14472 fi
14473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14474 LIBS=$ac_check_lib_save_LIBS
14475 fi
14476 echo "$as_me:14476: result: $ac_cv_lib_bsd_gettimeofday" >&5
14477 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14478 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14479
14480 cat >>confdefs.h <<\EOF
14481 #define HAVE_GETTIMEOFDAY 1
14482 EOF
14483
14484 cf_add_libs="-lbsd"
14485 # Filter out duplicates - this happens with badly-designed ".pc" files...
14486 for cf_add_1lib in $LIBS
14487 do
14488         for cf_add_2lib in $cf_add_libs
14489         do
14490                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14491                 then
14492                         cf_add_1lib=
14493                         break
14494                 fi
14495         done
14496         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14497 done
14498 LIBS="$cf_add_libs"
14499
14500 fi
14501
14502 fi
14503         ;;
14504 esac
14505
14506 echo "$as_me:14506: checking if -lm needed for math functions" >&5
14507 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14508 if test "${cf_cv_need_libm+set}" = set; then
14509   echo $ECHO_N "(cached) $ECHO_C" >&6
14510 else
14511
14512         cat >conftest.$ac_ext <<_ACEOF
14513 #line 14513 "configure"
14514 #include "confdefs.h"
14515
14516         #include <stdio.h>
14517         #include <math.h>
14518
14519 int
14520 main ()
14521 {
14522 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14523   ;
14524   return 0;
14525 }
14526 _ACEOF
14527 rm -f conftest.$ac_objext conftest$ac_exeext
14528 if { (eval echo "$as_me:14528: \"$ac_link\"") >&5
14529   (eval $ac_link) 2>&5
14530   ac_status=$?
14531   echo "$as_me:14531: \$? = $ac_status" >&5
14532   (exit $ac_status); } &&
14533          { ac_try='test -s conftest$ac_exeext'
14534   { (eval echo "$as_me:14534: \"$ac_try\"") >&5
14535   (eval $ac_try) 2>&5
14536   ac_status=$?
14537   echo "$as_me:14537: \$? = $ac_status" >&5
14538   (exit $ac_status); }; }; then
14539   cf_cv_need_libm=no
14540 else
14541   echo "$as_me: failed program was:" >&5
14542 cat conftest.$ac_ext >&5
14543 cf_cv_need_libm=yes
14544 fi
14545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14546 fi
14547 echo "$as_me:14547: result: $cf_cv_need_libm" >&5
14548 echo "${ECHO_T}$cf_cv_need_libm" >&6
14549 if test "$cf_cv_need_libm" = yes
14550 then
14551 MATH_LIB=-lm
14552 fi
14553
14554 ###     Checks for header files.
14555 echo "$as_me:14555: checking for ANSI C header files" >&5
14556 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14557 if test "${ac_cv_header_stdc+set}" = set; then
14558   echo $ECHO_N "(cached) $ECHO_C" >&6
14559 else
14560   cat >conftest.$ac_ext <<_ACEOF
14561 #line 14561 "configure"
14562 #include "confdefs.h"
14563 #include <stdlib.h>
14564 #include <stdarg.h>
14565 #include <string.h>
14566 #include <float.h>
14567
14568 _ACEOF
14569 if { (eval echo "$as_me:14569: \"$ac_cpp conftest.$ac_ext\"") >&5
14570   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14571   ac_status=$?
14572   egrep -v '^ *\+' conftest.er1 >conftest.err
14573   rm -f conftest.er1
14574   cat conftest.err >&5
14575   echo "$as_me:14575: \$? = $ac_status" >&5
14576   (exit $ac_status); } >/dev/null; then
14577   if test -s conftest.err; then
14578     ac_cpp_err=$ac_c_preproc_warn_flag
14579   else
14580     ac_cpp_err=
14581   fi
14582 else
14583   ac_cpp_err=yes
14584 fi
14585 if test -z "$ac_cpp_err"; then
14586   ac_cv_header_stdc=yes
14587 else
14588   echo "$as_me: failed program was:" >&5
14589   cat conftest.$ac_ext >&5
14590   ac_cv_header_stdc=no
14591 fi
14592 rm -f conftest.err conftest.$ac_ext
14593
14594 if test $ac_cv_header_stdc = yes; then
14595   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14596   cat >conftest.$ac_ext <<_ACEOF
14597 #line 14597 "configure"
14598 #include "confdefs.h"
14599 #include <string.h>
14600
14601 _ACEOF
14602 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14603   egrep "memchr" >/dev/null 2>&1; then
14604   :
14605 else
14606   ac_cv_header_stdc=no
14607 fi
14608 rm -rf conftest*
14609
14610 fi
14611
14612 if test $ac_cv_header_stdc = yes; then
14613   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14614   cat >conftest.$ac_ext <<_ACEOF
14615 #line 14615 "configure"
14616 #include "confdefs.h"
14617 #include <stdlib.h>
14618
14619 _ACEOF
14620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14621   egrep "free" >/dev/null 2>&1; then
14622   :
14623 else
14624   ac_cv_header_stdc=no
14625 fi
14626 rm -rf conftest*
14627
14628 fi
14629
14630 if test $ac_cv_header_stdc = yes; then
14631   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14632   if test "$cross_compiling" = yes; then
14633   :
14634 else
14635   cat >conftest.$ac_ext <<_ACEOF
14636 #line 14636 "configure"
14637 #include "confdefs.h"
14638 #include <ctype.h>
14639 #if ((' ' & 0x0FF) == 0x020)
14640 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14641 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14642 #else
14643 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14644                      || ('j' <= (c) && (c) <= 'r') \
14645                      || ('s' <= (c) && (c) <= 'z'))
14646 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14647 #endif
14648
14649 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14650 int
14651 main ()
14652 {
14653   int i;
14654   for (i = 0; i < 256; i++)
14655     if (XOR (islower (i), ISLOWER (i))
14656         || toupper (i) != TOUPPER (i))
14657       $ac_main_return(2);
14658   $ac_main_return (0);
14659 }
14660 _ACEOF
14661 rm -f conftest$ac_exeext
14662 if { (eval echo "$as_me:14662: \"$ac_link\"") >&5
14663   (eval $ac_link) 2>&5
14664   ac_status=$?
14665   echo "$as_me:14665: \$? = $ac_status" >&5
14666   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14667   { (eval echo "$as_me:14667: \"$ac_try\"") >&5
14668   (eval $ac_try) 2>&5
14669   ac_status=$?
14670   echo "$as_me:14670: \$? = $ac_status" >&5
14671   (exit $ac_status); }; }; then
14672   :
14673 else
14674   echo "$as_me: program exited with status $ac_status" >&5
14675 echo "$as_me: failed program was:" >&5
14676 cat conftest.$ac_ext >&5
14677 ac_cv_header_stdc=no
14678 fi
14679 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14680 fi
14681 fi
14682 fi
14683 echo "$as_me:14683: result: $ac_cv_header_stdc" >&5
14684 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14685 if test $ac_cv_header_stdc = yes; then
14686
14687 cat >>confdefs.h <<\EOF
14688 #define STDC_HEADERS 1
14689 EOF
14690
14691 fi
14692
14693 ac_header_dirent=no
14694 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14695   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14696 echo "$as_me:14696: checking for $ac_hdr that defines DIR" >&5
14697 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14698 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14699   echo $ECHO_N "(cached) $ECHO_C" >&6
14700 else
14701   cat >conftest.$ac_ext <<_ACEOF
14702 #line 14702 "configure"
14703 #include "confdefs.h"
14704 #include <sys/types.h>
14705 #include <$ac_hdr>
14706
14707 int
14708 main ()
14709 {
14710 if ((DIR *) 0)
14711 return 0;
14712   ;
14713   return 0;
14714 }
14715 _ACEOF
14716 rm -f conftest.$ac_objext
14717 if { (eval echo "$as_me:14717: \"$ac_compile\"") >&5
14718   (eval $ac_compile) 2>&5
14719   ac_status=$?
14720   echo "$as_me:14720: \$? = $ac_status" >&5
14721   (exit $ac_status); } &&
14722          { ac_try='test -s conftest.$ac_objext'
14723   { (eval echo "$as_me:14723: \"$ac_try\"") >&5
14724   (eval $ac_try) 2>&5
14725   ac_status=$?
14726   echo "$as_me:14726: \$? = $ac_status" >&5
14727   (exit $ac_status); }; }; then
14728   eval "$as_ac_Header=yes"
14729 else
14730   echo "$as_me: failed program was:" >&5
14731 cat conftest.$ac_ext >&5
14732 eval "$as_ac_Header=no"
14733 fi
14734 rm -f conftest.$ac_objext conftest.$ac_ext
14735 fi
14736 echo "$as_me:14736: result: `eval echo '${'$as_ac_Header'}'`" >&5
14737 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14738 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14739   cat >>confdefs.h <<EOF
14740 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14741 EOF
14742
14743 ac_header_dirent=$ac_hdr; break
14744 fi
14745
14746 done
14747 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14748 if test $ac_header_dirent = dirent.h; then
14749   echo "$as_me:14749: checking for opendir in -ldir" >&5
14750 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14751 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14752   echo $ECHO_N "(cached) $ECHO_C" >&6
14753 else
14754   ac_check_lib_save_LIBS=$LIBS
14755 LIBS="-ldir  $LIBS"
14756 cat >conftest.$ac_ext <<_ACEOF
14757 #line 14757 "configure"
14758 #include "confdefs.h"
14759
14760 /* Override any gcc2 internal prototype to avoid an error.  */
14761 #ifdef __cplusplus
14762 extern "C"
14763 #endif
14764 /* We use char because int might match the return type of a gcc2
14765    builtin and then its argument prototype would still apply.  */
14766 char opendir ();
14767 int
14768 main ()
14769 {
14770 opendir ();
14771   ;
14772   return 0;
14773 }
14774 _ACEOF
14775 rm -f conftest.$ac_objext conftest$ac_exeext
14776 if { (eval echo "$as_me:14776: \"$ac_link\"") >&5
14777   (eval $ac_link) 2>&5
14778   ac_status=$?
14779   echo "$as_me:14779: \$? = $ac_status" >&5
14780   (exit $ac_status); } &&
14781          { ac_try='test -s conftest$ac_exeext'
14782   { (eval echo "$as_me:14782: \"$ac_try\"") >&5
14783   (eval $ac_try) 2>&5
14784   ac_status=$?
14785   echo "$as_me:14785: \$? = $ac_status" >&5
14786   (exit $ac_status); }; }; then
14787   ac_cv_lib_dir_opendir=yes
14788 else
14789   echo "$as_me: failed program was:" >&5
14790 cat conftest.$ac_ext >&5
14791 ac_cv_lib_dir_opendir=no
14792 fi
14793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14794 LIBS=$ac_check_lib_save_LIBS
14795 fi
14796 echo "$as_me:14796: result: $ac_cv_lib_dir_opendir" >&5
14797 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14798 if test $ac_cv_lib_dir_opendir = yes; then
14799   LIBS="$LIBS -ldir"
14800 fi
14801
14802 else
14803   echo "$as_me:14803: checking for opendir in -lx" >&5
14804 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14805 if test "${ac_cv_lib_x_opendir+set}" = set; then
14806   echo $ECHO_N "(cached) $ECHO_C" >&6
14807 else
14808   ac_check_lib_save_LIBS=$LIBS
14809 LIBS="-lx  $LIBS"
14810 cat >conftest.$ac_ext <<_ACEOF
14811 #line 14811 "configure"
14812 #include "confdefs.h"
14813
14814 /* Override any gcc2 internal prototype to avoid an error.  */
14815 #ifdef __cplusplus
14816 extern "C"
14817 #endif
14818 /* We use char because int might match the return type of a gcc2
14819    builtin and then its argument prototype would still apply.  */
14820 char opendir ();
14821 int
14822 main ()
14823 {
14824 opendir ();
14825   ;
14826   return 0;
14827 }
14828 _ACEOF
14829 rm -f conftest.$ac_objext conftest$ac_exeext
14830 if { (eval echo "$as_me:14830: \"$ac_link\"") >&5
14831   (eval $ac_link) 2>&5
14832   ac_status=$?
14833   echo "$as_me:14833: \$? = $ac_status" >&5
14834   (exit $ac_status); } &&
14835          { ac_try='test -s conftest$ac_exeext'
14836   { (eval echo "$as_me:14836: \"$ac_try\"") >&5
14837   (eval $ac_try) 2>&5
14838   ac_status=$?
14839   echo "$as_me:14839: \$? = $ac_status" >&5
14840   (exit $ac_status); }; }; then
14841   ac_cv_lib_x_opendir=yes
14842 else
14843   echo "$as_me: failed program was:" >&5
14844 cat conftest.$ac_ext >&5
14845 ac_cv_lib_x_opendir=no
14846 fi
14847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14848 LIBS=$ac_check_lib_save_LIBS
14849 fi
14850 echo "$as_me:14850: result: $ac_cv_lib_x_opendir" >&5
14851 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14852 if test $ac_cv_lib_x_opendir = yes; then
14853   LIBS="$LIBS -lx"
14854 fi
14855
14856 fi
14857
14858 echo "$as_me:14858: checking whether time.h and sys/time.h may both be included" >&5
14859 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14860 if test "${ac_cv_header_time+set}" = set; then
14861   echo $ECHO_N "(cached) $ECHO_C" >&6
14862 else
14863   cat >conftest.$ac_ext <<_ACEOF
14864 #line 14864 "configure"
14865 #include "confdefs.h"
14866 #include <sys/types.h>
14867 #include <sys/time.h>
14868 #include <time.h>
14869
14870 int
14871 main ()
14872 {
14873 if ((struct tm *) 0)
14874 return 0;
14875   ;
14876   return 0;
14877 }
14878 _ACEOF
14879 rm -f conftest.$ac_objext
14880 if { (eval echo "$as_me:14880: \"$ac_compile\"") >&5
14881   (eval $ac_compile) 2>&5
14882   ac_status=$?
14883   echo "$as_me:14883: \$? = $ac_status" >&5
14884   (exit $ac_status); } &&
14885          { ac_try='test -s conftest.$ac_objext'
14886   { (eval echo "$as_me:14886: \"$ac_try\"") >&5
14887   (eval $ac_try) 2>&5
14888   ac_status=$?
14889   echo "$as_me:14889: \$? = $ac_status" >&5
14890   (exit $ac_status); }; }; then
14891   ac_cv_header_time=yes
14892 else
14893   echo "$as_me: failed program was:" >&5
14894 cat conftest.$ac_ext >&5
14895 ac_cv_header_time=no
14896 fi
14897 rm -f conftest.$ac_objext conftest.$ac_ext
14898 fi
14899 echo "$as_me:14899: result: $ac_cv_header_time" >&5
14900 echo "${ECHO_T}$ac_cv_header_time" >&6
14901 if test $ac_cv_header_time = yes; then
14902
14903 cat >>confdefs.h <<\EOF
14904 #define TIME_WITH_SYS_TIME 1
14905 EOF
14906
14907 fi
14908
14909 cf_regex_func=no
14910
14911 cf_regex_libs="regex re"
14912 case $host_os in
14913 (mingw*)
14914         cf_regex_libs="gnurx $cf_regex_libs"
14915         ;;
14916 esac
14917
14918 echo "$as_me:14918: checking for regcomp" >&5
14919 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14920 if test "${ac_cv_func_regcomp+set}" = set; then
14921   echo $ECHO_N "(cached) $ECHO_C" >&6
14922 else
14923   cat >conftest.$ac_ext <<_ACEOF
14924 #line 14924 "configure"
14925 #include "confdefs.h"
14926 /* System header to define __stub macros and hopefully few prototypes,
14927     which can conflict with char regcomp (); below.  */
14928 #include <assert.h>
14929 /* Override any gcc2 internal prototype to avoid an error.  */
14930 #ifdef __cplusplus
14931 extern "C"
14932 #endif
14933 /* We use char because int might match the return type of a gcc2
14934    builtin and then its argument prototype would still apply.  */
14935 char regcomp ();
14936 char (*f) ();
14937
14938 int
14939 main ()
14940 {
14941 /* The GNU C library defines this for functions which it implements
14942     to always fail with ENOSYS.  Some functions are actually named
14943     something starting with __ and the normal name is an alias.  */
14944 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14945 choke me
14946 #else
14947 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14948 #endif
14949
14950   ;
14951   return 0;
14952 }
14953 _ACEOF
14954 rm -f conftest.$ac_objext conftest$ac_exeext
14955 if { (eval echo "$as_me:14955: \"$ac_link\"") >&5
14956   (eval $ac_link) 2>&5
14957   ac_status=$?
14958   echo "$as_me:14958: \$? = $ac_status" >&5
14959   (exit $ac_status); } &&
14960          { ac_try='test -s conftest$ac_exeext'
14961   { (eval echo "$as_me:14961: \"$ac_try\"") >&5
14962   (eval $ac_try) 2>&5
14963   ac_status=$?
14964   echo "$as_me:14964: \$? = $ac_status" >&5
14965   (exit $ac_status); }; }; then
14966   ac_cv_func_regcomp=yes
14967 else
14968   echo "$as_me: failed program was:" >&5
14969 cat conftest.$ac_ext >&5
14970 ac_cv_func_regcomp=no
14971 fi
14972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14973 fi
14974 echo "$as_me:14974: result: $ac_cv_func_regcomp" >&5
14975 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14976 if test $ac_cv_func_regcomp = yes; then
14977   cf_regex_func=regcomp
14978 else
14979
14980         for cf_regex_lib in $cf_regex_libs
14981         do
14982                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14983 echo "$as_me:14983: checking for regcomp in -l$cf_regex_lib" >&5
14984 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14985 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14986   echo $ECHO_N "(cached) $ECHO_C" >&6
14987 else
14988   ac_check_lib_save_LIBS=$LIBS
14989 LIBS="-l$cf_regex_lib  $LIBS"
14990 cat >conftest.$ac_ext <<_ACEOF
14991 #line 14991 "configure"
14992 #include "confdefs.h"
14993
14994 /* Override any gcc2 internal prototype to avoid an error.  */
14995 #ifdef __cplusplus
14996 extern "C"
14997 #endif
14998 /* We use char because int might match the return type of a gcc2
14999    builtin and then its argument prototype would still apply.  */
15000 char regcomp ();
15001 int
15002 main ()
15003 {
15004 regcomp ();
15005   ;
15006   return 0;
15007 }
15008 _ACEOF
15009 rm -f conftest.$ac_objext conftest$ac_exeext
15010 if { (eval echo "$as_me:15010: \"$ac_link\"") >&5
15011   (eval $ac_link) 2>&5
15012   ac_status=$?
15013   echo "$as_me:15013: \$? = $ac_status" >&5
15014   (exit $ac_status); } &&
15015          { ac_try='test -s conftest$ac_exeext'
15016   { (eval echo "$as_me:15016: \"$ac_try\"") >&5
15017   (eval $ac_try) 2>&5
15018   ac_status=$?
15019   echo "$as_me:15019: \$? = $ac_status" >&5
15020   (exit $ac_status); }; }; then
15021   eval "$as_ac_Lib=yes"
15022 else
15023   echo "$as_me: failed program was:" >&5
15024 cat conftest.$ac_ext >&5
15025 eval "$as_ac_Lib=no"
15026 fi
15027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15028 LIBS=$ac_check_lib_save_LIBS
15029 fi
15030 echo "$as_me:15030: result: `eval echo '${'$as_ac_Lib'}'`" >&5
15031 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
15032 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
15033
15034 cf_add_libs="-l$cf_regex_lib"
15035 # Filter out duplicates - this happens with badly-designed ".pc" files...
15036 for cf_add_1lib in $LIBS
15037 do
15038         for cf_add_2lib in $cf_add_libs
15039         do
15040                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15041                 then
15042                         cf_add_1lib=
15043                         break
15044                 fi
15045         done
15046         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15047 done
15048 LIBS="$cf_add_libs"
15049
15050                                 cf_regex_func=regcomp
15051                                 break
15052 fi
15053
15054         done
15055
15056 fi
15057
15058 if test "$cf_regex_func" = no ; then
15059         echo "$as_me:15059: checking for compile" >&5
15060 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15061 if test "${ac_cv_func_compile+set}" = set; then
15062   echo $ECHO_N "(cached) $ECHO_C" >&6
15063 else
15064   cat >conftest.$ac_ext <<_ACEOF
15065 #line 15065 "configure"
15066 #include "confdefs.h"
15067 /* System header to define __stub macros and hopefully few prototypes,
15068     which can conflict with char compile (); below.  */
15069 #include <assert.h>
15070 /* Override any gcc2 internal prototype to avoid an error.  */
15071 #ifdef __cplusplus
15072 extern "C"
15073 #endif
15074 /* We use char because int might match the return type of a gcc2
15075    builtin and then its argument prototype would still apply.  */
15076 char compile ();
15077 char (*f) ();
15078
15079 int
15080 main ()
15081 {
15082 /* The GNU C library defines this for functions which it implements
15083     to always fail with ENOSYS.  Some functions are actually named
15084     something starting with __ and the normal name is an alias.  */
15085 #if defined (__stub_compile) || defined (__stub___compile)
15086 choke me
15087 #else
15088 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15089 #endif
15090
15091   ;
15092   return 0;
15093 }
15094 _ACEOF
15095 rm -f conftest.$ac_objext conftest$ac_exeext
15096 if { (eval echo "$as_me:15096: \"$ac_link\"") >&5
15097   (eval $ac_link) 2>&5
15098   ac_status=$?
15099   echo "$as_me:15099: \$? = $ac_status" >&5
15100   (exit $ac_status); } &&
15101          { ac_try='test -s conftest$ac_exeext'
15102   { (eval echo "$as_me:15102: \"$ac_try\"") >&5
15103   (eval $ac_try) 2>&5
15104   ac_status=$?
15105   echo "$as_me:15105: \$? = $ac_status" >&5
15106   (exit $ac_status); }; }; then
15107   ac_cv_func_compile=yes
15108 else
15109   echo "$as_me: failed program was:" >&5
15110 cat conftest.$ac_ext >&5
15111 ac_cv_func_compile=no
15112 fi
15113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15114 fi
15115 echo "$as_me:15115: result: $ac_cv_func_compile" >&5
15116 echo "${ECHO_T}$ac_cv_func_compile" >&6
15117 if test $ac_cv_func_compile = yes; then
15118   cf_regex_func=compile
15119 else
15120
15121                 echo "$as_me:15121: checking for compile in -lgen" >&5
15122 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15123 if test "${ac_cv_lib_gen_compile+set}" = set; then
15124   echo $ECHO_N "(cached) $ECHO_C" >&6
15125 else
15126   ac_check_lib_save_LIBS=$LIBS
15127 LIBS="-lgen  $LIBS"
15128 cat >conftest.$ac_ext <<_ACEOF
15129 #line 15129 "configure"
15130 #include "confdefs.h"
15131
15132 /* Override any gcc2 internal prototype to avoid an error.  */
15133 #ifdef __cplusplus
15134 extern "C"
15135 #endif
15136 /* We use char because int might match the return type of a gcc2
15137    builtin and then its argument prototype would still apply.  */
15138 char compile ();
15139 int
15140 main ()
15141 {
15142 compile ();
15143   ;
15144   return 0;
15145 }
15146 _ACEOF
15147 rm -f conftest.$ac_objext conftest$ac_exeext
15148 if { (eval echo "$as_me:15148: \"$ac_link\"") >&5
15149   (eval $ac_link) 2>&5
15150   ac_status=$?
15151   echo "$as_me:15151: \$? = $ac_status" >&5
15152   (exit $ac_status); } &&
15153          { ac_try='test -s conftest$ac_exeext'
15154   { (eval echo "$as_me:15154: \"$ac_try\"") >&5
15155   (eval $ac_try) 2>&5
15156   ac_status=$?
15157   echo "$as_me:15157: \$? = $ac_status" >&5
15158   (exit $ac_status); }; }; then
15159   ac_cv_lib_gen_compile=yes
15160 else
15161   echo "$as_me: failed program was:" >&5
15162 cat conftest.$ac_ext >&5
15163 ac_cv_lib_gen_compile=no
15164 fi
15165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15166 LIBS=$ac_check_lib_save_LIBS
15167 fi
15168 echo "$as_me:15168: result: $ac_cv_lib_gen_compile" >&5
15169 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15170 if test $ac_cv_lib_gen_compile = yes; then
15171
15172 cf_add_libs="-lgen"
15173 # Filter out duplicates - this happens with badly-designed ".pc" files...
15174 for cf_add_1lib in $LIBS
15175 do
15176         for cf_add_2lib in $cf_add_libs
15177         do
15178                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15179                 then
15180                         cf_add_1lib=
15181                         break
15182                 fi
15183         done
15184         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15185 done
15186 LIBS="$cf_add_libs"
15187
15188                                 cf_regex_func=compile
15189 fi
15190
15191 fi
15192
15193 fi
15194
15195 if test "$cf_regex_func" = no ; then
15196         { echo "$as_me:15196: WARNING: cannot find regular expression library" >&5
15197 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15198 fi
15199
15200 echo "$as_me:15200: checking for regular-expression headers" >&5
15201 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15202 if test "${cf_cv_regex_hdrs+set}" = set; then
15203   echo $ECHO_N "(cached) $ECHO_C" >&6
15204 else
15205
15206 cf_cv_regex_hdrs=no
15207 case $cf_regex_func in
15208 (compile)
15209         for cf_regex_hdr in regexp.h regexpr.h
15210         do
15211                 cat >conftest.$ac_ext <<_ACEOF
15212 #line 15212 "configure"
15213 #include "confdefs.h"
15214 #include <$cf_regex_hdr>
15215 int
15216 main ()
15217 {
15218
15219                         char *p = compile("", "", "", 0);
15220                         int x = step("", "");
15221
15222   ;
15223   return 0;
15224 }
15225 _ACEOF
15226 rm -f conftest.$ac_objext conftest$ac_exeext
15227 if { (eval echo "$as_me:15227: \"$ac_link\"") >&5
15228   (eval $ac_link) 2>&5
15229   ac_status=$?
15230   echo "$as_me:15230: \$? = $ac_status" >&5
15231   (exit $ac_status); } &&
15232          { ac_try='test -s conftest$ac_exeext'
15233   { (eval echo "$as_me:15233: \"$ac_try\"") >&5
15234   (eval $ac_try) 2>&5
15235   ac_status=$?
15236   echo "$as_me:15236: \$? = $ac_status" >&5
15237   (exit $ac_status); }; }; then
15238
15239                         cf_cv_regex_hdrs=$cf_regex_hdr
15240                         break
15241
15242 else
15243   echo "$as_me: failed program was:" >&5
15244 cat conftest.$ac_ext >&5
15245 fi
15246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15247         done
15248         ;;
15249 (*)
15250         for cf_regex_hdr in regex.h
15251         do
15252                 cat >conftest.$ac_ext <<_ACEOF
15253 #line 15253 "configure"
15254 #include "confdefs.h"
15255 #include <sys/types.h>
15256 #include <$cf_regex_hdr>
15257 int
15258 main ()
15259 {
15260
15261                         regex_t *p;
15262                         int x = regcomp(p, "", 0);
15263                         int y = regexec(p, "", 0, 0, 0);
15264                         regfree(p);
15265
15266   ;
15267   return 0;
15268 }
15269 _ACEOF
15270 rm -f conftest.$ac_objext conftest$ac_exeext
15271 if { (eval echo "$as_me:15271: \"$ac_link\"") >&5
15272   (eval $ac_link) 2>&5
15273   ac_status=$?
15274   echo "$as_me:15274: \$? = $ac_status" >&5
15275   (exit $ac_status); } &&
15276          { ac_try='test -s conftest$ac_exeext'
15277   { (eval echo "$as_me:15277: \"$ac_try\"") >&5
15278   (eval $ac_try) 2>&5
15279   ac_status=$?
15280   echo "$as_me:15280: \$? = $ac_status" >&5
15281   (exit $ac_status); }; }; then
15282
15283                         cf_cv_regex_hdrs=$cf_regex_hdr
15284                         break
15285
15286 else
15287   echo "$as_me: failed program was:" >&5
15288 cat conftest.$ac_ext >&5
15289 fi
15290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15291         done
15292         ;;
15293 esac
15294
15295 fi
15296 echo "$as_me:15296: result: $cf_cv_regex_hdrs" >&5
15297 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15298
15299 case $cf_cv_regex_hdrs in
15300         (no)            { echo "$as_me:15300: WARNING: no regular expression header found" >&5
15301 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15302         (regex.h)
15303 cat >>confdefs.h <<\EOF
15304 #define HAVE_REGEX_H_FUNCS 1
15305 EOF
15306  ;;
15307         (regexp.h)
15308 cat >>confdefs.h <<\EOF
15309 #define HAVE_REGEXP_H_FUNCS 1
15310 EOF
15311  ;;
15312         (regexpr.h)
15313 cat >>confdefs.h <<\EOF
15314 #define HAVE_REGEXPR_H_FUNCS 1
15315 EOF
15316  ;;
15317 esac
15318
15319 for ac_header in \
15320 fcntl.h \
15321 getopt.h \
15322 limits.h \
15323 locale.h \
15324 math.h \
15325 poll.h \
15326 sys/bsdtypes.h \
15327 sys/ioctl.h \
15328 sys/param.h \
15329 sys/poll.h \
15330 sys/select.h \
15331 sys/time.h \
15332 sys/times.h \
15333 ttyent.h \
15334 unistd.h \
15335 wctype.h \
15336
15337 do
15338 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15339 echo "$as_me:15339: checking for $ac_header" >&5
15340 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15341 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15342   echo $ECHO_N "(cached) $ECHO_C" >&6
15343 else
15344   cat >conftest.$ac_ext <<_ACEOF
15345 #line 15345 "configure"
15346 #include "confdefs.h"
15347 #include <$ac_header>
15348 _ACEOF
15349 if { (eval echo "$as_me:15349: \"$ac_cpp conftest.$ac_ext\"") >&5
15350   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15351   ac_status=$?
15352   egrep -v '^ *\+' conftest.er1 >conftest.err
15353   rm -f conftest.er1
15354   cat conftest.err >&5
15355   echo "$as_me:15355: \$? = $ac_status" >&5
15356   (exit $ac_status); } >/dev/null; then
15357   if test -s conftest.err; then
15358     ac_cpp_err=$ac_c_preproc_warn_flag
15359   else
15360     ac_cpp_err=
15361   fi
15362 else
15363   ac_cpp_err=yes
15364 fi
15365 if test -z "$ac_cpp_err"; then
15366   eval "$as_ac_Header=yes"
15367 else
15368   echo "$as_me: failed program was:" >&5
15369   cat conftest.$ac_ext >&5
15370   eval "$as_ac_Header=no"
15371 fi
15372 rm -f conftest.err conftest.$ac_ext
15373 fi
15374 echo "$as_me:15374: result: `eval echo '${'$as_ac_Header'}'`" >&5
15375 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15376 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15377   cat >>confdefs.h <<EOF
15378 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15379 EOF
15380
15381 fi
15382 done
15383
15384 for ac_header in unistd.h getopt.h
15385 do
15386 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15387 echo "$as_me:15387: checking for $ac_header" >&5
15388 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15389 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15390   echo $ECHO_N "(cached) $ECHO_C" >&6
15391 else
15392   cat >conftest.$ac_ext <<_ACEOF
15393 #line 15393 "configure"
15394 #include "confdefs.h"
15395 #include <$ac_header>
15396 _ACEOF
15397 if { (eval echo "$as_me:15397: \"$ac_cpp conftest.$ac_ext\"") >&5
15398   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15399   ac_status=$?
15400   egrep -v '^ *\+' conftest.er1 >conftest.err
15401   rm -f conftest.er1
15402   cat conftest.err >&5
15403   echo "$as_me:15403: \$? = $ac_status" >&5
15404   (exit $ac_status); } >/dev/null; then
15405   if test -s conftest.err; then
15406     ac_cpp_err=$ac_c_preproc_warn_flag
15407   else
15408     ac_cpp_err=
15409   fi
15410 else
15411   ac_cpp_err=yes
15412 fi
15413 if test -z "$ac_cpp_err"; then
15414   eval "$as_ac_Header=yes"
15415 else
15416   echo "$as_me: failed program was:" >&5
15417   cat conftest.$ac_ext >&5
15418   eval "$as_ac_Header=no"
15419 fi
15420 rm -f conftest.err conftest.$ac_ext
15421 fi
15422 echo "$as_me:15422: result: `eval echo '${'$as_ac_Header'}'`" >&5
15423 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15424 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15425   cat >>confdefs.h <<EOF
15426 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15427 EOF
15428
15429 fi
15430 done
15431
15432 echo "$as_me:15432: checking for header declaring getopt variables" >&5
15433 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15434 if test "${cf_cv_getopt_header+set}" = set; then
15435   echo $ECHO_N "(cached) $ECHO_C" >&6
15436 else
15437
15438 cf_cv_getopt_header=none
15439 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15440 do
15441 cat >conftest.$ac_ext <<_ACEOF
15442 #line 15442 "configure"
15443 #include "confdefs.h"
15444
15445 #include <$cf_header>
15446 int
15447 main ()
15448 {
15449 int x = optind; char *y = optarg
15450   ;
15451   return 0;
15452 }
15453 _ACEOF
15454 rm -f conftest.$ac_objext
15455 if { (eval echo "$as_me:15455: \"$ac_compile\"") >&5
15456   (eval $ac_compile) 2>&5
15457   ac_status=$?
15458   echo "$as_me:15458: \$? = $ac_status" >&5
15459   (exit $ac_status); } &&
15460          { ac_try='test -s conftest.$ac_objext'
15461   { (eval echo "$as_me:15461: \"$ac_try\"") >&5
15462   (eval $ac_try) 2>&5
15463   ac_status=$?
15464   echo "$as_me:15464: \$? = $ac_status" >&5
15465   (exit $ac_status); }; }; then
15466   cf_cv_getopt_header=$cf_header
15467  break
15468 else
15469   echo "$as_me: failed program was:" >&5
15470 cat conftest.$ac_ext >&5
15471 fi
15472 rm -f conftest.$ac_objext conftest.$ac_ext
15473 done
15474
15475 fi
15476 echo "$as_me:15476: result: $cf_cv_getopt_header" >&5
15477 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15478 if test $cf_cv_getopt_header != none ; then
15479
15480 cat >>confdefs.h <<\EOF
15481 #define HAVE_GETOPT_HEADER 1
15482 EOF
15483
15484 fi
15485 if test $cf_cv_getopt_header = getopt.h ; then
15486
15487 cat >>confdefs.h <<\EOF
15488 #define NEED_GETOPT_H 1
15489 EOF
15490
15491 fi
15492
15493 # check for ISC (this may also define _POSIX_SOURCE)
15494 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15495 if test "x$ISC" = xyes ; then
15496
15497 echo "$as_me:15497: checking for main in -lcposix" >&5
15498 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15499 if test "${ac_cv_lib_cposix_main+set}" = set; then
15500   echo $ECHO_N "(cached) $ECHO_C" >&6
15501 else
15502   ac_check_lib_save_LIBS=$LIBS
15503 LIBS="-lcposix  $LIBS"
15504 cat >conftest.$ac_ext <<_ACEOF
15505 #line 15505 "configure"
15506 #include "confdefs.h"
15507
15508 int
15509 main ()
15510 {
15511 main ();
15512   ;
15513   return 0;
15514 }
15515 _ACEOF
15516 rm -f conftest.$ac_objext conftest$ac_exeext
15517 if { (eval echo "$as_me:15517: \"$ac_link\"") >&5
15518   (eval $ac_link) 2>&5
15519   ac_status=$?
15520   echo "$as_me:15520: \$? = $ac_status" >&5
15521   (exit $ac_status); } &&
15522          { ac_try='test -s conftest$ac_exeext'
15523   { (eval echo "$as_me:15523: \"$ac_try\"") >&5
15524   (eval $ac_try) 2>&5
15525   ac_status=$?
15526   echo "$as_me:15526: \$? = $ac_status" >&5
15527   (exit $ac_status); }; }; then
15528   ac_cv_lib_cposix_main=yes
15529 else
15530   echo "$as_me: failed program was:" >&5
15531 cat conftest.$ac_ext >&5
15532 ac_cv_lib_cposix_main=no
15533 fi
15534 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15535 LIBS=$ac_check_lib_save_LIBS
15536 fi
15537 echo "$as_me:15537: result: $ac_cv_lib_cposix_main" >&5
15538 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15539 if test $ac_cv_lib_cposix_main = yes; then
15540   cat >>confdefs.h <<EOF
15541 #define HAVE_LIBCPOSIX 1
15542 EOF
15543
15544   LIBS="-lcposix $LIBS"
15545
15546 fi
15547
15548         echo "$as_me:15548: checking for bzero in -linet" >&5
15549 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15550 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15551   echo $ECHO_N "(cached) $ECHO_C" >&6
15552 else
15553   ac_check_lib_save_LIBS=$LIBS
15554 LIBS="-linet  $LIBS"
15555 cat >conftest.$ac_ext <<_ACEOF
15556 #line 15556 "configure"
15557 #include "confdefs.h"
15558
15559 /* Override any gcc2 internal prototype to avoid an error.  */
15560 #ifdef __cplusplus
15561 extern "C"
15562 #endif
15563 /* We use char because int might match the return type of a gcc2
15564    builtin and then its argument prototype would still apply.  */
15565 char bzero ();
15566 int
15567 main ()
15568 {
15569 bzero ();
15570   ;
15571   return 0;
15572 }
15573 _ACEOF
15574 rm -f conftest.$ac_objext conftest$ac_exeext
15575 if { (eval echo "$as_me:15575: \"$ac_link\"") >&5
15576   (eval $ac_link) 2>&5
15577   ac_status=$?
15578   echo "$as_me:15578: \$? = $ac_status" >&5
15579   (exit $ac_status); } &&
15580          { ac_try='test -s conftest$ac_exeext'
15581   { (eval echo "$as_me:15581: \"$ac_try\"") >&5
15582   (eval $ac_try) 2>&5
15583   ac_status=$?
15584   echo "$as_me:15584: \$? = $ac_status" >&5
15585   (exit $ac_status); }; }; then
15586   ac_cv_lib_inet_bzero=yes
15587 else
15588   echo "$as_me: failed program was:" >&5
15589 cat conftest.$ac_ext >&5
15590 ac_cv_lib_inet_bzero=no
15591 fi
15592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15593 LIBS=$ac_check_lib_save_LIBS
15594 fi
15595 echo "$as_me:15595: result: $ac_cv_lib_inet_bzero" >&5
15596 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15597 if test $ac_cv_lib_inet_bzero = yes; then
15598
15599 cf_add_libs="-linet"
15600 # Filter out duplicates - this happens with badly-designed ".pc" files...
15601 for cf_add_1lib in $LIBS
15602 do
15603         for cf_add_2lib in $cf_add_libs
15604         do
15605                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15606                 then
15607                         cf_add_1lib=
15608                         break
15609                 fi
15610         done
15611         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15612 done
15613 LIBS="$cf_add_libs"
15614
15615 fi
15616 fi
15617
15618 echo "$as_me:15618: checking if sys/time.h works with sys/select.h" >&5
15619 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15620 if test "${cf_cv_sys_time_select+set}" = set; then
15621   echo $ECHO_N "(cached) $ECHO_C" >&6
15622 else
15623
15624 cat >conftest.$ac_ext <<_ACEOF
15625 #line 15625 "configure"
15626 #include "confdefs.h"
15627
15628 #include <sys/types.h>
15629 #ifdef HAVE_SYS_TIME_H
15630 #include <sys/time.h>
15631 #endif
15632 #ifdef HAVE_SYS_SELECT_H
15633 #include <sys/select.h>
15634 #endif
15635
15636 int
15637 main ()
15638 {
15639
15640   ;
15641   return 0;
15642 }
15643 _ACEOF
15644 rm -f conftest.$ac_objext
15645 if { (eval echo "$as_me:15645: \"$ac_compile\"") >&5
15646   (eval $ac_compile) 2>&5
15647   ac_status=$?
15648   echo "$as_me:15648: \$? = $ac_status" >&5
15649   (exit $ac_status); } &&
15650          { ac_try='test -s conftest.$ac_objext'
15651   { (eval echo "$as_me:15651: \"$ac_try\"") >&5
15652   (eval $ac_try) 2>&5
15653   ac_status=$?
15654   echo "$as_me:15654: \$? = $ac_status" >&5
15655   (exit $ac_status); }; }; then
15656   cf_cv_sys_time_select=yes
15657 else
15658   echo "$as_me: failed program was:" >&5
15659 cat conftest.$ac_ext >&5
15660 cf_cv_sys_time_select=no
15661 fi
15662 rm -f conftest.$ac_objext conftest.$ac_ext
15663
15664 fi
15665
15666 echo "$as_me:15666: result: $cf_cv_sys_time_select" >&5
15667 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15668 test "$cf_cv_sys_time_select" = yes &&
15669 cat >>confdefs.h <<\EOF
15670 #define HAVE_SYS_TIME_SELECT 1
15671 EOF
15672
15673 ###     checks for compiler characteristics
15674 ac_ext=c
15675 ac_cpp='$CPP $CPPFLAGS'
15676 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15677 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15678 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15679 ac_main_return=return
15680
15681 echo "$as_me:15681: checking for an ANSI C-conforming const" >&5
15682 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15683 if test "${ac_cv_c_const+set}" = set; then
15684   echo $ECHO_N "(cached) $ECHO_C" >&6
15685 else
15686   cat >conftest.$ac_ext <<_ACEOF
15687 #line 15687 "configure"
15688 #include "confdefs.h"
15689
15690 int
15691 main ()
15692 {
15693 /* FIXME: Include the comments suggested by Paul. */
15694 #ifndef __cplusplus
15695   /* Ultrix mips cc rejects this.  */
15696   typedef int charset[2];
15697   const charset x;
15698   /* SunOS 4.1.1 cc rejects this.  */
15699   char const *const *ccp;
15700   char **p;
15701   /* NEC SVR4.0.2 mips cc rejects this.  */
15702   struct point {int x, y;};
15703   static struct point const zero = {0,0};
15704   /* AIX XL C 1.02.0.0 rejects this.
15705      It does not let you subtract one const X* pointer from another in
15706      an arm of an if-expression whose if-part is not a constant
15707      expression */
15708   const char *g = "string";
15709   ccp = &g + (g ? g-g : 0);
15710   /* HPUX 7.0 cc rejects these. */
15711   ++ccp;
15712   p = (char**) ccp;
15713   ccp = (char const *const *) p;
15714   { /* SCO 3.2v4 cc rejects this.  */
15715     char *t;
15716     char const *s = 0 ? (char *) 0 : (char const *) 0;
15717
15718     *t++ = 0;
15719   }
15720   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15721     int x[] = {25, 17};
15722     const int *foo = &x[0];
15723     ++foo;
15724   }
15725   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15726     typedef const int *iptr;
15727     iptr p = 0;
15728     ++p;
15729   }
15730   { /* AIX XL C 1.02.0.0 rejects this saying
15731        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15732     struct s { int j; const int *ap[3]; };
15733     struct s *b; b->j = 5;
15734   }
15735   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15736     const int foo = 10;
15737   }
15738 #endif
15739
15740   ;
15741   return 0;
15742 }
15743 _ACEOF
15744 rm -f conftest.$ac_objext
15745 if { (eval echo "$as_me:15745: \"$ac_compile\"") >&5
15746   (eval $ac_compile) 2>&5
15747   ac_status=$?
15748   echo "$as_me:15748: \$? = $ac_status" >&5
15749   (exit $ac_status); } &&
15750          { ac_try='test -s conftest.$ac_objext'
15751   { (eval echo "$as_me:15751: \"$ac_try\"") >&5
15752   (eval $ac_try) 2>&5
15753   ac_status=$?
15754   echo "$as_me:15754: \$? = $ac_status" >&5
15755   (exit $ac_status); }; }; then
15756   ac_cv_c_const=yes
15757 else
15758   echo "$as_me: failed program was:" >&5
15759 cat conftest.$ac_ext >&5
15760 ac_cv_c_const=no
15761 fi
15762 rm -f conftest.$ac_objext conftest.$ac_ext
15763 fi
15764 echo "$as_me:15764: result: $ac_cv_c_const" >&5
15765 echo "${ECHO_T}$ac_cv_c_const" >&6
15766 if test $ac_cv_c_const = no; then
15767
15768 cat >>confdefs.h <<\EOF
15769 #define const
15770 EOF
15771
15772 fi
15773
15774 echo "$as_me:15774: checking for inline" >&5
15775 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15776 if test "${ac_cv_c_inline+set}" = set; then
15777   echo $ECHO_N "(cached) $ECHO_C" >&6
15778 else
15779   ac_cv_c_inline=no
15780 for ac_kw in inline __inline__ __inline; do
15781   cat >conftest.$ac_ext <<_ACEOF
15782 #line 15782 "configure"
15783 #include "confdefs.h"
15784 #ifndef __cplusplus
15785 static $ac_kw int static_foo () {return 0; }
15786 $ac_kw int foo () {return 0; }
15787 #endif
15788
15789 _ACEOF
15790 rm -f conftest.$ac_objext
15791 if { (eval echo "$as_me:15791: \"$ac_compile\"") >&5
15792   (eval $ac_compile) 2>&5
15793   ac_status=$?
15794   echo "$as_me:15794: \$? = $ac_status" >&5
15795   (exit $ac_status); } &&
15796          { ac_try='test -s conftest.$ac_objext'
15797   { (eval echo "$as_me:15797: \"$ac_try\"") >&5
15798   (eval $ac_try) 2>&5
15799   ac_status=$?
15800   echo "$as_me:15800: \$? = $ac_status" >&5
15801   (exit $ac_status); }; }; then
15802   ac_cv_c_inline=$ac_kw; break
15803 else
15804   echo "$as_me: failed program was:" >&5
15805 cat conftest.$ac_ext >&5
15806 fi
15807 rm -f conftest.$ac_objext conftest.$ac_ext
15808 done
15809
15810 fi
15811 echo "$as_me:15811: result: $ac_cv_c_inline" >&5
15812 echo "${ECHO_T}$ac_cv_c_inline" >&6
15813 case $ac_cv_c_inline in
15814   inline | yes) ;;
15815   no)
15816 cat >>confdefs.h <<\EOF
15817 #define inline
15818 EOF
15819  ;;
15820   *)  cat >>confdefs.h <<EOF
15821 #define inline $ac_cv_c_inline
15822 EOF
15823  ;;
15824 esac
15825
15826 NCURSES_INLINE=
15827 if test "$ac_cv_c_inline" != no ; then
15828         NCURSES_INLINE=inline
15829         if test "$INTEL_COMPILER" = yes
15830         then
15831                 :
15832         elif test "$CLANG_COMPILER" = yes
15833         then
15834                 :
15835         elif test "$GCC" = yes
15836         then
15837                 echo "$as_me:15837: checking if $CC supports options to tune inlining" >&5
15838 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15839 if test "${cf_cv_gcc_inline+set}" = set; then
15840   echo $ECHO_N "(cached) $ECHO_C" >&6
15841 else
15842
15843                 cf_save_CFLAGS=$CFLAGS
15844                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15845                 cat >conftest.$ac_ext <<_ACEOF
15846 #line 15846 "configure"
15847 #include "confdefs.h"
15848 inline int foo(void) { return 1; }
15849 int
15850 main ()
15851 {
15852 ${cf_cv_main_return:-return} foo()
15853   ;
15854   return 0;
15855 }
15856 _ACEOF
15857 rm -f conftest.$ac_objext
15858 if { (eval echo "$as_me:15858: \"$ac_compile\"") >&5
15859   (eval $ac_compile) 2>&5
15860   ac_status=$?
15861   echo "$as_me:15861: \$? = $ac_status" >&5
15862   (exit $ac_status); } &&
15863          { ac_try='test -s conftest.$ac_objext'
15864   { (eval echo "$as_me:15864: \"$ac_try\"") >&5
15865   (eval $ac_try) 2>&5
15866   ac_status=$?
15867   echo "$as_me:15867: \$? = $ac_status" >&5
15868   (exit $ac_status); }; }; then
15869   cf_cv_gcc_inline=yes
15870 else
15871   echo "$as_me: failed program was:" >&5
15872 cat conftest.$ac_ext >&5
15873 cf_cv_gcc_inline=no
15874 fi
15875 rm -f conftest.$ac_objext conftest.$ac_ext
15876                 CFLAGS=$cf_save_CFLAGS
15877
15878 fi
15879 echo "$as_me:15879: result: $cf_cv_gcc_inline" >&5
15880 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15881                 if test "$cf_cv_gcc_inline" = yes ; then
15882
15883 cf_fix_cppflags=no
15884 cf_new_cflags=
15885 cf_new_cppflags=
15886 cf_new_extra_cppflags=
15887
15888 for cf_add_cflags in --param max-inline-insns-single=1200
15889 do
15890 case $cf_fix_cppflags in
15891 (no)
15892         case $cf_add_cflags in
15893         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15894                 case $cf_add_cflags in
15895                 (-D*)
15896                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15897
15898                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15899                                 && test -z "${cf_tst_cflags}" \
15900                                 && cf_fix_cppflags=yes
15901
15902                         if test $cf_fix_cppflags = yes ; then
15903                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15904                                 continue
15905                         elif test "${cf_tst_cflags}" = "\"'" ; then
15906                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15907                                 continue
15908                         fi
15909                         ;;
15910                 esac
15911                 case "$CPPFLAGS" in
15912                 (*$cf_add_cflags)
15913                         ;;
15914                 (*)
15915                         case $cf_add_cflags in
15916                         (-D*)
15917                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15918
15919 CPPFLAGS=`echo "$CPPFLAGS" | \
15920         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15921                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15922
15923                                 ;;
15924                         esac
15925                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15926                         ;;
15927                 esac
15928                 ;;
15929         (*)
15930                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15931                 ;;
15932         esac
15933         ;;
15934 (yes)
15935         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15936
15937         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15938
15939         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15940                 && test -z "${cf_tst_cflags}" \
15941                 && cf_fix_cppflags=no
15942         ;;
15943 esac
15944 done
15945
15946 if test -n "$cf_new_cflags" ; then
15947
15948         CFLAGS="$CFLAGS $cf_new_cflags"
15949 fi
15950
15951 if test -n "$cf_new_cppflags" ; then
15952
15953         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15954 fi
15955
15956 if test -n "$cf_new_extra_cppflags" ; then
15957
15958         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15959 fi
15960
15961                 fi
15962         fi
15963 fi
15964
15965 echo "$as_me:15965: checking for signal global datatype" >&5
15966 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15967 if test "${cf_cv_sig_atomic_t+set}" = set; then
15968   echo $ECHO_N "(cached) $ECHO_C" >&6
15969 else
15970
15971         for cf_type in \
15972                 "volatile sig_atomic_t" \
15973                 "sig_atomic_t" \
15974                 "int"
15975         do
15976         cat >conftest.$ac_ext <<_ACEOF
15977 #line 15977 "configure"
15978 #include "confdefs.h"
15979
15980 #include <sys/types.h>
15981 #include <signal.h>
15982 #include <stdio.h>
15983
15984 extern $cf_type x;
15985 $cf_type x;
15986 static void handler(int sig)
15987 {
15988         x = 5;
15989 }
15990 int
15991 main ()
15992 {
15993 signal(SIGINT, handler);
15994                  x = 1
15995   ;
15996   return 0;
15997 }
15998 _ACEOF
15999 rm -f conftest.$ac_objext
16000 if { (eval echo "$as_me:16000: \"$ac_compile\"") >&5
16001   (eval $ac_compile) 2>&5
16002   ac_status=$?
16003   echo "$as_me:16003: \$? = $ac_status" >&5
16004   (exit $ac_status); } &&
16005          { ac_try='test -s conftest.$ac_objext'
16006   { (eval echo "$as_me:16006: \"$ac_try\"") >&5
16007   (eval $ac_try) 2>&5
16008   ac_status=$?
16009   echo "$as_me:16009: \$? = $ac_status" >&5
16010   (exit $ac_status); }; }; then
16011   cf_cv_sig_atomic_t=$cf_type
16012 else
16013   echo "$as_me: failed program was:" >&5
16014 cat conftest.$ac_ext >&5
16015 cf_cv_sig_atomic_t=no
16016 fi
16017 rm -f conftest.$ac_objext conftest.$ac_ext
16018                 test "$cf_cv_sig_atomic_t" != no && break
16019         done
16020
16021 fi
16022
16023 echo "$as_me:16023: result: $cf_cv_sig_atomic_t" >&5
16024 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
16025 test "$cf_cv_sig_atomic_t" != no &&
16026 cat >>confdefs.h <<EOF
16027 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
16028 EOF
16029
16030 if test $NCURSES_CHTYPE = auto ; then
16031
16032 echo "$as_me:16032: checking for type of chtype" >&5
16033 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
16034 if test "${cf_cv_typeof_chtype+set}" = set; then
16035   echo $ECHO_N "(cached) $ECHO_C" >&6
16036 else
16037
16038                 if test "$cross_compiling" = yes; then
16039   cf_cv_typeof_chtype=long
16040 else
16041   cat >conftest.$ac_ext <<_ACEOF
16042 #line 16042 "configure"
16043 #include "confdefs.h"
16044
16045 #define WANT_BITS 31
16046 #include <stdio.h>
16047 int main()
16048 {
16049         FILE *fp = fopen("cf_test.out", "w");
16050         if (fp != 0) {
16051                 char *result = "long";
16052                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16053                         int n;
16054                         unsigned int x, y;
16055                         for (n = 0; n < WANT_BITS; n++) {
16056                                 x = (1 << n);
16057                                 y = (x >> n);
16058                                 if (y != 1 || x == 0) {
16059                                         x = 0;
16060                                         break;
16061                                 }
16062                         }
16063                         /*
16064                          * If x is nonzero, an int is big enough for the bits
16065                          * that we want.
16066                          */
16067                         result = (x != 0) ? "int" : "long";
16068                 }
16069                 fputs(result, fp);
16070                 fclose(fp);
16071         }
16072         ${cf_cv_main_return:-return}(0);
16073 }
16074
16075 _ACEOF
16076 rm -f conftest$ac_exeext
16077 if { (eval echo "$as_me:16077: \"$ac_link\"") >&5
16078   (eval $ac_link) 2>&5
16079   ac_status=$?
16080   echo "$as_me:16080: \$? = $ac_status" >&5
16081   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16082   { (eval echo "$as_me:16082: \"$ac_try\"") >&5
16083   (eval $ac_try) 2>&5
16084   ac_status=$?
16085   echo "$as_me:16085: \$? = $ac_status" >&5
16086   (exit $ac_status); }; }; then
16087   cf_cv_typeof_chtype=`cat cf_test.out`
16088 else
16089   echo "$as_me: program exited with status $ac_status" >&5
16090 echo "$as_me: failed program was:" >&5
16091 cat conftest.$ac_ext >&5
16092 cf_cv_typeof_chtype=long
16093 fi
16094 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16095 fi
16096                 rm -f cf_test.out
16097
16098 fi
16099
16100 echo "$as_me:16100: result: $cf_cv_typeof_chtype" >&5
16101 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16102
16103 cat >>confdefs.h <<EOF
16104 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16105 EOF
16106
16107 else
16108         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16109 fi
16110 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16111
16112 echo "$as_me:16112: checking if unsigned literals are legal" >&5
16113 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16114 if test "${cf_cv_unsigned_literals+set}" = set; then
16115   echo $ECHO_N "(cached) $ECHO_C" >&6
16116 else
16117
16118         cat >conftest.$ac_ext <<_ACEOF
16119 #line 16119 "configure"
16120 #include "confdefs.h"
16121
16122 int
16123 main ()
16124 {
16125 long x = 1L + 1UL + 1U + 1
16126   ;
16127   return 0;
16128 }
16129 _ACEOF
16130 rm -f conftest.$ac_objext
16131 if { (eval echo "$as_me:16131: \"$ac_compile\"") >&5
16132   (eval $ac_compile) 2>&5
16133   ac_status=$?
16134   echo "$as_me:16134: \$? = $ac_status" >&5
16135   (exit $ac_status); } &&
16136          { ac_try='test -s conftest.$ac_objext'
16137   { (eval echo "$as_me:16137: \"$ac_try\"") >&5
16138   (eval $ac_try) 2>&5
16139   ac_status=$?
16140   echo "$as_me:16140: \$? = $ac_status" >&5
16141   (exit $ac_status); }; }; then
16142   cf_cv_unsigned_literals=yes
16143 else
16144   echo "$as_me: failed program was:" >&5
16145 cat conftest.$ac_ext >&5
16146 cf_cv_unsigned_literals=no
16147 fi
16148 rm -f conftest.$ac_objext conftest.$ac_ext
16149
16150 fi
16151
16152 echo "$as_me:16152: result: $cf_cv_unsigned_literals" >&5
16153 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16154
16155 cf_cv_1UL="1"
16156 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16157 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16158
16159 if test $NCURSES_MMASK_T = auto ; then
16160         cf_cv_typeof_mmask_t=long
16161 else
16162         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16163 fi
16164 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16165
16166 ###     Checks for external-data
16167
16168 echo "$as_me:16168: checking if external errno is declared" >&5
16169 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16170 if test "${cf_cv_dcl_errno+set}" = set; then
16171   echo $ECHO_N "(cached) $ECHO_C" >&6
16172 else
16173
16174         cat >conftest.$ac_ext <<_ACEOF
16175 #line 16175 "configure"
16176 #include "confdefs.h"
16177
16178 #ifdef HAVE_STDLIB_H
16179 #include <stdlib.h>
16180 #endif
16181 #include <stdio.h>
16182 #include <sys/types.h>
16183 #include <errno.h>
16184 int
16185 main ()
16186 {
16187 int x = (int) errno
16188   ;
16189   return 0;
16190 }
16191 _ACEOF
16192 rm -f conftest.$ac_objext
16193 if { (eval echo "$as_me:16193: \"$ac_compile\"") >&5
16194   (eval $ac_compile) 2>&5
16195   ac_status=$?
16196   echo "$as_me:16196: \$? = $ac_status" >&5
16197   (exit $ac_status); } &&
16198          { ac_try='test -s conftest.$ac_objext'
16199   { (eval echo "$as_me:16199: \"$ac_try\"") >&5
16200   (eval $ac_try) 2>&5
16201   ac_status=$?
16202   echo "$as_me:16202: \$? = $ac_status" >&5
16203   (exit $ac_status); }; }; then
16204   cf_cv_dcl_errno=yes
16205 else
16206   echo "$as_me: failed program was:" >&5
16207 cat conftest.$ac_ext >&5
16208 cf_cv_dcl_errno=no
16209 fi
16210 rm -f conftest.$ac_objext conftest.$ac_ext
16211
16212 fi
16213 echo "$as_me:16213: result: $cf_cv_dcl_errno" >&5
16214 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16215
16216 if test "$cf_cv_dcl_errno" = no ; then
16217
16218 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16219
16220         cat >>confdefs.h <<EOF
16221 #define $cf_result 1
16222 EOF
16223
16224 fi
16225
16226 # It's possible (for near-UNIX clones) that the data doesn't exist
16227
16228 echo "$as_me:16228: checking if external errno exists" >&5
16229 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16230 if test "${cf_cv_have_errno+set}" = set; then
16231   echo $ECHO_N "(cached) $ECHO_C" >&6
16232 else
16233
16234         cat >conftest.$ac_ext <<_ACEOF
16235 #line 16235 "configure"
16236 #include "confdefs.h"
16237
16238 #undef errno
16239 extern int errno;
16240
16241 int
16242 main ()
16243 {
16244 errno = 2
16245   ;
16246   return 0;
16247 }
16248 _ACEOF
16249 rm -f conftest.$ac_objext conftest$ac_exeext
16250 if { (eval echo "$as_me:16250: \"$ac_link\"") >&5
16251   (eval $ac_link) 2>&5
16252   ac_status=$?
16253   echo "$as_me:16253: \$? = $ac_status" >&5
16254   (exit $ac_status); } &&
16255          { ac_try='test -s conftest$ac_exeext'
16256   { (eval echo "$as_me:16256: \"$ac_try\"") >&5
16257   (eval $ac_try) 2>&5
16258   ac_status=$?
16259   echo "$as_me:16259: \$? = $ac_status" >&5
16260   (exit $ac_status); }; }; then
16261   cf_cv_have_errno=yes
16262 else
16263   echo "$as_me: failed program was:" >&5
16264 cat conftest.$ac_ext >&5
16265 cf_cv_have_errno=no
16266 fi
16267 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16268
16269 fi
16270 echo "$as_me:16270: result: $cf_cv_have_errno" >&5
16271 echo "${ECHO_T}$cf_cv_have_errno" >&6
16272
16273 if test "$cf_cv_have_errno" = yes ; then
16274
16275 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16276
16277         cat >>confdefs.h <<EOF
16278 #define $cf_result 1
16279 EOF
16280
16281 fi
16282
16283 echo "$as_me:16283: checking if data-only library module links" >&5
16284 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16285 if test "${cf_cv_link_dataonly+set}" = set; then
16286   echo $ECHO_N "(cached) $ECHO_C" >&6
16287 else
16288
16289         rm -f conftest.a
16290         cat >conftest.$ac_ext <<EOF
16291 #line 16291 "configure"
16292 int     testdata[3] = { 123, 456, 789 };
16293 EOF
16294         if { (eval echo "$as_me:16294: \"$ac_compile\"") >&5
16295   (eval $ac_compile) 2>&5
16296   ac_status=$?
16297   echo "$as_me:16297: \$? = $ac_status" >&5
16298   (exit $ac_status); } ; then
16299                 mv conftest.o data.o && \
16300                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16301         fi
16302         rm -f conftest.$ac_ext data.o
16303         cat >conftest.$ac_ext <<EOF
16304 #line 16304 "configure"
16305 int     testfunc()
16306 {
16307 #if defined(NeXT)
16308         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16309 #else
16310         extern int testdata[3];
16311         return testdata[0] == 123
16312            &&  testdata[1] == 456
16313            &&  testdata[2] == 789;
16314 #endif
16315 }
16316 EOF
16317         if { (eval echo "$as_me:16317: \"$ac_compile\"") >&5
16318   (eval $ac_compile) 2>&5
16319   ac_status=$?
16320   echo "$as_me:16320: \$? = $ac_status" >&5
16321   (exit $ac_status); }; then
16322                 mv conftest.o func.o && \
16323                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16324         fi
16325         rm -f conftest.$ac_ext func.o
16326         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16327         cf_saveLIBS="$LIBS"
16328         LIBS="conftest.a $LIBS"
16329         if test "$cross_compiling" = yes; then
16330   cf_cv_link_dataonly=unknown
16331 else
16332   cat >conftest.$ac_ext <<_ACEOF
16333 #line 16333 "configure"
16334 #include "confdefs.h"
16335
16336         int main()
16337         {
16338                 extern int testfunc();
16339                 ${cf_cv_main_return:-return} (!testfunc());
16340         }
16341
16342 _ACEOF
16343 rm -f conftest$ac_exeext
16344 if { (eval echo "$as_me:16344: \"$ac_link\"") >&5
16345   (eval $ac_link) 2>&5
16346   ac_status=$?
16347   echo "$as_me:16347: \$? = $ac_status" >&5
16348   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16349   { (eval echo "$as_me:16349: \"$ac_try\"") >&5
16350   (eval $ac_try) 2>&5
16351   ac_status=$?
16352   echo "$as_me:16352: \$? = $ac_status" >&5
16353   (exit $ac_status); }; }; then
16354   cf_cv_link_dataonly=yes
16355 else
16356   echo "$as_me: program exited with status $ac_status" >&5
16357 echo "$as_me: failed program was:" >&5
16358 cat conftest.$ac_ext >&5
16359 cf_cv_link_dataonly=no
16360 fi
16361 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16362 fi
16363         LIBS="$cf_saveLIBS"
16364
16365 fi
16366
16367 echo "$as_me:16367: result: $cf_cv_link_dataonly" >&5
16368 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16369
16370 if test "$cf_cv_link_dataonly" = no ; then
16371
16372 cat >>confdefs.h <<\EOF
16373 #define BROKEN_LINKER 1
16374 EOF
16375
16376         BROKEN_LINKER=1
16377 fi
16378
16379 ###     Checks for library functions.
16380
16381 for ac_func in \
16382 getcwd \
16383 getegid \
16384 geteuid \
16385 getopt \
16386 getttynam \
16387 issetugid \
16388 poll \
16389 putenv \
16390 remove \
16391 select \
16392 setbuf \
16393 setbuffer \
16394 setenv \
16395 setvbuf \
16396 sigaction \
16397 sigvec \
16398 strdup \
16399 strstr \
16400 tcgetpgrp \
16401 times \
16402 vsnprintf \
16403
16404 do
16405 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16406 echo "$as_me:16406: checking for $ac_func" >&5
16407 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16408 if eval "test \"\${$as_ac_var+set}\" = set"; then
16409   echo $ECHO_N "(cached) $ECHO_C" >&6
16410 else
16411   cat >conftest.$ac_ext <<_ACEOF
16412 #line 16412 "configure"
16413 #include "confdefs.h"
16414 /* System header to define __stub macros and hopefully few prototypes,
16415     which can conflict with char $ac_func (); below.  */
16416 #include <assert.h>
16417 /* Override any gcc2 internal prototype to avoid an error.  */
16418 #ifdef __cplusplus
16419 extern "C"
16420 #endif
16421 /* We use char because int might match the return type of a gcc2
16422    builtin and then its argument prototype would still apply.  */
16423 char $ac_func ();
16424 char (*f) ();
16425
16426 int
16427 main ()
16428 {
16429 /* The GNU C library defines this for functions which it implements
16430     to always fail with ENOSYS.  Some functions are actually named
16431     something starting with __ and the normal name is an alias.  */
16432 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16433 choke me
16434 #else
16435 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16436 #endif
16437
16438   ;
16439   return 0;
16440 }
16441 _ACEOF
16442 rm -f conftest.$ac_objext conftest$ac_exeext
16443 if { (eval echo "$as_me:16443: \"$ac_link\"") >&5
16444   (eval $ac_link) 2>&5
16445   ac_status=$?
16446   echo "$as_me:16446: \$? = $ac_status" >&5
16447   (exit $ac_status); } &&
16448          { ac_try='test -s conftest$ac_exeext'
16449   { (eval echo "$as_me:16449: \"$ac_try\"") >&5
16450   (eval $ac_try) 2>&5
16451   ac_status=$?
16452   echo "$as_me:16452: \$? = $ac_status" >&5
16453   (exit $ac_status); }; }; then
16454   eval "$as_ac_var=yes"
16455 else
16456   echo "$as_me: failed program was:" >&5
16457 cat conftest.$ac_ext >&5
16458 eval "$as_ac_var=no"
16459 fi
16460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16461 fi
16462 echo "$as_me:16462: result: `eval echo '${'$as_ac_var'}'`" >&5
16463 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16464 if test `eval echo '${'$as_ac_var'}'` = yes; then
16465   cat >>confdefs.h <<EOF
16466 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16467 EOF
16468
16469 fi
16470 done
16471
16472 if test "x$ac_cv_func_getopt" = xno &&
16473    test "x$cf_with_progs$cf_with_tests" != xnono; then
16474         { { echo "$as_me:16474: error: getopt is required for building programs" >&5
16475 echo "$as_me: error: getopt is required for building programs" >&2;}
16476    { (exit 1); exit 1; }; }
16477 fi
16478
16479 if test "x$with_getcap" = "xyes" ; then
16480
16481 echo "$as_me:16481: checking for terminal-capability database functions" >&5
16482 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16483 if test "${cf_cv_cgetent+set}" = set; then
16484   echo $ECHO_N "(cached) $ECHO_C" >&6
16485 else
16486
16487 cat >conftest.$ac_ext <<_ACEOF
16488 #line 16488 "configure"
16489 #include "confdefs.h"
16490
16491 #include <stdlib.h>
16492 int
16493 main ()
16494 {
16495
16496         char temp[128];
16497         char *buf = temp;
16498         char *db_array = temp;
16499         cgetent(&buf, &db_array, "vt100");
16500         cgetcap(buf, "tc", '=');
16501         cgetmatch(buf, "tc");
16502
16503   ;
16504   return 0;
16505 }
16506 _ACEOF
16507 rm -f conftest.$ac_objext conftest$ac_exeext
16508 if { (eval echo "$as_me:16508: \"$ac_link\"") >&5
16509   (eval $ac_link) 2>&5
16510   ac_status=$?
16511   echo "$as_me:16511: \$? = $ac_status" >&5
16512   (exit $ac_status); } &&
16513          { ac_try='test -s conftest$ac_exeext'
16514   { (eval echo "$as_me:16514: \"$ac_try\"") >&5
16515   (eval $ac_try) 2>&5
16516   ac_status=$?
16517   echo "$as_me:16517: \$? = $ac_status" >&5
16518   (exit $ac_status); }; }; then
16519   cf_cv_cgetent=yes
16520 else
16521   echo "$as_me: failed program was:" >&5
16522 cat conftest.$ac_ext >&5
16523 cf_cv_cgetent=no
16524 fi
16525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16526
16527 fi
16528 echo "$as_me:16528: result: $cf_cv_cgetent" >&5
16529 echo "${ECHO_T}$cf_cv_cgetent" >&6
16530
16531 if test "$cf_cv_cgetent" = yes
16532 then
16533
16534 cat >>confdefs.h <<\EOF
16535 #define HAVE_BSD_CGETENT 1
16536 EOF
16537
16538 echo "$as_me:16538: checking if cgetent uses const parameter" >&5
16539 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16540 if test "${cf_cv_cgetent_const+set}" = set; then
16541   echo $ECHO_N "(cached) $ECHO_C" >&6
16542 else
16543
16544 cat >conftest.$ac_ext <<_ACEOF
16545 #line 16545 "configure"
16546 #include "confdefs.h"
16547
16548 #include <stdlib.h>
16549 int
16550 main ()
16551 {
16552
16553         char temp[128];
16554         char *buf = temp;
16555 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16556         const char *db_array = temp;
16557         cgetent(&buf, &db_array, "vt100");
16558 #endif
16559         cgetcap(buf, "tc", '=');
16560         cgetmatch(buf, "tc");
16561
16562   ;
16563   return 0;
16564 }
16565 _ACEOF
16566 rm -f conftest.$ac_objext conftest$ac_exeext
16567 if { (eval echo "$as_me:16567: \"$ac_link\"") >&5
16568   (eval $ac_link) 2>&5
16569   ac_status=$?
16570   echo "$as_me:16570: \$? = $ac_status" >&5
16571   (exit $ac_status); } &&
16572          { ac_try='test -s conftest$ac_exeext'
16573   { (eval echo "$as_me:16573: \"$ac_try\"") >&5
16574   (eval $ac_try) 2>&5
16575   ac_status=$?
16576   echo "$as_me:16576: \$? = $ac_status" >&5
16577   (exit $ac_status); }; }; then
16578   cf_cv_cgetent_const=yes
16579 else
16580   echo "$as_me: failed program was:" >&5
16581 cat conftest.$ac_ext >&5
16582 cf_cv_cgetent_const=no
16583 fi
16584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16585
16586 fi
16587 echo "$as_me:16587: result: $cf_cv_cgetent_const" >&5
16588 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16589         if test "$cf_cv_cgetent_const" = yes
16590         then
16591
16592 cat >>confdefs.h <<EOF
16593 #define CGETENT_CONST const
16594 EOF
16595
16596         fi
16597 fi
16598
16599 fi
16600
16601 echo "$as_me:16601: checking for isascii" >&5
16602 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16603 if test "${cf_cv_have_isascii+set}" = set; then
16604   echo $ECHO_N "(cached) $ECHO_C" >&6
16605 else
16606
16607         cat >conftest.$ac_ext <<_ACEOF
16608 #line 16608 "configure"
16609 #include "confdefs.h"
16610 #include <ctype.h>
16611 int
16612 main ()
16613 {
16614 int x = isascii(' ')
16615   ;
16616   return 0;
16617 }
16618 _ACEOF
16619 rm -f conftest.$ac_objext conftest$ac_exeext
16620 if { (eval echo "$as_me:16620: \"$ac_link\"") >&5
16621   (eval $ac_link) 2>&5
16622   ac_status=$?
16623   echo "$as_me:16623: \$? = $ac_status" >&5
16624   (exit $ac_status); } &&
16625          { ac_try='test -s conftest$ac_exeext'
16626   { (eval echo "$as_me:16626: \"$ac_try\"") >&5
16627   (eval $ac_try) 2>&5
16628   ac_status=$?
16629   echo "$as_me:16629: \$? = $ac_status" >&5
16630   (exit $ac_status); }; }; then
16631   cf_cv_have_isascii=yes
16632 else
16633   echo "$as_me: failed program was:" >&5
16634 cat conftest.$ac_ext >&5
16635 cf_cv_have_isascii=no
16636 fi
16637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16638
16639 fi
16640 echo "$as_me:16640: result: $cf_cv_have_isascii" >&5
16641 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16642 test "$cf_cv_have_isascii" = yes &&
16643 cat >>confdefs.h <<\EOF
16644 #define HAVE_ISASCII 1
16645 EOF
16646
16647 if test "$ac_cv_func_sigaction" = yes; then
16648 echo "$as_me:16648: checking whether sigaction needs _POSIX_SOURCE" >&5
16649 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16650 cat >conftest.$ac_ext <<_ACEOF
16651 #line 16651 "configure"
16652 #include "confdefs.h"
16653
16654 #include <sys/types.h>
16655 #include <signal.h>
16656 int
16657 main ()
16658 {
16659 struct sigaction act
16660   ;
16661   return 0;
16662 }
16663 _ACEOF
16664 rm -f conftest.$ac_objext
16665 if { (eval echo "$as_me:16665: \"$ac_compile\"") >&5
16666   (eval $ac_compile) 2>&5
16667   ac_status=$?
16668   echo "$as_me:16668: \$? = $ac_status" >&5
16669   (exit $ac_status); } &&
16670          { ac_try='test -s conftest.$ac_objext'
16671   { (eval echo "$as_me:16671: \"$ac_try\"") >&5
16672   (eval $ac_try) 2>&5
16673   ac_status=$?
16674   echo "$as_me:16674: \$? = $ac_status" >&5
16675   (exit $ac_status); }; }; then
16676   sigact_bad=no
16677 else
16678   echo "$as_me: failed program was:" >&5
16679 cat conftest.$ac_ext >&5
16680
16681 cat >conftest.$ac_ext <<_ACEOF
16682 #line 16682 "configure"
16683 #include "confdefs.h"
16684
16685 #define _POSIX_SOURCE
16686 #include <sys/types.h>
16687 #include <signal.h>
16688 int
16689 main ()
16690 {
16691 struct sigaction act
16692   ;
16693   return 0;
16694 }
16695 _ACEOF
16696 rm -f conftest.$ac_objext
16697 if { (eval echo "$as_me:16697: \"$ac_compile\"") >&5
16698   (eval $ac_compile) 2>&5
16699   ac_status=$?
16700   echo "$as_me:16700: \$? = $ac_status" >&5
16701   (exit $ac_status); } &&
16702          { ac_try='test -s conftest.$ac_objext'
16703   { (eval echo "$as_me:16703: \"$ac_try\"") >&5
16704   (eval $ac_try) 2>&5
16705   ac_status=$?
16706   echo "$as_me:16706: \$? = $ac_status" >&5
16707   (exit $ac_status); }; }; then
16708   sigact_bad=yes
16709
16710 cat >>confdefs.h <<\EOF
16711 #define _POSIX_SOURCE 1
16712 EOF
16713
16714 else
16715   echo "$as_me: failed program was:" >&5
16716 cat conftest.$ac_ext >&5
16717 sigact_bad=unknown
16718 fi
16719 rm -f conftest.$ac_objext conftest.$ac_ext
16720 fi
16721 rm -f conftest.$ac_objext conftest.$ac_ext
16722 echo "$as_me:16722: result: $sigact_bad" >&5
16723 echo "${ECHO_T}$sigact_bad" >&6
16724 fi
16725
16726 echo "$as_me:16726: checking if nanosleep really works" >&5
16727 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16728 if test "${cf_cv_func_nanosleep+set}" = set; then
16729   echo $ECHO_N "(cached) $ECHO_C" >&6
16730 else
16731
16732 if test "$cross_compiling" = yes; then
16733   cf_cv_func_nanosleep=unknown
16734 else
16735   cat >conftest.$ac_ext <<_ACEOF
16736 #line 16736 "configure"
16737 #include "confdefs.h"
16738
16739 #include <stdio.h>
16740 #include <errno.h>
16741 #include <time.h>
16742
16743 #ifdef HAVE_SYS_TIME_H
16744 #include <sys/time.h>
16745 #endif
16746
16747 int main() {
16748         struct timespec ts1, ts2;
16749         int code;
16750         ts1.tv_sec  = 0;
16751         ts1.tv_nsec = 750000000;
16752         ts2.tv_sec  = 0;
16753         ts2.tv_nsec = 0;
16754         errno = 0;
16755         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16756         ${cf_cv_main_return:-return}(code != 0);
16757 }
16758
16759 _ACEOF
16760 rm -f conftest$ac_exeext
16761 if { (eval echo "$as_me:16761: \"$ac_link\"") >&5
16762   (eval $ac_link) 2>&5
16763   ac_status=$?
16764   echo "$as_me:16764: \$? = $ac_status" >&5
16765   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16766   { (eval echo "$as_me:16766: \"$ac_try\"") >&5
16767   (eval $ac_try) 2>&5
16768   ac_status=$?
16769   echo "$as_me:16769: \$? = $ac_status" >&5
16770   (exit $ac_status); }; }; then
16771   cf_cv_func_nanosleep=yes
16772 else
16773   echo "$as_me: program exited with status $ac_status" >&5
16774 echo "$as_me: failed program was:" >&5
16775 cat conftest.$ac_ext >&5
16776 cf_cv_func_nanosleep=no
16777 fi
16778 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16779 fi
16780 fi
16781 echo "$as_me:16781: result: $cf_cv_func_nanosleep" >&5
16782 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16783
16784 test "$cf_cv_func_nanosleep" = "yes" &&
16785 cat >>confdefs.h <<\EOF
16786 #define HAVE_NANOSLEEP 1
16787 EOF
16788
16789 for ac_header in \
16790 termio.h \
16791 termios.h \
16792 unistd.h \
16793
16794 do
16795 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16796 echo "$as_me:16796: checking for $ac_header" >&5
16797 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16798 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16799   echo $ECHO_N "(cached) $ECHO_C" >&6
16800 else
16801   cat >conftest.$ac_ext <<_ACEOF
16802 #line 16802 "configure"
16803 #include "confdefs.h"
16804 #include <$ac_header>
16805 _ACEOF
16806 if { (eval echo "$as_me:16806: \"$ac_cpp conftest.$ac_ext\"") >&5
16807   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16808   ac_status=$?
16809   egrep -v '^ *\+' conftest.er1 >conftest.err
16810   rm -f conftest.er1
16811   cat conftest.err >&5
16812   echo "$as_me:16812: \$? = $ac_status" >&5
16813   (exit $ac_status); } >/dev/null; then
16814   if test -s conftest.err; then
16815     ac_cpp_err=$ac_c_preproc_warn_flag
16816   else
16817     ac_cpp_err=
16818   fi
16819 else
16820   ac_cpp_err=yes
16821 fi
16822 if test -z "$ac_cpp_err"; then
16823   eval "$as_ac_Header=yes"
16824 else
16825   echo "$as_me: failed program was:" >&5
16826   cat conftest.$ac_ext >&5
16827   eval "$as_ac_Header=no"
16828 fi
16829 rm -f conftest.err conftest.$ac_ext
16830 fi
16831 echo "$as_me:16831: result: `eval echo '${'$as_ac_Header'}'`" >&5
16832 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16833 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16834   cat >>confdefs.h <<EOF
16835 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16836 EOF
16837
16838 fi
16839 done
16840
16841 if test "$ISC" = yes ; then
16842
16843 for ac_header in sys/termio.h
16844 do
16845 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16846 echo "$as_me:16846: checking for $ac_header" >&5
16847 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16848 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16849   echo $ECHO_N "(cached) $ECHO_C" >&6
16850 else
16851   cat >conftest.$ac_ext <<_ACEOF
16852 #line 16852 "configure"
16853 #include "confdefs.h"
16854 #include <$ac_header>
16855 _ACEOF
16856 if { (eval echo "$as_me:16856: \"$ac_cpp conftest.$ac_ext\"") >&5
16857   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16858   ac_status=$?
16859   egrep -v '^ *\+' conftest.er1 >conftest.err
16860   rm -f conftest.er1
16861   cat conftest.err >&5
16862   echo "$as_me:16862: \$? = $ac_status" >&5
16863   (exit $ac_status); } >/dev/null; then
16864   if test -s conftest.err; then
16865     ac_cpp_err=$ac_c_preproc_warn_flag
16866   else
16867     ac_cpp_err=
16868   fi
16869 else
16870   ac_cpp_err=yes
16871 fi
16872 if test -z "$ac_cpp_err"; then
16873   eval "$as_ac_Header=yes"
16874 else
16875   echo "$as_me: failed program was:" >&5
16876   cat conftest.$ac_ext >&5
16877   eval "$as_ac_Header=no"
16878 fi
16879 rm -f conftest.err conftest.$ac_ext
16880 fi
16881 echo "$as_me:16881: result: `eval echo '${'$as_ac_Header'}'`" >&5
16882 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16883 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16884   cat >>confdefs.h <<EOF
16885 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16886 EOF
16887
16888 fi
16889 done
16890
16891 fi
16892 if test "$ac_cv_header_termios_h" = yes ; then
16893         case "$CFLAGS $CPPFLAGS" in
16894         (*-D_POSIX_SOURCE*)
16895                 termios_bad=dunno ;;
16896         (*)     termios_bad=maybe ;;
16897         esac
16898         if test "$termios_bad" = maybe ; then
16899         echo "$as_me:16899: checking whether termios.h needs _POSIX_SOURCE" >&5
16900 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16901         cat >conftest.$ac_ext <<_ACEOF
16902 #line 16902 "configure"
16903 #include "confdefs.h"
16904 #include <termios.h>
16905 int
16906 main ()
16907 {
16908 struct termios foo; int x = foo.c_iflag
16909   ;
16910   return 0;
16911 }
16912 _ACEOF
16913 rm -f conftest.$ac_objext
16914 if { (eval echo "$as_me:16914: \"$ac_compile\"") >&5
16915   (eval $ac_compile) 2>&5
16916   ac_status=$?
16917   echo "$as_me:16917: \$? = $ac_status" >&5
16918   (exit $ac_status); } &&
16919          { ac_try='test -s conftest.$ac_objext'
16920   { (eval echo "$as_me:16920: \"$ac_try\"") >&5
16921   (eval $ac_try) 2>&5
16922   ac_status=$?
16923   echo "$as_me:16923: \$? = $ac_status" >&5
16924   (exit $ac_status); }; }; then
16925   termios_bad=no
16926 else
16927   echo "$as_me: failed program was:" >&5
16928 cat conftest.$ac_ext >&5
16929
16930                 cat >conftest.$ac_ext <<_ACEOF
16931 #line 16931 "configure"
16932 #include "confdefs.h"
16933
16934 #define _POSIX_SOURCE
16935 #include <termios.h>
16936 int
16937 main ()
16938 {
16939 struct termios foo; int x = foo.c_iflag
16940   ;
16941   return 0;
16942 }
16943 _ACEOF
16944 rm -f conftest.$ac_objext
16945 if { (eval echo "$as_me:16945: \"$ac_compile\"") >&5
16946   (eval $ac_compile) 2>&5
16947   ac_status=$?
16948   echo "$as_me:16948: \$? = $ac_status" >&5
16949   (exit $ac_status); } &&
16950          { ac_try='test -s conftest.$ac_objext'
16951   { (eval echo "$as_me:16951: \"$ac_try\"") >&5
16952   (eval $ac_try) 2>&5
16953   ac_status=$?
16954   echo "$as_me:16954: \$? = $ac_status" >&5
16955   (exit $ac_status); }; }; then
16956   termios_bad=unknown
16957 else
16958   echo "$as_me: failed program was:" >&5
16959 cat conftest.$ac_ext >&5
16960 termios_bad=yes
16961 cat >>confdefs.h <<\EOF
16962 #define _POSIX_SOURCE 1
16963 EOF
16964
16965 fi
16966 rm -f conftest.$ac_objext conftest.$ac_ext
16967
16968 fi
16969 rm -f conftest.$ac_objext conftest.$ac_ext
16970         echo "$as_me:16970: result: $termios_bad" >&5
16971 echo "${ECHO_T}$termios_bad" >&6
16972         fi
16973 fi
16974
16975 echo "$as_me:16975: checking for tcgetattr" >&5
16976 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16977 if test "${cf_cv_have_tcgetattr+set}" = set; then
16978   echo $ECHO_N "(cached) $ECHO_C" >&6
16979 else
16980
16981 cat >conftest.$ac_ext <<_ACEOF
16982 #line 16982 "configure"
16983 #include "confdefs.h"
16984
16985 #include <sys/types.h>
16986 #ifdef HAVE_UNISTD_H
16987 #include <unistd.h>
16988 #endif
16989 #ifdef HAVE_TERMIOS_H
16990 #include <termios.h>
16991 #define TTY struct termios
16992 #else
16993 #ifdef HAVE_TERMIO_H
16994 #include <termio.h>
16995 #define TTY struct termio
16996 #endif
16997 #endif
16998
16999 int
17000 main ()
17001 {
17002
17003 TTY foo;
17004 tcgetattr(1, &foo);
17005   ;
17006   return 0;
17007 }
17008 _ACEOF
17009 rm -f conftest.$ac_objext conftest$ac_exeext
17010 if { (eval echo "$as_me:17010: \"$ac_link\"") >&5
17011   (eval $ac_link) 2>&5
17012   ac_status=$?
17013   echo "$as_me:17013: \$? = $ac_status" >&5
17014   (exit $ac_status); } &&
17015          { ac_try='test -s conftest$ac_exeext'
17016   { (eval echo "$as_me:17016: \"$ac_try\"") >&5
17017   (eval $ac_try) 2>&5
17018   ac_status=$?
17019   echo "$as_me:17019: \$? = $ac_status" >&5
17020   (exit $ac_status); }; }; then
17021   cf_cv_have_tcgetattr=yes
17022 else
17023   echo "$as_me: failed program was:" >&5
17024 cat conftest.$ac_ext >&5
17025 cf_cv_have_tcgetattr=no
17026 fi
17027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17028 fi
17029 echo "$as_me:17029: result: $cf_cv_have_tcgetattr" >&5
17030 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
17031 test "$cf_cv_have_tcgetattr" = yes &&
17032 cat >>confdefs.h <<\EOF
17033 #define HAVE_TCGETATTR 1
17034 EOF
17035
17036 echo "$as_me:17036: checking for vsscanf function or workaround" >&5
17037 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17038 if test "${cf_cv_func_vsscanf+set}" = set; then
17039   echo $ECHO_N "(cached) $ECHO_C" >&6
17040 else
17041
17042 cat >conftest.$ac_ext <<_ACEOF
17043 #line 17043 "configure"
17044 #include "confdefs.h"
17045
17046 #include <stdarg.h>
17047 #include <stdio.h>
17048 int
17049 main ()
17050 {
17051
17052         va_list ap;
17053         vsscanf("from", "%d", ap)
17054   ;
17055   return 0;
17056 }
17057 _ACEOF
17058 rm -f conftest.$ac_objext conftest$ac_exeext
17059 if { (eval echo "$as_me:17059: \"$ac_link\"") >&5
17060   (eval $ac_link) 2>&5
17061   ac_status=$?
17062   echo "$as_me:17062: \$? = $ac_status" >&5
17063   (exit $ac_status); } &&
17064          { ac_try='test -s conftest$ac_exeext'
17065   { (eval echo "$as_me:17065: \"$ac_try\"") >&5
17066   (eval $ac_try) 2>&5
17067   ac_status=$?
17068   echo "$as_me:17068: \$? = $ac_status" >&5
17069   (exit $ac_status); }; }; then
17070   cf_cv_func_vsscanf=vsscanf
17071 else
17072   echo "$as_me: failed program was:" >&5
17073 cat conftest.$ac_ext >&5
17074
17075 cat >conftest.$ac_ext <<_ACEOF
17076 #line 17076 "configure"
17077 #include "confdefs.h"
17078
17079 #include <stdarg.h>
17080 #include <stdio.h>
17081 int
17082 main ()
17083 {
17084
17085         FILE strbuf;
17086         char *str = "from";
17087
17088         strbuf._flag = _IOREAD;
17089         strbuf._ptr = strbuf._base = (unsigned char *) str;
17090         strbuf._cnt = strlen(str);
17091         strbuf._file = _NFILE;
17092         return (vfscanf(&strbuf, "%d", ap))
17093   ;
17094   return 0;
17095 }
17096 _ACEOF
17097 rm -f conftest.$ac_objext conftest$ac_exeext
17098 if { (eval echo "$as_me:17098: \"$ac_link\"") >&5
17099   (eval $ac_link) 2>&5
17100   ac_status=$?
17101   echo "$as_me:17101: \$? = $ac_status" >&5
17102   (exit $ac_status); } &&
17103          { ac_try='test -s conftest$ac_exeext'
17104   { (eval echo "$as_me:17104: \"$ac_try\"") >&5
17105   (eval $ac_try) 2>&5
17106   ac_status=$?
17107   echo "$as_me:17107: \$? = $ac_status" >&5
17108   (exit $ac_status); }; }; then
17109   cf_cv_func_vsscanf=vfscanf
17110 else
17111   echo "$as_me: failed program was:" >&5
17112 cat conftest.$ac_ext >&5
17113
17114 cat >conftest.$ac_ext <<_ACEOF
17115 #line 17115 "configure"
17116 #include "confdefs.h"
17117
17118 #include <stdarg.h>
17119 #include <stdio.h>
17120 int
17121 main ()
17122 {
17123
17124         FILE strbuf;
17125         char *str = "from";
17126
17127         strbuf._flag = _IOREAD;
17128         strbuf._ptr = strbuf._base = (unsigned char *) str;
17129         strbuf._cnt = strlen(str);
17130         strbuf._file = _NFILE;
17131         return (_doscan(&strbuf, "%d", ap))
17132   ;
17133   return 0;
17134 }
17135 _ACEOF
17136 rm -f conftest.$ac_objext conftest$ac_exeext
17137 if { (eval echo "$as_me:17137: \"$ac_link\"") >&5
17138   (eval $ac_link) 2>&5
17139   ac_status=$?
17140   echo "$as_me:17140: \$? = $ac_status" >&5
17141   (exit $ac_status); } &&
17142          { ac_try='test -s conftest$ac_exeext'
17143   { (eval echo "$as_me:17143: \"$ac_try\"") >&5
17144   (eval $ac_try) 2>&5
17145   ac_status=$?
17146   echo "$as_me:17146: \$? = $ac_status" >&5
17147   (exit $ac_status); }; }; then
17148   cf_cv_func_vsscanf=_doscan
17149 else
17150   echo "$as_me: failed program was:" >&5
17151 cat conftest.$ac_ext >&5
17152
17153 cf_cv_func_vsscanf=no
17154 fi
17155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17156 fi
17157 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17158 fi
17159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17160 fi
17161 echo "$as_me:17161: result: $cf_cv_func_vsscanf" >&5
17162 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17163
17164 case $cf_cv_func_vsscanf in
17165 (vsscanf)
17166 cat >>confdefs.h <<\EOF
17167 #define HAVE_VSSCANF 1
17168 EOF
17169 ;;
17170 (vfscanf)
17171 cat >>confdefs.h <<\EOF
17172 #define HAVE_VFSCANF 1
17173 EOF
17174 ;;
17175 (_doscan)
17176 cat >>confdefs.h <<\EOF
17177 #define HAVE__DOSCAN 1
17178 EOF
17179 ;;
17180 esac
17181
17182 echo "$as_me:17182: checking for working mkstemp" >&5
17183 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17184 if test "${cf_cv_func_mkstemp+set}" = set; then
17185   echo $ECHO_N "(cached) $ECHO_C" >&6
17186 else
17187
17188 rm -rf conftest*
17189 if test "$cross_compiling" = yes; then
17190   cf_cv_func_mkstemp=maybe
17191 else
17192   cat >conftest.$ac_ext <<_ACEOF
17193 #line 17193 "configure"
17194 #include "confdefs.h"
17195
17196 #include <sys/types.h>
17197 #include <stdlib.h>
17198 #include <stdio.h>
17199 #include <string.h>
17200 #include <sys/stat.h>
17201 int main()
17202 {
17203         char *tmpl = "conftestXXXXXX";
17204         char name[2][80];
17205         int n;
17206         int result = 0;
17207         int fd;
17208         struct stat sb;
17209
17210         umask(077);
17211         for (n = 0; n < 2; ++n) {
17212                 strcpy(name[n], tmpl);
17213                 if ((fd = mkstemp(name[n])) >= 0) {
17214                         if (!strcmp(name[n], tmpl)
17215                          || stat(name[n], &sb) != 0
17216                          || (sb.st_mode & S_IFMT) != S_IFREG
17217                          || (sb.st_mode & 077) != 0) {
17218                                 result = 1;
17219                         }
17220                         close(fd);
17221                 }
17222         }
17223         if (result == 0
17224          && !strcmp(name[0], name[1]))
17225                 result = 1;
17226         ${cf_cv_main_return:-return}(result);
17227 }
17228
17229 _ACEOF
17230 rm -f conftest$ac_exeext
17231 if { (eval echo "$as_me:17231: \"$ac_link\"") >&5
17232   (eval $ac_link) 2>&5
17233   ac_status=$?
17234   echo "$as_me:17234: \$? = $ac_status" >&5
17235   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17236   { (eval echo "$as_me:17236: \"$ac_try\"") >&5
17237   (eval $ac_try) 2>&5
17238   ac_status=$?
17239   echo "$as_me:17239: \$? = $ac_status" >&5
17240   (exit $ac_status); }; }; then
17241   cf_cv_func_mkstemp=yes
17242
17243 else
17244   echo "$as_me: program exited with status $ac_status" >&5
17245 echo "$as_me: failed program was:" >&5
17246 cat conftest.$ac_ext >&5
17247 cf_cv_func_mkstemp=no
17248
17249 fi
17250 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17251 fi
17252
17253 fi
17254 echo "$as_me:17254: result: $cf_cv_func_mkstemp" >&5
17255 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17256 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17257         echo "$as_me:17257: checking for mkstemp" >&5
17258 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17259 if test "${ac_cv_func_mkstemp+set}" = set; then
17260   echo $ECHO_N "(cached) $ECHO_C" >&6
17261 else
17262   cat >conftest.$ac_ext <<_ACEOF
17263 #line 17263 "configure"
17264 #include "confdefs.h"
17265 /* System header to define __stub macros and hopefully few prototypes,
17266     which can conflict with char mkstemp (); below.  */
17267 #include <assert.h>
17268 /* Override any gcc2 internal prototype to avoid an error.  */
17269 #ifdef __cplusplus
17270 extern "C"
17271 #endif
17272 /* We use char because int might match the return type of a gcc2
17273    builtin and then its argument prototype would still apply.  */
17274 char mkstemp ();
17275 char (*f) ();
17276
17277 int
17278 main ()
17279 {
17280 /* The GNU C library defines this for functions which it implements
17281     to always fail with ENOSYS.  Some functions are actually named
17282     something starting with __ and the normal name is an alias.  */
17283 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17284 choke me
17285 #else
17286 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17287 #endif
17288
17289   ;
17290   return 0;
17291 }
17292 _ACEOF
17293 rm -f conftest.$ac_objext conftest$ac_exeext
17294 if { (eval echo "$as_me:17294: \"$ac_link\"") >&5
17295   (eval $ac_link) 2>&5
17296   ac_status=$?
17297   echo "$as_me:17297: \$? = $ac_status" >&5
17298   (exit $ac_status); } &&
17299          { ac_try='test -s conftest$ac_exeext'
17300   { (eval echo "$as_me:17300: \"$ac_try\"") >&5
17301   (eval $ac_try) 2>&5
17302   ac_status=$?
17303   echo "$as_me:17303: \$? = $ac_status" >&5
17304   (exit $ac_status); }; }; then
17305   ac_cv_func_mkstemp=yes
17306 else
17307   echo "$as_me: failed program was:" >&5
17308 cat conftest.$ac_ext >&5
17309 ac_cv_func_mkstemp=no
17310 fi
17311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17312 fi
17313 echo "$as_me:17313: result: $ac_cv_func_mkstemp" >&5
17314 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17315
17316 fi
17317 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17318
17319 cat >>confdefs.h <<\EOF
17320 #define HAVE_MKSTEMP 1
17321 EOF
17322
17323 fi
17324
17325 # setup for prototype of fallback for vsscanf()
17326
17327 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17328         HAVE_VSSCANF=1
17329 else
17330         HAVE_VSSCANF=0
17331 fi
17332
17333 if test "x$cross_compiling" = xyes ; then
17334         { echo "$as_me:17334: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17335 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17336 else
17337         echo "$as_me:17337: checking whether setvbuf arguments are reversed" >&5
17338 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17339 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17340   echo $ECHO_N "(cached) $ECHO_C" >&6
17341 else
17342   if test "$cross_compiling" = yes; then
17343   { { echo "$as_me:17343: error: cannot run test program while cross compiling" >&5
17344 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17345    { (exit 1); exit 1; }; }
17346 else
17347   cat >conftest.$ac_ext <<_ACEOF
17348 #line 17348 "configure"
17349 #include "confdefs.h"
17350 #include <stdio.h>
17351 /* If setvbuf has the reversed format, exit 0. */
17352 int
17353 main ()
17354 {
17355   /* This call has the arguments reversed.
17356      A reversed system may check and see that the address of main
17357      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17358   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17359     $ac_main_return(1);
17360   putc('\r', stdout);
17361   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17362 }
17363 _ACEOF
17364 rm -f conftest$ac_exeext
17365 if { (eval echo "$as_me:17365: \"$ac_link\"") >&5
17366   (eval $ac_link) 2>&5
17367   ac_status=$?
17368   echo "$as_me:17368: \$? = $ac_status" >&5
17369   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17370   { (eval echo "$as_me:17370: \"$ac_try\"") >&5
17371   (eval $ac_try) 2>&5
17372   ac_status=$?
17373   echo "$as_me:17373: \$? = $ac_status" >&5
17374   (exit $ac_status); }; }; then
17375   ac_cv_func_setvbuf_reversed=yes
17376 else
17377   echo "$as_me: program exited with status $ac_status" >&5
17378 echo "$as_me: failed program was:" >&5
17379 cat conftest.$ac_ext >&5
17380 ac_cv_func_setvbuf_reversed=no
17381 fi
17382 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17383 fi
17384 rm -f core core.* *.core
17385 fi
17386 echo "$as_me:17386: result: $ac_cv_func_setvbuf_reversed" >&5
17387 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17388 if test $ac_cv_func_setvbuf_reversed = yes; then
17389
17390 cat >>confdefs.h <<\EOF
17391 #define SETVBUF_REVERSED 1
17392 EOF
17393
17394 fi
17395
17396 fi
17397 echo "$as_me:17397: checking for intptr_t" >&5
17398 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17399 if test "${ac_cv_type_intptr_t+set}" = set; then
17400   echo $ECHO_N "(cached) $ECHO_C" >&6
17401 else
17402   cat >conftest.$ac_ext <<_ACEOF
17403 #line 17403 "configure"
17404 #include "confdefs.h"
17405 $ac_includes_default
17406 int
17407 main ()
17408 {
17409 if ((intptr_t *) 0)
17410   return 0;
17411 if (sizeof (intptr_t))
17412   return 0;
17413   ;
17414   return 0;
17415 }
17416 _ACEOF
17417 rm -f conftest.$ac_objext
17418 if { (eval echo "$as_me:17418: \"$ac_compile\"") >&5
17419   (eval $ac_compile) 2>&5
17420   ac_status=$?
17421   echo "$as_me:17421: \$? = $ac_status" >&5
17422   (exit $ac_status); } &&
17423          { ac_try='test -s conftest.$ac_objext'
17424   { (eval echo "$as_me:17424: \"$ac_try\"") >&5
17425   (eval $ac_try) 2>&5
17426   ac_status=$?
17427   echo "$as_me:17427: \$? = $ac_status" >&5
17428   (exit $ac_status); }; }; then
17429   ac_cv_type_intptr_t=yes
17430 else
17431   echo "$as_me: failed program was:" >&5
17432 cat conftest.$ac_ext >&5
17433 ac_cv_type_intptr_t=no
17434 fi
17435 rm -f conftest.$ac_objext conftest.$ac_ext
17436 fi
17437 echo "$as_me:17437: result: $ac_cv_type_intptr_t" >&5
17438 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17439 if test $ac_cv_type_intptr_t = yes; then
17440   :
17441 else
17442
17443 cat >>confdefs.h <<EOF
17444 #define intptr_t long
17445 EOF
17446
17447 fi
17448
17449 echo "$as_me:17449: checking for ssize_t" >&5
17450 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17451 if test "${ac_cv_type_ssize_t+set}" = set; then
17452   echo $ECHO_N "(cached) $ECHO_C" >&6
17453 else
17454   cat >conftest.$ac_ext <<_ACEOF
17455 #line 17455 "configure"
17456 #include "confdefs.h"
17457 $ac_includes_default
17458 int
17459 main ()
17460 {
17461 if ((ssize_t *) 0)
17462   return 0;
17463 if (sizeof (ssize_t))
17464   return 0;
17465   ;
17466   return 0;
17467 }
17468 _ACEOF
17469 rm -f conftest.$ac_objext
17470 if { (eval echo "$as_me:17470: \"$ac_compile\"") >&5
17471   (eval $ac_compile) 2>&5
17472   ac_status=$?
17473   echo "$as_me:17473: \$? = $ac_status" >&5
17474   (exit $ac_status); } &&
17475          { ac_try='test -s conftest.$ac_objext'
17476   { (eval echo "$as_me:17476: \"$ac_try\"") >&5
17477   (eval $ac_try) 2>&5
17478   ac_status=$?
17479   echo "$as_me:17479: \$? = $ac_status" >&5
17480   (exit $ac_status); }; }; then
17481   ac_cv_type_ssize_t=yes
17482 else
17483   echo "$as_me: failed program was:" >&5
17484 cat conftest.$ac_ext >&5
17485 ac_cv_type_ssize_t=no
17486 fi
17487 rm -f conftest.$ac_objext conftest.$ac_ext
17488 fi
17489 echo "$as_me:17489: result: $ac_cv_type_ssize_t" >&5
17490 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17491 if test $ac_cv_type_ssize_t = yes; then
17492   :
17493 else
17494
17495 cat >>confdefs.h <<EOF
17496 #define ssize_t int
17497 EOF
17498
17499 fi
17500
17501 echo "$as_me:17501: checking for type sigaction_t" >&5
17502 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17503 if test "${cf_cv_type_sigaction+set}" = set; then
17504   echo $ECHO_N "(cached) $ECHO_C" >&6
17505 else
17506
17507         cat >conftest.$ac_ext <<_ACEOF
17508 #line 17508 "configure"
17509 #include "confdefs.h"
17510
17511 #include <signal.h>
17512 int
17513 main ()
17514 {
17515 sigaction_t x
17516   ;
17517   return 0;
17518 }
17519 _ACEOF
17520 rm -f conftest.$ac_objext
17521 if { (eval echo "$as_me:17521: \"$ac_compile\"") >&5
17522   (eval $ac_compile) 2>&5
17523   ac_status=$?
17524   echo "$as_me:17524: \$? = $ac_status" >&5
17525   (exit $ac_status); } &&
17526          { ac_try='test -s conftest.$ac_objext'
17527   { (eval echo "$as_me:17527: \"$ac_try\"") >&5
17528   (eval $ac_try) 2>&5
17529   ac_status=$?
17530   echo "$as_me:17530: \$? = $ac_status" >&5
17531   (exit $ac_status); }; }; then
17532   cf_cv_type_sigaction=yes
17533 else
17534   echo "$as_me: failed program was:" >&5
17535 cat conftest.$ac_ext >&5
17536 cf_cv_type_sigaction=no
17537 fi
17538 rm -f conftest.$ac_objext conftest.$ac_ext
17539 fi
17540
17541 echo "$as_me:17541: result: $cf_cv_type_sigaction" >&5
17542 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17543 test "$cf_cv_type_sigaction" = yes &&
17544 cat >>confdefs.h <<\EOF
17545 #define HAVE_TYPE_SIGACTION 1
17546 EOF
17547
17548 echo "$as_me:17548: checking declaration of size-change" >&5
17549 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17550 if test "${cf_cv_sizechange+set}" = set; then
17551   echo $ECHO_N "(cached) $ECHO_C" >&6
17552 else
17553
17554         cf_cv_sizechange=unknown
17555         cf_save_CPPFLAGS="$CPPFLAGS"
17556
17557 for cf_opts in "" "NEED_PTEM_H"
17558 do
17559
17560         CPPFLAGS="$cf_save_CPPFLAGS"
17561         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17562         cat >conftest.$ac_ext <<_ACEOF
17563 #line 17563 "configure"
17564 #include "confdefs.h"
17565 #include <sys/types.h>
17566 #ifdef HAVE_TERMIOS_H
17567 #include <termios.h>
17568 #else
17569 #ifdef HAVE_TERMIO_H
17570 #include <termio.h>
17571 #endif
17572 #endif
17573 #ifdef NEED_PTEM_H
17574 /* This is a workaround for SCO:  they neglected to define struct winsize in
17575  * termios.h -- it's only in termio.h and ptem.h
17576  */
17577 #include        <sys/stream.h>
17578 #include        <sys/ptem.h>
17579 #endif
17580 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17581 #include <sys/ioctl.h>
17582 #endif
17583
17584 int
17585 main ()
17586 {
17587
17588 #ifdef TIOCGSIZE
17589         struct ttysize win;     /* FIXME: what system is this? */
17590         int y = win.ts_lines;
17591         int x = win.ts_cols;
17592 #else
17593 #ifdef TIOCGWINSZ
17594         struct winsize win;
17595         int y = win.ws_row;
17596         int x = win.ws_col;
17597 #else
17598         no TIOCGSIZE or TIOCGWINSZ
17599 #endif /* TIOCGWINSZ */
17600 #endif /* TIOCGSIZE */
17601
17602   ;
17603   return 0;
17604 }
17605 _ACEOF
17606 rm -f conftest.$ac_objext
17607 if { (eval echo "$as_me:17607: \"$ac_compile\"") >&5
17608   (eval $ac_compile) 2>&5
17609   ac_status=$?
17610   echo "$as_me:17610: \$? = $ac_status" >&5
17611   (exit $ac_status); } &&
17612          { ac_try='test -s conftest.$ac_objext'
17613   { (eval echo "$as_me:17613: \"$ac_try\"") >&5
17614   (eval $ac_try) 2>&5
17615   ac_status=$?
17616   echo "$as_me:17616: \$? = $ac_status" >&5
17617   (exit $ac_status); }; }; then
17618   cf_cv_sizechange=yes
17619 else
17620   echo "$as_me: failed program was:" >&5
17621 cat conftest.$ac_ext >&5
17622 cf_cv_sizechange=no
17623 fi
17624 rm -f conftest.$ac_objext conftest.$ac_ext
17625
17626         CPPFLAGS="$cf_save_CPPFLAGS"
17627         if test "$cf_cv_sizechange" = yes ; then
17628                 echo "size-change succeeded ($cf_opts)" >&5
17629                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17630                 break
17631         fi
17632 done
17633
17634 fi
17635 echo "$as_me:17635: result: $cf_cv_sizechange" >&5
17636 echo "${ECHO_T}$cf_cv_sizechange" >&6
17637 if test "$cf_cv_sizechange" != no ; then
17638
17639 cat >>confdefs.h <<\EOF
17640 #define HAVE_SIZECHANGE 1
17641 EOF
17642
17643         case $cf_cv_sizechange in
17644         (NEED*)
17645                 cat >>confdefs.h <<EOF
17646 #define $cf_cv_sizechange  1
17647 EOF
17648
17649                 ;;
17650         esac
17651 fi
17652
17653 echo "$as_me:17653: checking for memmove" >&5
17654 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17655 if test "${ac_cv_func_memmove+set}" = set; then
17656   echo $ECHO_N "(cached) $ECHO_C" >&6
17657 else
17658   cat >conftest.$ac_ext <<_ACEOF
17659 #line 17659 "configure"
17660 #include "confdefs.h"
17661 /* System header to define __stub macros and hopefully few prototypes,
17662     which can conflict with char memmove (); below.  */
17663 #include <assert.h>
17664 /* Override any gcc2 internal prototype to avoid an error.  */
17665 #ifdef __cplusplus
17666 extern "C"
17667 #endif
17668 /* We use char because int might match the return type of a gcc2
17669    builtin and then its argument prototype would still apply.  */
17670 char memmove ();
17671 char (*f) ();
17672
17673 int
17674 main ()
17675 {
17676 /* The GNU C library defines this for functions which it implements
17677     to always fail with ENOSYS.  Some functions are actually named
17678     something starting with __ and the normal name is an alias.  */
17679 #if defined (__stub_memmove) || defined (__stub___memmove)
17680 choke me
17681 #else
17682 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17683 #endif
17684
17685   ;
17686   return 0;
17687 }
17688 _ACEOF
17689 rm -f conftest.$ac_objext conftest$ac_exeext
17690 if { (eval echo "$as_me:17690: \"$ac_link\"") >&5
17691   (eval $ac_link) 2>&5
17692   ac_status=$?
17693   echo "$as_me:17693: \$? = $ac_status" >&5
17694   (exit $ac_status); } &&
17695          { ac_try='test -s conftest$ac_exeext'
17696   { (eval echo "$as_me:17696: \"$ac_try\"") >&5
17697   (eval $ac_try) 2>&5
17698   ac_status=$?
17699   echo "$as_me:17699: \$? = $ac_status" >&5
17700   (exit $ac_status); }; }; then
17701   ac_cv_func_memmove=yes
17702 else
17703   echo "$as_me: failed program was:" >&5
17704 cat conftest.$ac_ext >&5
17705 ac_cv_func_memmove=no
17706 fi
17707 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17708 fi
17709 echo "$as_me:17709: result: $ac_cv_func_memmove" >&5
17710 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17711 if test $ac_cv_func_memmove = yes; then
17712   :
17713 else
17714
17715 echo "$as_me:17715: checking for bcopy" >&5
17716 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17717 if test "${ac_cv_func_bcopy+set}" = set; then
17718   echo $ECHO_N "(cached) $ECHO_C" >&6
17719 else
17720   cat >conftest.$ac_ext <<_ACEOF
17721 #line 17721 "configure"
17722 #include "confdefs.h"
17723 /* System header to define __stub macros and hopefully few prototypes,
17724     which can conflict with char bcopy (); below.  */
17725 #include <assert.h>
17726 /* Override any gcc2 internal prototype to avoid an error.  */
17727 #ifdef __cplusplus
17728 extern "C"
17729 #endif
17730 /* We use char because int might match the return type of a gcc2
17731    builtin and then its argument prototype would still apply.  */
17732 char bcopy ();
17733 char (*f) ();
17734
17735 int
17736 main ()
17737 {
17738 /* The GNU C library defines this for functions which it implements
17739     to always fail with ENOSYS.  Some functions are actually named
17740     something starting with __ and the normal name is an alias.  */
17741 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17742 choke me
17743 #else
17744 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17745 #endif
17746
17747   ;
17748   return 0;
17749 }
17750 _ACEOF
17751 rm -f conftest.$ac_objext conftest$ac_exeext
17752 if { (eval echo "$as_me:17752: \"$ac_link\"") >&5
17753   (eval $ac_link) 2>&5
17754   ac_status=$?
17755   echo "$as_me:17755: \$? = $ac_status" >&5
17756   (exit $ac_status); } &&
17757          { ac_try='test -s conftest$ac_exeext'
17758   { (eval echo "$as_me:17758: \"$ac_try\"") >&5
17759   (eval $ac_try) 2>&5
17760   ac_status=$?
17761   echo "$as_me:17761: \$? = $ac_status" >&5
17762   (exit $ac_status); }; }; then
17763   ac_cv_func_bcopy=yes
17764 else
17765   echo "$as_me: failed program was:" >&5
17766 cat conftest.$ac_ext >&5
17767 ac_cv_func_bcopy=no
17768 fi
17769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17770 fi
17771 echo "$as_me:17771: result: $ac_cv_func_bcopy" >&5
17772 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17773 if test $ac_cv_func_bcopy = yes; then
17774
17775         echo "$as_me:17775: checking if bcopy does overlapping moves" >&5
17776 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17777 if test "${cf_cv_good_bcopy+set}" = set; then
17778   echo $ECHO_N "(cached) $ECHO_C" >&6
17779 else
17780
17781                 if test "$cross_compiling" = yes; then
17782   cf_cv_good_bcopy=unknown
17783 else
17784   cat >conftest.$ac_ext <<_ACEOF
17785 #line 17785 "configure"
17786 #include "confdefs.h"
17787
17788 int main() {
17789         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17790         char temp[40];
17791         bcopy(data, temp, sizeof(data));
17792         bcopy(temp+10, temp, 15);
17793         bcopy(temp+5, temp+15, 10);
17794         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17795 }
17796
17797 _ACEOF
17798 rm -f conftest$ac_exeext
17799 if { (eval echo "$as_me:17799: \"$ac_link\"") >&5
17800   (eval $ac_link) 2>&5
17801   ac_status=$?
17802   echo "$as_me:17802: \$? = $ac_status" >&5
17803   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17804   { (eval echo "$as_me:17804: \"$ac_try\"") >&5
17805   (eval $ac_try) 2>&5
17806   ac_status=$?
17807   echo "$as_me:17807: \$? = $ac_status" >&5
17808   (exit $ac_status); }; }; then
17809   cf_cv_good_bcopy=yes
17810 else
17811   echo "$as_me: program exited with status $ac_status" >&5
17812 echo "$as_me: failed program was:" >&5
17813 cat conftest.$ac_ext >&5
17814 cf_cv_good_bcopy=no
17815 fi
17816 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17817 fi
17818
17819 fi
17820 echo "$as_me:17820: result: $cf_cv_good_bcopy" >&5
17821 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17822
17823 else
17824   cf_cv_good_bcopy=no
17825 fi
17826
17827         if test "$cf_cv_good_bcopy" = yes ; then
17828
17829 cat >>confdefs.h <<\EOF
17830 #define USE_OK_BCOPY 1
17831 EOF
17832
17833         else
17834
17835 cat >>confdefs.h <<\EOF
17836 #define USE_MY_MEMMOVE 1
17837 EOF
17838
17839         fi
17840
17841 fi
17842
17843 tty 2>&1 >/dev/null || {
17844 for ac_func in posix_openpt
17845 do
17846 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17847 echo "$as_me:17847: checking for $ac_func" >&5
17848 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17849 if eval "test \"\${$as_ac_var+set}\" = set"; then
17850   echo $ECHO_N "(cached) $ECHO_C" >&6
17851 else
17852   cat >conftest.$ac_ext <<_ACEOF
17853 #line 17853 "configure"
17854 #include "confdefs.h"
17855 /* System header to define __stub macros and hopefully few prototypes,
17856     which can conflict with char $ac_func (); below.  */
17857 #include <assert.h>
17858 /* Override any gcc2 internal prototype to avoid an error.  */
17859 #ifdef __cplusplus
17860 extern "C"
17861 #endif
17862 /* We use char because int might match the return type of a gcc2
17863    builtin and then its argument prototype would still apply.  */
17864 char $ac_func ();
17865 char (*f) ();
17866
17867 int
17868 main ()
17869 {
17870 /* The GNU C library defines this for functions which it implements
17871     to always fail with ENOSYS.  Some functions are actually named
17872     something starting with __ and the normal name is an alias.  */
17873 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17874 choke me
17875 #else
17876 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17877 #endif
17878
17879   ;
17880   return 0;
17881 }
17882 _ACEOF
17883 rm -f conftest.$ac_objext conftest$ac_exeext
17884 if { (eval echo "$as_me:17884: \"$ac_link\"") >&5
17885   (eval $ac_link) 2>&5
17886   ac_status=$?
17887   echo "$as_me:17887: \$? = $ac_status" >&5
17888   (exit $ac_status); } &&
17889          { ac_try='test -s conftest$ac_exeext'
17890   { (eval echo "$as_me:17890: \"$ac_try\"") >&5
17891   (eval $ac_try) 2>&5
17892   ac_status=$?
17893   echo "$as_me:17893: \$? = $ac_status" >&5
17894   (exit $ac_status); }; }; then
17895   eval "$as_ac_var=yes"
17896 else
17897   echo "$as_me: failed program was:" >&5
17898 cat conftest.$ac_ext >&5
17899 eval "$as_ac_var=no"
17900 fi
17901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17902 fi
17903 echo "$as_me:17903: result: `eval echo '${'$as_ac_var'}'`" >&5
17904 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17905 if test `eval echo '${'$as_ac_var'}'` = yes; then
17906   cat >>confdefs.h <<EOF
17907 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17908 EOF
17909
17910 fi
17911 done
17912  }
17913 echo "$as_me:17913: checking if poll really works" >&5
17914 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17915 if test "${cf_cv_working_poll+set}" = set; then
17916   echo $ECHO_N "(cached) $ECHO_C" >&6
17917 else
17918
17919 if test "$cross_compiling" = yes; then
17920   cf_cv_working_poll=unknown
17921 else
17922   cat >conftest.$ac_ext <<_ACEOF
17923 #line 17923 "configure"
17924 #include "confdefs.h"
17925
17926 #include <stdlib.h>
17927 #include <stdio.h>
17928 #include <unistd.h>
17929 #include <fcntl.h>
17930 #ifdef HAVE_POLL_H
17931 #include <poll.h>
17932 #else
17933 #include <sys/poll.h>
17934 #endif
17935 int main(void) {
17936         struct pollfd myfds;
17937         int ret;
17938
17939         /* check for Darwin bug with respect to "devices" */
17940         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17941         if (myfds.fd < 0)
17942                 myfds.fd = 0;
17943         myfds.events = POLLIN;
17944         myfds.revents = 0;
17945
17946         ret = poll(&myfds, 1, 100);
17947
17948         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17949                 ret = -1;
17950         } else {
17951                 int fd = 0;
17952                 if (!isatty(fd)) {
17953                         fd = open("/dev/tty", 2);       /* O_RDWR */
17954                 }
17955 #ifdef HAVE_POSIX_OPENPT
17956                 if (fd < 0) {
17957                         fd = posix_openpt(O_RDWR);
17958                 }
17959 #endif
17960
17961                 if (fd >= 0) {
17962                         /* also check with standard input */
17963                         myfds.fd = fd;
17964                         myfds.events = POLLIN;
17965                         myfds.revents = 0;
17966                         ret = poll(&myfds, 1, 100);
17967                 } else {
17968                         ret = -1;
17969                 }
17970         }
17971         ${cf_cv_main_return:-return}(ret < 0);
17972 }
17973 _ACEOF
17974 rm -f conftest$ac_exeext
17975 if { (eval echo "$as_me:17975: \"$ac_link\"") >&5
17976   (eval $ac_link) 2>&5
17977   ac_status=$?
17978   echo "$as_me:17978: \$? = $ac_status" >&5
17979   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17980   { (eval echo "$as_me:17980: \"$ac_try\"") >&5
17981   (eval $ac_try) 2>&5
17982   ac_status=$?
17983   echo "$as_me:17983: \$? = $ac_status" >&5
17984   (exit $ac_status); }; }; then
17985   cf_cv_working_poll=yes
17986 else
17987   echo "$as_me: program exited with status $ac_status" >&5
17988 echo "$as_me: failed program was:" >&5
17989 cat conftest.$ac_ext >&5
17990 cf_cv_working_poll=no
17991 fi
17992 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17993 fi
17994 fi
17995 echo "$as_me:17995: result: $cf_cv_working_poll" >&5
17996 echo "${ECHO_T}$cf_cv_working_poll" >&6
17997 test "$cf_cv_working_poll" = "yes" &&
17998 cat >>confdefs.h <<\EOF
17999 #define HAVE_WORKING_POLL 1
18000 EOF
18001
18002 echo "$as_me:18002: checking for va_copy" >&5
18003 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
18004 if test "${cf_cv_have_va_copy+set}" = set; then
18005   echo $ECHO_N "(cached) $ECHO_C" >&6
18006 else
18007
18008 cat >conftest.$ac_ext <<_ACEOF
18009 #line 18009 "configure"
18010 #include "confdefs.h"
18011
18012 #include <stdarg.h>
18013
18014 int
18015 main ()
18016 {
18017
18018         static va_list dst;
18019         static va_list src;
18020         va_copy(dst, src)
18021   ;
18022   return 0;
18023 }
18024 _ACEOF
18025 rm -f conftest.$ac_objext conftest$ac_exeext
18026 if { (eval echo "$as_me:18026: \"$ac_link\"") >&5
18027   (eval $ac_link) 2>&5
18028   ac_status=$?
18029   echo "$as_me:18029: \$? = $ac_status" >&5
18030   (exit $ac_status); } &&
18031          { ac_try='test -s conftest$ac_exeext'
18032   { (eval echo "$as_me:18032: \"$ac_try\"") >&5
18033   (eval $ac_try) 2>&5
18034   ac_status=$?
18035   echo "$as_me:18035: \$? = $ac_status" >&5
18036   (exit $ac_status); }; }; then
18037   cf_cv_have_va_copy=yes
18038 else
18039   echo "$as_me: failed program was:" >&5
18040 cat conftest.$ac_ext >&5
18041 cf_cv_have_va_copy=no
18042 fi
18043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18044 fi
18045 echo "$as_me:18045: result: $cf_cv_have_va_copy" >&5
18046 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
18047
18048 test "$cf_cv_have_va_copy" = yes &&
18049 cat >>confdefs.h <<\EOF
18050 #define HAVE_VA_COPY 1
18051 EOF
18052
18053 echo "$as_me:18053: checking for __va_copy" >&5
18054 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
18055 if test "${cf_cv_have___va_copy+set}" = set; then
18056   echo $ECHO_N "(cached) $ECHO_C" >&6
18057 else
18058
18059 cat >conftest.$ac_ext <<_ACEOF
18060 #line 18060 "configure"
18061 #include "confdefs.h"
18062
18063 #include <stdarg.h>
18064
18065 int
18066 main ()
18067 {
18068
18069         static va_list dst;
18070         static va_list src;
18071         __va_copy(dst, src)
18072   ;
18073   return 0;
18074 }
18075 _ACEOF
18076 rm -f conftest.$ac_objext conftest$ac_exeext
18077 if { (eval echo "$as_me:18077: \"$ac_link\"") >&5
18078   (eval $ac_link) 2>&5
18079   ac_status=$?
18080   echo "$as_me:18080: \$? = $ac_status" >&5
18081   (exit $ac_status); } &&
18082          { ac_try='test -s conftest$ac_exeext'
18083   { (eval echo "$as_me:18083: \"$ac_try\"") >&5
18084   (eval $ac_try) 2>&5
18085   ac_status=$?
18086   echo "$as_me:18086: \$? = $ac_status" >&5
18087   (exit $ac_status); }; }; then
18088   cf_cv_have___va_copy=yes
18089 else
18090   echo "$as_me: failed program was:" >&5
18091 cat conftest.$ac_ext >&5
18092 cf_cv_have___va_copy=no
18093 fi
18094 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18095 fi
18096 echo "$as_me:18096: result: $cf_cv_have___va_copy" >&5
18097 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
18098
18099 test "$cf_cv_have___va_copy" = yes &&
18100 cat >>confdefs.h <<\EOF
18101 #define HAVE___VA_COPY 1
18102 EOF
18103
18104 echo "$as_me:18104: checking for pid_t" >&5
18105 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
18106 if test "${ac_cv_type_pid_t+set}" = set; then
18107   echo $ECHO_N "(cached) $ECHO_C" >&6
18108 else
18109   cat >conftest.$ac_ext <<_ACEOF
18110 #line 18110 "configure"
18111 #include "confdefs.h"
18112 $ac_includes_default
18113 int
18114 main ()
18115 {
18116 if ((pid_t *) 0)
18117   return 0;
18118 if (sizeof (pid_t))
18119   return 0;
18120   ;
18121   return 0;
18122 }
18123 _ACEOF
18124 rm -f conftest.$ac_objext
18125 if { (eval echo "$as_me:18125: \"$ac_compile\"") >&5
18126   (eval $ac_compile) 2>&5
18127   ac_status=$?
18128   echo "$as_me:18128: \$? = $ac_status" >&5
18129   (exit $ac_status); } &&
18130          { ac_try='test -s conftest.$ac_objext'
18131   { (eval echo "$as_me:18131: \"$ac_try\"") >&5
18132   (eval $ac_try) 2>&5
18133   ac_status=$?
18134   echo "$as_me:18134: \$? = $ac_status" >&5
18135   (exit $ac_status); }; }; then
18136   ac_cv_type_pid_t=yes
18137 else
18138   echo "$as_me: failed program was:" >&5
18139 cat conftest.$ac_ext >&5
18140 ac_cv_type_pid_t=no
18141 fi
18142 rm -f conftest.$ac_objext conftest.$ac_ext
18143 fi
18144 echo "$as_me:18144: result: $ac_cv_type_pid_t" >&5
18145 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18146 if test $ac_cv_type_pid_t = yes; then
18147   :
18148 else
18149
18150 cat >>confdefs.h <<EOF
18151 #define pid_t int
18152 EOF
18153
18154 fi
18155
18156 for ac_header in unistd.h vfork.h
18157 do
18158 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18159 echo "$as_me:18159: checking for $ac_header" >&5
18160 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18161 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18162   echo $ECHO_N "(cached) $ECHO_C" >&6
18163 else
18164   cat >conftest.$ac_ext <<_ACEOF
18165 #line 18165 "configure"
18166 #include "confdefs.h"
18167 #include <$ac_header>
18168 _ACEOF
18169 if { (eval echo "$as_me:18169: \"$ac_cpp conftest.$ac_ext\"") >&5
18170   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18171   ac_status=$?
18172   egrep -v '^ *\+' conftest.er1 >conftest.err
18173   rm -f conftest.er1
18174   cat conftest.err >&5
18175   echo "$as_me:18175: \$? = $ac_status" >&5
18176   (exit $ac_status); } >/dev/null; then
18177   if test -s conftest.err; then
18178     ac_cpp_err=$ac_c_preproc_warn_flag
18179   else
18180     ac_cpp_err=
18181   fi
18182 else
18183   ac_cpp_err=yes
18184 fi
18185 if test -z "$ac_cpp_err"; then
18186   eval "$as_ac_Header=yes"
18187 else
18188   echo "$as_me: failed program was:" >&5
18189   cat conftest.$ac_ext >&5
18190   eval "$as_ac_Header=no"
18191 fi
18192 rm -f conftest.err conftest.$ac_ext
18193 fi
18194 echo "$as_me:18194: result: `eval echo '${'$as_ac_Header'}'`" >&5
18195 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18196 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18197   cat >>confdefs.h <<EOF
18198 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18199 EOF
18200
18201 fi
18202 done
18203
18204 for ac_func in fork vfork
18205 do
18206 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18207 echo "$as_me:18207: checking for $ac_func" >&5
18208 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18209 if eval "test \"\${$as_ac_var+set}\" = set"; then
18210   echo $ECHO_N "(cached) $ECHO_C" >&6
18211 else
18212   cat >conftest.$ac_ext <<_ACEOF
18213 #line 18213 "configure"
18214 #include "confdefs.h"
18215 /* System header to define __stub macros and hopefully few prototypes,
18216     which can conflict with char $ac_func (); below.  */
18217 #include <assert.h>
18218 /* Override any gcc2 internal prototype to avoid an error.  */
18219 #ifdef __cplusplus
18220 extern "C"
18221 #endif
18222 /* We use char because int might match the return type of a gcc2
18223    builtin and then its argument prototype would still apply.  */
18224 char $ac_func ();
18225 char (*f) ();
18226
18227 int
18228 main ()
18229 {
18230 /* The GNU C library defines this for functions which it implements
18231     to always fail with ENOSYS.  Some functions are actually named
18232     something starting with __ and the normal name is an alias.  */
18233 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18234 choke me
18235 #else
18236 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18237 #endif
18238
18239   ;
18240   return 0;
18241 }
18242 _ACEOF
18243 rm -f conftest.$ac_objext conftest$ac_exeext
18244 if { (eval echo "$as_me:18244: \"$ac_link\"") >&5
18245   (eval $ac_link) 2>&5
18246   ac_status=$?
18247   echo "$as_me:18247: \$? = $ac_status" >&5
18248   (exit $ac_status); } &&
18249          { ac_try='test -s conftest$ac_exeext'
18250   { (eval echo "$as_me:18250: \"$ac_try\"") >&5
18251   (eval $ac_try) 2>&5
18252   ac_status=$?
18253   echo "$as_me:18253: \$? = $ac_status" >&5
18254   (exit $ac_status); }; }; then
18255   eval "$as_ac_var=yes"
18256 else
18257   echo "$as_me: failed program was:" >&5
18258 cat conftest.$ac_ext >&5
18259 eval "$as_ac_var=no"
18260 fi
18261 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18262 fi
18263 echo "$as_me:18263: result: `eval echo '${'$as_ac_var'}'`" >&5
18264 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18265 if test `eval echo '${'$as_ac_var'}'` = yes; then
18266   cat >>confdefs.h <<EOF
18267 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18268 EOF
18269
18270 fi
18271 done
18272
18273 ac_cv_func_fork_works=$ac_cv_func_fork
18274 if test "x$ac_cv_func_fork" = xyes; then
18275   echo "$as_me:18275: checking for working fork" >&5
18276 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18277 if test "${ac_cv_func_fork_works+set}" = set; then
18278   echo $ECHO_N "(cached) $ECHO_C" >&6
18279 else
18280   if test "$cross_compiling" = yes; then
18281   ac_cv_func_fork_works=cross
18282 else
18283   cat >conftest.$ac_ext <<_ACEOF
18284 /* By Rüdiger Kuhlmann. */
18285       #include <sys/types.h>
18286       #if HAVE_UNISTD_H
18287       # include <unistd.h>
18288       #endif
18289       /* Some systems only have a dummy stub for fork() */
18290       int main ()
18291       {
18292         if (fork() < 0)
18293           $ac_main_return (1);
18294         $ac_main_return (0);
18295       }
18296 _ACEOF
18297 rm -f conftest$ac_exeext
18298 if { (eval echo "$as_me:18298: \"$ac_link\"") >&5
18299   (eval $ac_link) 2>&5
18300   ac_status=$?
18301   echo "$as_me:18301: \$? = $ac_status" >&5
18302   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18303   { (eval echo "$as_me:18303: \"$ac_try\"") >&5
18304   (eval $ac_try) 2>&5
18305   ac_status=$?
18306   echo "$as_me:18306: \$? = $ac_status" >&5
18307   (exit $ac_status); }; }; then
18308   ac_cv_func_fork_works=yes
18309 else
18310   echo "$as_me: program exited with status $ac_status" >&5
18311 echo "$as_me: failed program was:" >&5
18312 cat conftest.$ac_ext >&5
18313 ac_cv_func_fork_works=no
18314 fi
18315 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18316 fi
18317 fi
18318 echo "$as_me:18318: result: $ac_cv_func_fork_works" >&5
18319 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18320
18321 fi
18322 if test "x$ac_cv_func_fork_works" = xcross; then
18323   case $host in
18324     *-*-amigaos* | *-*-msdosdjgpp*)
18325       # Override, as these systems have only a dummy fork() stub
18326       ac_cv_func_fork_works=no
18327       ;;
18328     *)
18329       ac_cv_func_fork_works=yes
18330       ;;
18331   esac
18332   { echo "$as_me:18332: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18333 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18334 fi
18335 ac_cv_func_vfork_works=$ac_cv_func_vfork
18336 if test "x$ac_cv_func_vfork" = xyes; then
18337   echo "$as_me:18337: checking for working vfork" >&5
18338 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18339 if test "${ac_cv_func_vfork_works+set}" = set; then
18340   echo $ECHO_N "(cached) $ECHO_C" >&6
18341 else
18342   if test "$cross_compiling" = yes; then
18343   ac_cv_func_vfork_works=cross
18344 else
18345   cat >conftest.$ac_ext <<_ACEOF
18346 #line 18346 "configure"
18347 #include "confdefs.h"
18348 /* Thanks to Paul Eggert for this test.  */
18349 #include <stdio.h>
18350 #include <sys/types.h>
18351 #include <sys/stat.h>
18352 #if HAVE_UNISTD_H
18353 # include <unistd.h>
18354 #endif
18355 #if HAVE_VFORK_H
18356 # include <vfork.h>
18357 #endif
18358 /* On some sparc systems, changes by the child to local and incoming
18359    argument registers are propagated back to the parent.  The compiler
18360    is told about this with #include <vfork.h>, but some compilers
18361    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18362    static variable whose address is put into a register that is
18363    clobbered by the vfork.  */
18364 static
18365 #ifdef __cplusplus
18366 sparc_address_test (int arg)
18367 # else
18368 sparc_address_test (arg) int arg;
18369 #endif
18370 {
18371   static pid_t child;
18372   if (!child) {
18373     child = vfork ();
18374     if (child < 0) {
18375       perror ("vfork");
18376       _exit(2);
18377     }
18378     if (!child) {
18379       arg = getpid();
18380       write(-1, "", 0);
18381       _exit (arg);
18382     }
18383   }
18384 }
18385
18386 int
18387 main ()
18388 {
18389   pid_t parent = getpid ();
18390   pid_t child;
18391
18392   sparc_address_test ();
18393
18394   child = vfork ();
18395
18396   if (child == 0) {
18397     /* Here is another test for sparc vfork register problems.  This
18398        test uses lots of local variables, at least as many local
18399        variables as main has allocated so far including compiler
18400        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18401        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18402        reuse the register of parent for one of the local variables,
18403        since it will think that parent can't possibly be used any more
18404        in this routine.  Assigning to the local variable will thus
18405        munge parent in the parent process.  */
18406     pid_t
18407       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18408       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18409     /* Convince the compiler that p..p7 are live; otherwise, it might
18410        use the same hardware register for all 8 local variables.  */
18411     if (p != p1 || p != p2 || p != p3 || p != p4
18412         || p != p5 || p != p6 || p != p7)
18413       _exit(1);
18414
18415     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18416        from child file descriptors.  If the child closes a descriptor
18417        before it execs or exits, this munges the parent's descriptor
18418        as well.  Test for this by closing stdout in the child.  */
18419     _exit(close(fileno(stdout)) != 0);
18420   } else {
18421     int status;
18422     struct stat st;
18423
18424     while (wait(&status) != child)
18425       ;
18426     $ac_main_return(
18427          /* Was there some problem with vforking?  */
18428          child < 0
18429
18430          /* Did the child fail?  (This shouldn't happen.)  */
18431          || status
18432
18433          /* Did the vfork/compiler bug occur?  */
18434          || parent != getpid()
18435
18436          /* Did the file descriptor bug occur?  */
18437          || fstat(fileno(stdout), &st) != 0
18438          );
18439   }
18440 }
18441 _ACEOF
18442 rm -f conftest$ac_exeext
18443 if { (eval echo "$as_me:18443: \"$ac_link\"") >&5
18444   (eval $ac_link) 2>&5
18445   ac_status=$?
18446   echo "$as_me:18446: \$? = $ac_status" >&5
18447   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18448   { (eval echo "$as_me:18448: \"$ac_try\"") >&5
18449   (eval $ac_try) 2>&5
18450   ac_status=$?
18451   echo "$as_me:18451: \$? = $ac_status" >&5
18452   (exit $ac_status); }; }; then
18453   ac_cv_func_vfork_works=yes
18454 else
18455   echo "$as_me: program exited with status $ac_status" >&5
18456 echo "$as_me: failed program was:" >&5
18457 cat conftest.$ac_ext >&5
18458 ac_cv_func_vfork_works=no
18459 fi
18460 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18461 fi
18462 fi
18463 echo "$as_me:18463: result: $ac_cv_func_vfork_works" >&5
18464 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18465
18466 fi;
18467 if test "x$ac_cv_func_fork_works" = xcross; then
18468   ac_cv_func_vfork_works=ac_cv_func_vfork
18469   { echo "$as_me:18469: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18470 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18471 fi
18472
18473 if test "x$ac_cv_func_vfork_works" = xyes; then
18474
18475 cat >>confdefs.h <<\EOF
18476 #define HAVE_WORKING_VFORK 1
18477 EOF
18478
18479 else
18480
18481 cat >>confdefs.h <<\EOF
18482 #define vfork fork
18483 EOF
18484
18485 fi
18486 if test "x$ac_cv_func_fork_works" = xyes; then
18487
18488 cat >>confdefs.h <<\EOF
18489 #define HAVE_WORKING_FORK 1
18490 EOF
18491
18492 fi
18493
18494 # special check for test/ditto.c
18495
18496 echo "$as_me:18496: checking for openpty in -lutil" >&5
18497 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18498 if test "${ac_cv_lib_util_openpty+set}" = set; then
18499   echo $ECHO_N "(cached) $ECHO_C" >&6
18500 else
18501   ac_check_lib_save_LIBS=$LIBS
18502 LIBS="-lutil  $LIBS"
18503 cat >conftest.$ac_ext <<_ACEOF
18504 #line 18504 "configure"
18505 #include "confdefs.h"
18506
18507 /* Override any gcc2 internal prototype to avoid an error.  */
18508 #ifdef __cplusplus
18509 extern "C"
18510 #endif
18511 /* We use char because int might match the return type of a gcc2
18512    builtin and then its argument prototype would still apply.  */
18513 char openpty ();
18514 int
18515 main ()
18516 {
18517 openpty ();
18518   ;
18519   return 0;
18520 }
18521 _ACEOF
18522 rm -f conftest.$ac_objext conftest$ac_exeext
18523 if { (eval echo "$as_me:18523: \"$ac_link\"") >&5
18524   (eval $ac_link) 2>&5
18525   ac_status=$?
18526   echo "$as_me:18526: \$? = $ac_status" >&5
18527   (exit $ac_status); } &&
18528          { ac_try='test -s conftest$ac_exeext'
18529   { (eval echo "$as_me:18529: \"$ac_try\"") >&5
18530   (eval $ac_try) 2>&5
18531   ac_status=$?
18532   echo "$as_me:18532: \$? = $ac_status" >&5
18533   (exit $ac_status); }; }; then
18534   ac_cv_lib_util_openpty=yes
18535 else
18536   echo "$as_me: failed program was:" >&5
18537 cat conftest.$ac_ext >&5
18538 ac_cv_lib_util_openpty=no
18539 fi
18540 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18541 LIBS=$ac_check_lib_save_LIBS
18542 fi
18543 echo "$as_me:18543: result: $ac_cv_lib_util_openpty" >&5
18544 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18545 if test $ac_cv_lib_util_openpty = yes; then
18546   cf_cv_lib_util=yes
18547 else
18548   cf_cv_lib_util=no
18549 fi
18550
18551 echo "$as_me:18551: checking for openpty header" >&5
18552 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18553 if test "${cf_cv_func_openpty+set}" = set; then
18554   echo $ECHO_N "(cached) $ECHO_C" >&6
18555 else
18556
18557         cf_save_LIBS="$LIBS"
18558         test $cf_cv_lib_util = yes && {
18559 cf_add_libs="-lutil"
18560 # Filter out duplicates - this happens with badly-designed ".pc" files...
18561 for cf_add_1lib in $LIBS
18562 do
18563         for cf_add_2lib in $cf_add_libs
18564         do
18565                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18566                 then
18567                         cf_add_1lib=
18568                         break
18569                 fi
18570         done
18571         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18572 done
18573 LIBS="$cf_add_libs"
18574  }
18575         for cf_header in pty.h libutil.h util.h
18576         do
18577         cat >conftest.$ac_ext <<_ACEOF
18578 #line 18578 "configure"
18579 #include "confdefs.h"
18580
18581 #include <$cf_header>
18582
18583 int
18584 main ()
18585 {
18586
18587         int x = openpty((int *)0, (int *)0, (char *)0,
18588                                    (struct termios *)0, (struct winsize *)0);
18589
18590   ;
18591   return 0;
18592 }
18593 _ACEOF
18594 rm -f conftest.$ac_objext conftest$ac_exeext
18595 if { (eval echo "$as_me:18595: \"$ac_link\"") >&5
18596   (eval $ac_link) 2>&5
18597   ac_status=$?
18598   echo "$as_me:18598: \$? = $ac_status" >&5
18599   (exit $ac_status); } &&
18600          { ac_try='test -s conftest$ac_exeext'
18601   { (eval echo "$as_me:18601: \"$ac_try\"") >&5
18602   (eval $ac_try) 2>&5
18603   ac_status=$?
18604   echo "$as_me:18604: \$? = $ac_status" >&5
18605   (exit $ac_status); }; }; then
18606
18607                 cf_cv_func_openpty=$cf_header
18608                 break
18609
18610 else
18611   echo "$as_me: failed program was:" >&5
18612 cat conftest.$ac_ext >&5
18613
18614                 cf_cv_func_openpty=no
18615
18616 fi
18617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18618         done
18619         LIBS="$cf_save_LIBS"
18620
18621 fi
18622 echo "$as_me:18622: result: $cf_cv_func_openpty" >&5
18623 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18624
18625 if test "$cf_cv_func_openpty" != no ; then
18626
18627 cat >>confdefs.h <<EOF
18628 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18629 EOF
18630
18631 cat >>confdefs.h <<\EOF
18632 #define USE_XTERM_PTY 1
18633 EOF
18634
18635         if test "x$cf_cv_lib_util" = xyes ; then
18636
18637 cf_add_libs="-lutil"
18638 # Filter out duplicates - this happens with badly-designed ".pc" files...
18639 for cf_add_1lib in $TEST_LIBS
18640 do
18641         for cf_add_2lib in $cf_add_libs
18642         do
18643                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18644                 then
18645                         cf_add_1lib=
18646                         break
18647                 fi
18648         done
18649         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18650 done
18651 TEST_LIBS="$cf_add_libs"
18652
18653         fi
18654 fi
18655
18656 if test "$with_hashed_db" != no ; then
18657
18658 cat >>confdefs.h <<\EOF
18659 #define USE_HASHED_DB 1
18660 EOF
18661
18662 case $with_hashed_db in
18663 (yes|*able*)
18664         ;;
18665 (*)
18666         if test -d "$with_hashed_db" ; then
18667
18668 if test -n "$with_hashed_db/include" ; then
18669   for cf_add_incdir in $with_hashed_db/include
18670   do
18671         while test $cf_add_incdir != /usr/include
18672         do
18673           if test -d $cf_add_incdir
18674           then
18675                 cf_have_incdir=no
18676                 if test -n "$CFLAGS$CPPFLAGS" ; then
18677                   # a loop is needed to ensure we can add subdirs of existing dirs
18678                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18679                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18680                           cf_have_incdir=yes; break
18681                         fi
18682                   done
18683                 fi
18684
18685                 if test "$cf_have_incdir" = no ; then
18686                   if test "$cf_add_incdir" = /usr/local/include ; then
18687                         if test "$GCC" = yes
18688                         then
18689                           cf_save_CPPFLAGS=$CPPFLAGS
18690                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18691                           cat >conftest.$ac_ext <<_ACEOF
18692 #line 18692 "configure"
18693 #include "confdefs.h"
18694 #include <stdio.h>
18695 int
18696 main ()
18697 {
18698 printf("Hello")
18699   ;
18700   return 0;
18701 }
18702 _ACEOF
18703 rm -f conftest.$ac_objext
18704 if { (eval echo "$as_me:18704: \"$ac_compile\"") >&5
18705   (eval $ac_compile) 2>&5
18706   ac_status=$?
18707   echo "$as_me:18707: \$? = $ac_status" >&5
18708   (exit $ac_status); } &&
18709          { ac_try='test -s conftest.$ac_objext'
18710   { (eval echo "$as_me:18710: \"$ac_try\"") >&5
18711   (eval $ac_try) 2>&5
18712   ac_status=$?
18713   echo "$as_me:18713: \$? = $ac_status" >&5
18714   (exit $ac_status); }; }; then
18715   :
18716 else
18717   echo "$as_me: failed program was:" >&5
18718 cat conftest.$ac_ext >&5
18719 cf_have_incdir=yes
18720 fi
18721 rm -f conftest.$ac_objext conftest.$ac_ext
18722                           CPPFLAGS=$cf_save_CPPFLAGS
18723                         fi
18724                   fi
18725                 fi
18726
18727                 if test "$cf_have_incdir" = no ; then
18728                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18729
18730 echo "${as_me:-configure}:18730: testing adding $cf_add_incdir to include-path ..." 1>&5
18731
18732                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18733
18734                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18735                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18736                   cf_add_incdir="$cf_top_incdir"
18737                 else
18738                   break
18739                 fi
18740           else
18741                 break
18742           fi
18743         done
18744   done
18745 fi
18746
18747 if test -n "$with_hashed_db/lib" ; then
18748         for cf_add_libdir in $with_hashed_db/lib
18749         do
18750                 if test $cf_add_libdir = /usr/lib ; then
18751                         :
18752                 elif test -d $cf_add_libdir
18753                 then
18754                         cf_have_libdir=no
18755                         if test -n "$LDFLAGS$LIBS" ; then
18756                                 # a loop is needed to ensure we can add subdirs of existing dirs
18757                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18758                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18759                                                 cf_have_libdir=yes; break
18760                                         fi
18761                                 done
18762                         fi
18763                         if test "$cf_have_libdir" = no ; then
18764                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18765
18766 echo "${as_me:-configure}:18766: testing adding $cf_add_libdir to library-path ..." 1>&5
18767
18768                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18769                         fi
18770                 fi
18771         done
18772 fi
18773
18774         else
18775                 case "$with_hashed_db" in
18776                 (./*|../*|/*)
18777                         { echo "$as_me:18777: WARNING: no such directory $with_hashed_db" >&5
18778 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18779                         ;;
18780                 (*)
18781
18782 cf_search=
18783
18784 test "x$prefix" != "xNONE" && \
18785 test -d "$prefix" && \
18786  {
18787         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18788         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18789         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18790         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18791         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18792         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18793 }
18794
18795 for cf_subdir_prefix in \
18796         /usr \
18797         /usr/local \
18798         /usr/pkg \
18799         /opt \
18800         /opt/local \
18801         $HOME
18802 do
18803
18804 test "x$cf_subdir_prefix" != "x$prefix" && \
18805 test -d "$cf_subdir_prefix" && \
18806 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18807         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18808         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18809         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18810         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18811         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18812         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"
18813 }
18814
18815 done
18816
18817         for cf_item in $cf_search
18818         do
18819                 case $cf_item in
18820                 (*/$with_hashed_db)
18821
18822 if test -n "$cf_item" ; then
18823   for cf_add_incdir in $cf_item
18824   do
18825         while test $cf_add_incdir != /usr/include
18826         do
18827           if test -d $cf_add_incdir
18828           then
18829                 cf_have_incdir=no
18830                 if test -n "$CFLAGS$CPPFLAGS" ; then
18831                   # a loop is needed to ensure we can add subdirs of existing dirs
18832                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18833                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18834                           cf_have_incdir=yes; break
18835                         fi
18836                   done
18837                 fi
18838
18839                 if test "$cf_have_incdir" = no ; then
18840                   if test "$cf_add_incdir" = /usr/local/include ; then
18841                         if test "$GCC" = yes
18842                         then
18843                           cf_save_CPPFLAGS=$CPPFLAGS
18844                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18845                           cat >conftest.$ac_ext <<_ACEOF
18846 #line 18846 "configure"
18847 #include "confdefs.h"
18848 #include <stdio.h>
18849 int
18850 main ()
18851 {
18852 printf("Hello")
18853   ;
18854   return 0;
18855 }
18856 _ACEOF
18857 rm -f conftest.$ac_objext
18858 if { (eval echo "$as_me:18858: \"$ac_compile\"") >&5
18859   (eval $ac_compile) 2>&5
18860   ac_status=$?
18861   echo "$as_me:18861: \$? = $ac_status" >&5
18862   (exit $ac_status); } &&
18863          { ac_try='test -s conftest.$ac_objext'
18864   { (eval echo "$as_me:18864: \"$ac_try\"") >&5
18865   (eval $ac_try) 2>&5
18866   ac_status=$?
18867   echo "$as_me:18867: \$? = $ac_status" >&5
18868   (exit $ac_status); }; }; then
18869   :
18870 else
18871   echo "$as_me: failed program was:" >&5
18872 cat conftest.$ac_ext >&5
18873 cf_have_incdir=yes
18874 fi
18875 rm -f conftest.$ac_objext conftest.$ac_ext
18876                           CPPFLAGS=$cf_save_CPPFLAGS
18877                         fi
18878                   fi
18879                 fi
18880
18881                 if test "$cf_have_incdir" = no ; then
18882                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18883
18884 echo "${as_me:-configure}:18884: testing adding $cf_add_incdir to include-path ..." 1>&5
18885
18886                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18887
18888                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18889                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18890                   cf_add_incdir="$cf_top_incdir"
18891                 else
18892                   break
18893                 fi
18894           else
18895                 break
18896           fi
18897         done
18898   done
18899 fi
18900
18901                         ;;
18902                 esac
18903         done
18904
18905 cf_search=
18906
18907 test "x$prefix" != "xNONE" && \
18908 test -d "$prefix" && \
18909  {
18910         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18911         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18912         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18913         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18914         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18915         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18916 }
18917
18918 for cf_subdir_prefix in \
18919         /usr \
18920         /usr/local \
18921         /usr/pkg \
18922         /opt \
18923         /opt/local \
18924         $HOME
18925 do
18926
18927 test "x$cf_subdir_prefix" != "x$prefix" && \
18928 test -d "$cf_subdir_prefix" && \
18929 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18930         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18931         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18932         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18933         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18934         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18935         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"
18936 }
18937
18938 done
18939
18940         for cf_item in $cf_search
18941         do
18942                 case $cf_item in
18943                 (*/$with_hashed_db)
18944
18945 if test -n "$cf_item" ; then
18946         for cf_add_libdir in $cf_item
18947         do
18948                 if test $cf_add_libdir = /usr/lib ; then
18949                         :
18950                 elif test -d $cf_add_libdir
18951                 then
18952                         cf_have_libdir=no
18953                         if test -n "$LDFLAGS$LIBS" ; then
18954                                 # a loop is needed to ensure we can add subdirs of existing dirs
18955                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18956                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18957                                                 cf_have_libdir=yes; break
18958                                         fi
18959                                 done
18960                         fi
18961                         if test "$cf_have_libdir" = no ; then
18962                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18963
18964 echo "${as_me:-configure}:18964: testing adding $cf_add_libdir to library-path ..." 1>&5
18965
18966                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18967                         fi
18968                 fi
18969         done
18970 fi
18971
18972                         ;;
18973                 esac
18974         done
18975
18976                         ;;
18977                 esac
18978         fi
18979 esac
18980
18981 echo "$as_me:18981: checking for db.h" >&5
18982 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18983 if test "${ac_cv_header_db_h+set}" = set; then
18984   echo $ECHO_N "(cached) $ECHO_C" >&6
18985 else
18986   cat >conftest.$ac_ext <<_ACEOF
18987 #line 18987 "configure"
18988 #include "confdefs.h"
18989 #include <db.h>
18990 _ACEOF
18991 if { (eval echo "$as_me:18991: \"$ac_cpp conftest.$ac_ext\"") >&5
18992   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18993   ac_status=$?
18994   egrep -v '^ *\+' conftest.er1 >conftest.err
18995   rm -f conftest.er1
18996   cat conftest.err >&5
18997   echo "$as_me:18997: \$? = $ac_status" >&5
18998   (exit $ac_status); } >/dev/null; then
18999   if test -s conftest.err; then
19000     ac_cpp_err=$ac_c_preproc_warn_flag
19001   else
19002     ac_cpp_err=
19003   fi
19004 else
19005   ac_cpp_err=yes
19006 fi
19007 if test -z "$ac_cpp_err"; then
19008   ac_cv_header_db_h=yes
19009 else
19010   echo "$as_me: failed program was:" >&5
19011   cat conftest.$ac_ext >&5
19012   ac_cv_header_db_h=no
19013 fi
19014 rm -f conftest.err conftest.$ac_ext
19015 fi
19016 echo "$as_me:19016: result: $ac_cv_header_db_h" >&5
19017 echo "${ECHO_T}$ac_cv_header_db_h" >&6
19018 if test $ac_cv_header_db_h = yes; then
19019
19020 echo "$as_me:19020: checking for version of db" >&5
19021 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
19022 if test "${cf_cv_hashed_db_version+set}" = set; then
19023   echo $ECHO_N "(cached) $ECHO_C" >&6
19024 else
19025
19026 cf_cv_hashed_db_version=unknown
19027
19028 for cf_db_version in 1 2 3 4 5 6
19029 do
19030
19031 echo "${as_me:-configure}:19031: testing checking for db version $cf_db_version ..." 1>&5
19032
19033         cat >conftest.$ac_ext <<_ACEOF
19034 #line 19034 "configure"
19035 #include "confdefs.h"
19036
19037 $ac_includes_default
19038 #include <db.h>
19039
19040 #ifdef DB_VERSION_MAJOR
19041         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
19042 #if $cf_db_version == DB_VERSION_MAJOR
19043         /* ok */
19044 #else
19045         make an error
19046 #endif
19047 #else
19048 #if $cf_db_version == 1
19049         /* ok: assuming this is DB 1.8.5 */
19050 #else
19051         make an error
19052 #endif
19053 #endif
19054
19055 int
19056 main ()
19057 {
19058 DBT *foo = 0
19059   ;
19060   return 0;
19061 }
19062 _ACEOF
19063 rm -f conftest.$ac_objext
19064 if { (eval echo "$as_me:19064: \"$ac_compile\"") >&5
19065   (eval $ac_compile) 2>&5
19066   ac_status=$?
19067   echo "$as_me:19067: \$? = $ac_status" >&5
19068   (exit $ac_status); } &&
19069          { ac_try='test -s conftest.$ac_objext'
19070   { (eval echo "$as_me:19070: \"$ac_try\"") >&5
19071   (eval $ac_try) 2>&5
19072   ac_status=$?
19073   echo "$as_me:19073: \$? = $ac_status" >&5
19074   (exit $ac_status); }; }; then
19075
19076         cf_cv_hashed_db_version=$cf_db_version
19077         break
19078
19079 else
19080   echo "$as_me: failed program was:" >&5
19081 cat conftest.$ac_ext >&5
19082 fi
19083 rm -f conftest.$ac_objext conftest.$ac_ext
19084 done
19085
19086 fi
19087 echo "$as_me:19087: result: $cf_cv_hashed_db_version" >&5
19088 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
19089
19090 if test "$cf_cv_hashed_db_version" = unknown ; then
19091         { { echo "$as_me:19091: error: Cannot determine version of db" >&5
19092 echo "$as_me: error: Cannot determine version of db" >&2;}
19093    { (exit 1); exit 1; }; }
19094 else
19095
19096 echo "$as_me:19096: checking for db libraries" >&5
19097 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
19098 if test "${cf_cv_hashed_db_libs+set}" = set; then
19099   echo $ECHO_N "(cached) $ECHO_C" >&6
19100 else
19101
19102 cf_cv_hashed_db_libs=unknown
19103 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
19104 do
19105         cf_save_libs="$LIBS"
19106         if test -n "$cf_db_libs"; then
19107
19108 cf_add_libs="-l$cf_db_libs"
19109 # Filter out duplicates - this happens with badly-designed ".pc" files...
19110 for cf_add_1lib in $LIBS
19111 do
19112         for cf_add_2lib in $cf_add_libs
19113         do
19114                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19115                 then
19116                         cf_add_1lib=
19117                         break
19118                 fi
19119         done
19120         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19121 done
19122 LIBS="$cf_add_libs"
19123
19124         fi
19125
19126 echo "${as_me:-configure}:19126: testing checking for library "$cf_db_libs" ..." 1>&5
19127
19128         cat >conftest.$ac_ext <<_ACEOF
19129 #line 19129 "configure"
19130 #include "confdefs.h"
19131
19132 $ac_includes_default
19133 #include <db.h>
19134
19135 int
19136 main ()
19137 {
19138
19139         char *path = "/tmp/foo";
19140 #ifdef DB_VERSION_MAJOR
19141 #if DB_VERSION_MAJOR >= 4
19142         DB *result = 0;
19143         db_create(&result, NULL, 0);
19144         result->open(result,
19145                 NULL,
19146                 path,
19147                 path,
19148                 DB_HASH,
19149                 DB_CREATE,
19150                 0644);
19151 #elif DB_VERSION_MAJOR >= 3
19152         DB *result = 0;
19153         db_create(&result, NULL, 0);
19154         result->open(result,
19155                 path,
19156                 path,
19157                 DB_HASH,
19158                 DB_CREATE,
19159                 0644);
19160 #elif DB_VERSION_MAJOR >= 2
19161         DB *result = 0;
19162         db_open(path,
19163                 DB_HASH,
19164                 DB_CREATE,
19165                 0644,
19166                 (DB_ENV *) 0,
19167                 (DB_INFO *) 0,
19168                 &result);
19169 #endif /* DB_VERSION_MAJOR */
19170 #else
19171         DB *result = dbopen(path,
19172                      2,
19173                      0644,
19174                      DB_HASH,
19175                      0);
19176 #endif
19177         ${cf_cv_main_return:-return}(result != 0)
19178
19179   ;
19180   return 0;
19181 }
19182 _ACEOF
19183 rm -f conftest.$ac_objext conftest$ac_exeext
19184 if { (eval echo "$as_me:19184: \"$ac_link\"") >&5
19185   (eval $ac_link) 2>&5
19186   ac_status=$?
19187   echo "$as_me:19187: \$? = $ac_status" >&5
19188   (exit $ac_status); } &&
19189          { ac_try='test -s conftest$ac_exeext'
19190   { (eval echo "$as_me:19190: \"$ac_try\"") >&5
19191   (eval $ac_try) 2>&5
19192   ac_status=$?
19193   echo "$as_me:19193: \$? = $ac_status" >&5
19194   (exit $ac_status); }; }; then
19195
19196         if test -n "$cf_db_libs" ; then
19197                 cf_cv_hashed_db_libs=$cf_db_libs
19198         else
19199                 cf_cv_hashed_db_libs=default
19200         fi
19201         LIBS="$cf_save_libs"
19202         break
19203
19204 else
19205   echo "$as_me: failed program was:" >&5
19206 cat conftest.$ac_ext >&5
19207 fi
19208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19209         LIBS="$cf_save_libs"
19210 done
19211
19212 fi
19213 echo "$as_me:19213: result: $cf_cv_hashed_db_libs" >&5
19214 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19215
19216         if test "$cf_cv_hashed_db_libs" = unknown ; then
19217                 { { echo "$as_me:19217: error: Cannot determine library for db" >&5
19218 echo "$as_me: error: Cannot determine library for db" >&2;}
19219    { (exit 1); exit 1; }; }
19220         elif test "$cf_cv_hashed_db_libs" != default ; then
19221
19222 cf_add_libs="-l$cf_cv_hashed_db_libs"
19223 # Filter out duplicates - this happens with badly-designed ".pc" files...
19224 for cf_add_1lib in $LIBS
19225 do
19226         for cf_add_2lib in $cf_add_libs
19227         do
19228                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19229                 then
19230                         cf_add_1lib=
19231                         break
19232                 fi
19233         done
19234         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19235 done
19236 LIBS="$cf_add_libs"
19237
19238         fi
19239 fi
19240
19241 else
19242
19243         { { echo "$as_me:19243: error: Cannot find db.h" >&5
19244 echo "$as_me: error: Cannot find db.h" >&2;}
19245    { (exit 1); exit 1; }; }
19246
19247 fi
19248
19249 fi
19250
19251 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19252         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19253         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19254 fi
19255
19256 # Just in case, check if the C compiler has a bool type.
19257
19258 echo "$as_me:19258: checking if we should include stdbool.h" >&5
19259 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19260
19261 if test "${cf_cv_header_stdbool_h+set}" = set; then
19262   echo $ECHO_N "(cached) $ECHO_C" >&6
19263 else
19264
19265         cat >conftest.$ac_ext <<_ACEOF
19266 #line 19266 "configure"
19267 #include "confdefs.h"
19268
19269 int
19270 main ()
19271 {
19272 bool foo = false
19273   ;
19274   return 0;
19275 }
19276 _ACEOF
19277 rm -f conftest.$ac_objext
19278 if { (eval echo "$as_me:19278: \"$ac_compile\"") >&5
19279   (eval $ac_compile) 2>&5
19280   ac_status=$?
19281   echo "$as_me:19281: \$? = $ac_status" >&5
19282   (exit $ac_status); } &&
19283          { ac_try='test -s conftest.$ac_objext'
19284   { (eval echo "$as_me:19284: \"$ac_try\"") >&5
19285   (eval $ac_try) 2>&5
19286   ac_status=$?
19287   echo "$as_me:19287: \$? = $ac_status" >&5
19288   (exit $ac_status); }; }; then
19289   cf_cv_header_stdbool_h=0
19290 else
19291   echo "$as_me: failed program was:" >&5
19292 cat conftest.$ac_ext >&5
19293 cat >conftest.$ac_ext <<_ACEOF
19294 #line 19294 "configure"
19295 #include "confdefs.h"
19296
19297 #ifndef __BEOS__
19298 #include <stdbool.h>
19299 #endif
19300
19301 int
19302 main ()
19303 {
19304 bool foo = false
19305   ;
19306   return 0;
19307 }
19308 _ACEOF
19309 rm -f conftest.$ac_objext
19310 if { (eval echo "$as_me:19310: \"$ac_compile\"") >&5
19311   (eval $ac_compile) 2>&5
19312   ac_status=$?
19313   echo "$as_me:19313: \$? = $ac_status" >&5
19314   (exit $ac_status); } &&
19315          { ac_try='test -s conftest.$ac_objext'
19316   { (eval echo "$as_me:19316: \"$ac_try\"") >&5
19317   (eval $ac_try) 2>&5
19318   ac_status=$?
19319   echo "$as_me:19319: \$? = $ac_status" >&5
19320   (exit $ac_status); }; }; then
19321   cf_cv_header_stdbool_h=1
19322 else
19323   echo "$as_me: failed program was:" >&5
19324 cat conftest.$ac_ext >&5
19325 cf_cv_header_stdbool_h=0
19326 fi
19327 rm -f conftest.$ac_objext conftest.$ac_ext
19328 fi
19329 rm -f conftest.$ac_objext conftest.$ac_ext
19330 fi
19331
19332 if test "$cf_cv_header_stdbool_h" = 1
19333 then    echo "$as_me:19333: result: yes" >&5
19334 echo "${ECHO_T}yes" >&6
19335 else    echo "$as_me:19335: result: no" >&5
19336 echo "${ECHO_T}no" >&6
19337 fi
19338
19339 echo "$as_me:19339: checking for builtin bool type" >&5
19340 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19341
19342 if test "${cf_cv_cc_bool_type+set}" = set; then
19343   echo $ECHO_N "(cached) $ECHO_C" >&6
19344 else
19345
19346         cat >conftest.$ac_ext <<_ACEOF
19347 #line 19347 "configure"
19348 #include "confdefs.h"
19349
19350 #include <stdio.h>
19351 #include <sys/types.h>
19352
19353 int
19354 main ()
19355 {
19356 bool x = false
19357   ;
19358   return 0;
19359 }
19360 _ACEOF
19361 rm -f conftest.$ac_objext
19362 if { (eval echo "$as_me:19362: \"$ac_compile\"") >&5
19363   (eval $ac_compile) 2>&5
19364   ac_status=$?
19365   echo "$as_me:19365: \$? = $ac_status" >&5
19366   (exit $ac_status); } &&
19367          { ac_try='test -s conftest.$ac_objext'
19368   { (eval echo "$as_me:19368: \"$ac_try\"") >&5
19369   (eval $ac_try) 2>&5
19370   ac_status=$?
19371   echo "$as_me:19371: \$? = $ac_status" >&5
19372   (exit $ac_status); }; }; then
19373   cf_cv_cc_bool_type=1
19374 else
19375   echo "$as_me: failed program was:" >&5
19376 cat conftest.$ac_ext >&5
19377 cf_cv_cc_bool_type=0
19378 fi
19379 rm -f conftest.$ac_objext conftest.$ac_ext
19380
19381 fi
19382
19383 if test "$cf_cv_cc_bool_type" = 1
19384 then    echo "$as_me:19384: result: yes" >&5
19385 echo "${ECHO_T}yes" >&6
19386 else    echo "$as_me:19386: result: no" >&5
19387 echo "${ECHO_T}no" >&6
19388 fi
19389
19390 # Check for C++ compiler characteristics (and ensure that it's there!)
19391 if test -n "$CXX" ; then
19392         ac_ext=cc
19393 ac_cpp='$CXXCPP $CPPFLAGS'
19394 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19395 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19396 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19397 ac_main_return=return
19398
19399 if test -n "$GXX" ; then
19400
19401         cf_save="$LIBS"
19402         LIBS="$LIBS $CXXLIBS"
19403         echo "$as_me:19403: checking if we already have C++ library" >&5
19404 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
19405         cat >conftest.$ac_ext <<_ACEOF
19406 #line 19406 "configure"
19407 #include "confdefs.h"
19408
19409                         #include <iostream>
19410 int
19411 main ()
19412 {
19413
19414                         std::cout << "Hello World!" << std::endl;
19415   ;
19416   return 0;
19417 }
19418 _ACEOF
19419 rm -f conftest.$ac_objext conftest$ac_exeext
19420 if { (eval echo "$as_me:19420: \"$ac_link\"") >&5
19421   (eval $ac_link) 2>&5
19422   ac_status=$?
19423   echo "$as_me:19423: \$? = $ac_status" >&5
19424   (exit $ac_status); } &&
19425          { ac_try='test -s conftest$ac_exeext'
19426   { (eval echo "$as_me:19426: \"$ac_try\"") >&5
19427   (eval $ac_try) 2>&5
19428   ac_status=$?
19429   echo "$as_me:19429: \$? = $ac_status" >&5
19430   (exit $ac_status); }; }; then
19431   cf_have_libstdcpp=yes
19432 else
19433   echo "$as_me: failed program was:" >&5
19434 cat conftest.$ac_ext >&5
19435 cf_have_libstdcpp=no
19436 fi
19437 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19438         echo "$as_me:19438: result: $cf_have_libstdcpp" >&5
19439 echo "${ECHO_T}$cf_have_libstdcpp" >&6
19440         LIBS="$cf_save"
19441
19442         if test $cf_have_libstdcpp != yes
19443         then
19444                 case $cf_cv_system_name in
19445                 (os2*)
19446                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
19447                                 cf_stdcpp_libname=stdcpp
19448                         else
19449                                 cf_stdcpp_libname=stdc++
19450                         fi
19451                         ;;
19452                 (*)
19453                         cf_stdcpp_libname=stdc++
19454                         ;;
19455                 esac
19456
19457                 echo "$as_me:19457: checking for library $cf_stdcpp_libname" >&5
19458 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19459 if test "${cf_cv_libstdcpp+set}" = set; then
19460   echo $ECHO_N "(cached) $ECHO_C" >&6
19461 else
19462
19463                         cf_save="$LIBS"
19464                         LIBS="$LIBS $CXXLIBS"
19465
19466 cf_add_libs="-l$cf_stdcpp_libname"
19467 # Filter out duplicates - this happens with badly-designed ".pc" files...
19468 for cf_add_1lib in $LIBS
19469 do
19470         for cf_add_2lib in $cf_add_libs
19471         do
19472                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19473                 then
19474                         cf_add_1lib=
19475                         break
19476                 fi
19477         done
19478         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19479 done
19480 LIBS="$cf_add_libs"
19481
19482                 cat >conftest.$ac_ext <<_ACEOF
19483 #line 19483 "configure"
19484 #include "confdefs.h"
19485
19486                                 #include <iostream>
19487 int
19488 main ()
19489 {
19490
19491                                 std::cout << "Hello World!" << std::endl;
19492   ;
19493   return 0;
19494 }
19495 _ACEOF
19496 rm -f conftest.$ac_objext conftest$ac_exeext
19497 if { (eval echo "$as_me:19497: \"$ac_link\"") >&5
19498   (eval $ac_link) 2>&5
19499   ac_status=$?
19500   echo "$as_me:19500: \$? = $ac_status" >&5
19501   (exit $ac_status); } &&
19502          { ac_try='test -s conftest$ac_exeext'
19503   { (eval echo "$as_me:19503: \"$ac_try\"") >&5
19504   (eval $ac_try) 2>&5
19505   ac_status=$?
19506   echo "$as_me:19506: \$? = $ac_status" >&5
19507   (exit $ac_status); }; }; then
19508   cf_cv_libstdcpp=yes
19509 else
19510   echo "$as_me: failed program was:" >&5
19511 cat conftest.$ac_ext >&5
19512 cf_cv_libstdcpp=no
19513 fi
19514 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19515                         LIBS="$cf_save"
19516
19517 fi
19518 echo "$as_me:19518: result: $cf_cv_libstdcpp" >&5
19519 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19520                 test "$cf_cv_libstdcpp" = yes && {
19521 cf_add_libs="-l$cf_stdcpp_libname"
19522 # Filter out duplicates - this happens with badly-designed ".pc" files...
19523 for cf_add_1lib in $CXXLIBS
19524 do
19525         for cf_add_2lib in $cf_add_libs
19526         do
19527                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19528                 then
19529                         cf_add_1lib=
19530                         break
19531                 fi
19532         done
19533         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19534 done
19535 CXXLIBS="$cf_add_libs"
19536  }
19537         fi
19538 fi
19539
19540         echo "$as_me:19540: checking whether $CXX understands -c and -o together" >&5
19541 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19542 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19543   echo $ECHO_N "(cached) $ECHO_C" >&6
19544 else
19545
19546 cat > conftest.$ac_ext <<CF_EOF
19547 #include <stdio.h>
19548 int main()
19549 {
19550         ${cf_cv_main_return:-return}(0);
19551 }
19552 CF_EOF
19553 # We do the test twice because some compilers refuse to overwrite an
19554 # existing .o file with -o, though they will create one.
19555 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19556 if { (eval echo "$as_me:19556: \"$ac_try\"") >&5
19557   (eval $ac_try) 2>&5
19558   ac_status=$?
19559   echo "$as_me:19559: \$? = $ac_status" >&5
19560   (exit $ac_status); } &&
19561   test -f conftest2.$ac_objext && { (eval echo "$as_me:19561: \"$ac_try\"") >&5
19562   (eval $ac_try) 2>&5
19563   ac_status=$?
19564   echo "$as_me:19564: \$? = $ac_status" >&5
19565   (exit $ac_status); };
19566 then
19567   eval cf_cv_prog_CXX_c_o=yes
19568 else
19569   eval cf_cv_prog_CXX_c_o=no
19570 fi
19571 rm -rf conftest*
19572
19573 fi
19574 if test $cf_cv_prog_CXX_c_o = yes; then
19575   echo "$as_me:19575: result: yes" >&5
19576 echo "${ECHO_T}yes" >&6
19577 else
19578   echo "$as_me:19578: result: no" >&5
19579 echo "${ECHO_T}no" >&6
19580 fi
19581
19582         case $GXX_VERSION in
19583         (1*|2.0-6*)
19584                 cf_cxx_library=yes
19585                 ;;
19586         (*-2.7*|2.7*)
19587
19588 cf_cxx_library=unknown
19589 case $cf_cv_system_name in
19590 (os2*)
19591         cf_gpp_libname=gpp
19592         ;;
19593 (*)
19594         cf_gpp_libname=g++
19595         ;;
19596 esac
19597 if test "$GXX" = yes; then
19598         echo "$as_me:19598: checking for lib$cf_gpp_libname" >&5
19599 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19600         cf_save="$LIBS"
19601
19602 cf_add_libs="-l$cf_gpp_libname"
19603 # Filter out duplicates - this happens with badly-designed ".pc" files...
19604 for cf_add_1lib in $LIBS
19605 do
19606         for cf_add_2lib in $cf_add_libs
19607         do
19608                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19609                 then
19610                         cf_add_1lib=
19611                         break
19612                 fi
19613         done
19614         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19615 done
19616 LIBS="$cf_add_libs"
19617
19618         cat >conftest.$ac_ext <<_ACEOF
19619 #line 19619 "configure"
19620 #include "confdefs.h"
19621
19622 #include <$cf_gpp_libname/builtin.h>
19623
19624 int
19625 main ()
19626 {
19627 two_arg_error_handler_t foo2 = lib_error_handler
19628   ;
19629   return 0;
19630 }
19631 _ACEOF
19632 rm -f conftest.$ac_objext conftest$ac_exeext
19633 if { (eval echo "$as_me:19633: \"$ac_link\"") >&5
19634   (eval $ac_link) 2>&5
19635   ac_status=$?
19636   echo "$as_me:19636: \$? = $ac_status" >&5
19637   (exit $ac_status); } &&
19638          { ac_try='test -s conftest$ac_exeext'
19639   { (eval echo "$as_me:19639: \"$ac_try\"") >&5
19640   (eval $ac_try) 2>&5
19641   ac_status=$?
19642   echo "$as_me:19642: \$? = $ac_status" >&5
19643   (exit $ac_status); }; }; then
19644   cf_cxx_library=yes
19645
19646 cf_add_libs="-l$cf_gpp_libname"
19647 # Filter out duplicates - this happens with badly-designed ".pc" files...
19648 for cf_add_1lib in $CXXLIBS
19649 do
19650         for cf_add_2lib in $cf_add_libs
19651         do
19652                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19653                 then
19654                         cf_add_1lib=
19655                         break
19656                 fi
19657         done
19658         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19659 done
19660 CXXLIBS="$cf_add_libs"
19661
19662          if test "$cf_gpp_libname" = cpp ; then
19663
19664 cat >>confdefs.h <<\EOF
19665 #define HAVE_GPP_BUILTIN_H 1
19666 EOF
19667
19668          else
19669
19670 cat >>confdefs.h <<\EOF
19671 #define HAVE_GXX_BUILTIN_H 1
19672 EOF
19673
19674          fi
19675 else
19676   echo "$as_me: failed program was:" >&5
19677 cat conftest.$ac_ext >&5
19678 cat >conftest.$ac_ext <<_ACEOF
19679 #line 19679 "configure"
19680 #include "confdefs.h"
19681
19682 #include <builtin.h>
19683
19684 int
19685 main ()
19686 {
19687 two_arg_error_handler_t foo2 = lib_error_handler
19688   ;
19689   return 0;
19690 }
19691 _ACEOF
19692 rm -f conftest.$ac_objext conftest$ac_exeext
19693 if { (eval echo "$as_me:19693: \"$ac_link\"") >&5
19694   (eval $ac_link) 2>&5
19695   ac_status=$?
19696   echo "$as_me:19696: \$? = $ac_status" >&5
19697   (exit $ac_status); } &&
19698          { ac_try='test -s conftest$ac_exeext'
19699   { (eval echo "$as_me:19699: \"$ac_try\"") >&5
19700   (eval $ac_try) 2>&5
19701   ac_status=$?
19702   echo "$as_me:19702: \$? = $ac_status" >&5
19703   (exit $ac_status); }; }; then
19704   cf_cxx_library=yes
19705
19706 cf_add_libs="-l$cf_gpp_libname"
19707 # Filter out duplicates - this happens with badly-designed ".pc" files...
19708 for cf_add_1lib in $CXXLIBS
19709 do
19710         for cf_add_2lib in $cf_add_libs
19711         do
19712                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19713                 then
19714                         cf_add_1lib=
19715                         break
19716                 fi
19717         done
19718         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19719 done
19720 CXXLIBS="$cf_add_libs"
19721
19722 cat >>confdefs.h <<\EOF
19723 #define HAVE_BUILTIN_H 1
19724 EOF
19725
19726 else
19727   echo "$as_me: failed program was:" >&5
19728 cat conftest.$ac_ext >&5
19729 cf_cxx_library=no
19730 fi
19731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19732 fi
19733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19734         LIBS="$cf_save"
19735         echo "$as_me:19735: result: $cf_cxx_library" >&5
19736 echo "${ECHO_T}$cf_cxx_library" >&6
19737 fi
19738
19739                 ;;
19740         (*)
19741                 cf_cxx_library=no
19742                 ;;
19743         esac
19744
19745         ac_ext=cc
19746 ac_cpp='$CXXCPP $CPPFLAGS'
19747 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19748 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19749 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19750 ac_main_return=return
19751 echo "$as_me:19751: checking how to run the C++ preprocessor" >&5
19752 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19753 if test -z "$CXXCPP"; then
19754   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19755   echo $ECHO_N "(cached) $ECHO_C" >&6
19756 else
19757       # Double quotes because CXXCPP needs to be expanded
19758     for CXXCPP in "$CXX -E" "/lib/cpp"
19759     do
19760       ac_preproc_ok=false
19761 for ac_cxx_preproc_warn_flag in '' yes
19762 do
19763   # Use a header file that comes with gcc, so configuring glibc
19764   # with a fresh cross-compiler works.
19765   # On the NeXT, cc -E runs the code through the compiler's parser,
19766   # not just through cpp. "Syntax error" is here to catch this case.
19767   cat >conftest.$ac_ext <<_ACEOF
19768 #line 19768 "configure"
19769 #include "confdefs.h"
19770 #include <assert.h>
19771                      Syntax error
19772 _ACEOF
19773 if { (eval echo "$as_me:19773: \"$ac_cpp conftest.$ac_ext\"") >&5
19774   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19775   ac_status=$?
19776   egrep -v '^ *\+' conftest.er1 >conftest.err
19777   rm -f conftest.er1
19778   cat conftest.err >&5
19779   echo "$as_me:19779: \$? = $ac_status" >&5
19780   (exit $ac_status); } >/dev/null; then
19781   if test -s conftest.err; then
19782     ac_cpp_err=$ac_cxx_preproc_warn_flag
19783   else
19784     ac_cpp_err=
19785   fi
19786 else
19787   ac_cpp_err=yes
19788 fi
19789 if test -z "$ac_cpp_err"; then
19790   :
19791 else
19792   echo "$as_me: failed program was:" >&5
19793   cat conftest.$ac_ext >&5
19794   # Broken: fails on valid input.
19795 continue
19796 fi
19797 rm -f conftest.err conftest.$ac_ext
19798
19799   # OK, works on sane cases.  Now check whether non-existent headers
19800   # can be detected and how.
19801   cat >conftest.$ac_ext <<_ACEOF
19802 #line 19802 "configure"
19803 #include "confdefs.h"
19804 #include <ac_nonexistent.h>
19805 _ACEOF
19806 if { (eval echo "$as_me:19806: \"$ac_cpp conftest.$ac_ext\"") >&5
19807   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19808   ac_status=$?
19809   egrep -v '^ *\+' conftest.er1 >conftest.err
19810   rm -f conftest.er1
19811   cat conftest.err >&5
19812   echo "$as_me:19812: \$? = $ac_status" >&5
19813   (exit $ac_status); } >/dev/null; then
19814   if test -s conftest.err; then
19815     ac_cpp_err=$ac_cxx_preproc_warn_flag
19816   else
19817     ac_cpp_err=
19818   fi
19819 else
19820   ac_cpp_err=yes
19821 fi
19822 if test -z "$ac_cpp_err"; then
19823   # Broken: success on invalid input.
19824 continue
19825 else
19826   echo "$as_me: failed program was:" >&5
19827   cat conftest.$ac_ext >&5
19828   # Passes both tests.
19829 ac_preproc_ok=:
19830 break
19831 fi
19832 rm -f conftest.err conftest.$ac_ext
19833
19834 done
19835 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19836 rm -f conftest.err conftest.$ac_ext
19837 if $ac_preproc_ok; then
19838   break
19839 fi
19840
19841     done
19842     ac_cv_prog_CXXCPP=$CXXCPP
19843
19844 fi
19845   CXXCPP=$ac_cv_prog_CXXCPP
19846 else
19847   ac_cv_prog_CXXCPP=$CXXCPP
19848 fi
19849 echo "$as_me:19849: result: $CXXCPP" >&5
19850 echo "${ECHO_T}$CXXCPP" >&6
19851 ac_preproc_ok=false
19852 for ac_cxx_preproc_warn_flag in '' yes
19853 do
19854   # Use a header file that comes with gcc, so configuring glibc
19855   # with a fresh cross-compiler works.
19856   # On the NeXT, cc -E runs the code through the compiler's parser,
19857   # not just through cpp. "Syntax error" is here to catch this case.
19858   cat >conftest.$ac_ext <<_ACEOF
19859 #line 19859 "configure"
19860 #include "confdefs.h"
19861 #include <assert.h>
19862                      Syntax error
19863 _ACEOF
19864 if { (eval echo "$as_me:19864: \"$ac_cpp conftest.$ac_ext\"") >&5
19865   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19866   ac_status=$?
19867   egrep -v '^ *\+' conftest.er1 >conftest.err
19868   rm -f conftest.er1
19869   cat conftest.err >&5
19870   echo "$as_me:19870: \$? = $ac_status" >&5
19871   (exit $ac_status); } >/dev/null; then
19872   if test -s conftest.err; then
19873     ac_cpp_err=$ac_cxx_preproc_warn_flag
19874   else
19875     ac_cpp_err=
19876   fi
19877 else
19878   ac_cpp_err=yes
19879 fi
19880 if test -z "$ac_cpp_err"; then
19881   :
19882 else
19883   echo "$as_me: failed program was:" >&5
19884   cat conftest.$ac_ext >&5
19885   # Broken: fails on valid input.
19886 continue
19887 fi
19888 rm -f conftest.err conftest.$ac_ext
19889
19890   # OK, works on sane cases.  Now check whether non-existent headers
19891   # can be detected and how.
19892   cat >conftest.$ac_ext <<_ACEOF
19893 #line 19893 "configure"
19894 #include "confdefs.h"
19895 #include <ac_nonexistent.h>
19896 _ACEOF
19897 if { (eval echo "$as_me:19897: \"$ac_cpp conftest.$ac_ext\"") >&5
19898   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19899   ac_status=$?
19900   egrep -v '^ *\+' conftest.er1 >conftest.err
19901   rm -f conftest.er1
19902   cat conftest.err >&5
19903   echo "$as_me:19903: \$? = $ac_status" >&5
19904   (exit $ac_status); } >/dev/null; then
19905   if test -s conftest.err; then
19906     ac_cpp_err=$ac_cxx_preproc_warn_flag
19907   else
19908     ac_cpp_err=
19909   fi
19910 else
19911   ac_cpp_err=yes
19912 fi
19913 if test -z "$ac_cpp_err"; then
19914   # Broken: success on invalid input.
19915 continue
19916 else
19917   echo "$as_me: failed program was:" >&5
19918   cat conftest.$ac_ext >&5
19919   # Passes both tests.
19920 ac_preproc_ok=:
19921 break
19922 fi
19923 rm -f conftest.err conftest.$ac_ext
19924
19925 done
19926 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19927 rm -f conftest.err conftest.$ac_ext
19928 if $ac_preproc_ok; then
19929   :
19930 else
19931   { { echo "$as_me:19931: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19932 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19933    { (exit 1); exit 1; }; }
19934 fi
19935
19936 ac_ext=cc
19937 ac_cpp='$CXXCPP $CPPFLAGS'
19938 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19939 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19940 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19941 ac_main_return=return
19942
19943 for ac_header in typeinfo
19944 do
19945 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19946 echo "$as_me:19946: checking for $ac_header" >&5
19947 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19948 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19949   echo $ECHO_N "(cached) $ECHO_C" >&6
19950 else
19951   cat >conftest.$ac_ext <<_ACEOF
19952 #line 19952 "configure"
19953 #include "confdefs.h"
19954 #include <$ac_header>
19955 _ACEOF
19956 if { (eval echo "$as_me:19956: \"$ac_cpp conftest.$ac_ext\"") >&5
19957   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19958   ac_status=$?
19959   egrep -v '^ *\+' conftest.er1 >conftest.err
19960   rm -f conftest.er1
19961   cat conftest.err >&5
19962   echo "$as_me:19962: \$? = $ac_status" >&5
19963   (exit $ac_status); } >/dev/null; then
19964   if test -s conftest.err; then
19965     ac_cpp_err=$ac_cxx_preproc_warn_flag
19966   else
19967     ac_cpp_err=
19968   fi
19969 else
19970   ac_cpp_err=yes
19971 fi
19972 if test -z "$ac_cpp_err"; then
19973   eval "$as_ac_Header=yes"
19974 else
19975   echo "$as_me: failed program was:" >&5
19976   cat conftest.$ac_ext >&5
19977   eval "$as_ac_Header=no"
19978 fi
19979 rm -f conftest.err conftest.$ac_ext
19980 fi
19981 echo "$as_me:19981: result: `eval echo '${'$as_ac_Header'}'`" >&5
19982 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19983 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19984   cat >>confdefs.h <<EOF
19985 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19986 EOF
19987
19988 fi
19989 done
19990
19991 for ac_header in iostream
19992 do
19993 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19994 echo "$as_me:19994: checking for $ac_header" >&5
19995 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19996 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19997   echo $ECHO_N "(cached) $ECHO_C" >&6
19998 else
19999   cat >conftest.$ac_ext <<_ACEOF
20000 #line 20000 "configure"
20001 #include "confdefs.h"
20002 #include <$ac_header>
20003 _ACEOF
20004 if { (eval echo "$as_me:20004: \"$ac_cpp conftest.$ac_ext\"") >&5
20005   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20006   ac_status=$?
20007   egrep -v '^ *\+' conftest.er1 >conftest.err
20008   rm -f conftest.er1
20009   cat conftest.err >&5
20010   echo "$as_me:20010: \$? = $ac_status" >&5
20011   (exit $ac_status); } >/dev/null; then
20012   if test -s conftest.err; then
20013     ac_cpp_err=$ac_cxx_preproc_warn_flag
20014   else
20015     ac_cpp_err=
20016   fi
20017 else
20018   ac_cpp_err=yes
20019 fi
20020 if test -z "$ac_cpp_err"; then
20021   eval "$as_ac_Header=yes"
20022 else
20023   echo "$as_me: failed program was:" >&5
20024   cat conftest.$ac_ext >&5
20025   eval "$as_ac_Header=no"
20026 fi
20027 rm -f conftest.err conftest.$ac_ext
20028 fi
20029 echo "$as_me:20029: result: `eval echo '${'$as_ac_Header'}'`" >&5
20030 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20031 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20032   cat >>confdefs.h <<EOF
20033 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20034 EOF
20035
20036 fi
20037 done
20038
20039 if test x"$ac_cv_header_iostream" = xyes ; then
20040         echo "$as_me:20040: checking if iostream uses std-namespace" >&5
20041 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
20042         cat >conftest.$ac_ext <<_ACEOF
20043 #line 20043 "configure"
20044 #include "confdefs.h"
20045
20046 #include <iostream>
20047 using std::endl;
20048 using std::cerr;
20049 int
20050 main ()
20051 {
20052
20053 cerr << "testing" << endl;
20054
20055   ;
20056   return 0;
20057 }
20058 _ACEOF
20059 rm -f conftest.$ac_objext
20060 if { (eval echo "$as_me:20060: \"$ac_compile\"") >&5
20061   (eval $ac_compile) 2>&5
20062   ac_status=$?
20063   echo "$as_me:20063: \$? = $ac_status" >&5
20064   (exit $ac_status); } &&
20065          { ac_try='test -s conftest.$ac_objext'
20066   { (eval echo "$as_me:20066: \"$ac_try\"") >&5
20067   (eval $ac_try) 2>&5
20068   ac_status=$?
20069   echo "$as_me:20069: \$? = $ac_status" >&5
20070   (exit $ac_status); }; }; then
20071   cf_iostream_namespace=yes
20072 else
20073   echo "$as_me: failed program was:" >&5
20074 cat conftest.$ac_ext >&5
20075 cf_iostream_namespace=no
20076 fi
20077 rm -f conftest.$ac_objext conftest.$ac_ext
20078         echo "$as_me:20078: result: $cf_iostream_namespace" >&5
20079 echo "${ECHO_T}$cf_iostream_namespace" >&6
20080         if test "$cf_iostream_namespace" = yes ; then
20081
20082 cat >>confdefs.h <<\EOF
20083 #define IOSTREAM_NAMESPACE 1
20084 EOF
20085
20086         fi
20087 fi
20088
20089 echo "$as_me:20089: checking if we should include stdbool.h" >&5
20090 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
20091
20092 if test "${cf_cv_header_stdbool_h+set}" = set; then
20093   echo $ECHO_N "(cached) $ECHO_C" >&6
20094 else
20095
20096         cat >conftest.$ac_ext <<_ACEOF
20097 #line 20097 "configure"
20098 #include "confdefs.h"
20099
20100 int
20101 main ()
20102 {
20103 bool foo = false
20104   ;
20105   return 0;
20106 }
20107 _ACEOF
20108 rm -f conftest.$ac_objext
20109 if { (eval echo "$as_me:20109: \"$ac_compile\"") >&5
20110   (eval $ac_compile) 2>&5
20111   ac_status=$?
20112   echo "$as_me:20112: \$? = $ac_status" >&5
20113   (exit $ac_status); } &&
20114          { ac_try='test -s conftest.$ac_objext'
20115   { (eval echo "$as_me:20115: \"$ac_try\"") >&5
20116   (eval $ac_try) 2>&5
20117   ac_status=$?
20118   echo "$as_me:20118: \$? = $ac_status" >&5
20119   (exit $ac_status); }; }; then
20120   cf_cv_header_stdbool_h=0
20121 else
20122   echo "$as_me: failed program was:" >&5
20123 cat conftest.$ac_ext >&5
20124 cat >conftest.$ac_ext <<_ACEOF
20125 #line 20125 "configure"
20126 #include "confdefs.h"
20127
20128 #ifndef __BEOS__
20129 #include <stdbool.h>
20130 #endif
20131
20132 int
20133 main ()
20134 {
20135 bool foo = false
20136   ;
20137   return 0;
20138 }
20139 _ACEOF
20140 rm -f conftest.$ac_objext
20141 if { (eval echo "$as_me:20141: \"$ac_compile\"") >&5
20142   (eval $ac_compile) 2>&5
20143   ac_status=$?
20144   echo "$as_me:20144: \$? = $ac_status" >&5
20145   (exit $ac_status); } &&
20146          { ac_try='test -s conftest.$ac_objext'
20147   { (eval echo "$as_me:20147: \"$ac_try\"") >&5
20148   (eval $ac_try) 2>&5
20149   ac_status=$?
20150   echo "$as_me:20150: \$? = $ac_status" >&5
20151   (exit $ac_status); }; }; then
20152   cf_cv_header_stdbool_h=1
20153 else
20154   echo "$as_me: failed program was:" >&5
20155 cat conftest.$ac_ext >&5
20156 cf_cv_header_stdbool_h=0
20157 fi
20158 rm -f conftest.$ac_objext conftest.$ac_ext
20159 fi
20160 rm -f conftest.$ac_objext conftest.$ac_ext
20161 fi
20162
20163 if test "$cf_cv_header_stdbool_h" = 1
20164 then    echo "$as_me:20164: result: yes" >&5
20165 echo "${ECHO_T}yes" >&6
20166 else    echo "$as_me:20166: result: no" >&5
20167 echo "${ECHO_T}no" >&6
20168 fi
20169
20170 echo "$as_me:20170: checking for builtin bool type" >&5
20171 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20172
20173 if test "${cf_cv_builtin_bool+set}" = set; then
20174   echo $ECHO_N "(cached) $ECHO_C" >&6
20175 else
20176
20177         cat >conftest.$ac_ext <<_ACEOF
20178 #line 20178 "configure"
20179 #include "confdefs.h"
20180
20181 #include <stdio.h>
20182 #include <sys/types.h>
20183
20184 int
20185 main ()
20186 {
20187 bool x = false
20188   ;
20189   return 0;
20190 }
20191 _ACEOF
20192 rm -f conftest.$ac_objext
20193 if { (eval echo "$as_me:20193: \"$ac_compile\"") >&5
20194   (eval $ac_compile) 2>&5
20195   ac_status=$?
20196   echo "$as_me:20196: \$? = $ac_status" >&5
20197   (exit $ac_status); } &&
20198          { ac_try='test -s conftest.$ac_objext'
20199   { (eval echo "$as_me:20199: \"$ac_try\"") >&5
20200   (eval $ac_try) 2>&5
20201   ac_status=$?
20202   echo "$as_me:20202: \$? = $ac_status" >&5
20203   (exit $ac_status); }; }; then
20204   cf_cv_builtin_bool=1
20205 else
20206   echo "$as_me: failed program was:" >&5
20207 cat conftest.$ac_ext >&5
20208 cf_cv_builtin_bool=0
20209 fi
20210 rm -f conftest.$ac_objext conftest.$ac_ext
20211
20212 fi
20213
20214 if test "$cf_cv_builtin_bool" = 1
20215 then    echo "$as_me:20215: result: yes" >&5
20216 echo "${ECHO_T}yes" >&6
20217 else    echo "$as_me:20217: result: no" >&5
20218 echo "${ECHO_T}no" >&6
20219 fi
20220
20221 echo "$as_me:20221: checking for size of bool" >&5
20222 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20223 if test "${cf_cv_type_of_bool+set}" = set; then
20224   echo $ECHO_N "(cached) $ECHO_C" >&6
20225 else
20226
20227         rm -f cf_test.out
20228         if test "$cross_compiling" = yes; then
20229   cf_cv_type_of_bool=unknown
20230 else
20231   cat >conftest.$ac_ext <<_ACEOF
20232 #line 20232 "configure"
20233 #include "confdefs.h"
20234
20235 #include <stdlib.h>
20236 #include <stdio.h>
20237
20238 #if defined(__cplusplus)
20239
20240 #ifdef HAVE_GXX_BUILTIN_H
20241 #include <g++/builtin.h>
20242 #elif HAVE_GPP_BUILTIN_H
20243 #include <gpp/builtin.h>
20244 #elif HAVE_BUILTIN_H
20245 #include <builtin.h>
20246 #endif
20247
20248 #else
20249
20250 #if $cf_cv_header_stdbool_h
20251 #include <stdbool.h>
20252 #endif
20253
20254 #endif
20255
20256 int main()
20257 {
20258         FILE *fp = fopen("cf_test.out", "w");
20259         if (fp != 0) {
20260                 bool x = true;
20261                 if ((bool)(-x) >= 0)
20262                         fputs("unsigned ", fp);
20263                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20264                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20265                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20266                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20267                 fclose(fp);
20268         }
20269         ${cf_cv_main_return:-return}(0);
20270 }
20271
20272 _ACEOF
20273 rm -f conftest$ac_exeext
20274 if { (eval echo "$as_me:20274: \"$ac_link\"") >&5
20275   (eval $ac_link) 2>&5
20276   ac_status=$?
20277   echo "$as_me:20277: \$? = $ac_status" >&5
20278   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20279   { (eval echo "$as_me:20279: \"$ac_try\"") >&5
20280   (eval $ac_try) 2>&5
20281   ac_status=$?
20282   echo "$as_me:20282: \$? = $ac_status" >&5
20283   (exit $ac_status); }; }; then
20284   cf_cv_type_of_bool=`cat cf_test.out`
20285                  if test -z "$cf_cv_type_of_bool"; then
20286                    cf_cv_type_of_bool=unknown
20287                  fi
20288 else
20289   echo "$as_me: program exited with status $ac_status" >&5
20290 echo "$as_me: failed program was:" >&5
20291 cat conftest.$ac_ext >&5
20292 cf_cv_type_of_bool=unknown
20293 fi
20294 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20295 fi
20296
20297 fi
20298
20299         rm -f cf_test.out
20300 echo "$as_me:20300: result: $cf_cv_type_of_bool" >&5
20301 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20302 if test "$cf_cv_type_of_bool" = unknown ; then
20303         case .$NCURSES_BOOL in
20304         (.auto|.) NCURSES_BOOL=unsigned;;
20305         esac
20306         { echo "$as_me:20306: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20307 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20308         cf_cv_type_of_bool=$NCURSES_BOOL
20309 fi
20310
20311 echo "$as_me:20311: checking for special defines needed for etip.h" >&5
20312 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20313 cf_save_CXXFLAGS="$CXXFLAGS"
20314 cf_result="none"
20315
20316 # etip.h includes ncurses.h which includes ncurses_dll.h
20317 # But ncurses_dll.h is generated - fix here.
20318 test -d include || mkdir include
20319 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
20320
20321 for cf_math in "" MATH_H
20322 do
20323 for cf_excp in "" MATH_EXCEPTION
20324 do
20325         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20326         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20327         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20328 cat >conftest.$ac_ext <<_ACEOF
20329 #line 20329 "configure"
20330 #include "confdefs.h"
20331
20332 #include <etip.h.in>
20333
20334 int
20335 main ()
20336 {
20337
20338   ;
20339   return 0;
20340 }
20341 _ACEOF
20342 rm -f conftest.$ac_objext
20343 if { (eval echo "$as_me:20343: \"$ac_compile\"") >&5
20344   (eval $ac_compile) 2>&5
20345   ac_status=$?
20346   echo "$as_me:20346: \$? = $ac_status" >&5
20347   (exit $ac_status); } &&
20348          { ac_try='test -s conftest.$ac_objext'
20349   { (eval echo "$as_me:20349: \"$ac_try\"") >&5
20350   (eval $ac_try) 2>&5
20351   ac_status=$?
20352   echo "$as_me:20352: \$? = $ac_status" >&5
20353   (exit $ac_status); }; }; then
20354
20355         test -n "$cf_math" && cat >>confdefs.h <<EOF
20356 #define ETIP_NEEDS_${cf_math} 1
20357 EOF
20358
20359         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20360 #define ETIP_NEEDS_${cf_excp} 1
20361 EOF
20362
20363         cf_result="$cf_math $cf_excp"
20364         break 2
20365
20366 else
20367   echo "$as_me: failed program was:" >&5
20368 cat conftest.$ac_ext >&5
20369 fi
20370 rm -f conftest.$ac_objext conftest.$ac_ext
20371 done
20372 done
20373 echo "$as_me:20373: result: $cf_result" >&5
20374 echo "${ECHO_T}$cf_result" >&6
20375 CXXFLAGS="$cf_save_CXXFLAGS"
20376
20377 if test -n "$CXX"; then
20378 echo "$as_me:20378: checking if $CXX accepts parameter initialization" >&5
20379 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20380 if test "${cf_cv_cpp_param_init+set}" = set; then
20381   echo $ECHO_N "(cached) $ECHO_C" >&6
20382 else
20383
20384         ac_ext=cc
20385 ac_cpp='$CXXCPP $CPPFLAGS'
20386 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20387 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20388 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20389 ac_main_return=return
20390
20391         if test "$cross_compiling" = yes; then
20392   cf_cv_cpp_param_init=unknown
20393 else
20394   cat >conftest.$ac_ext <<_ACEOF
20395 #line 20395 "configure"
20396 #include "confdefs.h"
20397
20398 class TEST {
20399 private:
20400         int value;
20401 public:
20402         TEST(int x = 1);
20403         ~TEST();
20404 };
20405
20406 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20407 {
20408         value = x;
20409 }
20410 int main() { }
20411
20412 _ACEOF
20413 rm -f conftest$ac_exeext
20414 if { (eval echo "$as_me:20414: \"$ac_link\"") >&5
20415   (eval $ac_link) 2>&5
20416   ac_status=$?
20417   echo "$as_me:20417: \$? = $ac_status" >&5
20418   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20419   { (eval echo "$as_me:20419: \"$ac_try\"") >&5
20420   (eval $ac_try) 2>&5
20421   ac_status=$?
20422   echo "$as_me:20422: \$? = $ac_status" >&5
20423   (exit $ac_status); }; }; then
20424   cf_cv_cpp_param_init=yes
20425 else
20426   echo "$as_me: program exited with status $ac_status" >&5
20427 echo "$as_me: failed program was:" >&5
20428 cat conftest.$ac_ext >&5
20429 cf_cv_cpp_param_init=no
20430 fi
20431 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20432 fi
20433         ac_ext=cc
20434 ac_cpp='$CXXCPP $CPPFLAGS'
20435 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20436 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20437 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20438 ac_main_return=return
20439
20440 fi
20441 echo "$as_me:20441: result: $cf_cv_cpp_param_init" >&5
20442 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20443 fi
20444 test "$cf_cv_cpp_param_init" = yes &&
20445 cat >>confdefs.h <<\EOF
20446 #define CPP_HAS_PARAM_INIT 1
20447 EOF
20448
20449 if test -n "$CXX"; then
20450
20451 echo "$as_me:20451: checking if $CXX accepts static_cast" >&5
20452 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20453 if test "${cf_cv_cpp_static_cast+set}" = set; then
20454   echo $ECHO_N "(cached) $ECHO_C" >&6
20455 else
20456
20457         ac_ext=cc
20458 ac_cpp='$CXXCPP $CPPFLAGS'
20459 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20460 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20461 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20462 ac_main_return=return
20463
20464         cat >conftest.$ac_ext <<_ACEOF
20465 #line 20465 "configure"
20466 #include "confdefs.h"
20467
20468 class NCursesPanel
20469 {
20470 public:
20471   NCursesPanel(int nlines,
20472                int ncols,
20473                int begin_y = 0,
20474                int begin_x = 0)
20475   {
20476   }
20477   NCursesPanel();
20478   ~NCursesPanel();
20479 };
20480
20481 template<class T> class NCursesUserPanel : public NCursesPanel
20482 {
20483 public:
20484   NCursesUserPanel (int nlines,
20485                     int ncols,
20486                     int begin_y = 0,
20487                     int begin_x = 0,
20488                     const T* p_UserData = static_cast<T*>(0))
20489     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20490   {
20491   };
20492   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20493   {
20494   };
20495
20496   virtual ~NCursesUserPanel() {};
20497 };
20498
20499 int
20500 main ()
20501 {
20502
20503         const char* p_UserData = static_cast<char*>(0)
20504   ;
20505   return 0;
20506 }
20507 _ACEOF
20508 rm -f conftest.$ac_objext
20509 if { (eval echo "$as_me:20509: \"$ac_compile\"") >&5
20510   (eval $ac_compile) 2>&5
20511   ac_status=$?
20512   echo "$as_me:20512: \$? = $ac_status" >&5
20513   (exit $ac_status); } &&
20514          { ac_try='test -s conftest.$ac_objext'
20515   { (eval echo "$as_me:20515: \"$ac_try\"") >&5
20516   (eval $ac_try) 2>&5
20517   ac_status=$?
20518   echo "$as_me:20518: \$? = $ac_status" >&5
20519   (exit $ac_status); }; }; then
20520   cf_cv_cpp_static_cast=yes
20521 else
20522   echo "$as_me: failed program was:" >&5
20523 cat conftest.$ac_ext >&5
20524 cf_cv_cpp_static_cast=no
20525 fi
20526 rm -f conftest.$ac_objext conftest.$ac_ext
20527
20528         ac_ext=cc
20529 ac_cpp='$CXXCPP $CPPFLAGS'
20530 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20531 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20532 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20533 ac_main_return=return
20534
20535 fi
20536 echo "$as_me:20536: result: $cf_cv_cpp_static_cast" >&5
20537 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20538
20539 fi
20540
20541 test "$cf_cv_cpp_static_cast" = yes &&
20542 cat >>confdefs.h <<\EOF
20543 #define CPP_HAS_STATIC_CAST 1
20544 EOF
20545
20546         CXX_AR='$(AR)'
20547         CXX_ARFLAGS='$(ARFLAGS)'
20548         case $cf_cv_system_name in
20549         (irix*)
20550             if test "$GXX" != yes ; then
20551                 CXX_AR='$(CXX)'
20552                 CXX_ARFLAGS='-ar -o'
20553             fi
20554             ;;
20555         (sco3.2v5*)
20556             CXXLDFLAGS="-u main"
20557             ;;
20558         (solaris2*)
20559             if test "$GXX" != yes ; then
20560                 CXX_AR='$(CXX)'
20561                 CXX_ARFLAGS='-xar -o'
20562             fi
20563             ;;
20564         esac
20565
20566 else
20567         cf_cxx_library=no
20568         cf_cv_builtin_bool=1
20569
20570         # Just because we are not configuring against C++ right now does not
20571         # mean that a user will not want to use C++.  Some distributors disable
20572         # the C++ portion of this configuration as a shortcut (or just to avoid
20573         # compiling the demo in the c++ directory).  So we need a reasonable
20574         # default for the 'bool' type.
20575         #
20576         # Caveat: since the storage of the bool type is not standardized, it
20577         # may change.
20578
20579         if test "$NCURSES_BOOL" != auto ; then
20580                 cf_cv_type_of_bool=$NCURSES_BOOL
20581                 cf_cv_header_stdbool_h=0
20582         else
20583                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20584
20585 echo "$as_me:20585: checking for size of bool" >&5
20586 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20587 if test "${cf_cv_type_of_bool+set}" = set; then
20588   echo $ECHO_N "(cached) $ECHO_C" >&6
20589 else
20590
20591         rm -f cf_test.out
20592         if test "$cross_compiling" = yes; then
20593   cf_cv_type_of_bool=unknown
20594 else
20595   cat >conftest.$ac_ext <<_ACEOF
20596 #line 20596 "configure"
20597 #include "confdefs.h"
20598
20599 #include <stdlib.h>
20600 #include <stdio.h>
20601
20602 #if defined(__cplusplus)
20603
20604 #ifdef HAVE_GXX_BUILTIN_H
20605 #include <g++/builtin.h>
20606 #elif HAVE_GPP_BUILTIN_H
20607 #include <gpp/builtin.h>
20608 #elif HAVE_BUILTIN_H
20609 #include <builtin.h>
20610 #endif
20611
20612 #else
20613
20614 #if $cf_cv_header_stdbool_h
20615 #include <stdbool.h>
20616 #endif
20617
20618 #endif
20619
20620 int main()
20621 {
20622         FILE *fp = fopen("cf_test.out", "w");
20623         if (fp != 0) {
20624                 bool x = true;
20625                 if ((bool)(-x) >= 0)
20626                         fputs("unsigned ", fp);
20627                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20628                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20629                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20630                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20631                 fclose(fp);
20632         }
20633         ${cf_cv_main_return:-return}(0);
20634 }
20635
20636 _ACEOF
20637 rm -f conftest$ac_exeext
20638 if { (eval echo "$as_me:20638: \"$ac_link\"") >&5
20639   (eval $ac_link) 2>&5
20640   ac_status=$?
20641   echo "$as_me:20641: \$? = $ac_status" >&5
20642   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20643   { (eval echo "$as_me:20643: \"$ac_try\"") >&5
20644   (eval $ac_try) 2>&5
20645   ac_status=$?
20646   echo "$as_me:20646: \$? = $ac_status" >&5
20647   (exit $ac_status); }; }; then
20648   cf_cv_type_of_bool=`cat cf_test.out`
20649                  if test -z "$cf_cv_type_of_bool"; then
20650                    cf_cv_type_of_bool=unknown
20651                  fi
20652 else
20653   echo "$as_me: program exited with status $ac_status" >&5
20654 echo "$as_me: failed program was:" >&5
20655 cat conftest.$ac_ext >&5
20656 cf_cv_type_of_bool=unknown
20657 fi
20658 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20659 fi
20660
20661 fi
20662
20663         rm -f cf_test.out
20664 echo "$as_me:20664: result: $cf_cv_type_of_bool" >&5
20665 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20666 if test "$cf_cv_type_of_bool" = unknown ; then
20667         case .$NCURSES_BOOL in
20668         (.auto|.) NCURSES_BOOL=unsigned;;
20669         esac
20670         { echo "$as_me:20670: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20671 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20672         cf_cv_type_of_bool=$NCURSES_BOOL
20673 fi
20674
20675                 else
20676                         echo "$as_me:20676: checking for fallback type of bool" >&5
20677 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20678                         case "$host_cpu" in
20679                         (i?86)  cf_cv_type_of_bool=char ;;
20680                         (*)     cf_cv_type_of_bool=int  ;;
20681                         esac
20682                         echo "$as_me:20682: result: $cf_cv_type_of_bool" >&5
20683 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20684                 fi
20685         fi
20686 fi
20687
20688 # If the C compiler did not declare bool, and we did not determine that the C++
20689 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20690 # ncurses library use the same type as C++ bool.  Note that this allows one to
20691 # specify the type of bool in a configure-script option and postpone
20692 # integration with the C++ compiler provided that the types are compatible.
20693 USE_CXX_BOOL=1
20694 if test $cf_cv_cc_bool_type = 1
20695 then
20696         # oops: C has a bool.  Unlikely, but C++ could differ.
20697         USE_CXX_BOOL=0
20698 elif test $cf_cv_builtin_bool = 0
20699 then
20700         # C++ has no bool
20701         USE_CXX_BOOL=0
20702 else
20703         # this is the normal case
20704         USE_CXX_BOOL='defined(__cplusplus)'
20705 fi
20706
20707 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20708
20709         if test "$cf_with_ada" != "no" ; then
20710                 if test "$with_libtool" != "no"; then
20711                         { echo "$as_me:20711: WARNING: libtool does not support Ada - disabling feature" >&5
20712 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20713                         cf_with_ada=no
20714                 fi
20715         fi
20716
20717         if test "$cf_with_ada" != "no" ; then
20718
20719 cf_ada_make=gnatmake
20720 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20721 set dummy $cf_ada_make; ac_word=$2
20722 echo "$as_me:20722: checking for $ac_word" >&5
20723 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20724 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20725   echo $ECHO_N "(cached) $ECHO_C" >&6
20726 else
20727   if test -n "$gnat_exists"; then
20728   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20729 else
20730   ac_save_IFS=$IFS; IFS=$ac_path_separator
20731 ac_dummy="$PATH"
20732 for ac_dir in $ac_dummy; do
20733   IFS=$ac_save_IFS
20734   test -z "$ac_dir" && ac_dir=.
20735   $as_executable_p "$ac_dir/$ac_word" || continue
20736 ac_cv_prog_gnat_exists="yes"
20737 echo "$as_me:20737: found $ac_dir/$ac_word" >&5
20738 break
20739 done
20740
20741   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20742 fi
20743 fi
20744 gnat_exists=$ac_cv_prog_gnat_exists
20745 if test -n "$gnat_exists"; then
20746   echo "$as_me:20746: result: $gnat_exists" >&5
20747 echo "${ECHO_T}$gnat_exists" >&6
20748 else
20749   echo "$as_me:20749: result: no" >&5
20750 echo "${ECHO_T}no" >&6
20751 fi
20752
20753 if test "$ac_cv_prog_gnat_exists" = no; then
20754         cf_ada_make=
20755         cf_cv_prog_gnat_correct=no
20756 else
20757
20758 echo "$as_me:20758: checking for gnat version" >&5
20759 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20760 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20761         grep '[0-9].[0-9][0-9]*' |\
20762         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20763 echo "$as_me:20763: result: $cf_gnat_version" >&5
20764 echo "${ECHO_T}$cf_gnat_version" >&6
20765
20766 case $cf_gnat_version in
20767 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20768         cf_cv_prog_gnat_correct=yes
20769         ;;
20770 (*)
20771         { echo "$as_me:20771: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20772 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20773         cf_cv_prog_gnat_correct=no
20774         ;;
20775 esac
20776
20777         # Extract the first word of "m4", so it can be a program name with args.
20778 set dummy m4; ac_word=$2
20779 echo "$as_me:20779: checking for $ac_word" >&5
20780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20781 if test "${ac_cv_prog_M4_exists+set}" = set; then
20782   echo $ECHO_N "(cached) $ECHO_C" >&6
20783 else
20784   if test -n "$M4_exists"; then
20785   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20786 else
20787   ac_save_IFS=$IFS; IFS=$ac_path_separator
20788 ac_dummy="$PATH"
20789 for ac_dir in $ac_dummy; do
20790   IFS=$ac_save_IFS
20791   test -z "$ac_dir" && ac_dir=.
20792   $as_executable_p "$ac_dir/$ac_word" || continue
20793 ac_cv_prog_M4_exists="yes"
20794 echo "$as_me:20794: found $ac_dir/$ac_word" >&5
20795 break
20796 done
20797
20798   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20799 fi
20800 fi
20801 M4_exists=$ac_cv_prog_M4_exists
20802 if test -n "$M4_exists"; then
20803   echo "$as_me:20803: result: $M4_exists" >&5
20804 echo "${ECHO_T}$M4_exists" >&6
20805 else
20806   echo "$as_me:20806: result: no" >&5
20807 echo "${ECHO_T}no" >&6
20808 fi
20809
20810         if test "$ac_cv_prog_M4_exists" = no; then
20811                 cf_cv_prog_gnat_correct=no
20812                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20813         fi
20814         if test "$cf_cv_prog_gnat_correct" = yes; then
20815                 echo "$as_me:20815: checking if GNAT works" >&5
20816 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20817
20818 rm -rf conftest* *~conftest*
20819 cat >>conftest.ads <<CF_EOF
20820 procedure conftest;
20821 CF_EOF
20822 cat >>conftest.adb <<CF_EOF
20823 with Text_IO;
20824 with GNAT.OS_Lib;
20825 procedure conftest is
20826 begin
20827    Text_IO.Put ("Hello World");
20828    Text_IO.New_Line;
20829    GNAT.OS_Lib.OS_Exit (0);
20830 end conftest;
20831 CF_EOF
20832 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20833    if ( ./conftest 1>&5 2>&1 ) ; then
20834       cf_cv_prog_gnat_correct=yes
20835    else
20836       cf_cv_prog_gnat_correct=no
20837    fi
20838 else
20839    cf_cv_prog_gnat_correct=no
20840 fi
20841 rm -rf conftest* *~conftest*
20842
20843                 echo "$as_me:20843: result: $cf_cv_prog_gnat_correct" >&5
20844 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20845         fi
20846 fi
20847
20848                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20849
20850         ADAFLAGS="$ADAFLAGS -gnatpn"
20851
20852         echo "$as_me:20852: checking optimization options for ADAFLAGS" >&5
20853 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20854         case "$CFLAGS" in
20855         (*-g*)
20856
20857         ADAFLAGS="$ADAFLAGS -g"
20858
20859                 ;;
20860         esac
20861         case "$CFLAGS" in
20862         (*-O*)
20863                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20864
20865         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20866
20867                 ;;
20868         esac
20869         echo "$as_me:20869: result: $ADAFLAGS" >&5
20870 echo "${ECHO_T}$ADAFLAGS" >&6
20871
20872 echo "$as_me:20872: checking if GNATPREP supports -T option" >&5
20873 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20874 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20875   echo $ECHO_N "(cached) $ECHO_C" >&6
20876 else
20877
20878 cf_cv_gnatprep_opt_t=no
20879 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20880
20881 fi
20882 echo "$as_me:20882: result: $cf_cv_gnatprep_opt_t" >&5
20883 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20884 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20885
20886 echo "$as_me:20886: checking if GNAT supports generics" >&5
20887 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20888 case $cf_gnat_version in
20889 (3.[1-9]*|[4-9].*)
20890         cf_gnat_generics=yes
20891         ;;
20892 (*)
20893         cf_gnat_generics=no
20894         ;;
20895 esac
20896 echo "$as_me:20896: result: $cf_gnat_generics" >&5
20897 echo "${ECHO_T}$cf_gnat_generics" >&6
20898
20899 if test "$cf_gnat_generics" = yes
20900 then
20901         cf_compile_generics=generics
20902         cf_generic_objects="\${GENOBJS}"
20903 else
20904         cf_compile_generics=
20905         cf_generic_objects=
20906 fi
20907
20908 echo "$as_me:20908: checking if GNAT supports SIGINT" >&5
20909 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20910 if test "${cf_cv_gnat_sigint+set}" = set; then
20911   echo $ECHO_N "(cached) $ECHO_C" >&6
20912 else
20913
20914 rm -rf conftest* *~conftest*
20915 cat >>conftest.ads <<CF_EOF
20916 with Ada.Interrupts.Names;
20917
20918 package ConfTest is
20919
20920    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20921    pragma Unreserve_All_Interrupts;
20922    pragma Warnings (On);
20923
20924    protected Process is
20925       procedure Stop;
20926       function Continue return Boolean;
20927       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20928    private
20929       Done : Boolean := False;
20930    end Process;
20931
20932 end ConfTest;
20933 CF_EOF
20934 cat >>conftest.adb <<CF_EOF
20935 package body ConfTest is
20936    protected body Process is
20937       procedure Stop is
20938       begin
20939          Done := True;
20940       end Stop;
20941       function Continue return Boolean is
20942       begin
20943          return not Done;
20944       end Continue;
20945    end Process;
20946 end ConfTest;
20947 CF_EOF
20948 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20949       cf_cv_gnat_sigint=yes
20950 else
20951    cf_cv_gnat_sigint=no
20952 fi
20953 rm -rf conftest* *~conftest*
20954
20955 fi
20956 echo "$as_me:20956: result: $cf_cv_gnat_sigint" >&5
20957 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20958
20959 if test $cf_cv_gnat_sigint = yes ; then
20960         USE_GNAT_SIGINT=""
20961 else
20962         USE_GNAT_SIGINT="#"
20963 fi
20964
20965 cf_gnat_libraries=no
20966 cf_gnat_projects=no
20967
20968 if test "$enable_gnat_projects" != no ; then
20969 echo "$as_me:20969: checking if GNAT supports project files" >&5
20970 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20971 case $cf_gnat_version in
20972 (3.[0-9]*)
20973         ;;
20974 (*)
20975         case $cf_cv_system_name in
20976         (cygwin*|msys*)
20977                 ;;
20978         (*)
20979                 mkdir conftest.src conftest.bin conftest.lib
20980                 cd conftest.src
20981                 rm -rf conftest* *~conftest*
20982                 cat >>library.gpr <<CF_EOF
20983 project Library is
20984   Kind := External ("LIB_KIND");
20985   for Library_Name use "ConfTest";
20986   for Object_Dir use ".";
20987   for Library_ALI_Dir use External("LIBRARY_DIR");
20988   for Library_Version use External ("SONAME");
20989   for Library_Kind use Kind;
20990   for Library_Dir use External("BUILD_DIR");
20991   Source_Dir := External ("SOURCE_DIR");
20992   for Source_Dirs use (Source_Dir);
20993 end Library;
20994 CF_EOF
20995                 cat >>confpackage.ads <<CF_EOF
20996 package ConfPackage is
20997    procedure conftest;
20998 end ConfPackage;
20999 CF_EOF
21000                 cat >>confpackage.adb <<CF_EOF
21001 with Text_IO;
21002 package body ConfPackage is
21003    procedure conftest is
21004    begin
21005       Text_IO.Put ("Hello World");
21006       Text_IO.New_Line;
21007    end conftest;
21008 end ConfPackage;
21009 CF_EOF
21010                 if ( $cf_ada_make $ADAFLAGS \
21011                                 -Plibrary.gpr \
21012                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
21013                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
21014                                 -XSOURCE_DIR=`pwd` \
21015                                 -XSONAME=libConfTest.so.1 \
21016                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
21017                         cf_gnat_projects=yes
21018                 fi
21019                 cd ..
21020                 if test -f conftest.lib/confpackage.ali
21021                 then
21022                         cf_gnat_libraries=yes
21023                 fi
21024                 rm -rf conftest* *~conftest*
21025                 ;;
21026         esac
21027         ;;
21028 esac
21029 echo "$as_me:21029: result: $cf_gnat_projects" >&5
21030 echo "${ECHO_T}$cf_gnat_projects" >&6
21031 fi # enable_gnat_projects
21032
21033 if test $cf_gnat_projects = yes
21034 then
21035         echo "$as_me:21035: checking if GNAT supports libraries" >&5
21036 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
21037         echo "$as_me:21037: result: $cf_gnat_libraries" >&5
21038 echo "${ECHO_T}$cf_gnat_libraries" >&6
21039 fi
21040
21041 if test "$cf_gnat_projects" = yes
21042 then
21043         USE_OLD_MAKERULES="#"
21044         USE_GNAT_PROJECTS=""
21045 else
21046         USE_OLD_MAKERULES=""
21047         USE_GNAT_PROJECTS="#"
21048 fi
21049
21050 if test "$cf_gnat_libraries" = yes
21051 then
21052         USE_GNAT_LIBRARIES=""
21053 else
21054         USE_GNAT_LIBRARIES="#"
21055 fi
21056
21057 echo "$as_me:21057: checking for ada-compiler" >&5
21058 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
21059
21060 # Check whether --with-ada-compiler or --without-ada-compiler was given.
21061 if test "${with_ada_compiler+set}" = set; then
21062   withval="$with_ada_compiler"
21063   cf_ada_compiler=$withval
21064 else
21065   cf_ada_compiler=gnatmake
21066 fi;
21067
21068 echo "$as_me:21068: result: $cf_ada_compiler" >&5
21069 echo "${ECHO_T}$cf_ada_compiler" >&6
21070
21071                         cf_ada_package=terminal_interface
21072
21073 echo "$as_me:21073: checking for ada-include" >&5
21074 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
21075
21076 # Check whether --with-ada-include or --without-ada-include was given.
21077 if test "${with_ada_include+set}" = set; then
21078   withval="$with_ada_include"
21079
21080 else
21081   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
21082 fi; if test -n "$prefix/share/ada/adainclude" ; then
21083
21084 if test "x$prefix" != xNONE; then
21085         cf_path_syntax="$prefix"
21086 else
21087         cf_path_syntax="$ac_default_prefix"
21088 fi
21089
21090 case ".$withval" in
21091 (.\$\(*\)*|.\'*\'*)
21092         ;;
21093 (..|./*|.\\*)
21094         ;;
21095 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21096         ;;
21097 (.\${*prefix}*|.\${*dir}*)
21098         eval withval="$withval"
21099         case ".$withval" in
21100         (.NONE/*)
21101                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21102                 ;;
21103         esac
21104         ;;
21105 (.no|.NONE/*)
21106         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21107         ;;
21108 (*)
21109         { { echo "$as_me:21109: error: expected a pathname, not \"$withval\"" >&5
21110 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21111    { (exit 1); exit 1; }; }
21112         ;;
21113 esac
21114
21115 fi
21116 eval ADA_INCLUDE="$withval"
21117
21118 echo "$as_me:21118: result: $ADA_INCLUDE" >&5
21119 echo "${ECHO_T}$ADA_INCLUDE" >&6
21120
21121 echo "$as_me:21121: checking for ada-objects" >&5
21122 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
21123
21124 # Check whether --with-ada-objects or --without-ada-objects was given.
21125 if test "${with_ada_objects+set}" = set; then
21126   withval="$with_ada_objects"
21127
21128 else
21129   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
21130 fi; if test -n "$prefix/lib/ada/adalib" ; then
21131
21132 if test "x$prefix" != xNONE; then
21133         cf_path_syntax="$prefix"
21134 else
21135         cf_path_syntax="$ac_default_prefix"
21136 fi
21137
21138 case ".$withval" in
21139 (.\$\(*\)*|.\'*\'*)
21140         ;;
21141 (..|./*|.\\*)
21142         ;;
21143 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
21144         ;;
21145 (.\${*prefix}*|.\${*dir}*)
21146         eval withval="$withval"
21147         case ".$withval" in
21148         (.NONE/*)
21149                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21150                 ;;
21151         esac
21152         ;;
21153 (.no|.NONE/*)
21154         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
21155         ;;
21156 (*)
21157         { { echo "$as_me:21157: error: expected a pathname, not \"$withval\"" >&5
21158 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21159    { (exit 1); exit 1; }; }
21160         ;;
21161 esac
21162
21163 fi
21164 eval ADA_OBJECTS="$withval"
21165
21166 echo "$as_me:21166: result: $ADA_OBJECTS" >&5
21167 echo "${ECHO_T}$ADA_OBJECTS" >&6
21168
21169 echo "$as_me:21169: checking if an Ada95 shared-library should be built" >&5
21170 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21171
21172 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21173 if test "${with_ada_sharedlib+set}" = set; then
21174   withval="$with_ada_sharedlib"
21175   with_ada_sharedlib=$withval
21176 else
21177   with_ada_sharedlib=no
21178 fi;
21179 echo "$as_me:21179: result: $with_ada_sharedlib" >&5
21180 echo "${ECHO_T}$with_ada_sharedlib" >&6
21181
21182 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21183 MAKE_ADA_SHAREDLIB="#"
21184
21185 if test "x$with_ada_sharedlib" != xno
21186 then
21187         MAKE_ADA_SHAREDLIB=
21188         if test "x$with_ada_sharedlib" != xyes
21189         then
21190                 ADA_SHAREDLIB="$with_ada_sharedlib"
21191         fi
21192 fi
21193
21194                 fi
21195         fi
21196 else
21197         cf_with_ada=no
21198 fi
21199
21200 # do this "late" to avoid conflict with header-checks
21201 if test "x$with_widec" = xyes ; then
21202         echo "$as_me:21202: checking for wchar_t" >&5
21203 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21204 if test "${ac_cv_type_wchar_t+set}" = set; then
21205   echo $ECHO_N "(cached) $ECHO_C" >&6
21206 else
21207   cat >conftest.$ac_ext <<_ACEOF
21208 #line 21208 "configure"
21209 #include "confdefs.h"
21210 $ac_includes_default
21211 int
21212 main ()
21213 {
21214 if ((wchar_t *) 0)
21215   return 0;
21216 if (sizeof (wchar_t))
21217   return 0;
21218   ;
21219   return 0;
21220 }
21221 _ACEOF
21222 rm -f conftest.$ac_objext
21223 if { (eval echo "$as_me:21223: \"$ac_compile\"") >&5
21224   (eval $ac_compile) 2>&5
21225   ac_status=$?
21226   echo "$as_me:21226: \$? = $ac_status" >&5
21227   (exit $ac_status); } &&
21228          { ac_try='test -s conftest.$ac_objext'
21229   { (eval echo "$as_me:21229: \"$ac_try\"") >&5
21230   (eval $ac_try) 2>&5
21231   ac_status=$?
21232   echo "$as_me:21232: \$? = $ac_status" >&5
21233   (exit $ac_status); }; }; then
21234   ac_cv_type_wchar_t=yes
21235 else
21236   echo "$as_me: failed program was:" >&5
21237 cat conftest.$ac_ext >&5
21238 ac_cv_type_wchar_t=no
21239 fi
21240 rm -f conftest.$ac_objext conftest.$ac_ext
21241 fi
21242 echo "$as_me:21242: result: $ac_cv_type_wchar_t" >&5
21243 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21244
21245 echo "$as_me:21245: checking size of wchar_t" >&5
21246 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21247 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21248   echo $ECHO_N "(cached) $ECHO_C" >&6
21249 else
21250   if test "$ac_cv_type_wchar_t" = yes; then
21251   if test "$cross_compiling" = yes; then
21252   # Depending upon the size, compute the lo and hi bounds.
21253 cat >conftest.$ac_ext <<_ACEOF
21254 #line 21254 "configure"
21255 #include "confdefs.h"
21256 $ac_includes_default
21257 int
21258 main ()
21259 {
21260 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21261   ;
21262   return 0;
21263 }
21264 _ACEOF
21265 rm -f conftest.$ac_objext
21266 if { (eval echo "$as_me:21266: \"$ac_compile\"") >&5
21267   (eval $ac_compile) 2>&5
21268   ac_status=$?
21269   echo "$as_me:21269: \$? = $ac_status" >&5
21270   (exit $ac_status); } &&
21271          { ac_try='test -s conftest.$ac_objext'
21272   { (eval echo "$as_me:21272: \"$ac_try\"") >&5
21273   (eval $ac_try) 2>&5
21274   ac_status=$?
21275   echo "$as_me:21275: \$? = $ac_status" >&5
21276   (exit $ac_status); }; }; then
21277   ac_lo=0 ac_mid=0
21278   while :; do
21279     cat >conftest.$ac_ext <<_ACEOF
21280 #line 21280 "configure"
21281 #include "confdefs.h"
21282 $ac_includes_default
21283 int
21284 main ()
21285 {
21286 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21287   ;
21288   return 0;
21289 }
21290 _ACEOF
21291 rm -f conftest.$ac_objext
21292 if { (eval echo "$as_me:21292: \"$ac_compile\"") >&5
21293   (eval $ac_compile) 2>&5
21294   ac_status=$?
21295   echo "$as_me:21295: \$? = $ac_status" >&5
21296   (exit $ac_status); } &&
21297          { ac_try='test -s conftest.$ac_objext'
21298   { (eval echo "$as_me:21298: \"$ac_try\"") >&5
21299   (eval $ac_try) 2>&5
21300   ac_status=$?
21301   echo "$as_me:21301: \$? = $ac_status" >&5
21302   (exit $ac_status); }; }; then
21303   ac_hi=$ac_mid; break
21304 else
21305   echo "$as_me: failed program was:" >&5
21306 cat conftest.$ac_ext >&5
21307 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21308 fi
21309 rm -f conftest.$ac_objext conftest.$ac_ext
21310   done
21311 else
21312   echo "$as_me: failed program was:" >&5
21313 cat conftest.$ac_ext >&5
21314 ac_hi=-1 ac_mid=-1
21315   while :; do
21316     cat >conftest.$ac_ext <<_ACEOF
21317 #line 21317 "configure"
21318 #include "confdefs.h"
21319 $ac_includes_default
21320 int
21321 main ()
21322 {
21323 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21324   ;
21325   return 0;
21326 }
21327 _ACEOF
21328 rm -f conftest.$ac_objext
21329 if { (eval echo "$as_me:21329: \"$ac_compile\"") >&5
21330   (eval $ac_compile) 2>&5
21331   ac_status=$?
21332   echo "$as_me:21332: \$? = $ac_status" >&5
21333   (exit $ac_status); } &&
21334          { ac_try='test -s conftest.$ac_objext'
21335   { (eval echo "$as_me:21335: \"$ac_try\"") >&5
21336   (eval $ac_try) 2>&5
21337   ac_status=$?
21338   echo "$as_me:21338: \$? = $ac_status" >&5
21339   (exit $ac_status); }; }; then
21340   ac_lo=$ac_mid; break
21341 else
21342   echo "$as_me: failed program was:" >&5
21343 cat conftest.$ac_ext >&5
21344 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21345 fi
21346 rm -f conftest.$ac_objext conftest.$ac_ext
21347   done
21348 fi
21349 rm -f conftest.$ac_objext conftest.$ac_ext
21350 # Binary search between lo and hi bounds.
21351 while test "x$ac_lo" != "x$ac_hi"; do
21352   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21353   cat >conftest.$ac_ext <<_ACEOF
21354 #line 21354 "configure"
21355 #include "confdefs.h"
21356 $ac_includes_default
21357 int
21358 main ()
21359 {
21360 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21361   ;
21362   return 0;
21363 }
21364 _ACEOF
21365 rm -f conftest.$ac_objext
21366 if { (eval echo "$as_me:21366: \"$ac_compile\"") >&5
21367   (eval $ac_compile) 2>&5
21368   ac_status=$?
21369   echo "$as_me:21369: \$? = $ac_status" >&5
21370   (exit $ac_status); } &&
21371          { ac_try='test -s conftest.$ac_objext'
21372   { (eval echo "$as_me:21372: \"$ac_try\"") >&5
21373   (eval $ac_try) 2>&5
21374   ac_status=$?
21375   echo "$as_me:21375: \$? = $ac_status" >&5
21376   (exit $ac_status); }; }; then
21377   ac_hi=$ac_mid
21378 else
21379   echo "$as_me: failed program was:" >&5
21380 cat conftest.$ac_ext >&5
21381 ac_lo=`expr $ac_mid + 1`
21382 fi
21383 rm -f conftest.$ac_objext conftest.$ac_ext
21384 done
21385 ac_cv_sizeof_wchar_t=$ac_lo
21386 else
21387   if test "$cross_compiling" = yes; then
21388   { { echo "$as_me:21388: error: cannot run test program while cross compiling" >&5
21389 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21390    { (exit 1); exit 1; }; }
21391 else
21392   cat >conftest.$ac_ext <<_ACEOF
21393 #line 21393 "configure"
21394 #include "confdefs.h"
21395 $ac_includes_default
21396 int
21397 main ()
21398 {
21399 FILE *f = fopen ("conftest.val", "w");
21400 if (!f)
21401   $ac_main_return (1);
21402 fprintf (f, "%d", (sizeof (wchar_t)));
21403 fclose (f);
21404   ;
21405   return 0;
21406 }
21407 _ACEOF
21408 rm -f conftest$ac_exeext
21409 if { (eval echo "$as_me:21409: \"$ac_link\"") >&5
21410   (eval $ac_link) 2>&5
21411   ac_status=$?
21412   echo "$as_me:21412: \$? = $ac_status" >&5
21413   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21414   { (eval echo "$as_me:21414: \"$ac_try\"") >&5
21415   (eval $ac_try) 2>&5
21416   ac_status=$?
21417   echo "$as_me:21417: \$? = $ac_status" >&5
21418   (exit $ac_status); }; }; then
21419   ac_cv_sizeof_wchar_t=`cat conftest.val`
21420 else
21421   echo "$as_me: program exited with status $ac_status" >&5
21422 echo "$as_me: failed program was:" >&5
21423 cat conftest.$ac_ext >&5
21424 fi
21425 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21426 fi
21427 fi
21428 rm -f conftest.val
21429 else
21430   ac_cv_sizeof_wchar_t=0
21431 fi
21432 fi
21433 echo "$as_me:21433: result: $ac_cv_sizeof_wchar_t" >&5
21434 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21435 cat >>confdefs.h <<EOF
21436 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21437 EOF
21438
21439 fi
21440
21441 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21442 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21443 ###
21444 ### ticlib modules may be a separate library, otherwise contained in termlib.
21445 ### termlib modules may be a separate library, otherwise contained in ncurses.
21446 ###
21447 ### The of "+" or " " between the tokens controls the way the script
21448 ### chooses to split module lists into libraries.
21449 ###
21450 ### (see CF_LIB_RULES).
21451 echo "$as_me:21451: checking for library subsets" >&5
21452 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21453 LIB_SUBSETS=
21454
21455 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21456         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21457         if test "$with_ticlib" != no ; then
21458                 LIB_SUBSETS="${LIB_SUBSETS} "
21459         else
21460                 LIB_SUBSETS="${LIB_SUBSETS}+"
21461         fi
21462 fi
21463
21464 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21465 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21466
21467 if test "$with_termlib" != no ; then
21468         LIB_SUBSETS="${LIB_SUBSETS} "
21469 else
21470         LIB_SUBSETS="${LIB_SUBSETS}+"
21471 fi
21472
21473 LIB_SUBSETS="${LIB_SUBSETS}base"
21474
21475 # Most term-driver calls are to tinfo, but some like init_pair are to the
21476 # base library (so it resides in base).
21477 if test "$with_term_driver" != no ; then
21478         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21479         case $cf_cv_system_name in
21480         (*mingw32*|*mingw64*)
21481                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21482                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21483                 ;;
21484         (*)
21485                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21486                 ;;
21487         esac
21488 fi
21489
21490 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21491 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21492
21493 echo "$as_me:21493: result: $LIB_SUBSETS" >&5
21494 echo "${ECHO_T}$LIB_SUBSETS" >&6
21495
21496 ### Construct the list of include-directories to be generated
21497
21498 if test "$srcdir" != "."; then
21499         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21500 fi
21501 CPPFLAGS="-I../include $CPPFLAGS"
21502 if test "$srcdir" != "."; then
21503         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21504 fi
21505 CPPFLAGS="-I. $CPPFLAGS"
21506
21507 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21508 if test "$srcdir" != "."; then
21509         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21510 fi
21511 if test "$GCC" != yes; then
21512         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21513 elif test "$includedir" != "/usr/include"; then
21514         if test "$includedir" = '${prefix}/include' ; then
21515                 if test x$prefix != x/usr ; then
21516                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21517                 fi
21518         else
21519                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21520         fi
21521 fi
21522
21523 ### Build up pieces for makefile rules
21524 echo "$as_me:21524: checking default library suffix" >&5
21525 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21526
21527         case $DFT_LWR_MODEL in
21528         (libtool) DFT_ARG_SUFFIX=''   ;;
21529         (normal)  DFT_ARG_SUFFIX=''   ;;
21530         (debug)   DFT_ARG_SUFFIX='_g' ;;
21531         (profile) DFT_ARG_SUFFIX='_p' ;;
21532         (shared)  DFT_ARG_SUFFIX=''   ;;
21533         esac
21534         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21535 echo "$as_me:21535: result: $DFT_ARG_SUFFIX" >&5
21536 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21537
21538 echo "$as_me:21538: checking default library-dependency suffix" >&5
21539 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21540
21541         case X$DFT_LWR_MODEL in
21542         (Xlibtool)
21543                 DFT_LIB_SUFFIX='.la'
21544                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21545                 ;;
21546         (Xdebug)
21547                 DFT_LIB_SUFFIX='_g.a'
21548                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21549                 ;;
21550         (Xprofile)
21551                 DFT_LIB_SUFFIX='_p.a'
21552                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21553                 ;;
21554         (Xshared)
21555                 case $cf_cv_system_name in
21556                 (aix[5-7]*)
21557                         DFT_LIB_SUFFIX='.so'
21558                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21559                         ;;
21560                 (cygwin*|msys*|mingw*)
21561                         DFT_LIB_SUFFIX='.dll'
21562                         DFT_DEP_SUFFIX='.dll.a'
21563                         ;;
21564                 (darwin*)
21565                         DFT_LIB_SUFFIX='.dylib'
21566                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21567                         ;;
21568                 (hpux*)
21569                         case $target in
21570                         (ia64*)
21571                                 DFT_LIB_SUFFIX='.so'
21572                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21573                                 ;;
21574                         (*)
21575                                 DFT_LIB_SUFFIX='.sl'
21576                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21577                                 ;;
21578                         esac
21579                         ;;
21580                 (*)
21581                         DFT_LIB_SUFFIX='.so'
21582                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21583                         ;;
21584                 esac
21585                 ;;
21586         (*)
21587                 DFT_LIB_SUFFIX='.a'
21588                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21589                 ;;
21590         esac
21591         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21592         then
21593                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21594                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21595         fi
21596 echo "$as_me:21596: result: $DFT_DEP_SUFFIX" >&5
21597 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21598
21599 echo "$as_me:21599: checking default object directory" >&5
21600 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21601
21602         case $DFT_LWR_MODEL in
21603         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21604         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21605         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21606         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21607         (shared)
21608                 case $cf_cv_system_name in
21609                 (cygwin|msys)
21610                         DFT_OBJ_SUBDIR='objects' ;;
21611                 (*)
21612                         DFT_OBJ_SUBDIR='obj_s' ;;
21613                 esac
21614         esac
21615 echo "$as_me:21615: result: $DFT_OBJ_SUBDIR" >&5
21616 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21617
21618 if test "x$cf_with_cxx" = xyes ; then
21619 echo "$as_me:21619: checking c++ library-dependency suffix" >&5
21620 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21621 if test "$with_libtool" != "no"; then
21622         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21623         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21624 elif test "$with_shared_cxx" != "no"; then
21625         # also for g++ users...
21626         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21627 else
21628         # we normally make a static library because C/C++ library rules differ
21629
21630         case Xnormal in
21631         (Xlibtool)
21632                 CXX_LIB_SUFFIX='.la'
21633                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21634                 ;;
21635         (Xdebug)
21636                 CXX_LIB_SUFFIX='_g.a'
21637                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21638                 ;;
21639         (Xprofile)
21640                 CXX_LIB_SUFFIX='_p.a'
21641                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21642                 ;;
21643         (Xshared)
21644                 case $cf_cv_system_name in
21645                 (aix[5-7]*)
21646                         CXX_LIB_SUFFIX='.so'
21647                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21648                         ;;
21649                 (cygwin*|msys*|mingw*)
21650                         CXX_LIB_SUFFIX='.dll'
21651                         CXX_DEP_SUFFIX='.dll.a'
21652                         ;;
21653                 (darwin*)
21654                         CXX_LIB_SUFFIX='.dylib'
21655                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21656                         ;;
21657                 (hpux*)
21658                         case $target in
21659                         (ia64*)
21660                                 CXX_LIB_SUFFIX='.so'
21661                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21662                                 ;;
21663                         (*)
21664                                 CXX_LIB_SUFFIX='.sl'
21665                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21666                                 ;;
21667                         esac
21668                         ;;
21669                 (*)
21670                         CXX_LIB_SUFFIX='.so'
21671                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21672                         ;;
21673                 esac
21674                 ;;
21675         (*)
21676                 CXX_LIB_SUFFIX='.a'
21677                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21678                 ;;
21679         esac
21680         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21681         then
21682                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21683                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21684         fi
21685
21686 fi
21687 echo "$as_me:21687: result: $CXX_LIB_SUFFIX" >&5
21688 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21689
21690 fi
21691
21692 # do not want -ldl in build except as needed for -lncurses dependency
21693 if test "x$with_dlsym" = xyes ; then
21694 if test $DFT_LWR_MODEL = shared || \
21695    test $DFT_LWR_MODEL = libtool ; then
21696
21697 # remove dl library from $LIBS
21698 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21699
21700 fi
21701 fi
21702 ### Set up low-level terminfo dependencies for makefiles.
21703
21704 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21705 # do not need libdl
21706 TICS_LIST=
21707 if test "x$with_dlsym" = xyes ; then
21708
21709 # remove dl library from $SHLIB_LIST
21710 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21711
21712 fi
21713
21714 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21715 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21716 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21717 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21718 then
21719         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21720 fi
21721
21722 if test "$with_ticlib" != no ; then
21723
21724         if test "x$with_ticlib" != xyes ; then
21725                 TICS_NAME=$with_ticlib
21726                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21727                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21728                 TICS_LIB_SUFFIX="${with_ticlib}"
21729         else
21730                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21731                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21732                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21733         fi
21734         TICS_LDFLAGS="-L${LIB_DIR}"
21735         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21736 else
21737         TICS_LDFLAGS="-L${LIB_DIR}"
21738         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21739 fi
21740
21741 if test "$with_termlib" != no ; then
21742
21743         if test "x$with_termlib" != xyes ; then
21744                 TINFO_NAME=$with_termlib
21745                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21746                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21747                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21748                 TINFO_LIB_SUFFIX="${with_termlib}"
21749         else
21750                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21751                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21752                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21753                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21754         fi
21755
21756         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21757         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21758         if test "$DFT_LWR_MODEL" = "libtool"; then
21759                 TEST_ARGS="${TEST_DEPS}"
21760                 TEST_ARG2="${TEST_DEP2}"
21761                 TINFO_LDFLAGS="-L${LIB_DIR}"
21762                 TINFO_LIBS="$TEST_ARGS"
21763                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21764                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21765         else
21766                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21767                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21768                 if test "x$with_term_driver" != xno ; then
21769                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21770                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21771                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21772                 else
21773                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21774                         TINFO_LIBS="$TEST_ARGS"
21775                 fi
21776                 TINFO_LDFLAGS="-L${LIB_DIR}"
21777                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21778         fi
21779 else
21780         # the next lines are needed for linking libtic over libncurses
21781         TINFO_NAME=${LIB_NAME}
21782         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21783         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21784         if test "x$with_tic_depends" = xyes ; then
21785                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21786         else
21787                 TICS_LIST="$SHLIB_LIST"
21788         fi
21789
21790         TINFO_LDFLAGS="-L${LIB_DIR}"
21791         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21792 fi
21793
21794 if test "$DFT_LWR_MODEL" = shared ; then
21795         case $cf_cv_system_name in
21796         (cygwin*|msys*)
21797                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21798                 TINFO_SUFFIX=.dll
21799                 ;;
21800         esac
21801 fi
21802
21803 if test "x$with_dlsym" = xyes ; then
21804
21805 # remove dl library from $TICS_LIST
21806 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21807
21808 fi
21809
21810 if test "$DFT_LWR_MODEL" = "libtool"; then
21811         OBJEXT=lo
21812 fi
21813
21814 # needed for Ada95
21815 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21816
21817 case $DFT_LWR_MODEL in
21818 (normal|debug|profile)
21819
21820 if test "$GCC" = yes ; then
21821         case $cf_cv_system_name in
21822         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
21823                 LDFLAGS_STATIC=
21824                 LDFLAGS_SHARED=
21825                 ;;
21826         (*)     # normally, except when broken
21827                 LDFLAGS_STATIC=-static
21828                 LDFLAGS_SHARED=-dynamic
21829                 ;;
21830         esac
21831 else
21832         case $cf_cv_system_name in
21833         (aix[4-7]*)     # from ld manpage
21834                 LDFLAGS_STATIC=-bstatic
21835                 LDFLAGS_SHARED=-bdynamic
21836                 ;;
21837         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
21838                 # We could also use just "archive" and "shared".
21839                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21840                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21841                 ;;
21842         (irix*)         # from ld manpage IRIX64
21843                 LDFLAGS_STATIC=-Bstatic
21844                 LDFLAGS_SHARED=-Bdynamic
21845                 ;;
21846         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
21847                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21848                 LDFLAGS_STATIC=-noso
21849                 LDFLAGS_SHARED=-so_archive
21850                 ;;
21851         (solaris2*)
21852                 LDFLAGS_STATIC=-Bstatic
21853                 LDFLAGS_SHARED=-Bdynamic
21854                 ;;
21855         esac
21856 fi
21857
21858 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21859 then
21860         echo "$as_me:21860: checking if linker supports switching between static/dynamic" >&5
21861 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21862
21863         rm -f libconftest.a
21864         cat >conftest.$ac_ext <<EOF
21865 #line 21865 "configure"
21866 #include <stdio.h>
21867 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21868 EOF
21869         if { (eval echo "$as_me:21869: \"$ac_compile\"") >&5
21870   (eval $ac_compile) 2>&5
21871   ac_status=$?
21872   echo "$as_me:21872: \$? = $ac_status" >&5
21873   (exit $ac_status); } ; then
21874                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21875                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21876         fi
21877         rm -f conftest.*
21878
21879         cf_save_LIBS="$LIBS"
21880
21881         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21882         cat >conftest.$ac_ext <<_ACEOF
21883 #line 21883 "configure"
21884 #include "confdefs.h"
21885
21886 #line 21886 "configure"
21887 #include <stdio.h>
21888 int cf_ldflags_static(FILE *fp);
21889
21890 int
21891 main ()
21892 {
21893
21894         return cf_ldflags_static(stdin);
21895
21896   ;
21897   return 0;
21898 }
21899 _ACEOF
21900 rm -f conftest.$ac_objext conftest$ac_exeext
21901 if { (eval echo "$as_me:21901: \"$ac_link\"") >&5
21902   (eval $ac_link) 2>&5
21903   ac_status=$?
21904   echo "$as_me:21904: \$? = $ac_status" >&5
21905   (exit $ac_status); } &&
21906          { ac_try='test -s conftest$ac_exeext'
21907   { (eval echo "$as_me:21907: \"$ac_try\"") >&5
21908   (eval $ac_try) 2>&5
21909   ac_status=$?
21910   echo "$as_me:21910: \$? = $ac_status" >&5
21911   (exit $ac_status); }; }; then
21912
21913         # some linkers simply ignore the -dynamic
21914         case x`file conftest$ac_exeext 2>/dev/null` in
21915         (*static*)
21916                 cf_ldflags_static=no
21917                 ;;
21918         (*)
21919                 cf_ldflags_static=yes
21920                 ;;
21921         esac
21922
21923 else
21924   echo "$as_me: failed program was:" >&5
21925 cat conftest.$ac_ext >&5
21926 cf_ldflags_static=no
21927 fi
21928 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21929
21930         rm -f libconftest.*
21931         LIBS="$cf_save_LIBS"
21932
21933         echo "$as_me:21933: result: $cf_ldflags_static" >&5
21934 echo "${ECHO_T}$cf_ldflags_static" >&6
21935
21936         if test $cf_ldflags_static != yes
21937         then
21938                 LDFLAGS_STATIC=
21939                 LDFLAGS_SHARED=
21940         fi
21941 else
21942         LDFLAGS_STATIC=
21943         LDFLAGS_SHARED=
21944 fi
21945
21946         ;;
21947 esac
21948
21949 echo "$as_me:21949: checking where we will install curses.h" >&5
21950 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21951
21952 includesubdir=
21953 if test "$with_overwrite" = no && \
21954  ( test "x$includedir" = 'x${prefix}/include' || \
21955    test "x$includedir" = "x${prefix}/include" )
21956 then
21957         includesubdir="/ncurses${USE_LIB_SUFFIX}"
21958 fi
21959 echo "$as_me:21959: result: ${includedir}${includesubdir}" >&5
21960 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21961
21962 ### Resolve a conflict between normal and wide-curses by forcing applications
21963 ### that will need libutf8 to add it to their configure script.
21964 if test "$with_overwrite" != no ; then
21965 if test "$NCURSES_LIBUTF8" = 1 ; then
21966         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21967         { echo "$as_me:21967: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21968 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21969 fi
21970 fi
21971 WITH_OVERWRITE=$with_overwrite
21972
21973 # used to separate tack out of the tree
21974 NCURSES_TREE=
21975
21976 ### predefined stuff for the test programs
21977
21978 cat >>confdefs.h <<\EOF
21979 #define HAVE_SLK_COLOR 1
21980 EOF
21981
21982 ### Construct the list of subdirectories for which we'll customize makefiles
21983 ### with the appropriate compile-rules.
21984
21985 echo "$as_me:21985: checking for src modules" >&5
21986 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21987
21988 # dependencies and linker-arguments for test-programs
21989 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21990 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21991 if test "$DFT_LWR_MODEL" = "libtool"; then
21992         TEST_ARGS="${TEST_DEPS}"
21993         TEST_ARG2="${TEST_DEP2}"
21994 else
21995         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21996         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
21997 fi
21998
21999 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
22000 cf_cv_src_modules=
22001 for cf_dir in $modules_to_build
22002 do
22003         if test -f $srcdir/$cf_dir/modules; then
22004
22005                 # We may/may not have tack in the distribution, though the
22006                 # makefile is.
22007                 if test $cf_dir = tack ; then
22008                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
22009                                 continue
22010                         fi
22011                 fi
22012
22013                 if test -z "$cf_cv_src_modules"; then
22014                         cf_cv_src_modules=$cf_dir
22015                 else
22016                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
22017                 fi
22018
22019                 # Make the ncurses_cfg.h file record the library interface files as
22020                 # well.  These are header files that are the same name as their
22021                 # directory.  Ncurses is the only library that does not follow
22022                 # that pattern.
22023                 if test $cf_dir = tack ; then
22024                         continue
22025                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
22026
22027 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22028
22029                         cat >>confdefs.h <<EOF
22030 #define HAVE_${cf_have_include}_H 1
22031 EOF
22032
22033                         cat >>confdefs.h <<EOF
22034 #define HAVE_LIB${cf_have_include} 1
22035 EOF
22036
22037                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
22038                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
22039                         if test "$DFT_LWR_MODEL" = "libtool"; then
22040                                 TEST_ARGS="${TEST_DEPS}"
22041                                 TEST_ARG2="${TEST_DEP2}"
22042                         else
22043                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
22044                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
22045                         fi
22046                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
22047                 fi
22048         fi
22049 done
22050 echo "$as_me:22050: result: $cf_cv_src_modules" >&5
22051 echo "${ECHO_T}$cf_cv_src_modules" >&6
22052
22053 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
22054 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
22055
22056 SRC_SUBDIRS=
22057 if test "x$cf_with_manpages" != xno ; then
22058         SRC_SUBDIRS="$SRC_SUBDIRS man"
22059 fi
22060 SRC_SUBDIRS="$SRC_SUBDIRS include"
22061 for cf_dir in $cf_cv_src_modules
22062 do
22063         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
22064 done
22065 if test "x$cf_with_tests" != "xno" ; then
22066         SRC_SUBDIRS="$SRC_SUBDIRS test"
22067 fi
22068 # always make this, to install the ncurses-config script
22069 SRC_SUBDIRS="$SRC_SUBDIRS misc"
22070 if test "$cf_with_cxx_binding" != no; then
22071         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
22072         SRC_SUBDIRS="$SRC_SUBDIRS c++"
22073 fi
22074
22075 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
22076 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
22077
22078 ADA_SUBDIRS=
22079 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
22080         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
22081         ADA_SUBDIRS="gen src"
22082         if test "x$cf_with_tests" != "xno" ; then
22083                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
22084         fi
22085 fi
22086
22087 SUB_MAKEFILES=
22088 for cf_dir in $SRC_SUBDIRS
22089 do
22090         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
22091 done
22092
22093 if test -n "$ADA_SUBDIRS"; then
22094         for cf_dir in $ADA_SUBDIRS
22095         do
22096                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
22097         done
22098
22099 fi
22100
22101 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22102    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
22103    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
22104 fi
22105
22106 DIRS_TO_MAKE="lib"
22107 for cf_item in $cf_list_models
22108 do
22109
22110         case $cf_item in
22111         (libtool) cf_subdir='obj_lo'  ;;
22112         (normal)  cf_subdir='objects' ;;
22113         (debug)   cf_subdir='obj_g' ;;
22114         (profile) cf_subdir='obj_p' ;;
22115         (shared)
22116                 case $cf_cv_system_name in
22117                 (cygwin|msys)
22118                         cf_subdir='objects' ;;
22119                 (*)
22120                         cf_subdir='obj_s' ;;
22121                 esac
22122         esac
22123
22124         for cf_item2 in $DIRS_TO_MAKE
22125         do
22126                 test $cf_item2 = $cf_subdir && break
22127         done
22128         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
22129 done
22130 for cf_dir in $DIRS_TO_MAKE
22131 do
22132         test ! -d $cf_dir && mkdir $cf_dir
22133 done
22134
22135 # symbols that differ when compiling Ada95 by itself.
22136 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
22137
22138 # values to use as strings
22139
22140 cat >>confdefs.h <<EOF
22141 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
22142 EOF
22143
22144 cat >>confdefs.h <<EOF
22145 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
22146 EOF
22147
22148 ### Now that we're done running tests, add the compiler-warnings, if any
22149
22150 cf_fix_cppflags=no
22151 cf_new_cflags=
22152 cf_new_cppflags=
22153 cf_new_extra_cppflags=
22154
22155 for cf_add_cflags in $EXTRA_CFLAGS
22156 do
22157 case $cf_fix_cppflags in
22158 (no)
22159         case $cf_add_cflags in
22160         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22161                 case $cf_add_cflags in
22162                 (-D*)
22163                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22164
22165                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22166                                 && test -z "${cf_tst_cflags}" \
22167                                 && cf_fix_cppflags=yes
22168
22169                         if test $cf_fix_cppflags = yes ; then
22170                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22171                                 continue
22172                         elif test "${cf_tst_cflags}" = "\"'" ; then
22173                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22174                                 continue
22175                         fi
22176                         ;;
22177                 esac
22178                 case "$CPPFLAGS" in
22179                 (*$cf_add_cflags)
22180                         ;;
22181                 (*)
22182                         case $cf_add_cflags in
22183                         (-D*)
22184                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22185
22186 CPPFLAGS=`echo "$CPPFLAGS" | \
22187         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22188                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22189
22190                                 ;;
22191                         esac
22192                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22193                         ;;
22194                 esac
22195                 ;;
22196         (*)
22197                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22198                 ;;
22199         esac
22200         ;;
22201 (yes)
22202         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22203
22204         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22205
22206         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22207                 && test -z "${cf_tst_cflags}" \
22208                 && cf_fix_cppflags=no
22209         ;;
22210 esac
22211 done
22212
22213 if test -n "$cf_new_cflags" ; then
22214
22215         CFLAGS="$CFLAGS $cf_new_cflags"
22216 fi
22217
22218 if test -n "$cf_new_cppflags" ; then
22219
22220         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22221 fi
22222
22223 if test -n "$cf_new_extra_cppflags" ; then
22224
22225         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22226 fi
22227
22228 ### Define substitutions for header files to avoid name-pollution
22229
22230 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22231         HAVE_TCGETATTR=1
22232 else
22233         HAVE_TCGETATTR=0
22234 fi
22235
22236 if test "x$ac_cv_header_stdint_h" = xyes ; then
22237         HAVE_STDINT_H=1
22238 else
22239         HAVE_STDINT_H=0
22240 fi
22241
22242 if test "x$ac_cv_header_termio_h" = xyes ; then
22243         HAVE_TERMIO_H=1
22244 else
22245         HAVE_TERMIO_H=0
22246 fi
22247
22248 if test "x$ac_cv_header_termios_h" = xyes ; then
22249         HAVE_TERMIOS_H=1
22250 else
22251         HAVE_TERMIOS_H=0
22252 fi
22253
22254 ################################################################################
22255 test "x$use_database" = xyes && \
22256 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22257
22258 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22259 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22260
22261 if test "x$enable_pc_files" = xyes ; then \
22262 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22263 MAKE_PC_FILES=
22264 else
22265 MAKE_PC_FILES="#"
22266 fi
22267
22268 # Extract the first word of "tic", so it can be a program name with args.
22269 set dummy tic; ac_word=$2
22270 echo "$as_me:22270: checking for $ac_word" >&5
22271 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22272 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22273   echo $ECHO_N "(cached) $ECHO_C" >&6
22274 else
22275   case $TIC_PATH in
22276   [\\/]* | ?:[\\/]*)
22277   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22278   ;;
22279   *)
22280   ac_save_IFS=$IFS; IFS=$ac_path_separator
22281 ac_dummy="$PATH:/usr/local/ncurses/bin"
22282 for ac_dir in $ac_dummy; do
22283   IFS=$ac_save_IFS
22284   test -z "$ac_dir" && ac_dir=.
22285   if $as_executable_p "$ac_dir/$ac_word"; then
22286    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22287    echo "$as_me:22287: found $ac_dir/$ac_word" >&5
22288    break
22289 fi
22290 done
22291
22292   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22293   ;;
22294 esac
22295 fi
22296 TIC_PATH=$ac_cv_path_TIC_PATH
22297
22298 if test -n "$TIC_PATH"; then
22299   echo "$as_me:22299: result: $TIC_PATH" >&5
22300 echo "${ECHO_T}$TIC_PATH" >&6
22301 else
22302   echo "$as_me:22302: result: no" >&5
22303 echo "${ECHO_T}no" >&6
22304 fi
22305
22306 if test -n "$FALLBACK_LIST"
22307 then
22308         if test "$TIC_PATH" = unknown
22309         then
22310                 { echo "$as_me:22310: WARNING: no tic program found for fallbacks" >&5
22311 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22312         fi
22313 fi
22314
22315 if test "x$cf_with_tests" != xno ; then
22316         MAKE_TESTS=
22317 else
22318         MAKE_TESTS="#"
22319 fi
22320
22321 ADAHTML_DIR=../../doc/html/ada
22322
22323 # these could be configurable, but are not currently
22324 PANEL_NAME=panel
22325 MENU_NAME=menu
22326 FORM_NAME=form
22327 CXX_NAME=ncurses++
22328
22329 # workaround for OS/2 (20151017)
22330 case $cf_cv_system_name in
22331 (os2*)
22332         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
22333         ;;
22334 (*)
22335         LIBTOOL_OPTS_CXX=
22336         ;;
22337 esac
22338
22339 # workaround for g++ versus Solaris (20131116)
22340 case $cf_cv_system_name in
22341 (solaris2*)
22342         case "x$CPPFLAGS" in
22343         (*-D_XOPEN_SOURCE_EXTENDED*)
22344                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22345
22346 echo "${as_me:-configure}:22346: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22347
22348                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22349                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22350                 ;;
22351         esac
22352         ;;
22353 esac
22354
22355 # Help to automatically enable the extended curses features when using either
22356 # the *-config or the ".pc" files by adding defines.
22357 echo "$as_me:22357: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22358 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22359 PKG_CFLAGS=
22360 for cf_loop1 in $CPPFLAGS_after_XOPEN
22361 do
22362         cf_found=no
22363         for cf_loop2 in $CPPFLAGS_before_XOPEN
22364         do
22365                 if test "x$cf_loop1" = "x$cf_loop2"
22366                 then
22367                         cf_found=yes
22368                         break
22369                 fi
22370         done
22371         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22372 done
22373 echo "$as_me:22373: result: $PKG_CFLAGS" >&5
22374 echo "${ECHO_T}$PKG_CFLAGS" >&6
22375
22376 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22377 case "x$NCURSES_OSPEED" in
22378 (*short*)
22379         cf_compatible=1
22380         ;;
22381 (*)
22382         cf_compatible=0
22383         ;;
22384 esac
22385
22386 cat >>confdefs.h <<EOF
22387 #define NCURSES_OSPEED_COMPAT $cf_compatible
22388 EOF
22389
22390 case "x$cf_cv_typeof_chtype" in
22391 (xshort|xint|xlong)
22392         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22393         ;;
22394 esac
22395
22396 case "x$cf_cv_typeof_mmask_t" in
22397 (xshort|xint|xlong)
22398         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22399         ;;
22400 esac
22401
22402 # substitute into misc/Makefile to suppress
22403 # (un)install.data from the
22404 # (un)install rules.
22405 if test "x$cf_with_db_install" = "xno"; then
22406         MISC_INSTALL_DATA=
22407         MISC_UNINSTALL_DATA=
22408 else
22409         MISC_INSTALL_DATA=install.data
22410         MISC_UNINSTALL_DATA=uninstall.data
22411 fi
22412
22413 SUB_SCRIPTS=
22414
22415 if test -n "$PACKAGE"
22416 then
22417         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22418         export PACKAGE
22419         echo "package: $PACKAGE"
22420 fi
22421
22422 UNALTERED_SYMS=
22423 cf_filter_syms=no
22424
22425 if test -n "$RESULTING_SYMS"
22426 then
22427         cf_filter_syms=$cf_dft_filter_syms
22428         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22429
22430 echo "${as_me:-configure}:22430: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22431
22432 fi
22433
22434 if test "x$WILDCARD_SYMS" = xno
22435 then
22436         cf_filter_syms=yes
22437 fi
22438
22439 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22440 if test $cf_filter_syms = yes
22441 then
22442         RESULTING_SYMS=resulting.map
22443 fi
22444
22445 if test "x$cross_compiling" = xyes ; then
22446         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
22447 else
22448         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
22449 fi
22450
22451 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"
22452 ac_config_commands="$ac_config_commands default"
22453 cat >confcache <<\_ACEOF
22454 # This file is a shell script that caches the results of configure
22455 # tests run on this system so they can be shared between configure
22456 # scripts and configure runs, see configure's option --config-cache.
22457 # It is not useful on other systems.  If it contains results you don't
22458 # want to keep, you may remove or edit it.
22459 #
22460 # config.status only pays attention to the cache file if you give it
22461 # the --recheck option to rerun configure.
22462 #
22463 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22464 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22465 # following values.
22466
22467 _ACEOF
22468
22469 # The following way of writing the cache mishandles newlines in values,
22470 # but we know of no workaround that is simple, portable, and efficient.
22471 # So, don't put newlines in cache variables' values.
22472 # Ultrix sh set writes to stderr and can't be redirected directly,
22473 # and sets the high bit in the cache file unless we assign to the vars.
22474 {
22475   (set) 2>&1 |
22476     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22477     *ac_space=\ *)
22478       # `set' does not quote correctly, so add quotes (double-quote
22479       # substitution turns \\\\ into \\, and sed turns \\ into \).
22480       sed -n \
22481         "s/'/'\\\\''/g;
22482           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22483       ;;
22484     *)
22485       # `set' quotes correctly as required by POSIX, so do not add quotes.
22486       sed -n \
22487         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22488       ;;
22489     esac;
22490 } |
22491   sed '
22492      t clear
22493      : clear
22494      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22495      t end
22496      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22497      : end' >>confcache
22498 if cmp -s $cache_file confcache; then :; else
22499   if test -w $cache_file; then
22500     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22501     cat confcache >$cache_file
22502   else
22503     echo "not updating unwritable cache $cache_file"
22504   fi
22505 fi
22506 rm -f confcache
22507
22508 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22509 # Let make expand exec_prefix.
22510 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22511
22512 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22513 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22514 # trailing colons and then remove the whole line if VPATH becomes empty
22515 # (actually we leave an empty line to preserve line numbers).
22516 if test "x$srcdir" = x.; then
22517   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22518 s/:*\$(srcdir):*/:/;
22519 s/:*\${srcdir}:*/:/;
22520 s/:*@srcdir@:*/:/;
22521 s/^\([^=]*=[    ]*\):*/\1/;
22522 s/:*$//;
22523 s/^[^=]*=[      ]*$//;
22524 }'
22525 fi
22526
22527 DEFS=-DHAVE_CONFIG_H
22528
22529 : ${CONFIG_STATUS=./config.status}
22530 ac_clean_files_save=$ac_clean_files
22531 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22532 { echo "$as_me:22532: creating $CONFIG_STATUS" >&5
22533 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22534 cat >$CONFIG_STATUS <<_ACEOF
22535 #! $SHELL
22536 # Generated automatically by configure.
22537 # Run this file to recreate the current configuration.
22538 # Compiler output produced by configure, useful for debugging
22539 # configure, is in config.log if it exists.
22540
22541 debug=false
22542 SHELL=\${CONFIG_SHELL-$SHELL}
22543 ac_cs_invocation="\$0 \$@"
22544
22545 _ACEOF
22546
22547 cat >>$CONFIG_STATUS <<\_ACEOF
22548 # Be Bourne compatible
22549 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22550   emulate sh
22551   NULLCMD=:
22552 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22553   set -o posix
22554 fi
22555
22556 # Name of the executable.
22557 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22558
22559 if expr a : '\(a\)' >/dev/null 2>&1; then
22560   as_expr=expr
22561 else
22562   as_expr=false
22563 fi
22564
22565 rm -f conf$$ conf$$.exe conf$$.file
22566 echo >conf$$.file
22567 if ln -s conf$$.file conf$$ 2>/dev/null; then
22568   # We could just check for DJGPP; but this test a) works b) is more generic
22569   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22570   if test -f conf$$.exe; then
22571     # Don't use ln at all; we don't have any links
22572     as_ln_s='cp -p'
22573   else
22574     as_ln_s='ln -s'
22575   fi
22576 elif ln conf$$.file conf$$ 2>/dev/null; then
22577   as_ln_s=ln
22578 else
22579   as_ln_s='cp -p'
22580 fi
22581 rm -f conf$$ conf$$.exe conf$$.file
22582
22583 as_executable_p="test -f"
22584
22585 # Support unset when possible.
22586 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22587   as_unset=unset
22588 else
22589   as_unset=false
22590 fi
22591
22592 # NLS nuisances.
22593 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22594 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22595 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22596 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22597 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22598 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22599 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22600 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22601
22602 # IFS
22603 # We need space, tab and new line, in precisely that order.
22604 as_nl='
22605 '
22606 IFS="   $as_nl"
22607
22608 # CDPATH.
22609 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22610
22611 exec 6>&1
22612
22613 _ACEOF
22614
22615 # Files that config.status was made for.
22616 if test -n "$ac_config_files"; then
22617   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22618 fi
22619
22620 if test -n "$ac_config_headers"; then
22621   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22622 fi
22623
22624 if test -n "$ac_config_links"; then
22625   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22626 fi
22627
22628 if test -n "$ac_config_commands"; then
22629   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22630 fi
22631
22632 cat >>$CONFIG_STATUS <<\EOF
22633
22634 ac_cs_usage="\
22635 \`$as_me' instantiates files from templates according to the
22636 current configuration.
22637
22638 Usage: $0 [OPTIONS] [FILE]...
22639
22640   -h, --help       print this help, then exit
22641   -V, --version    print version number, then exit
22642   -d, --debug      don't remove temporary files
22643       --recheck    update $as_me by reconfiguring in the same conditions
22644   --file=FILE[:TEMPLATE]
22645                    instantiate the configuration file FILE
22646   --header=FILE[:TEMPLATE]
22647                    instantiate the configuration header FILE
22648
22649 Configuration files:
22650 $config_files
22651
22652 Configuration headers:
22653 $config_headers
22654
22655 Configuration commands:
22656 $config_commands
22657
22658 Report bugs to <dickey@invisible-island.net>."
22659 EOF
22660
22661 cat >>$CONFIG_STATUS <<EOF
22662 ac_cs_version="\\
22663 config.status
22664 configured by $0, generated by GNU Autoconf 2.52.20150926,
22665   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22666
22667 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22668 Free Software Foundation, Inc.
22669 This config.status script is free software; the Free Software Foundation
22670 gives unlimited permission to copy, distribute and modify it."
22671 srcdir=$srcdir
22672 INSTALL="$INSTALL"
22673 EOF
22674
22675 cat >>$CONFIG_STATUS <<\EOF
22676 # If no file are specified by the user, then we need to provide default
22677 # value.  By we need to know if files were specified by the user.
22678 ac_need_defaults=:
22679 while test $# != 0
22680 do
22681   case $1 in
22682   --*=*)
22683     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22684     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22685     shift
22686     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22687     shift
22688     ;;
22689   -*);;
22690   *) # This is not an option, so the user has probably given explicit
22691      # arguments.
22692      ac_need_defaults=false;;
22693   esac
22694
22695   case $1 in
22696   # Handling of the options.
22697 EOF
22698 cat >>$CONFIG_STATUS <<EOF
22699   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22700     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22701     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22702 EOF
22703 cat >>$CONFIG_STATUS <<\EOF
22704   --version | --vers* | -V )
22705     echo "$ac_cs_version"; exit 0 ;;
22706   --he | --h)
22707     # Conflict between --help and --header
22708     { { echo "$as_me:22708: error: ambiguous option: $1
22709 Try \`$0 --help' for more information." >&5
22710 echo "$as_me: error: ambiguous option: $1
22711 Try \`$0 --help' for more information." >&2;}
22712    { (exit 1); exit 1; }; };;
22713   --help | --hel | -h )
22714     echo "$ac_cs_usage"; exit 0 ;;
22715   --debug | --d* | -d )
22716     debug=: ;;
22717   --file | --fil | --fi | --f )
22718     shift
22719     CONFIG_FILES="$CONFIG_FILES $1"
22720     ac_need_defaults=false;;
22721   --header | --heade | --head | --hea )
22722     shift
22723     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22724     ac_need_defaults=false;;
22725
22726   # This is an error.
22727   -*) { { echo "$as_me:22727: error: unrecognized option: $1
22728 Try \`$0 --help' for more information." >&5
22729 echo "$as_me: error: unrecognized option: $1
22730 Try \`$0 --help' for more information." >&2;}
22731    { (exit 1); exit 1; }; } ;;
22732
22733   *) ac_config_targets="$ac_config_targets $1" ;;
22734
22735   esac
22736   shift
22737 done
22738
22739 exec 5>>config.log
22740 cat >&5 << _ACEOF
22741
22742 ## ----------------------- ##
22743 ## Running config.status.  ##
22744 ## ----------------------- ##
22745
22746 This file was extended by $as_me 2.52.20150926, executed with
22747   CONFIG_FILES    = $CONFIG_FILES
22748   CONFIG_HEADERS  = $CONFIG_HEADERS
22749   CONFIG_LINKS    = $CONFIG_LINKS
22750   CONFIG_COMMANDS = $CONFIG_COMMANDS
22751   > $ac_cs_invocation
22752 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22753
22754 _ACEOF
22755 EOF
22756
22757 cat >>$CONFIG_STATUS <<EOF
22758 #
22759 # INIT-COMMANDS section.
22760 #
22761
22762 ### Special initialization commands, used to pass information from the
22763 ### configuration-run into config.status
22764
22765 AWK="$AWK"
22766 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22767 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22768 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22769 ECHO_LD="$ECHO_LD"
22770 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22771 LDCONFIG="$LDCONFIG"
22772 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22773 LIB_NAME="$LIB_NAME"
22774 LIB_PREFIX="$LIB_PREFIX"
22775 LIB_SUBSETS="$LIB_SUBSETS"
22776 LIB_SUFFIX="$LIB_SUFFIX"
22777 LIB_TRACING="$LIB_TRACING"
22778 LN_S="$LN_S"
22779 MAKE_TERMINFO="$MAKE_TERMINFO"
22780 NCURSES_MAJOR="$NCURSES_MAJOR"
22781 NCURSES_MINOR="$NCURSES_MINOR"
22782 NCURSES_OSPEED="$NCURSES_OSPEED"
22783 NCURSES_PATCH="$NCURSES_PATCH"
22784 SRC_SUBDIRS="$SRC_SUBDIRS"
22785 TERMINFO="$TERMINFO"
22786 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22787 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22788 TICS_NAME="$TICS_NAME"
22789 TIC_PATH="$TIC_PATH"
22790 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22791 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22792 TINFO_NAME="$TINFO_NAME"
22793 TINFO_SUFFIX="$TINFO_SUFFIX"
22794 UNALTERED_SYMS="$UNALTERED_SYMS"
22795 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22796 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22797 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22798 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22799 WILDCARD_SYMS="$WILDCARD_SYMS"
22800 WITH_CURSES_H="$with_curses_h"
22801 WITH_ECHO="${enable_echo:=yes}"
22802 WITH_OVERWRITE="$with_overwrite"
22803 cf_LIST_MODELS="$cf_list_models"
22804 cf_cv_abi_version="$cf_cv_abi_version"
22805 cf_cv_do_relink="$cf_cv_do_relink"
22806 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22807 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22808 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22809 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22810 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22811 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22812 cf_cv_rel_version="$cf_cv_rel_version"
22813 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22814 cf_cv_shared_soname='$cf_cv_shared_soname'
22815 cf_cv_shlib_version="$cf_cv_shlib_version"
22816 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22817 cf_cv_system_name="$cf_cv_system_name"
22818 cf_cv_term_driver="$with_term_driver"
22819 cf_with_ada="$cf_with_ada"
22820 cf_with_cxx_binding="$cf_with_cxx_binding"
22821 cf_with_db_install="$cf_with_db_install"
22822 cf_with_manpages="$cf_with_manpages"
22823 cf_with_tests="$cf_with_tests"
22824 host="$host"
22825 target="$target"
22826 with_shared_cxx="$with_shared_cxx"
22827
22828 EOF
22829
22830 cat >>$CONFIG_STATUS <<\EOF
22831 for ac_config_target in $ac_config_targets
22832 do
22833   case "$ac_config_target" in
22834   # Handling of arguments.
22835   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22836   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22837   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22838   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22839   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22840   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22841   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22842   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22843   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22844   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22845   *) { { echo "$as_me:22845: error: invalid argument: $ac_config_target" >&5
22846 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22847    { (exit 1); exit 1; }; };;
22848   esac
22849 done
22850
22851 # If the user did not use the arguments to specify the items to instantiate,
22852 # then the envvar interface is used.  Set only those that are not.
22853 # We use the long form for the default assignment because of an extremely
22854 # bizarre bug on SunOS 4.1.3.
22855 if $ac_need_defaults; then
22856   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22857   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22858   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22859 fi
22860
22861 # Create a temporary directory, and hook for its removal unless debugging.
22862 $debug ||
22863 {
22864   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22865   trap '{ (exit 1); exit 1; }' 1 2 13 15
22866 }
22867
22868 # Create a (secure) tmp directory for tmp files.
22869 : ${TMPDIR=/tmp}
22870 {
22871   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22872   test -n "$tmp" && test -d "$tmp"
22873 }  ||
22874 {
22875   tmp=$TMPDIR/cs$$-$RANDOM
22876   (umask 077 && mkdir $tmp)
22877 } ||
22878 {
22879    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22880    { (exit 1); exit 1; }
22881 }
22882
22883 EOF
22884
22885 cat >>$CONFIG_STATUS <<EOF
22886
22887 #
22888 # CONFIG_FILES section.
22889 #
22890
22891 # No need to generate the scripts if there are no CONFIG_FILES.
22892 # This happens for instance when ./config.status config.h
22893 if test -n "\$CONFIG_FILES"; then
22894   # Protect against being on the right side of a sed subst in config.status.
22895   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22896    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22897 s,@SHELL@,$SHELL,;t t
22898 s,@exec_prefix@,$exec_prefix,;t t
22899 s,@prefix@,$prefix,;t t
22900 s,@program_transform_name@,$program_transform_name,;t t
22901 s,@bindir@,$bindir,;t t
22902 s,@sbindir@,$sbindir,;t t
22903 s,@libexecdir@,$libexecdir,;t t
22904 s,@datarootdir@,$datarootdir,;t t
22905 s,@datadir@,$datadir,;t t
22906 s,@sysconfdir@,$sysconfdir,;t t
22907 s,@sharedstatedir@,$sharedstatedir,;t t
22908 s,@localstatedir@,$localstatedir,;t t
22909 s,@libdir@,$libdir,;t t
22910 s,@includedir@,$includedir,;t t
22911 s,@oldincludedir@,$oldincludedir,;t t
22912 s,@infodir@,$infodir,;t t
22913 s,@mandir@,$mandir,;t t
22914 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22915 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22916 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22917 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22918 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22919 s,@build_alias@,$build_alias,;t t
22920 s,@host_alias@,$host_alias,;t t
22921 s,@target_alias@,$target_alias,;t t
22922 s,@ECHO_C@,$ECHO_C,;t t
22923 s,@ECHO_N@,$ECHO_N,;t t
22924 s,@ECHO_T@,$ECHO_T,;t t
22925 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22926 s,@DEFS@,$DEFS,;t t
22927 s,@LIBS@,$LIBS,;t t
22928 s,@top_builddir@,$top_builddir,;t t
22929 s,@EGREP@,$EGREP,;t t
22930 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22931 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22932 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22933 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22934 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22935 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22936 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22937 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22938 s,@VERSION@,$VERSION,;t t
22939 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22940 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22941 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22942 s,@PACKAGE@,$PACKAGE,;t t
22943 s,@build@,$build,;t t
22944 s,@build_cpu@,$build_cpu,;t t
22945 s,@build_vendor@,$build_vendor,;t t
22946 s,@build_os@,$build_os,;t t
22947 s,@host@,$host,;t t
22948 s,@host_cpu@,$host_cpu,;t t
22949 s,@host_vendor@,$host_vendor,;t t
22950 s,@host_os@,$host_os,;t t
22951 s,@target@,$target,;t t
22952 s,@target_cpu@,$target_cpu,;t t
22953 s,@target_vendor@,$target_vendor,;t t
22954 s,@target_os@,$target_os,;t t
22955 s,@CC@,$CC,;t t
22956 s,@CFLAGS@,$CFLAGS,;t t
22957 s,@LDFLAGS@,$LDFLAGS,;t t
22958 s,@CPPFLAGS@,$CPPFLAGS,;t t
22959 s,@ac_ct_CC@,$ac_ct_CC,;t t
22960 s,@EXEEXT@,$EXEEXT,;t t
22961 s,@OBJEXT@,$OBJEXT,;t t
22962 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22963 s,@CPP@,$CPP,;t t
22964 s,@LDCONFIG@,$LDCONFIG,;t t
22965 s,@CXX@,$CXX,;t t
22966 s,@CXXFLAGS@,$CXXFLAGS,;t t
22967 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22968 s,@AWK@,$AWK,;t t
22969 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22970 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22971 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22972 s,@LINT@,$LINT,;t t
22973 s,@LINT_OPTS@,$LINT_OPTS,;t t
22974 s,@LN_S@,$LN_S,;t t
22975 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22976 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22977 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22978 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22979 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22980 s,@SET_MAKE@,$SET_MAKE,;t t
22981 s,@CTAGS@,$CTAGS,;t t
22982 s,@ETAGS@,$ETAGS,;t t
22983 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22984 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22985 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22986 s,@RANLIB@,$RANLIB,;t t
22987 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22988 s,@LD@,$LD,;t t
22989 s,@ac_ct_LD@,$ac_ct_LD,;t t
22990 s,@AR@,$AR,;t t
22991 s,@ac_ct_AR@,$ac_ct_AR,;t t
22992 s,@NM@,$NM,;t t
22993 s,@ac_ct_NM@,$ac_ct_NM,;t t
22994 s,@ARFLAGS@,$ARFLAGS,;t t
22995 s,@DESTDIR@,$DESTDIR,;t t
22996 s,@BUILD_CC@,$BUILD_CC,;t t
22997 s,@BUILD_CPP@,$BUILD_CPP,;t t
22998 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22999 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
23000 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
23001 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
23002 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
23003 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
23004 s,@cf_list_models@,$cf_list_models,;t t
23005 s,@ABI_VERSION@,$ABI_VERSION,;t t
23006 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
23007 s,@LIBTOOL@,$LIBTOOL,;t t
23008 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
23009 s,@LT_UNDEF@,$LT_UNDEF,;t t
23010 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
23011 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
23012 s,@LIB_CREATE@,$LIB_CREATE,;t t
23013 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
23014 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
23015 s,@LIB_PREP@,$LIB_PREP,;t t
23016 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
23017 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
23018 s,@LIB_LINK@,$LIB_LINK,;t t
23019 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
23020 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
23021 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
23022 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
23023 s,@TICS_NAME@,$TICS_NAME,;t t
23024 s,@TINFO_NAME@,$TINFO_NAME,;t t
23025 s,@LIB_NAME@,$LIB_NAME,;t t
23026 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
23027 s,@CC_G_OPT@,$CC_G_OPT,;t t
23028 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
23029 s,@LD_MODEL@,$LD_MODEL,;t t
23030 s,@shlibdir@,$shlibdir,;t t
23031 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
23032 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
23033 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
23034 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
23035 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
23036 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
23037 s,@LINK_PROGS@,$LINK_PROGS,;t t
23038 s,@LINK_TESTS@,$LINK_TESTS,;t t
23039 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
23040 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
23041 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
23042 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
23043 s,@RPATH_LIST@,$RPATH_LIST,;t t
23044 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
23045 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
23046 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
23047 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
23048 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
23049 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
23050 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
23051 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
23052 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
23053 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
23054 s,@XTERM_KBS@,$XTERM_KBS,;t t
23055 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
23056 s,@TERMINFO@,$TERMINFO,;t t
23057 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
23058 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
23059 s,@TERMPATH@,$TERMPATH,;t t
23060 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
23061 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
23062 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
23063 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
23064 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
23065 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
23066 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
23067 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
23068 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
23069 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
23070 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
23071 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
23072 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
23073 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
23074 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
23075 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
23076 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
23077 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
23078 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
23079 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
23080 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
23081 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
23082 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
23083 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
23084 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
23085 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
23086 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
23087 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
23088 s,@PTHREAD@,$PTHREAD,;t t
23089 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
23090 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
23091 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
23092 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
23093 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
23094 s,@ECHO_LT@,$ECHO_LT,;t t
23095 s,@ECHO_LD@,$ECHO_LD,;t t
23096 s,@RULE_CC@,$RULE_CC,;t t
23097 s,@SHOW_CC@,$SHOW_CC,;t t
23098 s,@ECHO_CC@,$ECHO_CC,;t t
23099 s,@ECHO_LINK@,$ECHO_LINK,;t t
23100 s,@ADAFLAGS@,$ADAFLAGS,;t t
23101 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
23102 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
23103 s,@ADA_TRACE@,$ADA_TRACE,;t t
23104 s,@MATH_LIB@,$MATH_LIB,;t t
23105 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
23106 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
23107 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
23108 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
23109 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
23110 s,@TEST_LIBS@,$TEST_LIBS,;t t
23111 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
23112 s,@CXXCPP@,$CXXCPP,;t t
23113 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
23114 s,@CXX_AR@,$CXX_AR,;t t
23115 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
23116 s,@CXXLIBS@,$CXXLIBS,;t t
23117 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
23118 s,@gnat_exists@,$gnat_exists,;t t
23119 s,@M4_exists@,$M4_exists,;t t
23120 s,@cf_ada_make@,$cf_ada_make,;t t
23121 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
23122 s,@cf_compile_generics@,$cf_compile_generics,;t t
23123 s,@cf_generic_objects@,$cf_generic_objects,;t t
23124 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
23125 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
23126 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
23127 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
23128 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
23129 s,@cf_ada_package@,$cf_ada_package,;t t
23130 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
23131 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
23132 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
23133 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
23134 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
23135 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
23136 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
23137 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
23138 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
23139 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
23140 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
23141 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
23142 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
23143 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
23144 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
23145 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
23146 s,@TICS_LIBS@,$TICS_LIBS,;t t
23147 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
23148 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
23149 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
23150 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
23151 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
23152 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
23153 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
23154 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
23155 s,@includesubdir@,$includesubdir,;t t
23156 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
23157 s,@TICS_LIST@,$TICS_LIST,;t t
23158 s,@TINFO_LIST@,$TINFO_LIST,;t t
23159 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
23160 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
23161 s,@TEST_ARGS@,$TEST_ARGS,;t t
23162 s,@TEST_DEPS@,$TEST_DEPS,;t t
23163 s,@TEST_ARG2@,$TEST_ARG2,;t t
23164 s,@TEST_DEP2@,$TEST_DEP2,;t t
23165 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
23166 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23167 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23168 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23169 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23170 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23171 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23172 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23173 s,@cross_compiling@,$cross_compiling,;t t
23174 s,@TIC_PATH@,$TIC_PATH,;t t
23175 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23176 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23177 s,@PANEL_NAME@,$PANEL_NAME,;t t
23178 s,@MENU_NAME@,$MENU_NAME,;t t
23179 s,@FORM_NAME@,$FORM_NAME,;t t
23180 s,@CXX_NAME@,$CXX_NAME,;t t
23181 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
23182 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23183 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23184 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23185 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23186 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
23187 CEOF
23188
23189 EOF
23190
23191   cat >>$CONFIG_STATUS <<\EOF
23192   # Split the substitutions into bite-sized pieces for seds with
23193   # small command number limits, like on Digital OSF/1 and HP-UX.
23194   ac_max_sed_lines=48
23195   ac_sed_frag=1 # Number of current file.
23196   ac_beg=1 # First line for current file.
23197   ac_end=$ac_max_sed_lines # Line after last line for current file.
23198   ac_more_lines=:
23199   ac_sed_cmds=
23200   while $ac_more_lines; do
23201     if test $ac_beg -gt 1; then
23202       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23203     else
23204       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23205     fi
23206     if test ! -s $tmp/subs.frag; then
23207       ac_more_lines=false
23208     else
23209       # The purpose of the label and of the branching condition is to
23210       # speed up the sed processing (if there are no `@' at all, there
23211       # is no need to browse any of the substitutions).
23212       # These are the two extra sed commands mentioned above.
23213       (echo ':t
23214   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23215       # It is possible to make a multiline substitution using escaped newlines.
23216       # Ensure that we do not split the substitution between script fragments.
23217       ac_BEG=$ac_end
23218       ac_END=`expr $ac_end + $ac_max_sed_lines`
23219       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
23220       if test -s $tmp/subs.next; then
23221         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
23222         if test ! -s $tmp/subs.edit; then
23223           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
23224           if test ! -s $tmp/subs.edit; then
23225             if test $ac_beg -gt 1; then
23226               ac_end=`expr $ac_end - 1`
23227               continue
23228             fi
23229           fi
23230         fi
23231       fi
23232
23233       if test -z "$ac_sed_cmds"; then
23234         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23235       else
23236         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23237       fi
23238       ac_sed_frag=`expr $ac_sed_frag + 1`
23239       ac_beg=$ac_end
23240       ac_end=`expr $ac_end + $ac_max_sed_lines`
23241     fi
23242   done
23243   if test -z "$ac_sed_cmds"; then
23244     ac_sed_cmds=cat
23245   fi
23246 fi # test -n "$CONFIG_FILES"
23247
23248 EOF
23249 cat >>$CONFIG_STATUS <<\EOF
23250 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23251   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23252   case $ac_file in
23253   - | *:- | *:-:* ) # input from stdin
23254         cat >$tmp/stdin
23255         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23256         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23257   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23258         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23259   * )   ac_file_in=$ac_file.in ;;
23260   esac
23261
23262   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23263   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23264          X"$ac_file" : 'X\(//\)[^/]' \| \
23265          X"$ac_file" : 'X\(//\)$' \| \
23266          X"$ac_file" : 'X\(/\)' \| \
23267          .     : '\(.\)' 2>/dev/null ||
23268 echo X"$ac_file" |
23269     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23270           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23271           /^X\(\/\/\)$/{ s//\1/; q; }
23272           /^X\(\/\).*/{ s//\1/; q; }
23273           s/.*/./; q'`
23274   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23275     { case "$ac_dir" in
23276   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23277   *)                      as_incr_dir=.;;
23278 esac
23279 as_dummy="$ac_dir"
23280 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23281   case $as_mkdir_dir in
23282     # Skip DOS drivespec
23283     ?:) as_incr_dir=$as_mkdir_dir ;;
23284     *)
23285       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23286       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23287     ;;
23288   esac
23289 done; }
23290
23291     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23292     # A "../" for each directory in $ac_dir_suffix.
23293     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23294   else
23295     ac_dir_suffix= ac_dots=
23296   fi
23297
23298   case $srcdir in
23299   .)  ac_srcdir=.
23300       if test -z "$ac_dots"; then
23301          ac_top_srcdir=.
23302       else
23303          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23304       fi ;;
23305   [\\/]* | ?:[\\/]* )
23306       ac_srcdir=$srcdir$ac_dir_suffix;
23307       ac_top_srcdir=$srcdir ;;
23308   *) # Relative path.
23309     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23310     ac_top_srcdir=$ac_dots$srcdir ;;
23311   esac
23312
23313   case $INSTALL in
23314   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23315   *) ac_INSTALL=$ac_dots$INSTALL ;;
23316   esac
23317
23318   if test x"$ac_file" != x-; then
23319     { echo "$as_me:23319: creating $ac_file" >&5
23320 echo "$as_me: creating $ac_file" >&6;}
23321     rm -f "$ac_file"
23322   fi
23323   # Let's still pretend it is `configure' which instantiates (i.e., don't
23324   # use $as_me), people would be surprised to read:
23325   #    /* config.h.  Generated automatically by config.status.  */
23326   configure_input="Generated automatically from `echo $ac_file_in |
23327                                                  sed 's,.*/,,'` by configure."
23328
23329   # First look for the input files in the build tree, otherwise in the
23330   # src tree.
23331   ac_file_inputs=`IFS=:
23332     for f in $ac_file_in; do
23333       case $f in
23334       -) echo $tmp/stdin ;;
23335       [\\/$]*)
23336          # Absolute (can't be DOS-style, as IFS=:)
23337          test -f "$f" || { { echo "$as_me:23337: error: cannot find input file: $f" >&5
23338 echo "$as_me: error: cannot find input file: $f" >&2;}
23339    { (exit 1); exit 1; }; }
23340          echo $f;;
23341       *) # Relative
23342          if test -f "$f"; then
23343            # Build tree
23344            echo $f
23345          elif test -f "$srcdir/$f"; then
23346            # Source tree
23347            echo $srcdir/$f
23348          else
23349            # /dev/null tree
23350            { { echo "$as_me:23350: error: cannot find input file: $f" >&5
23351 echo "$as_me: error: cannot find input file: $f" >&2;}
23352    { (exit 1); exit 1; }; }
23353          fi;;
23354       esac
23355     done` || { (exit 1); exit 1; }
23356 EOF
23357 cat >>$CONFIG_STATUS <<\EOF
23358   ac_warn_datarootdir=no
23359   if test x"$ac_file" != x-; then
23360     for ac_item in $ac_file_inputs
23361     do
23362       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23363       if test -n "$ac_seen"; then
23364         ac_used=`grep '@datarootdir@' $ac_item`
23365         if test -z "$ac_used"; then
23366           { echo "$as_me:23366: WARNING: datarootdir was used implicitly but not set:
23367 $ac_seen" >&5
23368 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23369 $ac_seen" >&2;}
23370           ac_warn_datarootdir=yes
23371         fi
23372       fi
23373       ac_seen=`grep '${datarootdir}' $ac_item`
23374       if test -n "$ac_seen"; then
23375         { echo "$as_me:23375: WARNING: datarootdir was used explicitly but not set:
23376 $ac_seen" >&5
23377 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23378 $ac_seen" >&2;}
23379         ac_warn_datarootdir=yes
23380       fi
23381     done
23382   fi
23383
23384 if test "x$ac_warn_datarootdir" = xyes; then
23385   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23386 fi
23387
23388 EOF
23389 cat >>$CONFIG_STATUS <<EOF
23390   sed "$ac_vpsub
23391 $extrasub
23392 EOF
23393 cat >>$CONFIG_STATUS <<\EOF
23394 :t
23395 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23396 s,@configure_input@,$configure_input,;t t
23397 s,@srcdir@,$ac_srcdir,;t t
23398 s,@top_srcdir@,$ac_top_srcdir,;t t
23399 s,@INSTALL@,$ac_INSTALL,;t t
23400 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23401   rm -f $tmp/stdin
23402   if test x"$ac_file" != x-; then
23403     cp $tmp/out $ac_file
23404
23405     for ac_name in prefix exec_prefix datarootdir
23406     do
23407         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23408         if test -n "$ac_seen"; then
23409             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23410             if test -z "$ac_init"; then
23411               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23412               { echo "$as_me:23412: WARNING: Variable $ac_name is used but was not set:
23413 $ac_seen" >&5
23414 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23415 $ac_seen" >&2;}
23416             fi
23417         fi
23418     done
23419     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23420     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23421     if test -s $tmp/out; then
23422       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23423       { echo "$as_me:23423: WARNING: Some variables may not be substituted:
23424 $ac_seen" >&5
23425 echo "$as_me: WARNING: Some variables may not be substituted:
23426 $ac_seen" >&2;}
23427     fi
23428   else
23429     cat $tmp/out
23430   fi
23431   rm -f $tmp/out
23432
23433 done
23434 EOF
23435 cat >>$CONFIG_STATUS <<\EOF
23436
23437 #
23438 # CONFIG_HEADER section.
23439 #
23440
23441 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23442 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23443 #
23444 # ac_d sets the value in "#define NAME VALUE" lines.
23445 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23446 ac_dB='[        ].*$,\1#\2'
23447 ac_dC=' '
23448 ac_dD=',;t'
23449 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23450 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23451 ac_iB='\([      ]\),\1#\2define\3'
23452 ac_iC=' '
23453 ac_iD='\4,;t'
23454 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23455 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23456 ac_uB='$,\1#\2define\3'
23457 ac_uC=' '
23458 ac_uD=',;t'
23459
23460 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23461   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23462   case $ac_file in
23463   - | *:- | *:-:* ) # input from stdin
23464         cat >$tmp/stdin
23465         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23466         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23467   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23468         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23469   * )   ac_file_in=$ac_file.in ;;
23470   esac
23471
23472   test x"$ac_file" != x- && { echo "$as_me:23472: creating $ac_file" >&5
23473 echo "$as_me: creating $ac_file" >&6;}
23474
23475   # First look for the input files in the build tree, otherwise in the
23476   # src tree.
23477   ac_file_inputs=`IFS=:
23478     for f in $ac_file_in; do
23479       case $f in
23480       -) echo $tmp/stdin ;;
23481       [\\/$]*)
23482          # Absolute (can't be DOS-style, as IFS=:)
23483          test -f "$f" || { { echo "$as_me:23483: error: cannot find input file: $f" >&5
23484 echo "$as_me: error: cannot find input file: $f" >&2;}
23485    { (exit 1); exit 1; }; }
23486          echo $f;;
23487       *) # Relative
23488          if test -f "$f"; then
23489            # Build tree
23490            echo $f
23491          elif test -f "$srcdir/$f"; then
23492            # Source tree
23493            echo $srcdir/$f
23494          else
23495            # /dev/null tree
23496            { { echo "$as_me:23496: error: cannot find input file: $f" >&5
23497 echo "$as_me: error: cannot find input file: $f" >&2;}
23498    { (exit 1); exit 1; }; }
23499          fi;;
23500       esac
23501     done` || { (exit 1); exit 1; }
23502   # Remove the trailing spaces.
23503   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23504
23505 EOF
23506
23507 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23508 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23509 # be either 'cat' or 'sort'.
23510 cat confdefs.h | uniq >conftest.vals
23511
23512 # Break up conftest.vals because some shells have a limit on
23513 # the size of here documents, and old seds have small limits too.
23514
23515 rm -f conftest.tail
23516 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23517 while grep . conftest.vals >/dev/null
23518 do
23519   # Write chunks of a limited-size here document to conftest.frag.
23520   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23521   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23522   echo 'CEOF' >> $CONFIG_STATUS
23523   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23524   rm -f conftest.vals
23525   mv conftest.tail conftest.vals
23526 done
23527 rm -f conftest.vals
23528
23529 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23530 # marker @DEFS@.
23531 echo '  cat >> conftest.edit <<CEOF
23532 /@DEFS@/r conftest.frag
23533 /@DEFS@/d
23534 CEOF
23535 sed -f conftest.edit $tmp/in > $tmp/out
23536 rm -f $tmp/in
23537 mv $tmp/out $tmp/in
23538 rm -f conftest.edit conftest.frag
23539 ' >> $CONFIG_STATUS
23540
23541 cat >>$CONFIG_STATUS <<\EOF
23542   # Let's still pretend it is `configure' which instantiates (i.e., don't
23543   # use $as_me), people would be surprised to read:
23544   #    /* config.h.  Generated automatically by config.status.  */
23545   if test x"$ac_file" = x-; then
23546     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23547   else
23548     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23549   fi
23550   cat $tmp/in >>$tmp/config.h
23551   rm -f $tmp/in
23552   if test x"$ac_file" != x-; then
23553     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23554       { echo "$as_me:23554: $ac_file is unchanged" >&5
23555 echo "$as_me: $ac_file is unchanged" >&6;}
23556     else
23557       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23558          X"$ac_file" : 'X\(//\)[^/]' \| \
23559          X"$ac_file" : 'X\(//\)$' \| \
23560          X"$ac_file" : 'X\(/\)' \| \
23561          .     : '\(.\)' 2>/dev/null ||
23562 echo X"$ac_file" |
23563     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23564           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23565           /^X\(\/\/\)$/{ s//\1/; q; }
23566           /^X\(\/\).*/{ s//\1/; q; }
23567           s/.*/./; q'`
23568       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23569         { case "$ac_dir" in
23570   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23571   *)                      as_incr_dir=.;;
23572 esac
23573 as_dummy="$ac_dir"
23574 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23575   case $as_mkdir_dir in
23576     # Skip DOS drivespec
23577     ?:) as_incr_dir=$as_mkdir_dir ;;
23578     *)
23579       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23580       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23581     ;;
23582   esac
23583 done; }
23584
23585       fi
23586       rm -f $ac_file
23587       mv $tmp/config.h $ac_file
23588     fi
23589   else
23590     cat $tmp/config.h
23591     rm -f $tmp/config.h
23592   fi
23593 done
23594 EOF
23595 cat >>$CONFIG_STATUS <<\EOF
23596 #
23597 # CONFIG_COMMANDS section.
23598 #
23599 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23600   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23601   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23602
23603   case $ac_dest in
23604     default )
23605 if test "x$cf_with_tests" != xno ; then
23606
23607 for cf_dir in test
23608 do
23609         if test ! -d $srcdir/$cf_dir; then
23610                 continue
23611         elif test -f $srcdir/$cf_dir/programs; then
23612                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23613         fi
23614 done
23615
23616 fi
23617
23618 cf_prefix=$LIB_PREFIX
23619
23620 case $cf_cv_shlib_version in
23621 (cygdll|msysdll|mingw)
23622         TINFO_NAME=$TINFO_ARG_SUFFIX
23623         TINFO_SUFFIX=.dll
23624         ;;
23625 esac
23626
23627 if test -n "$TINFO_SUFFIX" ; then
23628         case $TINFO_SUFFIX in
23629         (tw*)
23630                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23631                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23632                 ;;
23633         (t*)
23634                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23635                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23636                 ;;
23637         (w*)
23638                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23639                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23640                 ;;
23641         esac
23642 fi
23643
23644 for cf_dir in $SRC_SUBDIRS
23645 do
23646         if test ! -d $srcdir/$cf_dir ; then
23647                 continue
23648         elif test -f $srcdir/$cf_dir/modules; then
23649
23650                 SHARED_LIB=
23651                 Libs_To_Make=
23652
23653                 cf_sed_options=
23654                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23655                 then
23656                         cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
23657                         cf_sed_options="$cf_sed_options -e \"/deprecated in ABI${cf_cv_abi_version}/d\""
23658                 fi
23659
23660                 if test "x$WILDCARD_SYMS" = xno
23661                 then
23662                         cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23663                 fi
23664
23665                 if test "x$cf_sed_options" != "x"
23666                 then
23667                         cat >>$cf_dir/Makefile <<CF_EOF
23668
23669 # Generated by CF_LIB_RULES
23670 resulting.map: $UNALTERED_SYMS
23671         sed $cf_sed_options < $UNALTERED_SYMS >\$@
23672
23673 distclean::
23674         rm -f resulting.map
23675 CF_EOF
23676                 fi
23677
23678                 for cf_item in $cf_LIST_MODELS
23679                 do
23680
23681         case X$cf_item in
23682         (Xlibtool)
23683                 cf_suffix='.la'
23684                 cf_depsuf=$cf_suffix
23685                 ;;
23686         (Xdebug)
23687                 cf_suffix='_g.a'
23688                 cf_depsuf=$cf_suffix
23689                 ;;
23690         (Xprofile)
23691                 cf_suffix='_p.a'
23692                 cf_depsuf=$cf_suffix
23693                 ;;
23694         (Xshared)
23695                 case $cf_cv_system_name in
23696                 (aix[5-7]*)
23697                         cf_suffix='.so'
23698                         cf_depsuf=$cf_suffix
23699                         ;;
23700                 (cygwin*|msys*|mingw*)
23701                         cf_suffix='.dll'
23702                         cf_depsuf='.dll.a'
23703                         ;;
23704                 (darwin*)
23705                         cf_suffix='.dylib'
23706                         cf_depsuf=$cf_suffix
23707                         ;;
23708                 (hpux*)
23709                         case $target in
23710                         (ia64*)
23711                                 cf_suffix='.so'
23712                                 cf_depsuf=$cf_suffix
23713                                 ;;
23714                         (*)
23715                                 cf_suffix='.sl'
23716                                 cf_depsuf=$cf_suffix
23717                                 ;;
23718                         esac
23719                         ;;
23720                 (*)
23721                         cf_suffix='.so'
23722                         cf_depsuf=$cf_suffix
23723                         ;;
23724                 esac
23725                 ;;
23726         (*)
23727                 cf_suffix='.a'
23728                 cf_depsuf=$cf_suffix
23729                 ;;
23730         esac
23731         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23732         then
23733                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23734                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23735         fi
23736
23737                         cf_libname=$cf_dir
23738                         test "$cf_dir" = c++ && cf_libname=ncurses++
23739                         if test $cf_item = shared ; then
23740                                 if test -n "${LIB_SUFFIX}"
23741                                 then
23742                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23743                                 else
23744                                         cf_shared_suffix="$cf_suffix"
23745                                 fi
23746                                 if test "$cf_cv_do_symlinks" = yes ; then
23747                                         cf_version_name=
23748
23749                                         case "$cf_cv_shlib_version" in
23750                                         (rel)
23751                                                 cf_version_name=REL_VERSION
23752                                                 ;;
23753                                         (abi)
23754                                                 cf_version_name=ABI_VERSION
23755                                                 ;;
23756                                         esac
23757
23758                                         if test -n "$cf_version_name"
23759                                         then
23760                                                 case "$cf_cv_system_name" in
23761                                                 (darwin*)
23762                                                         # "w", etc?
23763                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23764                                                         ;;
23765                                                 (*)
23766                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23767                                                         ;;
23768                                                 esac
23769                                         fi
23770                                         if test -n "${USE_LIB_SUFFIX}"
23771                                         then
23772                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23773                                         else
23774                                                 cf_shared_suffix="$cf_suffix"
23775                                         fi
23776                                 fi
23777                                 # cygwin needs import library, and has unique naming convention
23778                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23779                                 # use 'cyg' prefix for shared lib.
23780                                 case $cf_cv_shlib_version in
23781                                 (cygdll)
23782                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23783                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23784                                         ;;
23785                                 (msysdll)
23786                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23787                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23788                                         ;;
23789                                 (mingw)
23790                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23791                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
23792                                         ;;
23793                                 (*)
23794                                         cf_add_lib=
23795                                         ;;
23796                                 esac
23797                                 if test -n "$cf_add_lib"
23798                                 then
23799                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23800                                         continue
23801                                 fi
23802                         fi
23803                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23804                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23805                 done
23806
23807                 if test $cf_dir = ncurses ; then
23808                         cf_subsets="$LIB_SUBSETS"
23809                         cf_r_parts="$cf_subsets"
23810                         cf_liblist="$Libs_To_Make"
23811
23812                         while test -n "$cf_r_parts"
23813                         do
23814                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23815                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23816                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23817                                         cf_add_lib=
23818                                         case $cf_l_parts in
23819                                         (*termlib*)
23820                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23821                                                 ;;
23822                                         (*ticlib*)
23823                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23824                                                 ;;
23825                                         (*)
23826                                                 break
23827                                                 ;;
23828                                         esac
23829                                         if test -n "$cf_add_lib"; then
23830                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
23831                                         fi
23832                                 else
23833                                         break
23834                                 fi
23835                         done
23836                 else
23837                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23838                 fi
23839
23840                 if test $cf_dir = c++; then
23841                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23842                                 cf_list=
23843                                 for cf_item in $Libs_To_Make
23844                                 do
23845                                         case $cf_item in
23846                                         (*.a)
23847                                                 ;;
23848                                         (*)
23849                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23850                                                 ;;
23851                                         esac
23852                                         for cf_test in $cf_list
23853                                         do
23854                                                 if test "$cf_test" = "$cf_item"
23855                                                 then
23856                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23857                                                         cf_item=
23858                                                         break
23859                                                 fi
23860                                         done
23861                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23862                                 done
23863                                 Libs_To_Make="$cf_list"
23864                         fi
23865                 fi
23866
23867                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23868                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23869                         $cf_dir/Makefile >$cf_dir/Makefile.out
23870                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23871
23872                 $AWK -f $srcdir/mk-0th.awk \
23873                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23874                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23875
23876                 for cf_subset in $cf_subsets
23877                 do
23878                         cf_subdirs=
23879                         for cf_item in $cf_LIST_MODELS
23880                         do
23881
23882                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23883
23884 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23885
23886                         CXX_MODEL=$cf_ITEM
23887                         if test "$CXX_MODEL" = SHARED; then
23888                                 case $cf_cv_shlib_version in
23889                                 (cygdll|msysdll|mingw)
23890                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23891
23892 echo "${as_me:-configure}:23892: testing overriding CXX_MODEL to SHARED ..." 1>&5
23893
23894                                         with_shared_cxx=yes
23895                                         ;;
23896                                 (*)
23897                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23898                                         ;;
23899                                 esac
23900                         fi
23901
23902         case X$cf_item in
23903         (Xlibtool)
23904                 cf_suffix='.la'
23905                 cf_depsuf=$cf_suffix
23906                 ;;
23907         (Xdebug)
23908                 cf_suffix='_g.a'
23909                 cf_depsuf=$cf_suffix
23910                 ;;
23911         (Xprofile)
23912                 cf_suffix='_p.a'
23913                 cf_depsuf=$cf_suffix
23914                 ;;
23915         (Xshared)
23916                 case $cf_cv_system_name in
23917                 (aix[5-7]*)
23918                         cf_suffix='.so'
23919                         cf_depsuf=$cf_suffix
23920                         ;;
23921                 (cygwin*|msys*|mingw*)
23922                         cf_suffix='.dll'
23923                         cf_depsuf='.dll.a'
23924                         ;;
23925                 (darwin*)
23926                         cf_suffix='.dylib'
23927                         cf_depsuf=$cf_suffix
23928                         ;;
23929                 (hpux*)
23930                         case $target in
23931                         (ia64*)
23932                                 cf_suffix='.so'
23933                                 cf_depsuf=$cf_suffix
23934                                 ;;
23935                         (*)
23936                                 cf_suffix='.sl'
23937                                 cf_depsuf=$cf_suffix
23938                                 ;;
23939                         esac
23940                         ;;
23941                 (*)
23942                         cf_suffix='.so'
23943                         cf_depsuf=$cf_suffix
23944                         ;;
23945                 esac
23946                 ;;
23947         (*)
23948                 cf_suffix='.a'
23949                 cf_depsuf=$cf_suffix
23950                 ;;
23951         esac
23952         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23953         then
23954                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23955                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23956         fi
23957
23958         case $cf_item in
23959         (libtool) cf_subdir='obj_lo'  ;;
23960         (normal)  cf_subdir='objects' ;;
23961         (debug)   cf_subdir='obj_g' ;;
23962         (profile) cf_subdir='obj_p' ;;
23963         (shared)
23964                 case $cf_cv_system_name in
23965                 (cygwin|msys)
23966                         cf_subdir='objects' ;;
23967                 (*)
23968                         cf_subdir='obj_s' ;;
23969                 esac
23970         esac
23971
23972                         # Test for case where we build libtinfo with a different name.
23973                         cf_libname=$cf_dir
23974                         if test $cf_dir = ncurses ; then
23975                                 case $cf_subset in
23976                                 (*base*)
23977                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
23978                                         ;;
23979                                 (*termlib*)
23980                                         cf_libname=$TINFO_LIB_SUFFIX
23981                                         ;;
23982                                 (ticlib*)
23983                                         cf_libname=$TICS_LIB_SUFFIX
23984                                         ;;
23985                                 esac
23986                         elif test $cf_dir = c++ ; then
23987                                 cf_libname=ncurses++$USE_LIB_SUFFIX
23988                         else
23989                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
23990                         fi
23991                         if test -n "${USE_ARG_SUFFIX}" ; then
23992                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
23993                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
23994                         fi
23995
23996                         # These dependencies really are for development, not
23997                         # builds, but they are useful in porting, too.
23998                         cf_depend="../include/ncurses_cfg.h"
23999                         if test "$srcdir" = "."; then
24000                                 cf_reldir="."
24001                         else
24002                                 cf_reldir="\${srcdir}"
24003                         fi
24004
24005                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
24006                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
24007                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
24008                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
24009                         fi
24010
24011                         cf_dir_suffix=
24012                         old_cf_suffix="$cf_suffix"
24013                         if test "$cf_cv_shlib_version_infix" = yes ; then
24014                         if test -n "$USE_LIB_SUFFIX" ; then
24015                                 case $USE_LIB_SUFFIX in
24016                                 (tw*)
24017                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
24018                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
24019                                         cf_dir_suffix=tw$EXTRA_SUFFIX
24020                                         ;;
24021                                 (t*)
24022                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
24023                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
24024                                         cf_dir_suffix=t$EXTRA_SUFFIX
24025                                         ;;
24026                                 (w*)
24027                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
24028                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
24029                                         cf_dir_suffix=w$EXTRA_SUFFIX
24030                                         ;;
24031                                 (*)
24032                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
24033                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
24034                                         cf_dir_suffix=$EXTRA_SUFFIX
24035                                         ;;
24036                                 esac
24037                         fi
24038                         fi
24039
24040                         $AWK -f $srcdir/mk-1st.awk \
24041                                 name=${cf_libname}${cf_dir_suffix} \
24042                                 traces=$LIB_TRACING \
24043                                 MODEL=$cf_ITEM \
24044                                 CXX_MODEL=$CXX_MODEL \
24045                                 model=$cf_subdir \
24046                                 prefix=$cf_prefix \
24047                                 suffix=$cf_suffix \
24048                                 subset=$cf_subset \
24049                                 driver=$cf_cv_term_driver \
24050                                 SymLink="$LN_S" \
24051                                 TermlibRoot=$TINFO_NAME \
24052                                 TermlibSuffix=$TINFO_SUFFIX \
24053                                 ShlibVer=$cf_cv_shlib_version \
24054                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
24055                                 ReLink=${cf_cv_do_relink:-no} \
24056                                 DoLinks=$cf_cv_do_symlinks \
24057                                 rmSoLocs=$cf_cv_rm_so_locs \
24058                                 ldconfig="$LDCONFIG" \
24059                                 overwrite=$WITH_OVERWRITE \
24060                                 depend="$cf_depend" \
24061                                 host="$host" \
24062                                 libtool_version="$LIBTOOL_VERSION" \
24063                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24064
24065                         cf_suffix="$old_cf_suffix"
24066
24067                         for cf_subdir2 in $cf_subdirs lib
24068                         do
24069                                 test $cf_subdir = $cf_subdir2 && break
24070                         done
24071                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
24072                         $AWK -f $srcdir/mk-2nd.awk \
24073                                 name=$cf_dir \
24074                                 traces=$LIB_TRACING \
24075                                 MODEL=$cf_ITEM \
24076                                 model=$cf_subdir \
24077                                 subset=$cf_subset \
24078                                 srcdir=$srcdir \
24079                                 echo=$WITH_ECHO \
24080                                 crenames=$cf_cv_prog_CC_c_o \
24081                                 cxxrenames=$cf_cv_prog_CXX_c_o \
24082                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
24083                         cf_subdirs="$cf_subdirs $cf_subdir"
24084                         done
24085                 done
24086         fi
24087
24088         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
24089 done
24090
24091 for cf_dir in $SRC_SUBDIRS
24092 do
24093         if test ! -d $srcdir/$cf_dir ; then
24094                 continue
24095         fi
24096
24097         if test -f $cf_dir/Makefile ; then
24098                 case "$cf_dir" in
24099                 (Ada95)
24100                         echo 'libs \' >> Makefile
24101                         echo 'install.libs \' >> Makefile
24102                         echo 'uninstall.libs ::' >> Makefile
24103                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
24104                         ;;
24105                 esac
24106         fi
24107
24108         if test -f $srcdir/$cf_dir/modules; then
24109                 echo >> Makefile
24110                 if test -f $srcdir/$cf_dir/headers; then
24111 cat >> Makefile <<CF_EOF
24112 install.includes \\
24113 uninstall.includes \\
24114 CF_EOF
24115                 fi
24116 if test "$cf_dir" != "c++" ; then
24117 echo 'lint \' >> Makefile
24118 fi
24119 cat >> Makefile <<CF_EOF
24120 libs \\
24121 lintlib \\
24122 install.libs \\
24123 uninstall.libs \\
24124 install.$cf_dir \\
24125 uninstall.$cf_dir ::
24126         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24127 CF_EOF
24128         elif test -f $srcdir/$cf_dir/headers; then
24129 cat >> Makefile <<CF_EOF
24130
24131 libs \\
24132 install.libs \\
24133 uninstall.libs \\
24134 install.includes \\
24135 uninstall.includes ::
24136         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
24137 CF_EOF
24138 fi
24139 done
24140
24141 if test "x$cf_with_db_install" = xyes; then
24142 cat >> Makefile <<CF_EOF
24143
24144 install.libs uninstall.libs \\
24145 install.data uninstall.data ::
24146 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24147 CF_EOF
24148 else
24149 cat >> Makefile <<CF_EOF
24150
24151 install.libs uninstall.libs ::
24152         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
24153 CF_EOF
24154 fi
24155
24156 if test "x$cf_with_manpages" = xyes; then
24157 cat >> Makefile <<CF_EOF
24158
24159 install.man \\
24160 uninstall.man ::
24161         cd man && \${MAKE} \${TOP_MFLAGS} \$@
24162 CF_EOF
24163 fi
24164
24165 cat >> Makefile <<CF_EOF
24166
24167 distclean ::
24168         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
24169         rm -f headers.sh headers.sed mk_shared_lib.sh
24170         rm -f edit_man.* man_alias.*
24171         rm -rf \${DIRS_TO_MAKE}
24172 CF_EOF
24173
24174 # Special case: tack's manpage lives in its own directory.
24175 if test "x$cf_with_manpages" = xyes; then
24176 if test -d tack ; then
24177 if test -f $srcdir/$tack.h; then
24178 cat >> Makefile <<CF_EOF
24179
24180 install.man \\
24181 uninstall.man ::
24182         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
24183 CF_EOF
24184 fi
24185 fi
24186 fi
24187
24188 rm -f headers.sed headers.sh
24189
24190 echo creating headers.sh
24191 cat >headers.sh <<CF_EOF
24192 #! $SHELL
24193 # This shell script is generated by the 'configure' script.  It is invoked in a
24194 # subdirectory of the build tree.  It generates a sed-script in the parent
24195 # directory that is used to adjust includes for header files that reside in a
24196 # subdirectory of /usr/include, etc.
24197 PRG=""
24198 while test \$# != 3
24199 do
24200 PRG="\$PRG \$1"; shift
24201 done
24202 DST=\$1
24203 REF=\$2
24204 SRC=\$3
24205 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24206 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24207 echo installing \$SRC in \$DST
24208 CF_EOF
24209
24210 if test $WITH_CURSES_H = yes; then
24211         cat >>headers.sh <<CF_EOF
24212 case \$DST in
24213 (/*/include/*)
24214         END=\`basename \$DST\`
24215         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24216         do
24217                 NAME=\`basename \$i\`
24218                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24219         done
24220         ;;
24221 (*)
24222         echo "" >> \$TMPSED
24223         ;;
24224 esac
24225 CF_EOF
24226
24227 else
24228         cat >>headers.sh <<CF_EOF
24229 case \$DST in
24230 (/*/include/*)
24231         END=\`basename \$DST\`
24232         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24233         do
24234                 NAME=\`basename \$i\`
24235                 if test "\$NAME" = "curses.h"
24236                 then
24237                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24238                         NAME=ncurses.h
24239                 fi
24240                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24241         done
24242         ;;
24243 (*)
24244         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24245         ;;
24246 esac
24247 CF_EOF
24248 fi
24249 cat >>headers.sh <<CF_EOF
24250 rm -f \$TMPSRC
24251 sed -f \$TMPSED \$SRC > \$TMPSRC
24252 NAME=\`basename \$SRC\`
24253 CF_EOF
24254 if test $WITH_CURSES_H != yes; then
24255         cat >>headers.sh <<CF_EOF
24256 test "\$NAME" = "curses.h" && NAME=ncurses.h
24257 CF_EOF
24258 fi
24259 cat >>headers.sh <<CF_EOF
24260 # Just in case someone gzip'd manpages, remove the conflicting copy.
24261 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24262
24263 eval \$PRG \$TMPSRC \$DST/\$NAME
24264 rm -f \$TMPSRC \$TMPSED
24265 CF_EOF
24266
24267 chmod 0755 headers.sh
24268
24269 for cf_dir in $SRC_SUBDIRS
24270 do
24271         if test ! -d $srcdir/$cf_dir ; then
24272                 continue
24273         fi
24274
24275         if test -f $srcdir/$cf_dir/headers; then
24276                 $AWK -f $srcdir/mk-hdr.awk \
24277                         subset="$LIB_SUBSETS" \
24278                         compat="$WITH_CURSES_H" \
24279                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24280         fi
24281
24282         if test -f $srcdir/$cf_dir/modules; then
24283                 if test "$cf_dir" != "c++" ; then
24284                         cat >>$cf_dir/Makefile <<"CF_EOF"
24285 depend : ${AUTO_SRC}
24286         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24287
24288 # DO NOT DELETE THIS LINE -- make depend depends on it.
24289 CF_EOF
24290                 fi
24291         fi
24292 done
24293
24294 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24295 if test -z "$USE_OLD_MAKERULES" ; then
24296         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24297 fi
24298 fi
24299  ;;
24300   esac
24301 done
24302 EOF
24303
24304 cat >>$CONFIG_STATUS <<\EOF
24305
24306 { (exit 0); exit 0; }
24307 EOF
24308 chmod +x $CONFIG_STATUS
24309 ac_clean_files=$ac_clean_files_save
24310
24311 # configure is writing to config.log, and then calls config.status.
24312 # config.status does its own redirection, appending to config.log.
24313 # Unfortunately, on DOS this fails, as config.log is still kept open
24314 # by configure, so config.status won't be able to write to it; its
24315 # output is simply discarded.  So we exec the FD to /dev/null,
24316 # effectively closing config.log, so it can be properly (re)opened and
24317 # appended to by config.status.  When coming back to configure, we
24318 # need to make the FD available again.
24319 if test "$no_create" != yes; then
24320   ac_cs_success=:
24321   exec 5>/dev/null
24322   $SHELL $CONFIG_STATUS || ac_cs_success=false
24323   exec 5>>config.log
24324   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24325   # would make configure fail if this is the last instruction.
24326   $ac_cs_success || { (exit 1); exit 1; }
24327 fi
24328 ${MAKE:-make} preinstall