]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ae336f77229671287c2838594c1feee9674ad794
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.613 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20141204.
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.20141204.  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   { echo "$as_me:1302: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1303 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1304  cf_cv_abi_version=$withval
1305 fi;
1306
1307 if test -n "$cf_cv_abi_version" ; then
1308   case $cf_cv_abi_version in
1309   ([0-9]*)
1310         ;;
1311   (*)
1312         { { echo "$as_me:1312: error: ABI version is not a number: $cf_cv_abi_version" >&5
1313 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1314    { (exit 1); exit 1; }; }
1315         ;;
1316   esac
1317 else
1318   { { echo "$as_me:1318: error: ABI version value is empty" >&5
1319 echo "$as_me: error: ABI version value is empty" >&2;}
1320    { (exit 1); exit 1; }; }
1321 fi
1322
1323 ac_aux_dir=
1324 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1325   if test -f $ac_dir/install-sh; then
1326     ac_aux_dir=$ac_dir
1327     ac_install_sh="$ac_aux_dir/install-sh -c"
1328     break
1329   elif test -f $ac_dir/install.sh; then
1330     ac_aux_dir=$ac_dir
1331     ac_install_sh="$ac_aux_dir/install.sh -c"
1332     break
1333   elif test -f $ac_dir/shtool; then
1334     ac_aux_dir=$ac_dir
1335     ac_install_sh="$ac_aux_dir/shtool install -c"
1336     break
1337   fi
1338 done
1339 if test -z "$ac_aux_dir"; then
1340   { { echo "$as_me:1340: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1341 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1342    { (exit 1); exit 1; }; }
1343 fi
1344 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1345 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1346 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1347
1348 # Make sure we can run config.sub.
1349 $ac_config_sub sun4 >/dev/null 2>&1 ||
1350   { { echo "$as_me:1350: error: cannot run $ac_config_sub" >&5
1351 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1352    { (exit 1); exit 1; }; }
1353
1354 echo "$as_me:1354: checking build system type" >&5
1355 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1356 if test "${ac_cv_build+set}" = set; then
1357   echo $ECHO_N "(cached) $ECHO_C" >&6
1358 else
1359   ac_cv_build_alias=$build_alias
1360 test -z "$ac_cv_build_alias" &&
1361   ac_cv_build_alias=`$ac_config_guess`
1362 test -z "$ac_cv_build_alias" &&
1363   { { echo "$as_me:1363: error: cannot guess build type; you must specify one" >&5
1364 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1365    { (exit 1); exit 1; }; }
1366 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1367   { { echo "$as_me:1367: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1368 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1369    { (exit 1); exit 1; }; }
1370
1371 fi
1372 echo "$as_me:1372: result: $ac_cv_build" >&5
1373 echo "${ECHO_T}$ac_cv_build" >&6
1374 build=$ac_cv_build
1375 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1376 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1377 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1378
1379 echo "$as_me:1379: checking host system type" >&5
1380 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1381 if test "${ac_cv_host+set}" = set; then
1382   echo $ECHO_N "(cached) $ECHO_C" >&6
1383 else
1384   ac_cv_host_alias=$host_alias
1385 test -z "$ac_cv_host_alias" &&
1386   ac_cv_host_alias=$ac_cv_build_alias
1387 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1388   { { echo "$as_me:1388: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1389 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1390    { (exit 1); exit 1; }; }
1391
1392 fi
1393 echo "$as_me:1393: result: $ac_cv_host" >&5
1394 echo "${ECHO_T}$ac_cv_host" >&6
1395 host=$ac_cv_host
1396 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1397 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1398 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1399
1400 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1401         echo "$as_me:1401: checking target system type" >&5
1402 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1403 if test "${ac_cv_target+set}" = set; then
1404   echo $ECHO_N "(cached) $ECHO_C" >&6
1405 else
1406   ac_cv_target_alias=$target_alias
1407 test "x$ac_cv_target_alias" = "x" &&
1408   ac_cv_target_alias=$ac_cv_host_alias
1409 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1410   { { echo "$as_me:1410: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1411 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1412    { (exit 1); exit 1; }; }
1413
1414 fi
1415 echo "$as_me:1415: result: $ac_cv_target" >&5
1416 echo "${ECHO_T}$ac_cv_target" >&6
1417 target=$ac_cv_target
1418 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1419 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1420 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1421
1422 # The aliases save the names the user supplied, while $host etc.
1423 # will get canonicalized.
1424 test -n "$target_alias" &&
1425   test "$program_prefix$program_suffix$program_transform_name" = \
1426     NONENONEs,x,x, &&
1427   program_prefix=${target_alias}-
1428         system_name="$host_os"
1429 else
1430         system_name="`(uname -s -r) 2>/dev/null`"
1431         if test -z "$system_name" ; then
1432                 system_name="`(hostname) 2>/dev/null`"
1433         fi
1434 fi
1435 test -n "$system_name" &&
1436 cat >>confdefs.h <<EOF
1437 #define SYSTEM_NAME "$system_name"
1438 EOF
1439
1440 if test "${cf_cv_system_name+set}" = set; then
1441   echo $ECHO_N "(cached) $ECHO_C" >&6
1442 else
1443   cf_cv_system_name="$system_name"
1444 fi
1445
1446 test -z "$system_name" && system_name="$cf_cv_system_name"
1447 test -n "$cf_cv_system_name" && echo "$as_me:1447: result: Configuring for $cf_cv_system_name" >&5
1448 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1449
1450 if test ".$system_name" != ".$cf_cv_system_name" ; then
1451         echo "$as_me:1451: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1452 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1453         { { echo "$as_me:1453: error: \"Please remove config.cache and try again.\"" >&5
1454 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1455    { (exit 1); exit 1; }; }
1456 fi
1457
1458 # Check whether --with-system-type or --without-system-type was given.
1459 if test "${with_system_type+set}" = set; then
1460   withval="$with_system_type"
1461   { echo "$as_me:1461: WARNING: overriding system type to $withval" >&5
1462 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1463         cf_cv_system_name=$withval
1464         host_os=$withval
1465
1466 fi;
1467
1468 ###     Save the given $CFLAGS to allow user-override.
1469 cf_user_CFLAGS="$CFLAGS"
1470
1471 ###     Default install-location
1472
1473 echo "$as_me:1473: checking for prefix" >&5
1474 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1475 if test "x$prefix" = "xNONE" ; then
1476         case "$cf_cv_system_name" in
1477                 # non-vendor systems don't have a conflict
1478         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1479                 prefix=/usr
1480                 ;;
1481         (*)     prefix=$ac_default_prefix
1482                 ;;
1483         esac
1484 fi
1485 echo "$as_me:1485: result: $prefix" >&5
1486 echo "${ECHO_T}$prefix" >&6
1487
1488 if test "x$prefix" = "xNONE" ; then
1489 echo "$as_me:1489: checking for default include-directory" >&5
1490 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1491 test -n "$verbose" && echo 1>&6
1492 for cf_symbol in \
1493         $includedir \
1494         $includedir/ncurses \
1495         $prefix/include \
1496         $prefix/include/ncurses \
1497         /usr/local/include \
1498         /usr/local/include/ncurses \
1499         /usr/include \
1500         /usr/include/ncurses
1501 do
1502         cf_dir=`eval echo $cf_symbol`
1503         if test -f $cf_dir/curses.h ; then
1504         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1505                 includedir="$cf_symbol"
1506                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1507                 break
1508         fi
1509         fi
1510         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1511 done
1512 echo "$as_me:1512: result: $includedir" >&5
1513 echo "${ECHO_T}$includedir" >&6
1514 fi
1515
1516 ### Defaults for ncurses ABI
1517
1518 case x$cf_cv_abi_version in
1519 (x6)
1520         cf_dft_ext_colors=yes
1521         cf_dft_ext_const=yes
1522         cf_dft_ext_mouse=yes
1523         cf_dft_ext_putwin=yes
1524         cf_dft_ext_spfuncs=yes
1525         cf_dft_chtype=uint32_t
1526         cf_dft_mmask_t=uint32_t
1527         cf_dft_interop=yes
1528         cf_dft_tparm_arg=intptr_t
1529         ;;
1530 (*)
1531         cf_dft_ext_colors=no
1532         cf_dft_ext_const=no
1533         cf_dft_ext_mouse=no
1534         cf_dft_ext_putwin=no
1535         cf_dft_ext_spfuncs=no
1536         cf_dft_chtype=auto
1537         cf_dft_mmask_t=auto
1538         cf_dft_interop=no
1539         cf_dft_tparm_arg=long
1540         ;;
1541 esac
1542
1543 ###     Checks for programs.
1544
1545 # Check whether --with-ada or --without-ada was given.
1546 if test "${with_ada+set}" = set; then
1547   withval="$with_ada"
1548   cf_with_ada=$withval
1549 else
1550   cf_with_ada=yes
1551 fi;
1552 if test "x$cf_with_ada" = xyes
1553 then
1554         cf_PROG_CC="gnatgcc gcc cc"
1555 else
1556         cf_PROG_CC="gcc cc"
1557 fi
1558
1559 ac_ext=c
1560 ac_cpp='$CPP $CPPFLAGS'
1561 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1562 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1563 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1564 ac_main_return=return
1565 if test -n "$ac_tool_prefix"; then
1566   for ac_prog in $cf_PROG_CC
1567   do
1568     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1569 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1570 echo "$as_me:1570: checking for $ac_word" >&5
1571 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1572 if test "${ac_cv_prog_CC+set}" = set; then
1573   echo $ECHO_N "(cached) $ECHO_C" >&6
1574 else
1575   if test -n "$CC"; then
1576   ac_cv_prog_CC="$CC" # Let the user override the test.
1577 else
1578   ac_save_IFS=$IFS; IFS=$ac_path_separator
1579 ac_dummy="$PATH"
1580 for ac_dir in $ac_dummy; do
1581   IFS=$ac_save_IFS
1582   test -z "$ac_dir" && ac_dir=.
1583   $as_executable_p "$ac_dir/$ac_word" || continue
1584 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1585 echo "$as_me:1585: found $ac_dir/$ac_word" >&5
1586 break
1587 done
1588
1589 fi
1590 fi
1591 CC=$ac_cv_prog_CC
1592 if test -n "$CC"; then
1593   echo "$as_me:1593: result: $CC" >&5
1594 echo "${ECHO_T}$CC" >&6
1595 else
1596   echo "$as_me:1596: result: no" >&5
1597 echo "${ECHO_T}no" >&6
1598 fi
1599
1600     test -n "$CC" && break
1601   done
1602 fi
1603 if test -z "$CC"; then
1604   ac_ct_CC=$CC
1605   for ac_prog in $cf_PROG_CC
1606 do
1607   # Extract the first word of "$ac_prog", so it can be a program name with args.
1608 set dummy $ac_prog; ac_word=$2
1609 echo "$as_me:1609: checking for $ac_word" >&5
1610 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1611 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1612   echo $ECHO_N "(cached) $ECHO_C" >&6
1613 else
1614   if test -n "$ac_ct_CC"; then
1615   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1616 else
1617   ac_save_IFS=$IFS; IFS=$ac_path_separator
1618 ac_dummy="$PATH"
1619 for ac_dir in $ac_dummy; do
1620   IFS=$ac_save_IFS
1621   test -z "$ac_dir" && ac_dir=.
1622   $as_executable_p "$ac_dir/$ac_word" || continue
1623 ac_cv_prog_ac_ct_CC="$ac_prog"
1624 echo "$as_me:1624: found $ac_dir/$ac_word" >&5
1625 break
1626 done
1627
1628 fi
1629 fi
1630 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1631 if test -n "$ac_ct_CC"; then
1632   echo "$as_me:1632: result: $ac_ct_CC" >&5
1633 echo "${ECHO_T}$ac_ct_CC" >&6
1634 else
1635   echo "$as_me:1635: result: no" >&5
1636 echo "${ECHO_T}no" >&6
1637 fi
1638
1639   test -n "$ac_ct_CC" && break
1640 done
1641
1642   CC=$ac_ct_CC
1643 fi
1644
1645 test -z "$CC" && { { echo "$as_me:1645: error: no acceptable cc found in \$PATH" >&5
1646 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1647    { (exit 1); exit 1; }; }
1648
1649 # Provide some information about the compiler.
1650 echo "$as_me:1650:" \
1651      "checking for C compiler version" >&5
1652 ac_compiler=`set X $ac_compile; echo $2`
1653 { (eval echo "$as_me:1653: \"$ac_compiler --version </dev/null >&5\"") >&5
1654   (eval $ac_compiler --version </dev/null >&5) 2>&5
1655   ac_status=$?
1656   echo "$as_me:1656: \$? = $ac_status" >&5
1657   (exit $ac_status); }
1658 { (eval echo "$as_me:1658: \"$ac_compiler -v </dev/null >&5\"") >&5
1659   (eval $ac_compiler -v </dev/null >&5) 2>&5
1660   ac_status=$?
1661   echo "$as_me:1661: \$? = $ac_status" >&5
1662   (exit $ac_status); }
1663 { (eval echo "$as_me:1663: \"$ac_compiler -V </dev/null >&5\"") >&5
1664   (eval $ac_compiler -V </dev/null >&5) 2>&5
1665   ac_status=$?
1666   echo "$as_me:1666: \$? = $ac_status" >&5
1667   (exit $ac_status); }
1668
1669 cat >conftest.$ac_ext <<_ACEOF
1670 #line 1670 "configure"
1671 #include "confdefs.h"
1672
1673 int
1674 main ()
1675 {
1676
1677   ;
1678   return 0;
1679 }
1680 _ACEOF
1681 ac_clean_files_save=$ac_clean_files
1682 ac_clean_files="$ac_clean_files a.out a.exe"
1683 # Try to create an executable without -o first, disregard a.out.
1684 # It will help us diagnose broken compilers, and finding out an intuition
1685 # of exeext.
1686 echo "$as_me:1686: checking for C compiler default output" >&5
1687 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1688 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1689 if { (eval echo "$as_me:1689: \"$ac_link_default\"") >&5
1690   (eval $ac_link_default) 2>&5
1691   ac_status=$?
1692   echo "$as_me:1692: \$? = $ac_status" >&5
1693   (exit $ac_status); }; then
1694   # Find the output, starting from the most likely.  This scheme is
1695 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1696 # resort.
1697 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1698                 ls a.out conftest 2>/dev/null;
1699                 ls a.* conftest.* 2>/dev/null`; do
1700   case $ac_file in
1701     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1702     a.out ) # We found the default executable, but exeext='' is most
1703             # certainly right.
1704             break;;
1705     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1706           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1707           export ac_cv_exeext
1708           break;;
1709     * ) break;;
1710   esac
1711 done
1712 else
1713   echo "$as_me: failed program was:" >&5
1714 cat conftest.$ac_ext >&5
1715 { { echo "$as_me:1715: error: C compiler cannot create executables" >&5
1716 echo "$as_me: error: C compiler cannot create executables" >&2;}
1717    { (exit 77); exit 77; }; }
1718 fi
1719
1720 ac_exeext=$ac_cv_exeext
1721 echo "$as_me:1721: result: $ac_file" >&5
1722 echo "${ECHO_T}$ac_file" >&6
1723
1724 # Check the compiler produces executables we can run.  If not, either
1725 # the compiler is broken, or we cross compile.
1726 echo "$as_me:1726: checking whether the C compiler works" >&5
1727 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1728 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1729 # If not cross compiling, check that we can run a simple program.
1730 if test "$cross_compiling" != yes; then
1731   if { ac_try='./$ac_file'
1732   { (eval echo "$as_me:1732: \"$ac_try\"") >&5
1733   (eval $ac_try) 2>&5
1734   ac_status=$?
1735   echo "$as_me:1735: \$? = $ac_status" >&5
1736   (exit $ac_status); }; }; then
1737     cross_compiling=no
1738   else
1739     if test "$cross_compiling" = maybe; then
1740         cross_compiling=yes
1741     else
1742         { { echo "$as_me:1742: error: cannot run C compiled programs.
1743 If you meant to cross compile, use \`--host'." >&5
1744 echo "$as_me: error: cannot run C compiled programs.
1745 If you meant to cross compile, use \`--host'." >&2;}
1746    { (exit 1); exit 1; }; }
1747     fi
1748   fi
1749 fi
1750 echo "$as_me:1750: result: yes" >&5
1751 echo "${ECHO_T}yes" >&6
1752
1753 rm -f a.out a.exe conftest$ac_cv_exeext
1754 ac_clean_files=$ac_clean_files_save
1755 # Check the compiler produces executables we can run.  If not, either
1756 # the compiler is broken, or we cross compile.
1757 echo "$as_me:1757: checking whether we are cross compiling" >&5
1758 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1759 echo "$as_me:1759: result: $cross_compiling" >&5
1760 echo "${ECHO_T}$cross_compiling" >&6
1761
1762 echo "$as_me:1762: checking for executable suffix" >&5
1763 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1764 if { (eval echo "$as_me:1764: \"$ac_link\"") >&5
1765   (eval $ac_link) 2>&5
1766   ac_status=$?
1767   echo "$as_me:1767: \$? = $ac_status" >&5
1768   (exit $ac_status); }; then
1769   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1770 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1771 # work properly (i.e., refer to `conftest.exe'), while it won't with
1772 # `rm'.
1773 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1774   case $ac_file in
1775     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1776     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1777           export ac_cv_exeext
1778           break;;
1779     * ) break;;
1780   esac
1781 done
1782 else
1783   { { echo "$as_me:1783: error: cannot compute EXEEXT: cannot compile and link" >&5
1784 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1785    { (exit 1); exit 1; }; }
1786 fi
1787
1788 rm -f conftest$ac_cv_exeext
1789 echo "$as_me:1789: result: $ac_cv_exeext" >&5
1790 echo "${ECHO_T}$ac_cv_exeext" >&6
1791
1792 rm -f conftest.$ac_ext
1793 EXEEXT=$ac_cv_exeext
1794 ac_exeext=$EXEEXT
1795 echo "$as_me:1795: checking for object suffix" >&5
1796 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1797 if test "${ac_cv_objext+set}" = set; then
1798   echo $ECHO_N "(cached) $ECHO_C" >&6
1799 else
1800   cat >conftest.$ac_ext <<_ACEOF
1801 #line 1801 "configure"
1802 #include "confdefs.h"
1803
1804 int
1805 main ()
1806 {
1807
1808   ;
1809   return 0;
1810 }
1811 _ACEOF
1812 rm -f conftest.o conftest.obj
1813 if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5
1814   (eval $ac_compile) 2>&5
1815   ac_status=$?
1816   echo "$as_me:1816: \$? = $ac_status" >&5
1817   (exit $ac_status); }; then
1818   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1819   case $ac_file in
1820     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1821     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1822        break;;
1823   esac
1824 done
1825 else
1826   echo "$as_me: failed program was:" >&5
1827 cat conftest.$ac_ext >&5
1828 { { echo "$as_me:1828: error: cannot compute OBJEXT: cannot compile" >&5
1829 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1830    { (exit 1); exit 1; }; }
1831 fi
1832
1833 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1834 fi
1835 echo "$as_me:1835: result: $ac_cv_objext" >&5
1836 echo "${ECHO_T}$ac_cv_objext" >&6
1837 OBJEXT=$ac_cv_objext
1838 ac_objext=$OBJEXT
1839 echo "$as_me:1839: checking whether we are using the GNU C compiler" >&5
1840 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1841 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1842   echo $ECHO_N "(cached) $ECHO_C" >&6
1843 else
1844   cat >conftest.$ac_ext <<_ACEOF
1845 #line 1845 "configure"
1846 #include "confdefs.h"
1847
1848 int
1849 main ()
1850 {
1851 #ifndef __GNUC__
1852        choke me
1853 #endif
1854
1855   ;
1856   return 0;
1857 }
1858 _ACEOF
1859 rm -f conftest.$ac_objext
1860 if { (eval echo "$as_me:1860: \"$ac_compile\"") >&5
1861   (eval $ac_compile) 2>&5
1862   ac_status=$?
1863   echo "$as_me:1863: \$? = $ac_status" >&5
1864   (exit $ac_status); } &&
1865          { ac_try='test -s conftest.$ac_objext'
1866   { (eval echo "$as_me:1866: \"$ac_try\"") >&5
1867   (eval $ac_try) 2>&5
1868   ac_status=$?
1869   echo "$as_me:1869: \$? = $ac_status" >&5
1870   (exit $ac_status); }; }; then
1871   ac_compiler_gnu=yes
1872 else
1873   echo "$as_me: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
1875 ac_compiler_gnu=no
1876 fi
1877 rm -f conftest.$ac_objext conftest.$ac_ext
1878 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1879
1880 fi
1881 echo "$as_me:1881: result: $ac_cv_c_compiler_gnu" >&5
1882 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1883 GCC=`test $ac_compiler_gnu = yes && echo yes`
1884 ac_test_CFLAGS=${CFLAGS+set}
1885 ac_save_CFLAGS=$CFLAGS
1886 CFLAGS="-g"
1887 echo "$as_me:1887: checking whether $CC accepts -g" >&5
1888 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1889 if test "${ac_cv_prog_cc_g+set}" = set; then
1890   echo $ECHO_N "(cached) $ECHO_C" >&6
1891 else
1892   cat >conftest.$ac_ext <<_ACEOF
1893 #line 1893 "configure"
1894 #include "confdefs.h"
1895
1896 int
1897 main ()
1898 {
1899
1900   ;
1901   return 0;
1902 }
1903 _ACEOF
1904 rm -f conftest.$ac_objext
1905 if { (eval echo "$as_me:1905: \"$ac_compile\"") >&5
1906   (eval $ac_compile) 2>&5
1907   ac_status=$?
1908   echo "$as_me:1908: \$? = $ac_status" >&5
1909   (exit $ac_status); } &&
1910          { ac_try='test -s conftest.$ac_objext'
1911   { (eval echo "$as_me:1911: \"$ac_try\"") >&5
1912   (eval $ac_try) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); }; }; then
1916   ac_cv_prog_cc_g=yes
1917 else
1918   echo "$as_me: failed program was:" >&5
1919 cat conftest.$ac_ext >&5
1920 ac_cv_prog_cc_g=no
1921 fi
1922 rm -f conftest.$ac_objext conftest.$ac_ext
1923 fi
1924 echo "$as_me:1924: result: $ac_cv_prog_cc_g" >&5
1925 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1926 if test "$ac_test_CFLAGS" = set; then
1927   CFLAGS=$ac_save_CFLAGS
1928 elif test $ac_cv_prog_cc_g = yes; then
1929   if test "$GCC" = yes; then
1930     CFLAGS="-g -O2"
1931   else
1932     CFLAGS="-g"
1933   fi
1934 else
1935   if test "$GCC" = yes; then
1936     CFLAGS="-O2"
1937   else
1938     CFLAGS=
1939   fi
1940 fi
1941 # Some people use a C++ compiler to compile C.  Since we use `exit',
1942 # in C++ we need to declare it.  In case someone uses the same compiler
1943 # for both compiling C and C++ we need to have the C++ compiler decide
1944 # the declaration of exit, since it's the most demanding environment.
1945 cat >conftest.$ac_ext <<_ACEOF
1946 #ifndef __cplusplus
1947   choke me
1948 #endif
1949 _ACEOF
1950 rm -f conftest.$ac_objext
1951 if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5
1952   (eval $ac_compile) 2>&5
1953   ac_status=$?
1954   echo "$as_me:1954: \$? = $ac_status" >&5
1955   (exit $ac_status); } &&
1956          { ac_try='test -s conftest.$ac_objext'
1957   { (eval echo "$as_me:1957: \"$ac_try\"") >&5
1958   (eval $ac_try) 2>&5
1959   ac_status=$?
1960   echo "$as_me:1960: \$? = $ac_status" >&5
1961   (exit $ac_status); }; }; then
1962   for ac_declaration in \
1963    ''\
1964    '#include <stdlib.h>' \
1965    'extern "C" void std::exit (int) throw (); using std::exit;' \
1966    'extern "C" void std::exit (int); using std::exit;' \
1967    'extern "C" void exit (int) throw ();' \
1968    'extern "C" void exit (int);' \
1969    'void exit (int);'
1970 do
1971   cat >conftest.$ac_ext <<_ACEOF
1972 #line 1972 "configure"
1973 #include "confdefs.h"
1974 #include <stdlib.h>
1975 $ac_declaration
1976 int
1977 main ()
1978 {
1979 exit (42);
1980   ;
1981   return 0;
1982 }
1983 _ACEOF
1984 rm -f conftest.$ac_objext
1985 if { (eval echo "$as_me:1985: \"$ac_compile\"") >&5
1986   (eval $ac_compile) 2>&5
1987   ac_status=$?
1988   echo "$as_me:1988: \$? = $ac_status" >&5
1989   (exit $ac_status); } &&
1990          { ac_try='test -s conftest.$ac_objext'
1991   { (eval echo "$as_me:1991: \"$ac_try\"") >&5
1992   (eval $ac_try) 2>&5
1993   ac_status=$?
1994   echo "$as_me:1994: \$? = $ac_status" >&5
1995   (exit $ac_status); }; }; then
1996   :
1997 else
1998   echo "$as_me: failed program was:" >&5
1999 cat conftest.$ac_ext >&5
2000 continue
2001 fi
2002 rm -f conftest.$ac_objext conftest.$ac_ext
2003   cat >conftest.$ac_ext <<_ACEOF
2004 #line 2004 "configure"
2005 #include "confdefs.h"
2006 $ac_declaration
2007 int
2008 main ()
2009 {
2010 exit (42);
2011   ;
2012   return 0;
2013 }
2014 _ACEOF
2015 rm -f conftest.$ac_objext
2016 if { (eval echo "$as_me:2016: \"$ac_compile\"") >&5
2017   (eval $ac_compile) 2>&5
2018   ac_status=$?
2019   echo "$as_me:2019: \$? = $ac_status" >&5
2020   (exit $ac_status); } &&
2021          { ac_try='test -s conftest.$ac_objext'
2022   { (eval echo "$as_me:2022: \"$ac_try\"") >&5
2023   (eval $ac_try) 2>&5
2024   ac_status=$?
2025   echo "$as_me:2025: \$? = $ac_status" >&5
2026   (exit $ac_status); }; }; then
2027   break
2028 else
2029   echo "$as_me: failed program was:" >&5
2030 cat conftest.$ac_ext >&5
2031 fi
2032 rm -f conftest.$ac_objext conftest.$ac_ext
2033 done
2034 rm -rf conftest*
2035 if test -n "$ac_declaration"; then
2036   echo '#ifdef __cplusplus' >>confdefs.h
2037   echo $ac_declaration      >>confdefs.h
2038   echo '#endif'             >>confdefs.h
2039 fi
2040
2041 else
2042   echo "$as_me: failed program was:" >&5
2043 cat conftest.$ac_ext >&5
2044 fi
2045 rm -f conftest.$ac_objext conftest.$ac_ext
2046 ac_ext=c
2047 ac_cpp='$CPP $CPPFLAGS'
2048 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2049 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2050 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2051 ac_main_return=return
2052
2053 GCC_VERSION=none
2054 if test "$GCC" = yes ; then
2055         echo "$as_me:2055: checking version of $CC" >&5
2056 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2057         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.].*//'`"
2058         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2059         echo "$as_me:2059: result: $GCC_VERSION" >&5
2060 echo "${ECHO_T}$GCC_VERSION" >&6
2061 fi
2062
2063 echo "$as_me:2063: checking for $CC option to accept ANSI C" >&5
2064 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2065 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2066   echo $ECHO_N "(cached) $ECHO_C" >&6
2067 else
2068   ac_cv_prog_cc_stdc=no
2069 ac_save_CC=$CC
2070 cat >conftest.$ac_ext <<_ACEOF
2071 #line 2071 "configure"
2072 #include "confdefs.h"
2073 #include <stdarg.h>
2074 #include <stdio.h>
2075 #include <sys/types.h>
2076 #include <sys/stat.h>
2077 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2078 struct buf { int x; };
2079 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2080 static char *e (p, i)
2081      char **p;
2082      int i;
2083 {
2084   return p[i];
2085 }
2086 static char *f (char * (*g) (char **, int), char **p, ...)
2087 {
2088   char *s;
2089   va_list v;
2090   va_start (v,p);
2091   s = g (p, va_arg (v,int));
2092   va_end (v);
2093   return s;
2094 }
2095 int test (int i, double x);
2096 struct s1 {int (*f) (int a);};
2097 struct s2 {int (*f) (double a);};
2098 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2099 int argc;
2100 char **argv;
2101 int
2102 main ()
2103 {
2104 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2105   ;
2106   return 0;
2107 }
2108 _ACEOF
2109 # Don't try gcc -ansi; that turns off useful extensions and
2110 # breaks some systems' header files.
2111 # AIX                   -qlanglvl=ansi
2112 # Ultrix and OSF/1      -std1
2113 # HP-UX 10.20 and later -Ae
2114 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2115 # SVR4                  -Xc -D__EXTENSIONS__
2116 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2117 do
2118   CC="$ac_save_CC $ac_arg"
2119   rm -f conftest.$ac_objext
2120 if { (eval echo "$as_me:2120: \"$ac_compile\"") >&5
2121   (eval $ac_compile) 2>&5
2122   ac_status=$?
2123   echo "$as_me:2123: \$? = $ac_status" >&5
2124   (exit $ac_status); } &&
2125          { ac_try='test -s conftest.$ac_objext'
2126   { (eval echo "$as_me:2126: \"$ac_try\"") >&5
2127   (eval $ac_try) 2>&5
2128   ac_status=$?
2129   echo "$as_me:2129: \$? = $ac_status" >&5
2130   (exit $ac_status); }; }; then
2131   ac_cv_prog_cc_stdc=$ac_arg
2132 break
2133 else
2134   echo "$as_me: failed program was:" >&5
2135 cat conftest.$ac_ext >&5
2136 fi
2137 rm -f conftest.$ac_objext
2138 done
2139 rm -f conftest.$ac_ext conftest.$ac_objext
2140 CC=$ac_save_CC
2141
2142 fi
2143
2144 case "x$ac_cv_prog_cc_stdc" in
2145   x|xno)
2146     echo "$as_me:2146: result: none needed" >&5
2147 echo "${ECHO_T}none needed" >&6 ;;
2148   *)
2149     echo "$as_me:2149: result: $ac_cv_prog_cc_stdc" >&5
2150 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2151     CC="$CC $ac_cv_prog_cc_stdc" ;;
2152 esac
2153
2154 # This should have been defined by AC_PROG_CC
2155 : ${CC:=cc}
2156
2157 echo "$as_me:2157: checking \$CC variable" >&5
2158 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2159 case "$CC" in
2160 (*[\ \  ]-[IUD]*)
2161         echo "$as_me:2161: result: broken" >&5
2162 echo "${ECHO_T}broken" >&6
2163         { echo "$as_me:2163: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2164 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2165         # humor him...
2166         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2167         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2168
2169 cf_fix_cppflags=no
2170 cf_new_cflags=
2171 cf_new_cppflags=
2172 cf_new_extra_cppflags=
2173
2174 for cf_add_cflags in $cf_flags
2175 do
2176 case $cf_fix_cppflags in
2177 (no)
2178         case $cf_add_cflags in
2179         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2180                 case $cf_add_cflags in
2181                 (-D*)
2182                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2183
2184                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2185                                 && test -z "${cf_tst_cflags}" \
2186                                 && cf_fix_cppflags=yes
2187
2188                         if test $cf_fix_cppflags = yes ; then
2189                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2190                                 continue
2191                         elif test "${cf_tst_cflags}" = "\"'" ; then
2192                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2193                                 continue
2194                         fi
2195                         ;;
2196                 esac
2197                 case "$CPPFLAGS" in
2198                 (*$cf_add_cflags)
2199                         ;;
2200                 (*)
2201                         case $cf_add_cflags in
2202                         (-D*)
2203                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2204
2205 CPPFLAGS=`echo "$CPPFLAGS" | \
2206         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2207                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2208
2209                                 ;;
2210                         esac
2211                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2212                         ;;
2213                 esac
2214                 ;;
2215         (*)
2216                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2217                 ;;
2218         esac
2219         ;;
2220 (yes)
2221         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2222
2223         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2224
2225         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2226                 && test -z "${cf_tst_cflags}" \
2227                 && cf_fix_cppflags=no
2228         ;;
2229 esac
2230 done
2231
2232 if test -n "$cf_new_cflags" ; then
2233
2234         CFLAGS="$CFLAGS $cf_new_cflags"
2235 fi
2236
2237 if test -n "$cf_new_cppflags" ; then
2238
2239         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2240 fi
2241
2242 if test -n "$cf_new_extra_cppflags" ; then
2243
2244         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2245 fi
2246
2247         ;;
2248 (*)
2249         echo "$as_me:2249: result: ok" >&5
2250 echo "${ECHO_T}ok" >&6
2251         ;;
2252 esac
2253
2254 ac_ext=c
2255 ac_cpp='$CPP $CPPFLAGS'
2256 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2257 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2258 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2259 ac_main_return=return
2260 echo "$as_me:2260: checking how to run the C preprocessor" >&5
2261 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2262 # On Suns, sometimes $CPP names a directory.
2263 if test -n "$CPP" && test -d "$CPP"; then
2264   CPP=
2265 fi
2266 if test -z "$CPP"; then
2267   if test "${ac_cv_prog_CPP+set}" = set; then
2268   echo $ECHO_N "(cached) $ECHO_C" >&6
2269 else
2270       # Double quotes because CPP needs to be expanded
2271     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2272     do
2273       ac_preproc_ok=false
2274 for ac_c_preproc_warn_flag in '' yes
2275 do
2276   # Use a header file that comes with gcc, so configuring glibc
2277   # with a fresh cross-compiler works.
2278   # On the NeXT, cc -E runs the code through the compiler's parser,
2279   # not just through cpp. "Syntax error" is here to catch this case.
2280   cat >conftest.$ac_ext <<_ACEOF
2281 #line 2281 "configure"
2282 #include "confdefs.h"
2283 #include <assert.h>
2284                      Syntax error
2285 _ACEOF
2286 if { (eval echo "$as_me:2286: \"$ac_cpp conftest.$ac_ext\"") >&5
2287   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2288   ac_status=$?
2289   egrep -v '^ *\+' conftest.er1 >conftest.err
2290   rm -f conftest.er1
2291   cat conftest.err >&5
2292   echo "$as_me:2292: \$? = $ac_status" >&5
2293   (exit $ac_status); } >/dev/null; then
2294   if test -s conftest.err; then
2295     ac_cpp_err=$ac_c_preproc_warn_flag
2296   else
2297     ac_cpp_err=
2298   fi
2299 else
2300   ac_cpp_err=yes
2301 fi
2302 if test -z "$ac_cpp_err"; then
2303   :
2304 else
2305   echo "$as_me: failed program was:" >&5
2306   cat conftest.$ac_ext >&5
2307   # Broken: fails on valid input.
2308 continue
2309 fi
2310 rm -f conftest.err conftest.$ac_ext
2311
2312   # OK, works on sane cases.  Now check whether non-existent headers
2313   # can be detected and how.
2314   cat >conftest.$ac_ext <<_ACEOF
2315 #line 2315 "configure"
2316 #include "confdefs.h"
2317 #include <ac_nonexistent.h>
2318 _ACEOF
2319 if { (eval echo "$as_me:2319: \"$ac_cpp conftest.$ac_ext\"") >&5
2320   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2321   ac_status=$?
2322   egrep -v '^ *\+' conftest.er1 >conftest.err
2323   rm -f conftest.er1
2324   cat conftest.err >&5
2325   echo "$as_me:2325: \$? = $ac_status" >&5
2326   (exit $ac_status); } >/dev/null; then
2327   if test -s conftest.err; then
2328     ac_cpp_err=$ac_c_preproc_warn_flag
2329   else
2330     ac_cpp_err=
2331   fi
2332 else
2333   ac_cpp_err=yes
2334 fi
2335 if test -z "$ac_cpp_err"; then
2336   # Broken: success on invalid input.
2337 continue
2338 else
2339   echo "$as_me: failed program was:" >&5
2340   cat conftest.$ac_ext >&5
2341   # Passes both tests.
2342 ac_preproc_ok=:
2343 break
2344 fi
2345 rm -f conftest.err conftest.$ac_ext
2346
2347 done
2348 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2349 rm -f conftest.err conftest.$ac_ext
2350 if $ac_preproc_ok; then
2351   break
2352 fi
2353
2354     done
2355     ac_cv_prog_CPP=$CPP
2356
2357 fi
2358   CPP=$ac_cv_prog_CPP
2359 else
2360   ac_cv_prog_CPP=$CPP
2361 fi
2362 echo "$as_me:2362: result: $CPP" >&5
2363 echo "${ECHO_T}$CPP" >&6
2364 ac_preproc_ok=false
2365 for ac_c_preproc_warn_flag in '' yes
2366 do
2367   # Use a header file that comes with gcc, so configuring glibc
2368   # with a fresh cross-compiler works.
2369   # On the NeXT, cc -E runs the code through the compiler's parser,
2370   # not just through cpp. "Syntax error" is here to catch this case.
2371   cat >conftest.$ac_ext <<_ACEOF
2372 #line 2372 "configure"
2373 #include "confdefs.h"
2374 #include <assert.h>
2375                      Syntax error
2376 _ACEOF
2377 if { (eval echo "$as_me:2377: \"$ac_cpp conftest.$ac_ext\"") >&5
2378   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2379   ac_status=$?
2380   egrep -v '^ *\+' conftest.er1 >conftest.err
2381   rm -f conftest.er1
2382   cat conftest.err >&5
2383   echo "$as_me:2383: \$? = $ac_status" >&5
2384   (exit $ac_status); } >/dev/null; then
2385   if test -s conftest.err; then
2386     ac_cpp_err=$ac_c_preproc_warn_flag
2387   else
2388     ac_cpp_err=
2389   fi
2390 else
2391   ac_cpp_err=yes
2392 fi
2393 if test -z "$ac_cpp_err"; then
2394   :
2395 else
2396   echo "$as_me: failed program was:" >&5
2397   cat conftest.$ac_ext >&5
2398   # Broken: fails on valid input.
2399 continue
2400 fi
2401 rm -f conftest.err conftest.$ac_ext
2402
2403   # OK, works on sane cases.  Now check whether non-existent headers
2404   # can be detected and how.
2405   cat >conftest.$ac_ext <<_ACEOF
2406 #line 2406 "configure"
2407 #include "confdefs.h"
2408 #include <ac_nonexistent.h>
2409 _ACEOF
2410 if { (eval echo "$as_me:2410: \"$ac_cpp conftest.$ac_ext\"") >&5
2411   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2412   ac_status=$?
2413   egrep -v '^ *\+' conftest.er1 >conftest.err
2414   rm -f conftest.er1
2415   cat conftest.err >&5
2416   echo "$as_me:2416: \$? = $ac_status" >&5
2417   (exit $ac_status); } >/dev/null; then
2418   if test -s conftest.err; then
2419     ac_cpp_err=$ac_c_preproc_warn_flag
2420   else
2421     ac_cpp_err=
2422   fi
2423 else
2424   ac_cpp_err=yes
2425 fi
2426 if test -z "$ac_cpp_err"; then
2427   # Broken: success on invalid input.
2428 continue
2429 else
2430   echo "$as_me: failed program was:" >&5
2431   cat conftest.$ac_ext >&5
2432   # Passes both tests.
2433 ac_preproc_ok=:
2434 break
2435 fi
2436 rm -f conftest.err conftest.$ac_ext
2437
2438 done
2439 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2440 rm -f conftest.err conftest.$ac_ext
2441 if $ac_preproc_ok; then
2442   :
2443 else
2444   { { echo "$as_me:2444: error: C preprocessor \"$CPP\" fails sanity check" >&5
2445 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2446    { (exit 1); exit 1; }; }
2447 fi
2448
2449 ac_ext=c
2450 ac_cpp='$CPP $CPPFLAGS'
2451 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2452 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2453 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2454 ac_main_return=return
2455
2456 if test $ac_cv_c_compiler_gnu = yes; then
2457     echo "$as_me:2457: checking whether $CC needs -traditional" >&5
2458 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2459 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2460   echo $ECHO_N "(cached) $ECHO_C" >&6
2461 else
2462     ac_pattern="Autoconf.*'x'"
2463   cat >conftest.$ac_ext <<_ACEOF
2464 #line 2464 "configure"
2465 #include "confdefs.h"
2466 #include <sgtty.h>
2467 int Autoconf = TIOCGETP;
2468 _ACEOF
2469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2470   egrep "$ac_pattern" >/dev/null 2>&1; then
2471   ac_cv_prog_gcc_traditional=yes
2472 else
2473   ac_cv_prog_gcc_traditional=no
2474 fi
2475 rm -rf conftest*
2476
2477   if test $ac_cv_prog_gcc_traditional = no; then
2478     cat >conftest.$ac_ext <<_ACEOF
2479 #line 2479 "configure"
2480 #include "confdefs.h"
2481 #include <termio.h>
2482 int Autoconf = TCGETA;
2483 _ACEOF
2484 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2485   egrep "$ac_pattern" >/dev/null 2>&1; then
2486   ac_cv_prog_gcc_traditional=yes
2487 fi
2488 rm -rf conftest*
2489
2490   fi
2491 fi
2492 echo "$as_me:2492: result: $ac_cv_prog_gcc_traditional" >&5
2493 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2494   if test $ac_cv_prog_gcc_traditional = yes; then
2495     CC="$CC -traditional"
2496   fi
2497 fi
2498
2499 echo "$as_me:2499: checking whether $CC understands -c and -o together" >&5
2500 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2501 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2502   echo $ECHO_N "(cached) $ECHO_C" >&6
2503 else
2504
2505 cat > conftest.$ac_ext <<CF_EOF
2506 #include <stdio.h>
2507 int main()
2508 {
2509         ${cf_cv_main_return:-return}(0);
2510 }
2511 CF_EOF
2512 # We do the test twice because some compilers refuse to overwrite an
2513 # existing .o file with -o, though they will create one.
2514 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2515 if { (eval echo "$as_me:2515: \"$ac_try\"") >&5
2516   (eval $ac_try) 2>&5
2517   ac_status=$?
2518   echo "$as_me:2518: \$? = $ac_status" >&5
2519   (exit $ac_status); } &&
2520   test -f conftest2.$ac_objext && { (eval echo "$as_me:2520: \"$ac_try\"") >&5
2521   (eval $ac_try) 2>&5
2522   ac_status=$?
2523   echo "$as_me:2523: \$? = $ac_status" >&5
2524   (exit $ac_status); };
2525 then
2526   eval cf_cv_prog_CC_c_o=yes
2527 else
2528   eval cf_cv_prog_CC_c_o=no
2529 fi
2530 rm -rf conftest*
2531
2532 fi
2533 if test $cf_cv_prog_CC_c_o = yes; then
2534   echo "$as_me:2534: result: yes" >&5
2535 echo "${ECHO_T}yes" >&6
2536 else
2537   echo "$as_me:2537: result: no" >&5
2538 echo "${ECHO_T}no" >&6
2539 fi
2540
2541 if test "$cross_compiling" = yes ; then
2542         LDCONFIG=:
2543 else
2544         case "$cf_cv_system_name" in
2545         (dragonfly*|mirbsd*|freebsd*)
2546                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2547                 ;;
2548         (*) LDPATH=$PATH:/sbin:/usr/sbin
2549                 # Extract the first word of "ldconfig", so it can be a program name with args.
2550 set dummy ldconfig; ac_word=$2
2551 echo "$as_me:2551: checking for $ac_word" >&5
2552 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2553 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2554   echo $ECHO_N "(cached) $ECHO_C" >&6
2555 else
2556   case $LDCONFIG in
2557   [\\/]* | ?:[\\/]*)
2558   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2559   ;;
2560   *)
2561   ac_save_IFS=$IFS; IFS=$ac_path_separator
2562 ac_dummy="$LDPATH"
2563 for ac_dir in $ac_dummy; do
2564   IFS=$ac_save_IFS
2565   test -z "$ac_dir" && ac_dir=.
2566   if $as_executable_p "$ac_dir/$ac_word"; then
2567    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2568    echo "$as_me:2568: found $ac_dir/$ac_word" >&5
2569    break
2570 fi
2571 done
2572
2573   ;;
2574 esac
2575 fi
2576 LDCONFIG=$ac_cv_path_LDCONFIG
2577
2578 if test -n "$LDCONFIG"; then
2579   echo "$as_me:2579: result: $LDCONFIG" >&5
2580 echo "${ECHO_T}$LDCONFIG" >&6
2581 else
2582   echo "$as_me:2582: result: no" >&5
2583 echo "${ECHO_T}no" >&6
2584 fi
2585
2586                 ;;
2587         esac
2588 fi
2589
2590 echo "$as_me:2590: checking if you want to ensure bool is consistent with C++" >&5
2591 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2592
2593 # Check whether --with-cxx or --without-cxx was given.
2594 if test "${with_cxx+set}" = set; then
2595   withval="$with_cxx"
2596   cf_with_cxx=$withval
2597 else
2598   cf_with_cxx=yes
2599 fi;
2600 echo "$as_me:2600: result: $cf_with_cxx" >&5
2601 echo "${ECHO_T}$cf_with_cxx" >&6
2602 if test "X$cf_with_cxx" = Xno ; then
2603         CXX=""
2604         GXX=""
2605 else
2606         # with autoconf 2.13, we can change the error to a warning:
2607                 ac_ext=cc
2608 ac_cpp='$CXXCPP $CPPFLAGS'
2609 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2610 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2611 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2612 ac_main_return=return
2613 if test -n "$ac_tool_prefix"; then
2614   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2615   do
2616     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2617 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2618 echo "$as_me:2618: checking for $ac_word" >&5
2619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2620 if test "${ac_cv_prog_CXX+set}" = set; then
2621   echo $ECHO_N "(cached) $ECHO_C" >&6
2622 else
2623   if test -n "$CXX"; then
2624   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2625 else
2626   ac_save_IFS=$IFS; IFS=$ac_path_separator
2627 ac_dummy="$PATH"
2628 for ac_dir in $ac_dummy; do
2629   IFS=$ac_save_IFS
2630   test -z "$ac_dir" && ac_dir=.
2631   $as_executable_p "$ac_dir/$ac_word" || continue
2632 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2633 echo "$as_me:2633: found $ac_dir/$ac_word" >&5
2634 break
2635 done
2636
2637 fi
2638 fi
2639 CXX=$ac_cv_prog_CXX
2640 if test -n "$CXX"; then
2641   echo "$as_me:2641: result: $CXX" >&5
2642 echo "${ECHO_T}$CXX" >&6
2643 else
2644   echo "$as_me:2644: result: no" >&5
2645 echo "${ECHO_T}no" >&6
2646 fi
2647
2648     test -n "$CXX" && break
2649   done
2650 fi
2651 if test -z "$CXX"; then
2652   ac_ct_CXX=$CXX
2653   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2654 do
2655   # Extract the first word of "$ac_prog", so it can be a program name with args.
2656 set dummy $ac_prog; ac_word=$2
2657 echo "$as_me:2657: checking for $ac_word" >&5
2658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2659 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2660   echo $ECHO_N "(cached) $ECHO_C" >&6
2661 else
2662   if test -n "$ac_ct_CXX"; then
2663   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2664 else
2665   ac_save_IFS=$IFS; IFS=$ac_path_separator
2666 ac_dummy="$PATH"
2667 for ac_dir in $ac_dummy; do
2668   IFS=$ac_save_IFS
2669   test -z "$ac_dir" && ac_dir=.
2670   $as_executable_p "$ac_dir/$ac_word" || continue
2671 ac_cv_prog_ac_ct_CXX="$ac_prog"
2672 echo "$as_me:2672: found $ac_dir/$ac_word" >&5
2673 break
2674 done
2675
2676 fi
2677 fi
2678 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2679 if test -n "$ac_ct_CXX"; then
2680   echo "$as_me:2680: result: $ac_ct_CXX" >&5
2681 echo "${ECHO_T}$ac_ct_CXX" >&6
2682 else
2683   echo "$as_me:2683: result: no" >&5
2684 echo "${ECHO_T}no" >&6
2685 fi
2686
2687   test -n "$ac_ct_CXX" && break
2688 done
2689 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2690
2691   CXX=$ac_ct_CXX
2692 fi
2693
2694 # Provide some information about the compiler.
2695 echo "$as_me:2695:" \
2696      "checking for C++ compiler version" >&5
2697 ac_compiler=`set X $ac_compile; echo $2`
2698 { (eval echo "$as_me:2698: \"$ac_compiler --version </dev/null >&5\"") >&5
2699   (eval $ac_compiler --version </dev/null >&5) 2>&5
2700   ac_status=$?
2701   echo "$as_me:2701: \$? = $ac_status" >&5
2702   (exit $ac_status); }
2703 { (eval echo "$as_me:2703: \"$ac_compiler -v </dev/null >&5\"") >&5
2704   (eval $ac_compiler -v </dev/null >&5) 2>&5
2705   ac_status=$?
2706   echo "$as_me:2706: \$? = $ac_status" >&5
2707   (exit $ac_status); }
2708 { (eval echo "$as_me:2708: \"$ac_compiler -V </dev/null >&5\"") >&5
2709   (eval $ac_compiler -V </dev/null >&5) 2>&5
2710   ac_status=$?
2711   echo "$as_me:2711: \$? = $ac_status" >&5
2712   (exit $ac_status); }
2713
2714 echo "$as_me:2714: checking whether we are using the GNU C++ compiler" >&5
2715 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2716 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2717   echo $ECHO_N "(cached) $ECHO_C" >&6
2718 else
2719   cat >conftest.$ac_ext <<_ACEOF
2720 #line 2720 "configure"
2721 #include "confdefs.h"
2722
2723 int
2724 main ()
2725 {
2726 #ifndef __GNUC__
2727        choke me
2728 #endif
2729
2730   ;
2731   return 0;
2732 }
2733 _ACEOF
2734 rm -f conftest.$ac_objext
2735 if { (eval echo "$as_me:2735: \"$ac_compile\"") >&5
2736   (eval $ac_compile) 2>&5
2737   ac_status=$?
2738   echo "$as_me:2738: \$? = $ac_status" >&5
2739   (exit $ac_status); } &&
2740          { ac_try='test -s conftest.$ac_objext'
2741   { (eval echo "$as_me:2741: \"$ac_try\"") >&5
2742   (eval $ac_try) 2>&5
2743   ac_status=$?
2744   echo "$as_me:2744: \$? = $ac_status" >&5
2745   (exit $ac_status); }; }; then
2746   ac_compiler_gnu=yes
2747 else
2748   echo "$as_me: failed program was:" >&5
2749 cat conftest.$ac_ext >&5
2750 ac_compiler_gnu=no
2751 fi
2752 rm -f conftest.$ac_objext conftest.$ac_ext
2753 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2754
2755 fi
2756 echo "$as_me:2756: result: $ac_cv_cxx_compiler_gnu" >&5
2757 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2758 GXX=`test $ac_compiler_gnu = yes && echo yes`
2759 ac_test_CXXFLAGS=${CXXFLAGS+set}
2760 ac_save_CXXFLAGS=$CXXFLAGS
2761 CXXFLAGS="-g"
2762 echo "$as_me:2762: checking whether $CXX accepts -g" >&5
2763 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2764 if test "${ac_cv_prog_cxx_g+set}" = set; then
2765   echo $ECHO_N "(cached) $ECHO_C" >&6
2766 else
2767   cat >conftest.$ac_ext <<_ACEOF
2768 #line 2768 "configure"
2769 #include "confdefs.h"
2770
2771 int
2772 main ()
2773 {
2774
2775   ;
2776   return 0;
2777 }
2778 _ACEOF
2779 rm -f conftest.$ac_objext
2780 if { (eval echo "$as_me:2780: \"$ac_compile\"") >&5
2781   (eval $ac_compile) 2>&5
2782   ac_status=$?
2783   echo "$as_me:2783: \$? = $ac_status" >&5
2784   (exit $ac_status); } &&
2785          { ac_try='test -s conftest.$ac_objext'
2786   { (eval echo "$as_me:2786: \"$ac_try\"") >&5
2787   (eval $ac_try) 2>&5
2788   ac_status=$?
2789   echo "$as_me:2789: \$? = $ac_status" >&5
2790   (exit $ac_status); }; }; then
2791   ac_cv_prog_cxx_g=yes
2792 else
2793   echo "$as_me: failed program was:" >&5
2794 cat conftest.$ac_ext >&5
2795 ac_cv_prog_cxx_g=no
2796 fi
2797 rm -f conftest.$ac_objext conftest.$ac_ext
2798 fi
2799 echo "$as_me:2799: result: $ac_cv_prog_cxx_g" >&5
2800 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2801 if test "$ac_test_CXXFLAGS" = set; then
2802   CXXFLAGS=$ac_save_CXXFLAGS
2803 elif test $ac_cv_prog_cxx_g = yes; then
2804   if test "$GXX" = yes; then
2805     CXXFLAGS="-g -O2"
2806   else
2807     CXXFLAGS="-g"
2808   fi
2809 else
2810   if test "$GXX" = yes; then
2811     CXXFLAGS="-O2"
2812   else
2813     CXXFLAGS=
2814   fi
2815 fi
2816 for ac_declaration in \
2817    ''\
2818    '#include <stdlib.h>' \
2819    'extern "C" void std::exit (int) throw (); using std::exit;' \
2820    'extern "C" void std::exit (int); using std::exit;' \
2821    'extern "C" void exit (int) throw ();' \
2822    'extern "C" void exit (int);' \
2823    'void exit (int);'
2824 do
2825   cat >conftest.$ac_ext <<_ACEOF
2826 #line 2826 "configure"
2827 #include "confdefs.h"
2828 #include <stdlib.h>
2829 $ac_declaration
2830 int
2831 main ()
2832 {
2833 exit (42);
2834   ;
2835   return 0;
2836 }
2837 _ACEOF
2838 rm -f conftest.$ac_objext
2839 if { (eval echo "$as_me:2839: \"$ac_compile\"") >&5
2840   (eval $ac_compile) 2>&5
2841   ac_status=$?
2842   echo "$as_me:2842: \$? = $ac_status" >&5
2843   (exit $ac_status); } &&
2844          { ac_try='test -s conftest.$ac_objext'
2845   { (eval echo "$as_me:2845: \"$ac_try\"") >&5
2846   (eval $ac_try) 2>&5
2847   ac_status=$?
2848   echo "$as_me:2848: \$? = $ac_status" >&5
2849   (exit $ac_status); }; }; then
2850   :
2851 else
2852   echo "$as_me: failed program was:" >&5
2853 cat conftest.$ac_ext >&5
2854 continue
2855 fi
2856 rm -f conftest.$ac_objext conftest.$ac_ext
2857   cat >conftest.$ac_ext <<_ACEOF
2858 #line 2858 "configure"
2859 #include "confdefs.h"
2860 $ac_declaration
2861 int
2862 main ()
2863 {
2864 exit (42);
2865   ;
2866   return 0;
2867 }
2868 _ACEOF
2869 rm -f conftest.$ac_objext
2870 if { (eval echo "$as_me:2870: \"$ac_compile\"") >&5
2871   (eval $ac_compile) 2>&5
2872   ac_status=$?
2873   echo "$as_me:2873: \$? = $ac_status" >&5
2874   (exit $ac_status); } &&
2875          { ac_try='test -s conftest.$ac_objext'
2876   { (eval echo "$as_me:2876: \"$ac_try\"") >&5
2877   (eval $ac_try) 2>&5
2878   ac_status=$?
2879   echo "$as_me:2879: \$? = $ac_status" >&5
2880   (exit $ac_status); }; }; then
2881   break
2882 else
2883   echo "$as_me: failed program was:" >&5
2884 cat conftest.$ac_ext >&5
2885 fi
2886 rm -f conftest.$ac_objext conftest.$ac_ext
2887 done
2888 rm -rf conftest*
2889 if test -n "$ac_declaration"; then
2890   echo '#ifdef __cplusplus' >>confdefs.h
2891   echo $ac_declaration      >>confdefs.h
2892   echo '#endif'             >>confdefs.h
2893 fi
2894
2895 ac_ext=c
2896 ac_cpp='$CPP $CPPFLAGS'
2897 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2898 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2899 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2900 ac_main_return=return
2901
2902         ac_ext=cc
2903 ac_cpp='$CXXCPP $CPPFLAGS'
2904 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2905 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2906 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2907 ac_main_return=return
2908
2909         if test "x$cf_with_cxx" != xno
2910         then
2911                 # Several of the C++ configurations do not work, particularly when
2912                 # cross-compiling (20140913 -TD)
2913                 echo "$as_me:2913: checking if $CXX works" >&5
2914 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
2915
2916                 save_CPPFLAGS="$CPPFLAGS"
2917                 eval cf_includedir=${includedir}
2918                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
2919
2920 cat >conftest.$ac_ext <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923
2924 #include <stdlib.h>
2925 #include <stdio.h>
2926
2927 int
2928 main ()
2929 {
2930
2931                 printf("Hello world!\n")
2932
2933   ;
2934   return 0;
2935 }
2936 _ACEOF
2937 rm -f conftest.$ac_objext
2938 if { (eval echo "$as_me:2938: \"$ac_compile\"") >&5
2939   (eval $ac_compile) 2>&5
2940   ac_status=$?
2941   echo "$as_me:2941: \$? = $ac_status" >&5
2942   (exit $ac_status); } &&
2943          { ac_try='test -s conftest.$ac_objext'
2944   { (eval echo "$as_me:2944: \"$ac_try\"") >&5
2945   (eval $ac_try) 2>&5
2946   ac_status=$?
2947   echo "$as_me:2947: \$? = $ac_status" >&5
2948   (exit $ac_status); }; }; then
2949   cf_cxx_works=yes
2950 else
2951   echo "$as_me: failed program was:" >&5
2952 cat conftest.$ac_ext >&5
2953 cf_cxx_works=no
2954 fi
2955 rm -f conftest.$ac_objext conftest.$ac_ext
2956                 CPPFLAGS="$save_CPPFLAGS"
2957
2958                 echo "$as_me:2958: result: $cf_cxx_works" >&5
2959 echo "${ECHO_T}$cf_cxx_works" >&6
2960                 if test "x$cf_cxx_works" = xno
2961                 then
2962                         { echo "$as_me:2962: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
2963 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
2964                         cf_with_cxx=no; CXX=""; GXX="";
2965                 fi
2966         fi
2967         ac_ext=c
2968 ac_cpp='$CPP $CPPFLAGS'
2969 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2970 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2971 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2972 ac_main_return=return
2973
2974         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2975         if test "$CXX" = "g++" ; then
2976                 # Extract the first word of "g++", so it can be a program name with args.
2977 set dummy g++; ac_word=$2
2978 echo "$as_me:2978: checking for $ac_word" >&5
2979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2980 if test "${ac_cv_path_CXX+set}" = set; then
2981   echo $ECHO_N "(cached) $ECHO_C" >&6
2982 else
2983   case $CXX in
2984   [\\/]* | ?:[\\/]*)
2985   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2986   ;;
2987   *)
2988   ac_save_IFS=$IFS; IFS=$ac_path_separator
2989 ac_dummy="$PATH"
2990 for ac_dir in $ac_dummy; do
2991   IFS=$ac_save_IFS
2992   test -z "$ac_dir" && ac_dir=.
2993   if $as_executable_p "$ac_dir/$ac_word"; then
2994    ac_cv_path_CXX="$ac_dir/$ac_word"
2995    echo "$as_me:2995: found $ac_dir/$ac_word" >&5
2996    break
2997 fi
2998 done
2999
3000   ;;
3001 esac
3002 fi
3003 CXX=$ac_cv_path_CXX
3004
3005 if test -n "$CXX"; then
3006   echo "$as_me:3006: result: $CXX" >&5
3007 echo "${ECHO_T}$CXX" >&6
3008 else
3009   echo "$as_me:3009: result: no" >&5
3010 echo "${ECHO_T}no" >&6
3011 fi
3012
3013         fi
3014         case "x$CXX" in
3015         (x|xg++)
3016                 { echo "$as_me:3016: WARNING: You don't have any C++ compiler, too bad" >&5
3017 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3018                 cf_with_cxx=no; CXX=""; GXX="";
3019                 ;;
3020         esac
3021 fi
3022
3023 GXX_VERSION=none
3024 if test "$GXX" = yes; then
3025         echo "$as_me:3025: checking version of ${CXX:-g++}" >&5
3026 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3027         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3028         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3029         echo "$as_me:3029: result: $GXX_VERSION" >&5
3030 echo "${ECHO_T}$GXX_VERSION" >&6
3031 fi
3032
3033 case $GXX_VERSION in
3034 (1*|2.[0-6]*)
3035         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3036         # cf_cxx_library=no
3037         { echo "$as_me:3037: WARNING: templates do not work" >&5
3038 echo "$as_me: WARNING: templates do not work" >&2;}
3039         ;;
3040 esac
3041
3042 echo "$as_me:3042: checking if you want to build C++ binding and demo" >&5
3043 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3044
3045 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3046 if test "${with_cxx_binding+set}" = set; then
3047   withval="$with_cxx_binding"
3048   cf_with_cxx_binding=$withval
3049 else
3050   cf_with_cxx_binding=$cf_with_cxx
3051 fi;
3052 echo "$as_me:3052: result: $cf_with_cxx_binding" >&5
3053 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3054
3055 echo "$as_me:3055: checking if you want to build with Ada95" >&5
3056 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3057 echo "$as_me:3057: result: $cf_with_ada" >&5
3058 echo "${ECHO_T}$cf_with_ada" >&6
3059
3060 echo "$as_me:3060: checking if you want to install terminal database" >&5
3061 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3062
3063 # Check whether --enable-db-install or --disable-db-install was given.
3064 if test "${enable_db_install+set}" = set; then
3065   enableval="$enable_db_install"
3066   cf_with_db_install=$enableval
3067 else
3068   cf_with_db_install=yes
3069 fi;
3070 echo "$as_me:3070: result: $cf_with_db_install" >&5
3071 echo "${ECHO_T}$cf_with_db_install" >&6
3072
3073 echo "$as_me:3073: checking if you want to install manpages" >&5
3074 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3075
3076 # Check whether --with-manpages or --without-manpages was given.
3077 if test "${with_manpages+set}" = set; then
3078   withval="$with_manpages"
3079   cf_with_manpages=$withval
3080 else
3081   cf_with_manpages=yes
3082 fi;
3083 echo "$as_me:3083: result: $cf_with_manpages" >&5
3084 echo "${ECHO_T}$cf_with_manpages" >&6
3085
3086 echo "$as_me:3086: checking if you want to build programs such as tic" >&5
3087 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3088
3089 # Check whether --with-progs or --without-progs was given.
3090 if test "${with_progs+set}" = set; then
3091   withval="$with_progs"
3092   cf_with_progs=$withval
3093 else
3094   cf_with_progs=yes
3095 fi;
3096 echo "$as_me:3096: result: $cf_with_progs" >&5
3097 echo "${ECHO_T}$cf_with_progs" >&6
3098
3099 echo "$as_me:3099: checking if you want to build test-programs" >&5
3100 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3101
3102 # Check whether --with-tests or --without-tests was given.
3103 if test "${with_tests+set}" = set; then
3104   withval="$with_tests"
3105   cf_with_tests=$withval
3106 else
3107   cf_with_tests=yes
3108 fi;
3109 echo "$as_me:3109: result: $cf_with_tests" >&5
3110 echo "${ECHO_T}$cf_with_tests" >&6
3111
3112 echo "$as_me:3112: checking if you wish to install curses.h" >&5
3113 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3114
3115 # Check whether --with-curses-h or --without-curses-h was given.
3116 if test "${with_curses_h+set}" = set; then
3117   withval="$with_curses_h"
3118   with_curses_h=$withval
3119 else
3120   with_curses_h=yes
3121 fi;
3122 echo "$as_me:3122: result: $with_curses_h" >&5
3123 echo "${ECHO_T}$with_curses_h" >&6
3124
3125 modules_to_build="ncurses"
3126 if test "X$cf_with_progs" != Xno ; then
3127 modules_to_build="$modules_to_build progs tack"
3128 fi
3129 modules_to_build="$modules_to_build panel menu form"
3130
3131 test "$program_prefix" != NONE &&
3132   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3133 # Use a double $ so make ignores it.
3134 test "$program_suffix" != NONE &&
3135   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3136 # Double any \ or $.  echo might interpret backslashes.
3137 # By default was `s,x,x', remove it if useless.
3138 cat <<\_ACEOF >conftest.sed
3139 s/[\\$]/&&/g;s/;s,x,x,$//
3140 _ACEOF
3141 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3142 rm conftest.sed
3143
3144 for ac_prog in mawk gawk nawk awk
3145 do
3146   # Extract the first word of "$ac_prog", so it can be a program name with args.
3147 set dummy $ac_prog; ac_word=$2
3148 echo "$as_me:3148: checking for $ac_word" >&5
3149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3150 if test "${ac_cv_prog_AWK+set}" = set; then
3151   echo $ECHO_N "(cached) $ECHO_C" >&6
3152 else
3153   if test -n "$AWK"; then
3154   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3155 else
3156   ac_save_IFS=$IFS; IFS=$ac_path_separator
3157 ac_dummy="$PATH"
3158 for ac_dir in $ac_dummy; do
3159   IFS=$ac_save_IFS
3160   test -z "$ac_dir" && ac_dir=.
3161   $as_executable_p "$ac_dir/$ac_word" || continue
3162 ac_cv_prog_AWK="$ac_prog"
3163 echo "$as_me:3163: found $ac_dir/$ac_word" >&5
3164 break
3165 done
3166
3167 fi
3168 fi
3169 AWK=$ac_cv_prog_AWK
3170 if test -n "$AWK"; then
3171   echo "$as_me:3171: result: $AWK" >&5
3172 echo "${ECHO_T}$AWK" >&6
3173 else
3174   echo "$as_me:3174: result: no" >&5
3175 echo "${ECHO_T}no" >&6
3176 fi
3177
3178   test -n "$AWK" && break
3179 done
3180
3181 test -z "$AWK" && { { echo "$as_me:3181: error: No awk program found" >&5
3182 echo "$as_me: error: No awk program found" >&2;}
3183    { (exit 1); exit 1; }; }
3184
3185 echo "$as_me:3185: checking for egrep" >&5
3186 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3187 if test "${ac_cv_prog_egrep+set}" = set; then
3188   echo $ECHO_N "(cached) $ECHO_C" >&6
3189 else
3190   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3191                 then ac_cv_prog_egrep='grep -E'
3192                 else ac_cv_prog_egrep='egrep'
3193         fi
3194 fi
3195 echo "$as_me:3195: result: $ac_cv_prog_egrep" >&5
3196 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3197         EGREP=$ac_cv_prog_egrep
3198
3199         test -z "$EGREP" && { { echo "$as_me:3199: error: No egrep program found" >&5
3200 echo "$as_me: error: No egrep program found" >&2;}
3201    { (exit 1); exit 1; }; }
3202
3203 # Find a good install program.  We prefer a C program (faster),
3204 # so one script is as good as another.  But avoid the broken or
3205 # incompatible versions:
3206 # SysV /etc/install, /usr/sbin/install
3207 # SunOS /usr/etc/install
3208 # IRIX /sbin/install
3209 # AIX /bin/install
3210 # AmigaOS /C/install, which installs bootblocks on floppy discs
3211 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3212 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3213 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3214 # ./install, which can be erroneously created by make from ./install.sh.
3215 echo "$as_me:3215: checking for a BSD compatible install" >&5
3216 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3217 if test -z "$INSTALL"; then
3218 if test "${ac_cv_path_install+set}" = set; then
3219   echo $ECHO_N "(cached) $ECHO_C" >&6
3220 else
3221     ac_save_IFS=$IFS; IFS=$ac_path_separator
3222   for ac_dir in $PATH; do
3223     IFS=$ac_save_IFS
3224     # Account for people who put trailing slashes in PATH elements.
3225     case $ac_dir/ in
3226     / | ./ | .// | /cC/* \
3227     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3228     | /usr/ucb/* ) ;;
3229     *)
3230       # OSF1 and SCO ODT 3.0 have their own names for install.
3231       # Don't use installbsd from OSF since it installs stuff as root
3232       # by default.
3233       for ac_prog in ginstall scoinst install; do
3234         if $as_executable_p "$ac_dir/$ac_prog"; then
3235           if test $ac_prog = install &&
3236             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3237             # AIX install.  It has an incompatible calling convention.
3238             :
3239           elif test $ac_prog = install &&
3240             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3241             # program-specific install script used by HP pwplus--don't use.
3242             :
3243           else
3244             ac_cv_path_install="$ac_dir/$ac_prog -c"
3245             break 2
3246           fi
3247         fi
3248       done
3249       ;;
3250     esac
3251   done
3252
3253 fi
3254   if test "${ac_cv_path_install+set}" = set; then
3255     INSTALL=$ac_cv_path_install
3256   else
3257     # As a last resort, use the slow shell script.  We don't cache a
3258     # path for INSTALL within a source directory, because that will
3259     # break other packages using the cache if that directory is
3260     # removed, or if the path is relative.
3261     INSTALL=$ac_install_sh
3262   fi
3263 fi
3264 echo "$as_me:3264: result: $INSTALL" >&5
3265 echo "${ECHO_T}$INSTALL" >&6
3266
3267 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3268 # It thinks the first close brace ends the variable substitution.
3269 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3270
3271 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3272
3273 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3274
3275 case $INSTALL in
3276 (/*)
3277         ;;
3278 (*)
3279         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3280         test -z "$cf_dir" && cf_dir=.
3281         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3282         ;;
3283 esac
3284
3285 for ac_prog in tdlint lint alint splint lclint
3286 do
3287   # Extract the first word of "$ac_prog", so it can be a program name with args.
3288 set dummy $ac_prog; ac_word=$2
3289 echo "$as_me:3289: checking for $ac_word" >&5
3290 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3291 if test "${ac_cv_prog_LINT+set}" = set; then
3292   echo $ECHO_N "(cached) $ECHO_C" >&6
3293 else
3294   if test -n "$LINT"; then
3295   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3296 else
3297   ac_save_IFS=$IFS; IFS=$ac_path_separator
3298 ac_dummy="$PATH"
3299 for ac_dir in $ac_dummy; do
3300   IFS=$ac_save_IFS
3301   test -z "$ac_dir" && ac_dir=.
3302   $as_executable_p "$ac_dir/$ac_word" || continue
3303 ac_cv_prog_LINT="$ac_prog"
3304 echo "$as_me:3304: found $ac_dir/$ac_word" >&5
3305 break
3306 done
3307
3308 fi
3309 fi
3310 LINT=$ac_cv_prog_LINT
3311 if test -n "$LINT"; then
3312   echo "$as_me:3312: result: $LINT" >&5
3313 echo "${ECHO_T}$LINT" >&6
3314 else
3315   echo "$as_me:3315: result: no" >&5
3316 echo "${ECHO_T}no" >&6
3317 fi
3318
3319   test -n "$LINT" && break
3320 done
3321
3322 echo "$as_me:3322: checking whether ln -s works" >&5
3323 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3324 LN_S=$as_ln_s
3325 if test "$LN_S" = "ln -s"; then
3326   echo "$as_me:3326: result: yes" >&5
3327 echo "${ECHO_T}yes" >&6
3328 else
3329   echo "$as_me:3329: result: no, using $LN_S" >&5
3330 echo "${ECHO_T}no, using $LN_S" >&6
3331 fi
3332
3333 echo "$as_me:3333: checking if $LN_S -f options work" >&5
3334 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3335
3336 rm -f conf$$.src conf$$dst
3337 echo >conf$$.dst
3338 echo first >conf$$.src
3339 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3340         cf_prog_ln_sf=yes
3341 else
3342         cf_prog_ln_sf=no
3343 fi
3344 rm -f conf$$.dst conf$$src
3345 echo "$as_me:3345: result: $cf_prog_ln_sf" >&5
3346 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3347
3348 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3349
3350 echo "$as_me:3350: checking for long file names" >&5
3351 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3352 if test "${ac_cv_sys_long_file_names+set}" = set; then
3353   echo $ECHO_N "(cached) $ECHO_C" >&6
3354 else
3355   ac_cv_sys_long_file_names=yes
3356 # Test for long file names in all the places we know might matter:
3357 #      .                the current directory, where building will happen
3358 #      $prefix/lib      where we will be installing things
3359 #      $exec_prefix/lib likewise
3360 # eval it to expand exec_prefix.
3361 #      $TMPDIR          if set, where it might want to write temporary files
3362 # if $TMPDIR is not set:
3363 #      /tmp             where it might want to write temporary files
3364 #      /var/tmp         likewise
3365 #      /usr/tmp         likewise
3366 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3367   ac_tmpdirs=$TMPDIR
3368 else
3369   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3370 fi
3371 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3372   test -d $ac_dir || continue
3373   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3374   ac_xdir=$ac_dir/cf$$
3375   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3376   ac_tf1=$ac_xdir/conftest9012345
3377   ac_tf2=$ac_xdir/conftest9012346
3378   (echo 1 >$ac_tf1) 2>/dev/null
3379   (echo 2 >$ac_tf2) 2>/dev/null
3380   ac_val=`cat $ac_tf1 2>/dev/null`
3381   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3382     ac_cv_sys_long_file_names=no
3383     rm -rf $ac_xdir 2>/dev/null
3384     break
3385   fi
3386   rm -rf $ac_xdir 2>/dev/null
3387 done
3388 fi
3389 echo "$as_me:3389: result: $ac_cv_sys_long_file_names" >&5
3390 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3391 if test $ac_cv_sys_long_file_names = yes; then
3392
3393 cat >>confdefs.h <<\EOF
3394 #define HAVE_LONG_FILE_NAMES 1
3395 EOF
3396
3397 fi
3398
3399 # if we find pkg-config, check if we should install the ".pc" files.
3400
3401 echo "$as_me:3401: checking if you want to use pkg-config" >&5
3402 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3403
3404 # Check whether --with-pkg-config or --without-pkg-config was given.
3405 if test "${with_pkg_config+set}" = set; then
3406   withval="$with_pkg_config"
3407   cf_pkg_config=$withval
3408 else
3409   cf_pkg_config=yes
3410 fi;
3411 echo "$as_me:3411: result: $cf_pkg_config" >&5
3412 echo "${ECHO_T}$cf_pkg_config" >&6
3413
3414 case $cf_pkg_config in
3415 (no)
3416         PKG_CONFIG=none
3417         ;;
3418 (yes)
3419
3420 if test -n "$ac_tool_prefix"; then
3421   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3422 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3423 echo "$as_me:3423: checking for $ac_word" >&5
3424 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3425 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3426   echo $ECHO_N "(cached) $ECHO_C" >&6
3427 else
3428   case $PKG_CONFIG in
3429   [\\/]* | ?:[\\/]*)
3430   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3431   ;;
3432   *)
3433   ac_save_IFS=$IFS; IFS=$ac_path_separator
3434 ac_dummy="$PATH"
3435 for ac_dir in $ac_dummy; do
3436   IFS=$ac_save_IFS
3437   test -z "$ac_dir" && ac_dir=.
3438   if $as_executable_p "$ac_dir/$ac_word"; then
3439    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3440    echo "$as_me:3440: found $ac_dir/$ac_word" >&5
3441    break
3442 fi
3443 done
3444
3445   ;;
3446 esac
3447 fi
3448 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3449
3450 if test -n "$PKG_CONFIG"; then
3451   echo "$as_me:3451: result: $PKG_CONFIG" >&5
3452 echo "${ECHO_T}$PKG_CONFIG" >&6
3453 else
3454   echo "$as_me:3454: result: no" >&5
3455 echo "${ECHO_T}no" >&6
3456 fi
3457
3458 fi
3459 if test -z "$ac_cv_path_PKG_CONFIG"; then
3460   ac_pt_PKG_CONFIG=$PKG_CONFIG
3461   # Extract the first word of "pkg-config", so it can be a program name with args.
3462 set dummy pkg-config; ac_word=$2
3463 echo "$as_me:3463: checking for $ac_word" >&5
3464 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3465 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3466   echo $ECHO_N "(cached) $ECHO_C" >&6
3467 else
3468   case $ac_pt_PKG_CONFIG in
3469   [\\/]* | ?:[\\/]*)
3470   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3471   ;;
3472   *)
3473   ac_save_IFS=$IFS; IFS=$ac_path_separator
3474 ac_dummy="$PATH"
3475 for ac_dir in $ac_dummy; do
3476   IFS=$ac_save_IFS
3477   test -z "$ac_dir" && ac_dir=.
3478   if $as_executable_p "$ac_dir/$ac_word"; then
3479    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3480    echo "$as_me:3480: found $ac_dir/$ac_word" >&5
3481    break
3482 fi
3483 done
3484
3485   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3486   ;;
3487 esac
3488 fi
3489 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3490
3491 if test -n "$ac_pt_PKG_CONFIG"; then
3492   echo "$as_me:3492: result: $ac_pt_PKG_CONFIG" >&5
3493 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3494 else
3495   echo "$as_me:3495: result: no" >&5
3496 echo "${ECHO_T}no" >&6
3497 fi
3498
3499   PKG_CONFIG=$ac_pt_PKG_CONFIG
3500 else
3501   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3502 fi
3503
3504         ;;
3505 (*)
3506         PKG_CONFIG=$withval
3507         ;;
3508 esac
3509
3510 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3511 if test "$PKG_CONFIG" != none ; then
3512
3513 if test "x$prefix" != xNONE; then
3514         cf_path_syntax="$prefix"
3515 else
3516         cf_path_syntax="$ac_default_prefix"
3517 fi
3518
3519 case ".$PKG_CONFIG" in
3520 (.\$\(*\)*|.\'*\'*)
3521         ;;
3522 (..|./*|.\\*)
3523         ;;
3524 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3525         ;;
3526 (.\${*prefix}*|.\${*dir}*)
3527         eval PKG_CONFIG="$PKG_CONFIG"
3528         case ".$PKG_CONFIG" in
3529         (.NONE/*)
3530                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3531                 ;;
3532         esac
3533         ;;
3534 (.no|.NONE/*)
3535         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3536         ;;
3537 (*)
3538         { { echo "$as_me:3538: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3539 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3540    { (exit 1); exit 1; }; }
3541         ;;
3542 esac
3543
3544 elif test "x$cf_pkg_config" != xno ; then
3545         { echo "$as_me:3545: WARNING: pkg-config is not installed" >&5
3546 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3547 fi
3548
3549 echo "$as_me:3549: checking for $PKG_CONFIG library directory" >&5
3550 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3551 if test "x$PKG_CONFIG" = xnone ; then
3552         PKG_CONFIG_LIBDIR=none
3553 else
3554
3555 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3556 if test "${with_pkg_config_libdir+set}" = set; then
3557   withval="$with_pkg_config_libdir"
3558   PKG_CONFIG_LIBDIR=$withval
3559 else
3560   PKG_CONFIG_LIBDIR=yes
3561 fi;
3562 fi
3563
3564 case x$PKG_CONFIG_LIBDIR in
3565 (x/*)
3566         ;;
3567 (xyes)
3568         # Look for the library directory using the same prefix as the executable
3569         if test "x$PKG_CONFIG" = xnone
3570         then
3571                 cf_path=$prefix
3572         else
3573                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3574         fi
3575
3576         # If you don't like using the default architecture, you have to specify the
3577         # intended library directory and corresponding compiler/linker options.
3578         #
3579         # This case allows for Debian's 2014-flavor of multiarch, along with the
3580         # most common variations before that point.  Some other variants spell the
3581         # directory differently, e.g., "pkg-config", and put it in unusual places.
3582         # pkg-config has always been poorly standardized, which is ironic...
3583         case x`(arch) 2>/dev/null` in
3584         (*64)
3585                 cf_search_path="\
3586                         $cf_path/lib/*64-linux-gnu \
3587                         $cf_path/share \
3588                         $cf_path/lib64 \
3589                         $cf_path/lib32 \
3590                         $cf_path/lib"
3591                 ;;
3592         (*)
3593                 cf_search_path="\
3594                         $cf_path/lib/*-linux-gnu \
3595                         $cf_path/share \
3596                         $cf_path/lib32 \
3597                         $cf_path/lib \
3598                         $cf_path/libdata"
3599                 ;;
3600         esac
3601
3602         test -n "$verbose" && echo "    list..." 1>&6
3603
3604 echo "${as_me:-configure}:3604: testing list... ..." 1>&5
3605
3606         for cf_config in $cf_search_path
3607         do
3608                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3609
3610 echo "${as_me:-configure}:3610: testing checking $cf_config/pkgconfig ..." 1>&5
3611
3612                 if test -d $cf_config/pkgconfig
3613                 then
3614                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3615                         echo "$as_me:3615: checking done" >&5
3616 echo $ECHO_N "checking done... $ECHO_C" >&6
3617                         break
3618                 fi
3619         done
3620         ;;
3621 (*)
3622         ;;
3623 esac
3624
3625 if test "x$PKG_CONFIG" != xnone ; then
3626         echo "$as_me:3626: result: $PKG_CONFIG_LIBDIR" >&5
3627 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3628 fi
3629
3630 if test "x$PKG_CONFIG" != xnone
3631 then
3632         echo "$as_me:3632: checking if we should install .pc files for $PKG_CONFIG" >&5
3633 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3634 else
3635         echo "$as_me:3635: checking if we should install .pc files" >&5
3636 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3637 fi
3638
3639 # Check whether --enable-pc-files or --disable-pc-files was given.
3640 if test "${enable_pc_files+set}" = set; then
3641   enableval="$enable_pc_files"
3642   enable_pc_files=$enableval
3643 else
3644   enable_pc_files=no
3645 fi;
3646 echo "$as_me:3646: result: $enable_pc_files" >&5
3647 echo "${ECHO_T}$enable_pc_files" >&6
3648
3649 if test "x$enable_pc_files" != xno
3650 then
3651         case "x$PKG_CONFIG_LIBDIR" in
3652         (xno|xyes)
3653                 { echo "$as_me:3653: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3654 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3655                 MAKE_PC_FILES="#"
3656                 ;;
3657         (*)
3658
3659 if test "x$prefix" != xNONE; then
3660         cf_path_syntax="$prefix"
3661 else
3662         cf_path_syntax="$ac_default_prefix"
3663 fi
3664
3665 case ".$PKG_CONFIG_LIBDIR" in
3666 (.\$\(*\)*|.\'*\'*)
3667         ;;
3668 (..|./*|.\\*)
3669         ;;
3670 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3671         ;;
3672 (.\${*prefix}*|.\${*dir}*)
3673         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3674         case ".$PKG_CONFIG_LIBDIR" in
3675         (.NONE/*)
3676                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3677                 ;;
3678         esac
3679         ;;
3680 (.no|.NONE/*)
3681         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3682         ;;
3683 (*)
3684         { { echo "$as_me:3684: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3685 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3686    { (exit 1); exit 1; }; }
3687         ;;
3688 esac
3689
3690                 MAKE_PC_FILES=
3691                 ;;
3692         esac
3693 else
3694         MAKE_PC_FILES="#"
3695 fi
3696
3697 if test -z "$MAKE_PC_FILES"
3698 then
3699         echo "$as_me:3699: checking for suffix to add to pc-files" >&5
3700 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3701
3702 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3703 if test "${with_pc_suffix+set}" = set; then
3704   withval="$with_pc_suffix"
3705   case "x$withval" in
3706         (xyes|xno)
3707                 PC_MODULE_SUFFIX=
3708                 ;;
3709         (*)     PC_MODULE_SUFFIX="$withval"
3710                 ;;
3711         esac
3712 fi;
3713         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3714         echo "$as_me:3714: result: $PC_MODULE_SUFFIX" >&5
3715 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3716         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3717
3718 fi
3719
3720 echo "$as_me:3720: checking if we should assume mixed-case filenames" >&5
3721 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3722
3723 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3724 if test "${enable_mixed_case+set}" = set; then
3725   enableval="$enable_mixed_case"
3726   enable_mixedcase=$enableval
3727 else
3728   enable_mixedcase=auto
3729 fi;
3730 echo "$as_me:3730: result: $enable_mixedcase" >&5
3731 echo "${ECHO_T}$enable_mixedcase" >&6
3732 if test "$enable_mixedcase" = "auto" ; then
3733
3734 echo "$as_me:3734: checking if filesystem supports mixed-case filenames" >&5
3735 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3736 if test "${cf_cv_mixedcase+set}" = set; then
3737   echo $ECHO_N "(cached) $ECHO_C" >&6
3738 else
3739
3740 if test "$cross_compiling" = yes ; then
3741         case $target_alias in
3742         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
3743                 cf_cv_mixedcase=no
3744                 ;;
3745         (*)
3746                 cf_cv_mixedcase=yes
3747                 ;;
3748         esac
3749 else
3750         rm -f conftest CONFTEST
3751         echo test >conftest
3752         if test -f CONFTEST ; then
3753                 cf_cv_mixedcase=no
3754         else
3755                 cf_cv_mixedcase=yes
3756         fi
3757         rm -f conftest CONFTEST
3758 fi
3759
3760 fi
3761 echo "$as_me:3761: result: $cf_cv_mixedcase" >&5
3762 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3763 test "$cf_cv_mixedcase" = yes &&
3764 cat >>confdefs.h <<\EOF
3765 #define MIXEDCASE_FILENAMES 1
3766 EOF
3767
3768 else
3769         cf_cv_mixedcase=$enable_mixedcase
3770         if test "x$enable_mixedcase" = "xyes" ; then
3771
3772 cat >>confdefs.h <<\EOF
3773 #define MIXEDCASE_FILENAMES 1
3774 EOF
3775
3776         fi
3777 fi
3778
3779 # do this after mixed-case option (tags/TAGS is not as important as tic).
3780 echo "$as_me:3780: checking whether ${MAKE-make} sets \${MAKE}" >&5
3781 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3782 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3783 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3784   echo $ECHO_N "(cached) $ECHO_C" >&6
3785 else
3786   cat >conftest.make <<\EOF
3787 all:
3788         @echo 'ac_maketemp="${MAKE}"'
3789 EOF
3790 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3791 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3792 if test -n "$ac_maketemp"; then
3793   eval ac_cv_prog_make_${ac_make}_set=yes
3794 else
3795   eval ac_cv_prog_make_${ac_make}_set=no
3796 fi
3797 rm -f conftest.make
3798 fi
3799 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3800   echo "$as_me:3800: result: yes" >&5
3801 echo "${ECHO_T}yes" >&6
3802   SET_MAKE=
3803 else
3804   echo "$as_me:3804: result: no" >&5
3805 echo "${ECHO_T}no" >&6
3806   SET_MAKE="MAKE=${MAKE-make}"
3807 fi
3808
3809 for ac_prog in exctags ctags
3810 do
3811   # Extract the first word of "$ac_prog", so it can be a program name with args.
3812 set dummy $ac_prog; ac_word=$2
3813 echo "$as_me:3813: checking for $ac_word" >&5
3814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3815 if test "${ac_cv_prog_CTAGS+set}" = set; then
3816   echo $ECHO_N "(cached) $ECHO_C" >&6
3817 else
3818   if test -n "$CTAGS"; then
3819   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3820 else
3821   ac_save_IFS=$IFS; IFS=$ac_path_separator
3822 ac_dummy="$PATH"
3823 for ac_dir in $ac_dummy; do
3824   IFS=$ac_save_IFS
3825   test -z "$ac_dir" && ac_dir=.
3826   $as_executable_p "$ac_dir/$ac_word" || continue
3827 ac_cv_prog_CTAGS="$ac_prog"
3828 echo "$as_me:3828: found $ac_dir/$ac_word" >&5
3829 break
3830 done
3831
3832 fi
3833 fi
3834 CTAGS=$ac_cv_prog_CTAGS
3835 if test -n "$CTAGS"; then
3836   echo "$as_me:3836: result: $CTAGS" >&5
3837 echo "${ECHO_T}$CTAGS" >&6
3838 else
3839   echo "$as_me:3839: result: no" >&5
3840 echo "${ECHO_T}no" >&6
3841 fi
3842
3843   test -n "$CTAGS" && break
3844 done
3845
3846 for ac_prog in exetags etags
3847 do
3848   # Extract the first word of "$ac_prog", so it can be a program name with args.
3849 set dummy $ac_prog; ac_word=$2
3850 echo "$as_me:3850: checking for $ac_word" >&5
3851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3852 if test "${ac_cv_prog_ETAGS+set}" = set; then
3853   echo $ECHO_N "(cached) $ECHO_C" >&6
3854 else
3855   if test -n "$ETAGS"; then
3856   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3857 else
3858   ac_save_IFS=$IFS; IFS=$ac_path_separator
3859 ac_dummy="$PATH"
3860 for ac_dir in $ac_dummy; do
3861   IFS=$ac_save_IFS
3862   test -z "$ac_dir" && ac_dir=.
3863   $as_executable_p "$ac_dir/$ac_word" || continue
3864 ac_cv_prog_ETAGS="$ac_prog"
3865 echo "$as_me:3865: found $ac_dir/$ac_word" >&5
3866 break
3867 done
3868
3869 fi
3870 fi
3871 ETAGS=$ac_cv_prog_ETAGS
3872 if test -n "$ETAGS"; then
3873   echo "$as_me:3873: result: $ETAGS" >&5
3874 echo "${ECHO_T}$ETAGS" >&6
3875 else
3876   echo "$as_me:3876: result: no" >&5
3877 echo "${ECHO_T}no" >&6
3878 fi
3879
3880   test -n "$ETAGS" && break
3881 done
3882
3883 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3884 set dummy ${CTAGS:-ctags}; ac_word=$2
3885 echo "$as_me:3885: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890   if test -n "$MAKE_LOWER_TAGS"; then
3891   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3892 else
3893   ac_save_IFS=$IFS; IFS=$ac_path_separator
3894 ac_dummy="$PATH"
3895 for ac_dir in $ac_dummy; do
3896   IFS=$ac_save_IFS
3897   test -z "$ac_dir" && ac_dir=.
3898   $as_executable_p "$ac_dir/$ac_word" || continue
3899 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3900 echo "$as_me:3900: found $ac_dir/$ac_word" >&5
3901 break
3902 done
3903
3904   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3905 fi
3906 fi
3907 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3908 if test -n "$MAKE_LOWER_TAGS"; then
3909   echo "$as_me:3909: result: $MAKE_LOWER_TAGS" >&5
3910 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3911 else
3912   echo "$as_me:3912: result: no" >&5
3913 echo "${ECHO_T}no" >&6
3914 fi
3915
3916 if test "$cf_cv_mixedcase" = yes ; then
3917         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3918 set dummy ${ETAGS:-etags}; ac_word=$2
3919 echo "$as_me:3919: checking for $ac_word" >&5
3920 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3921 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3922   echo $ECHO_N "(cached) $ECHO_C" >&6
3923 else
3924   if test -n "$MAKE_UPPER_TAGS"; then
3925   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3926 else
3927   ac_save_IFS=$IFS; IFS=$ac_path_separator
3928 ac_dummy="$PATH"
3929 for ac_dir in $ac_dummy; do
3930   IFS=$ac_save_IFS
3931   test -z "$ac_dir" && ac_dir=.
3932   $as_executable_p "$ac_dir/$ac_word" || continue
3933 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3934 echo "$as_me:3934: found $ac_dir/$ac_word" >&5
3935 break
3936 done
3937
3938   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3939 fi
3940 fi
3941 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3942 if test -n "$MAKE_UPPER_TAGS"; then
3943   echo "$as_me:3943: result: $MAKE_UPPER_TAGS" >&5
3944 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3945 else
3946   echo "$as_me:3946: result: no" >&5
3947 echo "${ECHO_T}no" >&6
3948 fi
3949
3950 else
3951         MAKE_UPPER_TAGS=no
3952 fi
3953
3954 if test "$MAKE_UPPER_TAGS" = yes ; then
3955         MAKE_UPPER_TAGS=
3956 else
3957         MAKE_UPPER_TAGS="#"
3958 fi
3959
3960 if test "$MAKE_LOWER_TAGS" = yes ; then
3961         MAKE_LOWER_TAGS=
3962 else
3963         MAKE_LOWER_TAGS="#"
3964 fi
3965
3966 echo "$as_me:3966: checking for makeflags variable" >&5
3967 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3968 if test "${cf_cv_makeflags+set}" = set; then
3969   echo $ECHO_N "(cached) $ECHO_C" >&6
3970 else
3971
3972         cf_cv_makeflags=''
3973         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3974         do
3975                 cat >cf_makeflags.tmp <<CF_EOF
3976 SHELL = /bin/sh
3977 all :
3978         @ echo '.$cf_option'
3979 CF_EOF
3980                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3981                 case "$cf_result" in
3982                 (.*k|.*kw)
3983                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3984                         case "$cf_result" in
3985                         (.*CC=*)        cf_cv_makeflags=
3986                                 ;;
3987                         (*)     cf_cv_makeflags=$cf_option
3988                                 ;;
3989                         esac
3990                         break
3991                         ;;
3992                 (.-)    ;;
3993                 (*)     echo "given option \"$cf_option\", no match \"$cf_result\""
3994                         ;;
3995                 esac
3996         done
3997         rm -f cf_makeflags.tmp
3998
3999 fi
4000 echo "$as_me:4000: result: $cf_cv_makeflags" >&5
4001 echo "${ECHO_T}$cf_cv_makeflags" >&6
4002
4003 if test -n "$ac_tool_prefix"; then
4004   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4005 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4006 echo "$as_me:4006: checking for $ac_word" >&5
4007 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4008 if test "${ac_cv_prog_RANLIB+set}" = set; then
4009   echo $ECHO_N "(cached) $ECHO_C" >&6
4010 else
4011   if test -n "$RANLIB"; then
4012   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4013 else
4014   ac_save_IFS=$IFS; IFS=$ac_path_separator
4015 ac_dummy="$PATH"
4016 for ac_dir in $ac_dummy; do
4017   IFS=$ac_save_IFS
4018   test -z "$ac_dir" && ac_dir=.
4019   $as_executable_p "$ac_dir/$ac_word" || continue
4020 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4021 echo "$as_me:4021: found $ac_dir/$ac_word" >&5
4022 break
4023 done
4024
4025 fi
4026 fi
4027 RANLIB=$ac_cv_prog_RANLIB
4028 if test -n "$RANLIB"; then
4029   echo "$as_me:4029: result: $RANLIB" >&5
4030 echo "${ECHO_T}$RANLIB" >&6
4031 else
4032   echo "$as_me:4032: result: no" >&5
4033 echo "${ECHO_T}no" >&6
4034 fi
4035
4036 fi
4037 if test -z "$ac_cv_prog_RANLIB"; then
4038   ac_ct_RANLIB=$RANLIB
4039   # Extract the first word of "ranlib", so it can be a program name with args.
4040 set dummy ranlib; ac_word=$2
4041 echo "$as_me:4041: checking for $ac_word" >&5
4042 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4043 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4044   echo $ECHO_N "(cached) $ECHO_C" >&6
4045 else
4046   if test -n "$ac_ct_RANLIB"; then
4047   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4048 else
4049   ac_save_IFS=$IFS; IFS=$ac_path_separator
4050 ac_dummy="$PATH"
4051 for ac_dir in $ac_dummy; do
4052   IFS=$ac_save_IFS
4053   test -z "$ac_dir" && ac_dir=.
4054   $as_executable_p "$ac_dir/$ac_word" || continue
4055 ac_cv_prog_ac_ct_RANLIB="ranlib"
4056 echo "$as_me:4056: found $ac_dir/$ac_word" >&5
4057 break
4058 done
4059
4060   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4061 fi
4062 fi
4063 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4064 if test -n "$ac_ct_RANLIB"; then
4065   echo "$as_me:4065: result: $ac_ct_RANLIB" >&5
4066 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4067 else
4068   echo "$as_me:4068: result: no" >&5
4069 echo "${ECHO_T}no" >&6
4070 fi
4071
4072   RANLIB=$ac_ct_RANLIB
4073 else
4074   RANLIB="$ac_cv_prog_RANLIB"
4075 fi
4076
4077 if test -n "$ac_tool_prefix"; then
4078   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4079 set dummy ${ac_tool_prefix}ld; ac_word=$2
4080 echo "$as_me:4080: checking for $ac_word" >&5
4081 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4082 if test "${ac_cv_prog_LD+set}" = set; then
4083   echo $ECHO_N "(cached) $ECHO_C" >&6
4084 else
4085   if test -n "$LD"; then
4086   ac_cv_prog_LD="$LD" # Let the user override the test.
4087 else
4088   ac_save_IFS=$IFS; IFS=$ac_path_separator
4089 ac_dummy="$PATH"
4090 for ac_dir in $ac_dummy; do
4091   IFS=$ac_save_IFS
4092   test -z "$ac_dir" && ac_dir=.
4093   $as_executable_p "$ac_dir/$ac_word" || continue
4094 ac_cv_prog_LD="${ac_tool_prefix}ld"
4095 echo "$as_me:4095: found $ac_dir/$ac_word" >&5
4096 break
4097 done
4098
4099 fi
4100 fi
4101 LD=$ac_cv_prog_LD
4102 if test -n "$LD"; then
4103   echo "$as_me:4103: result: $LD" >&5
4104 echo "${ECHO_T}$LD" >&6
4105 else
4106   echo "$as_me:4106: result: no" >&5
4107 echo "${ECHO_T}no" >&6
4108 fi
4109
4110 fi
4111 if test -z "$ac_cv_prog_LD"; then
4112   ac_ct_LD=$LD
4113   # Extract the first word of "ld", so it can be a program name with args.
4114 set dummy ld; ac_word=$2
4115 echo "$as_me:4115: checking for $ac_word" >&5
4116 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4117 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4118   echo $ECHO_N "(cached) $ECHO_C" >&6
4119 else
4120   if test -n "$ac_ct_LD"; then
4121   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4122 else
4123   ac_save_IFS=$IFS; IFS=$ac_path_separator
4124 ac_dummy="$PATH"
4125 for ac_dir in $ac_dummy; do
4126   IFS=$ac_save_IFS
4127   test -z "$ac_dir" && ac_dir=.
4128   $as_executable_p "$ac_dir/$ac_word" || continue
4129 ac_cv_prog_ac_ct_LD="ld"
4130 echo "$as_me:4130: found $ac_dir/$ac_word" >&5
4131 break
4132 done
4133
4134   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4135 fi
4136 fi
4137 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4138 if test -n "$ac_ct_LD"; then
4139   echo "$as_me:4139: result: $ac_ct_LD" >&5
4140 echo "${ECHO_T}$ac_ct_LD" >&6
4141 else
4142   echo "$as_me:4142: result: no" >&5
4143 echo "${ECHO_T}no" >&6
4144 fi
4145
4146   LD=$ac_ct_LD
4147 else
4148   LD="$ac_cv_prog_LD"
4149 fi
4150
4151 if test -n "$ac_tool_prefix"; then
4152   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4153 set dummy ${ac_tool_prefix}ar; ac_word=$2
4154 echo "$as_me:4154: checking for $ac_word" >&5
4155 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4156 if test "${ac_cv_prog_AR+set}" = set; then
4157   echo $ECHO_N "(cached) $ECHO_C" >&6
4158 else
4159   if test -n "$AR"; then
4160   ac_cv_prog_AR="$AR" # Let the user override the test.
4161 else
4162   ac_save_IFS=$IFS; IFS=$ac_path_separator
4163 ac_dummy="$PATH"
4164 for ac_dir in $ac_dummy; do
4165   IFS=$ac_save_IFS
4166   test -z "$ac_dir" && ac_dir=.
4167   $as_executable_p "$ac_dir/$ac_word" || continue
4168 ac_cv_prog_AR="${ac_tool_prefix}ar"
4169 echo "$as_me:4169: found $ac_dir/$ac_word" >&5
4170 break
4171 done
4172
4173 fi
4174 fi
4175 AR=$ac_cv_prog_AR
4176 if test -n "$AR"; then
4177   echo "$as_me:4177: result: $AR" >&5
4178 echo "${ECHO_T}$AR" >&6
4179 else
4180   echo "$as_me:4180: result: no" >&5
4181 echo "${ECHO_T}no" >&6
4182 fi
4183
4184 fi
4185 if test -z "$ac_cv_prog_AR"; then
4186   ac_ct_AR=$AR
4187   # Extract the first word of "ar", so it can be a program name with args.
4188 set dummy ar; ac_word=$2
4189 echo "$as_me:4189: checking for $ac_word" >&5
4190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4191 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4192   echo $ECHO_N "(cached) $ECHO_C" >&6
4193 else
4194   if test -n "$ac_ct_AR"; then
4195   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4196 else
4197   ac_save_IFS=$IFS; IFS=$ac_path_separator
4198 ac_dummy="$PATH"
4199 for ac_dir in $ac_dummy; do
4200   IFS=$ac_save_IFS
4201   test -z "$ac_dir" && ac_dir=.
4202   $as_executable_p "$ac_dir/$ac_word" || continue
4203 ac_cv_prog_ac_ct_AR="ar"
4204 echo "$as_me:4204: found $ac_dir/$ac_word" >&5
4205 break
4206 done
4207
4208   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4209 fi
4210 fi
4211 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4212 if test -n "$ac_ct_AR"; then
4213   echo "$as_me:4213: result: $ac_ct_AR" >&5
4214 echo "${ECHO_T}$ac_ct_AR" >&6
4215 else
4216   echo "$as_me:4216: result: no" >&5
4217 echo "${ECHO_T}no" >&6
4218 fi
4219
4220   AR=$ac_ct_AR
4221 else
4222   AR="$ac_cv_prog_AR"
4223 fi
4224
4225 if test -n "$ac_tool_prefix"; then
4226   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4227 set dummy ${ac_tool_prefix}nm; ac_word=$2
4228 echo "$as_me:4228: checking for $ac_word" >&5
4229 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4230 if test "${ac_cv_prog_NM+set}" = set; then
4231   echo $ECHO_N "(cached) $ECHO_C" >&6
4232 else
4233   if test -n "$NM"; then
4234   ac_cv_prog_NM="$NM" # Let the user override the test.
4235 else
4236   ac_save_IFS=$IFS; IFS=$ac_path_separator
4237 ac_dummy="$PATH"
4238 for ac_dir in $ac_dummy; do
4239   IFS=$ac_save_IFS
4240   test -z "$ac_dir" && ac_dir=.
4241   $as_executable_p "$ac_dir/$ac_word" || continue
4242 ac_cv_prog_NM="${ac_tool_prefix}nm"
4243 echo "$as_me:4243: found $ac_dir/$ac_word" >&5
4244 break
4245 done
4246
4247 fi
4248 fi
4249 NM=$ac_cv_prog_NM
4250 if test -n "$NM"; then
4251   echo "$as_me:4251: result: $NM" >&5
4252 echo "${ECHO_T}$NM" >&6
4253 else
4254   echo "$as_me:4254: result: no" >&5
4255 echo "${ECHO_T}no" >&6
4256 fi
4257
4258 fi
4259 if test -z "$ac_cv_prog_NM"; then
4260   ac_ct_NM=$NM
4261   # Extract the first word of "nm", so it can be a program name with args.
4262 set dummy nm; ac_word=$2
4263 echo "$as_me:4263: checking for $ac_word" >&5
4264 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4265 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4266   echo $ECHO_N "(cached) $ECHO_C" >&6
4267 else
4268   if test -n "$ac_ct_NM"; then
4269   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4270 else
4271   ac_save_IFS=$IFS; IFS=$ac_path_separator
4272 ac_dummy="$PATH"
4273 for ac_dir in $ac_dummy; do
4274   IFS=$ac_save_IFS
4275   test -z "$ac_dir" && ac_dir=.
4276   $as_executable_p "$ac_dir/$ac_word" || continue
4277 ac_cv_prog_ac_ct_NM="nm"
4278 echo "$as_me:4278: found $ac_dir/$ac_word" >&5
4279 break
4280 done
4281
4282   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4283 fi
4284 fi
4285 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4286 if test -n "$ac_ct_NM"; then
4287   echo "$as_me:4287: result: $ac_ct_NM" >&5
4288 echo "${ECHO_T}$ac_ct_NM" >&6
4289 else
4290   echo "$as_me:4290: result: no" >&5
4291 echo "${ECHO_T}no" >&6
4292 fi
4293
4294   NM=$ac_ct_NM
4295 else
4296   NM="$ac_cv_prog_NM"
4297 fi
4298
4299 if test -n "$ac_tool_prefix"; then
4300   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4301 set dummy ${ac_tool_prefix}ar; ac_word=$2
4302 echo "$as_me:4302: checking for $ac_word" >&5
4303 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4304 if test "${ac_cv_prog_AR+set}" = set; then
4305   echo $ECHO_N "(cached) $ECHO_C" >&6
4306 else
4307   if test -n "$AR"; then
4308   ac_cv_prog_AR="$AR" # Let the user override the test.
4309 else
4310   ac_save_IFS=$IFS; IFS=$ac_path_separator
4311 ac_dummy="$PATH"
4312 for ac_dir in $ac_dummy; do
4313   IFS=$ac_save_IFS
4314   test -z "$ac_dir" && ac_dir=.
4315   $as_executable_p "$ac_dir/$ac_word" || continue
4316 ac_cv_prog_AR="${ac_tool_prefix}ar"
4317 echo "$as_me:4317: found $ac_dir/$ac_word" >&5
4318 break
4319 done
4320
4321 fi
4322 fi
4323 AR=$ac_cv_prog_AR
4324 if test -n "$AR"; then
4325   echo "$as_me:4325: result: $AR" >&5
4326 echo "${ECHO_T}$AR" >&6
4327 else
4328   echo "$as_me:4328: result: no" >&5
4329 echo "${ECHO_T}no" >&6
4330 fi
4331
4332 fi
4333 if test -z "$ac_cv_prog_AR"; then
4334   ac_ct_AR=$AR
4335   # Extract the first word of "ar", so it can be a program name with args.
4336 set dummy ar; ac_word=$2
4337 echo "$as_me:4337: checking for $ac_word" >&5
4338 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4339 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4340   echo $ECHO_N "(cached) $ECHO_C" >&6
4341 else
4342   if test -n "$ac_ct_AR"; then
4343   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4344 else
4345   ac_save_IFS=$IFS; IFS=$ac_path_separator
4346 ac_dummy="$PATH"
4347 for ac_dir in $ac_dummy; do
4348   IFS=$ac_save_IFS
4349   test -z "$ac_dir" && ac_dir=.
4350   $as_executable_p "$ac_dir/$ac_word" || continue
4351 ac_cv_prog_ac_ct_AR="ar"
4352 echo "$as_me:4352: found $ac_dir/$ac_word" >&5
4353 break
4354 done
4355
4356   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4357 fi
4358 fi
4359 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4360 if test -n "$ac_ct_AR"; then
4361   echo "$as_me:4361: result: $ac_ct_AR" >&5
4362 echo "${ECHO_T}$ac_ct_AR" >&6
4363 else
4364   echo "$as_me:4364: result: no" >&5
4365 echo "${ECHO_T}no" >&6
4366 fi
4367
4368   AR=$ac_ct_AR
4369 else
4370   AR="$ac_cv_prog_AR"
4371 fi
4372
4373 echo "$as_me:4373: checking for options to update archives" >&5
4374 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4375 if test "${cf_cv_ar_flags+set}" = set; then
4376   echo $ECHO_N "(cached) $ECHO_C" >&6
4377 else
4378
4379         cf_cv_ar_flags=unknown
4380         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4381         do
4382
4383                 # check if $ARFLAGS already contains this choice
4384                 if test "x$ARFLAGS" != "x" ; then
4385                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4386                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4387                                 cf_cv_ar_flags=
4388                                 break
4389                         fi
4390                 fi
4391
4392                 rm -f conftest.$ac_cv_objext
4393                 rm -f conftest.a
4394
4395                 cat >conftest.$ac_ext <<EOF
4396 #line 4396 "configure"
4397 int     testdata[3] = { 123, 456, 789 };
4398 EOF
4399                 if { (eval echo "$as_me:4399: \"$ac_compile\"") >&5
4400   (eval $ac_compile) 2>&5
4401   ac_status=$?
4402   echo "$as_me:4402: \$? = $ac_status" >&5
4403   (exit $ac_status); } ; then
4404                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4405                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4406                         if test -f conftest.a ; then
4407                                 cf_cv_ar_flags=$cf_ar_flags
4408                                 break
4409                         fi
4410                 else
4411                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4412
4413 echo "${as_me:-configure}:4413: testing cannot compile test-program ..." 1>&5
4414
4415                         break
4416                 fi
4417         done
4418         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4419
4420 fi
4421 echo "$as_me:4421: result: $cf_cv_ar_flags" >&5
4422 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4423
4424 if test -n "$ARFLAGS" ; then
4425         if test -n "$cf_cv_ar_flags" ; then
4426                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4427         fi
4428 else
4429         ARFLAGS=$cf_cv_ar_flags
4430 fi
4431
4432 echo "$as_me:4432: checking if you have specified an install-prefix" >&5
4433 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4434
4435 # Check whether --with-install-prefix or --without-install-prefix was given.
4436 if test "${with_install_prefix+set}" = set; then
4437   withval="$with_install_prefix"
4438   case "x$withval" in
4439         (xyes|xno)
4440                 ;;
4441         (*)     DESTDIR="$withval"
4442                 ;;
4443         esac
4444 fi;
4445 echo "$as_me:4445: result: $DESTDIR" >&5
4446 echo "${ECHO_T}$DESTDIR" >&6
4447
4448 ###############################################################################
4449
4450 # If we're cross-compiling, allow the user to override the tools and their
4451 # options.  The configure script is oriented toward identifying the host
4452 # compiler, etc., but we need a build compiler to generate parts of the source.
4453
4454 if test "$cross_compiling" = yes ; then
4455
4456         # defaults that we might want to override
4457         : ${BUILD_CFLAGS:=''}
4458         : ${BUILD_CPPFLAGS:=''}
4459         : ${BUILD_LDFLAGS:=''}
4460         : ${BUILD_LIBS:=''}
4461         : ${BUILD_EXEEXT:='$x'}
4462         : ${BUILD_OBJEXT:='o'}
4463
4464 # Check whether --with-build-cc or --without-build-cc was given.
4465 if test "${with_build_cc+set}" = set; then
4466   withval="$with_build_cc"
4467   BUILD_CC="$withval"
4468 else
4469   for ac_prog in gcc cc cl
4470 do
4471   # Extract the first word of "$ac_prog", so it can be a program name with args.
4472 set dummy $ac_prog; ac_word=$2
4473 echo "$as_me:4473: checking for $ac_word" >&5
4474 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4475 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4476   echo $ECHO_N "(cached) $ECHO_C" >&6
4477 else
4478   if test -n "$BUILD_CC"; then
4479   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4480 else
4481   ac_save_IFS=$IFS; IFS=$ac_path_separator
4482 ac_dummy="$PATH"
4483 for ac_dir in $ac_dummy; do
4484   IFS=$ac_save_IFS
4485   test -z "$ac_dir" && ac_dir=.
4486   $as_executable_p "$ac_dir/$ac_word" || continue
4487 ac_cv_prog_BUILD_CC="$ac_prog"
4488 echo "$as_me:4488: found $ac_dir/$ac_word" >&5
4489 break
4490 done
4491
4492 fi
4493 fi
4494 BUILD_CC=$ac_cv_prog_BUILD_CC
4495 if test -n "$BUILD_CC"; then
4496   echo "$as_me:4496: result: $BUILD_CC" >&5
4497 echo "${ECHO_T}$BUILD_CC" >&6
4498 else
4499   echo "$as_me:4499: result: no" >&5
4500 echo "${ECHO_T}no" >&6
4501 fi
4502
4503   test -n "$BUILD_CC" && break
4504 done
4505
4506 fi;
4507         echo "$as_me:4507: checking for native build C compiler" >&5
4508 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4509         echo "$as_me:4509: result: $BUILD_CC" >&5
4510 echo "${ECHO_T}$BUILD_CC" >&6
4511
4512         echo "$as_me:4512: checking for native build C preprocessor" >&5
4513 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4514
4515 # Check whether --with-build-cpp or --without-build-cpp was given.
4516 if test "${with_build_cpp+set}" = set; then
4517   withval="$with_build_cpp"
4518   BUILD_CPP="$withval"
4519 else
4520   BUILD_CPP='${BUILD_CC} -E'
4521 fi;
4522         echo "$as_me:4522: result: $BUILD_CPP" >&5
4523 echo "${ECHO_T}$BUILD_CPP" >&6
4524
4525         echo "$as_me:4525: checking for native build C flags" >&5
4526 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4527
4528 # Check whether --with-build-cflags or --without-build-cflags was given.
4529 if test "${with_build_cflags+set}" = set; then
4530   withval="$with_build_cflags"
4531   BUILD_CFLAGS="$withval"
4532 fi;
4533         echo "$as_me:4533: result: $BUILD_CFLAGS" >&5
4534 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4535
4536         echo "$as_me:4536: checking for native build C preprocessor-flags" >&5
4537 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4538
4539 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4540 if test "${with_build_cppflags+set}" = set; then
4541   withval="$with_build_cppflags"
4542   BUILD_CPPFLAGS="$withval"
4543 fi;
4544         echo "$as_me:4544: result: $BUILD_CPPFLAGS" >&5
4545 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4546
4547         echo "$as_me:4547: checking for native build linker-flags" >&5
4548 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4549
4550 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4551 if test "${with_build_ldflags+set}" = set; then
4552   withval="$with_build_ldflags"
4553   BUILD_LDFLAGS="$withval"
4554 fi;
4555         echo "$as_me:4555: result: $BUILD_LDFLAGS" >&5
4556 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4557
4558         echo "$as_me:4558: checking for native build linker-libraries" >&5
4559 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4560
4561 # Check whether --with-build-libs or --without-build-libs was given.
4562 if test "${with_build_libs+set}" = set; then
4563   withval="$with_build_libs"
4564   BUILD_LIBS="$withval"
4565 fi;
4566         echo "$as_me:4566: result: $BUILD_LIBS" >&5
4567 echo "${ECHO_T}$BUILD_LIBS" >&6
4568
4569         # this assumes we're on Unix.
4570         BUILD_EXEEXT=
4571         BUILD_OBJEXT=o
4572
4573         : ${BUILD_CC:='${CC}'}
4574
4575         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4576                 { { echo "$as_me:4576: error: Cross-build requires two compilers.
4577 Use --with-build-cc to specify the native compiler." >&5
4578 echo "$as_me: error: Cross-build requires two compilers.
4579 Use --with-build-cc to specify the native compiler." >&2;}
4580    { (exit 1); exit 1; }; }
4581         fi
4582
4583 else
4584         : ${BUILD_CC:='${CC}'}
4585         : ${BUILD_CPP:='${CPP}'}
4586         : ${BUILD_CFLAGS:='${CFLAGS}'}
4587         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4588         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4589         : ${BUILD_LIBS:='${LIBS}'}
4590         : ${BUILD_EXEEXT:='$x'}
4591         : ${BUILD_OBJEXT:='o'}
4592 fi
4593
4594 ###############################################################################
4595
4596 ### Options to allow the user to specify the set of libraries which are used.
4597 ### Use "--without-normal --with-shared" to allow the default model to be
4598 ### shared, for example.
4599 cf_list_models=""
4600
4601 echo "$as_me:4601: checking if libtool -version-number should be used" >&5
4602 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4603
4604 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4605 if test "${enable_libtool_version+set}" = set; then
4606   enableval="$enable_libtool_version"
4607   test "$enableval" != no && enableval=yes
4608         if test "$enableval" != "yes" ; then
4609     cf_libtool_version=no
4610         else
4611                 cf_libtool_version=yes
4612         fi
4613 else
4614   enableval=yes
4615         cf_libtool_version=yes
4616
4617 fi;
4618 echo "$as_me:4618: result: $cf_libtool_version" >&5
4619 echo "${ECHO_T}$cf_libtool_version" >&6
4620
4621 if test "$cf_libtool_version" = yes ; then
4622         LIBTOOL_VERSION="-version-number"
4623 else
4624         LIBTOOL_VERSION="-version-info"
4625         case "x$VERSION" in
4626         (x)
4627                 { echo "$as_me:4627: WARNING: VERSION was not set" >&5
4628 echo "$as_me: WARNING: VERSION was not set" >&2;}
4629                 ;;
4630         (x*.*.*)
4631                 ABI_VERSION="$VERSION"
4632                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4633
4634 echo "${as_me:-configure}:4634: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4635
4636                 ;;
4637         (x*:*:*)
4638                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4639                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4640
4641 echo "${as_me:-configure}:4641: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4642
4643                 ;;
4644         (*)
4645                 { echo "$as_me:4645: WARNING: unexpected VERSION value: $VERSION" >&5
4646 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4647                 ;;
4648         esac
4649 fi
4650
4651 LIBTOOL=
4652
4653 # common library maintenance symbols that are convenient for libtool scripts:
4654 LIB_CREATE='${AR} -cr'
4655 LIB_OBJECT='${OBJECTS}'
4656 LIB_SUFFIX=.a
4657 LIB_PREP="$RANLIB"
4658
4659 # symbols used to prop libtool up to enable it to determine what it should be
4660 # doing:
4661 LIB_CLEAN=
4662 LIB_COMPILE=
4663 LIB_LINK='${CC}'
4664 LIB_INSTALL=
4665 LIB_UNINSTALL=
4666
4667 echo "$as_me:4667: checking if you want to build libraries with libtool" >&5
4668 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4669
4670 # Check whether --with-libtool or --without-libtool was given.
4671 if test "${with_libtool+set}" = set; then
4672   withval="$with_libtool"
4673   with_libtool=$withval
4674 else
4675   with_libtool=no
4676 fi;
4677 echo "$as_me:4677: result: $with_libtool" >&5
4678 echo "${ECHO_T}$with_libtool" >&6
4679 if test "$with_libtool" != "no"; then
4680
4681         if test "$with_libtool" != "yes" ; then
4682
4683 if test "x$prefix" != xNONE; then
4684         cf_path_syntax="$prefix"
4685 else
4686         cf_path_syntax="$ac_default_prefix"
4687 fi
4688
4689 case ".$with_libtool" in
4690 (.\$\(*\)*|.\'*\'*)
4691         ;;
4692 (..|./*|.\\*)
4693         ;;
4694 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4695         ;;
4696 (.\${*prefix}*|.\${*dir}*)
4697         eval with_libtool="$with_libtool"
4698         case ".$with_libtool" in
4699         (.NONE/*)
4700                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4701                 ;;
4702         esac
4703         ;;
4704 (.no|.NONE/*)
4705         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4706         ;;
4707 (*)
4708         { { echo "$as_me:4708: error: expected a pathname, not \"$with_libtool\"" >&5
4709 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4710    { (exit 1); exit 1; }; }
4711         ;;
4712 esac
4713
4714                 LIBTOOL=$with_libtool
4715         else
4716                 if test -n "$ac_tool_prefix"; then
4717   for ac_prog in libtool glibtool
4718   do
4719     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4720 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4721 echo "$as_me:4721: checking for $ac_word" >&5
4722 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4723 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4724   echo $ECHO_N "(cached) $ECHO_C" >&6
4725 else
4726   if test -n "$LIBTOOL"; then
4727   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4728 else
4729   ac_save_IFS=$IFS; IFS=$ac_path_separator
4730 ac_dummy="$PATH"
4731 for ac_dir in $ac_dummy; do
4732   IFS=$ac_save_IFS
4733   test -z "$ac_dir" && ac_dir=.
4734   $as_executable_p "$ac_dir/$ac_word" || continue
4735 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4736 echo "$as_me:4736: found $ac_dir/$ac_word" >&5
4737 break
4738 done
4739
4740 fi
4741 fi
4742 LIBTOOL=$ac_cv_prog_LIBTOOL
4743 if test -n "$LIBTOOL"; then
4744   echo "$as_me:4744: result: $LIBTOOL" >&5
4745 echo "${ECHO_T}$LIBTOOL" >&6
4746 else
4747   echo "$as_me:4747: result: no" >&5
4748 echo "${ECHO_T}no" >&6
4749 fi
4750
4751     test -n "$LIBTOOL" && break
4752   done
4753 fi
4754 if test -z "$LIBTOOL"; then
4755   ac_ct_LIBTOOL=$LIBTOOL
4756   for ac_prog in libtool glibtool
4757 do
4758   # Extract the first word of "$ac_prog", so it can be a program name with args.
4759 set dummy $ac_prog; ac_word=$2
4760 echo "$as_me:4760: checking for $ac_word" >&5
4761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4762 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4763   echo $ECHO_N "(cached) $ECHO_C" >&6
4764 else
4765   if test -n "$ac_ct_LIBTOOL"; then
4766   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4767 else
4768   ac_save_IFS=$IFS; IFS=$ac_path_separator
4769 ac_dummy="$PATH"
4770 for ac_dir in $ac_dummy; do
4771   IFS=$ac_save_IFS
4772   test -z "$ac_dir" && ac_dir=.
4773   $as_executable_p "$ac_dir/$ac_word" || continue
4774 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4775 echo "$as_me:4775: found $ac_dir/$ac_word" >&5
4776 break
4777 done
4778
4779 fi
4780 fi
4781 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4782 if test -n "$ac_ct_LIBTOOL"; then
4783   echo "$as_me:4783: result: $ac_ct_LIBTOOL" >&5
4784 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4785 else
4786   echo "$as_me:4786: result: no" >&5
4787 echo "${ECHO_T}no" >&6
4788 fi
4789
4790   test -n "$ac_ct_LIBTOOL" && break
4791 done
4792 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4793
4794   LIBTOOL=$ac_ct_LIBTOOL
4795 fi
4796
4797 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4798 then
4799         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.].*//'`
4800 else
4801         cf_cv_libtool_version=
4802 fi
4803 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4804
4805                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4806                 then
4807
4808 unset ac_cv_prog_ac_ct_LIBTOOL
4809 unset ac_ct_LIBTOOL
4810 unset LIBTOOL
4811
4812                         if test -n "$ac_tool_prefix"; then
4813   for ac_prog in glibtool
4814   do
4815     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4816 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4817 echo "$as_me:4817: checking for $ac_word" >&5
4818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4819 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4820   echo $ECHO_N "(cached) $ECHO_C" >&6
4821 else
4822   if test -n "$LIBTOOL"; then
4823   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4824 else
4825   ac_save_IFS=$IFS; IFS=$ac_path_separator
4826 ac_dummy="$PATH"
4827 for ac_dir in $ac_dummy; do
4828   IFS=$ac_save_IFS
4829   test -z "$ac_dir" && ac_dir=.
4830   $as_executable_p "$ac_dir/$ac_word" || continue
4831 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4832 echo "$as_me:4832: found $ac_dir/$ac_word" >&5
4833 break
4834 done
4835
4836 fi
4837 fi
4838 LIBTOOL=$ac_cv_prog_LIBTOOL
4839 if test -n "$LIBTOOL"; then
4840   echo "$as_me:4840: result: $LIBTOOL" >&5
4841 echo "${ECHO_T}$LIBTOOL" >&6
4842 else
4843   echo "$as_me:4843: result: no" >&5
4844 echo "${ECHO_T}no" >&6
4845 fi
4846
4847     test -n "$LIBTOOL" && break
4848   done
4849 fi
4850 if test -z "$LIBTOOL"; then
4851   ac_ct_LIBTOOL=$LIBTOOL
4852   for ac_prog in glibtool
4853 do
4854   # Extract the first word of "$ac_prog", so it can be a program name with args.
4855 set dummy $ac_prog; ac_word=$2
4856 echo "$as_me:4856: checking for $ac_word" >&5
4857 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4858 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4859   echo $ECHO_N "(cached) $ECHO_C" >&6
4860 else
4861   if test -n "$ac_ct_LIBTOOL"; then
4862   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4863 else
4864   ac_save_IFS=$IFS; IFS=$ac_path_separator
4865 ac_dummy="$PATH"
4866 for ac_dir in $ac_dummy; do
4867   IFS=$ac_save_IFS
4868   test -z "$ac_dir" && ac_dir=.
4869   $as_executable_p "$ac_dir/$ac_word" || continue
4870 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4871 echo "$as_me:4871: found $ac_dir/$ac_word" >&5
4872 break
4873 done
4874
4875 fi
4876 fi
4877 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4878 if test -n "$ac_ct_LIBTOOL"; then
4879   echo "$as_me:4879: result: $ac_ct_LIBTOOL" >&5
4880 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4881 else
4882   echo "$as_me:4882: result: no" >&5
4883 echo "${ECHO_T}no" >&6
4884 fi
4885
4886   test -n "$ac_ct_LIBTOOL" && break
4887 done
4888 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4889
4890   LIBTOOL=$ac_ct_LIBTOOL
4891 fi
4892
4893 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4894 then
4895         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.].*//'`
4896 else
4897         cf_cv_libtool_version=
4898 fi
4899 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4900
4901                 fi
4902         fi
4903         if test -z "$LIBTOOL" ; then
4904                 { { echo "$as_me:4904: error: Cannot find libtool" >&5
4905 echo "$as_me: error: Cannot find libtool" >&2;}
4906    { (exit 1); exit 1; }; }
4907         fi
4908         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4909         LIB_OBJECT='${OBJECTS:.o=.lo}'
4910         LIB_SUFFIX=.la
4911         LIB_CLEAN='${LIBTOOL} --mode=clean'
4912         LIB_COMPILE='${LIBTOOL} --mode=compile'
4913         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4914         LIB_INSTALL='${LIBTOOL} --mode=install'
4915         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4916         LIB_PREP=:
4917
4918 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4919 then
4920         echo "$as_me:4920: checking version of $LIBTOOL" >&5
4921 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4922
4923 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4924 then
4925         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.].*//'`
4926 else
4927         cf_cv_libtool_version=
4928 fi
4929 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4930
4931         echo "$as_me:4931: result: $cf_cv_libtool_version" >&5
4932 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4933         if test -z "$cf_cv_libtool_version" ; then
4934                 { { echo "$as_me:4934: error: This is not GNU libtool" >&5
4935 echo "$as_me: error: This is not GNU libtool" >&2;}
4936    { (exit 1); exit 1; }; }
4937         fi
4938 else
4939         { { echo "$as_me:4939: error: GNU libtool has not been found" >&5
4940 echo "$as_me: error: GNU libtool has not been found" >&2;}
4941    { (exit 1); exit 1; }; }
4942 fi
4943
4944         # special hack to add -no-undefined (which libtool should do for itself)
4945         LT_UNDEF=
4946         case "$cf_cv_system_name" in
4947         (cygwin*|msys*|mingw32*|uwin*|aix[4-7])
4948                 LT_UNDEF=-no-undefined
4949                 ;;
4950         esac
4951
4952         # special hack to add --tag option for C++ compiler
4953         case $cf_cv_libtool_version in
4954         (1.[5-9]*|[2-9].[0-9.a-z]*)
4955                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4956                 LIBTOOL="$LIBTOOL --tag=CC"
4957                 ;;
4958         (*)
4959                 LIBTOOL_CXX="$LIBTOOL"
4960                 ;;
4961         esac
4962 else
4963         LIBTOOL=""
4964         LIBTOOL_CXX=""
4965 fi
4966
4967 test -z "$LIBTOOL" && ECHO_LT=
4968
4969 if test "$with_libtool" != "no" ; then
4970
4971 cf_list_models="$cf_list_models libtool"
4972
4973 else
4974
4975 echo "$as_me:4975: checking if you want to build shared libraries" >&5
4976 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4977
4978 # Check whether --with-shared or --without-shared was given.
4979 if test "${with_shared+set}" = set; then
4980   withval="$with_shared"
4981   with_shared=$withval
4982 else
4983   with_shared=no
4984 fi;
4985 echo "$as_me:4985: result: $with_shared" >&5
4986 echo "${ECHO_T}$with_shared" >&6
4987 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4988
4989 echo "$as_me:4989: checking if you want to build static libraries" >&5
4990 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4991
4992 # Check whether --with-normal or --without-normal was given.
4993 if test "${with_normal+set}" = set; then
4994   withval="$with_normal"
4995   with_normal=$withval
4996 else
4997   with_normal=yes
4998 fi;
4999 echo "$as_me:4999: result: $with_normal" >&5
5000 echo "${ECHO_T}$with_normal" >&6
5001 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5002
5003 echo "$as_me:5003: checking if you want to build debug libraries" >&5
5004 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5005
5006 # Check whether --with-debug or --without-debug was given.
5007 if test "${with_debug+set}" = set; then
5008   withval="$with_debug"
5009   with_debug=$withval
5010 else
5011   with_debug=yes
5012 fi;
5013 echo "$as_me:5013: result: $with_debug" >&5
5014 echo "${ECHO_T}$with_debug" >&6
5015 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5016
5017 echo "$as_me:5017: checking if you want to build profiling libraries" >&5
5018 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5019
5020 # Check whether --with-profile or --without-profile was given.
5021 if test "${with_profile+set}" = set; then
5022   withval="$with_profile"
5023   with_profile=$withval
5024 else
5025   with_profile=no
5026 fi;
5027 echo "$as_me:5027: result: $with_profile" >&5
5028 echo "${ECHO_T}$with_profile" >&6
5029 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5030
5031 fi
5032
5033 if test "X$cf_with_cxx_binding" != Xno; then
5034 if test "x$with_shared" = "xyes"; then
5035 echo "$as_me:5035: checking if you want to build C++ shared libraries" >&5
5036 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5037
5038 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5039 if test "${with_cxx_shared+set}" = set; then
5040   withval="$with_cxx_shared"
5041   with_shared_cxx=$withval
5042 else
5043   with_shared_cxx=no
5044 fi;
5045 echo "$as_me:5045: result: $with_shared_cxx" >&5
5046 echo "${ECHO_T}$with_shared_cxx" >&6
5047 fi
5048 fi
5049
5050 ###############################################################################
5051
5052 echo "$as_me:5052: checking for specified models" >&5
5053 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5054 test -z "$cf_list_models" && cf_list_models=normal
5055 test "$with_libtool" != "no" && cf_list_models=libtool
5056 echo "$as_me:5056: result: $cf_list_models" >&5
5057 echo "${ECHO_T}$cf_list_models" >&6
5058
5059 ### Use the first model as the default, and save its suffix for use in building
5060 ### up test-applications.
5061 echo "$as_me:5061: checking for default model" >&5
5062 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5063 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5064 echo "$as_me:5064: result: $DFT_LWR_MODEL" >&5
5065 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5066
5067 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5068
5069 TICS_NAME=tic
5070
5071 TINFO_NAME=tinfo
5072
5073 LIB_NAME=ncurses
5074
5075 LIB_DIR=../lib
5076 LIB_2ND=../../lib
5077
5078 echo "$as_me:5078: checking if you want to have a library-prefix" >&5
5079 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5080
5081 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5082 if test "${with_lib_prefix+set}" = set; then
5083   withval="$with_lib_prefix"
5084   with_lib_prefix=$withval
5085 else
5086   with_lib_prefix=auto
5087 fi;
5088 echo "$as_me:5088: result: $with_lib_prefix" >&5
5089 echo "${ECHO_T}$with_lib_prefix" >&6
5090
5091 if test $with_lib_prefix = auto
5092 then
5093
5094         case $cf_cv_system_name in
5095         (OS/2*|os2*)
5096                 LIB_PREFIX=''
5097                 ;;
5098         (*)     LIB_PREFIX='lib'
5099                 ;;
5100         esac
5101 cf_prefix=$LIB_PREFIX
5102
5103 elif test $with_lib_prefix = no
5104 then
5105         LIB_PREFIX=
5106 else
5107         LIB_PREFIX=$with_lib_prefix
5108 fi
5109
5110 LIB_SUFFIX=
5111
5112         echo "$as_me:5112: checking for PATH separator" >&5
5113 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5114         case $cf_cv_system_name in
5115         (os2*)  PATH_SEPARATOR=';'  ;;
5116         (*)     ${PATH_SEPARATOR:=':'}  ;;
5117         esac
5118
5119         echo "$as_me:5119: result: $PATH_SEPARATOR" >&5
5120 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5121
5122 ###############################################################################
5123
5124 echo "$as_me:5124: checking if you want to build a separate terminfo library" >&5
5125 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5126
5127 # Check whether --with-termlib or --without-termlib was given.
5128 if test "${with_termlib+set}" = set; then
5129   withval="$with_termlib"
5130   with_termlib=$withval
5131 else
5132   with_termlib=no
5133 fi;
5134 echo "$as_me:5134: result: $with_termlib" >&5
5135 echo "${ECHO_T}$with_termlib" >&6
5136
5137 echo "$as_me:5137: checking if you want to build a separate tic library" >&5
5138 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5139
5140 # Check whether --with-ticlib or --without-ticlib was given.
5141 if test "${with_ticlib+set}" = set; then
5142   withval="$with_ticlib"
5143   with_ticlib=$withval
5144 else
5145   with_ticlib=no
5146 fi;
5147 echo "$as_me:5147: result: $with_ticlib" >&5
5148 echo "${ECHO_T}$with_ticlib" >&6
5149
5150 ### Checks for special libraries, must be done up-front.
5151 SHLIB_LIST=""
5152
5153 echo "$as_me:5153: checking if you want to link with the GPM mouse library" >&5
5154 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
5155
5156 # Check whether --with-gpm or --without-gpm was given.
5157 if test "${with_gpm+set}" = set; then
5158   withval="$with_gpm"
5159   with_gpm=$withval
5160 else
5161   with_gpm=maybe
5162 fi;
5163 echo "$as_me:5163: result: $with_gpm" >&5
5164 echo "${ECHO_T}$with_gpm" >&6
5165
5166 if test "$with_gpm" != no ; then
5167         echo "$as_me:5167: checking for gpm.h" >&5
5168 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
5169 if test "${ac_cv_header_gpm_h+set}" = set; then
5170   echo $ECHO_N "(cached) $ECHO_C" >&6
5171 else
5172   cat >conftest.$ac_ext <<_ACEOF
5173 #line 5173 "configure"
5174 #include "confdefs.h"
5175 #include <gpm.h>
5176 _ACEOF
5177 if { (eval echo "$as_me:5177: \"$ac_cpp conftest.$ac_ext\"") >&5
5178   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5179   ac_status=$?
5180   egrep -v '^ *\+' conftest.er1 >conftest.err
5181   rm -f conftest.er1
5182   cat conftest.err >&5
5183   echo "$as_me:5183: \$? = $ac_status" >&5
5184   (exit $ac_status); } >/dev/null; then
5185   if test -s conftest.err; then
5186     ac_cpp_err=$ac_c_preproc_warn_flag
5187   else
5188     ac_cpp_err=
5189   fi
5190 else
5191   ac_cpp_err=yes
5192 fi
5193 if test -z "$ac_cpp_err"; then
5194   ac_cv_header_gpm_h=yes
5195 else
5196   echo "$as_me: failed program was:" >&5
5197   cat conftest.$ac_ext >&5
5198   ac_cv_header_gpm_h=no
5199 fi
5200 rm -f conftest.err conftest.$ac_ext
5201 fi
5202 echo "$as_me:5202: result: $ac_cv_header_gpm_h" >&5
5203 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
5204 if test $ac_cv_header_gpm_h = yes; then
5205
5206 cat >>confdefs.h <<\EOF
5207 #define HAVE_GPM_H 1
5208 EOF
5209
5210                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
5211                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
5212
5213 echo "${as_me:-configure}:5213: testing assuming we really have GPM library ..." 1>&5
5214
5215 cat >>confdefs.h <<\EOF
5216 #define HAVE_LIBGPM 1
5217 EOF
5218
5219                 else
5220                         echo "$as_me:5220: checking for Gpm_Open in -lgpm" >&5
5221 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
5222 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
5223   echo $ECHO_N "(cached) $ECHO_C" >&6
5224 else
5225   ac_check_lib_save_LIBS=$LIBS
5226 LIBS="-lgpm  $LIBS"
5227 cat >conftest.$ac_ext <<_ACEOF
5228 #line 5228 "configure"
5229 #include "confdefs.h"
5230
5231 /* Override any gcc2 internal prototype to avoid an error.  */
5232 #ifdef __cplusplus
5233 extern "C"
5234 #endif
5235 /* We use char because int might match the return type of a gcc2
5236    builtin and then its argument prototype would still apply.  */
5237 char Gpm_Open ();
5238 int
5239 main ()
5240 {
5241 Gpm_Open ();
5242   ;
5243   return 0;
5244 }
5245 _ACEOF
5246 rm -f conftest.$ac_objext conftest$ac_exeext
5247 if { (eval echo "$as_me:5247: \"$ac_link\"") >&5
5248   (eval $ac_link) 2>&5
5249   ac_status=$?
5250   echo "$as_me:5250: \$? = $ac_status" >&5
5251   (exit $ac_status); } &&
5252          { ac_try='test -s conftest$ac_exeext'
5253   { (eval echo "$as_me:5253: \"$ac_try\"") >&5
5254   (eval $ac_try) 2>&5
5255   ac_status=$?
5256   echo "$as_me:5256: \$? = $ac_status" >&5
5257   (exit $ac_status); }; }; then
5258   ac_cv_lib_gpm_Gpm_Open=yes
5259 else
5260   echo "$as_me: failed program was:" >&5
5261 cat conftest.$ac_ext >&5
5262 ac_cv_lib_gpm_Gpm_Open=no
5263 fi
5264 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5265 LIBS=$ac_check_lib_save_LIBS
5266 fi
5267 echo "$as_me:5267: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5268 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5269 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5270   :
5271 else
5272
5273                                 { { echo "$as_me:5273: error: Cannot link with GPM library" >&5
5274 echo "$as_me: error: Cannot link with GPM library" >&2;}
5275    { (exit 1); exit 1; }; }
5276                 fi
5277                 with_gpm=yes
5278
5279 fi
5280
5281 else
5282
5283                 test "$with_gpm" != maybe && { echo "$as_me:5283: WARNING: Cannot find GPM header" >&5
5284 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5285                 with_gpm=no
5286
5287 fi
5288
5289 fi
5290
5291 if test "$with_gpm" != no ; then
5292         echo "$as_me:5292: checking if you want to load GPM dynamically" >&5
5293 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5294
5295 # Check whether --with-dlsym or --without-dlsym was given.
5296 if test "${with_dlsym+set}" = set; then
5297   withval="$with_dlsym"
5298   with_dlsym=$withval
5299 else
5300   with_dlsym=yes
5301 fi;
5302         echo "$as_me:5302: result: $with_dlsym" >&5
5303 echo "${ECHO_T}$with_dlsym" >&6
5304         if test "x$with_dlsym" = xyes ; then
5305
5306 cf_have_dlsym=no
5307 echo "$as_me:5307: checking for dlsym" >&5
5308 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5309 if test "${ac_cv_func_dlsym+set}" = set; then
5310   echo $ECHO_N "(cached) $ECHO_C" >&6
5311 else
5312   cat >conftest.$ac_ext <<_ACEOF
5313 #line 5313 "configure"
5314 #include "confdefs.h"
5315 /* System header to define __stub macros and hopefully few prototypes,
5316     which can conflict with char dlsym (); below.  */
5317 #include <assert.h>
5318 /* Override any gcc2 internal prototype to avoid an error.  */
5319 #ifdef __cplusplus
5320 extern "C"
5321 #endif
5322 /* We use char because int might match the return type of a gcc2
5323    builtin and then its argument prototype would still apply.  */
5324 char dlsym ();
5325 char (*f) ();
5326
5327 int
5328 main ()
5329 {
5330 /* The GNU C library defines this for functions which it implements
5331     to always fail with ENOSYS.  Some functions are actually named
5332     something starting with __ and the normal name is an alias.  */
5333 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5334 choke me
5335 #else
5336 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5337 #endif
5338
5339   ;
5340   return 0;
5341 }
5342 _ACEOF
5343 rm -f conftest.$ac_objext conftest$ac_exeext
5344 if { (eval echo "$as_me:5344: \"$ac_link\"") >&5
5345   (eval $ac_link) 2>&5
5346   ac_status=$?
5347   echo "$as_me:5347: \$? = $ac_status" >&5
5348   (exit $ac_status); } &&
5349          { ac_try='test -s conftest$ac_exeext'
5350   { (eval echo "$as_me:5350: \"$ac_try\"") >&5
5351   (eval $ac_try) 2>&5
5352   ac_status=$?
5353   echo "$as_me:5353: \$? = $ac_status" >&5
5354   (exit $ac_status); }; }; then
5355   ac_cv_func_dlsym=yes
5356 else
5357   echo "$as_me: failed program was:" >&5
5358 cat conftest.$ac_ext >&5
5359 ac_cv_func_dlsym=no
5360 fi
5361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5362 fi
5363 echo "$as_me:5363: result: $ac_cv_func_dlsym" >&5
5364 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5365 if test $ac_cv_func_dlsym = yes; then
5366   cf_have_dlsym=yes
5367 else
5368
5369 cf_have_libdl=no
5370 echo "$as_me:5370: checking for dlsym in -ldl" >&5
5371 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5372 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5373   echo $ECHO_N "(cached) $ECHO_C" >&6
5374 else
5375   ac_check_lib_save_LIBS=$LIBS
5376 LIBS="-ldl  $LIBS"
5377 cat >conftest.$ac_ext <<_ACEOF
5378 #line 5378 "configure"
5379 #include "confdefs.h"
5380
5381 /* Override any gcc2 internal prototype to avoid an error.  */
5382 #ifdef __cplusplus
5383 extern "C"
5384 #endif
5385 /* We use char because int might match the return type of a gcc2
5386    builtin and then its argument prototype would still apply.  */
5387 char dlsym ();
5388 int
5389 main ()
5390 {
5391 dlsym ();
5392   ;
5393   return 0;
5394 }
5395 _ACEOF
5396 rm -f conftest.$ac_objext conftest$ac_exeext
5397 if { (eval echo "$as_me:5397: \"$ac_link\"") >&5
5398   (eval $ac_link) 2>&5
5399   ac_status=$?
5400   echo "$as_me:5400: \$? = $ac_status" >&5
5401   (exit $ac_status); } &&
5402          { ac_try='test -s conftest$ac_exeext'
5403   { (eval echo "$as_me:5403: \"$ac_try\"") >&5
5404   (eval $ac_try) 2>&5
5405   ac_status=$?
5406   echo "$as_me:5406: \$? = $ac_status" >&5
5407   (exit $ac_status); }; }; then
5408   ac_cv_lib_dl_dlsym=yes
5409 else
5410   echo "$as_me: failed program was:" >&5
5411 cat conftest.$ac_ext >&5
5412 ac_cv_lib_dl_dlsym=no
5413 fi
5414 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5415 LIBS=$ac_check_lib_save_LIBS
5416 fi
5417 echo "$as_me:5417: result: $ac_cv_lib_dl_dlsym" >&5
5418 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5419 if test $ac_cv_lib_dl_dlsym = yes; then
5420
5421         cf_have_dlsym=yes
5422         cf_have_libdl=yes
5423 fi
5424
5425 fi
5426
5427 if test "$cf_have_dlsym" = yes ; then
5428         test "$cf_have_libdl" = yes &&
5429 cf_add_libs="-ldl"
5430 # Filter out duplicates - this happens with badly-designed ".pc" files...
5431 for cf_add_1lib in $LIBS
5432 do
5433         for cf_add_2lib in $cf_add_libs
5434         do
5435                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5436                 then
5437                         cf_add_1lib=
5438                         break
5439                 fi
5440         done
5441         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5442 done
5443 LIBS="$cf_add_libs"
5444
5445         echo "$as_me:5445: checking whether able to link to dl*() functions" >&5
5446 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5447         cat >conftest.$ac_ext <<_ACEOF
5448 #line 5448 "configure"
5449 #include "confdefs.h"
5450 #include <dlfcn.h>
5451 int
5452 main ()
5453 {
5454
5455                 void *obj;
5456                 if ((obj = dlopen("filename", 0)) != 0) {
5457                         if (dlsym(obj, "symbolname") == 0) {
5458                         dlclose(obj);
5459                         }
5460                 }
5461   ;
5462   return 0;
5463 }
5464 _ACEOF
5465 rm -f conftest.$ac_objext conftest$ac_exeext
5466 if { (eval echo "$as_me:5466: \"$ac_link\"") >&5
5467   (eval $ac_link) 2>&5
5468   ac_status=$?
5469   echo "$as_me:5469: \$? = $ac_status" >&5
5470   (exit $ac_status); } &&
5471          { ac_try='test -s conftest$ac_exeext'
5472   { (eval echo "$as_me:5472: \"$ac_try\"") >&5
5473   (eval $ac_try) 2>&5
5474   ac_status=$?
5475   echo "$as_me:5475: \$? = $ac_status" >&5
5476   (exit $ac_status); }; }; then
5477
5478 cat >>confdefs.h <<\EOF
5479 #define HAVE_LIBDL 1
5480 EOF
5481
5482 else
5483   echo "$as_me: failed program was:" >&5
5484 cat conftest.$ac_ext >&5
5485
5486                 { { echo "$as_me:5486: error: Cannot link test program for libdl" >&5
5487 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5488    { (exit 1); exit 1; }; }
5489 fi
5490 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5491         echo "$as_me:5491: result: ok" >&5
5492 echo "${ECHO_T}ok" >&6
5493 else
5494         { { echo "$as_me:5494: error: Cannot find dlsym function" >&5
5495 echo "$as_me: error: Cannot find dlsym function" >&2;}
5496    { (exit 1); exit 1; }; }
5497 fi
5498
5499                 if test "x$with_gpm" != xyes ; then
5500                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5501
5502 echo "${as_me:-configure}:5502: testing assuming soname for gpm is $with_gpm ..." 1>&5
5503
5504                         cf_cv_gpm_soname="$with_gpm"
5505                 else
5506
5507 echo "$as_me:5507: checking for soname of gpm library" >&5
5508 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5509 if test "${cf_cv_gpm_soname+set}" = set; then
5510   echo $ECHO_N "(cached) $ECHO_C" >&6
5511 else
5512
5513 cf_cv_gpm_soname=unknown
5514 if test "$cross_compiling" != yes ; then
5515 cat >conftest.$ac_ext <<CF_EOF
5516 #include <gpm.h>
5517 int main()
5518 {
5519 if (Gpm_Open(0,0)) Gpm_Close();
5520         ${cf_cv_main_return:-return}(0);
5521 }
5522 CF_EOF
5523 cf_save_LIBS="$LIBS"
5524
5525 cf_add_libs="-lgpm"
5526 # Filter out duplicates - this happens with badly-designed ".pc" files...
5527 for cf_add_1lib in $LIBS
5528 do
5529         for cf_add_2lib in $cf_add_libs
5530         do
5531                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5532                 then
5533                         cf_add_1lib=
5534                         break
5535                 fi
5536         done
5537         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5538 done
5539 LIBS="$cf_add_libs"
5540
5541         if { (eval echo "$as_me:5541: \"$ac_compile\"") >&5
5542   (eval $ac_compile) 2>&5
5543   ac_status=$?
5544   echo "$as_me:5544: \$? = $ac_status" >&5
5545   (exit $ac_status); } ; then
5546                 if { (eval echo "$as_me:5546: \"$ac_link\"") >&5
5547   (eval $ac_link) 2>&5
5548   ac_status=$?
5549   echo "$as_me:5549: \$? = $ac_status" >&5
5550   (exit $ac_status); } ; then
5551                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5552                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5553                 fi
5554         fi
5555 rm -rf conftest*
5556 LIBS="$cf_save_LIBS"
5557 fi
5558
5559 fi
5560 echo "$as_me:5560: result: $cf_cv_gpm_soname" >&5
5561 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5562
5563                 fi
5564                 test "$cf_cv_gpm_soname" != "unknown" &&
5565 cat >>confdefs.h <<EOF
5566 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5567 EOF
5568
5569                 SHLIB_LIST="-ldl $SHLIB_LIST"
5570         else
5571                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5572
5573 cf_add_libs="-lgpm"
5574 # Filter out duplicates - this happens with badly-designed ".pc" files...
5575 for cf_add_1lib in $TEST_LIBS
5576 do
5577         for cf_add_2lib in $cf_add_libs
5578         do
5579                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5580                 then
5581                         cf_add_1lib=
5582                         break
5583                 fi
5584         done
5585         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5586 done
5587 TEST_LIBS="$cf_add_libs"
5588
5589         fi
5590
5591 cat >>confdefs.h <<\EOF
5592 #define HAVE_LIBGPM 1
5593 EOF
5594
5595 echo "$as_me:5595: checking for Gpm_Wgetch in -lgpm" >&5
5596 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5597 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5598   echo $ECHO_N "(cached) $ECHO_C" >&6
5599 else
5600   ac_check_lib_save_LIBS=$LIBS
5601 LIBS="-lgpm  $LIBS"
5602 cat >conftest.$ac_ext <<_ACEOF
5603 #line 5603 "configure"
5604 #include "confdefs.h"
5605
5606 /* Override any gcc2 internal prototype to avoid an error.  */
5607 #ifdef __cplusplus
5608 extern "C"
5609 #endif
5610 /* We use char because int might match the return type of a gcc2
5611    builtin and then its argument prototype would still apply.  */
5612 char Gpm_Wgetch ();
5613 int
5614 main ()
5615 {
5616 Gpm_Wgetch ();
5617   ;
5618   return 0;
5619 }
5620 _ACEOF
5621 rm -f conftest.$ac_objext conftest$ac_exeext
5622 if { (eval echo "$as_me:5622: \"$ac_link\"") >&5
5623   (eval $ac_link) 2>&5
5624   ac_status=$?
5625   echo "$as_me:5625: \$? = $ac_status" >&5
5626   (exit $ac_status); } &&
5627          { ac_try='test -s conftest$ac_exeext'
5628   { (eval echo "$as_me:5628: \"$ac_try\"") >&5
5629   (eval $ac_try) 2>&5
5630   ac_status=$?
5631   echo "$as_me:5631: \$? = $ac_status" >&5
5632   (exit $ac_status); }; }; then
5633   ac_cv_lib_gpm_Gpm_Wgetch=yes
5634 else
5635   echo "$as_me: failed program was:" >&5
5636 cat conftest.$ac_ext >&5
5637 ac_cv_lib_gpm_Gpm_Wgetch=no
5638 fi
5639 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5640 LIBS=$ac_check_lib_save_LIBS
5641 fi
5642 echo "$as_me:5642: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5643 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5644 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5645
5646 echo "$as_me:5646: checking if GPM is weakly bound to curses library" >&5
5647 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5648 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5649   echo $ECHO_N "(cached) $ECHO_C" >&6
5650 else
5651
5652 cf_cv_check_gpm_wgetch=unknown
5653 if test "$cross_compiling" != yes ; then
5654
5655 cat >conftest.$ac_ext <<CF_EOF
5656 #include <gpm.h>
5657 int main()
5658 {
5659         Gpm_Wgetch();
5660         ${cf_cv_main_return:-return}(0);
5661 }
5662 CF_EOF
5663
5664         cf_save_LIBS="$LIBS"
5665         # This only works if we can look at the symbol table.  If a shared
5666         # library is stripped for install, we cannot use that.  So we're forced
5667         # to rely on the static library, noting that some packagers may not
5668         # include it.
5669         LIBS="-static -lgpm -dynamic $LIBS"
5670         if { (eval echo "$as_me:5670: \"$ac_compile\"") >&5
5671   (eval $ac_compile) 2>&5
5672   ac_status=$?
5673   echo "$as_me:5673: \$? = $ac_status" >&5
5674   (exit $ac_status); } ; then
5675                 if { (eval echo "$as_me:5675: \"$ac_link\"") >&5
5676   (eval $ac_link) 2>&5
5677   ac_status=$?
5678   echo "$as_me:5678: \$? = $ac_status" >&5
5679   (exit $ac_status); } ; then
5680                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5681                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5682                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5683                 fi
5684         fi
5685         rm -rf conftest*
5686         LIBS="$cf_save_LIBS"
5687 fi
5688
5689 fi
5690 echo "$as_me:5690: result: $cf_cv_check_gpm_wgetch" >&5
5691 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5692
5693 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5694         { echo "$as_me:5694: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5695 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5696 fi
5697
5698 fi
5699
5700 fi
5701
5702 # not everyone has "test -c"
5703 if test -c /dev/sysmouse 2>/dev/null ; then
5704 echo "$as_me:5704: checking if you want to use sysmouse" >&5
5705 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5706
5707 # Check whether --with-sysmouse or --without-sysmouse was given.
5708 if test "${with_sysmouse+set}" = set; then
5709   withval="$with_sysmouse"
5710   cf_with_sysmouse=$withval
5711 else
5712   cf_with_sysmouse=maybe
5713 fi;
5714         if test "$cf_with_sysmouse" != no ; then
5715         cat >conftest.$ac_ext <<_ACEOF
5716 #line 5716 "configure"
5717 #include "confdefs.h"
5718
5719 #include <osreldate.h>
5720 #if (__FreeBSD_version >= 400017)
5721 #include <sys/consio.h>
5722 #include <sys/fbio.h>
5723 #else
5724 #include <machine/console.h>
5725 #endif
5726
5727 int
5728 main ()
5729 {
5730
5731         struct mouse_info the_mouse;
5732         ioctl(0, CONS_MOUSECTL, &the_mouse);
5733
5734   ;
5735   return 0;
5736 }
5737 _ACEOF
5738 rm -f conftest.$ac_objext
5739 if { (eval echo "$as_me:5739: \"$ac_compile\"") >&5
5740   (eval $ac_compile) 2>&5
5741   ac_status=$?
5742   echo "$as_me:5742: \$? = $ac_status" >&5
5743   (exit $ac_status); } &&
5744          { ac_try='test -s conftest.$ac_objext'
5745   { (eval echo "$as_me:5745: \"$ac_try\"") >&5
5746   (eval $ac_try) 2>&5
5747   ac_status=$?
5748   echo "$as_me:5748: \$? = $ac_status" >&5
5749   (exit $ac_status); }; }; then
5750   cf_with_sysmouse=yes
5751 else
5752   echo "$as_me: failed program was:" >&5
5753 cat conftest.$ac_ext >&5
5754 cf_with_sysmouse=no
5755 fi
5756 rm -f conftest.$ac_objext conftest.$ac_ext
5757         fi
5758 echo "$as_me:5758: result: $cf_with_sysmouse" >&5
5759 echo "${ECHO_T}$cf_with_sysmouse" >&6
5760 test "$cf_with_sysmouse" = yes &&
5761 cat >>confdefs.h <<\EOF
5762 #define USE_SYSMOUSE 1
5763 EOF
5764
5765 fi
5766
5767 if test X"$CC_G_OPT" = X"" ; then
5768         CC_G_OPT='-g'
5769         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5770 fi
5771
5772 if test X"$CXX_G_OPT" = X"" ; then
5773         CXX_G_OPT='-g'
5774         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5775 fi
5776
5777 echo "$as_me:5777: checking for default loader flags" >&5
5778 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5779 case $DFT_LWR_MODEL in
5780 (libtool) LD_MODEL=''   ;;
5781 (normal)  LD_MODEL=''   ;;
5782 (debug)   LD_MODEL=$CC_G_OPT ;;
5783 (profile) LD_MODEL='-pg';;
5784 (shared)  LD_MODEL=''   ;;
5785 esac
5786 echo "$as_me:5786: result: $LD_MODEL" >&5
5787 echo "${ECHO_T}$LD_MODEL" >&6
5788
5789 case $DFT_LWR_MODEL in
5790 (shared)
5791
5792 echo "$as_me:5792: checking if rpath option should be used" >&5
5793 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5794
5795 # Check whether --enable-rpath or --disable-rpath was given.
5796 if test "${enable_rpath+set}" = set; then
5797   enableval="$enable_rpath"
5798   cf_cv_enable_rpath=$enableval
5799 else
5800   cf_cv_enable_rpath=no
5801 fi;
5802 echo "$as_me:5802: result: $cf_cv_enable_rpath" >&5
5803 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5804
5805 echo "$as_me:5805: checking if shared libraries should be relinked during install" >&5
5806 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5807
5808 # Check whether --enable-relink or --disable-relink was given.
5809 if test "${enable_relink+set}" = set; then
5810   enableval="$enable_relink"
5811   cf_cv_do_relink=$enableval
5812 else
5813   cf_cv_do_relink=yes
5814 fi;
5815 echo "$as_me:5815: result: $cf_cv_do_relink" >&5
5816 echo "${ECHO_T}$cf_cv_do_relink" >&6
5817         ;;
5818 esac
5819
5820 # we will build libraries one-level down.
5821 rel_builddir=..
5822
5823 LD_RPATH_OPT=
5824 echo "$as_me:5824: checking for an rpath option" >&5
5825 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5826 case $cf_cv_system_name in
5827 (irix*)
5828         if test "$GCC" = yes; then
5829                 LD_RPATH_OPT="-Wl,-rpath,"
5830         else
5831                 LD_RPATH_OPT="-rpath "
5832         fi
5833         ;;
5834 (linux*|gnu*|k*bsd*-gnu)
5835         LD_RPATH_OPT="-Wl,-rpath,"
5836         ;;
5837 (openbsd[2-9].*|mirbsd*)
5838         LD_RPATH_OPT="-Wl,-rpath,"
5839         ;;
5840 (dragonfly*|freebsd*)
5841         LD_RPATH_OPT="-rpath "
5842         ;;
5843 (netbsd*)
5844         LD_RPATH_OPT="-Wl,-rpath,"
5845         ;;
5846 (osf*|mls+*)
5847         LD_RPATH_OPT="-rpath "
5848         ;;
5849 (solaris2*)
5850         LD_RPATH_OPT="-R"
5851         ;;
5852 (*)
5853         ;;
5854 esac
5855 echo "$as_me:5855: result: $LD_RPATH_OPT" >&5
5856 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5857
5858 case "x$LD_RPATH_OPT" in
5859 (x-R*)
5860         echo "$as_me:5860: checking if we need a space after rpath option" >&5
5861 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5862         cf_save_LIBS="$LIBS"
5863
5864 cf_add_libs="${LD_RPATH_OPT}$libdir"
5865 # Filter out duplicates - this happens with badly-designed ".pc" files...
5866 for cf_add_1lib in $LIBS
5867 do
5868         for cf_add_2lib in $cf_add_libs
5869         do
5870                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5871                 then
5872                         cf_add_1lib=
5873                         break
5874                 fi
5875         done
5876         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5877 done
5878 LIBS="$cf_add_libs"
5879
5880         cat >conftest.$ac_ext <<_ACEOF
5881 #line 5881 "configure"
5882 #include "confdefs.h"
5883
5884 int
5885 main ()
5886 {
5887
5888   ;
5889   return 0;
5890 }
5891 _ACEOF
5892 rm -f conftest.$ac_objext conftest$ac_exeext
5893 if { (eval echo "$as_me:5893: \"$ac_link\"") >&5
5894   (eval $ac_link) 2>&5
5895   ac_status=$?
5896   echo "$as_me:5896: \$? = $ac_status" >&5
5897   (exit $ac_status); } &&
5898          { ac_try='test -s conftest$ac_exeext'
5899   { (eval echo "$as_me:5899: \"$ac_try\"") >&5
5900   (eval $ac_try) 2>&5
5901   ac_status=$?
5902   echo "$as_me:5902: \$? = $ac_status" >&5
5903   (exit $ac_status); }; }; then
5904   cf_rpath_space=no
5905 else
5906   echo "$as_me: failed program was:" >&5
5907 cat conftest.$ac_ext >&5
5908 cf_rpath_space=yes
5909 fi
5910 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5911         LIBS="$cf_save_LIBS"
5912         echo "$as_me:5912: result: $cf_rpath_space" >&5
5913 echo "${ECHO_T}$cf_rpath_space" >&6
5914         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5915         ;;
5916 esac
5917
5918         RM_SHARED_OPTS=
5919         LOCAL_LDFLAGS=
5920         LOCAL_LDFLAGS2=
5921         LD_SHARED_OPTS=
5922         INSTALL_LIB="-m 644"
5923         : ${rel_builddir:=.}
5924
5925         shlibdir=$libdir
5926
5927         MAKE_DLLS="#"
5928
5929         cf_cv_do_symlinks=no
5930         cf_ld_rpath_opt=
5931         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5932
5933         echo "$as_me:5933: checking if release/abi version should be used for shared libs" >&5
5934 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5935
5936 # Check whether --with-shlib-version or --without-shlib-version was given.
5937 if test "${with_shlib_version+set}" = set; then
5938   withval="$with_shlib_version"
5939   test -z "$withval" && withval=auto
5940         case $withval in
5941         (yes)
5942                 cf_cv_shlib_version=auto
5943                 ;;
5944         (rel|abi|auto|no)
5945                 cf_cv_shlib_version=$withval
5946                 ;;
5947         (*)
5948                 { { echo "$as_me:5948: error: option value must be one of: rel, abi, auto or no" >&5
5949 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5950    { (exit 1); exit 1; }; }
5951                 ;;
5952         esac
5953
5954 else
5955   cf_cv_shlib_version=auto
5956 fi;
5957         echo "$as_me:5957: result: $cf_cv_shlib_version" >&5
5958 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5959
5960         cf_cv_rm_so_locs=no
5961         cf_try_cflags=
5962
5963         # Some less-capable ports of gcc support only -fpic
5964         CC_SHARED_OPTS=
5965         if test "$GCC" = yes
5966         then
5967                 echo "$as_me:5967: checking which $CC option to use" >&5
5968 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5969                 cf_save_CFLAGS="$CFLAGS"
5970                 for CC_SHARED_OPTS in -fPIC -fpic ''
5971                 do
5972                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5973                         cat >conftest.$ac_ext <<_ACEOF
5974 #line 5974 "configure"
5975 #include "confdefs.h"
5976 #include <stdio.h>
5977 int
5978 main ()
5979 {
5980 int x = 1
5981   ;
5982   return 0;
5983 }
5984 _ACEOF
5985 rm -f conftest.$ac_objext
5986 if { (eval echo "$as_me:5986: \"$ac_compile\"") >&5
5987   (eval $ac_compile) 2>&5
5988   ac_status=$?
5989   echo "$as_me:5989: \$? = $ac_status" >&5
5990   (exit $ac_status); } &&
5991          { ac_try='test -s conftest.$ac_objext'
5992   { (eval echo "$as_me:5992: \"$ac_try\"") >&5
5993   (eval $ac_try) 2>&5
5994   ac_status=$?
5995   echo "$as_me:5995: \$? = $ac_status" >&5
5996   (exit $ac_status); }; }; then
5997   break
5998 else
5999   echo "$as_me: failed program was:" >&5
6000 cat conftest.$ac_ext >&5
6001 fi
6002 rm -f conftest.$ac_objext conftest.$ac_ext
6003                 done
6004                 echo "$as_me:6004: result: $CC_SHARED_OPTS" >&5
6005 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6006                 CFLAGS="$cf_save_CFLAGS"
6007         fi
6008
6009         cf_cv_shlib_version_infix=no
6010
6011         case $cf_cv_system_name in
6012         (aix4.3-9*|aix[5-7]*)
6013                 if test "$GCC" = yes; then
6014                         CC_SHARED_OPTS='-Wl,-brtl'
6015                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6016                 else
6017                         CC_SHARED_OPTS='-brtl'
6018                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6019                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6020                 fi
6021                 ;;
6022         (beos*)
6023                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6024                 ;;
6025         (cygwin*)
6026                 CC_SHARED_OPTS=
6027                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6028                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6029                 cf_cv_shlib_version=cygdll
6030                 cf_cv_shlib_version_infix=cygdll
6031                 shlibdir=$bindir
6032                 MAKE_DLLS=
6033                 cat >mk_shared_lib.sh <<-CF_EOF
6034                 #!/bin/sh
6035                 SHARED_LIB=\$1
6036                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6037                 shift
6038                 cat <<-EOF
6039                 Linking shared library
6040                 ** SHARED_LIB \$SHARED_LIB
6041                 ** IMPORT_LIB \$IMPORT_LIB
6042 EOF
6043                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6044 CF_EOF
6045                 chmod +x mk_shared_lib.sh
6046                 ;;
6047         (msys*)
6048                 CC_SHARED_OPTS=
6049                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6050                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6051                 cf_cv_shlib_version=msysdll
6052                 cf_cv_shlib_version_infix=msysdll
6053                 shlibdir=$bindir
6054                 MAKE_DLLS=
6055                 cat >mk_shared_lib.sh <<-CF_EOF
6056                 #!/bin/sh
6057                 SHARED_LIB=\$1
6058                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6059                 shift
6060                 cat <<-EOF
6061                 Linking shared library
6062                 ** SHARED_LIB \$SHARED_LIB
6063                 ** IMPORT_LIB \$IMPORT_LIB
6064 EOF
6065                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6066 CF_EOF
6067                 chmod +x mk_shared_lib.sh
6068                 ;;
6069         (darwin*)
6070                 cf_try_cflags="no-cpp-precomp"
6071                 CC_SHARED_OPTS="-dynamic"
6072                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6073                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6074                 cf_cv_shlib_version_infix=yes
6075                 echo "$as_me:6075: checking if ld -search_paths_first works" >&5
6076 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6077 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6078   echo $ECHO_N "(cached) $ECHO_C" >&6
6079 else
6080
6081                         cf_save_LDFLAGS=$LDFLAGS
6082                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6083                         cat >conftest.$ac_ext <<_ACEOF
6084 #line 6084 "configure"
6085 #include "confdefs.h"
6086
6087 int
6088 main ()
6089 {
6090 int i;
6091   ;
6092   return 0;
6093 }
6094 _ACEOF
6095 rm -f conftest.$ac_objext conftest$ac_exeext
6096 if { (eval echo "$as_me:6096: \"$ac_link\"") >&5
6097   (eval $ac_link) 2>&5
6098   ac_status=$?
6099   echo "$as_me:6099: \$? = $ac_status" >&5
6100   (exit $ac_status); } &&
6101          { ac_try='test -s conftest$ac_exeext'
6102   { (eval echo "$as_me:6102: \"$ac_try\"") >&5
6103   (eval $ac_try) 2>&5
6104   ac_status=$?
6105   echo "$as_me:6105: \$? = $ac_status" >&5
6106   (exit $ac_status); }; }; then
6107   cf_cv_ldflags_search_paths_first=yes
6108 else
6109   echo "$as_me: failed program was:" >&5
6110 cat conftest.$ac_ext >&5
6111 cf_cv_ldflags_search_paths_first=no
6112 fi
6113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6114                                 LDFLAGS=$cf_save_LDFLAGS
6115 fi
6116 echo "$as_me:6116: result: $cf_cv_ldflags_search_paths_first" >&5
6117 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6118                 if test $cf_cv_ldflags_search_paths_first = yes; then
6119                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6120                 fi
6121                 ;;
6122         (hpux[7-8]*)
6123                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6124                 if test "$GCC" != yes; then
6125                         CC_SHARED_OPTS='+Z'
6126                 fi
6127                 MK_SHARED_LIB='${LD} -b -o $@'
6128                 INSTALL_LIB="-m 555"
6129                 ;;
6130         (hpux*)
6131                 # (tested with gcc 2.7.2 -- I don't have c89)
6132                 if test "$GCC" = yes; then
6133                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6134                 else
6135                         CC_SHARED_OPTS='+Z'
6136                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6137                 fi
6138                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
6139                 # HP-UX shared libraries must be executable, and should be
6140                 # readonly to exploit a quirk in the memory manager.
6141                 INSTALL_LIB="-m 555"
6142                 ;;
6143         (interix*)
6144                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6145                 if test "$cf_cv_shlib_version" = rel; then
6146                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
6147                 else
6148                         cf_shared_soname='`basename `'
6149                 fi
6150                 CC_SHARED_OPTS=
6151                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
6152                 ;;
6153         (irix*)
6154                 if test "$cf_cv_enable_rpath" = yes ; then
6155                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6156                 fi
6157                 # tested with IRIX 5.2 and 'cc'.
6158                 if test "$GCC" != yes; then
6159                         CC_SHARED_OPTS='-KPIC'
6160                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
6161                 else
6162                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
6163                 fi
6164                 cf_cv_rm_so_locs=yes
6165                 ;;
6166         (linux*|gnu*|k*bsd*-gnu)
6167                 if test "$DFT_LWR_MODEL" = "shared" ; then
6168                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6169                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6170                 fi
6171                 if test "$cf_cv_enable_rpath" = yes ; then
6172                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6173                 fi
6174
6175         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6176         if test "$cf_cv_shlib_version" = rel; then
6177                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6178         else
6179                 cf_cv_shared_soname='`basename $@`'
6180         fi
6181
6182                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6183                 ;;
6184         (mingw*)
6185                 cf_cv_shlib_version=mingw
6186                 cf_cv_shlib_version_infix=mingw
6187                 shlibdir=$bindir
6188                 MAKE_DLLS=
6189                 if test "$DFT_LWR_MODEL" = "shared" ; then
6190                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6191                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6192                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6193                 fi
6194                 CC_SHARED_OPTS=
6195                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6196                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6197                 cat >mk_shared_lib.sh <<-CF_EOF
6198                 #!/bin/sh
6199                 SHARED_LIB=\$1
6200                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6201                 shift
6202                 cat <<-EOF
6203                 Linking shared library
6204                 ** SHARED_LIB \$SHARED_LIB
6205                 ** IMPORT_LIB \$IMPORT_LIB
6206 EOF
6207                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6208 CF_EOF
6209                 chmod +x mk_shared_lib.sh
6210                 ;;
6211         (openbsd[2-9].*|mirbsd*)
6212                 if test "$DFT_LWR_MODEL" = "shared" ; then
6213                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6214                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6215                 fi
6216                 if test "$cf_cv_enable_rpath" = yes ; then
6217                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6218                 fi
6219                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6220
6221         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6222         if test "$cf_cv_shlib_version" = rel; then
6223                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6224         else
6225                 cf_cv_shared_soname='`basename $@`'
6226         fi
6227
6228                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6229                 ;;
6230         (nto-qnx*|openbsd*|freebsd[12].*)
6231                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6232                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
6233                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6234                 ;;
6235         (dragonfly*|freebsd*)
6236                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6237                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6238                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6239                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6240                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6241                 fi
6242
6243         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6244         if test "$cf_cv_shlib_version" = rel; then
6245                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6246         else
6247                 cf_cv_shared_soname='`basename $@`'
6248         fi
6249
6250                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6251                 ;;
6252         (netbsd*)
6253                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6254                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6255                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6256                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6257                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6258                         if test "$cf_cv_shlib_version" = auto; then
6259                         if test -f /usr/libexec/ld.elf_so; then
6260                                 cf_cv_shlib_version=abi
6261                         else
6262                                 cf_cv_shlib_version=rel
6263                         fi
6264                         fi
6265
6266         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6267         if test "$cf_cv_shlib_version" = rel; then
6268                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6269         else
6270                 cf_cv_shared_soname='`basename $@`'
6271         fi
6272
6273                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6274                 else
6275                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
6276                 fi
6277                 ;;
6278         (osf*|mls+*)
6279                 # tested with OSF/1 V3.2 and 'cc'
6280                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6281                 # link with shared libs).
6282                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6283                 case $host_os in
6284                 (osf4*)
6285                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6286                         ;;
6287                 esac
6288                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6289                 if test "$DFT_LWR_MODEL" = "shared" ; then
6290                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6291                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6292                 fi
6293                 cf_cv_rm_so_locs=yes
6294                 ;;
6295         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6296                 # tested with osr5.0.5
6297                 if test "$GCC" != yes; then
6298                         CC_SHARED_OPTS='-belf -KPIC'
6299                 fi
6300                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6301                 if test "$cf_cv_enable_rpath" = yes ; then
6302                         # only way is to set LD_RUN_PATH but no switch for it
6303                         RUN_PATH=$libdir
6304                 fi
6305                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6306                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6307                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6308                 ;;
6309         (sunos4*)
6310                 # tested with SunOS 4.1.1 and gcc 2.7.0
6311                 if test "$GCC" != yes; then
6312                         CC_SHARED_OPTS='-KPIC'
6313                 fi
6314                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6315                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6316                 ;;
6317         (solaris2*)
6318                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6319                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6320                 if test "$DFT_LWR_MODEL" = "shared" ; then
6321                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6322                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6323                 fi
6324                 if test "$cf_cv_enable_rpath" = yes ; then
6325                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6326                 fi
6327
6328         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6329         if test "$cf_cv_shlib_version" = rel; then
6330                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6331         else
6332                 cf_cv_shared_soname='`basename $@`'
6333         fi
6334
6335                 if test "$GCC" != yes; then
6336                         cf_save_CFLAGS="$CFLAGS"
6337                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6338                         do
6339                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6340                                 cat >conftest.$ac_ext <<_ACEOF
6341 #line 6341 "configure"
6342 #include "confdefs.h"
6343 #include <stdio.h>
6344 int
6345 main ()
6346 {
6347 printf("Hello\n");
6348   ;
6349   return 0;
6350 }
6351 _ACEOF
6352 rm -f conftest.$ac_objext
6353 if { (eval echo "$as_me:6353: \"$ac_compile\"") >&5
6354   (eval $ac_compile) 2>&5
6355   ac_status=$?
6356   echo "$as_me:6356: \$? = $ac_status" >&5
6357   (exit $ac_status); } &&
6358          { ac_try='test -s conftest.$ac_objext'
6359   { (eval echo "$as_me:6359: \"$ac_try\"") >&5
6360   (eval $ac_try) 2>&5
6361   ac_status=$?
6362   echo "$as_me:6362: \$? = $ac_status" >&5
6363   (exit $ac_status); }; }; then
6364   break
6365 else
6366   echo "$as_me: failed program was:" >&5
6367 cat conftest.$ac_ext >&5
6368 fi
6369 rm -f conftest.$ac_objext conftest.$ac_ext
6370                         done
6371                         CFLAGS="$cf_save_CFLAGS"
6372                         CC_SHARED_OPTS=$cf_shared_opts
6373                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6374                 else
6375                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6376                 fi
6377                 ;;
6378         (sysv5uw7*|unix_sv*)
6379                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6380                 if test "$GCC" != yes; then
6381                         CC_SHARED_OPTS='-KPIC'
6382                 fi
6383                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6384                 ;;
6385         (*)
6386                 CC_SHARED_OPTS='unknown'
6387                 MK_SHARED_LIB='echo unknown'
6388                 ;;
6389         esac
6390
6391         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6392         case "$cf_cv_shlib_version" in
6393         (rel|abi)
6394                 case "$MK_SHARED_LIB" in
6395                 (*'-o $@')
6396                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6397                         ;;
6398                 (*)
6399                         { echo "$as_me:6399: WARNING: ignored --with-shlib-version" >&5
6400 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6401                         ;;
6402                 esac
6403                 ;;
6404         esac
6405
6406         if test -n "$cf_try_cflags"
6407         then
6408 cat > conftest.$ac_ext <<EOF
6409 #line 6409 "${as_me:-configure}"
6410 #include <stdio.h>
6411 int main(int argc, char *argv[])
6412 {
6413         printf("hello\n");
6414         return (argv[argc-1] == 0) ;
6415 }
6416 EOF
6417                 cf_save_CFLAGS="$CFLAGS"
6418                 for cf_opt in $cf_try_cflags
6419                 do
6420                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6421                         echo "$as_me:6421: checking if CFLAGS option -$cf_opt works" >&5
6422 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6423                         if { (eval echo "$as_me:6423: \"$ac_compile\"") >&5
6424   (eval $ac_compile) 2>&5
6425   ac_status=$?
6426   echo "$as_me:6426: \$? = $ac_status" >&5
6427   (exit $ac_status); }; then
6428                                 echo "$as_me:6428: result: yes" >&5
6429 echo "${ECHO_T}yes" >&6
6430                                 cf_save_CFLAGS="$CFLAGS"
6431                         else
6432                                 echo "$as_me:6432: result: no" >&5
6433 echo "${ECHO_T}no" >&6
6434                         fi
6435                 done
6436                 CFLAGS="$cf_save_CFLAGS"
6437         fi
6438
6439         # RPATH_LIST is a colon-separated list of directories
6440         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6441         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6442
6443         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6444
6445         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6446
6447 echo "${as_me:-configure}:6447: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6448
6449         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6450
6451 echo "${as_me:-configure}:6451: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6452
6453 for model in $cf_list_models; do
6454         case $model in
6455         (libtool)
6456
6457 echo "$as_me:6457: checking for additional libtool options" >&5
6458 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6459
6460 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6461 if test "${with_libtool_opts+set}" = set; then
6462   withval="$with_libtool_opts"
6463   with_libtool_opts=$withval
6464 else
6465   with_libtool_opts=no
6466 fi;
6467 echo "$as_me:6467: result: $with_libtool_opts" >&5
6468 echo "${ECHO_T}$with_libtool_opts" >&6
6469
6470 case .$with_libtool_opts in
6471 (.yes|.no|.)
6472         ;;
6473 (*)
6474         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6475         ;;
6476 esac
6477
6478 echo "$as_me:6478: checking if exported-symbols file should be used" >&5
6479 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6480
6481 # Check whether --with-export-syms or --without-export-syms was given.
6482 if test "${with_export_syms+set}" = set; then
6483   withval="$with_export_syms"
6484   with_export_syms=$withval
6485 else
6486   with_export_syms=no
6487 fi;
6488 if test "x$with_export_syms" = xyes
6489 then
6490         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6491
6492 fi
6493 echo "$as_me:6493: result: $with_export_syms" >&5
6494 echo "${ECHO_T}$with_export_syms" >&6
6495 if test "x$with_export_syms" != xno
6496 then
6497         EXPORT_SYMS="-export-symbols $with_export_syms"
6498
6499 fi
6500
6501                 ;;
6502         (shared)
6503                 if test "$CC_SHARED_OPTS" = "unknown"; then
6504                         { { echo "$as_me:6504: error: Shared libraries are not supported in this version" >&5
6505 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6506    { (exit 1); exit 1; }; }
6507                 fi
6508
6509 echo "$as_me:6509: checking if versioned-symbols file should be used" >&5
6510 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6511
6512 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6513 if test "${with_versioned_syms+set}" = set; then
6514   withval="$with_versioned_syms"
6515   with_versioned_syms=$withval
6516 else
6517   with_versioned_syms=no
6518 fi;
6519 if test "x$with_versioned_syms" = xyes
6520 then
6521         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6522
6523 fi
6524 echo "$as_me:6524: result: $with_versioned_syms" >&5
6525 echo "${ECHO_T}$with_versioned_syms" >&6
6526
6527 RESULTING_SYMS=
6528 VERSIONED_SYMS=
6529 WILDCARD_SYMS=
6530
6531 if test "x$with_versioned_syms" != xno
6532 then
6533         RESULTING_SYMS=$with_versioned_syms
6534         case "x$MK_SHARED_LIB" in
6535         (*-Wl,*)
6536                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6537                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6538                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6539
6540 echo "${as_me:-configure}:6540: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6541
6542                 ;;
6543         (*-dy\ *)
6544                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6545                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6546                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6547
6548 echo "${as_me:-configure}:6548: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6549
6550                 ;;
6551         (*)
6552                 { echo "$as_me:6552: WARNING: this system does not support versioned-symbols" >&5
6553 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6554                 ;;
6555         esac
6556
6557         # Linux ld can selectively override scope, e.g., of symbols beginning with
6558         # "_" by first declaring some as global, and then using a wildcard to
6559         # declare the others as local.  Some other loaders cannot do this.  Check
6560         # by constructing a (very) simple shared library and inspecting its
6561         # symbols.
6562         if test "x$VERSIONED_SYMS" != "x"
6563         then
6564                 echo "$as_me:6564: checking if wildcards can be used to selectively omit symbols" >&5
6565 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6566                 WILDCARD_SYMS=no
6567
6568                 # make sources
6569                 rm -f conftest.*
6570
6571                 cat >conftest.ver <<EOF
6572 module_1.0 {
6573 global:
6574         globalf1;
6575 local:
6576         localf1;
6577 };
6578 module_2.0 {
6579 global:
6580         globalf2;
6581 local:
6582         localf2;
6583         _*;
6584 } module_1.0;
6585 submodule_1.0 {
6586 global:
6587         subglobalf1;
6588         _ismissing;
6589 local:
6590         sublocalf1;
6591 };
6592 submodule_2.0 {
6593 global:
6594         subglobalf2;
6595 local:
6596         sublocalf2;
6597         _*;
6598 } submodule_1.0;
6599 EOF
6600                 cat >conftest.$ac_ext <<EOF
6601 #line 6601 "configure"
6602 int     _ismissing(void) { return 1; }
6603 int     _localf1(void) { return 1; }
6604 int     _localf2(void) { return 2; }
6605 int     globalf1(void) { return 1; }
6606 int     globalf2(void) { return 2; }
6607 int     _sublocalf1(void) { return 1; }
6608 int     _sublocalf2(void) { return 2; }
6609 int     subglobalf1(void) { return 1; }
6610 int     subglobalf2(void) { return 2; }
6611 EOF
6612                 cat >conftest.mk <<EOF
6613 CC=${CC}
6614 CFLAGS=${CFLAGS}
6615 CPPFLAGS=${CPPFLAGS}
6616 LDFLAGS=${LDFLAGS}
6617 LIBS=${LIBS}
6618 VERSIONED_SYMS=${VERSIONED_SYMS}
6619 RESULTING_SYMS=conftest.ver
6620 MK_SHARED_LIB=${MK_SHARED_LIB}
6621 conftest.so: conftest.$ac_cv_objext
6622                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6623 EOF
6624
6625                 # compile source, make library
6626                 if make -f conftest.mk 2>&5 >/dev/null
6627                 then
6628                         # test for missing symbol
6629                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ]T[     ]'`
6630                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6631                 fi
6632                 echo "$as_me:6632: result: $WILDCARD_SYMS" >&5
6633 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6634                 rm -f conftest.*
6635         fi
6636 fi
6637
6638                 ;;
6639         esac
6640 done
6641
6642 # pretend that ncurses==ncursesw==ncursest
6643 echo "$as_me:6643: checking if you want to disable library suffixes" >&5
6644 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6645
6646 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6647 if test "${enable_lib_suffixes+set}" = set; then
6648   enableval="$enable_lib_suffixes"
6649   test "$enableval" != no && enableval=yes
6650         if test "$enableval" != "yes" ; then
6651     disable_lib_suffixes=yes
6652         else
6653                 disable_lib_suffixes=no
6654         fi
6655 else
6656   enableval=yes
6657         disable_lib_suffixes=no
6658
6659 fi;
6660 echo "$as_me:6660: result: $disable_lib_suffixes" >&5
6661 echo "${ECHO_T}$disable_lib_suffixes" >&6
6662
6663 ### If we're building with rpath, try to link non-standard libs that way too.
6664 if test "$DFT_LWR_MODEL" = "shared"; then
6665
6666 echo "$as_me:6666: checking if rpath-hack should be disabled" >&5
6667 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6668
6669 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6670 if test "${enable_rpath_hack+set}" = set; then
6671   enableval="$enable_rpath_hack"
6672   test "$enableval" != no && enableval=yes
6673         if test "$enableval" != "yes" ; then
6674     cf_disable_rpath_hack=yes
6675         else
6676                 cf_disable_rpath_hack=no
6677         fi
6678 else
6679   enableval=yes
6680         cf_disable_rpath_hack=no
6681
6682 fi;
6683 echo "$as_me:6683: result: $cf_disable_rpath_hack" >&5
6684 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6685 if test "$cf_disable_rpath_hack" = no ; then
6686
6687 echo "$as_me:6687: checking for updated LDFLAGS" >&5
6688 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6689 if test -n "$LD_RPATH_OPT" ; then
6690         echo "$as_me:6690: result: maybe" >&5
6691 echo "${ECHO_T}maybe" >&6
6692
6693         for ac_prog in ldd
6694 do
6695   # Extract the first word of "$ac_prog", so it can be a program name with args.
6696 set dummy $ac_prog; ac_word=$2
6697 echo "$as_me:6697: checking for $ac_word" >&5
6698 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6699 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6700   echo $ECHO_N "(cached) $ECHO_C" >&6
6701 else
6702   if test -n "$cf_ldd_prog"; then
6703   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6704 else
6705   ac_save_IFS=$IFS; IFS=$ac_path_separator
6706 ac_dummy="$PATH"
6707 for ac_dir in $ac_dummy; do
6708   IFS=$ac_save_IFS
6709   test -z "$ac_dir" && ac_dir=.
6710   $as_executable_p "$ac_dir/$ac_word" || continue
6711 ac_cv_prog_cf_ldd_prog="$ac_prog"
6712 echo "$as_me:6712: found $ac_dir/$ac_word" >&5
6713 break
6714 done
6715
6716 fi
6717 fi
6718 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6719 if test -n "$cf_ldd_prog"; then
6720   echo "$as_me:6720: result: $cf_ldd_prog" >&5
6721 echo "${ECHO_T}$cf_ldd_prog" >&6
6722 else
6723   echo "$as_me:6723: result: no" >&5
6724 echo "${ECHO_T}no" >&6
6725 fi
6726
6727   test -n "$cf_ldd_prog" && break
6728 done
6729 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6730
6731         cf_rpath_list="/usr/lib /lib"
6732         if test "$cf_ldd_prog" != no
6733         then
6734                 cf_rpath_oops=
6735
6736 cat >conftest.$ac_ext <<_ACEOF
6737 #line 6737 "configure"
6738 #include "confdefs.h"
6739 #include <stdio.h>
6740 int
6741 main ()
6742 {
6743 printf("Hello");
6744   ;
6745   return 0;
6746 }
6747 _ACEOF
6748 rm -f conftest.$ac_objext conftest$ac_exeext
6749 if { (eval echo "$as_me:6749: \"$ac_link\"") >&5
6750   (eval $ac_link) 2>&5
6751   ac_status=$?
6752   echo "$as_me:6752: \$? = $ac_status" >&5
6753   (exit $ac_status); } &&
6754          { ac_try='test -s conftest$ac_exeext'
6755   { (eval echo "$as_me:6755: \"$ac_try\"") >&5
6756   (eval $ac_try) 2>&5
6757   ac_status=$?
6758   echo "$as_me:6758: \$? = $ac_status" >&5
6759   (exit $ac_status); }; }; then
6760   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6761                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6762 else
6763   echo "$as_me: failed program was:" >&5
6764 cat conftest.$ac_ext >&5
6765 fi
6766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6767
6768                 # If we passed the link-test, but get a "not found" on a given library,
6769                 # this could be due to inept reconfiguration of gcc to make it only
6770                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6771                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6772                 # /usr/local libraries.
6773                 if test -n "$cf_rpath_oops"
6774                 then
6775                         for cf_rpath_src in $cf_rpath_oops
6776                         do
6777                                 for cf_rpath_dir in \
6778                                         /usr/local \
6779                                         /usr/pkg \
6780                                         /opt/sfw
6781                                 do
6782                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6783                                         then
6784                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6785
6786 echo "${as_me:-configure}:6786: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6787
6788                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6789                                                 break
6790                                         fi
6791                                 done
6792                         done
6793                 fi
6794         fi
6795
6796         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6797
6798 echo "${as_me:-configure}:6798: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6799
6800 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6801
6802 echo "${as_me:-configure}:6802: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6803
6804 cf_rpath_dst=
6805 for cf_rpath_src in $LDFLAGS
6806 do
6807         case $cf_rpath_src in
6808         (-L*)
6809
6810                 # check if this refers to a directory which we will ignore
6811                 cf_rpath_skip=no
6812                 if test -n "$cf_rpath_list"
6813                 then
6814                         for cf_rpath_item in $cf_rpath_list
6815                         do
6816                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6817                                 then
6818                                         cf_rpath_skip=yes
6819                                         break
6820                                 fi
6821                         done
6822                 fi
6823
6824                 if test "$cf_rpath_skip" = no
6825                 then
6826                         # transform the option
6827                         if test "$LD_RPATH_OPT" = "-R " ; then
6828                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6829                         else
6830                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6831                         fi
6832
6833                         # if we have not already added this, add it now
6834                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6835                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6836                         then
6837                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6838
6839 echo "${as_me:-configure}:6839: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6840
6841                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6842                         fi
6843                 fi
6844                 ;;
6845         esac
6846         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6847 done
6848 LDFLAGS=$cf_rpath_dst
6849
6850 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6851
6852 echo "${as_me:-configure}:6852: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6853
6854 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6855
6856 echo "${as_me:-configure}:6856: testing ...checking LIBS $LIBS ..." 1>&5
6857
6858 cf_rpath_dst=
6859 for cf_rpath_src in $LIBS
6860 do
6861         case $cf_rpath_src in
6862         (-L*)
6863
6864                 # check if this refers to a directory which we will ignore
6865                 cf_rpath_skip=no
6866                 if test -n "$cf_rpath_list"
6867                 then
6868                         for cf_rpath_item in $cf_rpath_list
6869                         do
6870                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6871                                 then
6872                                         cf_rpath_skip=yes
6873                                         break
6874                                 fi
6875                         done
6876                 fi
6877
6878                 if test "$cf_rpath_skip" = no
6879                 then
6880                         # transform the option
6881                         if test "$LD_RPATH_OPT" = "-R " ; then
6882                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6883                         else
6884                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6885                         fi
6886
6887                         # if we have not already added this, add it now
6888                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6889                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6890                         then
6891                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6892
6893 echo "${as_me:-configure}:6893: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6894
6895                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6896                         fi
6897                 fi
6898                 ;;
6899         esac
6900         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6901 done
6902 LIBS=$cf_rpath_dst
6903
6904 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6905
6906 echo "${as_me:-configure}:6906: testing ...checked LIBS $LIBS ..." 1>&5
6907
6908         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6909
6910 echo "${as_me:-configure}:6910: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6911
6912 else
6913         echo "$as_me:6913: result: no" >&5
6914 echo "${ECHO_T}no" >&6
6915 fi
6916
6917 fi
6918
6919 fi
6920
6921 ###############################################################################
6922
6923 ###     use option --with-extra-suffix to append suffix to headers and libraries
6924 echo "$as_me:6924: checking if you wish to append extra suffix to header/library paths" >&5
6925 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
6926 EXTRA_SUFFIX=
6927
6928 # Check whether --with-extra-suffix or --without-extra-suffix was given.
6929 if test "${with_extra_suffix+set}" = set; then
6930   withval="$with_extra_suffix"
6931   case x$withval in
6932         (no)
6933                 ;;
6934         (xyes|x)
6935                 EXTRA_SUFFIX=$cf_cv_abi_version
6936                 ;;
6937         (*)
6938                 EXTRA_SUFFIX=$withval
6939                 ;;
6940         esac
6941
6942 fi;
6943 echo "$as_me:6943: result: $EXTRA_SUFFIX" >&5
6944 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
6945
6946 ###     use option --disable-overwrite to leave out the link to -lcurses
6947 echo "$as_me:6947: checking if you wish to install ncurses overwriting curses" >&5
6948 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6949
6950 # Check whether --enable-overwrite or --disable-overwrite was given.
6951 if test "${enable_overwrite+set}" = set; then
6952   enableval="$enable_overwrite"
6953   with_overwrite=$enableval
6954 else
6955   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6956 fi;
6957 echo "$as_me:6957: result: $with_overwrite" >&5
6958 echo "${ECHO_T}$with_overwrite" >&6
6959
6960 echo "$as_me:6960: checking if external terminfo-database is used" >&5
6961 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6962
6963 # Check whether --enable-database or --disable-database was given.
6964 if test "${enable_database+set}" = set; then
6965   enableval="$enable_database"
6966   use_database=$enableval
6967 else
6968   use_database=yes
6969 fi;
6970 echo "$as_me:6970: result: $use_database" >&5
6971 echo "${ECHO_T}$use_database" >&6
6972
6973 case $host_os in
6974 (os2*)
6975         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6976         ;;
6977 (*)
6978         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6979         ;;
6980 esac
6981
6982 NCURSES_USE_DATABASE=0
6983 if test "$use_database" != no ; then
6984         NCURSES_USE_DATABASE=1
6985
6986         echo "$as_me:6986: checking which terminfo source-file will be installed" >&5
6987 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6988
6989 # Check whether --with-database or --without-database was given.
6990 if test "${with_database+set}" = set; then
6991   withval="$with_database"
6992   TERMINFO_SRC=$withval
6993 fi;
6994         echo "$as_me:6994: result: $TERMINFO_SRC" >&5
6995 echo "${ECHO_T}$TERMINFO_SRC" >&6
6996
6997         echo "$as_me:6997: checking whether to use hashed database instead of directory/tree" >&5
6998 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6999
7000 # Check whether --with-hashed-db or --without-hashed-db was given.
7001 if test "${with_hashed_db+set}" = set; then
7002   withval="$with_hashed_db"
7003
7004 else
7005   with_hashed_db=no
7006 fi;
7007         echo "$as_me:7007: result: $with_hashed_db" >&5
7008 echo "${ECHO_T}$with_hashed_db" >&6
7009 else
7010         with_hashed_db=no
7011 fi
7012
7013 echo "$as_me:7013: checking for list of fallback descriptions" >&5
7014 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7015
7016 # Check whether --with-fallbacks or --without-fallbacks was given.
7017 if test "${with_fallbacks+set}" = set; then
7018   withval="$with_fallbacks"
7019   with_fallback=$withval
7020 else
7021   with_fallback=
7022 fi;
7023 echo "$as_me:7023: result: $with_fallback" >&5
7024 echo "${ECHO_T}$with_fallback" >&6
7025 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7026
7027 echo "$as_me:7027: checking if you want modern xterm or antique" >&5
7028 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7029
7030 # Check whether --with-xterm-new or --without-xterm-new was given.
7031 if test "${with_xterm_new+set}" = set; then
7032   withval="$with_xterm_new"
7033   with_xterm_new=$withval
7034 else
7035   with_xterm_new=yes
7036 fi;
7037 case $with_xterm_new in
7038 (no) with_xterm_new=xterm-old;;
7039 (*)      with_xterm_new=xterm-new;;
7040 esac
7041 echo "$as_me:7041: result: $with_xterm_new" >&5
7042 echo "${ECHO_T}$with_xterm_new" >&6
7043 WHICH_XTERM=$with_xterm_new
7044
7045 echo "$as_me:7045: checking if xterm backspace sends BS or DEL" >&5
7046 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7047
7048 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7049 if test "${with_xterm_kbs+set}" = set; then
7050   withval="$with_xterm_kbs"
7051   with_xterm_kbs=$withval
7052 else
7053   with_xterm_kbs=BS
7054 fi;
7055 case x$with_xterm_kbs in
7056 (xyes|xno|xBS|xbs|x8)
7057         with_xterm_kbs=BS
7058         ;;
7059 (xDEL|xdel|x127)
7060         with_xterm_kbs=DEL
7061         ;;
7062 (*)
7063         with_xterm_kbs=$withval
7064         ;;
7065 esac
7066 echo "$as_me:7066: result: $with_xterm_kbs" >&5
7067 echo "${ECHO_T}$with_xterm_kbs" >&6
7068 XTERM_KBS=$with_xterm_kbs
7069
7070 MAKE_TERMINFO=
7071 if test "$use_database" = no ; then
7072         TERMINFO="${datadir}/terminfo"
7073         MAKE_TERMINFO="#"
7074 else
7075
7076 echo "$as_me:7076: checking for list of terminfo directories" >&5
7077 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7078
7079 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7080 if test "${with_terminfo_dirs+set}" = set; then
7081   withval="$with_terminfo_dirs"
7082
7083 else
7084   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7085 fi;
7086 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7087 cf_dst_path=
7088 for cf_src_path in $withval
7089 do
7090
7091 if test "x$prefix" != xNONE; then
7092         cf_path_syntax="$prefix"
7093 else
7094         cf_path_syntax="$ac_default_prefix"
7095 fi
7096
7097 case ".$cf_src_path" in
7098 (.\$\(*\)*|.\'*\'*)
7099         ;;
7100 (..|./*|.\\*)
7101         ;;
7102 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7103         ;;
7104 (.\${*prefix}*|.\${*dir}*)
7105         eval cf_src_path="$cf_src_path"
7106         case ".$cf_src_path" in
7107         (.NONE/*)
7108                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7109                 ;;
7110         esac
7111         ;;
7112 (.no|.NONE/*)
7113         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7114         ;;
7115 (*)
7116         { { echo "$as_me:7116: error: expected a pathname, not \"$cf_src_path\"" >&5
7117 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7118    { (exit 1); exit 1; }; }
7119         ;;
7120 esac
7121
7122   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7123   cf_dst_path="${cf_dst_path}${cf_src_path}"
7124 done
7125 IFS="$ac_save_ifs"
7126
7127 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7128 # so we have to check/work around.  We do prefer the result of "eval"...
7129 eval cf_dst_eval="$cf_dst_path"
7130 case "x$cf_dst_eval" in
7131 (xNONE*)
7132         TERMINFO_DIRS=$cf_dst_path
7133         ;;
7134 (*)
7135         TERMINFO_DIRS="$cf_dst_eval"
7136         ;;
7137 esac
7138
7139 echo "$as_me:7139: result: $TERMINFO_DIRS" >&5
7140 echo "${ECHO_T}$TERMINFO_DIRS" >&6
7141 test -n "$TERMINFO_DIRS" &&
7142 cat >>confdefs.h <<EOF
7143 #define TERMINFO_DIRS "$TERMINFO_DIRS"
7144 EOF
7145
7146 echo "$as_me:7146: checking for default terminfo directory" >&5
7147 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
7148
7149 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
7150 if test "${with_default_terminfo_dir+set}" = set; then
7151   withval="$with_default_terminfo_dir"
7152
7153 else
7154   withval="${TERMINFO:-${datadir}/terminfo}"
7155 fi; if test -n "${datadir}/terminfo" ; then
7156
7157 if test "x$prefix" != xNONE; then
7158         cf_path_syntax="$prefix"
7159 else
7160         cf_path_syntax="$ac_default_prefix"
7161 fi
7162
7163 case ".$withval" in
7164 (.\$\(*\)*|.\'*\'*)
7165         ;;
7166 (..|./*|.\\*)
7167         ;;
7168 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7169         ;;
7170 (.\${*prefix}*|.\${*dir}*)
7171         eval withval="$withval"
7172         case ".$withval" in
7173         (.NONE/*)
7174                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7175                 ;;
7176         esac
7177         ;;
7178 (.no|.NONE/*)
7179         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
7180         ;;
7181 (*)
7182         { { echo "$as_me:7182: error: expected a pathname, not \"$withval\"" >&5
7183 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
7184    { (exit 1); exit 1; }; }
7185         ;;
7186 esac
7187
7188 fi
7189 eval TERMINFO="$withval"
7190
7191 echo "$as_me:7191: result: $TERMINFO" >&5
7192 echo "${ECHO_T}$TERMINFO" >&6
7193
7194 cat >>confdefs.h <<EOF
7195 #define TERMINFO "$TERMINFO"
7196 EOF
7197
7198 fi
7199
7200 ###     use option --disable-big-core to make tic run on small machines
7201 ###     We need 4Mb, check if we can allocate 50% more than that.
7202 echo "$as_me:7202: checking if big-core option selected" >&5
7203 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
7204
7205 # Check whether --enable-big-core or --disable-big-core was given.
7206 if test "${enable_big_core+set}" = set; then
7207   enableval="$enable_big_core"
7208   with_big_core=$enableval
7209 else
7210   if test "$cross_compiling" = yes; then
7211   with_big_core=no
7212 else
7213   cat >conftest.$ac_ext <<_ACEOF
7214 #line 7214 "configure"
7215 #include "confdefs.h"
7216
7217 #include <stdlib.h>
7218 #include <string.h>
7219 int main() {
7220         unsigned long n = 6000000L;
7221         char *s = malloc(n);
7222         if (s != 0)
7223                 s[0] = s[n-1] = 0;
7224         ${cf_cv_main_return:-return}(s == 0);
7225 }
7226 _ACEOF
7227 rm -f conftest$ac_exeext
7228 if { (eval echo "$as_me:7228: \"$ac_link\"") >&5
7229   (eval $ac_link) 2>&5
7230   ac_status=$?
7231   echo "$as_me:7231: \$? = $ac_status" >&5
7232   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7233   { (eval echo "$as_me:7233: \"$ac_try\"") >&5
7234   (eval $ac_try) 2>&5
7235   ac_status=$?
7236   echo "$as_me:7236: \$? = $ac_status" >&5
7237   (exit $ac_status); }; }; then
7238   with_big_core=yes
7239 else
7240   echo "$as_me: program exited with status $ac_status" >&5
7241 echo "$as_me: failed program was:" >&5
7242 cat conftest.$ac_ext >&5
7243 with_big_core=no
7244 fi
7245 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7246 fi
7247 fi;
7248 echo "$as_me:7248: result: $with_big_core" >&5
7249 echo "${ECHO_T}$with_big_core" >&6
7250 test "x$with_big_core" = "xyes" &&
7251 cat >>confdefs.h <<\EOF
7252 #define HAVE_BIG_CORE 1
7253 EOF
7254
7255 ### ISO C only guarantees 512-char strings, we have tables which load faster
7256 ### when constructed using "big" strings.  More than the C compiler, the awk
7257 ### program is a limit on most vendor UNIX systems.  Check that we can build.
7258 echo "$as_me:7258: checking if big-strings option selected" >&5
7259 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
7260
7261 # Check whether --enable-big-strings or --disable-big-strings was given.
7262 if test "${enable_big_strings+set}" = set; then
7263   enableval="$enable_big_strings"
7264   with_big_strings=$enableval
7265 else
7266
7267         case x$AWK in
7268         (x)
7269                 eval with_big_strings=no
7270                 ;;
7271         (*)
7272                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
7273                         | $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
7274                         eval with_big_strings=yes
7275                 else
7276                         eval with_big_strings=no
7277                 fi
7278                 ;;
7279         esac
7280
7281 fi;
7282 echo "$as_me:7282: result: $with_big_strings" >&5
7283 echo "${ECHO_T}$with_big_strings" >&6
7284
7285 USE_BIG_STRINGS=0
7286 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
7287
7288 ###     use option --enable-termcap to compile in the termcap fallback support
7289 echo "$as_me:7289: checking if you want termcap-fallback support" >&5
7290 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
7291
7292 # Check whether --enable-termcap or --disable-termcap was given.
7293 if test "${enable_termcap+set}" = set; then
7294   enableval="$enable_termcap"
7295   with_termcap=$enableval
7296 else
7297   with_termcap=no
7298 fi;
7299 echo "$as_me:7299: result: $with_termcap" >&5
7300 echo "${ECHO_T}$with_termcap" >&6
7301
7302 NCURSES_USE_TERMCAP=0
7303 if test "x$with_termcap" != "xyes" ; then
7304         if test "$use_database" = no ; then
7305                 if test -z "$with_fallback" ; then
7306                         { { echo "$as_me:7306: error: You have disabled the database w/o specifying fallbacks" >&5
7307 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
7308    { (exit 1); exit 1; }; }
7309                 fi
7310         fi
7311
7312 cat >>confdefs.h <<\EOF
7313 #define PURE_TERMINFO 1
7314 EOF
7315
7316 else
7317
7318         if test "$with_ticlib" != no ; then
7319                 { { echo "$as_me:7319: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
7320 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
7321    { (exit 1); exit 1; }; }
7322         fi
7323
7324         NCURSES_USE_TERMCAP=1
7325         echo "$as_me:7325: checking for list of termcap files" >&5
7326 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
7327
7328 # Check whether --with-termpath or --without-termpath was given.
7329 if test "${with_termpath+set}" = set; then
7330   withval="$with_termpath"
7331
7332 else
7333   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
7334 fi;
7335 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7336 cf_dst_path=
7337 for cf_src_path in $withval
7338 do
7339
7340 if test "x$prefix" != xNONE; then
7341         cf_path_syntax="$prefix"
7342 else
7343         cf_path_syntax="$ac_default_prefix"
7344 fi
7345
7346 case ".$cf_src_path" in
7347 (.\$\(*\)*|.\'*\'*)
7348         ;;
7349 (..|./*|.\\*)
7350         ;;
7351 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7352         ;;
7353 (.\${*prefix}*|.\${*dir}*)
7354         eval cf_src_path="$cf_src_path"
7355         case ".$cf_src_path" in
7356         (.NONE/*)
7357                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7358                 ;;
7359         esac
7360         ;;
7361 (.no|.NONE/*)
7362         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
7363         ;;
7364 (*)
7365         { { echo "$as_me:7365: error: expected a pathname, not \"$cf_src_path\"" >&5
7366 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
7367    { (exit 1); exit 1; }; }
7368         ;;
7369 esac
7370
7371   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
7372   cf_dst_path="${cf_dst_path}${cf_src_path}"
7373 done
7374 IFS="$ac_save_ifs"
7375
7376 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
7377 # so we have to check/work around.  We do prefer the result of "eval"...
7378 eval cf_dst_eval="$cf_dst_path"
7379 case "x$cf_dst_eval" in
7380 (xNONE*)
7381         TERMPATH=$cf_dst_path
7382         ;;
7383 (*)
7384         TERMPATH="$cf_dst_eval"
7385         ;;
7386 esac
7387
7388         echo "$as_me:7388: result: $TERMPATH" >&5
7389 echo "${ECHO_T}$TERMPATH" >&6
7390         test -n "$TERMPATH" &&
7391 cat >>confdefs.h <<EOF
7392 #define TERMPATH "$TERMPATH"
7393 EOF
7394
7395         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
7396         echo "$as_me:7396: checking if fast termcap-loader is needed" >&5
7397 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
7398
7399 # Check whether --enable-getcap or --disable-getcap was given.
7400 if test "${enable_getcap+set}" = set; then
7401   enableval="$enable_getcap"
7402   with_getcap=$enableval
7403 else
7404   with_getcap=no
7405 fi;
7406         echo "$as_me:7406: result: $with_getcap" >&5
7407 echo "${ECHO_T}$with_getcap" >&6
7408         test "x$with_getcap" = "xyes" &&
7409 cat >>confdefs.h <<\EOF
7410 #define USE_GETCAP 1
7411 EOF
7412
7413         echo "$as_me:7413: checking if translated termcaps will be cached in ~/.terminfo" >&5
7414 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
7415
7416 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
7417 if test "${enable_getcap_cache+set}" = set; then
7418   enableval="$enable_getcap_cache"
7419   with_getcap_cache=$enableval
7420 else
7421   with_getcap_cache=no
7422 fi;
7423         echo "$as_me:7423: result: $with_getcap_cache" >&5
7424 echo "${ECHO_T}$with_getcap_cache" >&6
7425         test "x$with_getcap_cache" = "xyes" &&
7426 cat >>confdefs.h <<\EOF
7427 #define USE_GETCAP_CACHE 1
7428 EOF
7429
7430 fi
7431
7432 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
7433 echo "$as_me:7433: checking if ~/.terminfo is wanted" >&5
7434 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
7435
7436 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
7437 if test "${enable_home_terminfo+set}" = set; then
7438   enableval="$enable_home_terminfo"
7439   with_home_terminfo=$enableval
7440 else
7441   with_home_terminfo=yes
7442 fi;
7443 echo "$as_me:7443: result: $with_home_terminfo" >&5
7444 echo "${ECHO_T}$with_home_terminfo" >&6
7445 test "x$with_home_terminfo" = "xyes" &&
7446 cat >>confdefs.h <<\EOF
7447 #define USE_HOME_TERMINFO 1
7448 EOF
7449
7450 echo "$as_me:7450: checking if you want to use restricted environment when running as root" >&5
7451 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
7452
7453 # Check whether --enable-root-environ or --disable-root-environ was given.
7454 if test "${enable_root_environ+set}" = set; then
7455   enableval="$enable_root_environ"
7456   with_root_environ=$enableval
7457 else
7458   with_root_environ=yes
7459 fi;
7460 echo "$as_me:7460: result: $with_root_environ" >&5
7461 echo "${ECHO_T}$with_root_environ" >&6
7462 test "x$with_root_environ" = xyes &&
7463 cat >>confdefs.h <<\EOF
7464 #define USE_ROOT_ENVIRON 1
7465 EOF
7466
7467 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
7468 ###   to reduce storage requirements for the terminfo database.
7469
7470 for ac_func in \
7471         remove \
7472         unlink
7473 do
7474 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7475 echo "$as_me:7475: checking for $ac_func" >&5
7476 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7477 if eval "test \"\${$as_ac_var+set}\" = set"; then
7478   echo $ECHO_N "(cached) $ECHO_C" >&6
7479 else
7480   cat >conftest.$ac_ext <<_ACEOF
7481 #line 7481 "configure"
7482 #include "confdefs.h"
7483 /* System header to define __stub macros and hopefully few prototypes,
7484     which can conflict with char $ac_func (); below.  */
7485 #include <assert.h>
7486 /* Override any gcc2 internal prototype to avoid an error.  */
7487 #ifdef __cplusplus
7488 extern "C"
7489 #endif
7490 /* We use char because int might match the return type of a gcc2
7491    builtin and then its argument prototype would still apply.  */
7492 char $ac_func ();
7493 char (*f) ();
7494
7495 int
7496 main ()
7497 {
7498 /* The GNU C library defines this for functions which it implements
7499     to always fail with ENOSYS.  Some functions are actually named
7500     something starting with __ and the normal name is an alias.  */
7501 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7502 choke me
7503 #else
7504 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7505 #endif
7506
7507   ;
7508   return 0;
7509 }
7510 _ACEOF
7511 rm -f conftest.$ac_objext conftest$ac_exeext
7512 if { (eval echo "$as_me:7512: \"$ac_link\"") >&5
7513   (eval $ac_link) 2>&5
7514   ac_status=$?
7515   echo "$as_me:7515: \$? = $ac_status" >&5
7516   (exit $ac_status); } &&
7517          { ac_try='test -s conftest$ac_exeext'
7518   { (eval echo "$as_me:7518: \"$ac_try\"") >&5
7519   (eval $ac_try) 2>&5
7520   ac_status=$?
7521   echo "$as_me:7521: \$? = $ac_status" >&5
7522   (exit $ac_status); }; }; then
7523   eval "$as_ac_var=yes"
7524 else
7525   echo "$as_me: failed program was:" >&5
7526 cat conftest.$ac_ext >&5
7527 eval "$as_ac_var=no"
7528 fi
7529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7530 fi
7531 echo "$as_me:7531: result: `eval echo '${'$as_ac_var'}'`" >&5
7532 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7533 if test `eval echo '${'$as_ac_var'}'` = yes; then
7534   cat >>confdefs.h <<EOF
7535 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7536 EOF
7537
7538 fi
7539 done
7540
7541 if test "$cross_compiling" = yes ; then
7542
7543 for ac_func in \
7544                 link \
7545                 symlink
7546 do
7547 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7548 echo "$as_me:7548: checking for $ac_func" >&5
7549 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7550 if eval "test \"\${$as_ac_var+set}\" = set"; then
7551   echo $ECHO_N "(cached) $ECHO_C" >&6
7552 else
7553   cat >conftest.$ac_ext <<_ACEOF
7554 #line 7554 "configure"
7555 #include "confdefs.h"
7556 /* System header to define __stub macros and hopefully few prototypes,
7557     which can conflict with char $ac_func (); below.  */
7558 #include <assert.h>
7559 /* Override any gcc2 internal prototype to avoid an error.  */
7560 #ifdef __cplusplus
7561 extern "C"
7562 #endif
7563 /* We use char because int might match the return type of a gcc2
7564    builtin and then its argument prototype would still apply.  */
7565 char $ac_func ();
7566 char (*f) ();
7567
7568 int
7569 main ()
7570 {
7571 /* The GNU C library defines this for functions which it implements
7572     to always fail with ENOSYS.  Some functions are actually named
7573     something starting with __ and the normal name is an alias.  */
7574 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7575 choke me
7576 #else
7577 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7578 #endif
7579
7580   ;
7581   return 0;
7582 }
7583 _ACEOF
7584 rm -f conftest.$ac_objext conftest$ac_exeext
7585 if { (eval echo "$as_me:7585: \"$ac_link\"") >&5
7586   (eval $ac_link) 2>&5
7587   ac_status=$?
7588   echo "$as_me:7588: \$? = $ac_status" >&5
7589   (exit $ac_status); } &&
7590          { ac_try='test -s conftest$ac_exeext'
7591   { (eval echo "$as_me:7591: \"$ac_try\"") >&5
7592   (eval $ac_try) 2>&5
7593   ac_status=$?
7594   echo "$as_me:7594: \$? = $ac_status" >&5
7595   (exit $ac_status); }; }; then
7596   eval "$as_ac_var=yes"
7597 else
7598   echo "$as_me: failed program was:" >&5
7599 cat conftest.$ac_ext >&5
7600 eval "$as_ac_var=no"
7601 fi
7602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7603 fi
7604 echo "$as_me:7604: result: `eval echo '${'$as_ac_var'}'`" >&5
7605 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7606 if test `eval echo '${'$as_ac_var'}'` = yes; then
7607   cat >>confdefs.h <<EOF
7608 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7609 EOF
7610
7611 fi
7612 done
7613
7614 else
7615         echo "$as_me:7615: checking if link/symlink functions work" >&5
7616 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7617 if test "${cf_cv_link_funcs+set}" = set; then
7618   echo $ECHO_N "(cached) $ECHO_C" >&6
7619 else
7620
7621                 cf_cv_link_funcs=
7622                 for cf_func in link symlink ; do
7623                         if test "$cross_compiling" = yes; then
7624
7625                         eval 'ac_cv_func_'$cf_func'=error'
7626 else
7627   cat >conftest.$ac_ext <<_ACEOF
7628 #line 7628 "configure"
7629 #include "confdefs.h"
7630
7631 #include <sys/types.h>
7632 #include <sys/stat.h>
7633 #ifdef HAVE_UNISTD_H
7634 #include <unistd.h>
7635 #endif
7636 int main()
7637 {
7638         int fail = 0;
7639         char *src = "config.log";
7640         char *dst = "conftest.chk";
7641         struct stat src_sb;
7642         struct stat dst_sb;
7643
7644         stat(src, &src_sb);
7645         fail = ($cf_func("config.log", "conftest.chk") < 0)
7646             || (stat(dst, &dst_sb) < 0)
7647             || (dst_sb.st_mtime != src_sb.st_mtime);
7648 #ifdef HAVE_UNLINK
7649         unlink(dst);
7650 #else
7651         remove(dst);
7652 #endif
7653         ${cf_cv_main_return:-return} (fail);
7654 }
7655
7656 _ACEOF
7657 rm -f conftest$ac_exeext
7658 if { (eval echo "$as_me:7658: \"$ac_link\"") >&5
7659   (eval $ac_link) 2>&5
7660   ac_status=$?
7661   echo "$as_me:7661: \$? = $ac_status" >&5
7662   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7663   { (eval echo "$as_me:7663: \"$ac_try\"") >&5
7664   (eval $ac_try) 2>&5
7665   ac_status=$?
7666   echo "$as_me:7666: \$? = $ac_status" >&5
7667   (exit $ac_status); }; }; then
7668
7669                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7670                         eval 'ac_cv_func_'$cf_func'=yes'
7671 else
7672   echo "$as_me: program exited with status $ac_status" >&5
7673 echo "$as_me: failed program was:" >&5
7674 cat conftest.$ac_ext >&5
7675
7676                         eval 'ac_cv_func_'$cf_func'=no'
7677 fi
7678 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7679 fi
7680                 done
7681                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7682
7683 fi
7684 echo "$as_me:7684: result: $cf_cv_link_funcs" >&5
7685 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7686         test "$ac_cv_func_link"    = yes &&
7687 cat >>confdefs.h <<\EOF
7688 #define HAVE_LINK 1
7689 EOF
7690
7691         test "$ac_cv_func_symlink" = yes &&
7692 cat >>confdefs.h <<\EOF
7693 #define HAVE_SYMLINK 1
7694 EOF
7695
7696 fi
7697
7698 with_links=no
7699 with_symlinks=no
7700
7701 # soft links (symbolic links) are useful for some systems where hard links do
7702 # not work, or to make it simpler to copy terminfo trees around.
7703 if test "x$ac_cv_func_symlink" = xyes ; then
7704         echo "$as_me:7704: checking if tic should use symbolic links" >&5
7705 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7706
7707 # Check whether --enable-symlinks or --disable-symlinks was given.
7708 if test "${enable_symlinks+set}" = set; then
7709   enableval="$enable_symlinks"
7710   with_symlinks=$enableval
7711 else
7712   with_symlinks=no
7713 fi;
7714         echo "$as_me:7714: result: $with_symlinks" >&5
7715 echo "${ECHO_T}$with_symlinks" >&6
7716 fi
7717
7718 # If we have hard links and did not choose to use soft links instead, there is
7719 # no reason to make this choice optional - use the hard links.
7720 if test "$with_symlinks" = no ; then
7721         echo "$as_me:7721: checking if tic should use hard links" >&5
7722 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7723         if test "x$ac_cv_func_link" = xyes ; then
7724                 with_links=yes
7725         else
7726                 with_links=no
7727         fi
7728         echo "$as_me:7728: result: $with_links" >&5
7729 echo "${ECHO_T}$with_links" >&6
7730 fi
7731
7732 test "x$with_links" = xyes &&
7733 cat >>confdefs.h <<\EOF
7734 #define USE_LINKS 1
7735 EOF
7736
7737 test "x$with_symlinks" = xyes &&
7738 cat >>confdefs.h <<\EOF
7739 #define USE_SYMLINKS 1
7740 EOF
7741
7742 ###   use option --enable-broken-linker to force on use of broken-linker support
7743 echo "$as_me:7743: checking if you want broken-linker support code" >&5
7744 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7745
7746 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7747 if test "${enable_broken_linker+set}" = set; then
7748   enableval="$enable_broken_linker"
7749   with_broken_linker=$enableval
7750 else
7751   with_broken_linker=${BROKEN_LINKER:-no}
7752 fi;
7753 echo "$as_me:7753: result: $with_broken_linker" >&5
7754 echo "${ECHO_T}$with_broken_linker" >&6
7755
7756 BROKEN_LINKER=0
7757 if test "x$with_broken_linker" = xyes ; then
7758
7759 cat >>confdefs.h <<\EOF
7760 #define BROKEN_LINKER 1
7761 EOF
7762
7763         BROKEN_LINKER=1
7764 elif test "$DFT_LWR_MODEL" = shared ; then
7765         case $cf_cv_system_name in
7766         (cygwin*)
7767
7768 cat >>confdefs.h <<\EOF
7769 #define BROKEN_LINKER 1
7770 EOF
7771
7772                 BROKEN_LINKER=1
7773                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7774
7775 echo "${as_me:-configure}:7775: testing cygwin linker is broken anyway ..." 1>&5
7776
7777                 ;;
7778         esac
7779 fi
7780
7781 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7782 echo "$as_me:7782: checking if tputs should process BSD-style prefix padding" >&5
7783 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7784
7785 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7786 if test "${enable_bsdpad+set}" = set; then
7787   enableval="$enable_bsdpad"
7788   with_bsdpad=$enableval
7789 else
7790   with_bsdpad=no
7791 fi;
7792 echo "$as_me:7792: result: $with_bsdpad" >&5
7793 echo "${ECHO_T}$with_bsdpad" >&6
7794 test "x$with_bsdpad" = xyes &&
7795 cat >>confdefs.h <<\EOF
7796 #define BSD_TPUTS 1
7797 EOF
7798
7799 ###   use option --enable-widec to turn on use of wide-character support
7800 NCURSES_CH_T=chtype
7801 NCURSES_LIBUTF8=0
7802
7803 NEED_WCHAR_H=0
7804 NCURSES_MBSTATE_T=0
7805 NCURSES_WCHAR_T=0
7806 NCURSES_WINT_T=0
7807
7808 # Check to define _XOPEN_SOURCE "automatically"
7809 CPPFLAGS_before_XOPEN="$CPPFLAGS"
7810
7811 cf_XOPEN_SOURCE=500
7812 cf_POSIX_C_SOURCE=199506L
7813 cf_xopen_source=
7814
7815 case $host_os in
7816 (aix[4-7]*)
7817         cf_xopen_source="-D_ALL_SOURCE"
7818         ;;
7819 (cygwin|msys)
7820         cf_XOPEN_SOURCE=600
7821         ;;
7822 (darwin[0-8].*)
7823         cf_xopen_source="-D_APPLE_C_SOURCE"
7824         ;;
7825 (darwin*)
7826         cf_xopen_source="-D_DARWIN_C_SOURCE"
7827         cf_XOPEN_SOURCE=
7828         ;;
7829 (freebsd*|dragonfly*)
7830         # 5.x headers associate
7831         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7832         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7833         cf_POSIX_C_SOURCE=200112L
7834         cf_XOPEN_SOURCE=600
7835         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7836         ;;
7837 (hpux11*)
7838         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7839         ;;
7840 (hpux*)
7841         cf_xopen_source="-D_HPUX_SOURCE"
7842         ;;
7843 (irix[56].*)
7844         cf_xopen_source="-D_SGI_SOURCE"
7845         cf_XOPEN_SOURCE=
7846         ;;
7847 (linux*|gnu*|mint*|k*bsd*-gnu)
7848
7849 echo "$as_me:7849: checking if we must define _GNU_SOURCE" >&5
7850 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7851 if test "${cf_cv_gnu_source+set}" = set; then
7852   echo $ECHO_N "(cached) $ECHO_C" >&6
7853 else
7854
7855 cat >conftest.$ac_ext <<_ACEOF
7856 #line 7856 "configure"
7857 #include "confdefs.h"
7858 #include <sys/types.h>
7859 int
7860 main ()
7861 {
7862
7863 #ifndef _XOPEN_SOURCE
7864 make an error
7865 #endif
7866   ;
7867   return 0;
7868 }
7869 _ACEOF
7870 rm -f conftest.$ac_objext
7871 if { (eval echo "$as_me:7871: \"$ac_compile\"") >&5
7872   (eval $ac_compile) 2>&5
7873   ac_status=$?
7874   echo "$as_me:7874: \$? = $ac_status" >&5
7875   (exit $ac_status); } &&
7876          { ac_try='test -s conftest.$ac_objext'
7877   { (eval echo "$as_me:7877: \"$ac_try\"") >&5
7878   (eval $ac_try) 2>&5
7879   ac_status=$?
7880   echo "$as_me:7880: \$? = $ac_status" >&5
7881   (exit $ac_status); }; }; then
7882   cf_cv_gnu_source=no
7883 else
7884   echo "$as_me: failed program was:" >&5
7885 cat conftest.$ac_ext >&5
7886 cf_save="$CPPFLAGS"
7887          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7888          cat >conftest.$ac_ext <<_ACEOF
7889 #line 7889 "configure"
7890 #include "confdefs.h"
7891 #include <sys/types.h>
7892 int
7893 main ()
7894 {
7895
7896 #ifdef _XOPEN_SOURCE
7897 make an error
7898 #endif
7899   ;
7900   return 0;
7901 }
7902 _ACEOF
7903 rm -f conftest.$ac_objext
7904 if { (eval echo "$as_me:7904: \"$ac_compile\"") >&5
7905   (eval $ac_compile) 2>&5
7906   ac_status=$?
7907   echo "$as_me:7907: \$? = $ac_status" >&5
7908   (exit $ac_status); } &&
7909          { ac_try='test -s conftest.$ac_objext'
7910   { (eval echo "$as_me:7910: \"$ac_try\"") >&5
7911   (eval $ac_try) 2>&5
7912   ac_status=$?
7913   echo "$as_me:7913: \$? = $ac_status" >&5
7914   (exit $ac_status); }; }; then
7915   cf_cv_gnu_source=no
7916 else
7917   echo "$as_me: failed program was:" >&5
7918 cat conftest.$ac_ext >&5
7919 cf_cv_gnu_source=yes
7920 fi
7921 rm -f conftest.$ac_objext conftest.$ac_ext
7922         CPPFLAGS="$cf_save"
7923
7924 fi
7925 rm -f conftest.$ac_objext conftest.$ac_ext
7926
7927 fi
7928 echo "$as_me:7928: result: $cf_cv_gnu_source" >&5
7929 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7930 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7931
7932         ;;
7933 (minix*)
7934         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7935         ;;
7936 (mirbsd*)
7937         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7938         cf_XOPEN_SOURCE=
7939
7940 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7941
7942 cf_save_CFLAGS="$CFLAGS"
7943 cf_save_CPPFLAGS="$CPPFLAGS"
7944
7945 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7946         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7947                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7948
7949 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7950         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7951                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7952
7953 echo "$as_me:7953: checking if we should define _POSIX_C_SOURCE" >&5
7954 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7955 if test "${cf_cv_posix_c_source+set}" = set; then
7956   echo $ECHO_N "(cached) $ECHO_C" >&6
7957 else
7958
7959 echo "${as_me:-configure}:7959: testing if the symbol is already defined go no further ..." 1>&5
7960
7961         cat >conftest.$ac_ext <<_ACEOF
7962 #line 7962 "configure"
7963 #include "confdefs.h"
7964 #include <sys/types.h>
7965 int
7966 main ()
7967 {
7968
7969 #ifndef _POSIX_C_SOURCE
7970 make an error
7971 #endif
7972   ;
7973   return 0;
7974 }
7975 _ACEOF
7976 rm -f conftest.$ac_objext
7977 if { (eval echo "$as_me:7977: \"$ac_compile\"") >&5
7978   (eval $ac_compile) 2>&5
7979   ac_status=$?
7980   echo "$as_me:7980: \$? = $ac_status" >&5
7981   (exit $ac_status); } &&
7982          { ac_try='test -s conftest.$ac_objext'
7983   { (eval echo "$as_me:7983: \"$ac_try\"") >&5
7984   (eval $ac_try) 2>&5
7985   ac_status=$?
7986   echo "$as_me:7986: \$? = $ac_status" >&5
7987   (exit $ac_status); }; }; then
7988   cf_cv_posix_c_source=no
7989 else
7990   echo "$as_me: failed program was:" >&5
7991 cat conftest.$ac_ext >&5
7992 cf_want_posix_source=no
7993          case .$cf_POSIX_C_SOURCE in
7994          (.[12]??*)
7995                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7996                 ;;
7997          (.2)
7998                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7999                 cf_want_posix_source=yes
8000                 ;;
8001          (.*)
8002                 cf_want_posix_source=yes
8003                 ;;
8004          esac
8005          if test "$cf_want_posix_source" = yes ; then
8006                 cat >conftest.$ac_ext <<_ACEOF
8007 #line 8007 "configure"
8008 #include "confdefs.h"
8009 #include <sys/types.h>
8010 int
8011 main ()
8012 {
8013
8014 #ifdef _POSIX_SOURCE
8015 make an error
8016 #endif
8017   ;
8018   return 0;
8019 }
8020 _ACEOF
8021 rm -f conftest.$ac_objext
8022 if { (eval echo "$as_me:8022: \"$ac_compile\"") >&5
8023   (eval $ac_compile) 2>&5
8024   ac_status=$?
8025   echo "$as_me:8025: \$? = $ac_status" >&5
8026   (exit $ac_status); } &&
8027          { ac_try='test -s conftest.$ac_objext'
8028   { (eval echo "$as_me:8028: \"$ac_try\"") >&5
8029   (eval $ac_try) 2>&5
8030   ac_status=$?
8031   echo "$as_me:8031: \$? = $ac_status" >&5
8032   (exit $ac_status); }; }; then
8033   :
8034 else
8035   echo "$as_me: failed program was:" >&5
8036 cat conftest.$ac_ext >&5
8037 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8038 fi
8039 rm -f conftest.$ac_objext conftest.$ac_ext
8040          fi
8041
8042 echo "${as_me:-configure}:8042: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8043
8044          CFLAGS="$cf_trim_CFLAGS"
8045          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8046
8047 echo "${as_me:-configure}:8047: testing if the second compile does not leave our definition intact error ..." 1>&5
8048
8049          cat >conftest.$ac_ext <<_ACEOF
8050 #line 8050 "configure"
8051 #include "confdefs.h"
8052 #include <sys/types.h>
8053 int
8054 main ()
8055 {
8056
8057 #ifndef _POSIX_C_SOURCE
8058 make an error
8059 #endif
8060   ;
8061   return 0;
8062 }
8063 _ACEOF
8064 rm -f conftest.$ac_objext
8065 if { (eval echo "$as_me:8065: \"$ac_compile\"") >&5
8066   (eval $ac_compile) 2>&5
8067   ac_status=$?
8068   echo "$as_me:8068: \$? = $ac_status" >&5
8069   (exit $ac_status); } &&
8070          { ac_try='test -s conftest.$ac_objext'
8071   { (eval echo "$as_me:8071: \"$ac_try\"") >&5
8072   (eval $ac_try) 2>&5
8073   ac_status=$?
8074   echo "$as_me:8074: \$? = $ac_status" >&5
8075   (exit $ac_status); }; }; then
8076   :
8077 else
8078   echo "$as_me: failed program was:" >&5
8079 cat conftest.$ac_ext >&5
8080 cf_cv_posix_c_source=no
8081 fi
8082 rm -f conftest.$ac_objext conftest.$ac_ext
8083          CFLAGS="$cf_save_CFLAGS"
8084          CPPFLAGS="$cf_save_CPPFLAGS"
8085
8086 fi
8087 rm -f conftest.$ac_objext conftest.$ac_ext
8088
8089 fi
8090 echo "$as_me:8090: result: $cf_cv_posix_c_source" >&5
8091 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8092
8093 if test "$cf_cv_posix_c_source" != no ; then
8094         CFLAGS="$cf_trim_CFLAGS"
8095         CPPFLAGS="$cf_trim_CPPFLAGS"
8096
8097 cf_fix_cppflags=no
8098 cf_new_cflags=
8099 cf_new_cppflags=
8100 cf_new_extra_cppflags=
8101
8102 for cf_add_cflags in $cf_cv_posix_c_source
8103 do
8104 case $cf_fix_cppflags in
8105 (no)
8106         case $cf_add_cflags in
8107         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8108                 case $cf_add_cflags in
8109                 (-D*)
8110                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8111
8112                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8113                                 && test -z "${cf_tst_cflags}" \
8114                                 && cf_fix_cppflags=yes
8115
8116                         if test $cf_fix_cppflags = yes ; then
8117                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8118                                 continue
8119                         elif test "${cf_tst_cflags}" = "\"'" ; then
8120                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8121                                 continue
8122                         fi
8123                         ;;
8124                 esac
8125                 case "$CPPFLAGS" in
8126                 (*$cf_add_cflags)
8127                         ;;
8128                 (*)
8129                         case $cf_add_cflags in
8130                         (-D*)
8131                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8132
8133 CPPFLAGS=`echo "$CPPFLAGS" | \
8134         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8135                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8136
8137                                 ;;
8138                         esac
8139                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8140                         ;;
8141                 esac
8142                 ;;
8143         (*)
8144                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8145                 ;;
8146         esac
8147         ;;
8148 (yes)
8149         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8150
8151         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8152
8153         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8154                 && test -z "${cf_tst_cflags}" \
8155                 && cf_fix_cppflags=no
8156         ;;
8157 esac
8158 done
8159
8160 if test -n "$cf_new_cflags" ; then
8161
8162         CFLAGS="$CFLAGS $cf_new_cflags"
8163 fi
8164
8165 if test -n "$cf_new_cppflags" ; then
8166
8167         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8168 fi
8169
8170 if test -n "$cf_new_extra_cppflags" ; then
8171
8172         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8173 fi
8174
8175 fi
8176
8177         ;;
8178 (netbsd*)
8179         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
8180         ;;
8181 (openbsd[4-9]*)
8182         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
8183         cf_xopen_source="-D_BSD_SOURCE"
8184         cf_XOPEN_SOURCE=600
8185         ;;
8186 (openbsd*)
8187         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
8188         ;;
8189 (osf[45]*)
8190         cf_xopen_source="-D_OSF_SOURCE"
8191         ;;
8192 (nto-qnx*)
8193         cf_xopen_source="-D_QNX_SOURCE"
8194         ;;
8195 (sco*)
8196         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
8197         ;;
8198 (solaris2.*)
8199         cf_xopen_source="-D__EXTENSIONS__"
8200         cf_cv_xopen_source=broken
8201         ;;
8202 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
8203         cf_XOPEN_SOURCE=
8204         cf_POSIX_C_SOURCE=
8205         ;;
8206 (*)
8207
8208 echo "$as_me:8208: checking if we should define _XOPEN_SOURCE" >&5
8209 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8210 if test "${cf_cv_xopen_source+set}" = set; then
8211   echo $ECHO_N "(cached) $ECHO_C" >&6
8212 else
8213
8214         cat >conftest.$ac_ext <<_ACEOF
8215 #line 8215 "configure"
8216 #include "confdefs.h"
8217
8218 #include <stdlib.h>
8219 #include <string.h>
8220 #include <sys/types.h>
8221
8222 int
8223 main ()
8224 {
8225
8226 #ifndef _XOPEN_SOURCE
8227 make an error
8228 #endif
8229   ;
8230   return 0;
8231 }
8232 _ACEOF
8233 rm -f conftest.$ac_objext
8234 if { (eval echo "$as_me:8234: \"$ac_compile\"") >&5
8235   (eval $ac_compile) 2>&5
8236   ac_status=$?
8237   echo "$as_me:8237: \$? = $ac_status" >&5
8238   (exit $ac_status); } &&
8239          { ac_try='test -s conftest.$ac_objext'
8240   { (eval echo "$as_me:8240: \"$ac_try\"") >&5
8241   (eval $ac_try) 2>&5
8242   ac_status=$?
8243   echo "$as_me:8243: \$? = $ac_status" >&5
8244   (exit $ac_status); }; }; then
8245   cf_cv_xopen_source=no
8246 else
8247   echo "$as_me: failed program was:" >&5
8248 cat conftest.$ac_ext >&5
8249 cf_save="$CPPFLAGS"
8250          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8251          cat >conftest.$ac_ext <<_ACEOF
8252 #line 8252 "configure"
8253 #include "confdefs.h"
8254
8255 #include <stdlib.h>
8256 #include <string.h>
8257 #include <sys/types.h>
8258
8259 int
8260 main ()
8261 {
8262
8263 #ifdef _XOPEN_SOURCE
8264 make an error
8265 #endif
8266   ;
8267   return 0;
8268 }
8269 _ACEOF
8270 rm -f conftest.$ac_objext
8271 if { (eval echo "$as_me:8271: \"$ac_compile\"") >&5
8272   (eval $ac_compile) 2>&5
8273   ac_status=$?
8274   echo "$as_me:8274: \$? = $ac_status" >&5
8275   (exit $ac_status); } &&
8276          { ac_try='test -s conftest.$ac_objext'
8277   { (eval echo "$as_me:8277: \"$ac_try\"") >&5
8278   (eval $ac_try) 2>&5
8279   ac_status=$?
8280   echo "$as_me:8280: \$? = $ac_status" >&5
8281   (exit $ac_status); }; }; then
8282   cf_cv_xopen_source=no
8283 else
8284   echo "$as_me: failed program was:" >&5
8285 cat conftest.$ac_ext >&5
8286 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8287 fi
8288 rm -f conftest.$ac_objext conftest.$ac_ext
8289         CPPFLAGS="$cf_save"
8290
8291 fi
8292 rm -f conftest.$ac_objext conftest.$ac_ext
8293
8294 fi
8295 echo "$as_me:8295: result: $cf_cv_xopen_source" >&5
8296 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8297
8298 if test "$cf_cv_xopen_source" != no ; then
8299
8300 CFLAGS=`echo "$CFLAGS" | \
8301         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8302                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8303
8304 CPPFLAGS=`echo "$CPPFLAGS" | \
8305         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8306                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8307
8308         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8309
8310 cf_fix_cppflags=no
8311 cf_new_cflags=
8312 cf_new_cppflags=
8313 cf_new_extra_cppflags=
8314
8315 for cf_add_cflags in $cf_temp_xopen_source
8316 do
8317 case $cf_fix_cppflags in
8318 (no)
8319         case $cf_add_cflags in
8320         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8321                 case $cf_add_cflags in
8322                 (-D*)
8323                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8324
8325                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8326                                 && test -z "${cf_tst_cflags}" \
8327                                 && cf_fix_cppflags=yes
8328
8329                         if test $cf_fix_cppflags = yes ; then
8330                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8331                                 continue
8332                         elif test "${cf_tst_cflags}" = "\"'" ; then
8333                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8334                                 continue
8335                         fi
8336                         ;;
8337                 esac
8338                 case "$CPPFLAGS" in
8339                 (*$cf_add_cflags)
8340                         ;;
8341                 (*)
8342                         case $cf_add_cflags in
8343                         (-D*)
8344                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8345
8346 CPPFLAGS=`echo "$CPPFLAGS" | \
8347         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8348                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8349
8350                                 ;;
8351                         esac
8352                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8353                         ;;
8354                 esac
8355                 ;;
8356         (*)
8357                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8358                 ;;
8359         esac
8360         ;;
8361 (yes)
8362         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8363
8364         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8365
8366         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8367                 && test -z "${cf_tst_cflags}" \
8368                 && cf_fix_cppflags=no
8369         ;;
8370 esac
8371 done
8372
8373 if test -n "$cf_new_cflags" ; then
8374
8375         CFLAGS="$CFLAGS $cf_new_cflags"
8376 fi
8377
8378 if test -n "$cf_new_cppflags" ; then
8379
8380         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8381 fi
8382
8383 if test -n "$cf_new_extra_cppflags" ; then
8384
8385         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8386 fi
8387
8388 fi
8389
8390 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
8391
8392 cf_save_CFLAGS="$CFLAGS"
8393 cf_save_CPPFLAGS="$CPPFLAGS"
8394
8395 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
8396         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8397                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8398
8399 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
8400         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
8401                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
8402
8403 echo "$as_me:8403: checking if we should define _POSIX_C_SOURCE" >&5
8404 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
8405 if test "${cf_cv_posix_c_source+set}" = set; then
8406   echo $ECHO_N "(cached) $ECHO_C" >&6
8407 else
8408
8409 echo "${as_me:-configure}:8409: testing if the symbol is already defined go no further ..." 1>&5
8410
8411         cat >conftest.$ac_ext <<_ACEOF
8412 #line 8412 "configure"
8413 #include "confdefs.h"
8414 #include <sys/types.h>
8415 int
8416 main ()
8417 {
8418
8419 #ifndef _POSIX_C_SOURCE
8420 make an error
8421 #endif
8422   ;
8423   return 0;
8424 }
8425 _ACEOF
8426 rm -f conftest.$ac_objext
8427 if { (eval echo "$as_me:8427: \"$ac_compile\"") >&5
8428   (eval $ac_compile) 2>&5
8429   ac_status=$?
8430   echo "$as_me:8430: \$? = $ac_status" >&5
8431   (exit $ac_status); } &&
8432          { ac_try='test -s conftest.$ac_objext'
8433   { (eval echo "$as_me:8433: \"$ac_try\"") >&5
8434   (eval $ac_try) 2>&5
8435   ac_status=$?
8436   echo "$as_me:8436: \$? = $ac_status" >&5
8437   (exit $ac_status); }; }; then
8438   cf_cv_posix_c_source=no
8439 else
8440   echo "$as_me: failed program was:" >&5
8441 cat conftest.$ac_ext >&5
8442 cf_want_posix_source=no
8443          case .$cf_POSIX_C_SOURCE in
8444          (.[12]??*)
8445                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8446                 ;;
8447          (.2)
8448                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
8449                 cf_want_posix_source=yes
8450                 ;;
8451          (.*)
8452                 cf_want_posix_source=yes
8453                 ;;
8454          esac
8455          if test "$cf_want_posix_source" = yes ; then
8456                 cat >conftest.$ac_ext <<_ACEOF
8457 #line 8457 "configure"
8458 #include "confdefs.h"
8459 #include <sys/types.h>
8460 int
8461 main ()
8462 {
8463
8464 #ifdef _POSIX_SOURCE
8465 make an error
8466 #endif
8467   ;
8468   return 0;
8469 }
8470 _ACEOF
8471 rm -f conftest.$ac_objext
8472 if { (eval echo "$as_me:8472: \"$ac_compile\"") >&5
8473   (eval $ac_compile) 2>&5
8474   ac_status=$?
8475   echo "$as_me:8475: \$? = $ac_status" >&5
8476   (exit $ac_status); } &&
8477          { ac_try='test -s conftest.$ac_objext'
8478   { (eval echo "$as_me:8478: \"$ac_try\"") >&5
8479   (eval $ac_try) 2>&5
8480   ac_status=$?
8481   echo "$as_me:8481: \$? = $ac_status" >&5
8482   (exit $ac_status); }; }; then
8483   :
8484 else
8485   echo "$as_me: failed program was:" >&5
8486 cat conftest.$ac_ext >&5
8487 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
8488 fi
8489 rm -f conftest.$ac_objext conftest.$ac_ext
8490          fi
8491
8492 echo "${as_me:-configure}:8492: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
8493
8494          CFLAGS="$cf_trim_CFLAGS"
8495          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
8496
8497 echo "${as_me:-configure}:8497: testing if the second compile does not leave our definition intact error ..." 1>&5
8498
8499          cat >conftest.$ac_ext <<_ACEOF
8500 #line 8500 "configure"
8501 #include "confdefs.h"
8502 #include <sys/types.h>
8503 int
8504 main ()
8505 {
8506
8507 #ifndef _POSIX_C_SOURCE
8508 make an error
8509 #endif
8510   ;
8511   return 0;
8512 }
8513 _ACEOF
8514 rm -f conftest.$ac_objext
8515 if { (eval echo "$as_me:8515: \"$ac_compile\"") >&5
8516   (eval $ac_compile) 2>&5
8517   ac_status=$?
8518   echo "$as_me:8518: \$? = $ac_status" >&5
8519   (exit $ac_status); } &&
8520          { ac_try='test -s conftest.$ac_objext'
8521   { (eval echo "$as_me:8521: \"$ac_try\"") >&5
8522   (eval $ac_try) 2>&5
8523   ac_status=$?
8524   echo "$as_me:8524: \$? = $ac_status" >&5
8525   (exit $ac_status); }; }; then
8526   :
8527 else
8528   echo "$as_me: failed program was:" >&5
8529 cat conftest.$ac_ext >&5
8530 cf_cv_posix_c_source=no
8531 fi
8532 rm -f conftest.$ac_objext conftest.$ac_ext
8533          CFLAGS="$cf_save_CFLAGS"
8534          CPPFLAGS="$cf_save_CPPFLAGS"
8535
8536 fi
8537 rm -f conftest.$ac_objext conftest.$ac_ext
8538
8539 fi
8540 echo "$as_me:8540: result: $cf_cv_posix_c_source" >&5
8541 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8542
8543 if test "$cf_cv_posix_c_source" != no ; then
8544         CFLAGS="$cf_trim_CFLAGS"
8545         CPPFLAGS="$cf_trim_CPPFLAGS"
8546
8547 cf_fix_cppflags=no
8548 cf_new_cflags=
8549 cf_new_cppflags=
8550 cf_new_extra_cppflags=
8551
8552 for cf_add_cflags in $cf_cv_posix_c_source
8553 do
8554 case $cf_fix_cppflags in
8555 (no)
8556         case $cf_add_cflags in
8557         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8558                 case $cf_add_cflags in
8559                 (-D*)
8560                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8561
8562                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8563                                 && test -z "${cf_tst_cflags}" \
8564                                 && cf_fix_cppflags=yes
8565
8566                         if test $cf_fix_cppflags = yes ; then
8567                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8568                                 continue
8569                         elif test "${cf_tst_cflags}" = "\"'" ; then
8570                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8571                                 continue
8572                         fi
8573                         ;;
8574                 esac
8575                 case "$CPPFLAGS" in
8576                 (*$cf_add_cflags)
8577                         ;;
8578                 (*)
8579                         case $cf_add_cflags in
8580                         (-D*)
8581                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8582
8583 CPPFLAGS=`echo "$CPPFLAGS" | \
8584         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8585                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8586
8587                                 ;;
8588                         esac
8589                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8590                         ;;
8591                 esac
8592                 ;;
8593         (*)
8594                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8595                 ;;
8596         esac
8597         ;;
8598 (yes)
8599         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8600
8601         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8602
8603         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8604                 && test -z "${cf_tst_cflags}" \
8605                 && cf_fix_cppflags=no
8606         ;;
8607 esac
8608 done
8609
8610 if test -n "$cf_new_cflags" ; then
8611
8612         CFLAGS="$CFLAGS $cf_new_cflags"
8613 fi
8614
8615 if test -n "$cf_new_cppflags" ; then
8616
8617         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8618 fi
8619
8620 if test -n "$cf_new_extra_cppflags" ; then
8621
8622         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8623 fi
8624
8625 fi
8626
8627         ;;
8628 esac
8629
8630 if test -n "$cf_xopen_source" ; then
8631
8632 cf_fix_cppflags=no
8633 cf_new_cflags=
8634 cf_new_cppflags=
8635 cf_new_extra_cppflags=
8636
8637 for cf_add_cflags in $cf_xopen_source
8638 do
8639 case $cf_fix_cppflags in
8640 (no)
8641         case $cf_add_cflags in
8642         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8643                 case $cf_add_cflags in
8644                 (-D*)
8645                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8646
8647                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8648                                 && test -z "${cf_tst_cflags}" \
8649                                 && cf_fix_cppflags=yes
8650
8651                         if test $cf_fix_cppflags = yes ; then
8652                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8653                                 continue
8654                         elif test "${cf_tst_cflags}" = "\"'" ; then
8655                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8656                                 continue
8657                         fi
8658                         ;;
8659                 esac
8660                 case "$CPPFLAGS" in
8661                 (*$cf_add_cflags)
8662                         ;;
8663                 (*)
8664                         case $cf_add_cflags in
8665                         (-D*)
8666                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8667
8668 CPPFLAGS=`echo "$CPPFLAGS" | \
8669         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8670                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8671
8672                                 ;;
8673                         esac
8674                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8675                         ;;
8676                 esac
8677                 ;;
8678         (*)
8679                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8680                 ;;
8681         esac
8682         ;;
8683 (yes)
8684         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8685
8686         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8687
8688         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8689                 && test -z "${cf_tst_cflags}" \
8690                 && cf_fix_cppflags=no
8691         ;;
8692 esac
8693 done
8694
8695 if test -n "$cf_new_cflags" ; then
8696         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8697
8698 echo "${as_me:-configure}:8698: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8699
8700         CFLAGS="$CFLAGS $cf_new_cflags"
8701 fi
8702
8703 if test -n "$cf_new_cppflags" ; then
8704         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8705
8706 echo "${as_me:-configure}:8706: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8707
8708         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8709 fi
8710
8711 if test -n "$cf_new_extra_cppflags" ; then
8712         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8713
8714 echo "${as_me:-configure}:8714: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8715
8716         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8717 fi
8718
8719 fi
8720
8721 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8722         echo "$as_me:8722: checking if _XOPEN_SOURCE really is set" >&5
8723 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8724         cat >conftest.$ac_ext <<_ACEOF
8725 #line 8725 "configure"
8726 #include "confdefs.h"
8727 #include <stdlib.h>
8728 int
8729 main ()
8730 {
8731
8732 #ifndef _XOPEN_SOURCE
8733 make an error
8734 #endif
8735   ;
8736   return 0;
8737 }
8738 _ACEOF
8739 rm -f conftest.$ac_objext
8740 if { (eval echo "$as_me:8740: \"$ac_compile\"") >&5
8741   (eval $ac_compile) 2>&5
8742   ac_status=$?
8743   echo "$as_me:8743: \$? = $ac_status" >&5
8744   (exit $ac_status); } &&
8745          { ac_try='test -s conftest.$ac_objext'
8746   { (eval echo "$as_me:8746: \"$ac_try\"") >&5
8747   (eval $ac_try) 2>&5
8748   ac_status=$?
8749   echo "$as_me:8749: \$? = $ac_status" >&5
8750   (exit $ac_status); }; }; then
8751   cf_XOPEN_SOURCE_set=yes
8752 else
8753   echo "$as_me: failed program was:" >&5
8754 cat conftest.$ac_ext >&5
8755 cf_XOPEN_SOURCE_set=no
8756 fi
8757 rm -f conftest.$ac_objext conftest.$ac_ext
8758         echo "$as_me:8758: result: $cf_XOPEN_SOURCE_set" >&5
8759 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8760         if test $cf_XOPEN_SOURCE_set = yes
8761         then
8762                 cat >conftest.$ac_ext <<_ACEOF
8763 #line 8763 "configure"
8764 #include "confdefs.h"
8765 #include <stdlib.h>
8766 int
8767 main ()
8768 {
8769
8770 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8771 make an error
8772 #endif
8773   ;
8774   return 0;
8775 }
8776 _ACEOF
8777 rm -f conftest.$ac_objext
8778 if { (eval echo "$as_me:8778: \"$ac_compile\"") >&5
8779   (eval $ac_compile) 2>&5
8780   ac_status=$?
8781   echo "$as_me:8781: \$? = $ac_status" >&5
8782   (exit $ac_status); } &&
8783          { ac_try='test -s conftest.$ac_objext'
8784   { (eval echo "$as_me:8784: \"$ac_try\"") >&5
8785   (eval $ac_try) 2>&5
8786   ac_status=$?
8787   echo "$as_me:8787: \$? = $ac_status" >&5
8788   (exit $ac_status); }; }; then
8789   cf_XOPEN_SOURCE_set_ok=yes
8790 else
8791   echo "$as_me: failed program was:" >&5
8792 cat conftest.$ac_ext >&5
8793 cf_XOPEN_SOURCE_set_ok=no
8794 fi
8795 rm -f conftest.$ac_objext conftest.$ac_ext
8796                 if test $cf_XOPEN_SOURCE_set_ok = no
8797                 then
8798                         { echo "$as_me:8798: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8799 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8800                 fi
8801         else
8802
8803 echo "$as_me:8803: checking if we should define _XOPEN_SOURCE" >&5
8804 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8805 if test "${cf_cv_xopen_source+set}" = set; then
8806   echo $ECHO_N "(cached) $ECHO_C" >&6
8807 else
8808
8809         cat >conftest.$ac_ext <<_ACEOF
8810 #line 8810 "configure"
8811 #include "confdefs.h"
8812
8813 #include <stdlib.h>
8814 #include <string.h>
8815 #include <sys/types.h>
8816
8817 int
8818 main ()
8819 {
8820
8821 #ifndef _XOPEN_SOURCE
8822 make an error
8823 #endif
8824   ;
8825   return 0;
8826 }
8827 _ACEOF
8828 rm -f conftest.$ac_objext
8829 if { (eval echo "$as_me:8829: \"$ac_compile\"") >&5
8830   (eval $ac_compile) 2>&5
8831   ac_status=$?
8832   echo "$as_me:8832: \$? = $ac_status" >&5
8833   (exit $ac_status); } &&
8834          { ac_try='test -s conftest.$ac_objext'
8835   { (eval echo "$as_me:8835: \"$ac_try\"") >&5
8836   (eval $ac_try) 2>&5
8837   ac_status=$?
8838   echo "$as_me:8838: \$? = $ac_status" >&5
8839   (exit $ac_status); }; }; then
8840   cf_cv_xopen_source=no
8841 else
8842   echo "$as_me: failed program was:" >&5
8843 cat conftest.$ac_ext >&5
8844 cf_save="$CPPFLAGS"
8845          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8846          cat >conftest.$ac_ext <<_ACEOF
8847 #line 8847 "configure"
8848 #include "confdefs.h"
8849
8850 #include <stdlib.h>
8851 #include <string.h>
8852 #include <sys/types.h>
8853
8854 int
8855 main ()
8856 {
8857
8858 #ifdef _XOPEN_SOURCE
8859 make an error
8860 #endif
8861   ;
8862   return 0;
8863 }
8864 _ACEOF
8865 rm -f conftest.$ac_objext
8866 if { (eval echo "$as_me:8866: \"$ac_compile\"") >&5
8867   (eval $ac_compile) 2>&5
8868   ac_status=$?
8869   echo "$as_me:8869: \$? = $ac_status" >&5
8870   (exit $ac_status); } &&
8871          { ac_try='test -s conftest.$ac_objext'
8872   { (eval echo "$as_me:8872: \"$ac_try\"") >&5
8873   (eval $ac_try) 2>&5
8874   ac_status=$?
8875   echo "$as_me:8875: \$? = $ac_status" >&5
8876   (exit $ac_status); }; }; then
8877   cf_cv_xopen_source=no
8878 else
8879   echo "$as_me: failed program was:" >&5
8880 cat conftest.$ac_ext >&5
8881 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8882 fi
8883 rm -f conftest.$ac_objext conftest.$ac_ext
8884         CPPFLAGS="$cf_save"
8885
8886 fi
8887 rm -f conftest.$ac_objext conftest.$ac_ext
8888
8889 fi
8890 echo "$as_me:8890: result: $cf_cv_xopen_source" >&5
8891 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8892
8893 if test "$cf_cv_xopen_source" != no ; then
8894
8895 CFLAGS=`echo "$CFLAGS" | \
8896         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8897                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8898
8899 CPPFLAGS=`echo "$CPPFLAGS" | \
8900         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8901                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8902
8903         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8904
8905 cf_fix_cppflags=no
8906 cf_new_cflags=
8907 cf_new_cppflags=
8908 cf_new_extra_cppflags=
8909
8910 for cf_add_cflags in $cf_temp_xopen_source
8911 do
8912 case $cf_fix_cppflags in
8913 (no)
8914         case $cf_add_cflags in
8915         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8916                 case $cf_add_cflags in
8917                 (-D*)
8918                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8919
8920                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8921                                 && test -z "${cf_tst_cflags}" \
8922                                 && cf_fix_cppflags=yes
8923
8924                         if test $cf_fix_cppflags = yes ; then
8925                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8926                                 continue
8927                         elif test "${cf_tst_cflags}" = "\"'" ; then
8928                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8929                                 continue
8930                         fi
8931                         ;;
8932                 esac
8933                 case "$CPPFLAGS" in
8934                 (*$cf_add_cflags)
8935                         ;;
8936                 (*)
8937                         case $cf_add_cflags in
8938                         (-D*)
8939                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8940
8941 CPPFLAGS=`echo "$CPPFLAGS" | \
8942         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8943                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8944
8945                                 ;;
8946                         esac
8947                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8948                         ;;
8949                 esac
8950                 ;;
8951         (*)
8952                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8953                 ;;
8954         esac
8955         ;;
8956 (yes)
8957         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8958
8959         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8960
8961         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8962                 && test -z "${cf_tst_cflags}" \
8963                 && cf_fix_cppflags=no
8964         ;;
8965 esac
8966 done
8967
8968 if test -n "$cf_new_cflags" ; then
8969
8970         CFLAGS="$CFLAGS $cf_new_cflags"
8971 fi
8972
8973 if test -n "$cf_new_cppflags" ; then
8974
8975         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8976 fi
8977
8978 if test -n "$cf_new_extra_cppflags" ; then
8979
8980         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8981 fi
8982
8983 fi
8984
8985         fi
8986 fi
8987
8988 CPPFLAGS_after_XOPEN="$CPPFLAGS"
8989
8990 # Work around breakage on OS X
8991
8992 echo "$as_me:8992: checking if SIGWINCH is defined" >&5
8993 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8994 if test "${cf_cv_define_sigwinch+set}" = set; then
8995   echo $ECHO_N "(cached) $ECHO_C" >&6
8996 else
8997
8998         cat >conftest.$ac_ext <<_ACEOF
8999 #line 8999 "configure"
9000 #include "confdefs.h"
9001
9002 #include <sys/types.h>
9003 #include <sys/signal.h>
9004
9005 int
9006 main ()
9007 {
9008 int x = SIGWINCH
9009   ;
9010   return 0;
9011 }
9012 _ACEOF
9013 rm -f conftest.$ac_objext
9014 if { (eval echo "$as_me:9014: \"$ac_compile\"") >&5
9015   (eval $ac_compile) 2>&5
9016   ac_status=$?
9017   echo "$as_me:9017: \$? = $ac_status" >&5
9018   (exit $ac_status); } &&
9019          { ac_try='test -s conftest.$ac_objext'
9020   { (eval echo "$as_me:9020: \"$ac_try\"") >&5
9021   (eval $ac_try) 2>&5
9022   ac_status=$?
9023   echo "$as_me:9023: \$? = $ac_status" >&5
9024   (exit $ac_status); }; }; then
9025   cf_cv_define_sigwinch=yes
9026 else
9027   echo "$as_me: failed program was:" >&5
9028 cat conftest.$ac_ext >&5
9029 cat >conftest.$ac_ext <<_ACEOF
9030 #line 9030 "configure"
9031 #include "confdefs.h"
9032
9033 #undef _XOPEN_SOURCE
9034 #undef _POSIX_SOURCE
9035 #undef _POSIX_C_SOURCE
9036 #include <sys/types.h>
9037 #include <sys/signal.h>
9038
9039 int
9040 main ()
9041 {
9042 int x = SIGWINCH
9043   ;
9044   return 0;
9045 }
9046 _ACEOF
9047 rm -f conftest.$ac_objext
9048 if { (eval echo "$as_me:9048: \"$ac_compile\"") >&5
9049   (eval $ac_compile) 2>&5
9050   ac_status=$?
9051   echo "$as_me:9051: \$? = $ac_status" >&5
9052   (exit $ac_status); } &&
9053          { ac_try='test -s conftest.$ac_objext'
9054   { (eval echo "$as_me:9054: \"$ac_try\"") >&5
9055   (eval $ac_try) 2>&5
9056   ac_status=$?
9057   echo "$as_me:9057: \$? = $ac_status" >&5
9058   (exit $ac_status); }; }; then
9059   cf_cv_define_sigwinch=maybe
9060 else
9061   echo "$as_me: failed program was:" >&5
9062 cat conftest.$ac_ext >&5
9063 cf_cv_define_sigwinch=no
9064 fi
9065 rm -f conftest.$ac_objext conftest.$ac_ext
9066
9067 fi
9068 rm -f conftest.$ac_objext conftest.$ac_ext
9069
9070 fi
9071 echo "$as_me:9071: result: $cf_cv_define_sigwinch" >&5
9072 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
9073
9074 if test "$cf_cv_define_sigwinch" = maybe ; then
9075 echo "$as_me:9075: checking for actual SIGWINCH definition" >&5
9076 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
9077 if test "${cf_cv_fixup_sigwinch+set}" = set; then
9078   echo $ECHO_N "(cached) $ECHO_C" >&6
9079 else
9080
9081 cf_cv_fixup_sigwinch=unknown
9082 cf_sigwinch=32
9083 while test $cf_sigwinch != 1
9084 do
9085         cat >conftest.$ac_ext <<_ACEOF
9086 #line 9086 "configure"
9087 #include "confdefs.h"
9088
9089 #undef _XOPEN_SOURCE
9090 #undef _POSIX_SOURCE
9091 #undef _POSIX_C_SOURCE
9092 #include <sys/types.h>
9093 #include <sys/signal.h>
9094
9095 int
9096 main ()
9097 {
9098
9099 #if SIGWINCH != $cf_sigwinch
9100 make an error
9101 #endif
9102 int x = SIGWINCH
9103   ;
9104   return 0;
9105 }
9106 _ACEOF
9107 rm -f conftest.$ac_objext
9108 if { (eval echo "$as_me:9108: \"$ac_compile\"") >&5
9109   (eval $ac_compile) 2>&5
9110   ac_status=$?
9111   echo "$as_me:9111: \$? = $ac_status" >&5
9112   (exit $ac_status); } &&
9113          { ac_try='test -s conftest.$ac_objext'
9114   { (eval echo "$as_me:9114: \"$ac_try\"") >&5
9115   (eval $ac_try) 2>&5
9116   ac_status=$?
9117   echo "$as_me:9117: \$? = $ac_status" >&5
9118   (exit $ac_status); }; }; then
9119   cf_cv_fixup_sigwinch=$cf_sigwinch
9120          break
9121 else
9122   echo "$as_me: failed program was:" >&5
9123 cat conftest.$ac_ext >&5
9124 fi
9125 rm -f conftest.$ac_objext conftest.$ac_ext
9126
9127 cf_sigwinch=`expr $cf_sigwinch - 1`
9128 done
9129
9130 fi
9131 echo "$as_me:9131: result: $cf_cv_fixup_sigwinch" >&5
9132 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
9133
9134         if test "$cf_cv_fixup_sigwinch" != unknown ; then
9135                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
9136         fi
9137 fi
9138
9139 # Checks for CODESET support.
9140
9141 echo "$as_me:9141: checking for nl_langinfo and CODESET" >&5
9142 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9143 if test "${am_cv_langinfo_codeset+set}" = set; then
9144   echo $ECHO_N "(cached) $ECHO_C" >&6
9145 else
9146   cat >conftest.$ac_ext <<_ACEOF
9147 #line 9147 "configure"
9148 #include "confdefs.h"
9149 #include <langinfo.h>
9150 int
9151 main ()
9152 {
9153 char* cs = nl_langinfo(CODESET);
9154   ;
9155   return 0;
9156 }
9157 _ACEOF
9158 rm -f conftest.$ac_objext conftest$ac_exeext
9159 if { (eval echo "$as_me:9159: \"$ac_link\"") >&5
9160   (eval $ac_link) 2>&5
9161   ac_status=$?
9162   echo "$as_me:9162: \$? = $ac_status" >&5
9163   (exit $ac_status); } &&
9164          { ac_try='test -s conftest$ac_exeext'
9165   { (eval echo "$as_me:9165: \"$ac_try\"") >&5
9166   (eval $ac_try) 2>&5
9167   ac_status=$?
9168   echo "$as_me:9168: \$? = $ac_status" >&5
9169   (exit $ac_status); }; }; then
9170   am_cv_langinfo_codeset=yes
9171 else
9172   echo "$as_me: failed program was:" >&5
9173 cat conftest.$ac_ext >&5
9174 am_cv_langinfo_codeset=no
9175 fi
9176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9177
9178 fi
9179 echo "$as_me:9179: result: $am_cv_langinfo_codeset" >&5
9180 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9181         if test $am_cv_langinfo_codeset = yes; then
9182
9183 cat >>confdefs.h <<\EOF
9184 #define HAVE_LANGINFO_CODESET 1
9185 EOF
9186
9187         fi
9188
9189 # use these variables to work around a defect in gcc's fixincludes.
9190 NCURSES_OK_WCHAR_T=
9191 NCURSES_OK_WINT_T=
9192
9193 echo "$as_me:9193: checking if you want wide-character code" >&5
9194 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
9195
9196 # Check whether --enable-widec or --disable-widec was given.
9197 if test "${enable_widec+set}" = set; then
9198   enableval="$enable_widec"
9199   with_widec=$enableval
9200 else
9201   with_widec=no
9202 fi;
9203 echo "$as_me:9203: result: $with_widec" >&5
9204 echo "${ECHO_T}$with_widec" >&6
9205 if test "x$with_widec" = xyes ; then
9206         if test "x$disable_lib_suffixes" = xno ; then
9207                 LIB_SUFFIX="w${LIB_SUFFIX}"
9208         fi
9209
9210 cat >>confdefs.h <<\EOF
9211 #define USE_WIDEC_SUPPORT 1
9212 EOF
9213
9214 cat >>confdefs.h <<\EOF
9215 #define NCURSES_WIDECHAR 1
9216 EOF
9217
9218 echo "$as_me:9218: checking if wchar.h can be used as is" >&5
9219 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
9220 if test "${cf_cv_wchar_h_okay+set}" = set; then
9221   echo $ECHO_N "(cached) $ECHO_C" >&6
9222 else
9223
9224 cat >conftest.$ac_ext <<_ACEOF
9225 #line 9225 "configure"
9226 #include "confdefs.h"
9227
9228 #include <stdlib.h>
9229 #include <wchar.h>
9230
9231 int
9232 main ()
9233 {
9234
9235         wint_t foo = 0;
9236         int bar = iswpunct(foo)
9237   ;
9238   return 0;
9239 }
9240 _ACEOF
9241 rm -f conftest.$ac_objext
9242 if { (eval echo "$as_me:9242: \"$ac_compile\"") >&5
9243   (eval $ac_compile) 2>&5
9244   ac_status=$?
9245   echo "$as_me:9245: \$? = $ac_status" >&5
9246   (exit $ac_status); } &&
9247          { ac_try='test -s conftest.$ac_objext'
9248   { (eval echo "$as_me:9248: \"$ac_try\"") >&5
9249   (eval $ac_try) 2>&5
9250   ac_status=$?
9251   echo "$as_me:9251: \$? = $ac_status" >&5
9252   (exit $ac_status); }; }; then
9253   cf_cv_wchar_h_okay=yes
9254 else
9255   echo "$as_me: failed program was:" >&5
9256 cat conftest.$ac_ext >&5
9257 cf_cv_wchar_h_okay=no
9258 fi
9259 rm -f conftest.$ac_objext conftest.$ac_ext
9260 fi
9261 echo "$as_me:9261: result: $cf_cv_wchar_h_okay" >&5
9262 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
9263
9264 if test $cf_cv_wchar_h_okay = no
9265 then
9266
9267 echo "$as_me:9267: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9268 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
9269 cat >conftest.$ac_ext <<_ACEOF
9270 #line 9270 "configure"
9271 #include "confdefs.h"
9272 #include <sys/types.h>
9273
9274 int
9275 main ()
9276 {
9277
9278 #ifndef _XOPEN_SOURCE_EXTENDED
9279 make an error
9280 #endif
9281   ;
9282   return 0;
9283 }
9284 _ACEOF
9285 rm -f conftest.$ac_objext
9286 if { (eval echo "$as_me:9286: \"$ac_compile\"") >&5
9287   (eval $ac_compile) 2>&5
9288   ac_status=$?
9289   echo "$as_me:9289: \$? = $ac_status" >&5
9290   (exit $ac_status); } &&
9291          { ac_try='test -s conftest.$ac_objext'
9292   { (eval echo "$as_me:9292: \"$ac_try\"") >&5
9293   (eval $ac_try) 2>&5
9294   ac_status=$?
9295   echo "$as_me:9295: \$? = $ac_status" >&5
9296   (exit $ac_status); }; }; then
9297   cf_result=no
9298 else
9299   echo "$as_me: failed program was:" >&5
9300 cat conftest.$ac_ext >&5
9301 cf_result=yes
9302 fi
9303 rm -f conftest.$ac_objext conftest.$ac_ext
9304 echo "$as_me:9304: result: $cf_result" >&5
9305 echo "${ECHO_T}$cf_result" >&6
9306
9307 if test "$cf_result" = yes ; then
9308         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9309 elif test "x" != "x" ; then
9310         echo "$as_me:9310: checking checking for compatible value versus " >&5
9311 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
9312         cat >conftest.$ac_ext <<_ACEOF
9313 #line 9313 "configure"
9314 #include "confdefs.h"
9315 #include <sys/types.h>
9316
9317 int
9318 main ()
9319 {
9320
9321 #if _XOPEN_SOURCE_EXTENDED- < 0
9322 make an error
9323 #endif
9324   ;
9325   return 0;
9326 }
9327 _ACEOF
9328 rm -f conftest.$ac_objext
9329 if { (eval echo "$as_me:9329: \"$ac_compile\"") >&5
9330   (eval $ac_compile) 2>&5
9331   ac_status=$?
9332   echo "$as_me:9332: \$? = $ac_status" >&5
9333   (exit $ac_status); } &&
9334          { ac_try='test -s conftest.$ac_objext'
9335   { (eval echo "$as_me:9335: \"$ac_try\"") >&5
9336   (eval $ac_try) 2>&5
9337   ac_status=$?
9338   echo "$as_me:9338: \$? = $ac_status" >&5
9339   (exit $ac_status); }; }; then
9340   cf_result=yes
9341 else
9342   echo "$as_me: failed program was:" >&5
9343 cat conftest.$ac_ext >&5
9344 cf_result=no
9345 fi
9346 rm -f conftest.$ac_objext conftest.$ac_ext
9347         echo "$as_me:9347: result: $cf_result" >&5
9348 echo "${ECHO_T}$cf_result" >&6
9349         if test "$cf_result" = no ; then
9350                 # perhaps we can override it - try...
9351                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
9352         fi
9353 fi
9354
9355 fi
9356
9357         # with_overwrite=no
9358         NCURSES_CH_T=cchar_t
9359
9360 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
9361 do
9362 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9363 echo "$as_me:9363: checking for $ac_func" >&5
9364 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9365 if eval "test \"\${$as_ac_var+set}\" = set"; then
9366   echo $ECHO_N "(cached) $ECHO_C" >&6
9367 else
9368   cat >conftest.$ac_ext <<_ACEOF
9369 #line 9369 "configure"
9370 #include "confdefs.h"
9371 /* System header to define __stub macros and hopefully few prototypes,
9372     which can conflict with char $ac_func (); below.  */
9373 #include <assert.h>
9374 /* Override any gcc2 internal prototype to avoid an error.  */
9375 #ifdef __cplusplus
9376 extern "C"
9377 #endif
9378 /* We use char because int might match the return type of a gcc2
9379    builtin and then its argument prototype would still apply.  */
9380 char $ac_func ();
9381 char (*f) ();
9382
9383 int
9384 main ()
9385 {
9386 /* The GNU C library defines this for functions which it implements
9387     to always fail with ENOSYS.  Some functions are actually named
9388     something starting with __ and the normal name is an alias.  */
9389 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9390 choke me
9391 #else
9392 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9393 #endif
9394
9395   ;
9396   return 0;
9397 }
9398 _ACEOF
9399 rm -f conftest.$ac_objext conftest$ac_exeext
9400 if { (eval echo "$as_me:9400: \"$ac_link\"") >&5
9401   (eval $ac_link) 2>&5
9402   ac_status=$?
9403   echo "$as_me:9403: \$? = $ac_status" >&5
9404   (exit $ac_status); } &&
9405          { ac_try='test -s conftest$ac_exeext'
9406   { (eval echo "$as_me:9406: \"$ac_try\"") >&5
9407   (eval $ac_try) 2>&5
9408   ac_status=$?
9409   echo "$as_me:9409: \$? = $ac_status" >&5
9410   (exit $ac_status); }; }; then
9411   eval "$as_ac_var=yes"
9412 else
9413   echo "$as_me: failed program was:" >&5
9414 cat conftest.$ac_ext >&5
9415 eval "$as_ac_var=no"
9416 fi
9417 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9418 fi
9419 echo "$as_me:9419: result: `eval echo '${'$as_ac_var'}'`" >&5
9420 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9421 if test `eval echo '${'$as_ac_var'}'` = yes; then
9422   cat >>confdefs.h <<EOF
9423 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9424 EOF
9425
9426 fi
9427 done
9428
9429         if test "x$ac_cv_func_putwc" != xyes ; then
9430
9431 echo "$as_me:9431: checking for multibyte character support" >&5
9432 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
9433 if test "${cf_cv_utf8_lib+set}" = set; then
9434   echo $ECHO_N "(cached) $ECHO_C" >&6
9435 else
9436
9437         cf_save_LIBS="$LIBS"
9438         cat >conftest.$ac_ext <<_ACEOF
9439 #line 9439 "configure"
9440 #include "confdefs.h"
9441
9442 #include <stdlib.h>
9443 int
9444 main ()
9445 {
9446 putwc(0,0);
9447   ;
9448   return 0;
9449 }
9450 _ACEOF
9451 rm -f conftest.$ac_objext conftest$ac_exeext
9452 if { (eval echo "$as_me:9452: \"$ac_link\"") >&5
9453   (eval $ac_link) 2>&5
9454   ac_status=$?
9455   echo "$as_me:9455: \$? = $ac_status" >&5
9456   (exit $ac_status); } &&
9457          { ac_try='test -s conftest$ac_exeext'
9458   { (eval echo "$as_me:9458: \"$ac_try\"") >&5
9459   (eval $ac_try) 2>&5
9460   ac_status=$?
9461   echo "$as_me:9461: \$? = $ac_status" >&5
9462   (exit $ac_status); }; }; then
9463   cf_cv_utf8_lib=yes
9464 else
9465   echo "$as_me: failed program was:" >&5
9466 cat conftest.$ac_ext >&5
9467
9468 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9469 # will be set on completion of the AC_TRY_LINK below.
9470 cf_cv_header_path_utf8=
9471 cf_cv_library_path_utf8=
9472
9473 echo "${as_me:-configure}:9473: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
9474
9475 cf_save_LIBS="$LIBS"
9476
9477 cat >conftest.$ac_ext <<_ACEOF
9478 #line 9478 "configure"
9479 #include "confdefs.h"
9480
9481 #include <libutf8.h>
9482 int
9483 main ()
9484 {
9485 putwc(0,0);
9486   ;
9487   return 0;
9488 }
9489 _ACEOF
9490 rm -f conftest.$ac_objext conftest$ac_exeext
9491 if { (eval echo "$as_me:9491: \"$ac_link\"") >&5
9492   (eval $ac_link) 2>&5
9493   ac_status=$?
9494   echo "$as_me:9494: \$? = $ac_status" >&5
9495   (exit $ac_status); } &&
9496          { ac_try='test -s conftest$ac_exeext'
9497   { (eval echo "$as_me:9497: \"$ac_try\"") >&5
9498   (eval $ac_try) 2>&5
9499   ac_status=$?
9500   echo "$as_me:9500: \$? = $ac_status" >&5
9501   (exit $ac_status); }; }; then
9502
9503         cf_cv_find_linkage_utf8=yes
9504         cf_cv_header_path_utf8=/usr/include
9505         cf_cv_library_path_utf8=/usr/lib
9506
9507 else
9508   echo "$as_me: failed program was:" >&5
9509 cat conftest.$ac_ext >&5
9510
9511 LIBS="-lutf8  $cf_save_LIBS"
9512
9513 cat >conftest.$ac_ext <<_ACEOF
9514 #line 9514 "configure"
9515 #include "confdefs.h"
9516
9517 #include <libutf8.h>
9518 int
9519 main ()
9520 {
9521 putwc(0,0);
9522   ;
9523   return 0;
9524 }
9525 _ACEOF
9526 rm -f conftest.$ac_objext conftest$ac_exeext
9527 if { (eval echo "$as_me:9527: \"$ac_link\"") >&5
9528   (eval $ac_link) 2>&5
9529   ac_status=$?
9530   echo "$as_me:9530: \$? = $ac_status" >&5
9531   (exit $ac_status); } &&
9532          { ac_try='test -s conftest$ac_exeext'
9533   { (eval echo "$as_me:9533: \"$ac_try\"") >&5
9534   (eval $ac_try) 2>&5
9535   ac_status=$?
9536   echo "$as_me:9536: \$? = $ac_status" >&5
9537   (exit $ac_status); }; }; then
9538
9539         cf_cv_find_linkage_utf8=yes
9540         cf_cv_header_path_utf8=/usr/include
9541         cf_cv_library_path_utf8=/usr/lib
9542         cf_cv_library_file_utf8="-lutf8"
9543
9544 else
9545   echo "$as_me: failed program was:" >&5
9546 cat conftest.$ac_ext >&5
9547
9548         cf_cv_find_linkage_utf8=no
9549         LIBS="$cf_save_LIBS"
9550
9551         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
9552
9553 echo "${as_me:-configure}:9553: testing find linkage for utf8 library ..." 1>&5
9554
9555 echo "${as_me:-configure}:9555: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9556
9557         cf_save_CPPFLAGS="$CPPFLAGS"
9558         cf_test_CPPFLAGS="$CPPFLAGS"
9559
9560 cf_search=
9561
9562 # collect the current set of include-directories from compiler flags
9563 cf_header_path_list=""
9564 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9565         for cf_header_path in $CPPFLAGS $CFLAGS
9566         do
9567                 case $cf_header_path in
9568                 (-I*)
9569                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9570
9571 test "x$cf_header_path" != "xNONE" && \
9572 test -d "$cf_header_path" && \
9573  {
9574         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9575         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9576         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9577         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9578         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9579         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9580 }
9581
9582                         cf_header_path_list="$cf_header_path_list $cf_search"
9583                         ;;
9584                 esac
9585         done
9586 fi
9587
9588 # add the variations for the package we are looking for
9589
9590 cf_search=
9591
9592 test "x$prefix" != "xNONE" && \
9593 test -d "$prefix" && \
9594  {
9595         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9596         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9597         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9598         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9599         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9600         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9601 }
9602
9603 for cf_subdir_prefix in \
9604         /usr \
9605         /usr/local \
9606         /usr/pkg \
9607         /opt \
9608         /opt/local \
9609         $HOME
9610 do
9611
9612 test "x$cf_subdir_prefix" != "x$prefix" && \
9613 test -d "$cf_subdir_prefix" && \
9614 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9615         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
9616         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9617         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
9618         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
9619         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
9620         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
9621 }
9622
9623 done
9624
9625 test "$includedir" != NONE && \
9626 test "$includedir" != "/usr/include" && \
9627 test -d "$includedir" && {
9628         test -d $includedir &&    cf_search="$cf_search $includedir"
9629         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9630 }
9631
9632 test "$oldincludedir" != NONE && \
9633 test "$oldincludedir" != "/usr/include" && \
9634 test -d "$oldincludedir" && {
9635         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9636         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9637 }
9638
9639 cf_search="$cf_search $cf_header_path_list"
9640
9641         for cf_cv_header_path_utf8 in $cf_search
9642         do
9643                 if test -d $cf_cv_header_path_utf8 ; then
9644                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9645
9646 echo "${as_me:-configure}:9646: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9647
9648                         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9649                         cat >conftest.$ac_ext <<_ACEOF
9650 #line 9650 "configure"
9651 #include "confdefs.h"
9652
9653 #include <libutf8.h>
9654 int
9655 main ()
9656 {
9657 putwc(0,0);
9658   ;
9659   return 0;
9660 }
9661 _ACEOF
9662 rm -f conftest.$ac_objext
9663 if { (eval echo "$as_me:9663: \"$ac_compile\"") >&5
9664   (eval $ac_compile) 2>&5
9665   ac_status=$?
9666   echo "$as_me:9666: \$? = $ac_status" >&5
9667   (exit $ac_status); } &&
9668          { ac_try='test -s conftest.$ac_objext'
9669   { (eval echo "$as_me:9669: \"$ac_try\"") >&5
9670   (eval $ac_try) 2>&5
9671   ac_status=$?
9672   echo "$as_me:9672: \$? = $ac_status" >&5
9673   (exit $ac_status); }; }; then
9674
9675                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9676
9677 echo "${as_me:-configure}:9677: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9678
9679                                 cf_cv_find_linkage_utf8=maybe
9680                                 cf_test_CPPFLAGS="$CPPFLAGS"
9681                                 break
9682 else
9683   echo "$as_me: failed program was:" >&5
9684 cat conftest.$ac_ext >&5
9685
9686                                 CPPFLAGS="$cf_save_CPPFLAGS"
9687
9688 fi
9689 rm -f conftest.$ac_objext conftest.$ac_ext
9690                 fi
9691         done
9692
9693         if test "$cf_cv_find_linkage_utf8" = maybe ; then
9694
9695 echo "${as_me:-configure}:9695: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9696
9697                 cf_save_LIBS="$LIBS"
9698                 cf_save_LDFLAGS="$LDFLAGS"
9699
9700                 if test "$cf_cv_find_linkage_utf8" != yes ; then
9701
9702 cf_search=
9703 cf_library_path_list=""
9704 if test -n "${LDFLAGS}${LIBS}" ; then
9705         for cf_library_path in $LDFLAGS $LIBS
9706         do
9707                 case $cf_library_path in
9708                 (-L*)
9709                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9710
9711 test "x$cf_library_path" != "xNONE" && \
9712 test -d "$cf_library_path" && \
9713  {
9714         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9715         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9716         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9717         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9718         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9719         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9720 }
9721
9722                         cf_library_path_list="$cf_library_path_list $cf_search"
9723                         ;;
9724                 esac
9725         done
9726 fi
9727
9728 cf_search=
9729
9730 test "x$prefix" != "xNONE" && \
9731 test -d "$prefix" && \
9732  {
9733         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9734         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9735         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9736         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9737         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9738         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9739 }
9740
9741 for cf_subdir_prefix in \
9742         /usr \
9743         /usr/local \
9744         /usr/pkg \
9745         /opt \
9746         /opt/local \
9747         $HOME
9748 do
9749
9750 test "x$cf_subdir_prefix" != "x$prefix" && \
9751 test -d "$cf_subdir_prefix" && \
9752 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9753         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
9754         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9755         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
9756         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
9757         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
9758         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
9759 }
9760
9761 done
9762
9763 cf_search="$cf_library_path_list $cf_search"
9764
9765                         for cf_cv_library_path_utf8 in $cf_search
9766                         do
9767                                 if test -d $cf_cv_library_path_utf8 ; then
9768                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
9769
9770 echo "${as_me:-configure}:9770: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9771
9772                                         CPPFLAGS="$cf_test_CPPFLAGS"
9773                                         LIBS="-lutf8  $cf_save_LIBS"
9774                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9775                                         cat >conftest.$ac_ext <<_ACEOF
9776 #line 9776 "configure"
9777 #include "confdefs.h"
9778
9779 #include <libutf8.h>
9780 int
9781 main ()
9782 {
9783 putwc(0,0);
9784   ;
9785   return 0;
9786 }
9787 _ACEOF
9788 rm -f conftest.$ac_objext conftest$ac_exeext
9789 if { (eval echo "$as_me:9789: \"$ac_link\"") >&5
9790   (eval $ac_link) 2>&5
9791   ac_status=$?
9792   echo "$as_me:9792: \$? = $ac_status" >&5
9793   (exit $ac_status); } &&
9794          { ac_try='test -s conftest$ac_exeext'
9795   { (eval echo "$as_me:9795: \"$ac_try\"") >&5
9796   (eval $ac_try) 2>&5
9797   ac_status=$?
9798   echo "$as_me:9798: \$? = $ac_status" >&5
9799   (exit $ac_status); }; }; then
9800
9801                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9802
9803 echo "${as_me:-configure}:9803: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9804
9805                                         cf_cv_find_linkage_utf8=yes
9806                                         cf_cv_library_file_utf8="-lutf8"
9807                                         break
9808 else
9809   echo "$as_me: failed program was:" >&5
9810 cat conftest.$ac_ext >&5
9811
9812                                         CPPFLAGS="$cf_save_CPPFLAGS"
9813                                         LIBS="$cf_save_LIBS"
9814                                         LDFLAGS="$cf_save_LDFLAGS"
9815
9816 fi
9817 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9818                                 fi
9819                         done
9820                         CPPFLAGS="$cf_save_CPPFLAGS"
9821                         LDFLAGS="$cf_save_LDFLAGS"
9822                 fi
9823
9824         else
9825                 cf_cv_find_linkage_utf8=no
9826         fi
9827
9828 fi
9829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9830
9831 fi
9832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9833
9834 LIBS="$cf_save_LIBS"
9835
9836 if test "$cf_cv_find_linkage_utf8" = yes ; then
9837 cf_cv_utf8_lib=add-on
9838 else
9839 cf_cv_utf8_lib=no
9840 fi
9841
9842 fi
9843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9844 fi
9845 echo "$as_me:9845: result: $cf_cv_utf8_lib" >&5
9846 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9847
9848 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9849 # ncurses/ncursesw:
9850 if test "$cf_cv_utf8_lib" = "add-on" ; then
9851
9852 cat >>confdefs.h <<\EOF
9853 #define HAVE_LIBUTF8_H 1
9854 EOF
9855
9856 if test -n "$cf_cv_header_path_utf8" ; then
9857   for cf_add_incdir in $cf_cv_header_path_utf8
9858   do
9859         while test $cf_add_incdir != /usr/include
9860         do
9861           if test -d $cf_add_incdir
9862           then
9863                 cf_have_incdir=no
9864                 if test -n "$CFLAGS$CPPFLAGS" ; then
9865                   # a loop is needed to ensure we can add subdirs of existing dirs
9866                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9867                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9868                           cf_have_incdir=yes; break
9869                         fi
9870                   done
9871                 fi
9872
9873                 if test "$cf_have_incdir" = no ; then
9874                   if test "$cf_add_incdir" = /usr/local/include ; then
9875                         if test "$GCC" = yes
9876                         then
9877                           cf_save_CPPFLAGS=$CPPFLAGS
9878                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9879                           cat >conftest.$ac_ext <<_ACEOF
9880 #line 9880 "configure"
9881 #include "confdefs.h"
9882 #include <stdio.h>
9883 int
9884 main ()
9885 {
9886 printf("Hello")
9887   ;
9888   return 0;
9889 }
9890 _ACEOF
9891 rm -f conftest.$ac_objext
9892 if { (eval echo "$as_me:9892: \"$ac_compile\"") >&5
9893   (eval $ac_compile) 2>&5
9894   ac_status=$?
9895   echo "$as_me:9895: \$? = $ac_status" >&5
9896   (exit $ac_status); } &&
9897          { ac_try='test -s conftest.$ac_objext'
9898   { (eval echo "$as_me:9898: \"$ac_try\"") >&5
9899   (eval $ac_try) 2>&5
9900   ac_status=$?
9901   echo "$as_me:9901: \$? = $ac_status" >&5
9902   (exit $ac_status); }; }; then
9903   :
9904 else
9905   echo "$as_me: failed program was:" >&5
9906 cat conftest.$ac_ext >&5
9907 cf_have_incdir=yes
9908 fi
9909 rm -f conftest.$ac_objext conftest.$ac_ext
9910                           CPPFLAGS=$cf_save_CPPFLAGS
9911                         fi
9912                   fi
9913                 fi
9914
9915                 if test "$cf_have_incdir" = no ; then
9916                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9917
9918 echo "${as_me:-configure}:9918: testing adding $cf_add_incdir to include-path ..." 1>&5
9919
9920                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9921
9922                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9923                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9924                   cf_add_incdir="$cf_top_incdir"
9925                 else
9926                   break
9927                 fi
9928           else
9929                 break
9930           fi
9931         done
9932   done
9933 fi
9934
9935 if test -n "$cf_cv_library_path_utf8" ; then
9936         for cf_add_libdir in $cf_cv_library_path_utf8
9937         do
9938                 if test $cf_add_libdir = /usr/lib ; then
9939                         :
9940                 elif test -d $cf_add_libdir
9941                 then
9942                         cf_have_libdir=no
9943                         if test -n "$LDFLAGS$LIBS" ; then
9944                                 # a loop is needed to ensure we can add subdirs of existing dirs
9945                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
9946                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9947                                                 cf_have_libdir=yes; break
9948                                         fi
9949                                 done
9950                         fi
9951                         if test "$cf_have_libdir" = no ; then
9952                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9953
9954 echo "${as_me:-configure}:9954: testing adding $cf_add_libdir to library-path ..." 1>&5
9955
9956                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9957                         fi
9958                 fi
9959         done
9960 fi
9961
9962 cf_add_libs="$cf_cv_library_file_utf8"
9963 # Filter out duplicates - this happens with badly-designed ".pc" files...
9964 for cf_add_1lib in $LIBS
9965 do
9966         for cf_add_2lib in $cf_add_libs
9967         do
9968                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9969                 then
9970                         cf_add_1lib=
9971                         break
9972                 fi
9973         done
9974         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9975 done
9976 LIBS="$cf_add_libs"
9977
9978 fi
9979
9980                 if test "$cf_cv_utf8_lib" != no ; then
9981                         NCURSES_LIBUTF8=1
9982                 fi
9983         fi
9984
9985 # This is needed on Tru64 5.0 to declare mbstate_t
9986 echo "$as_me:9986: checking if we must include wchar.h to declare mbstate_t" >&5
9987 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9988 if test "${cf_cv_mbstate_t+set}" = set; then
9989   echo $ECHO_N "(cached) $ECHO_C" >&6
9990 else
9991
9992 cat >conftest.$ac_ext <<_ACEOF
9993 #line 9993 "configure"
9994 #include "confdefs.h"
9995
9996 #include <stdlib.h>
9997 #include <stdarg.h>
9998 #include <stdio.h>
9999 #ifdef HAVE_LIBUTF8_H
10000 #include <libutf8.h>
10001 #endif
10002 int
10003 main ()
10004 {
10005 mbstate_t state
10006   ;
10007   return 0;
10008 }
10009 _ACEOF
10010 rm -f conftest.$ac_objext
10011 if { (eval echo "$as_me:10011: \"$ac_compile\"") >&5
10012   (eval $ac_compile) 2>&5
10013   ac_status=$?
10014   echo "$as_me:10014: \$? = $ac_status" >&5
10015   (exit $ac_status); } &&
10016          { ac_try='test -s conftest.$ac_objext'
10017   { (eval echo "$as_me:10017: \"$ac_try\"") >&5
10018   (eval $ac_try) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit $ac_status); }; }; then
10022   cf_cv_mbstate_t=no
10023 else
10024   echo "$as_me: failed program was:" >&5
10025 cat conftest.$ac_ext >&5
10026 cat >conftest.$ac_ext <<_ACEOF
10027 #line 10027 "configure"
10028 #include "confdefs.h"
10029
10030 #include <stdlib.h>
10031 #include <stdarg.h>
10032 #include <stdio.h>
10033 #include <wchar.h>
10034 #ifdef HAVE_LIBUTF8_H
10035 #include <libutf8.h>
10036 #endif
10037 int
10038 main ()
10039 {
10040 mbstate_t value
10041   ;
10042   return 0;
10043 }
10044 _ACEOF
10045 rm -f conftest.$ac_objext
10046 if { (eval echo "$as_me:10046: \"$ac_compile\"") >&5
10047   (eval $ac_compile) 2>&5
10048   ac_status=$?
10049   echo "$as_me:10049: \$? = $ac_status" >&5
10050   (exit $ac_status); } &&
10051          { ac_try='test -s conftest.$ac_objext'
10052   { (eval echo "$as_me:10052: \"$ac_try\"") >&5
10053   (eval $ac_try) 2>&5
10054   ac_status=$?
10055   echo "$as_me:10055: \$? = $ac_status" >&5
10056   (exit $ac_status); }; }; then
10057   cf_cv_mbstate_t=yes
10058 else
10059   echo "$as_me: failed program was:" >&5
10060 cat conftest.$ac_ext >&5
10061 cf_cv_mbstate_t=unknown
10062 fi
10063 rm -f conftest.$ac_objext conftest.$ac_ext
10064 fi
10065 rm -f conftest.$ac_objext conftest.$ac_ext
10066 fi
10067 echo "$as_me:10067: result: $cf_cv_mbstate_t" >&5
10068 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
10069
10070 if test "$cf_cv_mbstate_t" = yes ; then
10071
10072 cat >>confdefs.h <<\EOF
10073 #define NEED_WCHAR_H 1
10074 EOF
10075
10076         NEED_WCHAR_H=1
10077 fi
10078
10079 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
10080 if test "$cf_cv_mbstate_t" = unknown ; then
10081         NCURSES_MBSTATE_T=1
10082 fi
10083
10084 # This is needed on Tru64 5.0 to declare wchar_t
10085 echo "$as_me:10085: checking if we must include wchar.h to declare wchar_t" >&5
10086 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
10087 if test "${cf_cv_wchar_t+set}" = set; then
10088   echo $ECHO_N "(cached) $ECHO_C" >&6
10089 else
10090
10091 cat >conftest.$ac_ext <<_ACEOF
10092 #line 10092 "configure"
10093 #include "confdefs.h"
10094
10095 #include <stdlib.h>
10096 #include <stdarg.h>
10097 #include <stdio.h>
10098 #ifdef HAVE_LIBUTF8_H
10099 #include <libutf8.h>
10100 #endif
10101 int
10102 main ()
10103 {
10104 wchar_t state
10105   ;
10106   return 0;
10107 }
10108 _ACEOF
10109 rm -f conftest.$ac_objext
10110 if { (eval echo "$as_me:10110: \"$ac_compile\"") >&5
10111   (eval $ac_compile) 2>&5
10112   ac_status=$?
10113   echo "$as_me:10113: \$? = $ac_status" >&5
10114   (exit $ac_status); } &&
10115          { ac_try='test -s conftest.$ac_objext'
10116   { (eval echo "$as_me:10116: \"$ac_try\"") >&5
10117   (eval $ac_try) 2>&5
10118   ac_status=$?
10119   echo "$as_me:10119: \$? = $ac_status" >&5
10120   (exit $ac_status); }; }; then
10121   cf_cv_wchar_t=no
10122 else
10123   echo "$as_me: failed program was:" >&5
10124 cat conftest.$ac_ext >&5
10125 cat >conftest.$ac_ext <<_ACEOF
10126 #line 10126 "configure"
10127 #include "confdefs.h"
10128
10129 #include <stdlib.h>
10130 #include <stdarg.h>
10131 #include <stdio.h>
10132 #include <wchar.h>
10133 #ifdef HAVE_LIBUTF8_H
10134 #include <libutf8.h>
10135 #endif
10136 int
10137 main ()
10138 {
10139 wchar_t value
10140   ;
10141   return 0;
10142 }
10143 _ACEOF
10144 rm -f conftest.$ac_objext
10145 if { (eval echo "$as_me:10145: \"$ac_compile\"") >&5
10146   (eval $ac_compile) 2>&5
10147   ac_status=$?
10148   echo "$as_me:10148: \$? = $ac_status" >&5
10149   (exit $ac_status); } &&
10150          { ac_try='test -s conftest.$ac_objext'
10151   { (eval echo "$as_me:10151: \"$ac_try\"") >&5
10152   (eval $ac_try) 2>&5
10153   ac_status=$?
10154   echo "$as_me:10154: \$? = $ac_status" >&5
10155   (exit $ac_status); }; }; then
10156   cf_cv_wchar_t=yes
10157 else
10158   echo "$as_me: failed program was:" >&5
10159 cat conftest.$ac_ext >&5
10160 cf_cv_wchar_t=unknown
10161 fi
10162 rm -f conftest.$ac_objext conftest.$ac_ext
10163 fi
10164 rm -f conftest.$ac_objext conftest.$ac_ext
10165 fi
10166 echo "$as_me:10166: result: $cf_cv_wchar_t" >&5
10167 echo "${ECHO_T}$cf_cv_wchar_t" >&6
10168
10169 if test "$cf_cv_wchar_t" = yes ; then
10170
10171 cat >>confdefs.h <<\EOF
10172 #define NEED_WCHAR_H 1
10173 EOF
10174
10175         NEED_WCHAR_H=1
10176 fi
10177
10178 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10179 if test "$cf_cv_wchar_t" = unknown ; then
10180         NCURSES_WCHAR_T=1
10181 fi
10182
10183 # if we find wchar_t in either place, use substitution to provide a fallback.
10184 if test "$cf_cv_wchar_t" != unknown ; then
10185         NCURSES_OK_WCHAR_T=1
10186 fi
10187
10188 # This is needed on Tru64 5.0 to declare wint_t
10189 echo "$as_me:10189: checking if we must include wchar.h to declare wint_t" >&5
10190 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
10191 if test "${cf_cv_wint_t+set}" = set; then
10192   echo $ECHO_N "(cached) $ECHO_C" >&6
10193 else
10194
10195 cat >conftest.$ac_ext <<_ACEOF
10196 #line 10196 "configure"
10197 #include "confdefs.h"
10198
10199 #include <stdlib.h>
10200 #include <stdarg.h>
10201 #include <stdio.h>
10202 #ifdef HAVE_LIBUTF8_H
10203 #include <libutf8.h>
10204 #endif
10205 int
10206 main ()
10207 {
10208 wint_t state
10209   ;
10210   return 0;
10211 }
10212 _ACEOF
10213 rm -f conftest.$ac_objext
10214 if { (eval echo "$as_me:10214: \"$ac_compile\"") >&5
10215   (eval $ac_compile) 2>&5
10216   ac_status=$?
10217   echo "$as_me:10217: \$? = $ac_status" >&5
10218   (exit $ac_status); } &&
10219          { ac_try='test -s conftest.$ac_objext'
10220   { (eval echo "$as_me:10220: \"$ac_try\"") >&5
10221   (eval $ac_try) 2>&5
10222   ac_status=$?
10223   echo "$as_me:10223: \$? = $ac_status" >&5
10224   (exit $ac_status); }; }; then
10225   cf_cv_wint_t=no
10226 else
10227   echo "$as_me: failed program was:" >&5
10228 cat conftest.$ac_ext >&5
10229 cat >conftest.$ac_ext <<_ACEOF
10230 #line 10230 "configure"
10231 #include "confdefs.h"
10232
10233 #include <stdlib.h>
10234 #include <stdarg.h>
10235 #include <stdio.h>
10236 #include <wchar.h>
10237 #ifdef HAVE_LIBUTF8_H
10238 #include <libutf8.h>
10239 #endif
10240 int
10241 main ()
10242 {
10243 wint_t value
10244   ;
10245   return 0;
10246 }
10247 _ACEOF
10248 rm -f conftest.$ac_objext
10249 if { (eval echo "$as_me:10249: \"$ac_compile\"") >&5
10250   (eval $ac_compile) 2>&5
10251   ac_status=$?
10252   echo "$as_me:10252: \$? = $ac_status" >&5
10253   (exit $ac_status); } &&
10254          { ac_try='test -s conftest.$ac_objext'
10255   { (eval echo "$as_me:10255: \"$ac_try\"") >&5
10256   (eval $ac_try) 2>&5
10257   ac_status=$?
10258   echo "$as_me:10258: \$? = $ac_status" >&5
10259   (exit $ac_status); }; }; then
10260   cf_cv_wint_t=yes
10261 else
10262   echo "$as_me: failed program was:" >&5
10263 cat conftest.$ac_ext >&5
10264 cf_cv_wint_t=unknown
10265 fi
10266 rm -f conftest.$ac_objext conftest.$ac_ext
10267 fi
10268 rm -f conftest.$ac_objext conftest.$ac_ext
10269 fi
10270 echo "$as_me:10270: result: $cf_cv_wint_t" >&5
10271 echo "${ECHO_T}$cf_cv_wint_t" >&6
10272
10273 if test "$cf_cv_wint_t" = yes ; then
10274
10275 cat >>confdefs.h <<\EOF
10276 #define NEED_WCHAR_H 1
10277 EOF
10278
10279         NEED_WCHAR_H=1
10280 fi
10281
10282 # if we do not find wint_t in either place, use substitution to provide a fallback.
10283 if test "$cf_cv_wint_t" = unknown ; then
10284         NCURSES_WINT_T=1
10285 fi
10286
10287 # if we find wint_t in either place, use substitution to provide a fallback.
10288 if test "$cf_cv_wint_t" != unknown ; then
10289         NCURSES_OK_WINT_T=1
10290 fi
10291
10292         if test "$NCURSES_MBSTATE_T" != 0; then
10293
10294 cat >>confdefs.h <<\EOF
10295 #define NEED_MBSTATE_T_DEF 1
10296 EOF
10297
10298         fi
10299 fi
10300
10301 ###   use option --disable-lp64 to allow long chtype
10302 case $cf_cv_abi_version in
10303 ([345]*)
10304         default_with_lp64=no
10305         ;;
10306 (*)
10307         default_with_lp64=yes
10308         ;;
10309 esac
10310
10311 echo "$as_me:10311: checking whether to enable _LP64 definition in curses.h" >&5
10312 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
10313
10314 # Check whether --enable-lp64 or --disable-lp64 was given.
10315 if test "${enable_lp64+set}" = set; then
10316   enableval="$enable_lp64"
10317   with_lp64=$enableval
10318 else
10319   with_lp64=$default_with_lp64
10320 fi;
10321 echo "$as_me:10321: result: $with_lp64" >&5
10322 echo "${ECHO_T}$with_lp64" >&6
10323
10324 if test "x$with_lp64" = xyes ; then
10325         cf_cv_enable_lp64=1
10326 else
10327         cf_cv_enable_lp64=0
10328 fi
10329
10330 # Check whether --enable-largefile or --disable-largefile was given.
10331 if test "${enable_largefile+set}" = set; then
10332   enableval="$enable_largefile"
10333
10334 fi;
10335 if test "$enable_largefile" != no; then
10336
10337   echo "$as_me:10337: checking for special C compiler options needed for large files" >&5
10338 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
10339 if test "${ac_cv_sys_largefile_CC+set}" = set; then
10340   echo $ECHO_N "(cached) $ECHO_C" >&6
10341 else
10342   ac_cv_sys_largefile_CC=no
10343      if test "$GCC" != yes; then
10344        ac_save_CC=$CC
10345        while :; do
10346          # IRIX 6.2 and later do not support large files by default,
10347          # so use the C compiler's -n32 option if that helps.
10348          cat >conftest.$ac_ext <<_ACEOF
10349 #line 10349 "configure"
10350 #include "confdefs.h"
10351 #include <sys/types.h>
10352  /* Check that off_t can represent 2**63 - 1 correctly.
10353     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10354     since some C++ compilers masquerading as C compilers
10355     incorrectly reject 9223372036854775807.  */
10356 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10357   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10358                        && LARGE_OFF_T % 2147483647 == 1)
10359                       ? 1 : -1];
10360 int
10361 main ()
10362 {
10363
10364   ;
10365   return 0;
10366 }
10367 _ACEOF
10368          rm -f conftest.$ac_objext
10369 if { (eval echo "$as_me:10369: \"$ac_compile\"") >&5
10370   (eval $ac_compile) 2>&5
10371   ac_status=$?
10372   echo "$as_me:10372: \$? = $ac_status" >&5
10373   (exit $ac_status); } &&
10374          { ac_try='test -s conftest.$ac_objext'
10375   { (eval echo "$as_me:10375: \"$ac_try\"") >&5
10376   (eval $ac_try) 2>&5
10377   ac_status=$?
10378   echo "$as_me:10378: \$? = $ac_status" >&5
10379   (exit $ac_status); }; }; then
10380   break
10381 else
10382   echo "$as_me: failed program was:" >&5
10383 cat conftest.$ac_ext >&5
10384 fi
10385 rm -f conftest.$ac_objext
10386          CC="$CC -n32"
10387          rm -f conftest.$ac_objext
10388 if { (eval echo "$as_me:10388: \"$ac_compile\"") >&5
10389   (eval $ac_compile) 2>&5
10390   ac_status=$?
10391   echo "$as_me:10391: \$? = $ac_status" >&5
10392   (exit $ac_status); } &&
10393          { ac_try='test -s conftest.$ac_objext'
10394   { (eval echo "$as_me:10394: \"$ac_try\"") >&5
10395   (eval $ac_try) 2>&5
10396   ac_status=$?
10397   echo "$as_me:10397: \$? = $ac_status" >&5
10398   (exit $ac_status); }; }; then
10399   ac_cv_sys_largefile_CC=' -n32'; break
10400 else
10401   echo "$as_me: failed program was:" >&5
10402 cat conftest.$ac_ext >&5
10403 fi
10404 rm -f conftest.$ac_objext
10405          break
10406        done
10407        CC=$ac_save_CC
10408        rm -f conftest.$ac_ext
10409     fi
10410 fi
10411 echo "$as_me:10411: result: $ac_cv_sys_largefile_CC" >&5
10412 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
10413   if test "$ac_cv_sys_largefile_CC" != no; then
10414     CC=$CC$ac_cv_sys_largefile_CC
10415   fi
10416
10417   echo "$as_me:10417: checking for _FILE_OFFSET_BITS value needed for large files" >&5
10418 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
10419 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
10420   echo $ECHO_N "(cached) $ECHO_C" >&6
10421 else
10422   while :; do
10423   ac_cv_sys_file_offset_bits=no
10424   cat >conftest.$ac_ext <<_ACEOF
10425 #line 10425 "configure"
10426 #include "confdefs.h"
10427 #include <sys/types.h>
10428  /* Check that off_t can represent 2**63 - 1 correctly.
10429     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10430     since some C++ compilers masquerading as C compilers
10431     incorrectly reject 9223372036854775807.  */
10432 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10433   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10434                        && LARGE_OFF_T % 2147483647 == 1)
10435                       ? 1 : -1];
10436 int
10437 main ()
10438 {
10439
10440   ;
10441   return 0;
10442 }
10443 _ACEOF
10444 rm -f conftest.$ac_objext
10445 if { (eval echo "$as_me:10445: \"$ac_compile\"") >&5
10446   (eval $ac_compile) 2>&5
10447   ac_status=$?
10448   echo "$as_me:10448: \$? = $ac_status" >&5
10449   (exit $ac_status); } &&
10450          { ac_try='test -s conftest.$ac_objext'
10451   { (eval echo "$as_me:10451: \"$ac_try\"") >&5
10452   (eval $ac_try) 2>&5
10453   ac_status=$?
10454   echo "$as_me:10454: \$? = $ac_status" >&5
10455   (exit $ac_status); }; }; then
10456   break
10457 else
10458   echo "$as_me: failed program was:" >&5
10459 cat conftest.$ac_ext >&5
10460 fi
10461 rm -f conftest.$ac_objext conftest.$ac_ext
10462   cat >conftest.$ac_ext <<_ACEOF
10463 #line 10463 "configure"
10464 #include "confdefs.h"
10465 #define _FILE_OFFSET_BITS 64
10466 #include <sys/types.h>
10467  /* Check that off_t can represent 2**63 - 1 correctly.
10468     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10469     since some C++ compilers masquerading as C compilers
10470     incorrectly reject 9223372036854775807.  */
10471 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10472   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10473                        && LARGE_OFF_T % 2147483647 == 1)
10474                       ? 1 : -1];
10475 int
10476 main ()
10477 {
10478
10479   ;
10480   return 0;
10481 }
10482 _ACEOF
10483 rm -f conftest.$ac_objext
10484 if { (eval echo "$as_me:10484: \"$ac_compile\"") >&5
10485   (eval $ac_compile) 2>&5
10486   ac_status=$?
10487   echo "$as_me:10487: \$? = $ac_status" >&5
10488   (exit $ac_status); } &&
10489          { ac_try='test -s conftest.$ac_objext'
10490   { (eval echo "$as_me:10490: \"$ac_try\"") >&5
10491   (eval $ac_try) 2>&5
10492   ac_status=$?
10493   echo "$as_me:10493: \$? = $ac_status" >&5
10494   (exit $ac_status); }; }; then
10495   ac_cv_sys_file_offset_bits=64; break
10496 else
10497   echo "$as_me: failed program was:" >&5
10498 cat conftest.$ac_ext >&5
10499 fi
10500 rm -f conftest.$ac_objext conftest.$ac_ext
10501   break
10502 done
10503 fi
10504 echo "$as_me:10504: result: $ac_cv_sys_file_offset_bits" >&5
10505 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10506 if test "$ac_cv_sys_file_offset_bits" != no; then
10507
10508 cat >>confdefs.h <<EOF
10509 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10510 EOF
10511
10512 fi
10513 rm -rf conftest*
10514   echo "$as_me:10514: checking for _LARGE_FILES value needed for large files" >&5
10515 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10516 if test "${ac_cv_sys_large_files+set}" = set; then
10517   echo $ECHO_N "(cached) $ECHO_C" >&6
10518 else
10519   while :; do
10520   ac_cv_sys_large_files=no
10521   cat >conftest.$ac_ext <<_ACEOF
10522 #line 10522 "configure"
10523 #include "confdefs.h"
10524 #include <sys/types.h>
10525  /* Check that off_t can represent 2**63 - 1 correctly.
10526     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10527     since some C++ compilers masquerading as C compilers
10528     incorrectly reject 9223372036854775807.  */
10529 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10530   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10531                        && LARGE_OFF_T % 2147483647 == 1)
10532                       ? 1 : -1];
10533 int
10534 main ()
10535 {
10536
10537   ;
10538   return 0;
10539 }
10540 _ACEOF
10541 rm -f conftest.$ac_objext
10542 if { (eval echo "$as_me:10542: \"$ac_compile\"") >&5
10543   (eval $ac_compile) 2>&5
10544   ac_status=$?
10545   echo "$as_me:10545: \$? = $ac_status" >&5
10546   (exit $ac_status); } &&
10547          { ac_try='test -s conftest.$ac_objext'
10548   { (eval echo "$as_me:10548: \"$ac_try\"") >&5
10549   (eval $ac_try) 2>&5
10550   ac_status=$?
10551   echo "$as_me:10551: \$? = $ac_status" >&5
10552   (exit $ac_status); }; }; then
10553   break
10554 else
10555   echo "$as_me: failed program was:" >&5
10556 cat conftest.$ac_ext >&5
10557 fi
10558 rm -f conftest.$ac_objext conftest.$ac_ext
10559   cat >conftest.$ac_ext <<_ACEOF
10560 #line 10560 "configure"
10561 #include "confdefs.h"
10562 #define _LARGE_FILES 1
10563 #include <sys/types.h>
10564  /* Check that off_t can represent 2**63 - 1 correctly.
10565     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10566     since some C++ compilers masquerading as C compilers
10567     incorrectly reject 9223372036854775807.  */
10568 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10569   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10570                        && LARGE_OFF_T % 2147483647 == 1)
10571                       ? 1 : -1];
10572 int
10573 main ()
10574 {
10575
10576   ;
10577   return 0;
10578 }
10579 _ACEOF
10580 rm -f conftest.$ac_objext
10581 if { (eval echo "$as_me:10581: \"$ac_compile\"") >&5
10582   (eval $ac_compile) 2>&5
10583   ac_status=$?
10584   echo "$as_me:10584: \$? = $ac_status" >&5
10585   (exit $ac_status); } &&
10586          { ac_try='test -s conftest.$ac_objext'
10587   { (eval echo "$as_me:10587: \"$ac_try\"") >&5
10588   (eval $ac_try) 2>&5
10589   ac_status=$?
10590   echo "$as_me:10590: \$? = $ac_status" >&5
10591   (exit $ac_status); }; }; then
10592   ac_cv_sys_large_files=1; break
10593 else
10594   echo "$as_me: failed program was:" >&5
10595 cat conftest.$ac_ext >&5
10596 fi
10597 rm -f conftest.$ac_objext conftest.$ac_ext
10598   break
10599 done
10600 fi
10601 echo "$as_me:10601: result: $ac_cv_sys_large_files" >&5
10602 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10603 if test "$ac_cv_sys_large_files" != no; then
10604
10605 cat >>confdefs.h <<EOF
10606 #define _LARGE_FILES $ac_cv_sys_large_files
10607 EOF
10608
10609 fi
10610 rm -rf conftest*
10611 fi
10612
10613         if test "$enable_largefile" != no ; then
10614         echo "$as_me:10614: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10615 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10616 if test "${ac_cv_sys_largefile_source+set}" = set; then
10617   echo $ECHO_N "(cached) $ECHO_C" >&6
10618 else
10619   while :; do
10620   ac_cv_sys_largefile_source=no
10621   cat >conftest.$ac_ext <<_ACEOF
10622 #line 10622 "configure"
10623 #include "confdefs.h"
10624 #include <stdio.h>
10625 int
10626 main ()
10627 {
10628 return !fseeko;
10629   ;
10630   return 0;
10631 }
10632 _ACEOF
10633 rm -f conftest.$ac_objext
10634 if { (eval echo "$as_me:10634: \"$ac_compile\"") >&5
10635   (eval $ac_compile) 2>&5
10636   ac_status=$?
10637   echo "$as_me:10637: \$? = $ac_status" >&5
10638   (exit $ac_status); } &&
10639          { ac_try='test -s conftest.$ac_objext'
10640   { (eval echo "$as_me:10640: \"$ac_try\"") >&5
10641   (eval $ac_try) 2>&5
10642   ac_status=$?
10643   echo "$as_me:10643: \$? = $ac_status" >&5
10644   (exit $ac_status); }; }; then
10645   break
10646 else
10647   echo "$as_me: failed program was:" >&5
10648 cat conftest.$ac_ext >&5
10649 fi
10650 rm -f conftest.$ac_objext conftest.$ac_ext
10651   cat >conftest.$ac_ext <<_ACEOF
10652 #line 10652 "configure"
10653 #include "confdefs.h"
10654 #define _LARGEFILE_SOURCE 1
10655 #include <stdio.h>
10656 int
10657 main ()
10658 {
10659 return !fseeko;
10660   ;
10661   return 0;
10662 }
10663 _ACEOF
10664 rm -f conftest.$ac_objext
10665 if { (eval echo "$as_me:10665: \"$ac_compile\"") >&5
10666   (eval $ac_compile) 2>&5
10667   ac_status=$?
10668   echo "$as_me:10668: \$? = $ac_status" >&5
10669   (exit $ac_status); } &&
10670          { ac_try='test -s conftest.$ac_objext'
10671   { (eval echo "$as_me:10671: \"$ac_try\"") >&5
10672   (eval $ac_try) 2>&5
10673   ac_status=$?
10674   echo "$as_me:10674: \$? = $ac_status" >&5
10675   (exit $ac_status); }; }; then
10676   ac_cv_sys_largefile_source=1; break
10677 else
10678   echo "$as_me: failed program was:" >&5
10679 cat conftest.$ac_ext >&5
10680 fi
10681 rm -f conftest.$ac_objext conftest.$ac_ext
10682   break
10683 done
10684 fi
10685 echo "$as_me:10685: result: $ac_cv_sys_largefile_source" >&5
10686 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10687 if test "$ac_cv_sys_largefile_source" != no; then
10688
10689 cat >>confdefs.h <<EOF
10690 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10691 EOF
10692
10693 fi
10694 rm -rf conftest*
10695
10696 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10697 # in glibc 2.1.3, but that breaks too many other things.
10698 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10699 echo "$as_me:10699: checking for fseeko" >&5
10700 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10701 if test "${ac_cv_func_fseeko+set}" = set; then
10702   echo $ECHO_N "(cached) $ECHO_C" >&6
10703 else
10704   cat >conftest.$ac_ext <<_ACEOF
10705 #line 10705 "configure"
10706 #include "confdefs.h"
10707 #include <stdio.h>
10708 int
10709 main ()
10710 {
10711 return fseeko && fseeko (stdin, 0, 0);
10712   ;
10713   return 0;
10714 }
10715 _ACEOF
10716 rm -f conftest.$ac_objext conftest$ac_exeext
10717 if { (eval echo "$as_me:10717: \"$ac_link\"") >&5
10718   (eval $ac_link) 2>&5
10719   ac_status=$?
10720   echo "$as_me:10720: \$? = $ac_status" >&5
10721   (exit $ac_status); } &&
10722          { ac_try='test -s conftest$ac_exeext'
10723   { (eval echo "$as_me:10723: \"$ac_try\"") >&5
10724   (eval $ac_try) 2>&5
10725   ac_status=$?
10726   echo "$as_me:10726: \$? = $ac_status" >&5
10727   (exit $ac_status); }; }; then
10728   ac_cv_func_fseeko=yes
10729 else
10730   echo "$as_me: failed program was:" >&5
10731 cat conftest.$ac_ext >&5
10732 ac_cv_func_fseeko=no
10733 fi
10734 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10735 fi
10736 echo "$as_me:10736: result: $ac_cv_func_fseeko" >&5
10737 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10738 if test $ac_cv_func_fseeko = yes; then
10739
10740 cat >>confdefs.h <<\EOF
10741 #define HAVE_FSEEKO 1
10742 EOF
10743
10744 fi
10745
10746         # Normally we would collect these definitions in the config.h,
10747         # but (like _XOPEN_SOURCE), some environments rely on having these
10748         # defined before any of the system headers are included.  Another
10749         # case comes up with C++, e.g., on AIX the compiler compiles the
10750         # header files by themselves before looking at the body files it is
10751         # told to compile.  For ncurses, those header files do not include
10752         # the config.h
10753         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10754         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10755         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10756
10757         echo "$as_me:10757: checking whether to use struct dirent64" >&5
10758 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10759 if test "${cf_cv_struct_dirent64+set}" = set; then
10760   echo $ECHO_N "(cached) $ECHO_C" >&6
10761 else
10762
10763                 cat >conftest.$ac_ext <<_ACEOF
10764 #line 10764 "configure"
10765 #include "confdefs.h"
10766
10767 #include <sys/types.h>
10768 #include <dirent.h>
10769
10770 int
10771 main ()
10772 {
10773
10774                 /* if transitional largefile support is setup, this is true */
10775                 extern struct dirent64 * readdir(DIR *);
10776                 struct dirent64 *x = readdir((DIR *)0);
10777                 struct dirent *y = readdir((DIR *)0);
10778                 int z = x - y;
10779
10780   ;
10781   return 0;
10782 }
10783 _ACEOF
10784 rm -f conftest.$ac_objext
10785 if { (eval echo "$as_me:10785: \"$ac_compile\"") >&5
10786   (eval $ac_compile) 2>&5
10787   ac_status=$?
10788   echo "$as_me:10788: \$? = $ac_status" >&5
10789   (exit $ac_status); } &&
10790          { ac_try='test -s conftest.$ac_objext'
10791   { (eval echo "$as_me:10791: \"$ac_try\"") >&5
10792   (eval $ac_try) 2>&5
10793   ac_status=$?
10794   echo "$as_me:10794: \$? = $ac_status" >&5
10795   (exit $ac_status); }; }; then
10796   cf_cv_struct_dirent64=yes
10797 else
10798   echo "$as_me: failed program was:" >&5
10799 cat conftest.$ac_ext >&5
10800 cf_cv_struct_dirent64=no
10801 fi
10802 rm -f conftest.$ac_objext conftest.$ac_ext
10803
10804 fi
10805 echo "$as_me:10805: result: $cf_cv_struct_dirent64" >&5
10806 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10807         test "$cf_cv_struct_dirent64" = yes &&
10808 cat >>confdefs.h <<\EOF
10809 #define HAVE_STRUCT_DIRENT64 1
10810 EOF
10811
10812         fi
10813
10814 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10815 echo "$as_me:10815: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10816 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10817
10818 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10819 if test "${enable_tparm_varargs+set}" = set; then
10820   enableval="$enable_tparm_varargs"
10821   with_tparm_varargs=$enableval
10822 else
10823   with_tparm_varargs=yes
10824 fi;
10825 echo "$as_me:10825: result: $with_tparm_varargs" >&5
10826 echo "${ECHO_T}$with_tparm_varargs" >&6
10827 NCURSES_TPARM_VARARGS=0
10828 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10829
10830 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10831 if test "$with_ticlib" != no ; then
10832 echo "$as_me:10832: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10833 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10834
10835 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10836 if test "${enable_tic_depends+set}" = set; then
10837   enableval="$enable_tic_depends"
10838   with_tic_depends=$enableval
10839 else
10840   with_tic_depends=yes
10841 fi;
10842 echo "$as_me:10842: result: $with_tic_depends" >&5
10843 echo "${ECHO_T}$with_tic_depends" >&6
10844 else
10845         with_tic_depends=no
10846 fi
10847
10848 ###   use option --with-bool to override bool's type
10849 echo "$as_me:10849: checking for type of bool" >&5
10850 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10851
10852 # Check whether --with-bool or --without-bool was given.
10853 if test "${with_bool+set}" = set; then
10854   withval="$with_bool"
10855   NCURSES_BOOL="$withval"
10856 else
10857   NCURSES_BOOL=auto
10858 fi;
10859 echo "$as_me:10859: result: $NCURSES_BOOL" >&5
10860 echo "${ECHO_T}$NCURSES_BOOL" >&6
10861
10862 echo "$as_me:10862: checking for alternate terminal capabilities file" >&5
10863 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10864
10865 # Check whether --with-caps or --without-caps was given.
10866 if test "${with_caps+set}" = set; then
10867   withval="$with_caps"
10868   TERMINFO_CAPS=Caps.$withval
10869 else
10870   TERMINFO_CAPS=Caps
10871 fi;
10872 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10873 echo "$as_me:10873: result: $TERMINFO_CAPS" >&5
10874 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10875
10876 ###   use option --with-chtype to override chtype's type
10877 echo "$as_me:10877: checking for type of chtype" >&5
10878 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10879
10880 # Check whether --with-chtype or --without-chtype was given.
10881 if test "${with_chtype+set}" = set; then
10882   withval="$with_chtype"
10883   NCURSES_CHTYPE="$withval"
10884 else
10885   NCURSES_CHTYPE=$cf_dft_chtype
10886 fi;
10887 echo "$as_me:10887: result: $NCURSES_CHTYPE" >&5
10888 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10889
10890 ###   use option --with-ospeed to override ospeed's type
10891 echo "$as_me:10891: checking for type of ospeed" >&5
10892 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10893
10894 # Check whether --with-ospeed or --without-ospeed was given.
10895 if test "${with_ospeed+set}" = set; then
10896   withval="$with_ospeed"
10897   NCURSES_OSPEED="$withval"
10898 else
10899   NCURSES_OSPEED=short
10900 fi;
10901 echo "$as_me:10901: result: $NCURSES_OSPEED" >&5
10902 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10903
10904 ###   use option --with-mmask-t to override mmask_t's type
10905 echo "$as_me:10905: checking for type of mmask_t" >&5
10906 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10907
10908 # Check whether --with-mmask-t or --without-mmask-t was given.
10909 if test "${with_mmask_t+set}" = set; then
10910   withval="$with_mmask_t"
10911   NCURSES_MMASK_T="$withval"
10912 else
10913   NCURSES_MMASK_T=$cf_dft_mmask_t
10914 fi;
10915 echo "$as_me:10915: result: $NCURSES_MMASK_T" >&5
10916 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10917
10918 ###   use option --with-ccharw-max to override CCHARW_MAX size
10919 echo "$as_me:10919: checking for size CCHARW_MAX" >&5
10920 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10921
10922 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10923 if test "${with_ccharw_max+set}" = set; then
10924   withval="$with_ccharw_max"
10925   NCURSES_CCHARW_MAX="$withval"
10926 else
10927   NCURSES_CCHARW_MAX=5
10928 fi;
10929 echo "$as_me:10929: result: $NCURSES_CCHARW_MAX" >&5
10930 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10931
10932 ###   use option --with-tparm-arg to override tparm's argument type
10933 echo "$as_me:10933: checking for type of tparm args" >&5
10934 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10935
10936 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10937 if test "${with_tparm_arg+set}" = set; then
10938   withval="$with_tparm_arg"
10939   NCURSES_TPARM_ARG="$withval"
10940 else
10941   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
10942 fi;
10943 echo "$as_me:10943: result: $NCURSES_TPARM_ARG" >&5
10944 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10945
10946 ### Enable compiling-in rcs id's
10947 echo "$as_me:10947: checking if RCS identifiers should be compiled-in" >&5
10948 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10949
10950 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10951 if test "${with_rcs_ids+set}" = set; then
10952   withval="$with_rcs_ids"
10953   with_rcs_ids=$withval
10954 else
10955   with_rcs_ids=no
10956 fi;
10957 echo "$as_me:10957: result: $with_rcs_ids" >&5
10958 echo "${ECHO_T}$with_rcs_ids" >&6
10959 test "x$with_rcs_ids" = xyes &&
10960 cat >>confdefs.h <<\EOF
10961 #define USE_RCS_IDS 1
10962 EOF
10963
10964 ###############################################################################
10965
10966 echo "$as_me:10966: checking format of man-pages" >&5
10967 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10968
10969 # Check whether --with-manpage-format or --without-manpage-format was given.
10970 if test "${with_manpage_format+set}" = set; then
10971   withval="$with_manpage_format"
10972   MANPAGE_FORMAT=$withval
10973 else
10974   MANPAGE_FORMAT=unknown
10975 fi;
10976
10977 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10978 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10979
10980 cf_unknown=
10981
10982 case $MANPAGE_FORMAT in
10983 (unknown)
10984         if test -z "$MANPATH" ; then
10985                 MANPATH="/usr/man:/usr/share/man"
10986         fi
10987
10988         # look for the 'date' man-page (it's most likely to be installed!)
10989         MANPAGE_FORMAT=
10990         cf_preform=no
10991         cf_catonly=yes
10992         cf_example=date
10993
10994         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10995         for cf_dir in $MANPATH; do
10996                 test -z "$cf_dir" && cf_dir=/usr/man
10997                 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
10998                 do
10999                         cf_test=`echo $cf_name | sed -e 's/*//'`
11000                         if test "x$cf_test" = "x$cf_name" ; then
11001
11002                                 case "$cf_name" in
11003                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
11004                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
11005                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
11006                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
11007                                 esac
11008
11009                                 case "$cf_name" in
11010                                 ($cf_dir/man*)
11011                                         cf_catonly=no
11012                                         ;;
11013                                 ($cf_dir/cat*)
11014                                         cf_preform=yes
11015                                         ;;
11016                                 esac
11017                                 break
11018                         fi
11019
11020                         # if we found a match in either man* or cat*, stop looking
11021                         if test -n "$MANPAGE_FORMAT" ; then
11022                                 cf_found=no
11023                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
11024                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
11025                                 case "$cf_name" in
11026                                 ($cf_dir/cat*)
11027                                         cf_found=yes
11028                                         ;;
11029                                 esac
11030                                 test $cf_found=yes && break
11031                         fi
11032                 done
11033                 # only check the first directory in $MANPATH where we find manpages
11034                 if test -n "$MANPAGE_FORMAT" ; then
11035                         break
11036                 fi
11037         done
11038         # if we did not find the example, just assume it is normal
11039         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
11040         IFS="$ac_save_ifs"
11041         ;;
11042 (*)
11043         for cf_option in $MANPAGE_FORMAT; do
11044         case $cf_option in
11045         (gzip|compress|BSDI|normal|formatted|catonly)
11046                 ;;
11047         (*)
11048                 cf_unknown="$cf_unknown $cf_option"
11049                 ;;
11050         esac
11051         done
11052         ;;
11053 esac
11054
11055 echo "$as_me:11055: result: $MANPAGE_FORMAT" >&5
11056 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
11057 if test -n "$cf_unknown" ; then
11058         { echo "$as_me:11058: WARNING: Unexpected manpage-format $cf_unknown" >&5
11059 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
11060 fi
11061
11062 echo "$as_me:11062: checking for manpage renaming" >&5
11063 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
11064
11065 # Check whether --with-manpage-renames or --without-manpage-renames was given.
11066 if test "${with_manpage_renames+set}" = set; then
11067   withval="$with_manpage_renames"
11068   MANPAGE_RENAMES=$withval
11069 else
11070   MANPAGE_RENAMES=yes
11071 fi;
11072
11073 case ".$MANPAGE_RENAMES" in
11074 (.no)
11075         ;;
11076 (.|.yes)
11077         # Debian 'man' program?
11078         if test -f /etc/debian_version ; then
11079                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
11080         else
11081                 MANPAGE_RENAMES=no
11082         fi
11083         ;;
11084 esac
11085
11086 if test "$MANPAGE_RENAMES" != no ; then
11087         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
11088                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
11089         elif test ! -f $MANPAGE_RENAMES ; then
11090                 { { echo "$as_me:11090: error: not a filename: $MANPAGE_RENAMES" >&5
11091 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
11092    { (exit 1); exit 1; }; }
11093         fi
11094
11095         test ! -d man && mkdir man
11096
11097         # Construct a sed-script to perform renaming within man-pages
11098         if test -n "$MANPAGE_RENAMES" ; then
11099                 test ! -d man && mkdir man
11100                 sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
11101         fi
11102 fi
11103
11104 echo "$as_me:11104: result: $MANPAGE_RENAMES" >&5
11105 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
11106
11107 echo "$as_me:11107: checking if manpage aliases will be installed" >&5
11108 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
11109
11110 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
11111 if test "${with_manpage_aliases+set}" = set; then
11112   withval="$with_manpage_aliases"
11113   MANPAGE_ALIASES=$withval
11114 else
11115   MANPAGE_ALIASES=yes
11116 fi;
11117
11118 echo "$as_me:11118: result: $MANPAGE_ALIASES" >&5
11119 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
11120
11121 case "x$LN_S" in
11122 (xln*)
11123         cf_use_symlinks=yes
11124         ;;
11125 (*)
11126         cf_use_symlinks=no
11127         ;;
11128 esac
11129
11130 MANPAGE_SYMLINKS=no
11131 if test "$MANPAGE_ALIASES" = yes ; then
11132 echo "$as_me:11132: checking if manpage symlinks should be used" >&5
11133 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
11134
11135 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
11136 if test "${with_manpage_symlinks+set}" = set; then
11137   withval="$with_manpage_symlinks"
11138   MANPAGE_SYMLINKS=$withval
11139 else
11140   MANPAGE_SYMLINKS=$cf_use_symlinks
11141 fi;
11142
11143 if test "$$cf_use_symlinks" = no; then
11144 if test "$MANPAGE_SYMLINKS" = yes ; then
11145         { echo "$as_me:11145: WARNING: cannot make symlinks" >&5
11146 echo "$as_me: WARNING: cannot make symlinks" >&2;}
11147         MANPAGE_SYMLINKS=no
11148 fi
11149 fi
11150
11151 echo "$as_me:11151: result: $MANPAGE_SYMLINKS" >&5
11152 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
11153 fi
11154
11155 echo "$as_me:11155: checking for manpage tbl" >&5
11156 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
11157
11158 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
11159 if test "${with_manpage_tbl+set}" = set; then
11160   withval="$with_manpage_tbl"
11161   MANPAGE_TBL=$withval
11162 else
11163   MANPAGE_TBL=no
11164 fi;
11165
11166 echo "$as_me:11166: result: $MANPAGE_TBL" >&5
11167 echo "${ECHO_T}$MANPAGE_TBL" >&6
11168
11169 if test "$prefix" = "NONE" ; then
11170         cf_prefix="$ac_default_prefix"
11171 else
11172         cf_prefix="$prefix"
11173 fi
11174
11175 case "$MANPAGE_FORMAT" in
11176 (*catonly*)
11177         cf_format=yes
11178         cf_inboth=no
11179         ;;
11180 (*formatted*)
11181         cf_format=yes
11182         cf_inboth=yes
11183         ;;
11184 (*)
11185         cf_format=no
11186         cf_inboth=no
11187         ;;
11188 esac
11189
11190 test ! -d man && mkdir man
11191
11192 cf_so_strip=
11193 cf_compress=
11194 case "$MANPAGE_FORMAT" in
11195 (*compress*)
11196         cf_so_strip="Z"
11197         cf_compress=compress
11198         ;;
11199 (*gzip*)
11200         cf_so_strip="gz"
11201         cf_compress=gzip
11202         ;;
11203 esac
11204
11205 cf_edit_man=./edit_man.sh
11206 cf_man_alias=`pwd`/man_alias.sed
11207
11208 cat >$cf_edit_man <<CF_EOF
11209 #! /bin/sh
11210 # this script is generated by the configure-script CF_MAN_PAGES macro.
11211
11212 prefix="$cf_prefix"
11213 datarootdir="$datarootdir"
11214 datadir="$datadir"
11215
11216 NCURSES_MAJOR="$NCURSES_MAJOR"
11217 NCURSES_MINOR="$NCURSES_MINOR"
11218 NCURSES_PATCH="$NCURSES_PATCH"
11219
11220 NCURSES_OSPEED="$NCURSES_OSPEED"
11221 TERMINFO="$TERMINFO"
11222
11223 INSTALL="$INSTALL"
11224 INSTALL_DATA="$INSTALL_DATA"
11225
11226 transform="$program_transform_name"
11227
11228 TMP=\${TMPDIR:=/tmp}/man\$\$
11229 trap "rm -f \$TMP" 0 1 2 5 15
11230
11231 form=\$1
11232 shift || exit 1
11233
11234 verb=\$1
11235 shift || exit 1
11236
11237 mandir=\$1
11238 shift || exit 1
11239
11240 srcdir=\$1
11241 top_srcdir=\$srcdir/..
11242 shift || exit 1
11243
11244 if test "\$form" = normal ; then
11245         if test "$cf_format" = yes ; then
11246         if test "$cf_inboth" = no ; then
11247                 sh \$0 format \$verb \$mandir \$srcdir \$*
11248                 exit $?
11249         fi
11250         fi
11251         cf_subdir=\$mandir/man
11252         cf_tables=$MANPAGE_TBL
11253 else
11254         cf_subdir=\$mandir/cat
11255         cf_tables=yes
11256 fi
11257
11258 # process the list of source-files
11259 for i in \$* ; do
11260 case \$i in
11261 (*.orig|*.rej) ;;
11262 (*.[0-9]*)
11263         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
11264         if test \$verb = installing ; then
11265         if test ! -d \$cf_subdir\${section} ; then
11266                 mkdir -p \$cf_subdir\$section
11267         fi
11268         fi
11269
11270         # replace variables in man page
11271         if test ! -f $cf_man_alias ; then
11272 cat >>$cf_man_alias <<-CF_EOF2
11273                 s,@DATADIR@,\$datadir,g
11274                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
11275                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
11276                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
11277                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
11278                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
11279                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
11280 CF_EOF
11281
11282         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
11283         do
11284                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11285                 cf_name=`echo $cf_name|sed "$program_transform_name"`
11286 cat >>$cf_edit_man <<-CF_EOF
11287                 s,@$cf_NAME@,$cf_name,g
11288 CF_EOF
11289         done
11290
11291 cat >>$cf_edit_man <<CF_EOF
11292 CF_EOF2
11293                 echo "...made $cf_man_alias"
11294         fi
11295
11296         aliases=
11297         cf_source=\`basename \$i\`
11298         inalias=\$cf_source
11299         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
11300         if test ! -f \$inalias ; then
11301                 echo .. skipped \$cf_source
11302                 continue
11303         fi
11304 CF_EOF
11305
11306 if test "$MANPAGE_ALIASES" != no ; then
11307 cat >>$cf_edit_man <<CF_EOF
11308         nCurses=ignore.3x
11309         test $with_curses_h = yes && nCurses=ncurses.3x
11310         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
11311 CF_EOF
11312 fi
11313
11314 if test "$MANPAGE_RENAMES" = no ; then
11315 cat >>$cf_edit_man <<CF_EOF
11316         # perform program transformations for section 1 man pages
11317         if test \$section = 1 ; then
11318                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
11319         else
11320                 cf_target=\$cf_subdir\${section}/\$cf_source
11321         fi
11322 CF_EOF
11323 else
11324 cat >>$cf_edit_man <<CF_EOF
11325         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
11326         if test -z "\$cf_target" ; then
11327                 echo '? missing rename for '\$cf_source
11328                 cf_target="\$cf_source"
11329         fi
11330         cf_target="\$cf_subdir\${section}/\${cf_target}"
11331
11332 CF_EOF
11333 fi
11334
11335 cat >>$cf_edit_man <<CF_EOF
11336         sed     -f $cf_man_alias \\
11337 CF_EOF
11338
11339 if test -f $MANPAGE_RENAMES ; then
11340 cat >>$cf_edit_man <<CF_EOF
11341                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
11342 CF_EOF
11343 else
11344 cat >>$cf_edit_man <<CF_EOF
11345                 < \$i >\$TMP
11346 CF_EOF
11347 fi
11348
11349 cat >>$cf_edit_man <<CF_EOF
11350 if test \$cf_tables = yes ; then
11351         tbl \$TMP >\$TMP.out
11352         mv \$TMP.out \$TMP
11353 fi
11354 CF_EOF
11355
11356 if test $with_overwrite != yes ; then
11357 cat >>$cf_edit_man <<CF_EOF
11358         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
11359         mv \$TMP.out \$TMP
11360 CF_EOF
11361 fi
11362
11363 if test $with_curses_h != yes ; then
11364 cat >>$cf_edit_man <<CF_EOF
11365         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
11366         mv \$TMP.out \$TMP
11367 CF_EOF
11368 fi
11369
11370 cat >>$cf_edit_man <<CF_EOF
11371         if test \$form = format ; then
11372                 nroff -man \$TMP >\$TMP.out
11373                 mv \$TMP.out \$TMP
11374         fi
11375 CF_EOF
11376
11377 if test -n "$cf_compress" ; then
11378 cat >>$cf_edit_man <<CF_EOF
11379         if test \$verb = installing ; then
11380         if ( $cf_compress -f \$TMP )
11381         then
11382                 mv \$TMP.$cf_so_strip \$TMP
11383         fi
11384         fi
11385         cf_target="\$cf_target.$cf_so_strip"
11386 CF_EOF
11387 fi
11388
11389 case "$MANPAGE_FORMAT" in
11390 (*BSDI*)
11391 cat >>$cf_edit_man <<CF_EOF
11392         if test \$form = format ; then
11393                 # BSDI installs only .0 suffixes in the cat directories
11394                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
11395         fi
11396 CF_EOF
11397   ;;
11398 esac
11399
11400 cat >>$cf_edit_man <<CF_EOF
11401         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
11402         if test \$verb = installing ; then
11403                 echo \$verb \$cf_target
11404                 \$INSTALL_DATA \$TMP \$cf_target
11405                 test -d \$cf_subdir\${section} &&
11406                 test -n "\$aliases" && (
11407                         cd \$cf_subdir\${section} && (
11408                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
11409                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
11410                                 cf_target=\`basename \$cf_target\`
11411                                 for cf_alias in \$aliases
11412                                 do
11413                                         if test \$section = 1 ; then
11414                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11415                                         fi
11416
11417                                         if test "$MANPAGE_SYMLINKS" = yes ; then
11418                                                 if test -f \$cf_alias\${suffix} ; then
11419                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
11420                                                         then
11421                                                                 continue
11422                                                         fi
11423                                                 fi
11424                                                 echo .. \$verb alias \$cf_alias\${suffix}
11425 CF_EOF
11426 case "x$LN_S" in
11427 (*-f)
11428 cat >>$cf_edit_man <<CF_EOF
11429                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11430 CF_EOF
11431         ;;
11432 (*)
11433 cat >>$cf_edit_man <<CF_EOF
11434                                                 rm -f \$cf_alias\${suffix}
11435                                                 $LN_S \$cf_target \$cf_alias\${suffix}
11436 CF_EOF
11437         ;;
11438 esac
11439 cat >>$cf_edit_man <<CF_EOF
11440                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
11441                                                 echo ".so \$cf_source" >\$TMP
11442 CF_EOF
11443 if test -n "$cf_compress" ; then
11444 cat >>$cf_edit_man <<CF_EOF
11445                                                 if test -n "$cf_so_strip" ; then
11446                                                         $cf_compress -f \$TMP
11447                                                         mv \$TMP.$cf_so_strip \$TMP
11448                                                 fi
11449 CF_EOF
11450 fi
11451 cat >>$cf_edit_man <<CF_EOF
11452                                                 echo .. \$verb alias \$cf_alias\${suffix}
11453                                                 rm -f \$cf_alias\${suffix}
11454                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
11455                                         fi
11456                                 done
11457                         )
11458                 )
11459         elif test \$verb = removing ; then
11460                 test -f \$cf_target && (
11461                         echo \$verb \$cf_target
11462                         rm -f \$cf_target
11463                 )
11464                 test -d \$cf_subdir\${section} &&
11465                 test -n "\$aliases" && (
11466                         cd \$cf_subdir\${section} && (
11467                                 for cf_alias in \$aliases
11468                                 do
11469                                         if test \$section = 1 ; then
11470                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11471                                         fi
11472
11473                                         echo .. \$verb alias \$cf_alias\${suffix}
11474                                         rm -f \$cf_alias\${suffix}
11475                                 done
11476                         )
11477                 )
11478         else
11479 #               echo ".hy 0"
11480                 cat \$TMP
11481         fi
11482         ;;
11483 esac
11484 done
11485
11486 if test $cf_inboth = yes ; then
11487 if test \$form != format ; then
11488         sh \$0 format \$verb \$mandir \$srcdir \$*
11489 fi
11490 fi
11491
11492 exit 0
11493 CF_EOF
11494 chmod 755 $cf_edit_man
11495
11496 ###############################################################################
11497
11498 ### Note that some functions (such as const) are normally disabled anyway.
11499 echo "$as_me:11499: checking if you want to build with function extensions" >&5
11500 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11501
11502 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11503 if test "${enable_ext_funcs+set}" = set; then
11504   enableval="$enable_ext_funcs"
11505   with_ext_funcs=$enableval
11506 else
11507   with_ext_funcs=yes
11508 fi;
11509 echo "$as_me:11509: result: $with_ext_funcs" >&5
11510 echo "${ECHO_T}$with_ext_funcs" >&6
11511 if test "x$with_ext_funcs" = xyes ; then
11512         NCURSES_EXT_FUNCS=1
11513
11514 cat >>confdefs.h <<\EOF
11515 #define HAVE_ASSUME_DEFAULT_COLORS 1
11516 EOF
11517
11518 cat >>confdefs.h <<\EOF
11519 #define HAVE_CURSES_VERSION 1
11520 EOF
11521
11522 cat >>confdefs.h <<\EOF
11523 #define HAVE_HAS_KEY 1
11524 EOF
11525
11526 cat >>confdefs.h <<\EOF
11527 #define HAVE_RESIZETERM 1
11528 EOF
11529
11530 cat >>confdefs.h <<\EOF
11531 #define HAVE_RESIZE_TERM 1
11532 EOF
11533
11534 cat >>confdefs.h <<\EOF
11535 #define HAVE_TERM_ENTRY_H 1
11536 EOF
11537
11538 cat >>confdefs.h <<\EOF
11539 #define HAVE_USE_DEFAULT_COLORS 1
11540 EOF
11541
11542 cat >>confdefs.h <<\EOF
11543 #define HAVE_USE_SCREEN 1
11544 EOF
11545
11546 cat >>confdefs.h <<\EOF
11547 #define HAVE_USE_WINDOW 1
11548 EOF
11549
11550 cat >>confdefs.h <<\EOF
11551 #define HAVE_WRESIZE 1
11552 EOF
11553
11554 cat >>confdefs.h <<\EOF
11555 #define NCURSES_EXT_FUNCS 1
11556 EOF
11557
11558         GENERATED_EXT_FUNCS=generated
11559 else
11560         NCURSES_EXT_FUNCS=0
11561         GENERATED_EXT_FUNCS=
11562 fi
11563
11564 echo "$as_me:11564: checking if you want to build with SCREEN extensions" >&5
11565 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
11566
11567 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11568 if test "${enable_sp_funcs+set}" = set; then
11569   enableval="$enable_sp_funcs"
11570   with_sp_funcs=$enableval
11571 else
11572   with_sp_funcs=$cf_dft_ext_spfuncs
11573 fi;
11574 echo "$as_me:11574: result: $with_sp_funcs" >&5
11575 echo "${ECHO_T}$with_sp_funcs" >&6
11576 if test "x$with_sp_funcs" = xyes ; then
11577         NCURSES_SP_FUNCS=1
11578
11579 cat >>confdefs.h <<\EOF
11580 #define NCURSES_SP_FUNCS 1
11581 EOF
11582
11583         GENERATED_SP_FUNCS=generated
11584 else
11585         NCURSES_SP_FUNCS=0
11586         GENERATED_SP_FUNCS=
11587 fi
11588
11589 echo "$as_me:11589: checking if you want to build with terminal-driver" >&5
11590 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
11591
11592 # Check whether --enable-term-driver or --disable-term-driver was given.
11593 if test "${enable_term_driver+set}" = set; then
11594   enableval="$enable_term_driver"
11595   with_term_driver=$enableval
11596 else
11597   with_term_driver=no
11598 fi;
11599 echo "$as_me:11599: result: $with_term_driver" >&5
11600 echo "${ECHO_T}$with_term_driver" >&6
11601 if test "x$with_term_driver" = xyes ; then
11602
11603 cat >>confdefs.h <<\EOF
11604 #define USE_TERM_DRIVER 1
11605 EOF
11606
11607         if test "x$with_sp_funcs" != xyes ; then
11608                 { { echo "$as_me:11608: error: The term-driver option relies upon sp-funcs" >&5
11609 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11610    { (exit 1); exit 1; }; }
11611         fi
11612 fi
11613
11614 ###   use option --enable-const to turn on use of const beyond that in XSI.
11615 echo "$as_me:11615: checking for extended use of const keyword" >&5
11616 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11617
11618 # Check whether --enable-const or --disable-const was given.
11619 if test "${enable_const+set}" = set; then
11620   enableval="$enable_const"
11621   with_ext_const=$enableval
11622 else
11623   with_ext_const=$cf_dft_ext_const
11624 fi;
11625 echo "$as_me:11625: result: $with_ext_const" >&5
11626 echo "${ECHO_T}$with_ext_const" >&6
11627 NCURSES_CONST='/*nothing*/'
11628 if test "x$with_ext_const" = xyes ; then
11629         NCURSES_CONST=const
11630 fi
11631
11632 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11633 echo "$as_me:11633: checking if you want to use extended colors" >&5
11634 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11635
11636 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11637 if test "${enable_ext_colors+set}" = set; then
11638   enableval="$enable_ext_colors"
11639   with_ext_colors=$enableval
11640 else
11641   with_ext_colors=$cf_dft_ext_colors
11642 fi;
11643 echo "$as_me:11643: result: $with_ext_colors" >&5
11644 echo "${ECHO_T}$with_ext_colors" >&6
11645 NCURSES_EXT_COLORS=0
11646 if test "x$with_ext_colors" = xyes ; then
11647         if test "x$with_widec" != xyes ; then
11648                 { echo "$as_me:11648: WARNING: This option applies only to wide-character library" >&5
11649 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
11650         else
11651                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11652
11653 if test "${with_abi_version+set}" != set; then
11654         case $cf_cv_rel_version in
11655         (5.*)
11656                 cf_cv_rel_version=6.0
11657                 cf_cv_abi_version=6
11658                 { echo "$as_me:11658: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11659 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11660                 ;;
11661         esac
11662 fi
11663
11664                 NCURSES_EXT_COLORS=1
11665
11666 cat >>confdefs.h <<\EOF
11667 #define NCURSES_EXT_COLORS 1
11668 EOF
11669
11670         fi
11671 fi
11672
11673 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11674 echo "$as_me:11674: checking if you want to use extended mouse encoding" >&5
11675 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11676
11677 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11678 if test "${enable_ext_mouse+set}" = set; then
11679   enableval="$enable_ext_mouse"
11680   with_ext_mouse=$enableval
11681 else
11682   with_ext_mouse=$cf_dft_ext_mouse
11683 fi;
11684 echo "$as_me:11684: result: $with_ext_mouse" >&5
11685 echo "${ECHO_T}$with_ext_mouse" >&6
11686 NCURSES_MOUSE_VERSION=1
11687 if test "x$with_ext_mouse" = xyes ; then
11688         NCURSES_MOUSE_VERSION=2
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 fi
11702
11703 ###   use option --enable-ext-putwin to turn on extended screendumps
11704 echo "$as_me:11704: checking if you want to use extended putwin/screendump" >&5
11705 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
11706
11707 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
11708 if test "${enable_ext_putwin+set}" = set; then
11709   enableval="$enable_ext_putwin"
11710   with_ext_putwin=$enableval
11711 else
11712   with_ext_putwin=$cf_dft_ext_putwin
11713 fi;
11714 echo "$as_me:11714: result: $with_ext_putwin" >&5
11715 echo "${ECHO_T}$with_ext_putwin" >&6
11716 if test "x$with_ext_putwin" = xyes ; then
11717
11718 cat >>confdefs.h <<\EOF
11719 #define NCURSES_EXT_PUTWIN 1
11720 EOF
11721
11722 fi
11723
11724 echo "$as_me:11724: checking if you want \$NCURSES_NO_PADDING code" >&5
11725 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11726
11727 # Check whether --enable-no-padding or --disable-no-padding was given.
11728 if test "${enable_no_padding+set}" = set; then
11729   enableval="$enable_no_padding"
11730   with_no_padding=$enableval
11731 else
11732   with_no_padding=$with_ext_funcs
11733 fi;
11734 echo "$as_me:11734: result: $with_no_padding" >&5
11735 echo "${ECHO_T}$with_no_padding" >&6
11736 test "x$with_no_padding" = xyes &&
11737 cat >>confdefs.h <<\EOF
11738 #define NCURSES_NO_PADDING 1
11739 EOF
11740
11741 echo "$as_me:11741: checking for ANSI C header files" >&5
11742 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11743 if test "${ac_cv_header_stdc+set}" = set; then
11744   echo $ECHO_N "(cached) $ECHO_C" >&6
11745 else
11746   cat >conftest.$ac_ext <<_ACEOF
11747 #line 11747 "configure"
11748 #include "confdefs.h"
11749 #include <stdlib.h>
11750 #include <stdarg.h>
11751 #include <string.h>
11752 #include <float.h>
11753
11754 _ACEOF
11755 if { (eval echo "$as_me:11755: \"$ac_cpp conftest.$ac_ext\"") >&5
11756   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11757   ac_status=$?
11758   egrep -v '^ *\+' conftest.er1 >conftest.err
11759   rm -f conftest.er1
11760   cat conftest.err >&5
11761   echo "$as_me:11761: \$? = $ac_status" >&5
11762   (exit $ac_status); } >/dev/null; then
11763   if test -s conftest.err; then
11764     ac_cpp_err=$ac_c_preproc_warn_flag
11765   else
11766     ac_cpp_err=
11767   fi
11768 else
11769   ac_cpp_err=yes
11770 fi
11771 if test -z "$ac_cpp_err"; then
11772   ac_cv_header_stdc=yes
11773 else
11774   echo "$as_me: failed program was:" >&5
11775   cat conftest.$ac_ext >&5
11776   ac_cv_header_stdc=no
11777 fi
11778 rm -f conftest.err conftest.$ac_ext
11779
11780 if test $ac_cv_header_stdc = yes; then
11781   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11782   cat >conftest.$ac_ext <<_ACEOF
11783 #line 11783 "configure"
11784 #include "confdefs.h"
11785 #include <string.h>
11786
11787 _ACEOF
11788 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11789   egrep "memchr" >/dev/null 2>&1; then
11790   :
11791 else
11792   ac_cv_header_stdc=no
11793 fi
11794 rm -rf conftest*
11795
11796 fi
11797
11798 if test $ac_cv_header_stdc = yes; then
11799   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11800   cat >conftest.$ac_ext <<_ACEOF
11801 #line 11801 "configure"
11802 #include "confdefs.h"
11803 #include <stdlib.h>
11804
11805 _ACEOF
11806 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11807   egrep "free" >/dev/null 2>&1; then
11808   :
11809 else
11810   ac_cv_header_stdc=no
11811 fi
11812 rm -rf conftest*
11813
11814 fi
11815
11816 if test $ac_cv_header_stdc = yes; then
11817   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11818   if test "$cross_compiling" = yes; then
11819   :
11820 else
11821   cat >conftest.$ac_ext <<_ACEOF
11822 #line 11822 "configure"
11823 #include "confdefs.h"
11824 #include <ctype.h>
11825 #if ((' ' & 0x0FF) == 0x020)
11826 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11827 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11828 #else
11829 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11830                      || ('j' <= (c) && (c) <= 'r') \
11831                      || ('s' <= (c) && (c) <= 'z'))
11832 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11833 #endif
11834
11835 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11836 int
11837 main ()
11838 {
11839   int i;
11840   for (i = 0; i < 256; i++)
11841     if (XOR (islower (i), ISLOWER (i))
11842         || toupper (i) != TOUPPER (i))
11843       $ac_main_return(2);
11844   $ac_main_return (0);
11845 }
11846 _ACEOF
11847 rm -f conftest$ac_exeext
11848 if { (eval echo "$as_me:11848: \"$ac_link\"") >&5
11849   (eval $ac_link) 2>&5
11850   ac_status=$?
11851   echo "$as_me:11851: \$? = $ac_status" >&5
11852   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11853   { (eval echo "$as_me:11853: \"$ac_try\"") >&5
11854   (eval $ac_try) 2>&5
11855   ac_status=$?
11856   echo "$as_me:11856: \$? = $ac_status" >&5
11857   (exit $ac_status); }; }; then
11858   :
11859 else
11860   echo "$as_me: program exited with status $ac_status" >&5
11861 echo "$as_me: failed program was:" >&5
11862 cat conftest.$ac_ext >&5
11863 ac_cv_header_stdc=no
11864 fi
11865 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11866 fi
11867 fi
11868 fi
11869 echo "$as_me:11869: result: $ac_cv_header_stdc" >&5
11870 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11871 if test $ac_cv_header_stdc = yes; then
11872
11873 cat >>confdefs.h <<\EOF
11874 #define STDC_HEADERS 1
11875 EOF
11876
11877 fi
11878
11879 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11880
11881 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11882                   inttypes.h stdint.h unistd.h
11883 do
11884 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11885 echo "$as_me:11885: checking for $ac_header" >&5
11886 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11887 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11888   echo $ECHO_N "(cached) $ECHO_C" >&6
11889 else
11890   cat >conftest.$ac_ext <<_ACEOF
11891 #line 11891 "configure"
11892 #include "confdefs.h"
11893 $ac_includes_default
11894 #include <$ac_header>
11895 _ACEOF
11896 rm -f conftest.$ac_objext
11897 if { (eval echo "$as_me:11897: \"$ac_compile\"") >&5
11898   (eval $ac_compile) 2>&5
11899   ac_status=$?
11900   echo "$as_me:11900: \$? = $ac_status" >&5
11901   (exit $ac_status); } &&
11902          { ac_try='test -s conftest.$ac_objext'
11903   { (eval echo "$as_me:11903: \"$ac_try\"") >&5
11904   (eval $ac_try) 2>&5
11905   ac_status=$?
11906   echo "$as_me:11906: \$? = $ac_status" >&5
11907   (exit $ac_status); }; }; then
11908   eval "$as_ac_Header=yes"
11909 else
11910   echo "$as_me: failed program was:" >&5
11911 cat conftest.$ac_ext >&5
11912 eval "$as_ac_Header=no"
11913 fi
11914 rm -f conftest.$ac_objext conftest.$ac_ext
11915 fi
11916 echo "$as_me:11916: result: `eval echo '${'$as_ac_Header'}'`" >&5
11917 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11918 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11919   cat >>confdefs.h <<EOF
11920 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11921 EOF
11922
11923 fi
11924 done
11925
11926 echo "$as_me:11926: checking for signed char" >&5
11927 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11928 if test "${ac_cv_type_signed_char+set}" = set; then
11929   echo $ECHO_N "(cached) $ECHO_C" >&6
11930 else
11931   cat >conftest.$ac_ext <<_ACEOF
11932 #line 11932 "configure"
11933 #include "confdefs.h"
11934 $ac_includes_default
11935 int
11936 main ()
11937 {
11938 if ((signed char *) 0)
11939   return 0;
11940 if (sizeof (signed char))
11941   return 0;
11942   ;
11943   return 0;
11944 }
11945 _ACEOF
11946 rm -f conftest.$ac_objext
11947 if { (eval echo "$as_me:11947: \"$ac_compile\"") >&5
11948   (eval $ac_compile) 2>&5
11949   ac_status=$?
11950   echo "$as_me:11950: \$? = $ac_status" >&5
11951   (exit $ac_status); } &&
11952          { ac_try='test -s conftest.$ac_objext'
11953   { (eval echo "$as_me:11953: \"$ac_try\"") >&5
11954   (eval $ac_try) 2>&5
11955   ac_status=$?
11956   echo "$as_me:11956: \$? = $ac_status" >&5
11957   (exit $ac_status); }; }; then
11958   ac_cv_type_signed_char=yes
11959 else
11960   echo "$as_me: failed program was:" >&5
11961 cat conftest.$ac_ext >&5
11962 ac_cv_type_signed_char=no
11963 fi
11964 rm -f conftest.$ac_objext conftest.$ac_ext
11965 fi
11966 echo "$as_me:11966: result: $ac_cv_type_signed_char" >&5
11967 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11968
11969 echo "$as_me:11969: checking size of signed char" >&5
11970 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11971 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11972   echo $ECHO_N "(cached) $ECHO_C" >&6
11973 else
11974   if test "$ac_cv_type_signed_char" = yes; then
11975   if test "$cross_compiling" = yes; then
11976   # Depending upon the size, compute the lo and hi bounds.
11977 cat >conftest.$ac_ext <<_ACEOF
11978 #line 11978 "configure"
11979 #include "confdefs.h"
11980 $ac_includes_default
11981 int
11982 main ()
11983 {
11984 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11985   ;
11986   return 0;
11987 }
11988 _ACEOF
11989 rm -f conftest.$ac_objext
11990 if { (eval echo "$as_me:11990: \"$ac_compile\"") >&5
11991   (eval $ac_compile) 2>&5
11992   ac_status=$?
11993   echo "$as_me:11993: \$? = $ac_status" >&5
11994   (exit $ac_status); } &&
11995          { ac_try='test -s conftest.$ac_objext'
11996   { (eval echo "$as_me:11996: \"$ac_try\"") >&5
11997   (eval $ac_try) 2>&5
11998   ac_status=$?
11999   echo "$as_me:11999: \$? = $ac_status" >&5
12000   (exit $ac_status); }; }; then
12001   ac_lo=0 ac_mid=0
12002   while :; do
12003     cat >conftest.$ac_ext <<_ACEOF
12004 #line 12004 "configure"
12005 #include "confdefs.h"
12006 $ac_includes_default
12007 int
12008 main ()
12009 {
12010 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
12011   ;
12012   return 0;
12013 }
12014 _ACEOF
12015 rm -f conftest.$ac_objext
12016 if { (eval echo "$as_me:12016: \"$ac_compile\"") >&5
12017   (eval $ac_compile) 2>&5
12018   ac_status=$?
12019   echo "$as_me:12019: \$? = $ac_status" >&5
12020   (exit $ac_status); } &&
12021          { ac_try='test -s conftest.$ac_objext'
12022   { (eval echo "$as_me:12022: \"$ac_try\"") >&5
12023   (eval $ac_try) 2>&5
12024   ac_status=$?
12025   echo "$as_me:12025: \$? = $ac_status" >&5
12026   (exit $ac_status); }; }; then
12027   ac_hi=$ac_mid; break
12028 else
12029   echo "$as_me: failed program was:" >&5
12030 cat conftest.$ac_ext >&5
12031 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
12032 fi
12033 rm -f conftest.$ac_objext conftest.$ac_ext
12034   done
12035 else
12036   echo "$as_me: failed program was:" >&5
12037 cat conftest.$ac_ext >&5
12038 ac_hi=-1 ac_mid=-1
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_lo=$ac_mid; break
12065 else
12066   echo "$as_me: failed program was:" >&5
12067 cat conftest.$ac_ext >&5
12068 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
12069 fi
12070 rm -f conftest.$ac_objext conftest.$ac_ext
12071   done
12072 fi
12073 rm -f conftest.$ac_objext conftest.$ac_ext
12074 # Binary search between lo and hi bounds.
12075 while test "x$ac_lo" != "x$ac_hi"; do
12076   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
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_hi=$ac_mid
12102 else
12103   echo "$as_me: failed program was:" >&5
12104 cat conftest.$ac_ext >&5
12105 ac_lo=`expr $ac_mid + 1`
12106 fi
12107 rm -f conftest.$ac_objext conftest.$ac_ext
12108 done
12109 ac_cv_sizeof_signed_char=$ac_lo
12110 else
12111   if test "$cross_compiling" = yes; then
12112   { { echo "$as_me:12112: error: cannot run test program while cross compiling" >&5
12113 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12114    { (exit 1); exit 1; }; }
12115 else
12116   cat >conftest.$ac_ext <<_ACEOF
12117 #line 12117 "configure"
12118 #include "confdefs.h"
12119 $ac_includes_default
12120 int
12121 main ()
12122 {
12123 FILE *f = fopen ("conftest.val", "w");
12124 if (!f)
12125   $ac_main_return (1);
12126 fprintf (f, "%d", (sizeof (signed char)));
12127 fclose (f);
12128   ;
12129   return 0;
12130 }
12131 _ACEOF
12132 rm -f conftest$ac_exeext
12133 if { (eval echo "$as_me:12133: \"$ac_link\"") >&5
12134   (eval $ac_link) 2>&5
12135   ac_status=$?
12136   echo "$as_me:12136: \$? = $ac_status" >&5
12137   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12138   { (eval echo "$as_me:12138: \"$ac_try\"") >&5
12139   (eval $ac_try) 2>&5
12140   ac_status=$?
12141   echo "$as_me:12141: \$? = $ac_status" >&5
12142   (exit $ac_status); }; }; then
12143   ac_cv_sizeof_signed_char=`cat conftest.val`
12144 else
12145   echo "$as_me: program exited with status $ac_status" >&5
12146 echo "$as_me: failed program was:" >&5
12147 cat conftest.$ac_ext >&5
12148 fi
12149 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12150 fi
12151 fi
12152 rm -f conftest.val
12153 else
12154   ac_cv_sizeof_signed_char=0
12155 fi
12156 fi
12157 echo "$as_me:12157: result: $ac_cv_sizeof_signed_char" >&5
12158 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
12159 cat >>confdefs.h <<EOF
12160 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
12161 EOF
12162
12163 if test "$ac_cv_sizeof_signed_char" = 1 ; then
12164         NCURSES_SBOOL="signed char"
12165 else
12166         NCURSES_SBOOL="char"
12167 fi
12168 echo "$as_me:12168: checking if you want to use signed Boolean array in term.h" >&5
12169 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
12170
12171 # Check whether --enable-signed-char or --disable-signed-char was given.
12172 if test "${enable_signed_char+set}" = set; then
12173   enableval="$enable_signed_char"
12174   with_signed_char=$enableval
12175 else
12176   with_signed_char=no
12177 fi;
12178 echo "$as_me:12178: result: $with_signed_char" >&5
12179 echo "${ECHO_T}$with_signed_char" >&6
12180 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
12181
12182 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
12183 echo "$as_me:12183: checking if you want SIGWINCH handler" >&5
12184 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
12185
12186 # Check whether --enable-sigwinch or --disable-sigwinch was given.
12187 if test "${enable_sigwinch+set}" = set; then
12188   enableval="$enable_sigwinch"
12189   with_sigwinch=$enableval
12190 else
12191   with_sigwinch=$with_ext_funcs
12192 fi;
12193 echo "$as_me:12193: result: $with_sigwinch" >&5
12194 echo "${ECHO_T}$with_sigwinch" >&6
12195 test "x$with_sigwinch" = xyes &&
12196 cat >>confdefs.h <<\EOF
12197 #define USE_SIGWINCH 1
12198 EOF
12199
12200 ###   use option --enable-tcap-names to allow user to define new capabilities
12201 echo "$as_me:12201: checking if you want user-definable terminal capabilities like termcap" >&5
12202 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
12203
12204 # Check whether --enable-tcap-names or --disable-tcap-names was given.
12205 if test "${enable_tcap_names+set}" = set; then
12206   enableval="$enable_tcap_names"
12207   with_tcap_names=$enableval
12208 else
12209   with_tcap_names=$with_ext_funcs
12210 fi;
12211 echo "$as_me:12211: result: $with_tcap_names" >&5
12212 echo "${ECHO_T}$with_tcap_names" >&6
12213 NCURSES_XNAMES=0
12214 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
12215
12216 ###############################################################################
12217 # These options are relatively safe to experiment with.
12218
12219 echo "$as_me:12219: checking if you want all development code" >&5
12220 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
12221
12222 # Check whether --with-develop or --without-develop was given.
12223 if test "${with_develop+set}" = set; then
12224   withval="$with_develop"
12225   with_develop=$withval
12226 else
12227   with_develop=no
12228 fi;
12229 echo "$as_me:12229: result: $with_develop" >&5
12230 echo "${ECHO_T}$with_develop" >&6
12231
12232 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
12233 echo "$as_me:12233: checking if you want hard-tabs code" >&5
12234 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
12235
12236 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
12237 if test "${enable_hard_tabs+set}" = set; then
12238   enableval="$enable_hard_tabs"
12239
12240 else
12241   enable_hard_tabs=$with_develop
12242 fi;
12243 echo "$as_me:12243: result: $enable_hard_tabs" >&5
12244 echo "${ECHO_T}$enable_hard_tabs" >&6
12245 test "x$enable_hard_tabs" = xyes &&
12246 cat >>confdefs.h <<\EOF
12247 #define USE_HARD_TABS 1
12248 EOF
12249
12250 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
12251 echo "$as_me:12251: checking if you want limited support for xmc" >&5
12252 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
12253
12254 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
12255 if test "${enable_xmc_glitch+set}" = set; then
12256   enableval="$enable_xmc_glitch"
12257
12258 else
12259   enable_xmc_glitch=$with_develop
12260 fi;
12261 echo "$as_me:12261: result: $enable_xmc_glitch" >&5
12262 echo "${ECHO_T}$enable_xmc_glitch" >&6
12263 test "x$enable_xmc_glitch" = xyes &&
12264 cat >>confdefs.h <<\EOF
12265 #define USE_XMC_SUPPORT 1
12266 EOF
12267
12268 ###############################################################################
12269 # These are just experimental, probably should not be in a package:
12270
12271 echo "$as_me:12271: checking if you do not want to assume colors are white-on-black" >&5
12272 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
12273
12274 # Check whether --enable-assumed-color or --disable-assumed-color was given.
12275 if test "${enable_assumed_color+set}" = set; then
12276   enableval="$enable_assumed_color"
12277   with_assumed_color=$enableval
12278 else
12279   with_assumed_color=yes
12280 fi;
12281 echo "$as_me:12281: result: $with_assumed_color" >&5
12282 echo "${ECHO_T}$with_assumed_color" >&6
12283 test "x$with_assumed_color" = xyes &&
12284 cat >>confdefs.h <<\EOF
12285 #define USE_ASSUMED_COLOR 1
12286 EOF
12287
12288 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
12289 echo "$as_me:12289: checking if you want hashmap scrolling-optimization code" >&5
12290 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
12291
12292 # Check whether --enable-hashmap or --disable-hashmap was given.
12293 if test "${enable_hashmap+set}" = set; then
12294   enableval="$enable_hashmap"
12295   with_hashmap=$enableval
12296 else
12297   with_hashmap=yes
12298 fi;
12299 echo "$as_me:12299: result: $with_hashmap" >&5
12300 echo "${ECHO_T}$with_hashmap" >&6
12301 test "x$with_hashmap" = xyes &&
12302 cat >>confdefs.h <<\EOF
12303 #define USE_HASHMAP 1
12304 EOF
12305
12306 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
12307 echo "$as_me:12307: checking if you want colorfgbg code" >&5
12308 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
12309
12310 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
12311 if test "${enable_colorfgbg+set}" = set; then
12312   enableval="$enable_colorfgbg"
12313   with_colorfgbg=$enableval
12314 else
12315   with_colorfgbg=no
12316 fi;
12317 echo "$as_me:12317: result: $with_colorfgbg" >&5
12318 echo "${ECHO_T}$with_colorfgbg" >&6
12319 test "x$with_colorfgbg" = xyes &&
12320 cat >>confdefs.h <<\EOF
12321 #define USE_COLORFGBG 1
12322 EOF
12323
12324 ###   use option --enable-interop to turn on use of bindings used for interop
12325 echo "$as_me:12325: checking if you want interop bindings" >&5
12326 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
12327
12328 # Check whether --enable-interop or --disable-interop was given.
12329 if test "${enable_interop+set}" = set; then
12330   enableval="$enable_interop"
12331   with_exp_interop=$enableval
12332 else
12333   with_exp_interop=$cf_dft_interop
12334 fi;
12335 echo "$as_me:12335: result: $with_exp_interop" >&5
12336 echo "${ECHO_T}$with_exp_interop" >&6
12337
12338 NCURSES_INTEROP_FUNCS=0
12339 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
12340
12341 # This is still experimental (20080329), but should ultimately be moved to
12342 # the script-block --with-normal, etc.
12343
12344 echo "$as_me:12344: checking if you want to link with the pthread library" >&5
12345 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
12346
12347 # Check whether --with-pthread or --without-pthread was given.
12348 if test "${with_pthread+set}" = set; then
12349   withval="$with_pthread"
12350   with_pthread=$withval
12351 else
12352   with_pthread=no
12353 fi;
12354 echo "$as_me:12354: result: $with_pthread" >&5
12355 echo "${ECHO_T}$with_pthread" >&6
12356
12357 if test "$with_pthread" != no ; then
12358         echo "$as_me:12358: checking for pthread.h" >&5
12359 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
12360 if test "${ac_cv_header_pthread_h+set}" = set; then
12361   echo $ECHO_N "(cached) $ECHO_C" >&6
12362 else
12363   cat >conftest.$ac_ext <<_ACEOF
12364 #line 12364 "configure"
12365 #include "confdefs.h"
12366 #include <pthread.h>
12367 _ACEOF
12368 if { (eval echo "$as_me:12368: \"$ac_cpp conftest.$ac_ext\"") >&5
12369   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12370   ac_status=$?
12371   egrep -v '^ *\+' conftest.er1 >conftest.err
12372   rm -f conftest.er1
12373   cat conftest.err >&5
12374   echo "$as_me:12374: \$? = $ac_status" >&5
12375   (exit $ac_status); } >/dev/null; then
12376   if test -s conftest.err; then
12377     ac_cpp_err=$ac_c_preproc_warn_flag
12378   else
12379     ac_cpp_err=
12380   fi
12381 else
12382   ac_cpp_err=yes
12383 fi
12384 if test -z "$ac_cpp_err"; then
12385   ac_cv_header_pthread_h=yes
12386 else
12387   echo "$as_me: failed program was:" >&5
12388   cat conftest.$ac_ext >&5
12389   ac_cv_header_pthread_h=no
12390 fi
12391 rm -f conftest.err conftest.$ac_ext
12392 fi
12393 echo "$as_me:12393: result: $ac_cv_header_pthread_h" >&5
12394 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
12395 if test $ac_cv_header_pthread_h = yes; then
12396
12397 cat >>confdefs.h <<\EOF
12398 #define HAVE_PTHREADS_H 1
12399 EOF
12400
12401         for cf_lib_pthread in pthread c_r
12402         do
12403             echo "$as_me:12403: checking if we can link with the $cf_lib_pthread library" >&5
12404 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
12405             cf_save_LIBS="$LIBS"
12406
12407 cf_add_libs="-l$cf_lib_pthread"
12408 # Filter out duplicates - this happens with badly-designed ".pc" files...
12409 for cf_add_1lib in $LIBS
12410 do
12411         for cf_add_2lib in $cf_add_libs
12412         do
12413                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12414                 then
12415                         cf_add_1lib=
12416                         break
12417                 fi
12418         done
12419         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12420 done
12421 LIBS="$cf_add_libs"
12422
12423             cat >conftest.$ac_ext <<_ACEOF
12424 #line 12424 "configure"
12425 #include "confdefs.h"
12426
12427 #include <pthread.h>
12428
12429 int
12430 main ()
12431 {
12432
12433                 int rc = pthread_create(0,0,0,0);
12434                 int r2 = pthread_mutexattr_settype(0, 0);
12435
12436   ;
12437   return 0;
12438 }
12439 _ACEOF
12440 rm -f conftest.$ac_objext conftest$ac_exeext
12441 if { (eval echo "$as_me:12441: \"$ac_link\"") >&5
12442   (eval $ac_link) 2>&5
12443   ac_status=$?
12444   echo "$as_me:12444: \$? = $ac_status" >&5
12445   (exit $ac_status); } &&
12446          { ac_try='test -s conftest$ac_exeext'
12447   { (eval echo "$as_me:12447: \"$ac_try\"") >&5
12448   (eval $ac_try) 2>&5
12449   ac_status=$?
12450   echo "$as_me:12450: \$? = $ac_status" >&5
12451   (exit $ac_status); }; }; then
12452   with_pthread=yes
12453 else
12454   echo "$as_me: failed program was:" >&5
12455 cat conftest.$ac_ext >&5
12456 with_pthread=no
12457 fi
12458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12459             LIBS="$cf_save_LIBS"
12460             echo "$as_me:12460: result: $with_pthread" >&5
12461 echo "${ECHO_T}$with_pthread" >&6
12462             test "$with_pthread" = yes && break
12463         done
12464
12465         if test "$with_pthread" = yes ; then
12466
12467 cf_add_libs="-l$cf_lib_pthread"
12468 # Filter out duplicates - this happens with badly-designed ".pc" files...
12469 for cf_add_1lib in $LIBS
12470 do
12471         for cf_add_2lib in $cf_add_libs
12472         do
12473                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12474                 then
12475                         cf_add_1lib=
12476                         break
12477                 fi
12478         done
12479         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12480 done
12481 LIBS="$cf_add_libs"
12482
12483 cat >>confdefs.h <<\EOF
12484 #define HAVE_LIBPTHREADS 1
12485 EOF
12486
12487         else
12488             { { echo "$as_me:12488: error: Cannot link with pthread library" >&5
12489 echo "$as_me: error: Cannot link with pthread library" >&2;}
12490    { (exit 1); exit 1; }; }
12491         fi
12492
12493 fi
12494
12495 fi
12496
12497 if test "x$with_pthread" != xno; then
12498         echo "$as_me:12498: checking for pthread_kill" >&5
12499 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12500 if test "${ac_cv_func_pthread_kill+set}" = set; then
12501   echo $ECHO_N "(cached) $ECHO_C" >&6
12502 else
12503   cat >conftest.$ac_ext <<_ACEOF
12504 #line 12504 "configure"
12505 #include "confdefs.h"
12506 /* System header to define __stub macros and hopefully few prototypes,
12507     which can conflict with char pthread_kill (); below.  */
12508 #include <assert.h>
12509 /* Override any gcc2 internal prototype to avoid an error.  */
12510 #ifdef __cplusplus
12511 extern "C"
12512 #endif
12513 /* We use char because int might match the return type of a gcc2
12514    builtin and then its argument prototype would still apply.  */
12515 char pthread_kill ();
12516 char (*f) ();
12517
12518 int
12519 main ()
12520 {
12521 /* The GNU C library defines this for functions which it implements
12522     to always fail with ENOSYS.  Some functions are actually named
12523     something starting with __ and the normal name is an alias.  */
12524 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12525 choke me
12526 #else
12527 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12528 #endif
12529
12530   ;
12531   return 0;
12532 }
12533 _ACEOF
12534 rm -f conftest.$ac_objext conftest$ac_exeext
12535 if { (eval echo "$as_me:12535: \"$ac_link\"") >&5
12536   (eval $ac_link) 2>&5
12537   ac_status=$?
12538   echo "$as_me:12538: \$? = $ac_status" >&5
12539   (exit $ac_status); } &&
12540          { ac_try='test -s conftest$ac_exeext'
12541   { (eval echo "$as_me:12541: \"$ac_try\"") >&5
12542   (eval $ac_try) 2>&5
12543   ac_status=$?
12544   echo "$as_me:12544: \$? = $ac_status" >&5
12545   (exit $ac_status); }; }; then
12546   ac_cv_func_pthread_kill=yes
12547 else
12548   echo "$as_me: failed program was:" >&5
12549 cat conftest.$ac_ext >&5
12550 ac_cv_func_pthread_kill=no
12551 fi
12552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12553 fi
12554 echo "$as_me:12554: result: $ac_cv_func_pthread_kill" >&5
12555 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12556 if test $ac_cv_func_pthread_kill = yes; then
12557
12558                 echo "$as_me:12558: checking if you want to allow EINTR in wgetch with pthreads" >&5
12559 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12560
12561 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12562 if test "${enable_pthreads_eintr+set}" = set; then
12563   enableval="$enable_pthreads_eintr"
12564   use_pthreads_eintr=$enableval
12565 else
12566   use_pthreads_eintr=no
12567 fi;
12568                 echo "$as_me:12568: result: $use_pthreads_eintr" >&5
12569 echo "${ECHO_T}$use_pthreads_eintr" >&6
12570                 if test "x$use_pthreads_eintr" = xyes ; then
12571
12572 cat >>confdefs.h <<\EOF
12573 #define USE_PTHREADS_EINTR 1
12574 EOF
12575
12576                 fi
12577 fi
12578
12579         echo "$as_me:12579: checking if you want to use weak-symbols for pthreads" >&5
12580 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12581
12582 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12583 if test "${enable_weak_symbols+set}" = set; then
12584   enableval="$enable_weak_symbols"
12585   use_weak_symbols=$enableval
12586 else
12587   use_weak_symbols=no
12588 fi;
12589         echo "$as_me:12589: result: $use_weak_symbols" >&5
12590 echo "${ECHO_T}$use_weak_symbols" >&6
12591         if test "x$use_weak_symbols" = xyes ; then
12592
12593 echo "$as_me:12593: checking if $CC supports weak symbols" >&5
12594 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12595 if test "${cf_cv_weak_symbols+set}" = set; then
12596   echo $ECHO_N "(cached) $ECHO_C" >&6
12597 else
12598
12599 cat >conftest.$ac_ext <<_ACEOF
12600 #line 12600 "configure"
12601 #include "confdefs.h"
12602
12603 #include <stdio.h>
12604 int
12605 main ()
12606 {
12607
12608 #if defined(__GNUC__)
12609 #  if defined __USE_ISOC99
12610 #    define _cat_pragma(exp)    _Pragma(#exp)
12611 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12612 #  else
12613 #    define _weak_pragma(exp)
12614 #  endif
12615 #  define _declare(name)        __extension__ extern __typeof__(name) name
12616 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12617 #endif
12618
12619 weak_symbol(fopen);
12620
12621   ;
12622   return 0;
12623 }
12624 _ACEOF
12625 rm -f conftest.$ac_objext
12626 if { (eval echo "$as_me:12626: \"$ac_compile\"") >&5
12627   (eval $ac_compile) 2>&5
12628   ac_status=$?
12629   echo "$as_me:12629: \$? = $ac_status" >&5
12630   (exit $ac_status); } &&
12631          { ac_try='test -s conftest.$ac_objext'
12632   { (eval echo "$as_me:12632: \"$ac_try\"") >&5
12633   (eval $ac_try) 2>&5
12634   ac_status=$?
12635   echo "$as_me:12635: \$? = $ac_status" >&5
12636   (exit $ac_status); }; }; then
12637   cf_cv_weak_symbols=yes
12638 else
12639   echo "$as_me: failed program was:" >&5
12640 cat conftest.$ac_ext >&5
12641 cf_cv_weak_symbols=no
12642 fi
12643 rm -f conftest.$ac_objext conftest.$ac_ext
12644
12645 fi
12646 echo "$as_me:12646: result: $cf_cv_weak_symbols" >&5
12647 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12648
12649         else
12650                 cf_cv_weak_symbols=no
12651         fi
12652
12653         if test "x$cf_cv_weak_symbols" = xyes ; then
12654
12655 cat >>confdefs.h <<\EOF
12656 #define USE_WEAK_SYMBOLS 1
12657 EOF
12658
12659         fi
12660 fi
12661
12662 PTHREAD=
12663 if test "x$with_pthread" = "xyes" ; then
12664
12665 cat >>confdefs.h <<\EOF
12666 #define USE_PTHREADS 1
12667 EOF
12668
12669         enable_reentrant=yes
12670         if test "x$cf_cv_weak_symbols" = xyes ; then
12671                 PTHREAD=-lpthread
12672         fi
12673 fi
12674
12675 # Reentrant code has to be opaque; there's little advantage to making ncurses
12676 # opaque outside of that, so there is no --enable-opaque option.  We can use
12677 # this option without --with-pthreads, but this will be always set for
12678 # pthreads.
12679 echo "$as_me:12679: checking if you want reentrant code" >&5
12680 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
12681
12682 # Check whether --enable-reentrant or --disable-reentrant was given.
12683 if test "${enable_reentrant+set}" = set; then
12684   enableval="$enable_reentrant"
12685   with_reentrant=$enableval
12686 else
12687   with_reentrant=no
12688 fi;
12689 echo "$as_me:12689: result: $with_reentrant" >&5
12690 echo "${ECHO_T}$with_reentrant" >&6
12691 if test "x$with_reentrant" = xyes ; then
12692         cf_cv_enable_reentrant=1
12693         cf_cv_enable_opaque="NCURSES_INTERNALS"
12694         NCURSES_OPAQUE=1
12695         NCURSES_SIZE_T=int
12696         if test "x$cf_cv_weak_symbols" = xyes ; then
12697
12698 # remove pthread library from $LIBS
12699 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12700
12701 cf_add_libs="-lpthread"
12702 # Filter out duplicates - this happens with badly-designed ".pc" files...
12703 for cf_add_1lib in $TEST_LIBS
12704 do
12705         for cf_add_2lib in $cf_add_libs
12706         do
12707                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12708                 then
12709                         cf_add_1lib=
12710                         break
12711                 fi
12712         done
12713         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12714 done
12715 TEST_LIBS="$cf_add_libs"
12716
12717 cf_add_libs="-lpthread"
12718 # Filter out duplicates - this happens with badly-designed ".pc" files...
12719 for cf_add_1lib in $TEST_LIBS2
12720 do
12721         for cf_add_2lib in $cf_add_libs
12722         do
12723                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12724                 then
12725                         cf_add_1lib=
12726                         break
12727                 fi
12728         done
12729         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12730 done
12731 TEST_LIBS2="$cf_add_libs"
12732
12733         else
12734                 # when not using weak symbols but with_reentrant,
12735                 # add 't' to the library suffix on all platforms
12736                 # except cygwin, where we only do that if ALSO
12737                 # compiling with full thread support.
12738                 case "$host" in
12739                 (*cygwin* | *msys*)
12740                         if test "$with_pthread" = "yes" ; then
12741                                 if test "x$disable_lib_suffixes" = "xno" ; then
12742                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12743                                 fi
12744                         fi ;;
12745                 (*)
12746                         if test "x$disable_lib_suffixes" = "xno" ; then
12747                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12748                         fi
12749                         ;;
12750                 esac
12751         fi
12752
12753 cat >>confdefs.h <<\EOF
12754 #define USE_REENTRANT 1
12755 EOF
12756
12757 if test "${with_abi_version+set}" != set; then
12758         case $cf_cv_rel_version in
12759         (5.*)
12760                 cf_cv_rel_version=6.0
12761                 cf_cv_abi_version=6
12762                 { echo "$as_me:12762: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12763 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12764                 ;;
12765         esac
12766 fi
12767
12768 else
12769         cf_cv_enable_reentrant=0
12770         cf_cv_enable_opaque="NCURSES_OPAQUE"
12771         NCURSES_OPAQUE=0
12772         NCURSES_SIZE_T=short
12773 fi
12774
12775 ### Allow using a different wrap-prefix
12776 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12777         echo "$as_me:12777: checking for prefix used to wrap public variables" >&5
12778 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12779
12780 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12781 if test "${with_wrap_prefix+set}" = set; then
12782   withval="$with_wrap_prefix"
12783   NCURSES_WRAP_PREFIX=$withval
12784 else
12785   NCURSES_WRAP_PREFIX=_nc_
12786 fi;
12787         echo "$as_me:12787: result: $NCURSES_WRAP_PREFIX" >&5
12788 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12789 else
12790         NCURSES_WRAP_PREFIX=_nc_
12791 fi
12792
12793 cat >>confdefs.h <<EOF
12794 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12795 EOF
12796
12797 echo "$as_me:12797: checking if you want experimental safe-sprintf code" >&5
12798 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12799
12800 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12801 if test "${enable_safe_sprintf+set}" = set; then
12802   enableval="$enable_safe_sprintf"
12803   with_safe_sprintf=$enableval
12804 else
12805   with_safe_sprintf=no
12806 fi;
12807 echo "$as_me:12807: result: $with_safe_sprintf" >&5
12808 echo "${ECHO_T}$with_safe_sprintf" >&6
12809 test "x$with_safe_sprintf" = xyes &&
12810 cat >>confdefs.h <<\EOF
12811 #define USE_SAFE_SPRINTF 1
12812 EOF
12813
12814 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12815 # when hashmap is used scroll hints are useless
12816 if test "$with_hashmap" = no ; then
12817 echo "$as_me:12817: checking if you want to experiment without scrolling-hints code" >&5
12818 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12819
12820 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12821 if test "${enable_scroll_hints+set}" = set; then
12822   enableval="$enable_scroll_hints"
12823   with_scroll_hints=$enableval
12824 else
12825   with_scroll_hints=yes
12826 fi;
12827 echo "$as_me:12827: result: $with_scroll_hints" >&5
12828 echo "${ECHO_T}$with_scroll_hints" >&6
12829 test "x$with_scroll_hints" = xyes &&
12830 cat >>confdefs.h <<\EOF
12831 #define USE_SCROLL_HINTS 1
12832 EOF
12833
12834 fi
12835
12836 echo "$as_me:12836: checking if you want wgetch-events code" >&5
12837 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
12838
12839 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12840 if test "${enable_wgetch_events+set}" = set; then
12841   enableval="$enable_wgetch_events"
12842   with_wgetch_events=$enableval
12843 else
12844   with_wgetch_events=no
12845 fi;
12846 echo "$as_me:12846: result: $with_wgetch_events" >&5
12847 echo "${ECHO_T}$with_wgetch_events" >&6
12848 test "x$with_wgetch_events" = xyes &&
12849 cat >>confdefs.h <<\EOF
12850 #define NCURSES_WGETCH_EVENTS 1
12851 EOF
12852
12853 ###############################################################################
12854
12855 ###     use option --disable-echo to suppress full display compiling commands
12856
12857 echo "$as_me:12857: checking if you want to see long compiling messages" >&5
12858 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12859
12860 # Check whether --enable-echo or --disable-echo was given.
12861 if test "${enable_echo+set}" = set; then
12862   enableval="$enable_echo"
12863   test "$enableval" != no && enableval=yes
12864         if test "$enableval" != "yes" ; then
12865
12866         ECHO_LT='--silent'
12867         ECHO_LD='@echo linking $@;'
12868         RULE_CC='@echo compiling $<'
12869         SHOW_CC='@echo compiling $@'
12870         ECHO_CC='@'
12871
12872         else
12873
12874         ECHO_LT=''
12875         ECHO_LD=''
12876         RULE_CC=''
12877         SHOW_CC=''
12878         ECHO_CC=''
12879
12880         fi
12881 else
12882   enableval=yes
12883
12884         ECHO_LT=''
12885         ECHO_LD=''
12886         RULE_CC=''
12887         SHOW_CC=''
12888         ECHO_CC=''
12889
12890 fi;
12891 echo "$as_me:12891: result: $enableval" >&5
12892 echo "${ECHO_T}$enableval" >&6
12893
12894 if test "x$enable_echo" = xyes; then
12895         ECHO_LINK=
12896 else
12897         ECHO_LINK='@ echo linking $@ ... ;'
12898         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12899         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12900 fi
12901
12902 ###     use option --enable-warnings to turn on all gcc warnings
12903 echo "$as_me:12903: checking if you want to see compiler warnings" >&5
12904 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12905
12906 # Check whether --enable-warnings or --disable-warnings was given.
12907 if test "${enable_warnings+set}" = set; then
12908   enableval="$enable_warnings"
12909   with_warnings=$enableval
12910 fi;
12911 echo "$as_me:12911: result: $with_warnings" >&5
12912 echo "${ECHO_T}$with_warnings" >&6
12913
12914 if test "x$with_warnings" = "xyes"; then
12915
12916         ADAFLAGS="$ADAFLAGS -gnatg"
12917
12918 INTEL_COMPILER=no
12919
12920 if test "$GCC" = yes ; then
12921         case $host_os in
12922         (linux*|gnu*)
12923                 echo "$as_me:12923: checking if this is really Intel C compiler" >&5
12924 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12925                 cf_save_CFLAGS="$CFLAGS"
12926                 CFLAGS="$CFLAGS -no-gcc"
12927                 cat >conftest.$ac_ext <<_ACEOF
12928 #line 12928 "configure"
12929 #include "confdefs.h"
12930
12931 int
12932 main ()
12933 {
12934
12935 #ifdef __INTEL_COMPILER
12936 #else
12937 make an error
12938 #endif
12939
12940   ;
12941   return 0;
12942 }
12943 _ACEOF
12944 rm -f conftest.$ac_objext
12945 if { (eval echo "$as_me:12945: \"$ac_compile\"") >&5
12946   (eval $ac_compile) 2>&5
12947   ac_status=$?
12948   echo "$as_me:12948: \$? = $ac_status" >&5
12949   (exit $ac_status); } &&
12950          { ac_try='test -s conftest.$ac_objext'
12951   { (eval echo "$as_me:12951: \"$ac_try\"") >&5
12952   (eval $ac_try) 2>&5
12953   ac_status=$?
12954   echo "$as_me:12954: \$? = $ac_status" >&5
12955   (exit $ac_status); }; }; then
12956   INTEL_COMPILER=yes
12957 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12958
12959 else
12960   echo "$as_me: failed program was:" >&5
12961 cat conftest.$ac_ext >&5
12962 fi
12963 rm -f conftest.$ac_objext conftest.$ac_ext
12964                 CFLAGS="$cf_save_CFLAGS"
12965                 echo "$as_me:12965: result: $INTEL_COMPILER" >&5
12966 echo "${ECHO_T}$INTEL_COMPILER" >&6
12967                 ;;
12968         esac
12969 fi
12970
12971 CLANG_COMPILER=no
12972
12973 if test "$GCC" = yes ; then
12974         echo "$as_me:12974: checking if this is really Clang C compiler" >&5
12975 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12976         cf_save_CFLAGS="$CFLAGS"
12977         CFLAGS="$CFLAGS -Qunused-arguments"
12978         cat >conftest.$ac_ext <<_ACEOF
12979 #line 12979 "configure"
12980 #include "confdefs.h"
12981
12982 int
12983 main ()
12984 {
12985
12986 #ifdef __clang__
12987 #else
12988 make an error
12989 #endif
12990
12991   ;
12992   return 0;
12993 }
12994 _ACEOF
12995 rm -f conftest.$ac_objext
12996 if { (eval echo "$as_me:12996: \"$ac_compile\"") >&5
12997   (eval $ac_compile) 2>&5
12998   ac_status=$?
12999   echo "$as_me:12999: \$? = $ac_status" >&5
13000   (exit $ac_status); } &&
13001          { ac_try='test -s conftest.$ac_objext'
13002   { (eval echo "$as_me:13002: \"$ac_try\"") >&5
13003   (eval $ac_try) 2>&5
13004   ac_status=$?
13005   echo "$as_me:13005: \$? = $ac_status" >&5
13006   (exit $ac_status); }; }; then
13007   CLANG_COMPILER=yes
13008 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13009
13010 else
13011   echo "$as_me: failed program was:" >&5
13012 cat conftest.$ac_ext >&5
13013 fi
13014 rm -f conftest.$ac_objext conftest.$ac_ext
13015         CFLAGS="$cf_save_CFLAGS"
13016         echo "$as_me:13016: result: $CLANG_COMPILER" >&5
13017 echo "${ECHO_T}$CLANG_COMPILER" >&6
13018 fi
13019
13020 cat > conftest.$ac_ext <<EOF
13021 #line 13021 "${as_me:-configure}"
13022 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13023 EOF
13024
13025 if test "$INTEL_COMPILER" = yes
13026 then
13027 # The "-wdXXX" options suppress warnings:
13028 # remark #1419: external declaration in primary source file
13029 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13030 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13031 # remark #193: zero used for undefined preprocessing identifier
13032 # remark #593: variable "curs_sb_left_arrow" was set but never used
13033 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13034 # remark #869: parameter "tw" was never referenced
13035 # remark #981: operands are evaluated in unspecified order
13036 # warning #279: controlling expression is constant
13037
13038         { echo "$as_me:13038: checking for $CC warning options..." >&5
13039 echo "$as_me: checking for $CC warning options..." >&6;}
13040         cf_save_CFLAGS="$CFLAGS"
13041         EXTRA_CFLAGS="-Wall"
13042         for cf_opt in \
13043                 wd1419 \
13044                 wd1683 \
13045                 wd1684 \
13046                 wd193 \
13047                 wd593 \
13048                 wd279 \
13049                 wd810 \
13050                 wd869 \
13051                 wd981
13052         do
13053                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13054                 if { (eval echo "$as_me:13054: \"$ac_compile\"") >&5
13055   (eval $ac_compile) 2>&5
13056   ac_status=$?
13057   echo "$as_me:13057: \$? = $ac_status" >&5
13058   (exit $ac_status); }; then
13059                         test -n "$verbose" && echo "$as_me:13059: result: ... -$cf_opt" >&5
13060 echo "${ECHO_T}... -$cf_opt" >&6
13061                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13062                 fi
13063         done
13064         CFLAGS="$cf_save_CFLAGS"
13065
13066 elif test "$GCC" = yes
13067 then
13068         { echo "$as_me:13068: checking for $CC warning options..." >&5
13069 echo "$as_me: checking for $CC warning options..." >&6;}
13070         cf_save_CFLAGS="$CFLAGS"
13071         EXTRA_CFLAGS=
13072         cf_warn_CONST=""
13073         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
13074         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
13075         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
13076         for cf_opt in W Wall \
13077                 Wbad-function-cast \
13078                 Wcast-align \
13079                 Wcast-qual \
13080                 Wdeclaration-after-statement \
13081                 Wextra \
13082                 Winline \
13083                 Wmissing-declarations \
13084                 Wmissing-prototypes \
13085                 Wnested-externs \
13086                 Wpointer-arith \
13087                 Wshadow \
13088                 Wstrict-prototypes \
13089                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
13090         do
13091                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
13092                 if { (eval echo "$as_me:13092: \"$ac_compile\"") >&5
13093   (eval $ac_compile) 2>&5
13094   ac_status=$?
13095   echo "$as_me:13095: \$? = $ac_status" >&5
13096   (exit $ac_status); }; then
13097                         test -n "$verbose" && echo "$as_me:13097: result: ... -$cf_opt" >&5
13098 echo "${ECHO_T}... -$cf_opt" >&6
13099                         case $cf_opt in
13100                         (Wcast-qual)
13101                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
13102                                 ;;
13103                         (Winline)
13104                                 case $GCC_VERSION in
13105                                 ([34].*)
13106                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13107
13108 echo "${as_me:-configure}:13108: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13109
13110                                         continue;;
13111                                 esac
13112                                 ;;
13113                         (Wpointer-arith)
13114                                 case $GCC_VERSION in
13115                                 ([12].*)
13116                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
13117
13118 echo "${as_me:-configure}:13118: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
13119
13120                                         continue;;
13121                                 esac
13122                                 ;;
13123                         esac
13124                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
13125                 fi
13126         done
13127         CFLAGS="$cf_save_CFLAGS"
13128 fi
13129 rm -rf conftest*
13130
13131         if test "x$cf_with_cxx" = xyes ; then
13132
13133 INTEL_CPLUSPLUS=no
13134
13135 if test "$GCC" = yes ; then
13136         case $host_os in
13137         (linux*|gnu*)
13138                 echo "$as_me:13138: checking if this is really Intel C++ compiler" >&5
13139 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
13140                 cf_save_CFLAGS="$CXXFLAGS"
13141                 CXXFLAGS="$CXXFLAGS -no-gcc"
13142                 cat >conftest.$ac_ext <<_ACEOF
13143 #line 13143 "configure"
13144 #include "confdefs.h"
13145
13146 int
13147 main ()
13148 {
13149
13150 #ifdef __INTEL_COMPILER
13151 #else
13152 make an error
13153 #endif
13154
13155   ;
13156   return 0;
13157 }
13158 _ACEOF
13159 rm -f conftest.$ac_objext
13160 if { (eval echo "$as_me:13160: \"$ac_compile\"") >&5
13161   (eval $ac_compile) 2>&5
13162   ac_status=$?
13163   echo "$as_me:13163: \$? = $ac_status" >&5
13164   (exit $ac_status); } &&
13165          { ac_try='test -s conftest.$ac_objext'
13166   { (eval echo "$as_me:13166: \"$ac_try\"") >&5
13167   (eval $ac_try) 2>&5
13168   ac_status=$?
13169   echo "$as_me:13169: \$? = $ac_status" >&5
13170   (exit $ac_status); }; }; then
13171   INTEL_CPLUSPLUS=yes
13172 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
13173
13174 else
13175   echo "$as_me: failed program was:" >&5
13176 cat conftest.$ac_ext >&5
13177 fi
13178 rm -f conftest.$ac_objext conftest.$ac_ext
13179                 CXXFLAGS="$cf_save_CFLAGS"
13180                 echo "$as_me:13180: result: $INTEL_CPLUSPLUS" >&5
13181 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
13182                 ;;
13183         esac
13184 fi
13185
13186 CLANG_CPLUSPLUS=no
13187
13188 if test "$GCC" = yes ; then
13189         echo "$as_me:13189: checking if this is really Clang C++ compiler" >&5
13190 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
13191         cf_save_CFLAGS="$CXXFLAGS"
13192         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
13193         cat >conftest.$ac_ext <<_ACEOF
13194 #line 13194 "configure"
13195 #include "confdefs.h"
13196
13197 int
13198 main ()
13199 {
13200
13201 #ifdef __clang__
13202 #else
13203 make an error
13204 #endif
13205
13206   ;
13207   return 0;
13208 }
13209 _ACEOF
13210 rm -f conftest.$ac_objext
13211 if { (eval echo "$as_me:13211: \"$ac_compile\"") >&5
13212   (eval $ac_compile) 2>&5
13213   ac_status=$?
13214   echo "$as_me:13214: \$? = $ac_status" >&5
13215   (exit $ac_status); } &&
13216          { ac_try='test -s conftest.$ac_objext'
13217   { (eval echo "$as_me:13217: \"$ac_try\"") >&5
13218   (eval $ac_try) 2>&5
13219   ac_status=$?
13220   echo "$as_me:13220: \$? = $ac_status" >&5
13221   (exit $ac_status); }; }; then
13222   CLANG_CPLUSPLUS=yes
13223 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
13224
13225 else
13226   echo "$as_me: failed program was:" >&5
13227 cat conftest.$ac_ext >&5
13228 fi
13229 rm -f conftest.$ac_objext conftest.$ac_ext
13230         CXXFLAGS="$cf_save_CFLAGS"
13231         echo "$as_me:13231: result: $CLANG_CPLUSPLUS" >&5
13232 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
13233 fi
13234
13235 ac_ext=cc
13236 ac_cpp='$CXXCPP $CPPFLAGS'
13237 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13238 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13239 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13240 ac_main_return=return
13241
13242 cat > conftest.$ac_ext <<EOF
13243 #line 13243 "configure"
13244 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
13245 EOF
13246
13247 if test "$INTEL_CPLUSPLUS" = yes
13248 then
13249 # The "-wdXXX" options suppress warnings:
13250 # remark #1419: external declaration in primary source file
13251 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13252 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
13253 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
13254 # remark #193: zero used for undefined preprocessing identifier
13255 # remark #593: variable "curs_sb_left_arrow" was set but never used
13256 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
13257 # remark #869: parameter "tw" was never referenced
13258 # remark #981: operands are evaluated in unspecified order
13259 # warning #269: invalid format string conversion
13260
13261         { echo "$as_me:13261: checking for $CC warning options..." >&5
13262 echo "$as_me: checking for $CC warning options..." >&6;}
13263         cf_save_CXXFLAGS="$CXXFLAGS"
13264         EXTRA_CXXFLAGS="-Wall"
13265         for cf_opt in \
13266                 wd1419 \
13267                 wd1682 \
13268                 wd1683 \
13269                 wd1684 \
13270                 wd193 \
13271                 wd279 \
13272                 wd593 \
13273                 wd810 \
13274                 wd869 \
13275                 wd981
13276         do
13277                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
13278                 if { (eval echo "$as_me:13278: \"$ac_compile\"") >&5
13279   (eval $ac_compile) 2>&5
13280   ac_status=$?
13281   echo "$as_me:13281: \$? = $ac_status" >&5
13282   (exit $ac_status); }; then
13283                         test -n "$verbose" && echo "$as_me:13283: result: ... -$cf_opt" >&5
13284 echo "${ECHO_T}... -$cf_opt" >&6
13285                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13286                 fi
13287         done
13288         CXXFLAGS="$cf_save_CXXFLAGS"
13289
13290 elif test "$GXX" = yes
13291 then
13292         { echo "$as_me:13292: checking for $CXX warning options..." >&5
13293 echo "$as_me: checking for $CXX warning options..." >&6;}
13294         cf_save_CXXFLAGS="$CXXFLAGS"
13295         EXTRA_CXXFLAGS="-W -Wall"
13296         cf_gxx_extra_warnings=""
13297         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
13298         case "$GCC_VERSION" in
13299         ([1-2].*)
13300                 ;;
13301         (*)
13302                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
13303                 ;;
13304         esac
13305         for cf_opt in \
13306                 Wabi \
13307                 fabi-version=0 \
13308                 Wextra \
13309                 Wignored-qualifiers \
13310                 Wlogical-op \
13311                 Woverloaded-virtual \
13312                 Wsign-promo \
13313                 Wsynth \
13314                 Wold-style-cast \
13315                 Wcast-align \
13316                 Wcast-qual \
13317                 Wpointer-arith \
13318                 Wshadow \
13319                 Wundef $cf_gxx_extra_warnings Wno-unused
13320         do
13321                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
13322                 if { (eval echo "$as_me:13322: \"$ac_compile\"") >&5
13323   (eval $ac_compile) 2>&5
13324   ac_status=$?
13325   echo "$as_me:13325: \$? = $ac_status" >&5
13326   (exit $ac_status); }; then
13327                         test -n "$verbose" && echo "$as_me:13327: result: ... -$cf_opt" >&5
13328 echo "${ECHO_T}... -$cf_opt" >&6
13329                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
13330                 else
13331                         test -n "$verbose" && echo "$as_me:13331: result: ... no -$cf_opt" >&5
13332 echo "${ECHO_T}... no -$cf_opt" >&6
13333                 fi
13334         done
13335         CXXFLAGS="$cf_save_CXXFLAGS"
13336 fi
13337
13338 rm -rf conftest*
13339 ac_ext=c
13340 ac_cpp='$CPP $CPPFLAGS'
13341 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13342 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13343 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13344 ac_main_return=return
13345
13346         fi
13347 fi
13348
13349 if test "$GCC" = yes
13350 then
13351 cat > conftest.i <<EOF
13352 #ifndef GCC_PRINTF
13353 #define GCC_PRINTF 0
13354 #endif
13355 #ifndef GCC_SCANF
13356 #define GCC_SCANF 0
13357 #endif
13358 #ifndef GCC_NORETURN
13359 #define GCC_NORETURN /* nothing */
13360 #endif
13361 #ifndef GCC_UNUSED
13362 #define GCC_UNUSED /* nothing */
13363 #endif
13364 EOF
13365 if test "$GCC" = yes
13366 then
13367         { echo "$as_me:13367: checking for $CC __attribute__ directives..." >&5
13368 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
13369 cat > conftest.$ac_ext <<EOF
13370 #line 13370 "${as_me:-configure}"
13371 #include "confdefs.h"
13372 #include "conftest.h"
13373 #include "conftest.i"
13374 #if     GCC_PRINTF
13375 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
13376 #else
13377 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
13378 #endif
13379 #if     GCC_SCANF
13380 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
13381 #else
13382 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
13383 #endif
13384 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
13385 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
13386 extern void foo(void) GCC_NORETURN;
13387 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
13388 EOF
13389         cf_printf_attribute=no
13390         cf_scanf_attribute=no
13391         for cf_attribute in scanf printf unused noreturn
13392         do
13393
13394 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13395
13396                 cf_directive="__attribute__(($cf_attribute))"
13397                 echo "checking for $CC $cf_directive" 1>&5
13398
13399                 case $cf_attribute in
13400                 (printf)
13401                         cf_printf_attribute=yes
13402                         cat >conftest.h <<EOF
13403 #define GCC_$cf_ATTRIBUTE 1
13404 EOF
13405                         ;;
13406                 (scanf)
13407                         cf_scanf_attribute=yes
13408                         cat >conftest.h <<EOF
13409 #define GCC_$cf_ATTRIBUTE 1
13410 EOF
13411                         ;;
13412                 (*)
13413                         cat >conftest.h <<EOF
13414 #define GCC_$cf_ATTRIBUTE $cf_directive
13415 EOF
13416                         ;;
13417                 esac
13418
13419                 if { (eval echo "$as_me:13419: \"$ac_compile\"") >&5
13420   (eval $ac_compile) 2>&5
13421   ac_status=$?
13422   echo "$as_me:13422: \$? = $ac_status" >&5
13423   (exit $ac_status); }; then
13424                         test -n "$verbose" && echo "$as_me:13424: result: ... $cf_attribute" >&5
13425 echo "${ECHO_T}... $cf_attribute" >&6
13426                         cat conftest.h >>confdefs.h
13427                         case $cf_attribute in
13428                         (noreturn)
13429
13430 cat >>confdefs.h <<EOF
13431 #define GCC_NORETURN $cf_directive
13432 EOF
13433
13434                                 ;;
13435                         (printf)
13436                                 cf_value='/* nothing */'
13437                                 if test "$cf_printf_attribute" != no ; then
13438                                         cf_value='__attribute__((format(printf,fmt,var)))'
13439
13440 cat >>confdefs.h <<\EOF
13441 #define GCC_PRINTF 1
13442 EOF
13443
13444                                 fi
13445
13446 cat >>confdefs.h <<EOF
13447 #define GCC_PRINTFLIKE(fmt,var) $cf_value
13448 EOF
13449
13450                                 ;;
13451                         (scanf)
13452                                 cf_value='/* nothing */'
13453                                 if test "$cf_scanf_attribute" != no ; then
13454                                         cf_value='__attribute__((format(scanf,fmt,var)))'
13455
13456 cat >>confdefs.h <<\EOF
13457 #define GCC_SCANF 1
13458 EOF
13459
13460                                 fi
13461
13462 cat >>confdefs.h <<EOF
13463 #define GCC_SCANFLIKE(fmt,var) $cf_value
13464 EOF
13465
13466                                 ;;
13467                         (unused)
13468
13469 cat >>confdefs.h <<EOF
13470 #define GCC_UNUSED $cf_directive
13471 EOF
13472
13473                                 ;;
13474                         esac
13475                 fi
13476         done
13477 else
13478         fgrep define conftest.i >>confdefs.h
13479 fi
13480 rm -rf conftest*
13481 fi
13482
13483 echo "$as_me:13483: checking if you want to work around bogus compiler/loader warnings" >&5
13484 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
13485
13486 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13487 if test "${enable_string_hacks+set}" = set; then
13488   enableval="$enable_string_hacks"
13489   with_string_hacks=$enableval
13490 else
13491   with_string_hacks=no
13492 fi;
13493 echo "$as_me:13493: result: $with_string_hacks" >&5
13494 echo "${ECHO_T}$with_string_hacks" >&6
13495
13496 if test "x$with_string_hacks" = "xyes"; then
13497
13498 cat >>confdefs.h <<\EOF
13499 #define USE_STRING_HACKS 1
13500 EOF
13501
13502         { echo "$as_me:13502: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13503 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13504
13505 for ac_func in strlcat strlcpy snprintf
13506 do
13507 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13508 echo "$as_me:13508: checking for $ac_func" >&5
13509 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13510 if eval "test \"\${$as_ac_var+set}\" = set"; then
13511   echo $ECHO_N "(cached) $ECHO_C" >&6
13512 else
13513   cat >conftest.$ac_ext <<_ACEOF
13514 #line 13514 "configure"
13515 #include "confdefs.h"
13516 /* System header to define __stub macros and hopefully few prototypes,
13517     which can conflict with char $ac_func (); below.  */
13518 #include <assert.h>
13519 /* Override any gcc2 internal prototype to avoid an error.  */
13520 #ifdef __cplusplus
13521 extern "C"
13522 #endif
13523 /* We use char because int might match the return type of a gcc2
13524    builtin and then its argument prototype would still apply.  */
13525 char $ac_func ();
13526 char (*f) ();
13527
13528 int
13529 main ()
13530 {
13531 /* The GNU C library defines this for functions which it implements
13532     to always fail with ENOSYS.  Some functions are actually named
13533     something starting with __ and the normal name is an alias.  */
13534 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13535 choke me
13536 #else
13537 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13538 #endif
13539
13540   ;
13541   return 0;
13542 }
13543 _ACEOF
13544 rm -f conftest.$ac_objext conftest$ac_exeext
13545 if { (eval echo "$as_me:13545: \"$ac_link\"") >&5
13546   (eval $ac_link) 2>&5
13547   ac_status=$?
13548   echo "$as_me:13548: \$? = $ac_status" >&5
13549   (exit $ac_status); } &&
13550          { ac_try='test -s conftest$ac_exeext'
13551   { (eval echo "$as_me:13551: \"$ac_try\"") >&5
13552   (eval $ac_try) 2>&5
13553   ac_status=$?
13554   echo "$as_me:13554: \$? = $ac_status" >&5
13555   (exit $ac_status); }; }; then
13556   eval "$as_ac_var=yes"
13557 else
13558   echo "$as_me: failed program was:" >&5
13559 cat conftest.$ac_ext >&5
13560 eval "$as_ac_var=no"
13561 fi
13562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13563 fi
13564 echo "$as_me:13564: result: `eval echo '${'$as_ac_var'}'`" >&5
13565 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13566 if test `eval echo '${'$as_ac_var'}'` = yes; then
13567   cat >>confdefs.h <<EOF
13568 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13569 EOF
13570
13571 fi
13572 done
13573
13574 fi
13575
13576 ###     use option --enable-assertions to turn on generation of assertion code
13577 echo "$as_me:13577: checking if you want to enable runtime assertions" >&5
13578 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13579
13580 # Check whether --enable-assertions or --disable-assertions was given.
13581 if test "${enable_assertions+set}" = set; then
13582   enableval="$enable_assertions"
13583   with_assertions=$enableval
13584 else
13585   with_assertions=no
13586 fi;
13587 echo "$as_me:13587: result: $with_assertions" >&5
13588 echo "${ECHO_T}$with_assertions" >&6
13589 if test -n "$GCC"
13590 then
13591         if test "$with_assertions" = no
13592         then
13593                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13594         else
13595
13596         ADAFLAGS="$ADAFLAGS -gnata"
13597
13598         fi
13599 fi
13600
13601 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13602
13603 echo "$as_me:13603: checking if you want to use dmalloc for testing" >&5
13604 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13605
13606 # Check whether --with-dmalloc or --without-dmalloc was given.
13607 if test "${with_dmalloc+set}" = set; then
13608   withval="$with_dmalloc"
13609
13610 cat >>confdefs.h <<EOF
13611 #define USE_DMALLOC 1
13612 EOF
13613
13614         : ${with_cflags:=-g}
13615         : ${with_no_leaks:=yes}
13616          with_dmalloc=yes
13617 else
13618   with_dmalloc=
13619 fi;
13620 echo "$as_me:13620: result: ${with_dmalloc:-no}" >&5
13621 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13622
13623 case .$with_cflags in
13624 (.*-g*)
13625         case .$CFLAGS in
13626         (.*-g*)
13627                 ;;
13628         (*)
13629
13630 cf_fix_cppflags=no
13631 cf_new_cflags=
13632 cf_new_cppflags=
13633 cf_new_extra_cppflags=
13634
13635 for cf_add_cflags in -g
13636 do
13637 case $cf_fix_cppflags in
13638 (no)
13639         case $cf_add_cflags in
13640         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13641                 case $cf_add_cflags in
13642                 (-D*)
13643                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13644
13645                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13646                                 && test -z "${cf_tst_cflags}" \
13647                                 && cf_fix_cppflags=yes
13648
13649                         if test $cf_fix_cppflags = yes ; then
13650                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13651                                 continue
13652                         elif test "${cf_tst_cflags}" = "\"'" ; then
13653                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13654                                 continue
13655                         fi
13656                         ;;
13657                 esac
13658                 case "$CPPFLAGS" in
13659                 (*$cf_add_cflags)
13660                         ;;
13661                 (*)
13662                         case $cf_add_cflags in
13663                         (-D*)
13664                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13665
13666 CPPFLAGS=`echo "$CPPFLAGS" | \
13667         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13668                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13669
13670                                 ;;
13671                         esac
13672                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13673                         ;;
13674                 esac
13675                 ;;
13676         (*)
13677                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13678                 ;;
13679         esac
13680         ;;
13681 (yes)
13682         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13683
13684         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13685
13686         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13687                 && test -z "${cf_tst_cflags}" \
13688                 && cf_fix_cppflags=no
13689         ;;
13690 esac
13691 done
13692
13693 if test -n "$cf_new_cflags" ; then
13694
13695         CFLAGS="$CFLAGS $cf_new_cflags"
13696 fi
13697
13698 if test -n "$cf_new_cppflags" ; then
13699
13700         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13701 fi
13702
13703 if test -n "$cf_new_extra_cppflags" ; then
13704
13705         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13706 fi
13707
13708                 ;;
13709         esac
13710         ;;
13711 esac
13712
13713 if test "$with_dmalloc" = yes ; then
13714         echo "$as_me:13714: checking for dmalloc.h" >&5
13715 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13716 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13717   echo $ECHO_N "(cached) $ECHO_C" >&6
13718 else
13719   cat >conftest.$ac_ext <<_ACEOF
13720 #line 13720 "configure"
13721 #include "confdefs.h"
13722 #include <dmalloc.h>
13723 _ACEOF
13724 if { (eval echo "$as_me:13724: \"$ac_cpp conftest.$ac_ext\"") >&5
13725   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13726   ac_status=$?
13727   egrep -v '^ *\+' conftest.er1 >conftest.err
13728   rm -f conftest.er1
13729   cat conftest.err >&5
13730   echo "$as_me:13730: \$? = $ac_status" >&5
13731   (exit $ac_status); } >/dev/null; then
13732   if test -s conftest.err; then
13733     ac_cpp_err=$ac_c_preproc_warn_flag
13734   else
13735     ac_cpp_err=
13736   fi
13737 else
13738   ac_cpp_err=yes
13739 fi
13740 if test -z "$ac_cpp_err"; then
13741   ac_cv_header_dmalloc_h=yes
13742 else
13743   echo "$as_me: failed program was:" >&5
13744   cat conftest.$ac_ext >&5
13745   ac_cv_header_dmalloc_h=no
13746 fi
13747 rm -f conftest.err conftest.$ac_ext
13748 fi
13749 echo "$as_me:13749: result: $ac_cv_header_dmalloc_h" >&5
13750 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13751 if test $ac_cv_header_dmalloc_h = yes; then
13752
13753 echo "$as_me:13753: checking for dmalloc_debug in -ldmalloc" >&5
13754 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13755 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13756   echo $ECHO_N "(cached) $ECHO_C" >&6
13757 else
13758   ac_check_lib_save_LIBS=$LIBS
13759 LIBS="-ldmalloc  $LIBS"
13760 cat >conftest.$ac_ext <<_ACEOF
13761 #line 13761 "configure"
13762 #include "confdefs.h"
13763
13764 /* Override any gcc2 internal prototype to avoid an error.  */
13765 #ifdef __cplusplus
13766 extern "C"
13767 #endif
13768 /* We use char because int might match the return type of a gcc2
13769    builtin and then its argument prototype would still apply.  */
13770 char dmalloc_debug ();
13771 int
13772 main ()
13773 {
13774 dmalloc_debug ();
13775   ;
13776   return 0;
13777 }
13778 _ACEOF
13779 rm -f conftest.$ac_objext conftest$ac_exeext
13780 if { (eval echo "$as_me:13780: \"$ac_link\"") >&5
13781   (eval $ac_link) 2>&5
13782   ac_status=$?
13783   echo "$as_me:13783: \$? = $ac_status" >&5
13784   (exit $ac_status); } &&
13785          { ac_try='test -s conftest$ac_exeext'
13786   { (eval echo "$as_me:13786: \"$ac_try\"") >&5
13787   (eval $ac_try) 2>&5
13788   ac_status=$?
13789   echo "$as_me:13789: \$? = $ac_status" >&5
13790   (exit $ac_status); }; }; then
13791   ac_cv_lib_dmalloc_dmalloc_debug=yes
13792 else
13793   echo "$as_me: failed program was:" >&5
13794 cat conftest.$ac_ext >&5
13795 ac_cv_lib_dmalloc_dmalloc_debug=no
13796 fi
13797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13798 LIBS=$ac_check_lib_save_LIBS
13799 fi
13800 echo "$as_me:13800: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13801 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13802 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13803   cat >>confdefs.h <<EOF
13804 #define HAVE_LIBDMALLOC 1
13805 EOF
13806
13807   LIBS="-ldmalloc $LIBS"
13808
13809 fi
13810
13811 fi
13812
13813 fi
13814
13815 echo "$as_me:13815: checking if you want to use dbmalloc for testing" >&5
13816 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13817
13818 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13819 if test "${with_dbmalloc+set}" = set; then
13820   withval="$with_dbmalloc"
13821
13822 cat >>confdefs.h <<EOF
13823 #define USE_DBMALLOC 1
13824 EOF
13825
13826         : ${with_cflags:=-g}
13827         : ${with_no_leaks:=yes}
13828          with_dbmalloc=yes
13829 else
13830   with_dbmalloc=
13831 fi;
13832 echo "$as_me:13832: result: ${with_dbmalloc:-no}" >&5
13833 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13834
13835 case .$with_cflags in
13836 (.*-g*)
13837         case .$CFLAGS in
13838         (.*-g*)
13839                 ;;
13840         (*)
13841
13842 cf_fix_cppflags=no
13843 cf_new_cflags=
13844 cf_new_cppflags=
13845 cf_new_extra_cppflags=
13846
13847 for cf_add_cflags in -g
13848 do
13849 case $cf_fix_cppflags in
13850 (no)
13851         case $cf_add_cflags in
13852         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13853                 case $cf_add_cflags in
13854                 (-D*)
13855                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13856
13857                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13858                                 && test -z "${cf_tst_cflags}" \
13859                                 && cf_fix_cppflags=yes
13860
13861                         if test $cf_fix_cppflags = yes ; then
13862                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13863                                 continue
13864                         elif test "${cf_tst_cflags}" = "\"'" ; then
13865                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13866                                 continue
13867                         fi
13868                         ;;
13869                 esac
13870                 case "$CPPFLAGS" in
13871                 (*$cf_add_cflags)
13872                         ;;
13873                 (*)
13874                         case $cf_add_cflags in
13875                         (-D*)
13876                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13877
13878 CPPFLAGS=`echo "$CPPFLAGS" | \
13879         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13880                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13881
13882                                 ;;
13883                         esac
13884                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13885                         ;;
13886                 esac
13887                 ;;
13888         (*)
13889                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13890                 ;;
13891         esac
13892         ;;
13893 (yes)
13894         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13895
13896         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13897
13898         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13899                 && test -z "${cf_tst_cflags}" \
13900                 && cf_fix_cppflags=no
13901         ;;
13902 esac
13903 done
13904
13905 if test -n "$cf_new_cflags" ; then
13906
13907         CFLAGS="$CFLAGS $cf_new_cflags"
13908 fi
13909
13910 if test -n "$cf_new_cppflags" ; then
13911
13912         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13913 fi
13914
13915 if test -n "$cf_new_extra_cppflags" ; then
13916
13917         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13918 fi
13919
13920                 ;;
13921         esac
13922         ;;
13923 esac
13924
13925 if test "$with_dbmalloc" = yes ; then
13926         echo "$as_me:13926: checking for dbmalloc.h" >&5
13927 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13928 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13929   echo $ECHO_N "(cached) $ECHO_C" >&6
13930 else
13931   cat >conftest.$ac_ext <<_ACEOF
13932 #line 13932 "configure"
13933 #include "confdefs.h"
13934 #include <dbmalloc.h>
13935 _ACEOF
13936 if { (eval echo "$as_me:13936: \"$ac_cpp conftest.$ac_ext\"") >&5
13937   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13938   ac_status=$?
13939   egrep -v '^ *\+' conftest.er1 >conftest.err
13940   rm -f conftest.er1
13941   cat conftest.err >&5
13942   echo "$as_me:13942: \$? = $ac_status" >&5
13943   (exit $ac_status); } >/dev/null; then
13944   if test -s conftest.err; then
13945     ac_cpp_err=$ac_c_preproc_warn_flag
13946   else
13947     ac_cpp_err=
13948   fi
13949 else
13950   ac_cpp_err=yes
13951 fi
13952 if test -z "$ac_cpp_err"; then
13953   ac_cv_header_dbmalloc_h=yes
13954 else
13955   echo "$as_me: failed program was:" >&5
13956   cat conftest.$ac_ext >&5
13957   ac_cv_header_dbmalloc_h=no
13958 fi
13959 rm -f conftest.err conftest.$ac_ext
13960 fi
13961 echo "$as_me:13961: result: $ac_cv_header_dbmalloc_h" >&5
13962 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13963 if test $ac_cv_header_dbmalloc_h = yes; then
13964
13965 echo "$as_me:13965: checking for debug_malloc in -ldbmalloc" >&5
13966 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13967 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13968   echo $ECHO_N "(cached) $ECHO_C" >&6
13969 else
13970   ac_check_lib_save_LIBS=$LIBS
13971 LIBS="-ldbmalloc  $LIBS"
13972 cat >conftest.$ac_ext <<_ACEOF
13973 #line 13973 "configure"
13974 #include "confdefs.h"
13975
13976 /* Override any gcc2 internal prototype to avoid an error.  */
13977 #ifdef __cplusplus
13978 extern "C"
13979 #endif
13980 /* We use char because int might match the return type of a gcc2
13981    builtin and then its argument prototype would still apply.  */
13982 char debug_malloc ();
13983 int
13984 main ()
13985 {
13986 debug_malloc ();
13987   ;
13988   return 0;
13989 }
13990 _ACEOF
13991 rm -f conftest.$ac_objext conftest$ac_exeext
13992 if { (eval echo "$as_me:13992: \"$ac_link\"") >&5
13993   (eval $ac_link) 2>&5
13994   ac_status=$?
13995   echo "$as_me:13995: \$? = $ac_status" >&5
13996   (exit $ac_status); } &&
13997          { ac_try='test -s conftest$ac_exeext'
13998   { (eval echo "$as_me:13998: \"$ac_try\"") >&5
13999   (eval $ac_try) 2>&5
14000   ac_status=$?
14001   echo "$as_me:14001: \$? = $ac_status" >&5
14002   (exit $ac_status); }; }; then
14003   ac_cv_lib_dbmalloc_debug_malloc=yes
14004 else
14005   echo "$as_me: failed program was:" >&5
14006 cat conftest.$ac_ext >&5
14007 ac_cv_lib_dbmalloc_debug_malloc=no
14008 fi
14009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14010 LIBS=$ac_check_lib_save_LIBS
14011 fi
14012 echo "$as_me:14012: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
14013 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
14014 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
14015   cat >>confdefs.h <<EOF
14016 #define HAVE_LIBDBMALLOC 1
14017 EOF
14018
14019   LIBS="-ldbmalloc $LIBS"
14020
14021 fi
14022
14023 fi
14024
14025 fi
14026
14027 echo "$as_me:14027: checking if you want to use valgrind for testing" >&5
14028 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
14029
14030 # Check whether --with-valgrind or --without-valgrind was given.
14031 if test "${with_valgrind+set}" = set; then
14032   withval="$with_valgrind"
14033
14034 cat >>confdefs.h <<EOF
14035 #define USE_VALGRIND 1
14036 EOF
14037
14038         : ${with_cflags:=-g}
14039         : ${with_no_leaks:=yes}
14040          with_valgrind=yes
14041 else
14042   with_valgrind=
14043 fi;
14044 echo "$as_me:14044: result: ${with_valgrind:-no}" >&5
14045 echo "${ECHO_T}${with_valgrind:-no}" >&6
14046
14047 case .$with_cflags in
14048 (.*-g*)
14049         case .$CFLAGS in
14050         (.*-g*)
14051                 ;;
14052         (*)
14053
14054 cf_fix_cppflags=no
14055 cf_new_cflags=
14056 cf_new_cppflags=
14057 cf_new_extra_cppflags=
14058
14059 for cf_add_cflags in -g
14060 do
14061 case $cf_fix_cppflags in
14062 (no)
14063         case $cf_add_cflags in
14064         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14065                 case $cf_add_cflags in
14066                 (-D*)
14067                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14068
14069                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14070                                 && test -z "${cf_tst_cflags}" \
14071                                 && cf_fix_cppflags=yes
14072
14073                         if test $cf_fix_cppflags = yes ; then
14074                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14075                                 continue
14076                         elif test "${cf_tst_cflags}" = "\"'" ; then
14077                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14078                                 continue
14079                         fi
14080                         ;;
14081                 esac
14082                 case "$CPPFLAGS" in
14083                 (*$cf_add_cflags)
14084                         ;;
14085                 (*)
14086                         case $cf_add_cflags in
14087                         (-D*)
14088                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14089
14090 CPPFLAGS=`echo "$CPPFLAGS" | \
14091         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14092                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14093
14094                                 ;;
14095                         esac
14096                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14097                         ;;
14098                 esac
14099                 ;;
14100         (*)
14101                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14102                 ;;
14103         esac
14104         ;;
14105 (yes)
14106         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14107
14108         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14109
14110         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14111                 && test -z "${cf_tst_cflags}" \
14112                 && cf_fix_cppflags=no
14113         ;;
14114 esac
14115 done
14116
14117 if test -n "$cf_new_cflags" ; then
14118
14119         CFLAGS="$CFLAGS $cf_new_cflags"
14120 fi
14121
14122 if test -n "$cf_new_cppflags" ; then
14123
14124         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14125 fi
14126
14127 if test -n "$cf_new_extra_cppflags" ; then
14128
14129         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14130 fi
14131
14132                 ;;
14133         esac
14134         ;;
14135 esac
14136
14137 echo "$as_me:14137: checking if you want to perform memory-leak testing" >&5
14138 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
14139
14140 # Check whether --enable-leaks or --disable-leaks was given.
14141 if test "${enable_leaks+set}" = set; then
14142   enableval="$enable_leaks"
14143   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
14144 else
14145   : ${with_no_leaks:=no}
14146 fi;
14147 echo "$as_me:14147: result: $with_no_leaks" >&5
14148 echo "${ECHO_T}$with_no_leaks" >&6
14149
14150 if test "$with_no_leaks" = yes ; then
14151
14152 cat >>confdefs.h <<\EOF
14153 #define NO_LEAKS 1
14154 EOF
14155
14156 cat >>confdefs.h <<\EOF
14157 #define YY_NO_LEAKS 1
14158 EOF
14159
14160 fi
14161
14162 cat >>confdefs.h <<\EOF
14163 #define HAVE_NC_ALLOC_H 1
14164 EOF
14165
14166 ###     use option --enable-expanded to generate certain macros as functions
14167
14168 # Check whether --enable-expanded or --disable-expanded was given.
14169 if test "${enable_expanded+set}" = set; then
14170   enableval="$enable_expanded"
14171   test "x$enableval" = xyes &&
14172 cat >>confdefs.h <<\EOF
14173 #define NCURSES_EXPANDED 1
14174 EOF
14175
14176 fi;
14177
14178 ###     use option --disable-macros to suppress macros in favor of functions
14179
14180 # Check whether --enable-macros or --disable-macros was given.
14181 if test "${enable_macros+set}" = set; then
14182   enableval="$enable_macros"
14183   test "$enableval" = no &&
14184 cat >>confdefs.h <<\EOF
14185 #define NCURSES_NOMACROS 1
14186 EOF
14187
14188 fi;
14189
14190 # Normally we only add trace() to the debug-library.  Allow this to be
14191 # extended to all models of the ncurses library:
14192 cf_all_traces=no
14193 case "$CFLAGS $CPPFLAGS" in
14194 (*-DTRACE*)
14195         cf_all_traces=yes
14196         ;;
14197 esac
14198
14199 echo "$as_me:14199: checking whether to add trace feature to all models" >&5
14200 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
14201
14202 # Check whether --with-trace or --without-trace was given.
14203 if test "${with_trace+set}" = set; then
14204   withval="$with_trace"
14205   cf_with_trace=$withval
14206 else
14207   cf_with_trace=$cf_all_traces
14208 fi;
14209 echo "$as_me:14209: result: $cf_with_trace" >&5
14210 echo "${ECHO_T}$cf_with_trace" >&6
14211
14212 if test "x$cf_with_trace" = xyes ; then
14213         LIB_TRACING=all
14214         ADA_TRACE=TRUE
14215
14216 cf_fix_cppflags=no
14217 cf_new_cflags=
14218 cf_new_cppflags=
14219 cf_new_extra_cppflags=
14220
14221 for cf_add_cflags in -DTRACE
14222 do
14223 case $cf_fix_cppflags in
14224 (no)
14225         case $cf_add_cflags in
14226         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14227                 case $cf_add_cflags in
14228                 (-D*)
14229                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14230
14231                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14232                                 && test -z "${cf_tst_cflags}" \
14233                                 && cf_fix_cppflags=yes
14234
14235                         if test $cf_fix_cppflags = yes ; then
14236                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14237                                 continue
14238                         elif test "${cf_tst_cflags}" = "\"'" ; then
14239                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14240                                 continue
14241                         fi
14242                         ;;
14243                 esac
14244                 case "$CPPFLAGS" in
14245                 (*$cf_add_cflags)
14246                         ;;
14247                 (*)
14248                         case $cf_add_cflags in
14249                         (-D*)
14250                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14251
14252 CPPFLAGS=`echo "$CPPFLAGS" | \
14253         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14254                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14255
14256                                 ;;
14257                         esac
14258                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14259                         ;;
14260                 esac
14261                 ;;
14262         (*)
14263                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14264                 ;;
14265         esac
14266         ;;
14267 (yes)
14268         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14269
14270         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14271
14272         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14273                 && test -z "${cf_tst_cflags}" \
14274                 && cf_fix_cppflags=no
14275         ;;
14276 esac
14277 done
14278
14279 if test -n "$cf_new_cflags" ; then
14280
14281         CFLAGS="$CFLAGS $cf_new_cflags"
14282 fi
14283
14284 if test -n "$cf_new_cppflags" ; then
14285
14286         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14287 fi
14288
14289 if test -n "$cf_new_extra_cppflags" ; then
14290
14291         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14292 fi
14293
14294 else
14295         LIB_TRACING=DEBUG
14296         ADA_TRACE=FALSE
14297 fi
14298
14299 echo "$as_me:14299: checking if we want to use GNAT projects" >&5
14300 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
14301
14302 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
14303 if test "${enable_gnat_projects+set}" = set; then
14304   enableval="$enable_gnat_projects"
14305   test "$enableval" != no && enableval=yes
14306         if test "$enableval" != "yes" ; then
14307     enable_gnat_projects=no
14308         else
14309                 enable_gnat_projects=yes
14310         fi
14311 else
14312   enableval=yes
14313         enable_gnat_projects=yes
14314
14315 fi;
14316 echo "$as_me:14316: result: $enable_gnat_projects" >&5
14317 echo "${ECHO_T}$enable_gnat_projects" >&6
14318
14319 ###     Checks for libraries.
14320 case $cf_cv_system_name in
14321 (*mingw32*|*mingw64*)
14322         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501"
14323         LIBS=" -lpsapi $LIBS"
14324         ;;
14325 (*)
14326 echo "$as_me:14326: checking for gettimeofday" >&5
14327 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
14328 if test "${ac_cv_func_gettimeofday+set}" = set; then
14329   echo $ECHO_N "(cached) $ECHO_C" >&6
14330 else
14331   cat >conftest.$ac_ext <<_ACEOF
14332 #line 14332 "configure"
14333 #include "confdefs.h"
14334 /* System header to define __stub macros and hopefully few prototypes,
14335     which can conflict with char gettimeofday (); below.  */
14336 #include <assert.h>
14337 /* Override any gcc2 internal prototype to avoid an error.  */
14338 #ifdef __cplusplus
14339 extern "C"
14340 #endif
14341 /* We use char because int might match the return type of a gcc2
14342    builtin and then its argument prototype would still apply.  */
14343 char gettimeofday ();
14344 char (*f) ();
14345
14346 int
14347 main ()
14348 {
14349 /* The GNU C library defines this for functions which it implements
14350     to always fail with ENOSYS.  Some functions are actually named
14351     something starting with __ and the normal name is an alias.  */
14352 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
14353 choke me
14354 #else
14355 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14356 #endif
14357
14358   ;
14359   return 0;
14360 }
14361 _ACEOF
14362 rm -f conftest.$ac_objext conftest$ac_exeext
14363 if { (eval echo "$as_me:14363: \"$ac_link\"") >&5
14364   (eval $ac_link) 2>&5
14365   ac_status=$?
14366   echo "$as_me:14366: \$? = $ac_status" >&5
14367   (exit $ac_status); } &&
14368          { ac_try='test -s conftest$ac_exeext'
14369   { (eval echo "$as_me:14369: \"$ac_try\"") >&5
14370   (eval $ac_try) 2>&5
14371   ac_status=$?
14372   echo "$as_me:14372: \$? = $ac_status" >&5
14373   (exit $ac_status); }; }; then
14374   ac_cv_func_gettimeofday=yes
14375 else
14376   echo "$as_me: failed program was:" >&5
14377 cat conftest.$ac_ext >&5
14378 ac_cv_func_gettimeofday=no
14379 fi
14380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14381 fi
14382 echo "$as_me:14382: result: $ac_cv_func_gettimeofday" >&5
14383 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
14384 if test $ac_cv_func_gettimeofday = yes; then
14385
14386 cat >>confdefs.h <<\EOF
14387 #define HAVE_GETTIMEOFDAY 1
14388 EOF
14389
14390 else
14391
14392 echo "$as_me:14392: checking for gettimeofday in -lbsd" >&5
14393 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
14394 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
14395   echo $ECHO_N "(cached) $ECHO_C" >&6
14396 else
14397   ac_check_lib_save_LIBS=$LIBS
14398 LIBS="-lbsd  $LIBS"
14399 cat >conftest.$ac_ext <<_ACEOF
14400 #line 14400 "configure"
14401 #include "confdefs.h"
14402
14403 /* Override any gcc2 internal prototype to avoid an error.  */
14404 #ifdef __cplusplus
14405 extern "C"
14406 #endif
14407 /* We use char because int might match the return type of a gcc2
14408    builtin and then its argument prototype would still apply.  */
14409 char gettimeofday ();
14410 int
14411 main ()
14412 {
14413 gettimeofday ();
14414   ;
14415   return 0;
14416 }
14417 _ACEOF
14418 rm -f conftest.$ac_objext conftest$ac_exeext
14419 if { (eval echo "$as_me:14419: \"$ac_link\"") >&5
14420   (eval $ac_link) 2>&5
14421   ac_status=$?
14422   echo "$as_me:14422: \$? = $ac_status" >&5
14423   (exit $ac_status); } &&
14424          { ac_try='test -s conftest$ac_exeext'
14425   { (eval echo "$as_me:14425: \"$ac_try\"") >&5
14426   (eval $ac_try) 2>&5
14427   ac_status=$?
14428   echo "$as_me:14428: \$? = $ac_status" >&5
14429   (exit $ac_status); }; }; then
14430   ac_cv_lib_bsd_gettimeofday=yes
14431 else
14432   echo "$as_me: failed program was:" >&5
14433 cat conftest.$ac_ext >&5
14434 ac_cv_lib_bsd_gettimeofday=no
14435 fi
14436 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14437 LIBS=$ac_check_lib_save_LIBS
14438 fi
14439 echo "$as_me:14439: result: $ac_cv_lib_bsd_gettimeofday" >&5
14440 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
14441 if test $ac_cv_lib_bsd_gettimeofday = yes; then
14442
14443 cat >>confdefs.h <<\EOF
14444 #define HAVE_GETTIMEOFDAY 1
14445 EOF
14446
14447 cf_add_libs="-lbsd"
14448 # Filter out duplicates - this happens with badly-designed ".pc" files...
14449 for cf_add_1lib in $LIBS
14450 do
14451         for cf_add_2lib in $cf_add_libs
14452         do
14453                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14454                 then
14455                         cf_add_1lib=
14456                         break
14457                 fi
14458         done
14459         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14460 done
14461 LIBS="$cf_add_libs"
14462
14463 fi
14464
14465 fi
14466         ;;
14467 esac
14468
14469 echo "$as_me:14469: checking if -lm needed for math functions" >&5
14470 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
14471 if test "${cf_cv_need_libm+set}" = set; then
14472   echo $ECHO_N "(cached) $ECHO_C" >&6
14473 else
14474
14475         cat >conftest.$ac_ext <<_ACEOF
14476 #line 14476 "configure"
14477 #include "confdefs.h"
14478
14479         #include <stdio.h>
14480         #include <math.h>
14481
14482 int
14483 main ()
14484 {
14485 double x = rand(); printf("result = %g\n", pow(sin(x),x))
14486   ;
14487   return 0;
14488 }
14489 _ACEOF
14490 rm -f conftest.$ac_objext conftest$ac_exeext
14491 if { (eval echo "$as_me:14491: \"$ac_link\"") >&5
14492   (eval $ac_link) 2>&5
14493   ac_status=$?
14494   echo "$as_me:14494: \$? = $ac_status" >&5
14495   (exit $ac_status); } &&
14496          { ac_try='test -s conftest$ac_exeext'
14497   { (eval echo "$as_me:14497: \"$ac_try\"") >&5
14498   (eval $ac_try) 2>&5
14499   ac_status=$?
14500   echo "$as_me:14500: \$? = $ac_status" >&5
14501   (exit $ac_status); }; }; then
14502   cf_cv_need_libm=no
14503 else
14504   echo "$as_me: failed program was:" >&5
14505 cat conftest.$ac_ext >&5
14506 cf_cv_need_libm=yes
14507 fi
14508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14509 fi
14510 echo "$as_me:14510: result: $cf_cv_need_libm" >&5
14511 echo "${ECHO_T}$cf_cv_need_libm" >&6
14512 if test "$cf_cv_need_libm" = yes
14513 then
14514 MATH_LIB=-lm
14515 fi
14516
14517 ###     Checks for header files.
14518 echo "$as_me:14518: checking for ANSI C header files" >&5
14519 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14520 if test "${ac_cv_header_stdc+set}" = set; then
14521   echo $ECHO_N "(cached) $ECHO_C" >&6
14522 else
14523   cat >conftest.$ac_ext <<_ACEOF
14524 #line 14524 "configure"
14525 #include "confdefs.h"
14526 #include <stdlib.h>
14527 #include <stdarg.h>
14528 #include <string.h>
14529 #include <float.h>
14530
14531 _ACEOF
14532 if { (eval echo "$as_me:14532: \"$ac_cpp conftest.$ac_ext\"") >&5
14533   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14534   ac_status=$?
14535   egrep -v '^ *\+' conftest.er1 >conftest.err
14536   rm -f conftest.er1
14537   cat conftest.err >&5
14538   echo "$as_me:14538: \$? = $ac_status" >&5
14539   (exit $ac_status); } >/dev/null; then
14540   if test -s conftest.err; then
14541     ac_cpp_err=$ac_c_preproc_warn_flag
14542   else
14543     ac_cpp_err=
14544   fi
14545 else
14546   ac_cpp_err=yes
14547 fi
14548 if test -z "$ac_cpp_err"; then
14549   ac_cv_header_stdc=yes
14550 else
14551   echo "$as_me: failed program was:" >&5
14552   cat conftest.$ac_ext >&5
14553   ac_cv_header_stdc=no
14554 fi
14555 rm -f conftest.err conftest.$ac_ext
14556
14557 if test $ac_cv_header_stdc = yes; then
14558   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14559   cat >conftest.$ac_ext <<_ACEOF
14560 #line 14560 "configure"
14561 #include "confdefs.h"
14562 #include <string.h>
14563
14564 _ACEOF
14565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14566   egrep "memchr" >/dev/null 2>&1; then
14567   :
14568 else
14569   ac_cv_header_stdc=no
14570 fi
14571 rm -rf conftest*
14572
14573 fi
14574
14575 if test $ac_cv_header_stdc = yes; then
14576   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14577   cat >conftest.$ac_ext <<_ACEOF
14578 #line 14578 "configure"
14579 #include "confdefs.h"
14580 #include <stdlib.h>
14581
14582 _ACEOF
14583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14584   egrep "free" >/dev/null 2>&1; then
14585   :
14586 else
14587   ac_cv_header_stdc=no
14588 fi
14589 rm -rf conftest*
14590
14591 fi
14592
14593 if test $ac_cv_header_stdc = yes; then
14594   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14595   if test "$cross_compiling" = yes; then
14596   :
14597 else
14598   cat >conftest.$ac_ext <<_ACEOF
14599 #line 14599 "configure"
14600 #include "confdefs.h"
14601 #include <ctype.h>
14602 #if ((' ' & 0x0FF) == 0x020)
14603 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14604 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14605 #else
14606 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14607                      || ('j' <= (c) && (c) <= 'r') \
14608                      || ('s' <= (c) && (c) <= 'z'))
14609 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14610 #endif
14611
14612 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14613 int
14614 main ()
14615 {
14616   int i;
14617   for (i = 0; i < 256; i++)
14618     if (XOR (islower (i), ISLOWER (i))
14619         || toupper (i) != TOUPPER (i))
14620       $ac_main_return(2);
14621   $ac_main_return (0);
14622 }
14623 _ACEOF
14624 rm -f conftest$ac_exeext
14625 if { (eval echo "$as_me:14625: \"$ac_link\"") >&5
14626   (eval $ac_link) 2>&5
14627   ac_status=$?
14628   echo "$as_me:14628: \$? = $ac_status" >&5
14629   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14630   { (eval echo "$as_me:14630: \"$ac_try\"") >&5
14631   (eval $ac_try) 2>&5
14632   ac_status=$?
14633   echo "$as_me:14633: \$? = $ac_status" >&5
14634   (exit $ac_status); }; }; then
14635   :
14636 else
14637   echo "$as_me: program exited with status $ac_status" >&5
14638 echo "$as_me: failed program was:" >&5
14639 cat conftest.$ac_ext >&5
14640 ac_cv_header_stdc=no
14641 fi
14642 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14643 fi
14644 fi
14645 fi
14646 echo "$as_me:14646: result: $ac_cv_header_stdc" >&5
14647 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14648 if test $ac_cv_header_stdc = yes; then
14649
14650 cat >>confdefs.h <<\EOF
14651 #define STDC_HEADERS 1
14652 EOF
14653
14654 fi
14655
14656 ac_header_dirent=no
14657 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14658   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14659 echo "$as_me:14659: checking for $ac_hdr that defines DIR" >&5
14660 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14661 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14662   echo $ECHO_N "(cached) $ECHO_C" >&6
14663 else
14664   cat >conftest.$ac_ext <<_ACEOF
14665 #line 14665 "configure"
14666 #include "confdefs.h"
14667 #include <sys/types.h>
14668 #include <$ac_hdr>
14669
14670 int
14671 main ()
14672 {
14673 if ((DIR *) 0)
14674 return 0;
14675   ;
14676   return 0;
14677 }
14678 _ACEOF
14679 rm -f conftest.$ac_objext
14680 if { (eval echo "$as_me:14680: \"$ac_compile\"") >&5
14681   (eval $ac_compile) 2>&5
14682   ac_status=$?
14683   echo "$as_me:14683: \$? = $ac_status" >&5
14684   (exit $ac_status); } &&
14685          { ac_try='test -s conftest.$ac_objext'
14686   { (eval echo "$as_me:14686: \"$ac_try\"") >&5
14687   (eval $ac_try) 2>&5
14688   ac_status=$?
14689   echo "$as_me:14689: \$? = $ac_status" >&5
14690   (exit $ac_status); }; }; then
14691   eval "$as_ac_Header=yes"
14692 else
14693   echo "$as_me: failed program was:" >&5
14694 cat conftest.$ac_ext >&5
14695 eval "$as_ac_Header=no"
14696 fi
14697 rm -f conftest.$ac_objext conftest.$ac_ext
14698 fi
14699 echo "$as_me:14699: result: `eval echo '${'$as_ac_Header'}'`" >&5
14700 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14701 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14702   cat >>confdefs.h <<EOF
14703 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14704 EOF
14705
14706 ac_header_dirent=$ac_hdr; break
14707 fi
14708
14709 done
14710 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14711 if test $ac_header_dirent = dirent.h; then
14712   echo "$as_me:14712: checking for opendir in -ldir" >&5
14713 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14714 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14715   echo $ECHO_N "(cached) $ECHO_C" >&6
14716 else
14717   ac_check_lib_save_LIBS=$LIBS
14718 LIBS="-ldir  $LIBS"
14719 cat >conftest.$ac_ext <<_ACEOF
14720 #line 14720 "configure"
14721 #include "confdefs.h"
14722
14723 /* Override any gcc2 internal prototype to avoid an error.  */
14724 #ifdef __cplusplus
14725 extern "C"
14726 #endif
14727 /* We use char because int might match the return type of a gcc2
14728    builtin and then its argument prototype would still apply.  */
14729 char opendir ();
14730 int
14731 main ()
14732 {
14733 opendir ();
14734   ;
14735   return 0;
14736 }
14737 _ACEOF
14738 rm -f conftest.$ac_objext conftest$ac_exeext
14739 if { (eval echo "$as_me:14739: \"$ac_link\"") >&5
14740   (eval $ac_link) 2>&5
14741   ac_status=$?
14742   echo "$as_me:14742: \$? = $ac_status" >&5
14743   (exit $ac_status); } &&
14744          { ac_try='test -s conftest$ac_exeext'
14745   { (eval echo "$as_me:14745: \"$ac_try\"") >&5
14746   (eval $ac_try) 2>&5
14747   ac_status=$?
14748   echo "$as_me:14748: \$? = $ac_status" >&5
14749   (exit $ac_status); }; }; then
14750   ac_cv_lib_dir_opendir=yes
14751 else
14752   echo "$as_me: failed program was:" >&5
14753 cat conftest.$ac_ext >&5
14754 ac_cv_lib_dir_opendir=no
14755 fi
14756 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14757 LIBS=$ac_check_lib_save_LIBS
14758 fi
14759 echo "$as_me:14759: result: $ac_cv_lib_dir_opendir" >&5
14760 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14761 if test $ac_cv_lib_dir_opendir = yes; then
14762   LIBS="$LIBS -ldir"
14763 fi
14764
14765 else
14766   echo "$as_me:14766: checking for opendir in -lx" >&5
14767 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14768 if test "${ac_cv_lib_x_opendir+set}" = set; then
14769   echo $ECHO_N "(cached) $ECHO_C" >&6
14770 else
14771   ac_check_lib_save_LIBS=$LIBS
14772 LIBS="-lx  $LIBS"
14773 cat >conftest.$ac_ext <<_ACEOF
14774 #line 14774 "configure"
14775 #include "confdefs.h"
14776
14777 /* Override any gcc2 internal prototype to avoid an error.  */
14778 #ifdef __cplusplus
14779 extern "C"
14780 #endif
14781 /* We use char because int might match the return type of a gcc2
14782    builtin and then its argument prototype would still apply.  */
14783 char opendir ();
14784 int
14785 main ()
14786 {
14787 opendir ();
14788   ;
14789   return 0;
14790 }
14791 _ACEOF
14792 rm -f conftest.$ac_objext conftest$ac_exeext
14793 if { (eval echo "$as_me:14793: \"$ac_link\"") >&5
14794   (eval $ac_link) 2>&5
14795   ac_status=$?
14796   echo "$as_me:14796: \$? = $ac_status" >&5
14797   (exit $ac_status); } &&
14798          { ac_try='test -s conftest$ac_exeext'
14799   { (eval echo "$as_me:14799: \"$ac_try\"") >&5
14800   (eval $ac_try) 2>&5
14801   ac_status=$?
14802   echo "$as_me:14802: \$? = $ac_status" >&5
14803   (exit $ac_status); }; }; then
14804   ac_cv_lib_x_opendir=yes
14805 else
14806   echo "$as_me: failed program was:" >&5
14807 cat conftest.$ac_ext >&5
14808 ac_cv_lib_x_opendir=no
14809 fi
14810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14811 LIBS=$ac_check_lib_save_LIBS
14812 fi
14813 echo "$as_me:14813: result: $ac_cv_lib_x_opendir" >&5
14814 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14815 if test $ac_cv_lib_x_opendir = yes; then
14816   LIBS="$LIBS -lx"
14817 fi
14818
14819 fi
14820
14821 echo "$as_me:14821: checking whether time.h and sys/time.h may both be included" >&5
14822 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14823 if test "${ac_cv_header_time+set}" = set; then
14824   echo $ECHO_N "(cached) $ECHO_C" >&6
14825 else
14826   cat >conftest.$ac_ext <<_ACEOF
14827 #line 14827 "configure"
14828 #include "confdefs.h"
14829 #include <sys/types.h>
14830 #include <sys/time.h>
14831 #include <time.h>
14832
14833 int
14834 main ()
14835 {
14836 if ((struct tm *) 0)
14837 return 0;
14838   ;
14839   return 0;
14840 }
14841 _ACEOF
14842 rm -f conftest.$ac_objext
14843 if { (eval echo "$as_me:14843: \"$ac_compile\"") >&5
14844   (eval $ac_compile) 2>&5
14845   ac_status=$?
14846   echo "$as_me:14846: \$? = $ac_status" >&5
14847   (exit $ac_status); } &&
14848          { ac_try='test -s conftest.$ac_objext'
14849   { (eval echo "$as_me:14849: \"$ac_try\"") >&5
14850   (eval $ac_try) 2>&5
14851   ac_status=$?
14852   echo "$as_me:14852: \$? = $ac_status" >&5
14853   (exit $ac_status); }; }; then
14854   ac_cv_header_time=yes
14855 else
14856   echo "$as_me: failed program was:" >&5
14857 cat conftest.$ac_ext >&5
14858 ac_cv_header_time=no
14859 fi
14860 rm -f conftest.$ac_objext conftest.$ac_ext
14861 fi
14862 echo "$as_me:14862: result: $ac_cv_header_time" >&5
14863 echo "${ECHO_T}$ac_cv_header_time" >&6
14864 if test $ac_cv_header_time = yes; then
14865
14866 cat >>confdefs.h <<\EOF
14867 #define TIME_WITH_SYS_TIME 1
14868 EOF
14869
14870 fi
14871
14872 cf_regex_func=no
14873
14874 cf_regex_libs="regex re"
14875 case $host_os in
14876 (mingw*)
14877         cf_regex_libs="gnurx $cf_regex_libs"
14878         ;;
14879 esac
14880
14881 echo "$as_me:14881: checking for regcomp" >&5
14882 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14883 if test "${ac_cv_func_regcomp+set}" = set; then
14884   echo $ECHO_N "(cached) $ECHO_C" >&6
14885 else
14886   cat >conftest.$ac_ext <<_ACEOF
14887 #line 14887 "configure"
14888 #include "confdefs.h"
14889 /* System header to define __stub macros and hopefully few prototypes,
14890     which can conflict with char regcomp (); below.  */
14891 #include <assert.h>
14892 /* Override any gcc2 internal prototype to avoid an error.  */
14893 #ifdef __cplusplus
14894 extern "C"
14895 #endif
14896 /* We use char because int might match the return type of a gcc2
14897    builtin and then its argument prototype would still apply.  */
14898 char regcomp ();
14899 char (*f) ();
14900
14901 int
14902 main ()
14903 {
14904 /* The GNU C library defines this for functions which it implements
14905     to always fail with ENOSYS.  Some functions are actually named
14906     something starting with __ and the normal name is an alias.  */
14907 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14908 choke me
14909 #else
14910 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14911 #endif
14912
14913   ;
14914   return 0;
14915 }
14916 _ACEOF
14917 rm -f conftest.$ac_objext conftest$ac_exeext
14918 if { (eval echo "$as_me:14918: \"$ac_link\"") >&5
14919   (eval $ac_link) 2>&5
14920   ac_status=$?
14921   echo "$as_me:14921: \$? = $ac_status" >&5
14922   (exit $ac_status); } &&
14923          { ac_try='test -s conftest$ac_exeext'
14924   { (eval echo "$as_me:14924: \"$ac_try\"") >&5
14925   (eval $ac_try) 2>&5
14926   ac_status=$?
14927   echo "$as_me:14927: \$? = $ac_status" >&5
14928   (exit $ac_status); }; }; then
14929   ac_cv_func_regcomp=yes
14930 else
14931   echo "$as_me: failed program was:" >&5
14932 cat conftest.$ac_ext >&5
14933 ac_cv_func_regcomp=no
14934 fi
14935 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14936 fi
14937 echo "$as_me:14937: result: $ac_cv_func_regcomp" >&5
14938 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14939 if test $ac_cv_func_regcomp = yes; then
14940   cf_regex_func=regcomp
14941 else
14942
14943         for cf_regex_lib in $cf_regex_libs
14944         do
14945                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14946 echo "$as_me:14946: checking for regcomp in -l$cf_regex_lib" >&5
14947 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14948 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14949   echo $ECHO_N "(cached) $ECHO_C" >&6
14950 else
14951   ac_check_lib_save_LIBS=$LIBS
14952 LIBS="-l$cf_regex_lib  $LIBS"
14953 cat >conftest.$ac_ext <<_ACEOF
14954 #line 14954 "configure"
14955 #include "confdefs.h"
14956
14957 /* Override any gcc2 internal prototype to avoid an error.  */
14958 #ifdef __cplusplus
14959 extern "C"
14960 #endif
14961 /* We use char because int might match the return type of a gcc2
14962    builtin and then its argument prototype would still apply.  */
14963 char regcomp ();
14964 int
14965 main ()
14966 {
14967 regcomp ();
14968   ;
14969   return 0;
14970 }
14971 _ACEOF
14972 rm -f conftest.$ac_objext conftest$ac_exeext
14973 if { (eval echo "$as_me:14973: \"$ac_link\"") >&5
14974   (eval $ac_link) 2>&5
14975   ac_status=$?
14976   echo "$as_me:14976: \$? = $ac_status" >&5
14977   (exit $ac_status); } &&
14978          { ac_try='test -s conftest$ac_exeext'
14979   { (eval echo "$as_me:14979: \"$ac_try\"") >&5
14980   (eval $ac_try) 2>&5
14981   ac_status=$?
14982   echo "$as_me:14982: \$? = $ac_status" >&5
14983   (exit $ac_status); }; }; then
14984   eval "$as_ac_Lib=yes"
14985 else
14986   echo "$as_me: failed program was:" >&5
14987 cat conftest.$ac_ext >&5
14988 eval "$as_ac_Lib=no"
14989 fi
14990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14991 LIBS=$ac_check_lib_save_LIBS
14992 fi
14993 echo "$as_me:14993: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14994 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14995 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14996
14997 cf_add_libs="-l$cf_regex_lib"
14998 # Filter out duplicates - this happens with badly-designed ".pc" files...
14999 for cf_add_1lib in $LIBS
15000 do
15001         for cf_add_2lib in $cf_add_libs
15002         do
15003                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15004                 then
15005                         cf_add_1lib=
15006                         break
15007                 fi
15008         done
15009         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15010 done
15011 LIBS="$cf_add_libs"
15012
15013                                 cf_regex_func=regcomp
15014                                 break
15015 fi
15016
15017         done
15018
15019 fi
15020
15021 if test "$cf_regex_func" = no ; then
15022         echo "$as_me:15022: checking for compile" >&5
15023 echo $ECHO_N "checking for compile... $ECHO_C" >&6
15024 if test "${ac_cv_func_compile+set}" = set; then
15025   echo $ECHO_N "(cached) $ECHO_C" >&6
15026 else
15027   cat >conftest.$ac_ext <<_ACEOF
15028 #line 15028 "configure"
15029 #include "confdefs.h"
15030 /* System header to define __stub macros and hopefully few prototypes,
15031     which can conflict with char compile (); below.  */
15032 #include <assert.h>
15033 /* Override any gcc2 internal prototype to avoid an error.  */
15034 #ifdef __cplusplus
15035 extern "C"
15036 #endif
15037 /* We use char because int might match the return type of a gcc2
15038    builtin and then its argument prototype would still apply.  */
15039 char compile ();
15040 char (*f) ();
15041
15042 int
15043 main ()
15044 {
15045 /* The GNU C library defines this for functions which it implements
15046     to always fail with ENOSYS.  Some functions are actually named
15047     something starting with __ and the normal name is an alias.  */
15048 #if defined (__stub_compile) || defined (__stub___compile)
15049 choke me
15050 #else
15051 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15052 #endif
15053
15054   ;
15055   return 0;
15056 }
15057 _ACEOF
15058 rm -f conftest.$ac_objext conftest$ac_exeext
15059 if { (eval echo "$as_me:15059: \"$ac_link\"") >&5
15060   (eval $ac_link) 2>&5
15061   ac_status=$?
15062   echo "$as_me:15062: \$? = $ac_status" >&5
15063   (exit $ac_status); } &&
15064          { ac_try='test -s conftest$ac_exeext'
15065   { (eval echo "$as_me:15065: \"$ac_try\"") >&5
15066   (eval $ac_try) 2>&5
15067   ac_status=$?
15068   echo "$as_me:15068: \$? = $ac_status" >&5
15069   (exit $ac_status); }; }; then
15070   ac_cv_func_compile=yes
15071 else
15072   echo "$as_me: failed program was:" >&5
15073 cat conftest.$ac_ext >&5
15074 ac_cv_func_compile=no
15075 fi
15076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15077 fi
15078 echo "$as_me:15078: result: $ac_cv_func_compile" >&5
15079 echo "${ECHO_T}$ac_cv_func_compile" >&6
15080 if test $ac_cv_func_compile = yes; then
15081   cf_regex_func=compile
15082 else
15083
15084                 echo "$as_me:15084: checking for compile in -lgen" >&5
15085 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
15086 if test "${ac_cv_lib_gen_compile+set}" = set; then
15087   echo $ECHO_N "(cached) $ECHO_C" >&6
15088 else
15089   ac_check_lib_save_LIBS=$LIBS
15090 LIBS="-lgen  $LIBS"
15091 cat >conftest.$ac_ext <<_ACEOF
15092 #line 15092 "configure"
15093 #include "confdefs.h"
15094
15095 /* Override any gcc2 internal prototype to avoid an error.  */
15096 #ifdef __cplusplus
15097 extern "C"
15098 #endif
15099 /* We use char because int might match the return type of a gcc2
15100    builtin and then its argument prototype would still apply.  */
15101 char compile ();
15102 int
15103 main ()
15104 {
15105 compile ();
15106   ;
15107   return 0;
15108 }
15109 _ACEOF
15110 rm -f conftest.$ac_objext conftest$ac_exeext
15111 if { (eval echo "$as_me:15111: \"$ac_link\"") >&5
15112   (eval $ac_link) 2>&5
15113   ac_status=$?
15114   echo "$as_me:15114: \$? = $ac_status" >&5
15115   (exit $ac_status); } &&
15116          { ac_try='test -s conftest$ac_exeext'
15117   { (eval echo "$as_me:15117: \"$ac_try\"") >&5
15118   (eval $ac_try) 2>&5
15119   ac_status=$?
15120   echo "$as_me:15120: \$? = $ac_status" >&5
15121   (exit $ac_status); }; }; then
15122   ac_cv_lib_gen_compile=yes
15123 else
15124   echo "$as_me: failed program was:" >&5
15125 cat conftest.$ac_ext >&5
15126 ac_cv_lib_gen_compile=no
15127 fi
15128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15129 LIBS=$ac_check_lib_save_LIBS
15130 fi
15131 echo "$as_me:15131: result: $ac_cv_lib_gen_compile" >&5
15132 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
15133 if test $ac_cv_lib_gen_compile = yes; then
15134
15135 cf_add_libs="-lgen"
15136 # Filter out duplicates - this happens with badly-designed ".pc" files...
15137 for cf_add_1lib in $LIBS
15138 do
15139         for cf_add_2lib in $cf_add_libs
15140         do
15141                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15142                 then
15143                         cf_add_1lib=
15144                         break
15145                 fi
15146         done
15147         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15148 done
15149 LIBS="$cf_add_libs"
15150
15151                                 cf_regex_func=compile
15152 fi
15153
15154 fi
15155
15156 fi
15157
15158 if test "$cf_regex_func" = no ; then
15159         { echo "$as_me:15159: WARNING: cannot find regular expression library" >&5
15160 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
15161 fi
15162
15163 echo "$as_me:15163: checking for regular-expression headers" >&5
15164 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
15165 if test "${cf_cv_regex_hdrs+set}" = set; then
15166   echo $ECHO_N "(cached) $ECHO_C" >&6
15167 else
15168
15169 cf_cv_regex_hdrs=no
15170 case $cf_regex_func in
15171 (compile)
15172         for cf_regex_hdr in regexp.h regexpr.h
15173         do
15174                 cat >conftest.$ac_ext <<_ACEOF
15175 #line 15175 "configure"
15176 #include "confdefs.h"
15177 #include <$cf_regex_hdr>
15178 int
15179 main ()
15180 {
15181
15182                         char *p = compile("", "", "", 0);
15183                         int x = step("", "");
15184
15185   ;
15186   return 0;
15187 }
15188 _ACEOF
15189 rm -f conftest.$ac_objext conftest$ac_exeext
15190 if { (eval echo "$as_me:15190: \"$ac_link\"") >&5
15191   (eval $ac_link) 2>&5
15192   ac_status=$?
15193   echo "$as_me:15193: \$? = $ac_status" >&5
15194   (exit $ac_status); } &&
15195          { ac_try='test -s conftest$ac_exeext'
15196   { (eval echo "$as_me:15196: \"$ac_try\"") >&5
15197   (eval $ac_try) 2>&5
15198   ac_status=$?
15199   echo "$as_me:15199: \$? = $ac_status" >&5
15200   (exit $ac_status); }; }; then
15201
15202                         cf_cv_regex_hdrs=$cf_regex_hdr
15203                         break
15204
15205 else
15206   echo "$as_me: failed program was:" >&5
15207 cat conftest.$ac_ext >&5
15208 fi
15209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15210         done
15211         ;;
15212 (*)
15213         for cf_regex_hdr in regex.h
15214         do
15215                 cat >conftest.$ac_ext <<_ACEOF
15216 #line 15216 "configure"
15217 #include "confdefs.h"
15218 #include <sys/types.h>
15219 #include <$cf_regex_hdr>
15220 int
15221 main ()
15222 {
15223
15224                         regex_t *p;
15225                         int x = regcomp(p, "", 0);
15226                         int y = regexec(p, "", 0, 0, 0);
15227                         regfree(p);
15228
15229   ;
15230   return 0;
15231 }
15232 _ACEOF
15233 rm -f conftest.$ac_objext conftest$ac_exeext
15234 if { (eval echo "$as_me:15234: \"$ac_link\"") >&5
15235   (eval $ac_link) 2>&5
15236   ac_status=$?
15237   echo "$as_me:15237: \$? = $ac_status" >&5
15238   (exit $ac_status); } &&
15239          { ac_try='test -s conftest$ac_exeext'
15240   { (eval echo "$as_me:15240: \"$ac_try\"") >&5
15241   (eval $ac_try) 2>&5
15242   ac_status=$?
15243   echo "$as_me:15243: \$? = $ac_status" >&5
15244   (exit $ac_status); }; }; then
15245
15246                         cf_cv_regex_hdrs=$cf_regex_hdr
15247                         break
15248
15249 else
15250   echo "$as_me: failed program was:" >&5
15251 cat conftest.$ac_ext >&5
15252 fi
15253 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15254         done
15255         ;;
15256 esac
15257
15258 fi
15259 echo "$as_me:15259: result: $cf_cv_regex_hdrs" >&5
15260 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
15261
15262 case $cf_cv_regex_hdrs in
15263         (no)            { echo "$as_me:15263: WARNING: no regular expression header found" >&5
15264 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
15265         (regex.h)
15266 cat >>confdefs.h <<\EOF
15267 #define HAVE_REGEX_H_FUNCS 1
15268 EOF
15269  ;;
15270         (regexp.h)
15271 cat >>confdefs.h <<\EOF
15272 #define HAVE_REGEXP_H_FUNCS 1
15273 EOF
15274  ;;
15275         (regexpr.h)
15276 cat >>confdefs.h <<\EOF
15277 #define HAVE_REGEXPR_H_FUNCS 1
15278 EOF
15279  ;;
15280 esac
15281
15282 for ac_header in \
15283 fcntl.h \
15284 getopt.h \
15285 limits.h \
15286 locale.h \
15287 math.h \
15288 poll.h \
15289 sys/bsdtypes.h \
15290 sys/ioctl.h \
15291 sys/param.h \
15292 sys/poll.h \
15293 sys/select.h \
15294 sys/time.h \
15295 sys/times.h \
15296 ttyent.h \
15297 unistd.h \
15298 wctype.h \
15299
15300 do
15301 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15302 echo "$as_me:15302: checking for $ac_header" >&5
15303 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15304 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15305   echo $ECHO_N "(cached) $ECHO_C" >&6
15306 else
15307   cat >conftest.$ac_ext <<_ACEOF
15308 #line 15308 "configure"
15309 #include "confdefs.h"
15310 #include <$ac_header>
15311 _ACEOF
15312 if { (eval echo "$as_me:15312: \"$ac_cpp conftest.$ac_ext\"") >&5
15313   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15314   ac_status=$?
15315   egrep -v '^ *\+' conftest.er1 >conftest.err
15316   rm -f conftest.er1
15317   cat conftest.err >&5
15318   echo "$as_me:15318: \$? = $ac_status" >&5
15319   (exit $ac_status); } >/dev/null; then
15320   if test -s conftest.err; then
15321     ac_cpp_err=$ac_c_preproc_warn_flag
15322   else
15323     ac_cpp_err=
15324   fi
15325 else
15326   ac_cpp_err=yes
15327 fi
15328 if test -z "$ac_cpp_err"; then
15329   eval "$as_ac_Header=yes"
15330 else
15331   echo "$as_me: failed program was:" >&5
15332   cat conftest.$ac_ext >&5
15333   eval "$as_ac_Header=no"
15334 fi
15335 rm -f conftest.err conftest.$ac_ext
15336 fi
15337 echo "$as_me:15337: result: `eval echo '${'$as_ac_Header'}'`" >&5
15338 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15339 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15340   cat >>confdefs.h <<EOF
15341 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15342 EOF
15343
15344 fi
15345 done
15346
15347 for ac_header in unistd.h getopt.h
15348 do
15349 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15350 echo "$as_me:15350: checking for $ac_header" >&5
15351 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15352 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15353   echo $ECHO_N "(cached) $ECHO_C" >&6
15354 else
15355   cat >conftest.$ac_ext <<_ACEOF
15356 #line 15356 "configure"
15357 #include "confdefs.h"
15358 #include <$ac_header>
15359 _ACEOF
15360 if { (eval echo "$as_me:15360: \"$ac_cpp conftest.$ac_ext\"") >&5
15361   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15362   ac_status=$?
15363   egrep -v '^ *\+' conftest.er1 >conftest.err
15364   rm -f conftest.er1
15365   cat conftest.err >&5
15366   echo "$as_me:15366: \$? = $ac_status" >&5
15367   (exit $ac_status); } >/dev/null; then
15368   if test -s conftest.err; then
15369     ac_cpp_err=$ac_c_preproc_warn_flag
15370   else
15371     ac_cpp_err=
15372   fi
15373 else
15374   ac_cpp_err=yes
15375 fi
15376 if test -z "$ac_cpp_err"; then
15377   eval "$as_ac_Header=yes"
15378 else
15379   echo "$as_me: failed program was:" >&5
15380   cat conftest.$ac_ext >&5
15381   eval "$as_ac_Header=no"
15382 fi
15383 rm -f conftest.err conftest.$ac_ext
15384 fi
15385 echo "$as_me:15385: result: `eval echo '${'$as_ac_Header'}'`" >&5
15386 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15387 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15388   cat >>confdefs.h <<EOF
15389 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15390 EOF
15391
15392 fi
15393 done
15394
15395 echo "$as_me:15395: checking for header declaring getopt variables" >&5
15396 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
15397 if test "${cf_cv_getopt_header+set}" = set; then
15398   echo $ECHO_N "(cached) $ECHO_C" >&6
15399 else
15400
15401 cf_cv_getopt_header=none
15402 for cf_header in stdio.h stdlib.h unistd.h getopt.h
15403 do
15404 cat >conftest.$ac_ext <<_ACEOF
15405 #line 15405 "configure"
15406 #include "confdefs.h"
15407
15408 #include <$cf_header>
15409 int
15410 main ()
15411 {
15412 int x = optind; char *y = optarg
15413   ;
15414   return 0;
15415 }
15416 _ACEOF
15417 rm -f conftest.$ac_objext
15418 if { (eval echo "$as_me:15418: \"$ac_compile\"") >&5
15419   (eval $ac_compile) 2>&5
15420   ac_status=$?
15421   echo "$as_me:15421: \$? = $ac_status" >&5
15422   (exit $ac_status); } &&
15423          { ac_try='test -s conftest.$ac_objext'
15424   { (eval echo "$as_me:15424: \"$ac_try\"") >&5
15425   (eval $ac_try) 2>&5
15426   ac_status=$?
15427   echo "$as_me:15427: \$? = $ac_status" >&5
15428   (exit $ac_status); }; }; then
15429   cf_cv_getopt_header=$cf_header
15430  break
15431 else
15432   echo "$as_me: failed program was:" >&5
15433 cat conftest.$ac_ext >&5
15434 fi
15435 rm -f conftest.$ac_objext conftest.$ac_ext
15436 done
15437
15438 fi
15439 echo "$as_me:15439: result: $cf_cv_getopt_header" >&5
15440 echo "${ECHO_T}$cf_cv_getopt_header" >&6
15441 if test $cf_cv_getopt_header != none ; then
15442
15443 cat >>confdefs.h <<\EOF
15444 #define HAVE_GETOPT_HEADER 1
15445 EOF
15446
15447 fi
15448 if test $cf_cv_getopt_header = getopt.h ; then
15449
15450 cat >>confdefs.h <<\EOF
15451 #define NEED_GETOPT_H 1
15452 EOF
15453
15454 fi
15455
15456 # check for ISC (this may also define _POSIX_SOURCE)
15457 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
15458 if test "x$ISC" = xyes ; then
15459
15460 echo "$as_me:15460: checking for main in -lcposix" >&5
15461 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
15462 if test "${ac_cv_lib_cposix_main+set}" = set; then
15463   echo $ECHO_N "(cached) $ECHO_C" >&6
15464 else
15465   ac_check_lib_save_LIBS=$LIBS
15466 LIBS="-lcposix  $LIBS"
15467 cat >conftest.$ac_ext <<_ACEOF
15468 #line 15468 "configure"
15469 #include "confdefs.h"
15470
15471 int
15472 main ()
15473 {
15474 main ();
15475   ;
15476   return 0;
15477 }
15478 _ACEOF
15479 rm -f conftest.$ac_objext conftest$ac_exeext
15480 if { (eval echo "$as_me:15480: \"$ac_link\"") >&5
15481   (eval $ac_link) 2>&5
15482   ac_status=$?
15483   echo "$as_me:15483: \$? = $ac_status" >&5
15484   (exit $ac_status); } &&
15485          { ac_try='test -s conftest$ac_exeext'
15486   { (eval echo "$as_me:15486: \"$ac_try\"") >&5
15487   (eval $ac_try) 2>&5
15488   ac_status=$?
15489   echo "$as_me:15489: \$? = $ac_status" >&5
15490   (exit $ac_status); }; }; then
15491   ac_cv_lib_cposix_main=yes
15492 else
15493   echo "$as_me: failed program was:" >&5
15494 cat conftest.$ac_ext >&5
15495 ac_cv_lib_cposix_main=no
15496 fi
15497 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15498 LIBS=$ac_check_lib_save_LIBS
15499 fi
15500 echo "$as_me:15500: result: $ac_cv_lib_cposix_main" >&5
15501 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15502 if test $ac_cv_lib_cposix_main = yes; then
15503   cat >>confdefs.h <<EOF
15504 #define HAVE_LIBCPOSIX 1
15505 EOF
15506
15507   LIBS="-lcposix $LIBS"
15508
15509 fi
15510
15511         echo "$as_me:15511: checking for bzero in -linet" >&5
15512 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15513 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15514   echo $ECHO_N "(cached) $ECHO_C" >&6
15515 else
15516   ac_check_lib_save_LIBS=$LIBS
15517 LIBS="-linet  $LIBS"
15518 cat >conftest.$ac_ext <<_ACEOF
15519 #line 15519 "configure"
15520 #include "confdefs.h"
15521
15522 /* Override any gcc2 internal prototype to avoid an error.  */
15523 #ifdef __cplusplus
15524 extern "C"
15525 #endif
15526 /* We use char because int might match the return type of a gcc2
15527    builtin and then its argument prototype would still apply.  */
15528 char bzero ();
15529 int
15530 main ()
15531 {
15532 bzero ();
15533   ;
15534   return 0;
15535 }
15536 _ACEOF
15537 rm -f conftest.$ac_objext conftest$ac_exeext
15538 if { (eval echo "$as_me:15538: \"$ac_link\"") >&5
15539   (eval $ac_link) 2>&5
15540   ac_status=$?
15541   echo "$as_me:15541: \$? = $ac_status" >&5
15542   (exit $ac_status); } &&
15543          { ac_try='test -s conftest$ac_exeext'
15544   { (eval echo "$as_me:15544: \"$ac_try\"") >&5
15545   (eval $ac_try) 2>&5
15546   ac_status=$?
15547   echo "$as_me:15547: \$? = $ac_status" >&5
15548   (exit $ac_status); }; }; then
15549   ac_cv_lib_inet_bzero=yes
15550 else
15551   echo "$as_me: failed program was:" >&5
15552 cat conftest.$ac_ext >&5
15553 ac_cv_lib_inet_bzero=no
15554 fi
15555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15556 LIBS=$ac_check_lib_save_LIBS
15557 fi
15558 echo "$as_me:15558: result: $ac_cv_lib_inet_bzero" >&5
15559 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15560 if test $ac_cv_lib_inet_bzero = yes; then
15561
15562 cf_add_libs="-linet"
15563 # Filter out duplicates - this happens with badly-designed ".pc" files...
15564 for cf_add_1lib in $LIBS
15565 do
15566         for cf_add_2lib in $cf_add_libs
15567         do
15568                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15569                 then
15570                         cf_add_1lib=
15571                         break
15572                 fi
15573         done
15574         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15575 done
15576 LIBS="$cf_add_libs"
15577
15578 fi
15579 fi
15580
15581 echo "$as_me:15581: checking if sys/time.h works with sys/select.h" >&5
15582 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15583 if test "${cf_cv_sys_time_select+set}" = set; then
15584   echo $ECHO_N "(cached) $ECHO_C" >&6
15585 else
15586
15587 cat >conftest.$ac_ext <<_ACEOF
15588 #line 15588 "configure"
15589 #include "confdefs.h"
15590
15591 #include <sys/types.h>
15592 #ifdef HAVE_SYS_TIME_H
15593 #include <sys/time.h>
15594 #endif
15595 #ifdef HAVE_SYS_SELECT_H
15596 #include <sys/select.h>
15597 #endif
15598
15599 int
15600 main ()
15601 {
15602
15603   ;
15604   return 0;
15605 }
15606 _ACEOF
15607 rm -f conftest.$ac_objext
15608 if { (eval echo "$as_me:15608: \"$ac_compile\"") >&5
15609   (eval $ac_compile) 2>&5
15610   ac_status=$?
15611   echo "$as_me:15611: \$? = $ac_status" >&5
15612   (exit $ac_status); } &&
15613          { ac_try='test -s conftest.$ac_objext'
15614   { (eval echo "$as_me:15614: \"$ac_try\"") >&5
15615   (eval $ac_try) 2>&5
15616   ac_status=$?
15617   echo "$as_me:15617: \$? = $ac_status" >&5
15618   (exit $ac_status); }; }; then
15619   cf_cv_sys_time_select=yes
15620 else
15621   echo "$as_me: failed program was:" >&5
15622 cat conftest.$ac_ext >&5
15623 cf_cv_sys_time_select=no
15624 fi
15625 rm -f conftest.$ac_objext conftest.$ac_ext
15626
15627 fi
15628
15629 echo "$as_me:15629: result: $cf_cv_sys_time_select" >&5
15630 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15631 test "$cf_cv_sys_time_select" = yes &&
15632 cat >>confdefs.h <<\EOF
15633 #define HAVE_SYS_TIME_SELECT 1
15634 EOF
15635
15636 ###     checks for compiler characteristics
15637 ac_ext=c
15638 ac_cpp='$CPP $CPPFLAGS'
15639 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15640 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15641 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15642 ac_main_return=return
15643
15644 echo "$as_me:15644: checking for an ANSI C-conforming const" >&5
15645 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15646 if test "${ac_cv_c_const+set}" = set; then
15647   echo $ECHO_N "(cached) $ECHO_C" >&6
15648 else
15649   cat >conftest.$ac_ext <<_ACEOF
15650 #line 15650 "configure"
15651 #include "confdefs.h"
15652
15653 int
15654 main ()
15655 {
15656 /* FIXME: Include the comments suggested by Paul. */
15657 #ifndef __cplusplus
15658   /* Ultrix mips cc rejects this.  */
15659   typedef int charset[2];
15660   const charset x;
15661   /* SunOS 4.1.1 cc rejects this.  */
15662   char const *const *ccp;
15663   char **p;
15664   /* NEC SVR4.0.2 mips cc rejects this.  */
15665   struct point {int x, y;};
15666   static struct point const zero = {0,0};
15667   /* AIX XL C 1.02.0.0 rejects this.
15668      It does not let you subtract one const X* pointer from another in
15669      an arm of an if-expression whose if-part is not a constant
15670      expression */
15671   const char *g = "string";
15672   ccp = &g + (g ? g-g : 0);
15673   /* HPUX 7.0 cc rejects these. */
15674   ++ccp;
15675   p = (char**) ccp;
15676   ccp = (char const *const *) p;
15677   { /* SCO 3.2v4 cc rejects this.  */
15678     char *t;
15679     char const *s = 0 ? (char *) 0 : (char const *) 0;
15680
15681     *t++ = 0;
15682   }
15683   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15684     int x[] = {25, 17};
15685     const int *foo = &x[0];
15686     ++foo;
15687   }
15688   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15689     typedef const int *iptr;
15690     iptr p = 0;
15691     ++p;
15692   }
15693   { /* AIX XL C 1.02.0.0 rejects this saying
15694        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15695     struct s { int j; const int *ap[3]; };
15696     struct s *b; b->j = 5;
15697   }
15698   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15699     const int foo = 10;
15700   }
15701 #endif
15702
15703   ;
15704   return 0;
15705 }
15706 _ACEOF
15707 rm -f conftest.$ac_objext
15708 if { (eval echo "$as_me:15708: \"$ac_compile\"") >&5
15709   (eval $ac_compile) 2>&5
15710   ac_status=$?
15711   echo "$as_me:15711: \$? = $ac_status" >&5
15712   (exit $ac_status); } &&
15713          { ac_try='test -s conftest.$ac_objext'
15714   { (eval echo "$as_me:15714: \"$ac_try\"") >&5
15715   (eval $ac_try) 2>&5
15716   ac_status=$?
15717   echo "$as_me:15717: \$? = $ac_status" >&5
15718   (exit $ac_status); }; }; then
15719   ac_cv_c_const=yes
15720 else
15721   echo "$as_me: failed program was:" >&5
15722 cat conftest.$ac_ext >&5
15723 ac_cv_c_const=no
15724 fi
15725 rm -f conftest.$ac_objext conftest.$ac_ext
15726 fi
15727 echo "$as_me:15727: result: $ac_cv_c_const" >&5
15728 echo "${ECHO_T}$ac_cv_c_const" >&6
15729 if test $ac_cv_c_const = no; then
15730
15731 cat >>confdefs.h <<\EOF
15732 #define const
15733 EOF
15734
15735 fi
15736
15737 echo "$as_me:15737: checking for inline" >&5
15738 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15739 if test "${ac_cv_c_inline+set}" = set; then
15740   echo $ECHO_N "(cached) $ECHO_C" >&6
15741 else
15742   ac_cv_c_inline=no
15743 for ac_kw in inline __inline__ __inline; do
15744   cat >conftest.$ac_ext <<_ACEOF
15745 #line 15745 "configure"
15746 #include "confdefs.h"
15747 #ifndef __cplusplus
15748 static $ac_kw int static_foo () {return 0; }
15749 $ac_kw int foo () {return 0; }
15750 #endif
15751
15752 _ACEOF
15753 rm -f conftest.$ac_objext
15754 if { (eval echo "$as_me:15754: \"$ac_compile\"") >&5
15755   (eval $ac_compile) 2>&5
15756   ac_status=$?
15757   echo "$as_me:15757: \$? = $ac_status" >&5
15758   (exit $ac_status); } &&
15759          { ac_try='test -s conftest.$ac_objext'
15760   { (eval echo "$as_me:15760: \"$ac_try\"") >&5
15761   (eval $ac_try) 2>&5
15762   ac_status=$?
15763   echo "$as_me:15763: \$? = $ac_status" >&5
15764   (exit $ac_status); }; }; then
15765   ac_cv_c_inline=$ac_kw; break
15766 else
15767   echo "$as_me: failed program was:" >&5
15768 cat conftest.$ac_ext >&5
15769 fi
15770 rm -f conftest.$ac_objext conftest.$ac_ext
15771 done
15772
15773 fi
15774 echo "$as_me:15774: result: $ac_cv_c_inline" >&5
15775 echo "${ECHO_T}$ac_cv_c_inline" >&6
15776 case $ac_cv_c_inline in
15777   inline | yes) ;;
15778   no)
15779 cat >>confdefs.h <<\EOF
15780 #define inline
15781 EOF
15782  ;;
15783   *)  cat >>confdefs.h <<EOF
15784 #define inline $ac_cv_c_inline
15785 EOF
15786  ;;
15787 esac
15788
15789 NCURSES_INLINE=
15790 if test "$ac_cv_c_inline" != no ; then
15791         NCURSES_INLINE=inline
15792         if test "$INTEL_COMPILER" = yes
15793         then
15794                 :
15795         elif test "$CLANG_COMPILER" = yes
15796         then
15797                 :
15798         elif test "$GCC" = yes
15799         then
15800                 echo "$as_me:15800: checking if $CC supports options to tune inlining" >&5
15801 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15802 if test "${cf_cv_gcc_inline+set}" = set; then
15803   echo $ECHO_N "(cached) $ECHO_C" >&6
15804 else
15805
15806                 cf_save_CFLAGS=$CFLAGS
15807                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15808                 cat >conftest.$ac_ext <<_ACEOF
15809 #line 15809 "configure"
15810 #include "confdefs.h"
15811 inline int foo(void) { return 1; }
15812 int
15813 main ()
15814 {
15815 ${cf_cv_main_return:-return} foo()
15816   ;
15817   return 0;
15818 }
15819 _ACEOF
15820 rm -f conftest.$ac_objext
15821 if { (eval echo "$as_me:15821: \"$ac_compile\"") >&5
15822   (eval $ac_compile) 2>&5
15823   ac_status=$?
15824   echo "$as_me:15824: \$? = $ac_status" >&5
15825   (exit $ac_status); } &&
15826          { ac_try='test -s conftest.$ac_objext'
15827   { (eval echo "$as_me:15827: \"$ac_try\"") >&5
15828   (eval $ac_try) 2>&5
15829   ac_status=$?
15830   echo "$as_me:15830: \$? = $ac_status" >&5
15831   (exit $ac_status); }; }; then
15832   cf_cv_gcc_inline=yes
15833 else
15834   echo "$as_me: failed program was:" >&5
15835 cat conftest.$ac_ext >&5
15836 cf_cv_gcc_inline=no
15837 fi
15838 rm -f conftest.$ac_objext conftest.$ac_ext
15839                 CFLAGS=$cf_save_CFLAGS
15840
15841 fi
15842 echo "$as_me:15842: result: $cf_cv_gcc_inline" >&5
15843 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15844                 if test "$cf_cv_gcc_inline" = yes ; then
15845
15846 cf_fix_cppflags=no
15847 cf_new_cflags=
15848 cf_new_cppflags=
15849 cf_new_extra_cppflags=
15850
15851 for cf_add_cflags in --param max-inline-insns-single=1200
15852 do
15853 case $cf_fix_cppflags in
15854 (no)
15855         case $cf_add_cflags in
15856         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15857                 case $cf_add_cflags in
15858                 (-D*)
15859                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15860
15861                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15862                                 && test -z "${cf_tst_cflags}" \
15863                                 && cf_fix_cppflags=yes
15864
15865                         if test $cf_fix_cppflags = yes ; then
15866                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15867                                 continue
15868                         elif test "${cf_tst_cflags}" = "\"'" ; then
15869                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15870                                 continue
15871                         fi
15872                         ;;
15873                 esac
15874                 case "$CPPFLAGS" in
15875                 (*$cf_add_cflags)
15876                         ;;
15877                 (*)
15878                         case $cf_add_cflags in
15879                         (-D*)
15880                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15881
15882 CPPFLAGS=`echo "$CPPFLAGS" | \
15883         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15884                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15885
15886                                 ;;
15887                         esac
15888                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15889                         ;;
15890                 esac
15891                 ;;
15892         (*)
15893                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15894                 ;;
15895         esac
15896         ;;
15897 (yes)
15898         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15899
15900         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15901
15902         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15903                 && test -z "${cf_tst_cflags}" \
15904                 && cf_fix_cppflags=no
15905         ;;
15906 esac
15907 done
15908
15909 if test -n "$cf_new_cflags" ; then
15910
15911         CFLAGS="$CFLAGS $cf_new_cflags"
15912 fi
15913
15914 if test -n "$cf_new_cppflags" ; then
15915
15916         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15917 fi
15918
15919 if test -n "$cf_new_extra_cppflags" ; then
15920
15921         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15922 fi
15923
15924                 fi
15925         fi
15926 fi
15927
15928 echo "$as_me:15928: checking for signal global datatype" >&5
15929 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15930 if test "${cf_cv_sig_atomic_t+set}" = set; then
15931   echo $ECHO_N "(cached) $ECHO_C" >&6
15932 else
15933
15934         for cf_type in \
15935                 "volatile sig_atomic_t" \
15936                 "sig_atomic_t" \
15937                 "int"
15938         do
15939         cat >conftest.$ac_ext <<_ACEOF
15940 #line 15940 "configure"
15941 #include "confdefs.h"
15942
15943 #include <sys/types.h>
15944 #include <signal.h>
15945 #include <stdio.h>
15946
15947 extern $cf_type x;
15948 $cf_type x;
15949 static void handler(int sig)
15950 {
15951         x = 5;
15952 }
15953 int
15954 main ()
15955 {
15956 signal(SIGINT, handler);
15957                  x = 1
15958   ;
15959   return 0;
15960 }
15961 _ACEOF
15962 rm -f conftest.$ac_objext
15963 if { (eval echo "$as_me:15963: \"$ac_compile\"") >&5
15964   (eval $ac_compile) 2>&5
15965   ac_status=$?
15966   echo "$as_me:15966: \$? = $ac_status" >&5
15967   (exit $ac_status); } &&
15968          { ac_try='test -s conftest.$ac_objext'
15969   { (eval echo "$as_me:15969: \"$ac_try\"") >&5
15970   (eval $ac_try) 2>&5
15971   ac_status=$?
15972   echo "$as_me:15972: \$? = $ac_status" >&5
15973   (exit $ac_status); }; }; then
15974   cf_cv_sig_atomic_t=$cf_type
15975 else
15976   echo "$as_me: failed program was:" >&5
15977 cat conftest.$ac_ext >&5
15978 cf_cv_sig_atomic_t=no
15979 fi
15980 rm -f conftest.$ac_objext conftest.$ac_ext
15981                 test "$cf_cv_sig_atomic_t" != no && break
15982         done
15983
15984 fi
15985
15986 echo "$as_me:15986: result: $cf_cv_sig_atomic_t" >&5
15987 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15988 test "$cf_cv_sig_atomic_t" != no &&
15989 cat >>confdefs.h <<EOF
15990 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15991 EOF
15992
15993 if test $NCURSES_CHTYPE = auto ; then
15994
15995 echo "$as_me:15995: checking for type of chtype" >&5
15996 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15997 if test "${cf_cv_typeof_chtype+set}" = set; then
15998   echo $ECHO_N "(cached) $ECHO_C" >&6
15999 else
16000
16001                 if test "$cross_compiling" = yes; then
16002   cf_cv_typeof_chtype=long
16003 else
16004   cat >conftest.$ac_ext <<_ACEOF
16005 #line 16005 "configure"
16006 #include "confdefs.h"
16007
16008 #define WANT_BITS 31
16009 #include <stdio.h>
16010 int main()
16011 {
16012         FILE *fp = fopen("cf_test.out", "w");
16013         if (fp != 0) {
16014                 char *result = "long";
16015                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
16016                         int n;
16017                         unsigned int x, y;
16018                         for (n = 0; n < WANT_BITS; n++) {
16019                                 x = (1 << n);
16020                                 y = (x >> n);
16021                                 if (y != 1 || x == 0) {
16022                                         x = 0;
16023                                         break;
16024                                 }
16025                         }
16026                         /*
16027                          * If x is nonzero, an int is big enough for the bits
16028                          * that we want.
16029                          */
16030                         result = (x != 0) ? "int" : "long";
16031                 }
16032                 fputs(result, fp);
16033                 fclose(fp);
16034         }
16035         ${cf_cv_main_return:-return}(0);
16036 }
16037
16038 _ACEOF
16039 rm -f conftest$ac_exeext
16040 if { (eval echo "$as_me:16040: \"$ac_link\"") >&5
16041   (eval $ac_link) 2>&5
16042   ac_status=$?
16043   echo "$as_me:16043: \$? = $ac_status" >&5
16044   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16045   { (eval echo "$as_me:16045: \"$ac_try\"") >&5
16046   (eval $ac_try) 2>&5
16047   ac_status=$?
16048   echo "$as_me:16048: \$? = $ac_status" >&5
16049   (exit $ac_status); }; }; then
16050   cf_cv_typeof_chtype=`cat cf_test.out`
16051 else
16052   echo "$as_me: program exited with status $ac_status" >&5
16053 echo "$as_me: failed program was:" >&5
16054 cat conftest.$ac_ext >&5
16055 cf_cv_typeof_chtype=long
16056 fi
16057 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16058 fi
16059                 rm -f cf_test.out
16060
16061 fi
16062
16063 echo "$as_me:16063: result: $cf_cv_typeof_chtype" >&5
16064 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
16065
16066 cat >>confdefs.h <<EOF
16067 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
16068 EOF
16069
16070 else
16071         cf_cv_typeof_chtype=$NCURSES_CHTYPE
16072 fi
16073 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
16074
16075 echo "$as_me:16075: checking if unsigned literals are legal" >&5
16076 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
16077 if test "${cf_cv_unsigned_literals+set}" = set; then
16078   echo $ECHO_N "(cached) $ECHO_C" >&6
16079 else
16080
16081         cat >conftest.$ac_ext <<_ACEOF
16082 #line 16082 "configure"
16083 #include "confdefs.h"
16084
16085 int
16086 main ()
16087 {
16088 long x = 1L + 1UL + 1U + 1
16089   ;
16090   return 0;
16091 }
16092 _ACEOF
16093 rm -f conftest.$ac_objext
16094 if { (eval echo "$as_me:16094: \"$ac_compile\"") >&5
16095   (eval $ac_compile) 2>&5
16096   ac_status=$?
16097   echo "$as_me:16097: \$? = $ac_status" >&5
16098   (exit $ac_status); } &&
16099          { ac_try='test -s conftest.$ac_objext'
16100   { (eval echo "$as_me:16100: \"$ac_try\"") >&5
16101   (eval $ac_try) 2>&5
16102   ac_status=$?
16103   echo "$as_me:16103: \$? = $ac_status" >&5
16104   (exit $ac_status); }; }; then
16105   cf_cv_unsigned_literals=yes
16106 else
16107   echo "$as_me: failed program was:" >&5
16108 cat conftest.$ac_ext >&5
16109 cf_cv_unsigned_literals=no
16110 fi
16111 rm -f conftest.$ac_objext conftest.$ac_ext
16112
16113 fi
16114
16115 echo "$as_me:16115: result: $cf_cv_unsigned_literals" >&5
16116 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
16117
16118 cf_cv_1UL="1"
16119 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
16120 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
16121
16122 if test $NCURSES_MMASK_T = auto ; then
16123         cf_cv_typeof_mmask_t=long
16124 else
16125         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
16126 fi
16127 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
16128
16129 ###     Checks for external-data
16130
16131 echo "$as_me:16131: checking if external errno is declared" >&5
16132 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
16133 if test "${cf_cv_dcl_errno+set}" = set; then
16134   echo $ECHO_N "(cached) $ECHO_C" >&6
16135 else
16136
16137         cat >conftest.$ac_ext <<_ACEOF
16138 #line 16138 "configure"
16139 #include "confdefs.h"
16140
16141 #ifdef HAVE_STDLIB_H
16142 #include <stdlib.h>
16143 #endif
16144 #include <stdio.h>
16145 #include <sys/types.h>
16146 #include <errno.h>
16147 int
16148 main ()
16149 {
16150 int x = (int) errno
16151   ;
16152   return 0;
16153 }
16154 _ACEOF
16155 rm -f conftest.$ac_objext
16156 if { (eval echo "$as_me:16156: \"$ac_compile\"") >&5
16157   (eval $ac_compile) 2>&5
16158   ac_status=$?
16159   echo "$as_me:16159: \$? = $ac_status" >&5
16160   (exit $ac_status); } &&
16161          { ac_try='test -s conftest.$ac_objext'
16162   { (eval echo "$as_me:16162: \"$ac_try\"") >&5
16163   (eval $ac_try) 2>&5
16164   ac_status=$?
16165   echo "$as_me:16165: \$? = $ac_status" >&5
16166   (exit $ac_status); }; }; then
16167   cf_cv_dcl_errno=yes
16168 else
16169   echo "$as_me: failed program was:" >&5
16170 cat conftest.$ac_ext >&5
16171 cf_cv_dcl_errno=no
16172 fi
16173 rm -f conftest.$ac_objext conftest.$ac_ext
16174
16175 fi
16176 echo "$as_me:16176: result: $cf_cv_dcl_errno" >&5
16177 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
16178
16179 if test "$cf_cv_dcl_errno" = no ; then
16180
16181 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16182
16183         cat >>confdefs.h <<EOF
16184 #define $cf_result 1
16185 EOF
16186
16187 fi
16188
16189 # It's possible (for near-UNIX clones) that the data doesn't exist
16190
16191 echo "$as_me:16191: checking if external errno exists" >&5
16192 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
16193 if test "${cf_cv_have_errno+set}" = set; then
16194   echo $ECHO_N "(cached) $ECHO_C" >&6
16195 else
16196
16197         cat >conftest.$ac_ext <<_ACEOF
16198 #line 16198 "configure"
16199 #include "confdefs.h"
16200
16201 #undef errno
16202 extern int errno;
16203
16204 int
16205 main ()
16206 {
16207 errno = 2
16208   ;
16209   return 0;
16210 }
16211 _ACEOF
16212 rm -f conftest.$ac_objext conftest$ac_exeext
16213 if { (eval echo "$as_me:16213: \"$ac_link\"") >&5
16214   (eval $ac_link) 2>&5
16215   ac_status=$?
16216   echo "$as_me:16216: \$? = $ac_status" >&5
16217   (exit $ac_status); } &&
16218          { ac_try='test -s conftest$ac_exeext'
16219   { (eval echo "$as_me:16219: \"$ac_try\"") >&5
16220   (eval $ac_try) 2>&5
16221   ac_status=$?
16222   echo "$as_me:16222: \$? = $ac_status" >&5
16223   (exit $ac_status); }; }; then
16224   cf_cv_have_errno=yes
16225 else
16226   echo "$as_me: failed program was:" >&5
16227 cat conftest.$ac_ext >&5
16228 cf_cv_have_errno=no
16229 fi
16230 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16231
16232 fi
16233 echo "$as_me:16233: result: $cf_cv_have_errno" >&5
16234 echo "${ECHO_T}$cf_cv_have_errno" >&6
16235
16236 if test "$cf_cv_have_errno" = yes ; then
16237
16238 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16239
16240         cat >>confdefs.h <<EOF
16241 #define $cf_result 1
16242 EOF
16243
16244 fi
16245
16246 echo "$as_me:16246: checking if data-only library module links" >&5
16247 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
16248 if test "${cf_cv_link_dataonly+set}" = set; then
16249   echo $ECHO_N "(cached) $ECHO_C" >&6
16250 else
16251
16252         rm -f conftest.a
16253         cat >conftest.$ac_ext <<EOF
16254 #line 16254 "configure"
16255 int     testdata[3] = { 123, 456, 789 };
16256 EOF
16257         if { (eval echo "$as_me:16257: \"$ac_compile\"") >&5
16258   (eval $ac_compile) 2>&5
16259   ac_status=$?
16260   echo "$as_me:16260: \$? = $ac_status" >&5
16261   (exit $ac_status); } ; then
16262                 mv conftest.o data.o && \
16263                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
16264         fi
16265         rm -f conftest.$ac_ext data.o
16266         cat >conftest.$ac_ext <<EOF
16267 #line 16267 "configure"
16268 int     testfunc()
16269 {
16270 #if defined(NeXT)
16271         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
16272 #else
16273         extern int testdata[3];
16274         return testdata[0] == 123
16275            &&  testdata[1] == 456
16276            &&  testdata[2] == 789;
16277 #endif
16278 }
16279 EOF
16280         if { (eval echo "$as_me:16280: \"$ac_compile\"") >&5
16281   (eval $ac_compile) 2>&5
16282   ac_status=$?
16283   echo "$as_me:16283: \$? = $ac_status" >&5
16284   (exit $ac_status); }; then
16285                 mv conftest.o func.o && \
16286                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
16287         fi
16288         rm -f conftest.$ac_ext func.o
16289         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
16290         cf_saveLIBS="$LIBS"
16291         LIBS="conftest.a $LIBS"
16292         if test "$cross_compiling" = yes; then
16293   cf_cv_link_dataonly=unknown
16294 else
16295   cat >conftest.$ac_ext <<_ACEOF
16296 #line 16296 "configure"
16297 #include "confdefs.h"
16298
16299         int main()
16300         {
16301                 extern int testfunc();
16302                 ${cf_cv_main_return:-return} (!testfunc());
16303         }
16304
16305 _ACEOF
16306 rm -f conftest$ac_exeext
16307 if { (eval echo "$as_me:16307: \"$ac_link\"") >&5
16308   (eval $ac_link) 2>&5
16309   ac_status=$?
16310   echo "$as_me:16310: \$? = $ac_status" >&5
16311   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16312   { (eval echo "$as_me:16312: \"$ac_try\"") >&5
16313   (eval $ac_try) 2>&5
16314   ac_status=$?
16315   echo "$as_me:16315: \$? = $ac_status" >&5
16316   (exit $ac_status); }; }; then
16317   cf_cv_link_dataonly=yes
16318 else
16319   echo "$as_me: program exited with status $ac_status" >&5
16320 echo "$as_me: failed program was:" >&5
16321 cat conftest.$ac_ext >&5
16322 cf_cv_link_dataonly=no
16323 fi
16324 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16325 fi
16326         LIBS="$cf_saveLIBS"
16327
16328 fi
16329
16330 echo "$as_me:16330: result: $cf_cv_link_dataonly" >&5
16331 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
16332
16333 if test "$cf_cv_link_dataonly" = no ; then
16334
16335 cat >>confdefs.h <<\EOF
16336 #define BROKEN_LINKER 1
16337 EOF
16338
16339         BROKEN_LINKER=1
16340 fi
16341
16342 ###     Checks for library functions.
16343
16344 for ac_func in \
16345 getcwd \
16346 getegid \
16347 geteuid \
16348 getopt \
16349 getttynam \
16350 issetugid \
16351 poll \
16352 putenv \
16353 remove \
16354 select \
16355 setbuf \
16356 setbuffer \
16357 setenv \
16358 setvbuf \
16359 sigaction \
16360 sigvec \
16361 strdup \
16362 strstr \
16363 tcgetpgrp \
16364 times \
16365 vsnprintf \
16366
16367 do
16368 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16369 echo "$as_me:16369: checking for $ac_func" >&5
16370 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16371 if eval "test \"\${$as_ac_var+set}\" = set"; then
16372   echo $ECHO_N "(cached) $ECHO_C" >&6
16373 else
16374   cat >conftest.$ac_ext <<_ACEOF
16375 #line 16375 "configure"
16376 #include "confdefs.h"
16377 /* System header to define __stub macros and hopefully few prototypes,
16378     which can conflict with char $ac_func (); below.  */
16379 #include <assert.h>
16380 /* Override any gcc2 internal prototype to avoid an error.  */
16381 #ifdef __cplusplus
16382 extern "C"
16383 #endif
16384 /* We use char because int might match the return type of a gcc2
16385    builtin and then its argument prototype would still apply.  */
16386 char $ac_func ();
16387 char (*f) ();
16388
16389 int
16390 main ()
16391 {
16392 /* The GNU C library defines this for functions which it implements
16393     to always fail with ENOSYS.  Some functions are actually named
16394     something starting with __ and the normal name is an alias.  */
16395 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16396 choke me
16397 #else
16398 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16399 #endif
16400
16401   ;
16402   return 0;
16403 }
16404 _ACEOF
16405 rm -f conftest.$ac_objext conftest$ac_exeext
16406 if { (eval echo "$as_me:16406: \"$ac_link\"") >&5
16407   (eval $ac_link) 2>&5
16408   ac_status=$?
16409   echo "$as_me:16409: \$? = $ac_status" >&5
16410   (exit $ac_status); } &&
16411          { ac_try='test -s conftest$ac_exeext'
16412   { (eval echo "$as_me:16412: \"$ac_try\"") >&5
16413   (eval $ac_try) 2>&5
16414   ac_status=$?
16415   echo "$as_me:16415: \$? = $ac_status" >&5
16416   (exit $ac_status); }; }; then
16417   eval "$as_ac_var=yes"
16418 else
16419   echo "$as_me: failed program was:" >&5
16420 cat conftest.$ac_ext >&5
16421 eval "$as_ac_var=no"
16422 fi
16423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16424 fi
16425 echo "$as_me:16425: result: `eval echo '${'$as_ac_var'}'`" >&5
16426 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16427 if test `eval echo '${'$as_ac_var'}'` = yes; then
16428   cat >>confdefs.h <<EOF
16429 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16430 EOF
16431
16432 fi
16433 done
16434
16435 if test "x$ac_cv_func_getopt" = xno &&
16436    test "x$cf_with_progs$cf_with_tests" != xnono; then
16437         { { echo "$as_me:16437: error: getopt is required for building programs" >&5
16438 echo "$as_me: error: getopt is required for building programs" >&2;}
16439    { (exit 1); exit 1; }; }
16440 fi
16441
16442 if test "x$with_getcap" = "xyes" ; then
16443
16444 echo "$as_me:16444: checking for terminal-capability database functions" >&5
16445 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
16446 if test "${cf_cv_cgetent+set}" = set; then
16447   echo $ECHO_N "(cached) $ECHO_C" >&6
16448 else
16449
16450 cat >conftest.$ac_ext <<_ACEOF
16451 #line 16451 "configure"
16452 #include "confdefs.h"
16453
16454 #include <stdlib.h>
16455 int
16456 main ()
16457 {
16458
16459         char temp[128];
16460         char *buf = temp;
16461         char *db_array = temp;
16462         cgetent(&buf, &db_array, "vt100");
16463         cgetcap(buf, "tc", '=');
16464         cgetmatch(buf, "tc");
16465
16466   ;
16467   return 0;
16468 }
16469 _ACEOF
16470 rm -f conftest.$ac_objext conftest$ac_exeext
16471 if { (eval echo "$as_me:16471: \"$ac_link\"") >&5
16472   (eval $ac_link) 2>&5
16473   ac_status=$?
16474   echo "$as_me:16474: \$? = $ac_status" >&5
16475   (exit $ac_status); } &&
16476          { ac_try='test -s conftest$ac_exeext'
16477   { (eval echo "$as_me:16477: \"$ac_try\"") >&5
16478   (eval $ac_try) 2>&5
16479   ac_status=$?
16480   echo "$as_me:16480: \$? = $ac_status" >&5
16481   (exit $ac_status); }; }; then
16482   cf_cv_cgetent=yes
16483 else
16484   echo "$as_me: failed program was:" >&5
16485 cat conftest.$ac_ext >&5
16486 cf_cv_cgetent=no
16487 fi
16488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16489
16490 fi
16491 echo "$as_me:16491: result: $cf_cv_cgetent" >&5
16492 echo "${ECHO_T}$cf_cv_cgetent" >&6
16493
16494 if test "$cf_cv_cgetent" = yes
16495 then
16496
16497 cat >>confdefs.h <<\EOF
16498 #define HAVE_BSD_CGETENT 1
16499 EOF
16500
16501 echo "$as_me:16501: checking if cgetent uses const parameter" >&5
16502 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16503 if test "${cf_cv_cgetent_const+set}" = set; then
16504   echo $ECHO_N "(cached) $ECHO_C" >&6
16505 else
16506
16507 cat >conftest.$ac_ext <<_ACEOF
16508 #line 16508 "configure"
16509 #include "confdefs.h"
16510
16511 #include <stdlib.h>
16512 int
16513 main ()
16514 {
16515
16516         char temp[128];
16517         char *buf = temp;
16518 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16519         const char *db_array = temp;
16520         cgetent(&buf, &db_array, "vt100");
16521 #endif
16522         cgetcap(buf, "tc", '=');
16523         cgetmatch(buf, "tc");
16524
16525   ;
16526   return 0;
16527 }
16528 _ACEOF
16529 rm -f conftest.$ac_objext conftest$ac_exeext
16530 if { (eval echo "$as_me:16530: \"$ac_link\"") >&5
16531   (eval $ac_link) 2>&5
16532   ac_status=$?
16533   echo "$as_me:16533: \$? = $ac_status" >&5
16534   (exit $ac_status); } &&
16535          { ac_try='test -s conftest$ac_exeext'
16536   { (eval echo "$as_me:16536: \"$ac_try\"") >&5
16537   (eval $ac_try) 2>&5
16538   ac_status=$?
16539   echo "$as_me:16539: \$? = $ac_status" >&5
16540   (exit $ac_status); }; }; then
16541   cf_cv_cgetent_const=yes
16542 else
16543   echo "$as_me: failed program was:" >&5
16544 cat conftest.$ac_ext >&5
16545 cf_cv_cgetent_const=no
16546 fi
16547 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16548
16549 fi
16550 echo "$as_me:16550: result: $cf_cv_cgetent_const" >&5
16551 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16552         if test "$cf_cv_cgetent_const" = yes
16553         then
16554
16555 cat >>confdefs.h <<EOF
16556 #define CGETENT_CONST const
16557 EOF
16558
16559         fi
16560 fi
16561
16562 fi
16563
16564 echo "$as_me:16564: checking for isascii" >&5
16565 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16566 if test "${cf_cv_have_isascii+set}" = set; then
16567   echo $ECHO_N "(cached) $ECHO_C" >&6
16568 else
16569
16570         cat >conftest.$ac_ext <<_ACEOF
16571 #line 16571 "configure"
16572 #include "confdefs.h"
16573 #include <ctype.h>
16574 int
16575 main ()
16576 {
16577 int x = isascii(' ')
16578   ;
16579   return 0;
16580 }
16581 _ACEOF
16582 rm -f conftest.$ac_objext conftest$ac_exeext
16583 if { (eval echo "$as_me:16583: \"$ac_link\"") >&5
16584   (eval $ac_link) 2>&5
16585   ac_status=$?
16586   echo "$as_me:16586: \$? = $ac_status" >&5
16587   (exit $ac_status); } &&
16588          { ac_try='test -s conftest$ac_exeext'
16589   { (eval echo "$as_me:16589: \"$ac_try\"") >&5
16590   (eval $ac_try) 2>&5
16591   ac_status=$?
16592   echo "$as_me:16592: \$? = $ac_status" >&5
16593   (exit $ac_status); }; }; then
16594   cf_cv_have_isascii=yes
16595 else
16596   echo "$as_me: failed program was:" >&5
16597 cat conftest.$ac_ext >&5
16598 cf_cv_have_isascii=no
16599 fi
16600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16601
16602 fi
16603 echo "$as_me:16603: result: $cf_cv_have_isascii" >&5
16604 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16605 test "$cf_cv_have_isascii" = yes &&
16606 cat >>confdefs.h <<\EOF
16607 #define HAVE_ISASCII 1
16608 EOF
16609
16610 if test "$ac_cv_func_sigaction" = yes; then
16611 echo "$as_me:16611: checking whether sigaction needs _POSIX_SOURCE" >&5
16612 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16613 cat >conftest.$ac_ext <<_ACEOF
16614 #line 16614 "configure"
16615 #include "confdefs.h"
16616
16617 #include <sys/types.h>
16618 #include <signal.h>
16619 int
16620 main ()
16621 {
16622 struct sigaction act
16623   ;
16624   return 0;
16625 }
16626 _ACEOF
16627 rm -f conftest.$ac_objext
16628 if { (eval echo "$as_me:16628: \"$ac_compile\"") >&5
16629   (eval $ac_compile) 2>&5
16630   ac_status=$?
16631   echo "$as_me:16631: \$? = $ac_status" >&5
16632   (exit $ac_status); } &&
16633          { ac_try='test -s conftest.$ac_objext'
16634   { (eval echo "$as_me:16634: \"$ac_try\"") >&5
16635   (eval $ac_try) 2>&5
16636   ac_status=$?
16637   echo "$as_me:16637: \$? = $ac_status" >&5
16638   (exit $ac_status); }; }; then
16639   sigact_bad=no
16640 else
16641   echo "$as_me: failed program was:" >&5
16642 cat conftest.$ac_ext >&5
16643
16644 cat >conftest.$ac_ext <<_ACEOF
16645 #line 16645 "configure"
16646 #include "confdefs.h"
16647
16648 #define _POSIX_SOURCE
16649 #include <sys/types.h>
16650 #include <signal.h>
16651 int
16652 main ()
16653 {
16654 struct sigaction act
16655   ;
16656   return 0;
16657 }
16658 _ACEOF
16659 rm -f conftest.$ac_objext
16660 if { (eval echo "$as_me:16660: \"$ac_compile\"") >&5
16661   (eval $ac_compile) 2>&5
16662   ac_status=$?
16663   echo "$as_me:16663: \$? = $ac_status" >&5
16664   (exit $ac_status); } &&
16665          { ac_try='test -s conftest.$ac_objext'
16666   { (eval echo "$as_me:16666: \"$ac_try\"") >&5
16667   (eval $ac_try) 2>&5
16668   ac_status=$?
16669   echo "$as_me:16669: \$? = $ac_status" >&5
16670   (exit $ac_status); }; }; then
16671   sigact_bad=yes
16672
16673 cat >>confdefs.h <<\EOF
16674 #define _POSIX_SOURCE 1
16675 EOF
16676
16677 else
16678   echo "$as_me: failed program was:" >&5
16679 cat conftest.$ac_ext >&5
16680 sigact_bad=unknown
16681 fi
16682 rm -f conftest.$ac_objext conftest.$ac_ext
16683 fi
16684 rm -f conftest.$ac_objext conftest.$ac_ext
16685 echo "$as_me:16685: result: $sigact_bad" >&5
16686 echo "${ECHO_T}$sigact_bad" >&6
16687 fi
16688
16689 echo "$as_me:16689: checking if nanosleep really works" >&5
16690 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16691 if test "${cf_cv_func_nanosleep+set}" = set; then
16692   echo $ECHO_N "(cached) $ECHO_C" >&6
16693 else
16694
16695 if test "$cross_compiling" = yes; then
16696   cf_cv_func_nanosleep=unknown
16697 else
16698   cat >conftest.$ac_ext <<_ACEOF
16699 #line 16699 "configure"
16700 #include "confdefs.h"
16701
16702 #include <stdio.h>
16703 #include <errno.h>
16704 #include <time.h>
16705
16706 #ifdef HAVE_SYS_TIME_H
16707 #include <sys/time.h>
16708 #endif
16709
16710 int main() {
16711         struct timespec ts1, ts2;
16712         int code;
16713         ts1.tv_sec  = 0;
16714         ts1.tv_nsec = 750000000;
16715         ts2.tv_sec  = 0;
16716         ts2.tv_nsec = 0;
16717         errno = 0;
16718         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16719         ${cf_cv_main_return:-return}(code != 0);
16720 }
16721
16722 _ACEOF
16723 rm -f conftest$ac_exeext
16724 if { (eval echo "$as_me:16724: \"$ac_link\"") >&5
16725   (eval $ac_link) 2>&5
16726   ac_status=$?
16727   echo "$as_me:16727: \$? = $ac_status" >&5
16728   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16729   { (eval echo "$as_me:16729: \"$ac_try\"") >&5
16730   (eval $ac_try) 2>&5
16731   ac_status=$?
16732   echo "$as_me:16732: \$? = $ac_status" >&5
16733   (exit $ac_status); }; }; then
16734   cf_cv_func_nanosleep=yes
16735 else
16736   echo "$as_me: program exited with status $ac_status" >&5
16737 echo "$as_me: failed program was:" >&5
16738 cat conftest.$ac_ext >&5
16739 cf_cv_func_nanosleep=no
16740 fi
16741 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16742 fi
16743 fi
16744 echo "$as_me:16744: result: $cf_cv_func_nanosleep" >&5
16745 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16746
16747 test "$cf_cv_func_nanosleep" = "yes" &&
16748 cat >>confdefs.h <<\EOF
16749 #define HAVE_NANOSLEEP 1
16750 EOF
16751
16752 for ac_header in \
16753 termio.h \
16754 termios.h \
16755 unistd.h \
16756
16757 do
16758 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16759 echo "$as_me:16759: checking for $ac_header" >&5
16760 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16761 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16762   echo $ECHO_N "(cached) $ECHO_C" >&6
16763 else
16764   cat >conftest.$ac_ext <<_ACEOF
16765 #line 16765 "configure"
16766 #include "confdefs.h"
16767 #include <$ac_header>
16768 _ACEOF
16769 if { (eval echo "$as_me:16769: \"$ac_cpp conftest.$ac_ext\"") >&5
16770   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16771   ac_status=$?
16772   egrep -v '^ *\+' conftest.er1 >conftest.err
16773   rm -f conftest.er1
16774   cat conftest.err >&5
16775   echo "$as_me:16775: \$? = $ac_status" >&5
16776   (exit $ac_status); } >/dev/null; then
16777   if test -s conftest.err; then
16778     ac_cpp_err=$ac_c_preproc_warn_flag
16779   else
16780     ac_cpp_err=
16781   fi
16782 else
16783   ac_cpp_err=yes
16784 fi
16785 if test -z "$ac_cpp_err"; then
16786   eval "$as_ac_Header=yes"
16787 else
16788   echo "$as_me: failed program was:" >&5
16789   cat conftest.$ac_ext >&5
16790   eval "$as_ac_Header=no"
16791 fi
16792 rm -f conftest.err conftest.$ac_ext
16793 fi
16794 echo "$as_me:16794: result: `eval echo '${'$as_ac_Header'}'`" >&5
16795 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16796 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16797   cat >>confdefs.h <<EOF
16798 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16799 EOF
16800
16801 fi
16802 done
16803
16804 if test "$ISC" = yes ; then
16805
16806 for ac_header in sys/termio.h
16807 do
16808 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16809 echo "$as_me:16809: checking for $ac_header" >&5
16810 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16811 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16812   echo $ECHO_N "(cached) $ECHO_C" >&6
16813 else
16814   cat >conftest.$ac_ext <<_ACEOF
16815 #line 16815 "configure"
16816 #include "confdefs.h"
16817 #include <$ac_header>
16818 _ACEOF
16819 if { (eval echo "$as_me:16819: \"$ac_cpp conftest.$ac_ext\"") >&5
16820   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16821   ac_status=$?
16822   egrep -v '^ *\+' conftest.er1 >conftest.err
16823   rm -f conftest.er1
16824   cat conftest.err >&5
16825   echo "$as_me:16825: \$? = $ac_status" >&5
16826   (exit $ac_status); } >/dev/null; then
16827   if test -s conftest.err; then
16828     ac_cpp_err=$ac_c_preproc_warn_flag
16829   else
16830     ac_cpp_err=
16831   fi
16832 else
16833   ac_cpp_err=yes
16834 fi
16835 if test -z "$ac_cpp_err"; then
16836   eval "$as_ac_Header=yes"
16837 else
16838   echo "$as_me: failed program was:" >&5
16839   cat conftest.$ac_ext >&5
16840   eval "$as_ac_Header=no"
16841 fi
16842 rm -f conftest.err conftest.$ac_ext
16843 fi
16844 echo "$as_me:16844: result: `eval echo '${'$as_ac_Header'}'`" >&5
16845 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16846 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16847   cat >>confdefs.h <<EOF
16848 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16849 EOF
16850
16851 fi
16852 done
16853
16854 fi
16855 if test "$ac_cv_header_termios_h" = yes ; then
16856         case "$CFLAGS $CPPFLAGS" in
16857         (*-D_POSIX_SOURCE*)
16858                 termios_bad=dunno ;;
16859         (*)     termios_bad=maybe ;;
16860         esac
16861         if test "$termios_bad" = maybe ; then
16862         echo "$as_me:16862: checking whether termios.h needs _POSIX_SOURCE" >&5
16863 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16864         cat >conftest.$ac_ext <<_ACEOF
16865 #line 16865 "configure"
16866 #include "confdefs.h"
16867 #include <termios.h>
16868 int
16869 main ()
16870 {
16871 struct termios foo; int x = foo.c_iflag
16872   ;
16873   return 0;
16874 }
16875 _ACEOF
16876 rm -f conftest.$ac_objext
16877 if { (eval echo "$as_me:16877: \"$ac_compile\"") >&5
16878   (eval $ac_compile) 2>&5
16879   ac_status=$?
16880   echo "$as_me:16880: \$? = $ac_status" >&5
16881   (exit $ac_status); } &&
16882          { ac_try='test -s conftest.$ac_objext'
16883   { (eval echo "$as_me:16883: \"$ac_try\"") >&5
16884   (eval $ac_try) 2>&5
16885   ac_status=$?
16886   echo "$as_me:16886: \$? = $ac_status" >&5
16887   (exit $ac_status); }; }; then
16888   termios_bad=no
16889 else
16890   echo "$as_me: failed program was:" >&5
16891 cat conftest.$ac_ext >&5
16892
16893                 cat >conftest.$ac_ext <<_ACEOF
16894 #line 16894 "configure"
16895 #include "confdefs.h"
16896
16897 #define _POSIX_SOURCE
16898 #include <termios.h>
16899 int
16900 main ()
16901 {
16902 struct termios foo; int x = foo.c_iflag
16903   ;
16904   return 0;
16905 }
16906 _ACEOF
16907 rm -f conftest.$ac_objext
16908 if { (eval echo "$as_me:16908: \"$ac_compile\"") >&5
16909   (eval $ac_compile) 2>&5
16910   ac_status=$?
16911   echo "$as_me:16911: \$? = $ac_status" >&5
16912   (exit $ac_status); } &&
16913          { ac_try='test -s conftest.$ac_objext'
16914   { (eval echo "$as_me:16914: \"$ac_try\"") >&5
16915   (eval $ac_try) 2>&5
16916   ac_status=$?
16917   echo "$as_me:16917: \$? = $ac_status" >&5
16918   (exit $ac_status); }; }; then
16919   termios_bad=unknown
16920 else
16921   echo "$as_me: failed program was:" >&5
16922 cat conftest.$ac_ext >&5
16923 termios_bad=yes
16924 cat >>confdefs.h <<\EOF
16925 #define _POSIX_SOURCE 1
16926 EOF
16927
16928 fi
16929 rm -f conftest.$ac_objext conftest.$ac_ext
16930
16931 fi
16932 rm -f conftest.$ac_objext conftest.$ac_ext
16933         echo "$as_me:16933: result: $termios_bad" >&5
16934 echo "${ECHO_T}$termios_bad" >&6
16935         fi
16936 fi
16937
16938 echo "$as_me:16938: checking for tcgetattr" >&5
16939 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16940 if test "${cf_cv_have_tcgetattr+set}" = set; then
16941   echo $ECHO_N "(cached) $ECHO_C" >&6
16942 else
16943
16944 cat >conftest.$ac_ext <<_ACEOF
16945 #line 16945 "configure"
16946 #include "confdefs.h"
16947
16948 #include <sys/types.h>
16949 #ifdef HAVE_UNISTD_H
16950 #include <unistd.h>
16951 #endif
16952 #ifdef HAVE_TERMIOS_H
16953 #include <termios.h>
16954 #define TTY struct termios
16955 #else
16956 #ifdef HAVE_TERMIO_H
16957 #include <termio.h>
16958 #define TTY struct termio
16959 #endif
16960 #endif
16961
16962 int
16963 main ()
16964 {
16965
16966 TTY foo;
16967 tcgetattr(1, &foo);
16968   ;
16969   return 0;
16970 }
16971 _ACEOF
16972 rm -f conftest.$ac_objext conftest$ac_exeext
16973 if { (eval echo "$as_me:16973: \"$ac_link\"") >&5
16974   (eval $ac_link) 2>&5
16975   ac_status=$?
16976   echo "$as_me:16976: \$? = $ac_status" >&5
16977   (exit $ac_status); } &&
16978          { ac_try='test -s conftest$ac_exeext'
16979   { (eval echo "$as_me:16979: \"$ac_try\"") >&5
16980   (eval $ac_try) 2>&5
16981   ac_status=$?
16982   echo "$as_me:16982: \$? = $ac_status" >&5
16983   (exit $ac_status); }; }; then
16984   cf_cv_have_tcgetattr=yes
16985 else
16986   echo "$as_me: failed program was:" >&5
16987 cat conftest.$ac_ext >&5
16988 cf_cv_have_tcgetattr=no
16989 fi
16990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16991 fi
16992 echo "$as_me:16992: result: $cf_cv_have_tcgetattr" >&5
16993 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16994 test "$cf_cv_have_tcgetattr" = yes &&
16995 cat >>confdefs.h <<\EOF
16996 #define HAVE_TCGETATTR 1
16997 EOF
16998
16999 echo "$as_me:16999: checking for vsscanf function or workaround" >&5
17000 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
17001 if test "${cf_cv_func_vsscanf+set}" = set; then
17002   echo $ECHO_N "(cached) $ECHO_C" >&6
17003 else
17004
17005 cat >conftest.$ac_ext <<_ACEOF
17006 #line 17006 "configure"
17007 #include "confdefs.h"
17008
17009 #include <stdarg.h>
17010 #include <stdio.h>
17011 int
17012 main ()
17013 {
17014
17015         va_list ap;
17016         vsscanf("from", "%d", ap)
17017   ;
17018   return 0;
17019 }
17020 _ACEOF
17021 rm -f conftest.$ac_objext conftest$ac_exeext
17022 if { (eval echo "$as_me:17022: \"$ac_link\"") >&5
17023   (eval $ac_link) 2>&5
17024   ac_status=$?
17025   echo "$as_me:17025: \$? = $ac_status" >&5
17026   (exit $ac_status); } &&
17027          { ac_try='test -s conftest$ac_exeext'
17028   { (eval echo "$as_me:17028: \"$ac_try\"") >&5
17029   (eval $ac_try) 2>&5
17030   ac_status=$?
17031   echo "$as_me:17031: \$? = $ac_status" >&5
17032   (exit $ac_status); }; }; then
17033   cf_cv_func_vsscanf=vsscanf
17034 else
17035   echo "$as_me: failed program was:" >&5
17036 cat conftest.$ac_ext >&5
17037
17038 cat >conftest.$ac_ext <<_ACEOF
17039 #line 17039 "configure"
17040 #include "confdefs.h"
17041
17042 #include <stdarg.h>
17043 #include <stdio.h>
17044 int
17045 main ()
17046 {
17047
17048         FILE strbuf;
17049         char *str = "from";
17050
17051         strbuf._flag = _IOREAD;
17052         strbuf._ptr = strbuf._base = (unsigned char *) str;
17053         strbuf._cnt = strlen(str);
17054         strbuf._file = _NFILE;
17055         return (vfscanf(&strbuf, "%d", ap))
17056   ;
17057   return 0;
17058 }
17059 _ACEOF
17060 rm -f conftest.$ac_objext conftest$ac_exeext
17061 if { (eval echo "$as_me:17061: \"$ac_link\"") >&5
17062   (eval $ac_link) 2>&5
17063   ac_status=$?
17064   echo "$as_me:17064: \$? = $ac_status" >&5
17065   (exit $ac_status); } &&
17066          { ac_try='test -s conftest$ac_exeext'
17067   { (eval echo "$as_me:17067: \"$ac_try\"") >&5
17068   (eval $ac_try) 2>&5
17069   ac_status=$?
17070   echo "$as_me:17070: \$? = $ac_status" >&5
17071   (exit $ac_status); }; }; then
17072   cf_cv_func_vsscanf=vfscanf
17073 else
17074   echo "$as_me: failed program was:" >&5
17075 cat conftest.$ac_ext >&5
17076
17077 cat >conftest.$ac_ext <<_ACEOF
17078 #line 17078 "configure"
17079 #include "confdefs.h"
17080
17081 #include <stdarg.h>
17082 #include <stdio.h>
17083 int
17084 main ()
17085 {
17086
17087         FILE strbuf;
17088         char *str = "from";
17089
17090         strbuf._flag = _IOREAD;
17091         strbuf._ptr = strbuf._base = (unsigned char *) str;
17092         strbuf._cnt = strlen(str);
17093         strbuf._file = _NFILE;
17094         return (_doscan(&strbuf, "%d", ap))
17095   ;
17096   return 0;
17097 }
17098 _ACEOF
17099 rm -f conftest.$ac_objext conftest$ac_exeext
17100 if { (eval echo "$as_me:17100: \"$ac_link\"") >&5
17101   (eval $ac_link) 2>&5
17102   ac_status=$?
17103   echo "$as_me:17103: \$? = $ac_status" >&5
17104   (exit $ac_status); } &&
17105          { ac_try='test -s conftest$ac_exeext'
17106   { (eval echo "$as_me:17106: \"$ac_try\"") >&5
17107   (eval $ac_try) 2>&5
17108   ac_status=$?
17109   echo "$as_me:17109: \$? = $ac_status" >&5
17110   (exit $ac_status); }; }; then
17111   cf_cv_func_vsscanf=_doscan
17112 else
17113   echo "$as_me: failed program was:" >&5
17114 cat conftest.$ac_ext >&5
17115
17116 cf_cv_func_vsscanf=no
17117 fi
17118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17119 fi
17120 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17121 fi
17122 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17123 fi
17124 echo "$as_me:17124: result: $cf_cv_func_vsscanf" >&5
17125 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
17126
17127 case $cf_cv_func_vsscanf in
17128 (vsscanf)
17129 cat >>confdefs.h <<\EOF
17130 #define HAVE_VSSCANF 1
17131 EOF
17132 ;;
17133 (vfscanf)
17134 cat >>confdefs.h <<\EOF
17135 #define HAVE_VFSCANF 1
17136 EOF
17137 ;;
17138 (_doscan)
17139 cat >>confdefs.h <<\EOF
17140 #define HAVE__DOSCAN 1
17141 EOF
17142 ;;
17143 esac
17144
17145 echo "$as_me:17145: checking for working mkstemp" >&5
17146 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
17147 if test "${cf_cv_func_mkstemp+set}" = set; then
17148   echo $ECHO_N "(cached) $ECHO_C" >&6
17149 else
17150
17151 rm -rf conftest*
17152 if test "$cross_compiling" = yes; then
17153   cf_cv_func_mkstemp=maybe
17154 else
17155   cat >conftest.$ac_ext <<_ACEOF
17156 #line 17156 "configure"
17157 #include "confdefs.h"
17158
17159 #include <sys/types.h>
17160 #include <stdlib.h>
17161 #include <stdio.h>
17162 #include <string.h>
17163 #include <sys/stat.h>
17164 int main()
17165 {
17166         char *tmpl = "conftestXXXXXX";
17167         char name[2][80];
17168         int n;
17169         int result = 0;
17170         int fd;
17171         struct stat sb;
17172
17173         umask(077);
17174         for (n = 0; n < 2; ++n) {
17175                 strcpy(name[n], tmpl);
17176                 if ((fd = mkstemp(name[n])) >= 0) {
17177                         if (!strcmp(name[n], tmpl)
17178                          || stat(name[n], &sb) != 0
17179                          || (sb.st_mode & S_IFMT) != S_IFREG
17180                          || (sb.st_mode & 077) != 0) {
17181                                 result = 1;
17182                         }
17183                         close(fd);
17184                 }
17185         }
17186         if (result == 0
17187          && !strcmp(name[0], name[1]))
17188                 result = 1;
17189         ${cf_cv_main_return:-return}(result);
17190 }
17191
17192 _ACEOF
17193 rm -f conftest$ac_exeext
17194 if { (eval echo "$as_me:17194: \"$ac_link\"") >&5
17195   (eval $ac_link) 2>&5
17196   ac_status=$?
17197   echo "$as_me:17197: \$? = $ac_status" >&5
17198   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17199   { (eval echo "$as_me:17199: \"$ac_try\"") >&5
17200   (eval $ac_try) 2>&5
17201   ac_status=$?
17202   echo "$as_me:17202: \$? = $ac_status" >&5
17203   (exit $ac_status); }; }; then
17204   cf_cv_func_mkstemp=yes
17205
17206 else
17207   echo "$as_me: program exited with status $ac_status" >&5
17208 echo "$as_me: failed program was:" >&5
17209 cat conftest.$ac_ext >&5
17210 cf_cv_func_mkstemp=no
17211
17212 fi
17213 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17214 fi
17215
17216 fi
17217 echo "$as_me:17217: result: $cf_cv_func_mkstemp" >&5
17218 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
17219 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
17220         echo "$as_me:17220: checking for mkstemp" >&5
17221 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
17222 if test "${ac_cv_func_mkstemp+set}" = set; then
17223   echo $ECHO_N "(cached) $ECHO_C" >&6
17224 else
17225   cat >conftest.$ac_ext <<_ACEOF
17226 #line 17226 "configure"
17227 #include "confdefs.h"
17228 /* System header to define __stub macros and hopefully few prototypes,
17229     which can conflict with char mkstemp (); below.  */
17230 #include <assert.h>
17231 /* Override any gcc2 internal prototype to avoid an error.  */
17232 #ifdef __cplusplus
17233 extern "C"
17234 #endif
17235 /* We use char because int might match the return type of a gcc2
17236    builtin and then its argument prototype would still apply.  */
17237 char mkstemp ();
17238 char (*f) ();
17239
17240 int
17241 main ()
17242 {
17243 /* The GNU C library defines this for functions which it implements
17244     to always fail with ENOSYS.  Some functions are actually named
17245     something starting with __ and the normal name is an alias.  */
17246 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
17247 choke me
17248 #else
17249 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17250 #endif
17251
17252   ;
17253   return 0;
17254 }
17255 _ACEOF
17256 rm -f conftest.$ac_objext conftest$ac_exeext
17257 if { (eval echo "$as_me:17257: \"$ac_link\"") >&5
17258   (eval $ac_link) 2>&5
17259   ac_status=$?
17260   echo "$as_me:17260: \$? = $ac_status" >&5
17261   (exit $ac_status); } &&
17262          { ac_try='test -s conftest$ac_exeext'
17263   { (eval echo "$as_me:17263: \"$ac_try\"") >&5
17264   (eval $ac_try) 2>&5
17265   ac_status=$?
17266   echo "$as_me:17266: \$? = $ac_status" >&5
17267   (exit $ac_status); }; }; then
17268   ac_cv_func_mkstemp=yes
17269 else
17270   echo "$as_me: failed program was:" >&5
17271 cat conftest.$ac_ext >&5
17272 ac_cv_func_mkstemp=no
17273 fi
17274 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17275 fi
17276 echo "$as_me:17276: result: $ac_cv_func_mkstemp" >&5
17277 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
17278
17279 fi
17280 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
17281
17282 cat >>confdefs.h <<\EOF
17283 #define HAVE_MKSTEMP 1
17284 EOF
17285
17286 fi
17287
17288 # setup for prototype of fallback for vsscanf()
17289
17290 if test "$cf_cv_func_vsscanf" = vsscanf ; then
17291         HAVE_VSSCANF=1
17292 else
17293         HAVE_VSSCANF=0
17294 fi
17295
17296 if test "x$cross_compiling" = xyes ; then
17297         { echo "$as_me:17297: WARNING: cross compiling: assume setvbuf params not reversed" >&5
17298 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
17299 else
17300         echo "$as_me:17300: checking whether setvbuf arguments are reversed" >&5
17301 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
17302 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
17303   echo $ECHO_N "(cached) $ECHO_C" >&6
17304 else
17305   if test "$cross_compiling" = yes; then
17306   { { echo "$as_me:17306: error: cannot run test program while cross compiling" >&5
17307 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
17308    { (exit 1); exit 1; }; }
17309 else
17310   cat >conftest.$ac_ext <<_ACEOF
17311 #line 17311 "configure"
17312 #include "confdefs.h"
17313 #include <stdio.h>
17314 /* If setvbuf has the reversed format, exit 0. */
17315 int
17316 main ()
17317 {
17318   /* This call has the arguments reversed.
17319      A reversed system may check and see that the address of main
17320      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
17321   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
17322     $ac_main_return(1);
17323   putc('\r', stdout);
17324   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
17325 }
17326 _ACEOF
17327 rm -f conftest$ac_exeext
17328 if { (eval echo "$as_me:17328: \"$ac_link\"") >&5
17329   (eval $ac_link) 2>&5
17330   ac_status=$?
17331   echo "$as_me:17331: \$? = $ac_status" >&5
17332   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17333   { (eval echo "$as_me:17333: \"$ac_try\"") >&5
17334   (eval $ac_try) 2>&5
17335   ac_status=$?
17336   echo "$as_me:17336: \$? = $ac_status" >&5
17337   (exit $ac_status); }; }; then
17338   ac_cv_func_setvbuf_reversed=yes
17339 else
17340   echo "$as_me: program exited with status $ac_status" >&5
17341 echo "$as_me: failed program was:" >&5
17342 cat conftest.$ac_ext >&5
17343 ac_cv_func_setvbuf_reversed=no
17344 fi
17345 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17346 fi
17347 rm -f core core.* *.core
17348 fi
17349 echo "$as_me:17349: result: $ac_cv_func_setvbuf_reversed" >&5
17350 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
17351 if test $ac_cv_func_setvbuf_reversed = yes; then
17352
17353 cat >>confdefs.h <<\EOF
17354 #define SETVBUF_REVERSED 1
17355 EOF
17356
17357 fi
17358
17359 fi
17360 echo "$as_me:17360: checking for intptr_t" >&5
17361 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
17362 if test "${ac_cv_type_intptr_t+set}" = set; then
17363   echo $ECHO_N "(cached) $ECHO_C" >&6
17364 else
17365   cat >conftest.$ac_ext <<_ACEOF
17366 #line 17366 "configure"
17367 #include "confdefs.h"
17368 $ac_includes_default
17369 int
17370 main ()
17371 {
17372 if ((intptr_t *) 0)
17373   return 0;
17374 if (sizeof (intptr_t))
17375   return 0;
17376   ;
17377   return 0;
17378 }
17379 _ACEOF
17380 rm -f conftest.$ac_objext
17381 if { (eval echo "$as_me:17381: \"$ac_compile\"") >&5
17382   (eval $ac_compile) 2>&5
17383   ac_status=$?
17384   echo "$as_me:17384: \$? = $ac_status" >&5
17385   (exit $ac_status); } &&
17386          { ac_try='test -s conftest.$ac_objext'
17387   { (eval echo "$as_me:17387: \"$ac_try\"") >&5
17388   (eval $ac_try) 2>&5
17389   ac_status=$?
17390   echo "$as_me:17390: \$? = $ac_status" >&5
17391   (exit $ac_status); }; }; then
17392   ac_cv_type_intptr_t=yes
17393 else
17394   echo "$as_me: failed program was:" >&5
17395 cat conftest.$ac_ext >&5
17396 ac_cv_type_intptr_t=no
17397 fi
17398 rm -f conftest.$ac_objext conftest.$ac_ext
17399 fi
17400 echo "$as_me:17400: result: $ac_cv_type_intptr_t" >&5
17401 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
17402 if test $ac_cv_type_intptr_t = yes; then
17403   :
17404 else
17405
17406 cat >>confdefs.h <<EOF
17407 #define intptr_t long
17408 EOF
17409
17410 fi
17411
17412 echo "$as_me:17412: checking for ssize_t" >&5
17413 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
17414 if test "${ac_cv_type_ssize_t+set}" = set; then
17415   echo $ECHO_N "(cached) $ECHO_C" >&6
17416 else
17417   cat >conftest.$ac_ext <<_ACEOF
17418 #line 17418 "configure"
17419 #include "confdefs.h"
17420 $ac_includes_default
17421 int
17422 main ()
17423 {
17424 if ((ssize_t *) 0)
17425   return 0;
17426 if (sizeof (ssize_t))
17427   return 0;
17428   ;
17429   return 0;
17430 }
17431 _ACEOF
17432 rm -f conftest.$ac_objext
17433 if { (eval echo "$as_me:17433: \"$ac_compile\"") >&5
17434   (eval $ac_compile) 2>&5
17435   ac_status=$?
17436   echo "$as_me:17436: \$? = $ac_status" >&5
17437   (exit $ac_status); } &&
17438          { ac_try='test -s conftest.$ac_objext'
17439   { (eval echo "$as_me:17439: \"$ac_try\"") >&5
17440   (eval $ac_try) 2>&5
17441   ac_status=$?
17442   echo "$as_me:17442: \$? = $ac_status" >&5
17443   (exit $ac_status); }; }; then
17444   ac_cv_type_ssize_t=yes
17445 else
17446   echo "$as_me: failed program was:" >&5
17447 cat conftest.$ac_ext >&5
17448 ac_cv_type_ssize_t=no
17449 fi
17450 rm -f conftest.$ac_objext conftest.$ac_ext
17451 fi
17452 echo "$as_me:17452: result: $ac_cv_type_ssize_t" >&5
17453 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
17454 if test $ac_cv_type_ssize_t = yes; then
17455   :
17456 else
17457
17458 cat >>confdefs.h <<EOF
17459 #define ssize_t int
17460 EOF
17461
17462 fi
17463
17464 echo "$as_me:17464: checking for type sigaction_t" >&5
17465 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
17466 if test "${cf_cv_type_sigaction+set}" = set; then
17467   echo $ECHO_N "(cached) $ECHO_C" >&6
17468 else
17469
17470         cat >conftest.$ac_ext <<_ACEOF
17471 #line 17471 "configure"
17472 #include "confdefs.h"
17473
17474 #include <signal.h>
17475 int
17476 main ()
17477 {
17478 sigaction_t x
17479   ;
17480   return 0;
17481 }
17482 _ACEOF
17483 rm -f conftest.$ac_objext
17484 if { (eval echo "$as_me:17484: \"$ac_compile\"") >&5
17485   (eval $ac_compile) 2>&5
17486   ac_status=$?
17487   echo "$as_me:17487: \$? = $ac_status" >&5
17488   (exit $ac_status); } &&
17489          { ac_try='test -s conftest.$ac_objext'
17490   { (eval echo "$as_me:17490: \"$ac_try\"") >&5
17491   (eval $ac_try) 2>&5
17492   ac_status=$?
17493   echo "$as_me:17493: \$? = $ac_status" >&5
17494   (exit $ac_status); }; }; then
17495   cf_cv_type_sigaction=yes
17496 else
17497   echo "$as_me: failed program was:" >&5
17498 cat conftest.$ac_ext >&5
17499 cf_cv_type_sigaction=no
17500 fi
17501 rm -f conftest.$ac_objext conftest.$ac_ext
17502 fi
17503
17504 echo "$as_me:17504: result: $cf_cv_type_sigaction" >&5
17505 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
17506 test "$cf_cv_type_sigaction" = yes &&
17507 cat >>confdefs.h <<\EOF
17508 #define HAVE_TYPE_SIGACTION 1
17509 EOF
17510
17511 echo "$as_me:17511: checking declaration of size-change" >&5
17512 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
17513 if test "${cf_cv_sizechange+set}" = set; then
17514   echo $ECHO_N "(cached) $ECHO_C" >&6
17515 else
17516
17517         cf_cv_sizechange=unknown
17518         cf_save_CPPFLAGS="$CPPFLAGS"
17519
17520 for cf_opts in "" "NEED_PTEM_H"
17521 do
17522
17523         CPPFLAGS="$cf_save_CPPFLAGS"
17524         test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
17525         cat >conftest.$ac_ext <<_ACEOF
17526 #line 17526 "configure"
17527 #include "confdefs.h"
17528 #include <sys/types.h>
17529 #ifdef HAVE_TERMIOS_H
17530 #include <termios.h>
17531 #else
17532 #ifdef HAVE_TERMIO_H
17533 #include <termio.h>
17534 #endif
17535 #endif
17536 #ifdef NEED_PTEM_H
17537 /* This is a workaround for SCO:  they neglected to define struct winsize in
17538  * termios.h -- it's only in termio.h and ptem.h
17539  */
17540 #include        <sys/stream.h>
17541 #include        <sys/ptem.h>
17542 #endif
17543 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
17544 #include <sys/ioctl.h>
17545 #endif
17546
17547 int
17548 main ()
17549 {
17550
17551 #ifdef TIOCGSIZE
17552         struct ttysize win;     /* FIXME: what system is this? */
17553         int y = win.ts_lines;
17554         int x = win.ts_cols;
17555 #else
17556 #ifdef TIOCGWINSZ
17557         struct winsize win;
17558         int y = win.ws_row;
17559         int x = win.ws_col;
17560 #else
17561         no TIOCGSIZE or TIOCGWINSZ
17562 #endif /* TIOCGWINSZ */
17563 #endif /* TIOCGSIZE */
17564
17565   ;
17566   return 0;
17567 }
17568 _ACEOF
17569 rm -f conftest.$ac_objext
17570 if { (eval echo "$as_me:17570: \"$ac_compile\"") >&5
17571   (eval $ac_compile) 2>&5
17572   ac_status=$?
17573   echo "$as_me:17573: \$? = $ac_status" >&5
17574   (exit $ac_status); } &&
17575          { ac_try='test -s conftest.$ac_objext'
17576   { (eval echo "$as_me:17576: \"$ac_try\"") >&5
17577   (eval $ac_try) 2>&5
17578   ac_status=$?
17579   echo "$as_me:17579: \$? = $ac_status" >&5
17580   (exit $ac_status); }; }; then
17581   cf_cv_sizechange=yes
17582 else
17583   echo "$as_me: failed program was:" >&5
17584 cat conftest.$ac_ext >&5
17585 cf_cv_sizechange=no
17586 fi
17587 rm -f conftest.$ac_objext conftest.$ac_ext
17588
17589         CPPFLAGS="$cf_save_CPPFLAGS"
17590         if test "$cf_cv_sizechange" = yes ; then
17591                 echo "size-change succeeded ($cf_opts)" >&5
17592                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17593                 break
17594         fi
17595 done
17596
17597 fi
17598 echo "$as_me:17598: result: $cf_cv_sizechange" >&5
17599 echo "${ECHO_T}$cf_cv_sizechange" >&6
17600 if test "$cf_cv_sizechange" != no ; then
17601
17602 cat >>confdefs.h <<\EOF
17603 #define HAVE_SIZECHANGE 1
17604 EOF
17605
17606         case $cf_cv_sizechange in
17607         (NEED*)
17608                 cat >>confdefs.h <<EOF
17609 #define $cf_cv_sizechange  1
17610 EOF
17611
17612                 ;;
17613         esac
17614 fi
17615
17616 echo "$as_me:17616: checking for memmove" >&5
17617 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17618 if test "${ac_cv_func_memmove+set}" = set; then
17619   echo $ECHO_N "(cached) $ECHO_C" >&6
17620 else
17621   cat >conftest.$ac_ext <<_ACEOF
17622 #line 17622 "configure"
17623 #include "confdefs.h"
17624 /* System header to define __stub macros and hopefully few prototypes,
17625     which can conflict with char memmove (); below.  */
17626 #include <assert.h>
17627 /* Override any gcc2 internal prototype to avoid an error.  */
17628 #ifdef __cplusplus
17629 extern "C"
17630 #endif
17631 /* We use char because int might match the return type of a gcc2
17632    builtin and then its argument prototype would still apply.  */
17633 char memmove ();
17634 char (*f) ();
17635
17636 int
17637 main ()
17638 {
17639 /* The GNU C library defines this for functions which it implements
17640     to always fail with ENOSYS.  Some functions are actually named
17641     something starting with __ and the normal name is an alias.  */
17642 #if defined (__stub_memmove) || defined (__stub___memmove)
17643 choke me
17644 #else
17645 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17646 #endif
17647
17648   ;
17649   return 0;
17650 }
17651 _ACEOF
17652 rm -f conftest.$ac_objext conftest$ac_exeext
17653 if { (eval echo "$as_me:17653: \"$ac_link\"") >&5
17654   (eval $ac_link) 2>&5
17655   ac_status=$?
17656   echo "$as_me:17656: \$? = $ac_status" >&5
17657   (exit $ac_status); } &&
17658          { ac_try='test -s conftest$ac_exeext'
17659   { (eval echo "$as_me:17659: \"$ac_try\"") >&5
17660   (eval $ac_try) 2>&5
17661   ac_status=$?
17662   echo "$as_me:17662: \$? = $ac_status" >&5
17663   (exit $ac_status); }; }; then
17664   ac_cv_func_memmove=yes
17665 else
17666   echo "$as_me: failed program was:" >&5
17667 cat conftest.$ac_ext >&5
17668 ac_cv_func_memmove=no
17669 fi
17670 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17671 fi
17672 echo "$as_me:17672: result: $ac_cv_func_memmove" >&5
17673 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17674 if test $ac_cv_func_memmove = yes; then
17675   :
17676 else
17677
17678 echo "$as_me:17678: checking for bcopy" >&5
17679 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17680 if test "${ac_cv_func_bcopy+set}" = set; then
17681   echo $ECHO_N "(cached) $ECHO_C" >&6
17682 else
17683   cat >conftest.$ac_ext <<_ACEOF
17684 #line 17684 "configure"
17685 #include "confdefs.h"
17686 /* System header to define __stub macros and hopefully few prototypes,
17687     which can conflict with char bcopy (); below.  */
17688 #include <assert.h>
17689 /* Override any gcc2 internal prototype to avoid an error.  */
17690 #ifdef __cplusplus
17691 extern "C"
17692 #endif
17693 /* We use char because int might match the return type of a gcc2
17694    builtin and then its argument prototype would still apply.  */
17695 char bcopy ();
17696 char (*f) ();
17697
17698 int
17699 main ()
17700 {
17701 /* The GNU C library defines this for functions which it implements
17702     to always fail with ENOSYS.  Some functions are actually named
17703     something starting with __ and the normal name is an alias.  */
17704 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17705 choke me
17706 #else
17707 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17708 #endif
17709
17710   ;
17711   return 0;
17712 }
17713 _ACEOF
17714 rm -f conftest.$ac_objext conftest$ac_exeext
17715 if { (eval echo "$as_me:17715: \"$ac_link\"") >&5
17716   (eval $ac_link) 2>&5
17717   ac_status=$?
17718   echo "$as_me:17718: \$? = $ac_status" >&5
17719   (exit $ac_status); } &&
17720          { ac_try='test -s conftest$ac_exeext'
17721   { (eval echo "$as_me:17721: \"$ac_try\"") >&5
17722   (eval $ac_try) 2>&5
17723   ac_status=$?
17724   echo "$as_me:17724: \$? = $ac_status" >&5
17725   (exit $ac_status); }; }; then
17726   ac_cv_func_bcopy=yes
17727 else
17728   echo "$as_me: failed program was:" >&5
17729 cat conftest.$ac_ext >&5
17730 ac_cv_func_bcopy=no
17731 fi
17732 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17733 fi
17734 echo "$as_me:17734: result: $ac_cv_func_bcopy" >&5
17735 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17736 if test $ac_cv_func_bcopy = yes; then
17737
17738         echo "$as_me:17738: checking if bcopy does overlapping moves" >&5
17739 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17740 if test "${cf_cv_good_bcopy+set}" = set; then
17741   echo $ECHO_N "(cached) $ECHO_C" >&6
17742 else
17743
17744                 if test "$cross_compiling" = yes; then
17745   cf_cv_good_bcopy=unknown
17746 else
17747   cat >conftest.$ac_ext <<_ACEOF
17748 #line 17748 "configure"
17749 #include "confdefs.h"
17750
17751 int main() {
17752         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17753         char temp[40];
17754         bcopy(data, temp, sizeof(data));
17755         bcopy(temp+10, temp, 15);
17756         bcopy(temp+5, temp+15, 10);
17757         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17758 }
17759
17760 _ACEOF
17761 rm -f conftest$ac_exeext
17762 if { (eval echo "$as_me:17762: \"$ac_link\"") >&5
17763   (eval $ac_link) 2>&5
17764   ac_status=$?
17765   echo "$as_me:17765: \$? = $ac_status" >&5
17766   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17767   { (eval echo "$as_me:17767: \"$ac_try\"") >&5
17768   (eval $ac_try) 2>&5
17769   ac_status=$?
17770   echo "$as_me:17770: \$? = $ac_status" >&5
17771   (exit $ac_status); }; }; then
17772   cf_cv_good_bcopy=yes
17773 else
17774   echo "$as_me: program exited with status $ac_status" >&5
17775 echo "$as_me: failed program was:" >&5
17776 cat conftest.$ac_ext >&5
17777 cf_cv_good_bcopy=no
17778 fi
17779 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17780 fi
17781
17782 fi
17783 echo "$as_me:17783: result: $cf_cv_good_bcopy" >&5
17784 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17785
17786 else
17787   cf_cv_good_bcopy=no
17788 fi
17789
17790         if test "$cf_cv_good_bcopy" = yes ; then
17791
17792 cat >>confdefs.h <<\EOF
17793 #define USE_OK_BCOPY 1
17794 EOF
17795
17796         else
17797
17798 cat >>confdefs.h <<\EOF
17799 #define USE_MY_MEMMOVE 1
17800 EOF
17801
17802         fi
17803
17804 fi
17805
17806 echo "$as_me:17806: checking if poll really works" >&5
17807 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17808 if test "${cf_cv_working_poll+set}" = set; then
17809   echo $ECHO_N "(cached) $ECHO_C" >&6
17810 else
17811
17812 if test "$cross_compiling" = yes; then
17813   cf_cv_working_poll=unknown
17814 else
17815   cat >conftest.$ac_ext <<_ACEOF
17816 #line 17816 "configure"
17817 #include "confdefs.h"
17818
17819 #include <stdlib.h>
17820 #include <stdio.h>
17821 #include <unistd.h>
17822 #include <fcntl.h>
17823 #ifdef HAVE_POLL_H
17824 #include <poll.h>
17825 #else
17826 #include <sys/poll.h>
17827 #endif
17828 int main() {
17829         struct pollfd myfds;
17830         int ret;
17831
17832         /* check for Darwin bug with respect to "devices" */
17833         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17834         if (myfds.fd < 0)
17835                 myfds.fd = 0;
17836         myfds.events = POLLIN;
17837         myfds.revents = 0;
17838
17839         ret = poll(&myfds, 1, 100);
17840
17841         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17842                 ret = -1;
17843         } else {
17844                 int fd = 0;
17845                 if (!isatty(fd)) {
17846                         fd = open("/dev/tty", 2);       /* O_RDWR */
17847                 }
17848
17849                 if (fd >= 0) {
17850                         /* also check with standard input */
17851                         myfds.fd = fd;
17852                         myfds.events = POLLIN;
17853                         myfds.revents = 0;
17854                         ret = poll(&myfds, 1, 100);
17855                 } else {
17856                         ret = -1;
17857                 }
17858         }
17859         ${cf_cv_main_return:-return}(ret < 0);
17860 }
17861 _ACEOF
17862 rm -f conftest$ac_exeext
17863 if { (eval echo "$as_me:17863: \"$ac_link\"") >&5
17864   (eval $ac_link) 2>&5
17865   ac_status=$?
17866   echo "$as_me:17866: \$? = $ac_status" >&5
17867   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17868   { (eval echo "$as_me:17868: \"$ac_try\"") >&5
17869   (eval $ac_try) 2>&5
17870   ac_status=$?
17871   echo "$as_me:17871: \$? = $ac_status" >&5
17872   (exit $ac_status); }; }; then
17873   cf_cv_working_poll=yes
17874 else
17875   echo "$as_me: program exited with status $ac_status" >&5
17876 echo "$as_me: failed program was:" >&5
17877 cat conftest.$ac_ext >&5
17878 cf_cv_working_poll=no
17879 fi
17880 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17881 fi
17882 fi
17883 echo "$as_me:17883: result: $cf_cv_working_poll" >&5
17884 echo "${ECHO_T}$cf_cv_working_poll" >&6
17885 test "$cf_cv_working_poll" = "yes" &&
17886 cat >>confdefs.h <<\EOF
17887 #define HAVE_WORKING_POLL 1
17888 EOF
17889
17890 echo "$as_me:17890: checking for va_copy" >&5
17891 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17892 if test "${cf_cv_have_va_copy+set}" = set; then
17893   echo $ECHO_N "(cached) $ECHO_C" >&6
17894 else
17895
17896 cat >conftest.$ac_ext <<_ACEOF
17897 #line 17897 "configure"
17898 #include "confdefs.h"
17899
17900 #include <stdarg.h>
17901
17902 int
17903 main ()
17904 {
17905
17906         static va_list dst;
17907         static va_list src;
17908         va_copy(dst, src)
17909   ;
17910   return 0;
17911 }
17912 _ACEOF
17913 rm -f conftest.$ac_objext conftest$ac_exeext
17914 if { (eval echo "$as_me:17914: \"$ac_link\"") >&5
17915   (eval $ac_link) 2>&5
17916   ac_status=$?
17917   echo "$as_me:17917: \$? = $ac_status" >&5
17918   (exit $ac_status); } &&
17919          { ac_try='test -s conftest$ac_exeext'
17920   { (eval echo "$as_me:17920: \"$ac_try\"") >&5
17921   (eval $ac_try) 2>&5
17922   ac_status=$?
17923   echo "$as_me:17923: \$? = $ac_status" >&5
17924   (exit $ac_status); }; }; then
17925   cf_cv_have_va_copy=yes
17926 else
17927   echo "$as_me: failed program was:" >&5
17928 cat conftest.$ac_ext >&5
17929 cf_cv_have_va_copy=no
17930 fi
17931 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17932 fi
17933 echo "$as_me:17933: result: $cf_cv_have_va_copy" >&5
17934 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17935
17936 test "$cf_cv_have_va_copy" = yes &&
17937 cat >>confdefs.h <<\EOF
17938 #define HAVE_VA_COPY 1
17939 EOF
17940
17941 echo "$as_me:17941: checking for __va_copy" >&5
17942 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17943 if test "${cf_cv_have___va_copy+set}" = set; then
17944   echo $ECHO_N "(cached) $ECHO_C" >&6
17945 else
17946
17947 cat >conftest.$ac_ext <<_ACEOF
17948 #line 17948 "configure"
17949 #include "confdefs.h"
17950
17951 #include <stdarg.h>
17952
17953 int
17954 main ()
17955 {
17956
17957         static va_list dst;
17958         static va_list src;
17959         __va_copy(dst, src)
17960   ;
17961   return 0;
17962 }
17963 _ACEOF
17964 rm -f conftest.$ac_objext conftest$ac_exeext
17965 if { (eval echo "$as_me:17965: \"$ac_link\"") >&5
17966   (eval $ac_link) 2>&5
17967   ac_status=$?
17968   echo "$as_me:17968: \$? = $ac_status" >&5
17969   (exit $ac_status); } &&
17970          { ac_try='test -s conftest$ac_exeext'
17971   { (eval echo "$as_me:17971: \"$ac_try\"") >&5
17972   (eval $ac_try) 2>&5
17973   ac_status=$?
17974   echo "$as_me:17974: \$? = $ac_status" >&5
17975   (exit $ac_status); }; }; then
17976   cf_cv_have___va_copy=yes
17977 else
17978   echo "$as_me: failed program was:" >&5
17979 cat conftest.$ac_ext >&5
17980 cf_cv_have___va_copy=no
17981 fi
17982 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17983 fi
17984 echo "$as_me:17984: result: $cf_cv_have___va_copy" >&5
17985 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17986
17987 test "$cf_cv_have___va_copy" = yes &&
17988 cat >>confdefs.h <<\EOF
17989 #define HAVE___VA_COPY 1
17990 EOF
17991
17992 echo "$as_me:17992: checking for pid_t" >&5
17993 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17994 if test "${ac_cv_type_pid_t+set}" = set; then
17995   echo $ECHO_N "(cached) $ECHO_C" >&6
17996 else
17997   cat >conftest.$ac_ext <<_ACEOF
17998 #line 17998 "configure"
17999 #include "confdefs.h"
18000 $ac_includes_default
18001 int
18002 main ()
18003 {
18004 if ((pid_t *) 0)
18005   return 0;
18006 if (sizeof (pid_t))
18007   return 0;
18008   ;
18009   return 0;
18010 }
18011 _ACEOF
18012 rm -f conftest.$ac_objext
18013 if { (eval echo "$as_me:18013: \"$ac_compile\"") >&5
18014   (eval $ac_compile) 2>&5
18015   ac_status=$?
18016   echo "$as_me:18016: \$? = $ac_status" >&5
18017   (exit $ac_status); } &&
18018          { ac_try='test -s conftest.$ac_objext'
18019   { (eval echo "$as_me:18019: \"$ac_try\"") >&5
18020   (eval $ac_try) 2>&5
18021   ac_status=$?
18022   echo "$as_me:18022: \$? = $ac_status" >&5
18023   (exit $ac_status); }; }; then
18024   ac_cv_type_pid_t=yes
18025 else
18026   echo "$as_me: failed program was:" >&5
18027 cat conftest.$ac_ext >&5
18028 ac_cv_type_pid_t=no
18029 fi
18030 rm -f conftest.$ac_objext conftest.$ac_ext
18031 fi
18032 echo "$as_me:18032: result: $ac_cv_type_pid_t" >&5
18033 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
18034 if test $ac_cv_type_pid_t = yes; then
18035   :
18036 else
18037
18038 cat >>confdefs.h <<EOF
18039 #define pid_t int
18040 EOF
18041
18042 fi
18043
18044 for ac_header in unistd.h vfork.h
18045 do
18046 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18047 echo "$as_me:18047: checking for $ac_header" >&5
18048 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18049 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18050   echo $ECHO_N "(cached) $ECHO_C" >&6
18051 else
18052   cat >conftest.$ac_ext <<_ACEOF
18053 #line 18053 "configure"
18054 #include "confdefs.h"
18055 #include <$ac_header>
18056 _ACEOF
18057 if { (eval echo "$as_me:18057: \"$ac_cpp conftest.$ac_ext\"") >&5
18058   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18059   ac_status=$?
18060   egrep -v '^ *\+' conftest.er1 >conftest.err
18061   rm -f conftest.er1
18062   cat conftest.err >&5
18063   echo "$as_me:18063: \$? = $ac_status" >&5
18064   (exit $ac_status); } >/dev/null; then
18065   if test -s conftest.err; then
18066     ac_cpp_err=$ac_c_preproc_warn_flag
18067   else
18068     ac_cpp_err=
18069   fi
18070 else
18071   ac_cpp_err=yes
18072 fi
18073 if test -z "$ac_cpp_err"; then
18074   eval "$as_ac_Header=yes"
18075 else
18076   echo "$as_me: failed program was:" >&5
18077   cat conftest.$ac_ext >&5
18078   eval "$as_ac_Header=no"
18079 fi
18080 rm -f conftest.err conftest.$ac_ext
18081 fi
18082 echo "$as_me:18082: result: `eval echo '${'$as_ac_Header'}'`" >&5
18083 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18084 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18085   cat >>confdefs.h <<EOF
18086 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18087 EOF
18088
18089 fi
18090 done
18091
18092 for ac_func in fork vfork
18093 do
18094 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18095 echo "$as_me:18095: checking for $ac_func" >&5
18096 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18097 if eval "test \"\${$as_ac_var+set}\" = set"; then
18098   echo $ECHO_N "(cached) $ECHO_C" >&6
18099 else
18100   cat >conftest.$ac_ext <<_ACEOF
18101 #line 18101 "configure"
18102 #include "confdefs.h"
18103 /* System header to define __stub macros and hopefully few prototypes,
18104     which can conflict with char $ac_func (); below.  */
18105 #include <assert.h>
18106 /* Override any gcc2 internal prototype to avoid an error.  */
18107 #ifdef __cplusplus
18108 extern "C"
18109 #endif
18110 /* We use char because int might match the return type of a gcc2
18111    builtin and then its argument prototype would still apply.  */
18112 char $ac_func ();
18113 char (*f) ();
18114
18115 int
18116 main ()
18117 {
18118 /* The GNU C library defines this for functions which it implements
18119     to always fail with ENOSYS.  Some functions are actually named
18120     something starting with __ and the normal name is an alias.  */
18121 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18122 choke me
18123 #else
18124 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18125 #endif
18126
18127   ;
18128   return 0;
18129 }
18130 _ACEOF
18131 rm -f conftest.$ac_objext conftest$ac_exeext
18132 if { (eval echo "$as_me:18132: \"$ac_link\"") >&5
18133   (eval $ac_link) 2>&5
18134   ac_status=$?
18135   echo "$as_me:18135: \$? = $ac_status" >&5
18136   (exit $ac_status); } &&
18137          { ac_try='test -s conftest$ac_exeext'
18138   { (eval echo "$as_me:18138: \"$ac_try\"") >&5
18139   (eval $ac_try) 2>&5
18140   ac_status=$?
18141   echo "$as_me:18141: \$? = $ac_status" >&5
18142   (exit $ac_status); }; }; then
18143   eval "$as_ac_var=yes"
18144 else
18145   echo "$as_me: failed program was:" >&5
18146 cat conftest.$ac_ext >&5
18147 eval "$as_ac_var=no"
18148 fi
18149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18150 fi
18151 echo "$as_me:18151: result: `eval echo '${'$as_ac_var'}'`" >&5
18152 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18153 if test `eval echo '${'$as_ac_var'}'` = yes; then
18154   cat >>confdefs.h <<EOF
18155 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18156 EOF
18157
18158 fi
18159 done
18160
18161 ac_cv_func_fork_works=$ac_cv_func_fork
18162 if test "x$ac_cv_func_fork" = xyes; then
18163   echo "$as_me:18163: checking for working fork" >&5
18164 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
18165 if test "${ac_cv_func_fork_works+set}" = set; then
18166   echo $ECHO_N "(cached) $ECHO_C" >&6
18167 else
18168   if test "$cross_compiling" = yes; then
18169   ac_cv_func_fork_works=cross
18170 else
18171   cat >conftest.$ac_ext <<_ACEOF
18172 /* By Rüdiger Kuhlmann. */
18173       #include <sys/types.h>
18174       #if HAVE_UNISTD_H
18175       # include <unistd.h>
18176       #endif
18177       /* Some systems only have a dummy stub for fork() */
18178       int main ()
18179       {
18180         if (fork() < 0)
18181           $ac_main_return (1);
18182         $ac_main_return (0);
18183       }
18184 _ACEOF
18185 rm -f conftest$ac_exeext
18186 if { (eval echo "$as_me:18186: \"$ac_link\"") >&5
18187   (eval $ac_link) 2>&5
18188   ac_status=$?
18189   echo "$as_me:18189: \$? = $ac_status" >&5
18190   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18191   { (eval echo "$as_me:18191: \"$ac_try\"") >&5
18192   (eval $ac_try) 2>&5
18193   ac_status=$?
18194   echo "$as_me:18194: \$? = $ac_status" >&5
18195   (exit $ac_status); }; }; then
18196   ac_cv_func_fork_works=yes
18197 else
18198   echo "$as_me: program exited with status $ac_status" >&5
18199 echo "$as_me: failed program was:" >&5
18200 cat conftest.$ac_ext >&5
18201 ac_cv_func_fork_works=no
18202 fi
18203 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18204 fi
18205 fi
18206 echo "$as_me:18206: result: $ac_cv_func_fork_works" >&5
18207 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
18208
18209 fi
18210 if test "x$ac_cv_func_fork_works" = xcross; then
18211   case $host in
18212     *-*-amigaos* | *-*-msdosdjgpp*)
18213       # Override, as these systems have only a dummy fork() stub
18214       ac_cv_func_fork_works=no
18215       ;;
18216     *)
18217       ac_cv_func_fork_works=yes
18218       ;;
18219   esac
18220   { echo "$as_me:18220: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
18221 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
18222 fi
18223 ac_cv_func_vfork_works=$ac_cv_func_vfork
18224 if test "x$ac_cv_func_vfork" = xyes; then
18225   echo "$as_me:18225: checking for working vfork" >&5
18226 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
18227 if test "${ac_cv_func_vfork_works+set}" = set; then
18228   echo $ECHO_N "(cached) $ECHO_C" >&6
18229 else
18230   if test "$cross_compiling" = yes; then
18231   ac_cv_func_vfork_works=cross
18232 else
18233   cat >conftest.$ac_ext <<_ACEOF
18234 #line 18234 "configure"
18235 #include "confdefs.h"
18236 /* Thanks to Paul Eggert for this test.  */
18237 #include <stdio.h>
18238 #include <sys/types.h>
18239 #include <sys/stat.h>
18240 #if HAVE_UNISTD_H
18241 # include <unistd.h>
18242 #endif
18243 #if HAVE_VFORK_H
18244 # include <vfork.h>
18245 #endif
18246 /* On some sparc systems, changes by the child to local and incoming
18247    argument registers are propagated back to the parent.  The compiler
18248    is told about this with #include <vfork.h>, but some compilers
18249    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
18250    static variable whose address is put into a register that is
18251    clobbered by the vfork.  */
18252 static
18253 #ifdef __cplusplus
18254 sparc_address_test (int arg)
18255 # else
18256 sparc_address_test (arg) int arg;
18257 #endif
18258 {
18259   static pid_t child;
18260   if (!child) {
18261     child = vfork ();
18262     if (child < 0) {
18263       perror ("vfork");
18264       _exit(2);
18265     }
18266     if (!child) {
18267       arg = getpid();
18268       write(-1, "", 0);
18269       _exit (arg);
18270     }
18271   }
18272 }
18273
18274 int
18275 main ()
18276 {
18277   pid_t parent = getpid ();
18278   pid_t child;
18279
18280   sparc_address_test ();
18281
18282   child = vfork ();
18283
18284   if (child == 0) {
18285     /* Here is another test for sparc vfork register problems.  This
18286        test uses lots of local variables, at least as many local
18287        variables as main has allocated so far including compiler
18288        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
18289        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
18290        reuse the register of parent for one of the local variables,
18291        since it will think that parent can't possibly be used any more
18292        in this routine.  Assigning to the local variable will thus
18293        munge parent in the parent process.  */
18294     pid_t
18295       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
18296       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
18297     /* Convince the compiler that p..p7 are live; otherwise, it might
18298        use the same hardware register for all 8 local variables.  */
18299     if (p != p1 || p != p2 || p != p3 || p != p4
18300         || p != p5 || p != p6 || p != p7)
18301       _exit(1);
18302
18303     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
18304        from child file descriptors.  If the child closes a descriptor
18305        before it execs or exits, this munges the parent's descriptor
18306        as well.  Test for this by closing stdout in the child.  */
18307     _exit(close(fileno(stdout)) != 0);
18308   } else {
18309     int status;
18310     struct stat st;
18311
18312     while (wait(&status) != child)
18313       ;
18314     $ac_main_return(
18315          /* Was there some problem with vforking?  */
18316          child < 0
18317
18318          /* Did the child fail?  (This shouldn't happen.)  */
18319          || status
18320
18321          /* Did the vfork/compiler bug occur?  */
18322          || parent != getpid()
18323
18324          /* Did the file descriptor bug occur?  */
18325          || fstat(fileno(stdout), &st) != 0
18326          );
18327   }
18328 }
18329 _ACEOF
18330 rm -f conftest$ac_exeext
18331 if { (eval echo "$as_me:18331: \"$ac_link\"") >&5
18332   (eval $ac_link) 2>&5
18333   ac_status=$?
18334   echo "$as_me:18334: \$? = $ac_status" >&5
18335   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18336   { (eval echo "$as_me:18336: \"$ac_try\"") >&5
18337   (eval $ac_try) 2>&5
18338   ac_status=$?
18339   echo "$as_me:18339: \$? = $ac_status" >&5
18340   (exit $ac_status); }; }; then
18341   ac_cv_func_vfork_works=yes
18342 else
18343   echo "$as_me: program exited with status $ac_status" >&5
18344 echo "$as_me: failed program was:" >&5
18345 cat conftest.$ac_ext >&5
18346 ac_cv_func_vfork_works=no
18347 fi
18348 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18349 fi
18350 fi
18351 echo "$as_me:18351: result: $ac_cv_func_vfork_works" >&5
18352 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
18353
18354 fi;
18355 if test "x$ac_cv_func_fork_works" = xcross; then
18356   ac_cv_func_vfork_works=ac_cv_func_vfork
18357   { echo "$as_me:18357: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
18358 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
18359 fi
18360
18361 if test "x$ac_cv_func_vfork_works" = xyes; then
18362
18363 cat >>confdefs.h <<\EOF
18364 #define HAVE_WORKING_VFORK 1
18365 EOF
18366
18367 else
18368
18369 cat >>confdefs.h <<\EOF
18370 #define vfork fork
18371 EOF
18372
18373 fi
18374 if test "x$ac_cv_func_fork_works" = xyes; then
18375
18376 cat >>confdefs.h <<\EOF
18377 #define HAVE_WORKING_FORK 1
18378 EOF
18379
18380 fi
18381
18382 # special check for test/ditto.c
18383
18384 echo "$as_me:18384: checking for openpty in -lutil" >&5
18385 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
18386 if test "${ac_cv_lib_util_openpty+set}" = set; then
18387   echo $ECHO_N "(cached) $ECHO_C" >&6
18388 else
18389   ac_check_lib_save_LIBS=$LIBS
18390 LIBS="-lutil  $LIBS"
18391 cat >conftest.$ac_ext <<_ACEOF
18392 #line 18392 "configure"
18393 #include "confdefs.h"
18394
18395 /* Override any gcc2 internal prototype to avoid an error.  */
18396 #ifdef __cplusplus
18397 extern "C"
18398 #endif
18399 /* We use char because int might match the return type of a gcc2
18400    builtin and then its argument prototype would still apply.  */
18401 char openpty ();
18402 int
18403 main ()
18404 {
18405 openpty ();
18406   ;
18407   return 0;
18408 }
18409 _ACEOF
18410 rm -f conftest.$ac_objext conftest$ac_exeext
18411 if { (eval echo "$as_me:18411: \"$ac_link\"") >&5
18412   (eval $ac_link) 2>&5
18413   ac_status=$?
18414   echo "$as_me:18414: \$? = $ac_status" >&5
18415   (exit $ac_status); } &&
18416          { ac_try='test -s conftest$ac_exeext'
18417   { (eval echo "$as_me:18417: \"$ac_try\"") >&5
18418   (eval $ac_try) 2>&5
18419   ac_status=$?
18420   echo "$as_me:18420: \$? = $ac_status" >&5
18421   (exit $ac_status); }; }; then
18422   ac_cv_lib_util_openpty=yes
18423 else
18424   echo "$as_me: failed program was:" >&5
18425 cat conftest.$ac_ext >&5
18426 ac_cv_lib_util_openpty=no
18427 fi
18428 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18429 LIBS=$ac_check_lib_save_LIBS
18430 fi
18431 echo "$as_me:18431: result: $ac_cv_lib_util_openpty" >&5
18432 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
18433 if test $ac_cv_lib_util_openpty = yes; then
18434   cf_cv_lib_util=yes
18435 else
18436   cf_cv_lib_util=no
18437 fi
18438
18439 echo "$as_me:18439: checking for openpty header" >&5
18440 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
18441 if test "${cf_cv_func_openpty+set}" = set; then
18442   echo $ECHO_N "(cached) $ECHO_C" >&6
18443 else
18444
18445         cf_save_LIBS="$LIBS"
18446         test $cf_cv_lib_util = yes &&
18447 cf_add_libs="-lutil"
18448 # Filter out duplicates - this happens with badly-designed ".pc" files...
18449 for cf_add_1lib in $LIBS
18450 do
18451         for cf_add_2lib in $cf_add_libs
18452         do
18453                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18454                 then
18455                         cf_add_1lib=
18456                         break
18457                 fi
18458         done
18459         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18460 done
18461 LIBS="$cf_add_libs"
18462
18463         for cf_header in pty.h libutil.h util.h
18464         do
18465         cat >conftest.$ac_ext <<_ACEOF
18466 #line 18466 "configure"
18467 #include "confdefs.h"
18468
18469 #include <$cf_header>
18470
18471 int
18472 main ()
18473 {
18474
18475         int x = openpty((int *)0, (int *)0, (char *)0,
18476                                    (struct termios *)0, (struct winsize *)0);
18477
18478   ;
18479   return 0;
18480 }
18481 _ACEOF
18482 rm -f conftest.$ac_objext conftest$ac_exeext
18483 if { (eval echo "$as_me:18483: \"$ac_link\"") >&5
18484   (eval $ac_link) 2>&5
18485   ac_status=$?
18486   echo "$as_me:18486: \$? = $ac_status" >&5
18487   (exit $ac_status); } &&
18488          { ac_try='test -s conftest$ac_exeext'
18489   { (eval echo "$as_me:18489: \"$ac_try\"") >&5
18490   (eval $ac_try) 2>&5
18491   ac_status=$?
18492   echo "$as_me:18492: \$? = $ac_status" >&5
18493   (exit $ac_status); }; }; then
18494
18495                 cf_cv_func_openpty=$cf_header
18496                 break
18497
18498 else
18499   echo "$as_me: failed program was:" >&5
18500 cat conftest.$ac_ext >&5
18501
18502                 cf_cv_func_openpty=no
18503
18504 fi
18505 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18506         done
18507         LIBS="$cf_save_LIBS"
18508
18509 fi
18510 echo "$as_me:18510: result: $cf_cv_func_openpty" >&5
18511 echo "${ECHO_T}$cf_cv_func_openpty" >&6
18512
18513 if test "$cf_cv_func_openpty" != no ; then
18514
18515 cat >>confdefs.h <<EOF
18516 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
18517 EOF
18518
18519 cat >>confdefs.h <<\EOF
18520 #define USE_XTERM_PTY 1
18521 EOF
18522
18523         if test "x$cf_cv_lib_util" = xyes ; then
18524
18525 cf_add_libs="-lutil"
18526 # Filter out duplicates - this happens with badly-designed ".pc" files...
18527 for cf_add_1lib in $TEST_LIBS
18528 do
18529         for cf_add_2lib in $cf_add_libs
18530         do
18531                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18532                 then
18533                         cf_add_1lib=
18534                         break
18535                 fi
18536         done
18537         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18538 done
18539 TEST_LIBS="$cf_add_libs"
18540
18541         fi
18542 fi
18543
18544 if test "$with_hashed_db" != no ; then
18545
18546 cat >>confdefs.h <<\EOF
18547 #define USE_HASHED_DB 1
18548 EOF
18549
18550 case $with_hashed_db in
18551 (yes|*able*)
18552         ;;
18553 (*)
18554         if test -d "$with_hashed_db" ; then
18555
18556 if test -n "$with_hashed_db/include" ; then
18557   for cf_add_incdir in $with_hashed_db/include
18558   do
18559         while test $cf_add_incdir != /usr/include
18560         do
18561           if test -d $cf_add_incdir
18562           then
18563                 cf_have_incdir=no
18564                 if test -n "$CFLAGS$CPPFLAGS" ; then
18565                   # a loop is needed to ensure we can add subdirs of existing dirs
18566                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18567                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18568                           cf_have_incdir=yes; break
18569                         fi
18570                   done
18571                 fi
18572
18573                 if test "$cf_have_incdir" = no ; then
18574                   if test "$cf_add_incdir" = /usr/local/include ; then
18575                         if test "$GCC" = yes
18576                         then
18577                           cf_save_CPPFLAGS=$CPPFLAGS
18578                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18579                           cat >conftest.$ac_ext <<_ACEOF
18580 #line 18580 "configure"
18581 #include "confdefs.h"
18582 #include <stdio.h>
18583 int
18584 main ()
18585 {
18586 printf("Hello")
18587   ;
18588   return 0;
18589 }
18590 _ACEOF
18591 rm -f conftest.$ac_objext
18592 if { (eval echo "$as_me:18592: \"$ac_compile\"") >&5
18593   (eval $ac_compile) 2>&5
18594   ac_status=$?
18595   echo "$as_me:18595: \$? = $ac_status" >&5
18596   (exit $ac_status); } &&
18597          { ac_try='test -s conftest.$ac_objext'
18598   { (eval echo "$as_me:18598: \"$ac_try\"") >&5
18599   (eval $ac_try) 2>&5
18600   ac_status=$?
18601   echo "$as_me:18601: \$? = $ac_status" >&5
18602   (exit $ac_status); }; }; then
18603   :
18604 else
18605   echo "$as_me: failed program was:" >&5
18606 cat conftest.$ac_ext >&5
18607 cf_have_incdir=yes
18608 fi
18609 rm -f conftest.$ac_objext conftest.$ac_ext
18610                           CPPFLAGS=$cf_save_CPPFLAGS
18611                         fi
18612                   fi
18613                 fi
18614
18615                 if test "$cf_have_incdir" = no ; then
18616                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18617
18618 echo "${as_me:-configure}:18618: testing adding $cf_add_incdir to include-path ..." 1>&5
18619
18620                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18621
18622                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18623                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18624                   cf_add_incdir="$cf_top_incdir"
18625                 else
18626                   break
18627                 fi
18628           else
18629                 break
18630           fi
18631         done
18632   done
18633 fi
18634
18635 if test -n "$with_hashed_db/lib" ; then
18636         for cf_add_libdir in $with_hashed_db/lib
18637         do
18638                 if test $cf_add_libdir = /usr/lib ; then
18639                         :
18640                 elif test -d $cf_add_libdir
18641                 then
18642                         cf_have_libdir=no
18643                         if test -n "$LDFLAGS$LIBS" ; then
18644                                 # a loop is needed to ensure we can add subdirs of existing dirs
18645                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18646                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18647                                                 cf_have_libdir=yes; break
18648                                         fi
18649                                 done
18650                         fi
18651                         if test "$cf_have_libdir" = no ; then
18652                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18653
18654 echo "${as_me:-configure}:18654: testing adding $cf_add_libdir to library-path ..." 1>&5
18655
18656                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18657                         fi
18658                 fi
18659         done
18660 fi
18661
18662         else
18663                 case "$with_hashed_db" in
18664                 (./*|../*|/*)
18665                         { echo "$as_me:18665: WARNING: no such directory $with_hashed_db" >&5
18666 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18667                         ;;
18668                 (*)
18669
18670 cf_search=
18671
18672 test "x$prefix" != "xNONE" && \
18673 test -d "$prefix" && \
18674  {
18675         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18676         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18677         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18678         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18679         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18680         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18681 }
18682
18683 for cf_subdir_prefix in \
18684         /usr \
18685         /usr/local \
18686         /usr/pkg \
18687         /opt \
18688         /opt/local \
18689         $HOME
18690 do
18691
18692 test "x$cf_subdir_prefix" != "x$prefix" && \
18693 test -d "$cf_subdir_prefix" && \
18694 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18695         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
18696         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
18697         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
18698         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
18699         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
18700         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"
18701 }
18702
18703 done
18704
18705         for cf_item in $cf_search
18706         do
18707                 case $cf_item in
18708                 (*/$with_hashed_db)
18709
18710 if test -n "$cf_item" ; then
18711   for cf_add_incdir in $cf_item
18712   do
18713         while test $cf_add_incdir != /usr/include
18714         do
18715           if test -d $cf_add_incdir
18716           then
18717                 cf_have_incdir=no
18718                 if test -n "$CFLAGS$CPPFLAGS" ; then
18719                   # a loop is needed to ensure we can add subdirs of existing dirs
18720                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18721                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18722                           cf_have_incdir=yes; break
18723                         fi
18724                   done
18725                 fi
18726
18727                 if test "$cf_have_incdir" = no ; then
18728                   if test "$cf_add_incdir" = /usr/local/include ; then
18729                         if test "$GCC" = yes
18730                         then
18731                           cf_save_CPPFLAGS=$CPPFLAGS
18732                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18733                           cat >conftest.$ac_ext <<_ACEOF
18734 #line 18734 "configure"
18735 #include "confdefs.h"
18736 #include <stdio.h>
18737 int
18738 main ()
18739 {
18740 printf("Hello")
18741   ;
18742   return 0;
18743 }
18744 _ACEOF
18745 rm -f conftest.$ac_objext
18746 if { (eval echo "$as_me:18746: \"$ac_compile\"") >&5
18747   (eval $ac_compile) 2>&5
18748   ac_status=$?
18749   echo "$as_me:18749: \$? = $ac_status" >&5
18750   (exit $ac_status); } &&
18751          { ac_try='test -s conftest.$ac_objext'
18752   { (eval echo "$as_me:18752: \"$ac_try\"") >&5
18753   (eval $ac_try) 2>&5
18754   ac_status=$?
18755   echo "$as_me:18755: \$? = $ac_status" >&5
18756   (exit $ac_status); }; }; then
18757   :
18758 else
18759   echo "$as_me: failed program was:" >&5
18760 cat conftest.$ac_ext >&5
18761 cf_have_incdir=yes
18762 fi
18763 rm -f conftest.$ac_objext conftest.$ac_ext
18764                           CPPFLAGS=$cf_save_CPPFLAGS
18765                         fi
18766                   fi
18767                 fi
18768
18769                 if test "$cf_have_incdir" = no ; then
18770                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18771
18772 echo "${as_me:-configure}:18772: testing adding $cf_add_incdir to include-path ..." 1>&5
18773
18774                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18775
18776                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18777                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18778                   cf_add_incdir="$cf_top_incdir"
18779                 else
18780                   break
18781                 fi
18782           else
18783                 break
18784           fi
18785         done
18786   done
18787 fi
18788
18789                         ;;
18790                 esac
18791         done
18792
18793 cf_search=
18794
18795 test "x$prefix" != "xNONE" && \
18796 test -d "$prefix" && \
18797  {
18798         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18799         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18800         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18801         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18802         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18803         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18804 }
18805
18806 for cf_subdir_prefix in \
18807         /usr \
18808         /usr/local \
18809         /usr/pkg \
18810         /opt \
18811         /opt/local \
18812         $HOME
18813 do
18814
18815 test "x$cf_subdir_prefix" != "x$prefix" && \
18816 test -d "$cf_subdir_prefix" && \
18817 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
18818         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
18819         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18820         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
18821         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
18822         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
18823         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"
18824 }
18825
18826 done
18827
18828         for cf_item in $cf_search
18829         do
18830                 case $cf_item in
18831                 (*/$with_hashed_db)
18832
18833 if test -n "$cf_item" ; then
18834         for cf_add_libdir in $cf_item
18835         do
18836                 if test $cf_add_libdir = /usr/lib ; then
18837                         :
18838                 elif test -d $cf_add_libdir
18839                 then
18840                         cf_have_libdir=no
18841                         if test -n "$LDFLAGS$LIBS" ; then
18842                                 # a loop is needed to ensure we can add subdirs of existing dirs
18843                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
18844                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18845                                                 cf_have_libdir=yes; break
18846                                         fi
18847                                 done
18848                         fi
18849                         if test "$cf_have_libdir" = no ; then
18850                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18851
18852 echo "${as_me:-configure}:18852: testing adding $cf_add_libdir to library-path ..." 1>&5
18853
18854                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18855                         fi
18856                 fi
18857         done
18858 fi
18859
18860                         ;;
18861                 esac
18862         done
18863
18864                         ;;
18865                 esac
18866         fi
18867 esac
18868
18869 echo "$as_me:18869: checking for db.h" >&5
18870 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18871 if test "${ac_cv_header_db_h+set}" = set; then
18872   echo $ECHO_N "(cached) $ECHO_C" >&6
18873 else
18874   cat >conftest.$ac_ext <<_ACEOF
18875 #line 18875 "configure"
18876 #include "confdefs.h"
18877 #include <db.h>
18878 _ACEOF
18879 if { (eval echo "$as_me:18879: \"$ac_cpp conftest.$ac_ext\"") >&5
18880   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18881   ac_status=$?
18882   egrep -v '^ *\+' conftest.er1 >conftest.err
18883   rm -f conftest.er1
18884   cat conftest.err >&5
18885   echo "$as_me:18885: \$? = $ac_status" >&5
18886   (exit $ac_status); } >/dev/null; then
18887   if test -s conftest.err; then
18888     ac_cpp_err=$ac_c_preproc_warn_flag
18889   else
18890     ac_cpp_err=
18891   fi
18892 else
18893   ac_cpp_err=yes
18894 fi
18895 if test -z "$ac_cpp_err"; then
18896   ac_cv_header_db_h=yes
18897 else
18898   echo "$as_me: failed program was:" >&5
18899   cat conftest.$ac_ext >&5
18900   ac_cv_header_db_h=no
18901 fi
18902 rm -f conftest.err conftest.$ac_ext
18903 fi
18904 echo "$as_me:18904: result: $ac_cv_header_db_h" >&5
18905 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18906 if test $ac_cv_header_db_h = yes; then
18907
18908 echo "$as_me:18908: checking for version of db" >&5
18909 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18910 if test "${cf_cv_hashed_db_version+set}" = set; then
18911   echo $ECHO_N "(cached) $ECHO_C" >&6
18912 else
18913
18914 cf_cv_hashed_db_version=unknown
18915
18916 for cf_db_version in 1 2 3 4 5 6
18917 do
18918
18919 echo "${as_me:-configure}:18919: testing checking for db version $cf_db_version ..." 1>&5
18920
18921         cat >conftest.$ac_ext <<_ACEOF
18922 #line 18922 "configure"
18923 #include "confdefs.h"
18924
18925 $ac_includes_default
18926 #include <db.h>
18927
18928 #ifdef DB_VERSION_MAJOR
18929         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18930 #if $cf_db_version == DB_VERSION_MAJOR
18931         /* ok */
18932 #else
18933         make an error
18934 #endif
18935 #else
18936 #if $cf_db_version == 1
18937         /* ok: assuming this is DB 1.8.5 */
18938 #else
18939         make an error
18940 #endif
18941 #endif
18942
18943 int
18944 main ()
18945 {
18946 DBT *foo = 0
18947   ;
18948   return 0;
18949 }
18950 _ACEOF
18951 rm -f conftest.$ac_objext
18952 if { (eval echo "$as_me:18952: \"$ac_compile\"") >&5
18953   (eval $ac_compile) 2>&5
18954   ac_status=$?
18955   echo "$as_me:18955: \$? = $ac_status" >&5
18956   (exit $ac_status); } &&
18957          { ac_try='test -s conftest.$ac_objext'
18958   { (eval echo "$as_me:18958: \"$ac_try\"") >&5
18959   (eval $ac_try) 2>&5
18960   ac_status=$?
18961   echo "$as_me:18961: \$? = $ac_status" >&5
18962   (exit $ac_status); }; }; then
18963
18964         cf_cv_hashed_db_version=$cf_db_version
18965         break
18966
18967 else
18968   echo "$as_me: failed program was:" >&5
18969 cat conftest.$ac_ext >&5
18970 fi
18971 rm -f conftest.$ac_objext conftest.$ac_ext
18972 done
18973
18974 fi
18975 echo "$as_me:18975: result: $cf_cv_hashed_db_version" >&5
18976 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18977
18978 if test "$cf_cv_hashed_db_version" = unknown ; then
18979         { { echo "$as_me:18979: error: Cannot determine version of db" >&5
18980 echo "$as_me: error: Cannot determine version of db" >&2;}
18981    { (exit 1); exit 1; }; }
18982 else
18983
18984 echo "$as_me:18984: checking for db libraries" >&5
18985 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18986 if test "${cf_cv_hashed_db_libs+set}" = set; then
18987   echo $ECHO_N "(cached) $ECHO_C" >&6
18988 else
18989
18990 cf_cv_hashed_db_libs=unknown
18991 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18992 do
18993         cf_save_libs="$LIBS"
18994         if test -n "$cf_db_libs"; then
18995
18996 cf_add_libs="-l$cf_db_libs"
18997 # Filter out duplicates - this happens with badly-designed ".pc" files...
18998 for cf_add_1lib in $LIBS
18999 do
19000         for cf_add_2lib in $cf_add_libs
19001         do
19002                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19003                 then
19004                         cf_add_1lib=
19005                         break
19006                 fi
19007         done
19008         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19009 done
19010 LIBS="$cf_add_libs"
19011
19012         fi
19013
19014 echo "${as_me:-configure}:19014: testing checking for library "$cf_db_libs" ..." 1>&5
19015
19016         cat >conftest.$ac_ext <<_ACEOF
19017 #line 19017 "configure"
19018 #include "confdefs.h"
19019
19020 $ac_includes_default
19021 #include <db.h>
19022
19023 int
19024 main ()
19025 {
19026
19027         char *path = "/tmp/foo";
19028 #ifdef DB_VERSION_MAJOR
19029 #if DB_VERSION_MAJOR >= 4
19030         DB *result = 0;
19031         db_create(&result, NULL, 0);
19032         result->open(result,
19033                 NULL,
19034                 path,
19035                 path,
19036                 DB_HASH,
19037                 DB_CREATE,
19038                 0644);
19039 #elif DB_VERSION_MAJOR >= 3
19040         DB *result = 0;
19041         db_create(&result, NULL, 0);
19042         result->open(result,
19043                 path,
19044                 path,
19045                 DB_HASH,
19046                 DB_CREATE,
19047                 0644);
19048 #elif DB_VERSION_MAJOR >= 2
19049         DB *result = 0;
19050         db_open(path,
19051                 DB_HASH,
19052                 DB_CREATE,
19053                 0644,
19054                 (DB_ENV *) 0,
19055                 (DB_INFO *) 0,
19056                 &result);
19057 #endif /* DB_VERSION_MAJOR */
19058 #else
19059         DB *result = dbopen(path,
19060                      2,
19061                      0644,
19062                      DB_HASH,
19063                      0);
19064 #endif
19065         ${cf_cv_main_return:-return}(result != 0)
19066
19067   ;
19068   return 0;
19069 }
19070 _ACEOF
19071 rm -f conftest.$ac_objext conftest$ac_exeext
19072 if { (eval echo "$as_me:19072: \"$ac_link\"") >&5
19073   (eval $ac_link) 2>&5
19074   ac_status=$?
19075   echo "$as_me:19075: \$? = $ac_status" >&5
19076   (exit $ac_status); } &&
19077          { ac_try='test -s conftest$ac_exeext'
19078   { (eval echo "$as_me:19078: \"$ac_try\"") >&5
19079   (eval $ac_try) 2>&5
19080   ac_status=$?
19081   echo "$as_me:19081: \$? = $ac_status" >&5
19082   (exit $ac_status); }; }; then
19083
19084         if test -n "$cf_db_libs" ; then
19085                 cf_cv_hashed_db_libs=$cf_db_libs
19086         else
19087                 cf_cv_hashed_db_libs=default
19088         fi
19089         LIBS="$cf_save_libs"
19090         break
19091
19092 else
19093   echo "$as_me: failed program was:" >&5
19094 cat conftest.$ac_ext >&5
19095 fi
19096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19097         LIBS="$cf_save_libs"
19098 done
19099
19100 fi
19101 echo "$as_me:19101: result: $cf_cv_hashed_db_libs" >&5
19102 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
19103
19104         if test "$cf_cv_hashed_db_libs" = unknown ; then
19105                 { { echo "$as_me:19105: error: Cannot determine library for db" >&5
19106 echo "$as_me: error: Cannot determine library for db" >&2;}
19107    { (exit 1); exit 1; }; }
19108         elif test "$cf_cv_hashed_db_libs" != default ; then
19109
19110 cf_add_libs="-l$cf_cv_hashed_db_libs"
19111 # Filter out duplicates - this happens with badly-designed ".pc" files...
19112 for cf_add_1lib in $LIBS
19113 do
19114         for cf_add_2lib in $cf_add_libs
19115         do
19116                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19117                 then
19118                         cf_add_1lib=
19119                         break
19120                 fi
19121         done
19122         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19123 done
19124 LIBS="$cf_add_libs"
19125
19126         fi
19127 fi
19128
19129 else
19130
19131         { { echo "$as_me:19131: error: Cannot find db.h" >&5
19132 echo "$as_me: error: Cannot find db.h" >&2;}
19133    { (exit 1); exit 1; }; }
19134
19135 fi
19136
19137 fi
19138
19139 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
19140         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19141         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
19142 fi
19143
19144 # Just in case, check if the C compiler has a bool type.
19145
19146 echo "$as_me:19146: checking if we should include stdbool.h" >&5
19147 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19148
19149 if test "${cf_cv_header_stdbool_h+set}" = set; then
19150   echo $ECHO_N "(cached) $ECHO_C" >&6
19151 else
19152
19153         cat >conftest.$ac_ext <<_ACEOF
19154 #line 19154 "configure"
19155 #include "confdefs.h"
19156
19157 int
19158 main ()
19159 {
19160 bool foo = false
19161   ;
19162   return 0;
19163 }
19164 _ACEOF
19165 rm -f conftest.$ac_objext
19166 if { (eval echo "$as_me:19166: \"$ac_compile\"") >&5
19167   (eval $ac_compile) 2>&5
19168   ac_status=$?
19169   echo "$as_me:19169: \$? = $ac_status" >&5
19170   (exit $ac_status); } &&
19171          { ac_try='test -s conftest.$ac_objext'
19172   { (eval echo "$as_me:19172: \"$ac_try\"") >&5
19173   (eval $ac_try) 2>&5
19174   ac_status=$?
19175   echo "$as_me:19175: \$? = $ac_status" >&5
19176   (exit $ac_status); }; }; then
19177   cf_cv_header_stdbool_h=0
19178 else
19179   echo "$as_me: failed program was:" >&5
19180 cat conftest.$ac_ext >&5
19181 cat >conftest.$ac_ext <<_ACEOF
19182 #line 19182 "configure"
19183 #include "confdefs.h"
19184
19185 #ifndef __BEOS__
19186 #include <stdbool.h>
19187 #endif
19188
19189 int
19190 main ()
19191 {
19192 bool foo = false
19193   ;
19194   return 0;
19195 }
19196 _ACEOF
19197 rm -f conftest.$ac_objext
19198 if { (eval echo "$as_me:19198: \"$ac_compile\"") >&5
19199   (eval $ac_compile) 2>&5
19200   ac_status=$?
19201   echo "$as_me:19201: \$? = $ac_status" >&5
19202   (exit $ac_status); } &&
19203          { ac_try='test -s conftest.$ac_objext'
19204   { (eval echo "$as_me:19204: \"$ac_try\"") >&5
19205   (eval $ac_try) 2>&5
19206   ac_status=$?
19207   echo "$as_me:19207: \$? = $ac_status" >&5
19208   (exit $ac_status); }; }; then
19209   cf_cv_header_stdbool_h=1
19210 else
19211   echo "$as_me: failed program was:" >&5
19212 cat conftest.$ac_ext >&5
19213 cf_cv_header_stdbool_h=0
19214 fi
19215 rm -f conftest.$ac_objext conftest.$ac_ext
19216 fi
19217 rm -f conftest.$ac_objext conftest.$ac_ext
19218 fi
19219
19220 if test "$cf_cv_header_stdbool_h" = 1
19221 then    echo "$as_me:19221: result: yes" >&5
19222 echo "${ECHO_T}yes" >&6
19223 else    echo "$as_me:19223: result: no" >&5
19224 echo "${ECHO_T}no" >&6
19225 fi
19226
19227 echo "$as_me:19227: checking for builtin bool type" >&5
19228 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19229
19230 if test "${cf_cv_cc_bool_type+set}" = set; then
19231   echo $ECHO_N "(cached) $ECHO_C" >&6
19232 else
19233
19234         cat >conftest.$ac_ext <<_ACEOF
19235 #line 19235 "configure"
19236 #include "confdefs.h"
19237
19238 #include <stdio.h>
19239 #include <sys/types.h>
19240
19241 int
19242 main ()
19243 {
19244 bool x = false
19245   ;
19246   return 0;
19247 }
19248 _ACEOF
19249 rm -f conftest.$ac_objext
19250 if { (eval echo "$as_me:19250: \"$ac_compile\"") >&5
19251   (eval $ac_compile) 2>&5
19252   ac_status=$?
19253   echo "$as_me:19253: \$? = $ac_status" >&5
19254   (exit $ac_status); } &&
19255          { ac_try='test -s conftest.$ac_objext'
19256   { (eval echo "$as_me:19256: \"$ac_try\"") >&5
19257   (eval $ac_try) 2>&5
19258   ac_status=$?
19259   echo "$as_me:19259: \$? = $ac_status" >&5
19260   (exit $ac_status); }; }; then
19261   cf_cv_cc_bool_type=1
19262 else
19263   echo "$as_me: failed program was:" >&5
19264 cat conftest.$ac_ext >&5
19265 cf_cv_cc_bool_type=0
19266 fi
19267 rm -f conftest.$ac_objext conftest.$ac_ext
19268
19269 fi
19270
19271 if test "$cf_cv_cc_bool_type" = 1
19272 then    echo "$as_me:19272: result: yes" >&5
19273 echo "${ECHO_T}yes" >&6
19274 else    echo "$as_me:19274: result: no" >&5
19275 echo "${ECHO_T}no" >&6
19276 fi
19277
19278 # Check for C++ compiler characteristics (and ensure that it's there!)
19279 if test -n "$CXX" ; then
19280         ac_ext=cc
19281 ac_cpp='$CXXCPP $CPPFLAGS'
19282 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19283 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19284 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19285 ac_main_return=return
19286
19287 if test -n "$GXX" ; then
19288 case $cf_cv_system_name in
19289 (os2*)
19290         cf_stdcpp_libname=stdcpp
19291         ;;
19292 (*)
19293         cf_stdcpp_libname=stdc++
19294         ;;
19295 esac
19296 echo "$as_me:19296: checking for library $cf_stdcpp_libname" >&5
19297 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
19298 if test "${cf_cv_libstdcpp+set}" = set; then
19299   echo $ECHO_N "(cached) $ECHO_C" >&6
19300 else
19301
19302         cf_save="$LIBS"
19303
19304 cf_add_libs="-l$cf_stdcpp_libname"
19305 # Filter out duplicates - this happens with badly-designed ".pc" files...
19306 for cf_add_1lib in $LIBS
19307 do
19308         for cf_add_2lib in $cf_add_libs
19309         do
19310                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19311                 then
19312                         cf_add_1lib=
19313                         break
19314                 fi
19315         done
19316         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19317 done
19318 LIBS="$cf_add_libs"
19319
19320 cat >conftest.$ac_ext <<_ACEOF
19321 #line 19321 "configure"
19322 #include "confdefs.h"
19323
19324 #include <strstream.h>
19325 int
19326 main ()
19327 {
19328
19329 char buf[80];
19330 strstreambuf foo(buf, sizeof(buf))
19331
19332   ;
19333   return 0;
19334 }
19335 _ACEOF
19336 rm -f conftest.$ac_objext conftest$ac_exeext
19337 if { (eval echo "$as_me:19337: \"$ac_link\"") >&5
19338   (eval $ac_link) 2>&5
19339   ac_status=$?
19340   echo "$as_me:19340: \$? = $ac_status" >&5
19341   (exit $ac_status); } &&
19342          { ac_try='test -s conftest$ac_exeext'
19343   { (eval echo "$as_me:19343: \"$ac_try\"") >&5
19344   (eval $ac_try) 2>&5
19345   ac_status=$?
19346   echo "$as_me:19346: \$? = $ac_status" >&5
19347   (exit $ac_status); }; }; then
19348   cf_cv_libstdcpp=yes
19349 else
19350   echo "$as_me: failed program was:" >&5
19351 cat conftest.$ac_ext >&5
19352 cf_cv_libstdcpp=no
19353 fi
19354 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19355         LIBS="$cf_save"
19356
19357 fi
19358 echo "$as_me:19358: result: $cf_cv_libstdcpp" >&5
19359 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
19360 test "$cf_cv_libstdcpp" = yes &&
19361 cf_add_libs="-l$cf_stdcpp_libname"
19362 # Filter out duplicates - this happens with badly-designed ".pc" files...
19363 for cf_add_1lib in $CXXLIBS
19364 do
19365         for cf_add_2lib in $cf_add_libs
19366         do
19367                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19368                 then
19369                         cf_add_1lib=
19370                         break
19371                 fi
19372         done
19373         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19374 done
19375 CXXLIBS="$cf_add_libs"
19376
19377 fi
19378
19379         echo "$as_me:19379: checking whether $CXX understands -c and -o together" >&5
19380 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
19381 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
19382   echo $ECHO_N "(cached) $ECHO_C" >&6
19383 else
19384
19385 cat > conftest.$ac_ext <<CF_EOF
19386 #include <stdio.h>
19387 int main()
19388 {
19389         ${cf_cv_main_return:-return}(0);
19390 }
19391 CF_EOF
19392 # We do the test twice because some compilers refuse to overwrite an
19393 # existing .o file with -o, though they will create one.
19394 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
19395 if { (eval echo "$as_me:19395: \"$ac_try\"") >&5
19396   (eval $ac_try) 2>&5
19397   ac_status=$?
19398   echo "$as_me:19398: \$? = $ac_status" >&5
19399   (exit $ac_status); } &&
19400   test -f conftest2.$ac_objext && { (eval echo "$as_me:19400: \"$ac_try\"") >&5
19401   (eval $ac_try) 2>&5
19402   ac_status=$?
19403   echo "$as_me:19403: \$? = $ac_status" >&5
19404   (exit $ac_status); };
19405 then
19406   eval cf_cv_prog_CXX_c_o=yes
19407 else
19408   eval cf_cv_prog_CXX_c_o=no
19409 fi
19410 rm -rf conftest*
19411
19412 fi
19413 if test $cf_cv_prog_CXX_c_o = yes; then
19414   echo "$as_me:19414: result: yes" >&5
19415 echo "${ECHO_T}yes" >&6
19416 else
19417   echo "$as_me:19417: result: no" >&5
19418 echo "${ECHO_T}no" >&6
19419 fi
19420
19421         case $GXX_VERSION in
19422         (1*|2.0-6*)
19423                 cf_cxx_library=yes
19424                 ;;
19425         (*-2.7*|2.7*)
19426
19427 cf_cxx_library=unknown
19428 case $cf_cv_system_name in
19429 (os2*)
19430         cf_gpp_libname=gpp
19431         ;;
19432 (*)
19433         cf_gpp_libname=g++
19434         ;;
19435 esac
19436 if test "$GXX" = yes; then
19437         echo "$as_me:19437: checking for lib$cf_gpp_libname" >&5
19438 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
19439         cf_save="$LIBS"
19440
19441 cf_add_libs="-l$cf_gpp_libname"
19442 # Filter out duplicates - this happens with badly-designed ".pc" files...
19443 for cf_add_1lib in $LIBS
19444 do
19445         for cf_add_2lib in $cf_add_libs
19446         do
19447                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19448                 then
19449                         cf_add_1lib=
19450                         break
19451                 fi
19452         done
19453         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19454 done
19455 LIBS="$cf_add_libs"
19456
19457         cat >conftest.$ac_ext <<_ACEOF
19458 #line 19458 "configure"
19459 #include "confdefs.h"
19460
19461 #include <$cf_gpp_libname/builtin.h>
19462
19463 int
19464 main ()
19465 {
19466 two_arg_error_handler_t foo2 = lib_error_handler
19467   ;
19468   return 0;
19469 }
19470 _ACEOF
19471 rm -f conftest.$ac_objext conftest$ac_exeext
19472 if { (eval echo "$as_me:19472: \"$ac_link\"") >&5
19473   (eval $ac_link) 2>&5
19474   ac_status=$?
19475   echo "$as_me:19475: \$? = $ac_status" >&5
19476   (exit $ac_status); } &&
19477          { ac_try='test -s conftest$ac_exeext'
19478   { (eval echo "$as_me:19478: \"$ac_try\"") >&5
19479   (eval $ac_try) 2>&5
19480   ac_status=$?
19481   echo "$as_me:19481: \$? = $ac_status" >&5
19482   (exit $ac_status); }; }; then
19483   cf_cxx_library=yes
19484
19485 cf_add_libs="-l$cf_gpp_libname"
19486 # Filter out duplicates - this happens with badly-designed ".pc" files...
19487 for cf_add_1lib in $CXXLIBS
19488 do
19489         for cf_add_2lib in $cf_add_libs
19490         do
19491                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19492                 then
19493                         cf_add_1lib=
19494                         break
19495                 fi
19496         done
19497         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19498 done
19499 CXXLIBS="$cf_add_libs"
19500
19501          if test "$cf_gpp_libname" = cpp ; then
19502
19503 cat >>confdefs.h <<\EOF
19504 #define HAVE_GPP_BUILTIN_H 1
19505 EOF
19506
19507          else
19508
19509 cat >>confdefs.h <<\EOF
19510 #define HAVE_GXX_BUILTIN_H 1
19511 EOF
19512
19513          fi
19514 else
19515   echo "$as_me: failed program was:" >&5
19516 cat conftest.$ac_ext >&5
19517 cat >conftest.$ac_ext <<_ACEOF
19518 #line 19518 "configure"
19519 #include "confdefs.h"
19520
19521 #include <builtin.h>
19522
19523 int
19524 main ()
19525 {
19526 two_arg_error_handler_t foo2 = lib_error_handler
19527   ;
19528   return 0;
19529 }
19530 _ACEOF
19531 rm -f conftest.$ac_objext conftest$ac_exeext
19532 if { (eval echo "$as_me:19532: \"$ac_link\"") >&5
19533   (eval $ac_link) 2>&5
19534   ac_status=$?
19535   echo "$as_me:19535: \$? = $ac_status" >&5
19536   (exit $ac_status); } &&
19537          { ac_try='test -s conftest$ac_exeext'
19538   { (eval echo "$as_me:19538: \"$ac_try\"") >&5
19539   (eval $ac_try) 2>&5
19540   ac_status=$?
19541   echo "$as_me:19541: \$? = $ac_status" >&5
19542   (exit $ac_status); }; }; then
19543   cf_cxx_library=yes
19544
19545 cf_add_libs="-l$cf_gpp_libname"
19546 # Filter out duplicates - this happens with badly-designed ".pc" files...
19547 for cf_add_1lib in $CXXLIBS
19548 do
19549         for cf_add_2lib in $cf_add_libs
19550         do
19551                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19552                 then
19553                         cf_add_1lib=
19554                         break
19555                 fi
19556         done
19557         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19558 done
19559 CXXLIBS="$cf_add_libs"
19560
19561 cat >>confdefs.h <<\EOF
19562 #define HAVE_BUILTIN_H 1
19563 EOF
19564
19565 else
19566   echo "$as_me: failed program was:" >&5
19567 cat conftest.$ac_ext >&5
19568 cf_cxx_library=no
19569 fi
19570 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19571 fi
19572 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19573         LIBS="$cf_save"
19574         echo "$as_me:19574: result: $cf_cxx_library" >&5
19575 echo "${ECHO_T}$cf_cxx_library" >&6
19576 fi
19577
19578                 ;;
19579         (*)
19580                 cf_cxx_library=no
19581                 ;;
19582         esac
19583
19584         ac_ext=cc
19585 ac_cpp='$CXXCPP $CPPFLAGS'
19586 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19587 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19588 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19589 ac_main_return=return
19590 echo "$as_me:19590: checking how to run the C++ preprocessor" >&5
19591 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19592 if test -z "$CXXCPP"; then
19593   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19594   echo $ECHO_N "(cached) $ECHO_C" >&6
19595 else
19596       # Double quotes because CXXCPP needs to be expanded
19597     for CXXCPP in "$CXX -E" "/lib/cpp"
19598     do
19599       ac_preproc_ok=false
19600 for ac_cxx_preproc_warn_flag in '' yes
19601 do
19602   # Use a header file that comes with gcc, so configuring glibc
19603   # with a fresh cross-compiler works.
19604   # On the NeXT, cc -E runs the code through the compiler's parser,
19605   # not just through cpp. "Syntax error" is here to catch this case.
19606   cat >conftest.$ac_ext <<_ACEOF
19607 #line 19607 "configure"
19608 #include "confdefs.h"
19609 #include <assert.h>
19610                      Syntax error
19611 _ACEOF
19612 if { (eval echo "$as_me:19612: \"$ac_cpp conftest.$ac_ext\"") >&5
19613   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19614   ac_status=$?
19615   egrep -v '^ *\+' conftest.er1 >conftest.err
19616   rm -f conftest.er1
19617   cat conftest.err >&5
19618   echo "$as_me:19618: \$? = $ac_status" >&5
19619   (exit $ac_status); } >/dev/null; then
19620   if test -s conftest.err; then
19621     ac_cpp_err=$ac_cxx_preproc_warn_flag
19622   else
19623     ac_cpp_err=
19624   fi
19625 else
19626   ac_cpp_err=yes
19627 fi
19628 if test -z "$ac_cpp_err"; then
19629   :
19630 else
19631   echo "$as_me: failed program was:" >&5
19632   cat conftest.$ac_ext >&5
19633   # Broken: fails on valid input.
19634 continue
19635 fi
19636 rm -f conftest.err conftest.$ac_ext
19637
19638   # OK, works on sane cases.  Now check whether non-existent headers
19639   # can be detected and how.
19640   cat >conftest.$ac_ext <<_ACEOF
19641 #line 19641 "configure"
19642 #include "confdefs.h"
19643 #include <ac_nonexistent.h>
19644 _ACEOF
19645 if { (eval echo "$as_me:19645: \"$ac_cpp conftest.$ac_ext\"") >&5
19646   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19647   ac_status=$?
19648   egrep -v '^ *\+' conftest.er1 >conftest.err
19649   rm -f conftest.er1
19650   cat conftest.err >&5
19651   echo "$as_me:19651: \$? = $ac_status" >&5
19652   (exit $ac_status); } >/dev/null; then
19653   if test -s conftest.err; then
19654     ac_cpp_err=$ac_cxx_preproc_warn_flag
19655   else
19656     ac_cpp_err=
19657   fi
19658 else
19659   ac_cpp_err=yes
19660 fi
19661 if test -z "$ac_cpp_err"; then
19662   # Broken: success on invalid input.
19663 continue
19664 else
19665   echo "$as_me: failed program was:" >&5
19666   cat conftest.$ac_ext >&5
19667   # Passes both tests.
19668 ac_preproc_ok=:
19669 break
19670 fi
19671 rm -f conftest.err conftest.$ac_ext
19672
19673 done
19674 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19675 rm -f conftest.err conftest.$ac_ext
19676 if $ac_preproc_ok; then
19677   break
19678 fi
19679
19680     done
19681     ac_cv_prog_CXXCPP=$CXXCPP
19682
19683 fi
19684   CXXCPP=$ac_cv_prog_CXXCPP
19685 else
19686   ac_cv_prog_CXXCPP=$CXXCPP
19687 fi
19688 echo "$as_me:19688: result: $CXXCPP" >&5
19689 echo "${ECHO_T}$CXXCPP" >&6
19690 ac_preproc_ok=false
19691 for ac_cxx_preproc_warn_flag in '' yes
19692 do
19693   # Use a header file that comes with gcc, so configuring glibc
19694   # with a fresh cross-compiler works.
19695   # On the NeXT, cc -E runs the code through the compiler's parser,
19696   # not just through cpp. "Syntax error" is here to catch this case.
19697   cat >conftest.$ac_ext <<_ACEOF
19698 #line 19698 "configure"
19699 #include "confdefs.h"
19700 #include <assert.h>
19701                      Syntax error
19702 _ACEOF
19703 if { (eval echo "$as_me:19703: \"$ac_cpp conftest.$ac_ext\"") >&5
19704   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19705   ac_status=$?
19706   egrep -v '^ *\+' conftest.er1 >conftest.err
19707   rm -f conftest.er1
19708   cat conftest.err >&5
19709   echo "$as_me:19709: \$? = $ac_status" >&5
19710   (exit $ac_status); } >/dev/null; then
19711   if test -s conftest.err; then
19712     ac_cpp_err=$ac_cxx_preproc_warn_flag
19713   else
19714     ac_cpp_err=
19715   fi
19716 else
19717   ac_cpp_err=yes
19718 fi
19719 if test -z "$ac_cpp_err"; then
19720   :
19721 else
19722   echo "$as_me: failed program was:" >&5
19723   cat conftest.$ac_ext >&5
19724   # Broken: fails on valid input.
19725 continue
19726 fi
19727 rm -f conftest.err conftest.$ac_ext
19728
19729   # OK, works on sane cases.  Now check whether non-existent headers
19730   # can be detected and how.
19731   cat >conftest.$ac_ext <<_ACEOF
19732 #line 19732 "configure"
19733 #include "confdefs.h"
19734 #include <ac_nonexistent.h>
19735 _ACEOF
19736 if { (eval echo "$as_me:19736: \"$ac_cpp conftest.$ac_ext\"") >&5
19737   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19738   ac_status=$?
19739   egrep -v '^ *\+' conftest.er1 >conftest.err
19740   rm -f conftest.er1
19741   cat conftest.err >&5
19742   echo "$as_me:19742: \$? = $ac_status" >&5
19743   (exit $ac_status); } >/dev/null; then
19744   if test -s conftest.err; then
19745     ac_cpp_err=$ac_cxx_preproc_warn_flag
19746   else
19747     ac_cpp_err=
19748   fi
19749 else
19750   ac_cpp_err=yes
19751 fi
19752 if test -z "$ac_cpp_err"; then
19753   # Broken: success on invalid input.
19754 continue
19755 else
19756   echo "$as_me: failed program was:" >&5
19757   cat conftest.$ac_ext >&5
19758   # Passes both tests.
19759 ac_preproc_ok=:
19760 break
19761 fi
19762 rm -f conftest.err conftest.$ac_ext
19763
19764 done
19765 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19766 rm -f conftest.err conftest.$ac_ext
19767 if $ac_preproc_ok; then
19768   :
19769 else
19770   { { echo "$as_me:19770: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19771 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19772    { (exit 1); exit 1; }; }
19773 fi
19774
19775 ac_ext=cc
19776 ac_cpp='$CXXCPP $CPPFLAGS'
19777 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19778 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19779 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19780 ac_main_return=return
19781
19782 for ac_header in typeinfo
19783 do
19784 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19785 echo "$as_me:19785: checking for $ac_header" >&5
19786 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19787 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19788   echo $ECHO_N "(cached) $ECHO_C" >&6
19789 else
19790   cat >conftest.$ac_ext <<_ACEOF
19791 #line 19791 "configure"
19792 #include "confdefs.h"
19793 #include <$ac_header>
19794 _ACEOF
19795 if { (eval echo "$as_me:19795: \"$ac_cpp conftest.$ac_ext\"") >&5
19796   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19797   ac_status=$?
19798   egrep -v '^ *\+' conftest.er1 >conftest.err
19799   rm -f conftest.er1
19800   cat conftest.err >&5
19801   echo "$as_me:19801: \$? = $ac_status" >&5
19802   (exit $ac_status); } >/dev/null; then
19803   if test -s conftest.err; then
19804     ac_cpp_err=$ac_cxx_preproc_warn_flag
19805   else
19806     ac_cpp_err=
19807   fi
19808 else
19809   ac_cpp_err=yes
19810 fi
19811 if test -z "$ac_cpp_err"; then
19812   eval "$as_ac_Header=yes"
19813 else
19814   echo "$as_me: failed program was:" >&5
19815   cat conftest.$ac_ext >&5
19816   eval "$as_ac_Header=no"
19817 fi
19818 rm -f conftest.err conftest.$ac_ext
19819 fi
19820 echo "$as_me:19820: result: `eval echo '${'$as_ac_Header'}'`" >&5
19821 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19822 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19823   cat >>confdefs.h <<EOF
19824 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19825 EOF
19826
19827 fi
19828 done
19829
19830 for ac_header in iostream
19831 do
19832 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19833 echo "$as_me:19833: checking for $ac_header" >&5
19834 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19835 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19836   echo $ECHO_N "(cached) $ECHO_C" >&6
19837 else
19838   cat >conftest.$ac_ext <<_ACEOF
19839 #line 19839 "configure"
19840 #include "confdefs.h"
19841 #include <$ac_header>
19842 _ACEOF
19843 if { (eval echo "$as_me:19843: \"$ac_cpp conftest.$ac_ext\"") >&5
19844   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19845   ac_status=$?
19846   egrep -v '^ *\+' conftest.er1 >conftest.err
19847   rm -f conftest.er1
19848   cat conftest.err >&5
19849   echo "$as_me:19849: \$? = $ac_status" >&5
19850   (exit $ac_status); } >/dev/null; then
19851   if test -s conftest.err; then
19852     ac_cpp_err=$ac_cxx_preproc_warn_flag
19853   else
19854     ac_cpp_err=
19855   fi
19856 else
19857   ac_cpp_err=yes
19858 fi
19859 if test -z "$ac_cpp_err"; then
19860   eval "$as_ac_Header=yes"
19861 else
19862   echo "$as_me: failed program was:" >&5
19863   cat conftest.$ac_ext >&5
19864   eval "$as_ac_Header=no"
19865 fi
19866 rm -f conftest.err conftest.$ac_ext
19867 fi
19868 echo "$as_me:19868: result: `eval echo '${'$as_ac_Header'}'`" >&5
19869 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19870 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19871   cat >>confdefs.h <<EOF
19872 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19873 EOF
19874
19875 fi
19876 done
19877
19878 if test x"$ac_cv_header_iostream" = xyes ; then
19879         echo "$as_me:19879: checking if iostream uses std-namespace" >&5
19880 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19881         cat >conftest.$ac_ext <<_ACEOF
19882 #line 19882 "configure"
19883 #include "confdefs.h"
19884
19885 #include <iostream>
19886 using std::endl;
19887 using std::cerr;
19888 int
19889 main ()
19890 {
19891
19892 cerr << "testing" << endl;
19893
19894   ;
19895   return 0;
19896 }
19897 _ACEOF
19898 rm -f conftest.$ac_objext
19899 if { (eval echo "$as_me:19899: \"$ac_compile\"") >&5
19900   (eval $ac_compile) 2>&5
19901   ac_status=$?
19902   echo "$as_me:19902: \$? = $ac_status" >&5
19903   (exit $ac_status); } &&
19904          { ac_try='test -s conftest.$ac_objext'
19905   { (eval echo "$as_me:19905: \"$ac_try\"") >&5
19906   (eval $ac_try) 2>&5
19907   ac_status=$?
19908   echo "$as_me:19908: \$? = $ac_status" >&5
19909   (exit $ac_status); }; }; then
19910   cf_iostream_namespace=yes
19911 else
19912   echo "$as_me: failed program was:" >&5
19913 cat conftest.$ac_ext >&5
19914 cf_iostream_namespace=no
19915 fi
19916 rm -f conftest.$ac_objext conftest.$ac_ext
19917         echo "$as_me:19917: result: $cf_iostream_namespace" >&5
19918 echo "${ECHO_T}$cf_iostream_namespace" >&6
19919         if test "$cf_iostream_namespace" = yes ; then
19920
19921 cat >>confdefs.h <<\EOF
19922 #define IOSTREAM_NAMESPACE 1
19923 EOF
19924
19925         fi
19926 fi
19927
19928 echo "$as_me:19928: checking if we should include stdbool.h" >&5
19929 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19930
19931 if test "${cf_cv_header_stdbool_h+set}" = set; then
19932   echo $ECHO_N "(cached) $ECHO_C" >&6
19933 else
19934
19935         cat >conftest.$ac_ext <<_ACEOF
19936 #line 19936 "configure"
19937 #include "confdefs.h"
19938
19939 int
19940 main ()
19941 {
19942 bool foo = false
19943   ;
19944   return 0;
19945 }
19946 _ACEOF
19947 rm -f conftest.$ac_objext
19948 if { (eval echo "$as_me:19948: \"$ac_compile\"") >&5
19949   (eval $ac_compile) 2>&5
19950   ac_status=$?
19951   echo "$as_me:19951: \$? = $ac_status" >&5
19952   (exit $ac_status); } &&
19953          { ac_try='test -s conftest.$ac_objext'
19954   { (eval echo "$as_me:19954: \"$ac_try\"") >&5
19955   (eval $ac_try) 2>&5
19956   ac_status=$?
19957   echo "$as_me:19957: \$? = $ac_status" >&5
19958   (exit $ac_status); }; }; then
19959   cf_cv_header_stdbool_h=0
19960 else
19961   echo "$as_me: failed program was:" >&5
19962 cat conftest.$ac_ext >&5
19963 cat >conftest.$ac_ext <<_ACEOF
19964 #line 19964 "configure"
19965 #include "confdefs.h"
19966
19967 #ifndef __BEOS__
19968 #include <stdbool.h>
19969 #endif
19970
19971 int
19972 main ()
19973 {
19974 bool foo = false
19975   ;
19976   return 0;
19977 }
19978 _ACEOF
19979 rm -f conftest.$ac_objext
19980 if { (eval echo "$as_me:19980: \"$ac_compile\"") >&5
19981   (eval $ac_compile) 2>&5
19982   ac_status=$?
19983   echo "$as_me:19983: \$? = $ac_status" >&5
19984   (exit $ac_status); } &&
19985          { ac_try='test -s conftest.$ac_objext'
19986   { (eval echo "$as_me:19986: \"$ac_try\"") >&5
19987   (eval $ac_try) 2>&5
19988   ac_status=$?
19989   echo "$as_me:19989: \$? = $ac_status" >&5
19990   (exit $ac_status); }; }; then
19991   cf_cv_header_stdbool_h=1
19992 else
19993   echo "$as_me: failed program was:" >&5
19994 cat conftest.$ac_ext >&5
19995 cf_cv_header_stdbool_h=0
19996 fi
19997 rm -f conftest.$ac_objext conftest.$ac_ext
19998 fi
19999 rm -f conftest.$ac_objext conftest.$ac_ext
20000 fi
20001
20002 if test "$cf_cv_header_stdbool_h" = 1
20003 then    echo "$as_me:20003: result: yes" >&5
20004 echo "${ECHO_T}yes" >&6
20005 else    echo "$as_me:20005: result: no" >&5
20006 echo "${ECHO_T}no" >&6
20007 fi
20008
20009 echo "$as_me:20009: checking for builtin bool type" >&5
20010 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
20011
20012 if test "${cf_cv_builtin_bool+set}" = set; then
20013   echo $ECHO_N "(cached) $ECHO_C" >&6
20014 else
20015
20016         cat >conftest.$ac_ext <<_ACEOF
20017 #line 20017 "configure"
20018 #include "confdefs.h"
20019
20020 #include <stdio.h>
20021 #include <sys/types.h>
20022
20023 int
20024 main ()
20025 {
20026 bool x = false
20027   ;
20028   return 0;
20029 }
20030 _ACEOF
20031 rm -f conftest.$ac_objext
20032 if { (eval echo "$as_me:20032: \"$ac_compile\"") >&5
20033   (eval $ac_compile) 2>&5
20034   ac_status=$?
20035   echo "$as_me:20035: \$? = $ac_status" >&5
20036   (exit $ac_status); } &&
20037          { ac_try='test -s conftest.$ac_objext'
20038   { (eval echo "$as_me:20038: \"$ac_try\"") >&5
20039   (eval $ac_try) 2>&5
20040   ac_status=$?
20041   echo "$as_me:20041: \$? = $ac_status" >&5
20042   (exit $ac_status); }; }; then
20043   cf_cv_builtin_bool=1
20044 else
20045   echo "$as_me: failed program was:" >&5
20046 cat conftest.$ac_ext >&5
20047 cf_cv_builtin_bool=0
20048 fi
20049 rm -f conftest.$ac_objext conftest.$ac_ext
20050
20051 fi
20052
20053 if test "$cf_cv_builtin_bool" = 1
20054 then    echo "$as_me:20054: result: yes" >&5
20055 echo "${ECHO_T}yes" >&6
20056 else    echo "$as_me:20056: result: no" >&5
20057 echo "${ECHO_T}no" >&6
20058 fi
20059
20060 echo "$as_me:20060: checking for size of bool" >&5
20061 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20062 if test "${cf_cv_type_of_bool+set}" = set; then
20063   echo $ECHO_N "(cached) $ECHO_C" >&6
20064 else
20065
20066         rm -f cf_test.out
20067         if test "$cross_compiling" = yes; then
20068   cf_cv_type_of_bool=unknown
20069 else
20070   cat >conftest.$ac_ext <<_ACEOF
20071 #line 20071 "configure"
20072 #include "confdefs.h"
20073
20074 #include <stdlib.h>
20075 #include <stdio.h>
20076
20077 #if defined(__cplusplus)
20078
20079 #ifdef HAVE_GXX_BUILTIN_H
20080 #include <g++/builtin.h>
20081 #elif HAVE_GPP_BUILTIN_H
20082 #include <gpp/builtin.h>
20083 #elif HAVE_BUILTIN_H
20084 #include <builtin.h>
20085 #endif
20086
20087 #else
20088
20089 #if $cf_cv_header_stdbool_h
20090 #include <stdbool.h>
20091 #endif
20092
20093 #endif
20094
20095 int main()
20096 {
20097         FILE *fp = fopen("cf_test.out", "w");
20098         if (fp != 0) {
20099                 bool x = true;
20100                 if ((bool)(-x) >= 0)
20101                         fputs("unsigned ", fp);
20102                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20103                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20104                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20105                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20106                 fclose(fp);
20107         }
20108         ${cf_cv_main_return:-return}(0);
20109 }
20110
20111 _ACEOF
20112 rm -f conftest$ac_exeext
20113 if { (eval echo "$as_me:20113: \"$ac_link\"") >&5
20114   (eval $ac_link) 2>&5
20115   ac_status=$?
20116   echo "$as_me:20116: \$? = $ac_status" >&5
20117   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20118   { (eval echo "$as_me:20118: \"$ac_try\"") >&5
20119   (eval $ac_try) 2>&5
20120   ac_status=$?
20121   echo "$as_me:20121: \$? = $ac_status" >&5
20122   (exit $ac_status); }; }; then
20123   cf_cv_type_of_bool=`cat cf_test.out`
20124                  if test -z "$cf_cv_type_of_bool"; then
20125                    cf_cv_type_of_bool=unknown
20126                  fi
20127 else
20128   echo "$as_me: program exited with status $ac_status" >&5
20129 echo "$as_me: failed program was:" >&5
20130 cat conftest.$ac_ext >&5
20131 cf_cv_type_of_bool=unknown
20132 fi
20133 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20134 fi
20135
20136 fi
20137
20138         rm -f cf_test.out
20139 echo "$as_me:20139: result: $cf_cv_type_of_bool" >&5
20140 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20141 if test "$cf_cv_type_of_bool" = unknown ; then
20142         case .$NCURSES_BOOL in
20143         (.auto|.) NCURSES_BOOL=unsigned;;
20144         esac
20145         { echo "$as_me:20145: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20146 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20147         cf_cv_type_of_bool=$NCURSES_BOOL
20148 fi
20149
20150 echo "$as_me:20150: checking for special defines needed for etip.h" >&5
20151 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
20152 cf_save_CXXFLAGS="$CXXFLAGS"
20153 cf_result="none"
20154
20155 # etip.h includes ncurses.h which includes ncurses_dll.h
20156 # But ncurses_dll.h is generated - fix here.
20157 test -d include || mkdir include
20158 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
20159
20160 for cf_math in "" MATH_H
20161 do
20162 for cf_excp in "" MATH_EXCEPTION
20163 do
20164         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
20165         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
20166         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
20167 cat >conftest.$ac_ext <<_ACEOF
20168 #line 20168 "configure"
20169 #include "confdefs.h"
20170
20171 #include <etip.h.in>
20172
20173 int
20174 main ()
20175 {
20176
20177   ;
20178   return 0;
20179 }
20180 _ACEOF
20181 rm -f conftest.$ac_objext
20182 if { (eval echo "$as_me:20182: \"$ac_compile\"") >&5
20183   (eval $ac_compile) 2>&5
20184   ac_status=$?
20185   echo "$as_me:20185: \$? = $ac_status" >&5
20186   (exit $ac_status); } &&
20187          { ac_try='test -s conftest.$ac_objext'
20188   { (eval echo "$as_me:20188: \"$ac_try\"") >&5
20189   (eval $ac_try) 2>&5
20190   ac_status=$?
20191   echo "$as_me:20191: \$? = $ac_status" >&5
20192   (exit $ac_status); }; }; then
20193
20194         test -n "$cf_math" && cat >>confdefs.h <<EOF
20195 #define ETIP_NEEDS_${cf_math} 1
20196 EOF
20197
20198         test -n "$cf_excp" && cat >>confdefs.h <<EOF
20199 #define ETIP_NEEDS_${cf_excp} 1
20200 EOF
20201
20202         cf_result="$cf_math $cf_excp"
20203         break 2
20204
20205 else
20206   echo "$as_me: failed program was:" >&5
20207 cat conftest.$ac_ext >&5
20208 fi
20209 rm -f conftest.$ac_objext conftest.$ac_ext
20210 done
20211 done
20212 echo "$as_me:20212: result: $cf_result" >&5
20213 echo "${ECHO_T}$cf_result" >&6
20214 CXXFLAGS="$cf_save_CXXFLAGS"
20215
20216 if test -n "$CXX"; then
20217 echo "$as_me:20217: checking if $CXX accepts parameter initialization" >&5
20218 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
20219 if test "${cf_cv_cpp_param_init+set}" = set; then
20220   echo $ECHO_N "(cached) $ECHO_C" >&6
20221 else
20222
20223         ac_ext=cc
20224 ac_cpp='$CXXCPP $CPPFLAGS'
20225 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20226 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20227 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20228 ac_main_return=return
20229
20230         if test "$cross_compiling" = yes; then
20231   cf_cv_cpp_param_init=unknown
20232 else
20233   cat >conftest.$ac_ext <<_ACEOF
20234 #line 20234 "configure"
20235 #include "confdefs.h"
20236
20237 class TEST {
20238 private:
20239         int value;
20240 public:
20241         TEST(int x = 1);
20242         ~TEST();
20243 };
20244
20245 TEST::TEST(int x = 1)   // some compilers do not like second initializer
20246 {
20247         value = x;
20248 }
20249 int main() { }
20250
20251 _ACEOF
20252 rm -f conftest$ac_exeext
20253 if { (eval echo "$as_me:20253: \"$ac_link\"") >&5
20254   (eval $ac_link) 2>&5
20255   ac_status=$?
20256   echo "$as_me:20256: \$? = $ac_status" >&5
20257   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20258   { (eval echo "$as_me:20258: \"$ac_try\"") >&5
20259   (eval $ac_try) 2>&5
20260   ac_status=$?
20261   echo "$as_me:20261: \$? = $ac_status" >&5
20262   (exit $ac_status); }; }; then
20263   cf_cv_cpp_param_init=yes
20264 else
20265   echo "$as_me: program exited with status $ac_status" >&5
20266 echo "$as_me: failed program was:" >&5
20267 cat conftest.$ac_ext >&5
20268 cf_cv_cpp_param_init=no
20269 fi
20270 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20271 fi
20272         ac_ext=cc
20273 ac_cpp='$CXXCPP $CPPFLAGS'
20274 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20275 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20276 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20277 ac_main_return=return
20278
20279 fi
20280 echo "$as_me:20280: result: $cf_cv_cpp_param_init" >&5
20281 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
20282 fi
20283 test "$cf_cv_cpp_param_init" = yes &&
20284 cat >>confdefs.h <<\EOF
20285 #define CPP_HAS_PARAM_INIT 1
20286 EOF
20287
20288 if test -n "$CXX"; then
20289
20290 echo "$as_me:20290: checking if $CXX accepts static_cast" >&5
20291 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
20292 if test "${cf_cv_cpp_static_cast+set}" = set; then
20293   echo $ECHO_N "(cached) $ECHO_C" >&6
20294 else
20295
20296         ac_ext=cc
20297 ac_cpp='$CXXCPP $CPPFLAGS'
20298 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20299 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20300 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20301 ac_main_return=return
20302
20303         cat >conftest.$ac_ext <<_ACEOF
20304 #line 20304 "configure"
20305 #include "confdefs.h"
20306
20307 class NCursesPanel
20308 {
20309 public:
20310   NCursesPanel(int nlines,
20311                int ncols,
20312                int begin_y = 0,
20313                int begin_x = 0)
20314   {
20315   }
20316   NCursesPanel();
20317   ~NCursesPanel();
20318 };
20319
20320 template<class T> class NCursesUserPanel : public NCursesPanel
20321 {
20322 public:
20323   NCursesUserPanel (int nlines,
20324                     int ncols,
20325                     int begin_y = 0,
20326                     int begin_x = 0,
20327                     const T* p_UserData = static_cast<T*>(0))
20328     : NCursesPanel (nlines, ncols, begin_y, begin_x)
20329   {
20330   };
20331   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
20332   {
20333   };
20334
20335   virtual ~NCursesUserPanel() {};
20336 };
20337
20338 int
20339 main ()
20340 {
20341
20342         const char* p_UserData = static_cast<char*>(0)
20343   ;
20344   return 0;
20345 }
20346 _ACEOF
20347 rm -f conftest.$ac_objext
20348 if { (eval echo "$as_me:20348: \"$ac_compile\"") >&5
20349   (eval $ac_compile) 2>&5
20350   ac_status=$?
20351   echo "$as_me:20351: \$? = $ac_status" >&5
20352   (exit $ac_status); } &&
20353          { ac_try='test -s conftest.$ac_objext'
20354   { (eval echo "$as_me:20354: \"$ac_try\"") >&5
20355   (eval $ac_try) 2>&5
20356   ac_status=$?
20357   echo "$as_me:20357: \$? = $ac_status" >&5
20358   (exit $ac_status); }; }; then
20359   cf_cv_cpp_static_cast=yes
20360 else
20361   echo "$as_me: failed program was:" >&5
20362 cat conftest.$ac_ext >&5
20363 cf_cv_cpp_static_cast=no
20364 fi
20365 rm -f conftest.$ac_objext conftest.$ac_ext
20366
20367         ac_ext=cc
20368 ac_cpp='$CXXCPP $CPPFLAGS'
20369 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20370 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20371 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20372 ac_main_return=return
20373
20374 fi
20375 echo "$as_me:20375: result: $cf_cv_cpp_static_cast" >&5
20376 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
20377
20378 fi
20379
20380 test "$cf_cv_cpp_static_cast" = yes &&
20381 cat >>confdefs.h <<\EOF
20382 #define CPP_HAS_STATIC_CAST 1
20383 EOF
20384
20385         CXX_AR='$(AR)'
20386         CXX_ARFLAGS='$(ARFLAGS)'
20387         case $cf_cv_system_name in
20388         (irix*)
20389             if test "$GXX" != yes ; then
20390                 CXX_AR='$(CXX)'
20391                 CXX_ARFLAGS='-ar -o'
20392             fi
20393             ;;
20394         (sco3.2v5*)
20395             CXXLDFLAGS="-u main"
20396             ;;
20397         (solaris2*)
20398             if test "$GXX" != yes ; then
20399                 CXX_AR='$(CXX)'
20400                 CXX_ARFLAGS='-xar -o'
20401             fi
20402             ;;
20403         esac
20404
20405 else
20406         cf_cxx_library=no
20407         cf_cv_builtin_bool=1
20408
20409         # Just because we are not configuring against C++ right now does not
20410         # mean that a user will not want to use C++.  Some distributors disable
20411         # the C++ portion of this configuration as a shortcut (or just to avoid
20412         # compiling the demo in the c++ directory).  So we need a reasonable
20413         # default for the 'bool' type.
20414         #
20415         # Caveat: since the storage of the bool type is not standardized, it
20416         # may change.
20417
20418         if test "$NCURSES_BOOL" != auto ; then
20419                 cf_cv_type_of_bool=$NCURSES_BOOL
20420                 cf_cv_header_stdbool_h=0
20421         else
20422                 if test "$cf_cv_header_stdbool_h" = 1 ; then
20423
20424 echo "$as_me:20424: checking for size of bool" >&5
20425 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
20426 if test "${cf_cv_type_of_bool+set}" = set; then
20427   echo $ECHO_N "(cached) $ECHO_C" >&6
20428 else
20429
20430         rm -f cf_test.out
20431         if test "$cross_compiling" = yes; then
20432   cf_cv_type_of_bool=unknown
20433 else
20434   cat >conftest.$ac_ext <<_ACEOF
20435 #line 20435 "configure"
20436 #include "confdefs.h"
20437
20438 #include <stdlib.h>
20439 #include <stdio.h>
20440
20441 #if defined(__cplusplus)
20442
20443 #ifdef HAVE_GXX_BUILTIN_H
20444 #include <g++/builtin.h>
20445 #elif HAVE_GPP_BUILTIN_H
20446 #include <gpp/builtin.h>
20447 #elif HAVE_BUILTIN_H
20448 #include <builtin.h>
20449 #endif
20450
20451 #else
20452
20453 #if $cf_cv_header_stdbool_h
20454 #include <stdbool.h>
20455 #endif
20456
20457 #endif
20458
20459 int main()
20460 {
20461         FILE *fp = fopen("cf_test.out", "w");
20462         if (fp != 0) {
20463                 bool x = true;
20464                 if ((bool)(-x) >= 0)
20465                         fputs("unsigned ", fp);
20466                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
20467                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
20468                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
20469                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
20470                 fclose(fp);
20471         }
20472         ${cf_cv_main_return:-return}(0);
20473 }
20474
20475 _ACEOF
20476 rm -f conftest$ac_exeext
20477 if { (eval echo "$as_me:20477: \"$ac_link\"") >&5
20478   (eval $ac_link) 2>&5
20479   ac_status=$?
20480   echo "$as_me:20480: \$? = $ac_status" >&5
20481   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20482   { (eval echo "$as_me:20482: \"$ac_try\"") >&5
20483   (eval $ac_try) 2>&5
20484   ac_status=$?
20485   echo "$as_me:20485: \$? = $ac_status" >&5
20486   (exit $ac_status); }; }; then
20487   cf_cv_type_of_bool=`cat cf_test.out`
20488                  if test -z "$cf_cv_type_of_bool"; then
20489                    cf_cv_type_of_bool=unknown
20490                  fi
20491 else
20492   echo "$as_me: program exited with status $ac_status" >&5
20493 echo "$as_me: failed program was:" >&5
20494 cat conftest.$ac_ext >&5
20495 cf_cv_type_of_bool=unknown
20496 fi
20497 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20498 fi
20499
20500 fi
20501
20502         rm -f cf_test.out
20503 echo "$as_me:20503: result: $cf_cv_type_of_bool" >&5
20504 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20505 if test "$cf_cv_type_of_bool" = unknown ; then
20506         case .$NCURSES_BOOL in
20507         (.auto|.) NCURSES_BOOL=unsigned;;
20508         esac
20509         { echo "$as_me:20509: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20510 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20511         cf_cv_type_of_bool=$NCURSES_BOOL
20512 fi
20513
20514                 else
20515                         echo "$as_me:20515: checking for fallback type of bool" >&5
20516 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20517                         case "$host_cpu" in
20518                         (i?86)  cf_cv_type_of_bool=char ;;
20519                         (*)     cf_cv_type_of_bool=int  ;;
20520                         esac
20521                         echo "$as_me:20521: result: $cf_cv_type_of_bool" >&5
20522 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20523                 fi
20524         fi
20525 fi
20526
20527 # If the C compiler did not declare bool, and we did not determine that the C++
20528 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20529 # ncurses library use the same type as C++ bool.  Note that this allows one to
20530 # specify the type of bool in a configure-script option and postpone
20531 # integration with the C++ compiler provided that the types are compatible.
20532 USE_CXX_BOOL=1
20533 if test $cf_cv_cc_bool_type = 1
20534 then
20535         # oops: C has a bool.  Unlikely, but C++ could differ.
20536         USE_CXX_BOOL=0
20537 elif test $cf_cv_builtin_bool = 0
20538 then
20539         # C++ has no bool
20540         USE_CXX_BOOL=0
20541 else
20542         # this is the normal case
20543         USE_CXX_BOOL='defined(__cplusplus)'
20544 fi
20545
20546 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20547
20548         if test "$cf_with_ada" != "no" ; then
20549                 if test "$with_libtool" != "no"; then
20550                         { echo "$as_me:20550: WARNING: libtool does not support Ada - disabling feature" >&5
20551 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20552                         cf_with_ada=no
20553                 fi
20554         fi
20555
20556         if test "$cf_with_ada" != "no" ; then
20557
20558 cf_ada_make=gnatmake
20559 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20560 set dummy $cf_ada_make; ac_word=$2
20561 echo "$as_me:20561: checking for $ac_word" >&5
20562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20563 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20564   echo $ECHO_N "(cached) $ECHO_C" >&6
20565 else
20566   if test -n "$gnat_exists"; then
20567   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20568 else
20569   ac_save_IFS=$IFS; IFS=$ac_path_separator
20570 ac_dummy="$PATH"
20571 for ac_dir in $ac_dummy; do
20572   IFS=$ac_save_IFS
20573   test -z "$ac_dir" && ac_dir=.
20574   $as_executable_p "$ac_dir/$ac_word" || continue
20575 ac_cv_prog_gnat_exists="yes"
20576 echo "$as_me:20576: found $ac_dir/$ac_word" >&5
20577 break
20578 done
20579
20580   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20581 fi
20582 fi
20583 gnat_exists=$ac_cv_prog_gnat_exists
20584 if test -n "$gnat_exists"; then
20585   echo "$as_me:20585: result: $gnat_exists" >&5
20586 echo "${ECHO_T}$gnat_exists" >&6
20587 else
20588   echo "$as_me:20588: result: no" >&5
20589 echo "${ECHO_T}no" >&6
20590 fi
20591
20592 if test "$ac_cv_prog_gnat_exists" = no; then
20593         cf_ada_make=
20594         cf_cv_prog_gnat_correct=no
20595 else
20596
20597 echo "$as_me:20597: checking for gnat version" >&5
20598 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20599 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20600         grep '[0-9].[0-9][0-9]*' |\
20601         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20602 echo "$as_me:20602: result: $cf_gnat_version" >&5
20603 echo "${ECHO_T}$cf_gnat_version" >&6
20604
20605 case $cf_gnat_version in
20606 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
20607         cf_cv_prog_gnat_correct=yes
20608         ;;
20609 (*)
20610         { echo "$as_me:20610: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20611 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20612         cf_cv_prog_gnat_correct=no
20613         ;;
20614 esac
20615
20616         # Extract the first word of "m4", so it can be a program name with args.
20617 set dummy m4; ac_word=$2
20618 echo "$as_me:20618: checking for $ac_word" >&5
20619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20620 if test "${ac_cv_prog_M4_exists+set}" = set; then
20621   echo $ECHO_N "(cached) $ECHO_C" >&6
20622 else
20623   if test -n "$M4_exists"; then
20624   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20625 else
20626   ac_save_IFS=$IFS; IFS=$ac_path_separator
20627 ac_dummy="$PATH"
20628 for ac_dir in $ac_dummy; do
20629   IFS=$ac_save_IFS
20630   test -z "$ac_dir" && ac_dir=.
20631   $as_executable_p "$ac_dir/$ac_word" || continue
20632 ac_cv_prog_M4_exists="yes"
20633 echo "$as_me:20633: found $ac_dir/$ac_word" >&5
20634 break
20635 done
20636
20637   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20638 fi
20639 fi
20640 M4_exists=$ac_cv_prog_M4_exists
20641 if test -n "$M4_exists"; then
20642   echo "$as_me:20642: result: $M4_exists" >&5
20643 echo "${ECHO_T}$M4_exists" >&6
20644 else
20645   echo "$as_me:20645: result: no" >&5
20646 echo "${ECHO_T}no" >&6
20647 fi
20648
20649         if test "$ac_cv_prog_M4_exists" = no; then
20650                 cf_cv_prog_gnat_correct=no
20651                 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20652         fi
20653         if test "$cf_cv_prog_gnat_correct" = yes; then
20654                 echo "$as_me:20654: checking if GNAT works" >&5
20655 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20656
20657 rm -rf conftest* *~conftest*
20658 cat >>conftest.ads <<CF_EOF
20659 procedure conftest;
20660 CF_EOF
20661 cat >>conftest.adb <<CF_EOF
20662 with Text_IO;
20663 with GNAT.OS_Lib;
20664 procedure conftest is
20665 begin
20666    Text_IO.Put ("Hello World");
20667    Text_IO.New_Line;
20668    GNAT.OS_Lib.OS_Exit (0);
20669 end conftest;
20670 CF_EOF
20671 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20672    if ( ./conftest 1>&5 2>&1 ) ; then
20673       cf_cv_prog_gnat_correct=yes
20674    else
20675       cf_cv_prog_gnat_correct=no
20676    fi
20677 else
20678    cf_cv_prog_gnat_correct=no
20679 fi
20680 rm -rf conftest* *~conftest*
20681
20682                 echo "$as_me:20682: result: $cf_cv_prog_gnat_correct" >&5
20683 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20684         fi
20685 fi
20686
20687                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20688
20689         ADAFLAGS="$ADAFLAGS -gnatpn"
20690
20691         echo "$as_me:20691: checking optimization options for ADAFLAGS" >&5
20692 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20693         case "$CFLAGS" in
20694         (*-g*)
20695
20696         ADAFLAGS="$ADAFLAGS -g"
20697
20698                 ;;
20699         esac
20700         case "$CFLAGS" in
20701         (*-O*)
20702                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20703
20704         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20705
20706                 ;;
20707         esac
20708         echo "$as_me:20708: result: $ADAFLAGS" >&5
20709 echo "${ECHO_T}$ADAFLAGS" >&6
20710
20711 echo "$as_me:20711: checking if GNATPREP supports -T option" >&5
20712 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
20713 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
20714   echo $ECHO_N "(cached) $ECHO_C" >&6
20715 else
20716
20717 cf_cv_gnatprep_opt_t=no
20718 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
20719
20720 fi
20721 echo "$as_me:20721: result: $cf_cv_gnatprep_opt_t" >&5
20722 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
20723 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
20724
20725 echo "$as_me:20725: checking if GNAT supports generics" >&5
20726 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20727 case $cf_gnat_version in
20728 (3.[1-9]*|[4-9].*)
20729         cf_gnat_generics=yes
20730         ;;
20731 (*)
20732         cf_gnat_generics=no
20733         ;;
20734 esac
20735 echo "$as_me:20735: result: $cf_gnat_generics" >&5
20736 echo "${ECHO_T}$cf_gnat_generics" >&6
20737
20738 if test "$cf_gnat_generics" = yes
20739 then
20740         cf_compile_generics=generics
20741         cf_generic_objects="\${GENOBJS}"
20742 else
20743         cf_compile_generics=
20744         cf_generic_objects=
20745 fi
20746
20747 echo "$as_me:20747: checking if GNAT supports SIGINT" >&5
20748 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20749 if test "${cf_cv_gnat_sigint+set}" = set; then
20750   echo $ECHO_N "(cached) $ECHO_C" >&6
20751 else
20752
20753 rm -rf conftest* *~conftest*
20754 cat >>conftest.ads <<CF_EOF
20755 with Ada.Interrupts.Names;
20756
20757 package ConfTest is
20758
20759    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20760    pragma Unreserve_All_Interrupts;
20761    pragma Warnings (On);
20762
20763    protected Process is
20764       procedure Stop;
20765       function Continue return Boolean;
20766       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20767    private
20768       Done : Boolean := False;
20769    end Process;
20770
20771 end ConfTest;
20772 CF_EOF
20773 cat >>conftest.adb <<CF_EOF
20774 package body ConfTest is
20775    protected body Process is
20776       procedure Stop is
20777       begin
20778          Done := True;
20779       end Stop;
20780       function Continue return Boolean is
20781       begin
20782          return not Done;
20783       end Continue;
20784    end Process;
20785 end ConfTest;
20786 CF_EOF
20787 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20788       cf_cv_gnat_sigint=yes
20789 else
20790    cf_cv_gnat_sigint=no
20791 fi
20792 rm -rf conftest* *~conftest*
20793
20794 fi
20795 echo "$as_me:20795: result: $cf_cv_gnat_sigint" >&5
20796 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20797
20798 if test $cf_cv_gnat_sigint = yes ; then
20799         USE_GNAT_SIGINT=""
20800 else
20801         USE_GNAT_SIGINT="#"
20802 fi
20803
20804 cf_gnat_libraries=no
20805 cf_gnat_projects=no
20806
20807 if test "$enable_gnat_projects" != no ; then
20808 echo "$as_me:20808: checking if GNAT supports project files" >&5
20809 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20810 case $cf_gnat_version in
20811 (3.[0-9]*)
20812         ;;
20813 (*)
20814         case $cf_cv_system_name in
20815         (cygwin*|msys*)
20816                 ;;
20817         (*)
20818                 mkdir conftest.src conftest.bin conftest.lib
20819                 cd conftest.src
20820                 rm -rf conftest* *~conftest*
20821                 cat >>library.gpr <<CF_EOF
20822 project Library is
20823   Kind := External ("LIB_KIND");
20824   for Library_Name use "ConfTest";
20825   for Object_Dir use ".";
20826   for Library_ALI_Dir use External("LIBRARY_DIR");
20827   for Library_Version use External ("SONAME");
20828   for Library_Kind use Kind;
20829   for Library_Dir use External("BUILD_DIR");
20830   Source_Dir := External ("SOURCE_DIR");
20831   for Source_Dirs use (Source_Dir);
20832 end Library;
20833 CF_EOF
20834                 cat >>confpackage.ads <<CF_EOF
20835 package ConfPackage is
20836    procedure conftest;
20837 end ConfPackage;
20838 CF_EOF
20839                 cat >>confpackage.adb <<CF_EOF
20840 with Text_IO;
20841 package body ConfPackage is
20842    procedure conftest is
20843    begin
20844       Text_IO.Put ("Hello World");
20845       Text_IO.New_Line;
20846    end conftest;
20847 end ConfPackage;
20848 CF_EOF
20849                 if ( $cf_ada_make $ADAFLAGS \
20850                                 -Plibrary.gpr \
20851                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20852                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20853                                 -XSOURCE_DIR=`pwd` \
20854                                 -XSONAME=libConfTest.so.1 \
20855                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20856                         cf_gnat_projects=yes
20857                 fi
20858                 cd ..
20859                 if test -f conftest.lib/confpackage.ali
20860                 then
20861                         cf_gnat_libraries=yes
20862                 fi
20863                 rm -rf conftest* *~conftest*
20864                 ;;
20865         esac
20866         ;;
20867 esac
20868 echo "$as_me:20868: result: $cf_gnat_projects" >&5
20869 echo "${ECHO_T}$cf_gnat_projects" >&6
20870 fi # enable_gnat_projects
20871
20872 if test $cf_gnat_projects = yes
20873 then
20874         echo "$as_me:20874: checking if GNAT supports libraries" >&5
20875 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20876         echo "$as_me:20876: result: $cf_gnat_libraries" >&5
20877 echo "${ECHO_T}$cf_gnat_libraries" >&6
20878 fi
20879
20880 if test "$cf_gnat_projects" = yes
20881 then
20882         USE_OLD_MAKERULES="#"
20883         USE_GNAT_PROJECTS=""
20884 else
20885         USE_OLD_MAKERULES=""
20886         USE_GNAT_PROJECTS="#"
20887 fi
20888
20889 if test "$cf_gnat_libraries" = yes
20890 then
20891         USE_GNAT_LIBRARIES=""
20892 else
20893         USE_GNAT_LIBRARIES="#"
20894 fi
20895
20896 echo "$as_me:20896: checking for ada-compiler" >&5
20897 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20898
20899 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20900 if test "${with_ada_compiler+set}" = set; then
20901   withval="$with_ada_compiler"
20902   cf_ada_compiler=$withval
20903 else
20904   cf_ada_compiler=gnatmake
20905 fi;
20906
20907 echo "$as_me:20907: result: $cf_ada_compiler" >&5
20908 echo "${ECHO_T}$cf_ada_compiler" >&6
20909
20910                         cf_ada_package=terminal_interface
20911
20912 echo "$as_me:20912: checking for ada-include" >&5
20913 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20914
20915 # Check whether --with-ada-include or --without-ada-include was given.
20916 if test "${with_ada_include+set}" = set; then
20917   withval="$with_ada_include"
20918
20919 else
20920   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20921 fi; if test -n "$prefix/share/ada/adainclude" ; then
20922
20923 if test "x$prefix" != xNONE; then
20924         cf_path_syntax="$prefix"
20925 else
20926         cf_path_syntax="$ac_default_prefix"
20927 fi
20928
20929 case ".$withval" in
20930 (.\$\(*\)*|.\'*\'*)
20931         ;;
20932 (..|./*|.\\*)
20933         ;;
20934 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
20935         ;;
20936 (.\${*prefix}*|.\${*dir}*)
20937         eval withval="$withval"
20938         case ".$withval" in
20939         (.NONE/*)
20940                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20941                 ;;
20942         esac
20943         ;;
20944 (.no|.NONE/*)
20945         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20946         ;;
20947 (*)
20948         { { echo "$as_me:20948: error: expected a pathname, not \"$withval\"" >&5
20949 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20950    { (exit 1); exit 1; }; }
20951         ;;
20952 esac
20953
20954 fi
20955 eval ADA_INCLUDE="$withval"
20956
20957 echo "$as_me:20957: result: $ADA_INCLUDE" >&5
20958 echo "${ECHO_T}$ADA_INCLUDE" >&6
20959
20960 echo "$as_me:20960: checking for ada-objects" >&5
20961 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20962
20963 # Check whether --with-ada-objects or --without-ada-objects was given.
20964 if test "${with_ada_objects+set}" = set; then
20965   withval="$with_ada_objects"
20966
20967 else
20968   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20969 fi; if test -n "$prefix/lib/ada/adalib" ; then
20970
20971 if test "x$prefix" != xNONE; then
20972         cf_path_syntax="$prefix"
20973 else
20974         cf_path_syntax="$ac_default_prefix"
20975 fi
20976
20977 case ".$withval" in
20978 (.\$\(*\)*|.\'*\'*)
20979         ;;
20980 (..|./*|.\\*)
20981         ;;
20982 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
20983         ;;
20984 (.\${*prefix}*|.\${*dir}*)
20985         eval withval="$withval"
20986         case ".$withval" in
20987         (.NONE/*)
20988                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20989                 ;;
20990         esac
20991         ;;
20992 (.no|.NONE/*)
20993         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20994         ;;
20995 (*)
20996         { { echo "$as_me:20996: error: expected a pathname, not \"$withval\"" >&5
20997 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20998    { (exit 1); exit 1; }; }
20999         ;;
21000 esac
21001
21002 fi
21003 eval ADA_OBJECTS="$withval"
21004
21005 echo "$as_me:21005: result: $ADA_OBJECTS" >&5
21006 echo "${ECHO_T}$ADA_OBJECTS" >&6
21007
21008 echo "$as_me:21008: checking if an Ada95 shared-library should be built" >&5
21009 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
21010
21011 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
21012 if test "${with_ada_sharedlib+set}" = set; then
21013   withval="$with_ada_sharedlib"
21014   with_ada_sharedlib=$withval
21015 else
21016   with_ada_sharedlib=no
21017 fi;
21018 echo "$as_me:21018: result: $with_ada_sharedlib" >&5
21019 echo "${ECHO_T}$with_ada_sharedlib" >&6
21020
21021 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
21022 MAKE_ADA_SHAREDLIB="#"
21023
21024 if test "x$with_ada_sharedlib" != xno
21025 then
21026         MAKE_ADA_SHAREDLIB=
21027         if test "x$with_ada_sharedlib" != xyes
21028         then
21029                 ADA_SHAREDLIB="$with_ada_sharedlib"
21030         fi
21031 fi
21032
21033                 fi
21034         fi
21035 else
21036         cf_with_ada=no
21037 fi
21038
21039 # do this "late" to avoid conflict with header-checks
21040 if test "x$with_widec" = xyes ; then
21041         echo "$as_me:21041: checking for wchar_t" >&5
21042 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
21043 if test "${ac_cv_type_wchar_t+set}" = set; then
21044   echo $ECHO_N "(cached) $ECHO_C" >&6
21045 else
21046   cat >conftest.$ac_ext <<_ACEOF
21047 #line 21047 "configure"
21048 #include "confdefs.h"
21049 $ac_includes_default
21050 int
21051 main ()
21052 {
21053 if ((wchar_t *) 0)
21054   return 0;
21055 if (sizeof (wchar_t))
21056   return 0;
21057   ;
21058   return 0;
21059 }
21060 _ACEOF
21061 rm -f conftest.$ac_objext
21062 if { (eval echo "$as_me:21062: \"$ac_compile\"") >&5
21063   (eval $ac_compile) 2>&5
21064   ac_status=$?
21065   echo "$as_me:21065: \$? = $ac_status" >&5
21066   (exit $ac_status); } &&
21067          { ac_try='test -s conftest.$ac_objext'
21068   { (eval echo "$as_me:21068: \"$ac_try\"") >&5
21069   (eval $ac_try) 2>&5
21070   ac_status=$?
21071   echo "$as_me:21071: \$? = $ac_status" >&5
21072   (exit $ac_status); }; }; then
21073   ac_cv_type_wchar_t=yes
21074 else
21075   echo "$as_me: failed program was:" >&5
21076 cat conftest.$ac_ext >&5
21077 ac_cv_type_wchar_t=no
21078 fi
21079 rm -f conftest.$ac_objext conftest.$ac_ext
21080 fi
21081 echo "$as_me:21081: result: $ac_cv_type_wchar_t" >&5
21082 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
21083
21084 echo "$as_me:21084: checking size of wchar_t" >&5
21085 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
21086 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21087   echo $ECHO_N "(cached) $ECHO_C" >&6
21088 else
21089   if test "$ac_cv_type_wchar_t" = yes; then
21090   if test "$cross_compiling" = yes; then
21091   # Depending upon the size, compute the lo and hi bounds.
21092 cat >conftest.$ac_ext <<_ACEOF
21093 #line 21093 "configure"
21094 #include "confdefs.h"
21095 $ac_includes_default
21096 int
21097 main ()
21098 {
21099 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
21100   ;
21101   return 0;
21102 }
21103 _ACEOF
21104 rm -f conftest.$ac_objext
21105 if { (eval echo "$as_me:21105: \"$ac_compile\"") >&5
21106   (eval $ac_compile) 2>&5
21107   ac_status=$?
21108   echo "$as_me:21108: \$? = $ac_status" >&5
21109   (exit $ac_status); } &&
21110          { ac_try='test -s conftest.$ac_objext'
21111   { (eval echo "$as_me:21111: \"$ac_try\"") >&5
21112   (eval $ac_try) 2>&5
21113   ac_status=$?
21114   echo "$as_me:21114: \$? = $ac_status" >&5
21115   (exit $ac_status); }; }; then
21116   ac_lo=0 ac_mid=0
21117   while :; do
21118     cat >conftest.$ac_ext <<_ACEOF
21119 #line 21119 "configure"
21120 #include "confdefs.h"
21121 $ac_includes_default
21122 int
21123 main ()
21124 {
21125 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21126   ;
21127   return 0;
21128 }
21129 _ACEOF
21130 rm -f conftest.$ac_objext
21131 if { (eval echo "$as_me:21131: \"$ac_compile\"") >&5
21132   (eval $ac_compile) 2>&5
21133   ac_status=$?
21134   echo "$as_me:21134: \$? = $ac_status" >&5
21135   (exit $ac_status); } &&
21136          { ac_try='test -s conftest.$ac_objext'
21137   { (eval echo "$as_me:21137: \"$ac_try\"") >&5
21138   (eval $ac_try) 2>&5
21139   ac_status=$?
21140   echo "$as_me:21140: \$? = $ac_status" >&5
21141   (exit $ac_status); }; }; then
21142   ac_hi=$ac_mid; break
21143 else
21144   echo "$as_me: failed program was:" >&5
21145 cat conftest.$ac_ext >&5
21146 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
21147 fi
21148 rm -f conftest.$ac_objext conftest.$ac_ext
21149   done
21150 else
21151   echo "$as_me: failed program was:" >&5
21152 cat conftest.$ac_ext >&5
21153 ac_hi=-1 ac_mid=-1
21154   while :; do
21155     cat >conftest.$ac_ext <<_ACEOF
21156 #line 21156 "configure"
21157 #include "confdefs.h"
21158 $ac_includes_default
21159 int
21160 main ()
21161 {
21162 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
21163   ;
21164   return 0;
21165 }
21166 _ACEOF
21167 rm -f conftest.$ac_objext
21168 if { (eval echo "$as_me:21168: \"$ac_compile\"") >&5
21169   (eval $ac_compile) 2>&5
21170   ac_status=$?
21171   echo "$as_me:21171: \$? = $ac_status" >&5
21172   (exit $ac_status); } &&
21173          { ac_try='test -s conftest.$ac_objext'
21174   { (eval echo "$as_me:21174: \"$ac_try\"") >&5
21175   (eval $ac_try) 2>&5
21176   ac_status=$?
21177   echo "$as_me:21177: \$? = $ac_status" >&5
21178   (exit $ac_status); }; }; then
21179   ac_lo=$ac_mid; break
21180 else
21181   echo "$as_me: failed program was:" >&5
21182 cat conftest.$ac_ext >&5
21183 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
21184 fi
21185 rm -f conftest.$ac_objext conftest.$ac_ext
21186   done
21187 fi
21188 rm -f conftest.$ac_objext conftest.$ac_ext
21189 # Binary search between lo and hi bounds.
21190 while test "x$ac_lo" != "x$ac_hi"; do
21191   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21192   cat >conftest.$ac_ext <<_ACEOF
21193 #line 21193 "configure"
21194 #include "confdefs.h"
21195 $ac_includes_default
21196 int
21197 main ()
21198 {
21199 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
21200   ;
21201   return 0;
21202 }
21203 _ACEOF
21204 rm -f conftest.$ac_objext
21205 if { (eval echo "$as_me:21205: \"$ac_compile\"") >&5
21206   (eval $ac_compile) 2>&5
21207   ac_status=$?
21208   echo "$as_me:21208: \$? = $ac_status" >&5
21209   (exit $ac_status); } &&
21210          { ac_try='test -s conftest.$ac_objext'
21211   { (eval echo "$as_me:21211: \"$ac_try\"") >&5
21212   (eval $ac_try) 2>&5
21213   ac_status=$?
21214   echo "$as_me:21214: \$? = $ac_status" >&5
21215   (exit $ac_status); }; }; then
21216   ac_hi=$ac_mid
21217 else
21218   echo "$as_me: failed program was:" >&5
21219 cat conftest.$ac_ext >&5
21220 ac_lo=`expr $ac_mid + 1`
21221 fi
21222 rm -f conftest.$ac_objext conftest.$ac_ext
21223 done
21224 ac_cv_sizeof_wchar_t=$ac_lo
21225 else
21226   if test "$cross_compiling" = yes; then
21227   { { echo "$as_me:21227: error: cannot run test program while cross compiling" >&5
21228 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21229    { (exit 1); exit 1; }; }
21230 else
21231   cat >conftest.$ac_ext <<_ACEOF
21232 #line 21232 "configure"
21233 #include "confdefs.h"
21234 $ac_includes_default
21235 int
21236 main ()
21237 {
21238 FILE *f = fopen ("conftest.val", "w");
21239 if (!f)
21240   $ac_main_return (1);
21241 fprintf (f, "%d", (sizeof (wchar_t)));
21242 fclose (f);
21243   ;
21244   return 0;
21245 }
21246 _ACEOF
21247 rm -f conftest$ac_exeext
21248 if { (eval echo "$as_me:21248: \"$ac_link\"") >&5
21249   (eval $ac_link) 2>&5
21250   ac_status=$?
21251   echo "$as_me:21251: \$? = $ac_status" >&5
21252   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21253   { (eval echo "$as_me:21253: \"$ac_try\"") >&5
21254   (eval $ac_try) 2>&5
21255   ac_status=$?
21256   echo "$as_me:21256: \$? = $ac_status" >&5
21257   (exit $ac_status); }; }; then
21258   ac_cv_sizeof_wchar_t=`cat conftest.val`
21259 else
21260   echo "$as_me: program exited with status $ac_status" >&5
21261 echo "$as_me: failed program was:" >&5
21262 cat conftest.$ac_ext >&5
21263 fi
21264 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21265 fi
21266 fi
21267 rm -f conftest.val
21268 else
21269   ac_cv_sizeof_wchar_t=0
21270 fi
21271 fi
21272 echo "$as_me:21272: result: $ac_cv_sizeof_wchar_t" >&5
21273 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
21274 cat >>confdefs.h <<EOF
21275 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
21276 EOF
21277
21278 fi
21279
21280 ### Construct the ncurses library-subsets, if any, from this set of keywords:
21281 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
21282 ###
21283 ### ticlib modules may be a separate library, otherwise contained in termlib.
21284 ### termlib modules may be a separate library, otherwise contained in ncurses.
21285 ###
21286 ### The of "+" or " " between the tokens controls the way the script
21287 ### chooses to split module lists into libraries.
21288 ###
21289 ### (see CF_LIB_RULES).
21290 echo "$as_me:21290: checking for library subsets" >&5
21291 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
21292 LIB_SUBSETS=
21293
21294 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
21295         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
21296         if test "$with_ticlib" != no ; then
21297                 LIB_SUBSETS="${LIB_SUBSETS} "
21298         else
21299                 LIB_SUBSETS="${LIB_SUBSETS}+"
21300         fi
21301 fi
21302
21303 LIB_SUBSETS="${LIB_SUBSETS}termlib"
21304 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
21305
21306 if test "$with_termlib" != no ; then
21307         LIB_SUBSETS="${LIB_SUBSETS} "
21308 else
21309         LIB_SUBSETS="${LIB_SUBSETS}+"
21310 fi
21311
21312 LIB_SUBSETS="${LIB_SUBSETS}base"
21313
21314 # Most term-driver calls are to tinfo, but some like init_pair are to the
21315 # base library (so it resides in base).
21316 if test "$with_term_driver" != no ; then
21317         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
21318         case $cf_cv_system_name in
21319         (*mingw32*|*mingw64*)
21320                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
21321                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
21322                 ;;
21323         (*)
21324                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
21325                 ;;
21326         esac
21327 fi
21328
21329 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
21330 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
21331
21332 echo "$as_me:21332: result: $LIB_SUBSETS" >&5
21333 echo "${ECHO_T}$LIB_SUBSETS" >&6
21334
21335 ### Construct the list of include-directories to be generated
21336
21337 if test "$srcdir" != "."; then
21338         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
21339 fi
21340 CPPFLAGS="-I../include $CPPFLAGS"
21341 if test "$srcdir" != "."; then
21342         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
21343 fi
21344 CPPFLAGS="-I. $CPPFLAGS"
21345
21346 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
21347 if test "$srcdir" != "."; then
21348         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
21349 fi
21350 if test "$GCC" != yes; then
21351         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21352 elif test "$includedir" != "/usr/include"; then
21353         if test "$includedir" = '${prefix}/include' ; then
21354                 if test x$prefix != x/usr ; then
21355                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21356                 fi
21357         else
21358                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
21359         fi
21360 fi
21361
21362 ### Build up pieces for makefile rules
21363 echo "$as_me:21363: checking default library suffix" >&5
21364 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
21365
21366         case $DFT_LWR_MODEL in
21367         (libtool) DFT_ARG_SUFFIX=''   ;;
21368         (normal)  DFT_ARG_SUFFIX=''   ;;
21369         (debug)   DFT_ARG_SUFFIX='_g' ;;
21370         (profile) DFT_ARG_SUFFIX='_p' ;;
21371         (shared)  DFT_ARG_SUFFIX=''   ;;
21372         esac
21373         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
21374 echo "$as_me:21374: result: $DFT_ARG_SUFFIX" >&5
21375 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
21376
21377 echo "$as_me:21377: checking default library-dependency suffix" >&5
21378 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
21379
21380         case X$DFT_LWR_MODEL in
21381         (Xlibtool)
21382                 DFT_LIB_SUFFIX='.la'
21383                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21384                 ;;
21385         (Xdebug)
21386                 DFT_LIB_SUFFIX='_g.a'
21387                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21388                 ;;
21389         (Xprofile)
21390                 DFT_LIB_SUFFIX='_p.a'
21391                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21392                 ;;
21393         (Xshared)
21394                 case $cf_cv_system_name in
21395                 (aix[5-7]*)
21396                         DFT_LIB_SUFFIX='.so'
21397                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21398                         ;;
21399                 (cygwin*|msys*|mingw*)
21400                         DFT_LIB_SUFFIX='.dll'
21401                         DFT_DEP_SUFFIX='.dll.a'
21402                         ;;
21403                 (darwin*)
21404                         DFT_LIB_SUFFIX='.dylib'
21405                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21406                         ;;
21407                 (hpux*)
21408                         case $target in
21409                         (ia64*)
21410                                 DFT_LIB_SUFFIX='.so'
21411                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21412                                 ;;
21413                         (*)
21414                                 DFT_LIB_SUFFIX='.sl'
21415                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21416                                 ;;
21417                         esac
21418                         ;;
21419                 (*)
21420                         DFT_LIB_SUFFIX='.so'
21421                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21422                         ;;
21423                 esac
21424                 ;;
21425         (*)
21426                 DFT_LIB_SUFFIX='.a'
21427                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
21428                 ;;
21429         esac
21430         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21431         then
21432                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
21433                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
21434         fi
21435 echo "$as_me:21435: result: $DFT_DEP_SUFFIX" >&5
21436 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
21437
21438 echo "$as_me:21438: checking default object directory" >&5
21439 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
21440
21441         case $DFT_LWR_MODEL in
21442         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
21443         (normal)  DFT_OBJ_SUBDIR='objects' ;;
21444         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
21445         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
21446         (shared)
21447                 case $cf_cv_system_name in
21448                 (cygwin|msys)
21449                         DFT_OBJ_SUBDIR='objects' ;;
21450                 (*)
21451                         DFT_OBJ_SUBDIR='obj_s' ;;
21452                 esac
21453         esac
21454 echo "$as_me:21454: result: $DFT_OBJ_SUBDIR" >&5
21455 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
21456
21457 if test "x$cf_with_cxx" = xyes ; then
21458 echo "$as_me:21458: checking c++ library-dependency suffix" >&5
21459 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
21460 if test "$with_libtool" != "no"; then
21461         # libtool thinks it can make c++ shared libraries (perhaps only g++)
21462         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21463 elif test "$with_shared_cxx" != "no"; then
21464         # also for g++ users...
21465         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
21466 else
21467         # we normally make a static library because C/C++ library rules differ
21468
21469         case Xnormal in
21470         (Xlibtool)
21471                 CXX_LIB_SUFFIX='.la'
21472                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21473                 ;;
21474         (Xdebug)
21475                 CXX_LIB_SUFFIX='_g.a'
21476                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21477                 ;;
21478         (Xprofile)
21479                 CXX_LIB_SUFFIX='_p.a'
21480                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21481                 ;;
21482         (Xshared)
21483                 case $cf_cv_system_name in
21484                 (aix[5-7]*)
21485                         CXX_LIB_SUFFIX='.so'
21486                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21487                         ;;
21488                 (cygwin*|msys*|mingw*)
21489                         CXX_LIB_SUFFIX='.dll'
21490                         CXX_DEP_SUFFIX='.dll.a'
21491                         ;;
21492                 (darwin*)
21493                         CXX_LIB_SUFFIX='.dylib'
21494                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21495                         ;;
21496                 (hpux*)
21497                         case $target in
21498                         (ia64*)
21499                                 CXX_LIB_SUFFIX='.so'
21500                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21501                                 ;;
21502                         (*)
21503                                 CXX_LIB_SUFFIX='.sl'
21504                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21505                                 ;;
21506                         esac
21507                         ;;
21508                 (*)
21509                         CXX_LIB_SUFFIX='.so'
21510                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21511                         ;;
21512                 esac
21513                 ;;
21514         (*)
21515                 CXX_LIB_SUFFIX='.a'
21516                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21517                 ;;
21518         esac
21519         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
21520         then
21521                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
21522                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
21523         fi
21524
21525 fi
21526 echo "$as_me:21526: result: $CXX_LIB_SUFFIX" >&5
21527 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21528
21529 fi
21530
21531 # do not want -ldl in build except as needed for -lncurses dependency
21532 if test "x$with_dlsym" = xyes ; then
21533 if test $DFT_LWR_MODEL = shared || \
21534    test $DFT_LWR_MODEL = libtool ; then
21535
21536 # remove dl library from $LIBS
21537 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21538
21539 fi
21540 fi
21541 ### Set up low-level terminfo dependencies for makefiles.
21542
21543 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21544 # do not need libdl
21545 TICS_LIST=
21546 if test "x$with_dlsym" = xyes ; then
21547
21548 # remove dl library from $SHLIB_LIST
21549 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21550
21551 fi
21552
21553 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
21554 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
21555 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
21556 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
21557 then
21558         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
21559 fi
21560
21561 if test "$with_ticlib" != no ; then
21562
21563         if test "x$with_ticlib" != xyes ; then
21564                 TICS_NAME=$with_ticlib
21565                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21566                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21567                 TICS_LIB_SUFFIX="${with_ticlib}"
21568         else
21569                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
21570                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21571                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
21572         fi
21573         TICS_LDFLAGS="-L${LIB_DIR}"
21574         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21575 else
21576         TICS_LDFLAGS="-L${LIB_DIR}"
21577         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21578 fi
21579
21580 if test "$with_termlib" != no ; then
21581
21582         if test "x$with_termlib" != xyes ; then
21583                 TINFO_NAME=$with_termlib
21584                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
21585                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21586                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21587                 TINFO_LIB_SUFFIX="${with_termlib}"
21588         else
21589                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21590                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
21591                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21592                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
21593         fi
21594
21595         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21596         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21597         if test "$DFT_LWR_MODEL" = "libtool"; then
21598                 TEST_ARGS="${TEST_DEPS}"
21599                 TEST_ARG2="${TEST_DEP2}"
21600                 TINFO_LDFLAGS="-L${LIB_DIR}"
21601                 TINFO_LIBS="$TEST_ARGS"
21602                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21603                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21604         else
21605                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21606                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21607                 if test "x$with_term_driver" != xno ; then
21608                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21609                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
21610                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21611                 else
21612                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21613                         TINFO_LIBS="$TEST_ARGS"
21614                 fi
21615                 TINFO_LDFLAGS="-L${LIB_DIR}"
21616                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21617         fi
21618 else
21619         # the next lines are needed for linking libtic over libncurses
21620         TINFO_NAME=${LIB_NAME}
21621         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21622         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
21623         if test "x$with_tic_depends" = xyes ; then
21624                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
21625         else
21626                 TICS_LIST="$SHLIB_LIST"
21627         fi
21628
21629         TINFO_LDFLAGS="-L${LIB_DIR}"
21630         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
21631 fi
21632
21633 if test "$DFT_LWR_MODEL" = shared ; then
21634         case $cf_cv_system_name in
21635         (cygwin*|msys*)
21636                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21637                 TINFO_SUFFIX=.dll
21638                 ;;
21639         esac
21640 fi
21641
21642 if test "x$with_dlsym" = xyes ; then
21643
21644 # remove dl library from $TICS_LIST
21645 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21646
21647 fi
21648
21649 if test "$DFT_LWR_MODEL" = "libtool"; then
21650         OBJEXT=lo
21651 fi
21652
21653 # needed for Ada95
21654 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21655
21656 case $DFT_LWR_MODEL in
21657 (normal|debug|profile)
21658
21659 if test "$GCC" = yes ; then
21660         case $cf_cv_system_name in
21661         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
21662                 LDFLAGS_STATIC=
21663                 LDFLAGS_SHARED=
21664                 ;;
21665         (*)     # normally, except when broken
21666                 LDFLAGS_STATIC=-static
21667                 LDFLAGS_SHARED=-dynamic
21668                 ;;
21669         esac
21670 else
21671         case $cf_cv_system_name in
21672         (aix[4-7]*)     # from ld manpage
21673                 LDFLAGS_STATIC=-bstatic
21674                 LDFLAGS_SHARED=-bdynamic
21675                 ;;
21676         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
21677                 # We could also use just "archive" and "shared".
21678                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21679                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21680                 ;;
21681         (irix*)         # from ld manpage IRIX64
21682                 LDFLAGS_STATIC=-Bstatic
21683                 LDFLAGS_SHARED=-Bdynamic
21684                 ;;
21685         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
21686                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21687                 LDFLAGS_STATIC=-noso
21688                 LDFLAGS_SHARED=-so_archive
21689                 ;;
21690         (solaris2*)
21691                 LDFLAGS_STATIC=-Bstatic
21692                 LDFLAGS_SHARED=-Bdynamic
21693                 ;;
21694         esac
21695 fi
21696
21697 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21698 then
21699         echo "$as_me:21699: checking if linker supports switching between static/dynamic" >&5
21700 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21701
21702         rm -f libconftest.a
21703         cat >conftest.$ac_ext <<EOF
21704 #line 21704 "configure"
21705 #include <stdio.h>
21706 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21707 EOF
21708         if { (eval echo "$as_me:21708: \"$ac_compile\"") >&5
21709   (eval $ac_compile) 2>&5
21710   ac_status=$?
21711   echo "$as_me:21711: \$? = $ac_status" >&5
21712   (exit $ac_status); } ; then
21713                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21714                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21715         fi
21716         rm -f conftest.*
21717
21718         cf_save_LIBS="$LIBS"
21719
21720         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21721         cat >conftest.$ac_ext <<_ACEOF
21722 #line 21722 "configure"
21723 #include "confdefs.h"
21724
21725 #line 21725 "configure"
21726 #include <stdio.h>
21727 int cf_ldflags_static(FILE *fp);
21728
21729 int
21730 main ()
21731 {
21732
21733         return cf_ldflags_static(stdin);
21734
21735   ;
21736   return 0;
21737 }
21738 _ACEOF
21739 rm -f conftest.$ac_objext conftest$ac_exeext
21740 if { (eval echo "$as_me:21740: \"$ac_link\"") >&5
21741   (eval $ac_link) 2>&5
21742   ac_status=$?
21743   echo "$as_me:21743: \$? = $ac_status" >&5
21744   (exit $ac_status); } &&
21745          { ac_try='test -s conftest$ac_exeext'
21746   { (eval echo "$as_me:21746: \"$ac_try\"") >&5
21747   (eval $ac_try) 2>&5
21748   ac_status=$?
21749   echo "$as_me:21749: \$? = $ac_status" >&5
21750   (exit $ac_status); }; }; then
21751
21752         # some linkers simply ignore the -dynamic
21753         case x`file conftest$ac_exeext 2>/dev/null` in
21754         (*static*)
21755                 cf_ldflags_static=no
21756                 ;;
21757         (*)
21758                 cf_ldflags_static=yes
21759                 ;;
21760         esac
21761
21762 else
21763   echo "$as_me: failed program was:" >&5
21764 cat conftest.$ac_ext >&5
21765 cf_ldflags_static=no
21766 fi
21767 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21768
21769         rm -f libconftest.*
21770         LIBS="$cf_save_LIBS"
21771
21772         echo "$as_me:21772: result: $cf_ldflags_static" >&5
21773 echo "${ECHO_T}$cf_ldflags_static" >&6
21774
21775         if test $cf_ldflags_static != yes
21776         then
21777                 LDFLAGS_STATIC=
21778                 LDFLAGS_SHARED=
21779         fi
21780 else
21781         LDFLAGS_STATIC=
21782         LDFLAGS_SHARED=
21783 fi
21784
21785         ;;
21786 esac
21787
21788 echo "$as_me:21788: checking where we will install curses.h" >&5
21789 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21790
21791 includesubdir=
21792 if test "$with_overwrite" = no && \
21793  ( test "x$includedir" = 'x${prefix}/include' || \
21794    test "x$includedir" = "x${prefix}/include" )
21795 then
21796         includesubdir="/ncurses${USE_LIB_SUFFIX}"
21797 fi
21798 echo "$as_me:21798: result: ${includedir}${includesubdir}" >&5
21799 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21800
21801 ### Resolve a conflict between normal and wide-curses by forcing applications
21802 ### that will need libutf8 to add it to their configure script.
21803 if test "$with_overwrite" != no ; then
21804 if test "$NCURSES_LIBUTF8" = 1 ; then
21805         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21806         { echo "$as_me:21806: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21807 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21808 fi
21809 fi
21810 WITH_OVERWRITE=$with_overwrite
21811
21812 # used to separate tack out of the tree
21813 NCURSES_TREE=
21814
21815 ### predefined stuff for the test programs
21816
21817 cat >>confdefs.h <<\EOF
21818 #define HAVE_SLK_COLOR 1
21819 EOF
21820
21821 ### Construct the list of subdirectories for which we'll customize makefiles
21822 ### with the appropriate compile-rules.
21823
21824 echo "$as_me:21824: checking for src modules" >&5
21825 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21826
21827 # dependencies and linker-arguments for test-programs
21828 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21829 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21830 if test "$DFT_LWR_MODEL" = "libtool"; then
21831         TEST_ARGS="${TEST_DEPS}"
21832         TEST_ARG2="${TEST_DEP2}"
21833 else
21834         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
21835         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
21836 fi
21837
21838 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
21839 cf_cv_src_modules=
21840 for cf_dir in $modules_to_build
21841 do
21842         if test -f $srcdir/$cf_dir/modules; then
21843
21844                 # We may/may not have tack in the distribution, though the
21845                 # makefile is.
21846                 if test $cf_dir = tack ; then
21847                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21848                                 continue
21849                         fi
21850                 fi
21851
21852                 if test -z "$cf_cv_src_modules"; then
21853                         cf_cv_src_modules=$cf_dir
21854                 else
21855                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21856                 fi
21857
21858                 # Make the ncurses_cfg.h file record the library interface files as
21859                 # well.  These are header files that are the same name as their
21860                 # directory.  Ncurses is the only library that does not follow
21861                 # that pattern.
21862                 if test $cf_dir = tack ; then
21863                         continue
21864                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21865
21866 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21867
21868                         cat >>confdefs.h <<EOF
21869 #define HAVE_${cf_have_include}_H 1
21870 EOF
21871
21872                         cat >>confdefs.h <<EOF
21873 #define HAVE_LIB${cf_have_include} 1
21874 EOF
21875
21876                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21877                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21878                         if test "$DFT_LWR_MODEL" = "libtool"; then
21879                                 TEST_ARGS="${TEST_DEPS}"
21880                                 TEST_ARG2="${TEST_DEP2}"
21881                         else
21882                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
21883                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
21884                         fi
21885                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
21886                 fi
21887         fi
21888 done
21889 echo "$as_me:21889: result: $cf_cv_src_modules" >&5
21890 echo "${ECHO_T}$cf_cv_src_modules" >&6
21891
21892 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21893 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21894
21895 SRC_SUBDIRS=
21896 if test "x$cf_with_manpages" != xno ; then
21897         SRC_SUBDIRS="$SRC_SUBDIRS man"
21898 fi
21899 SRC_SUBDIRS="$SRC_SUBDIRS include"
21900 for cf_dir in $cf_cv_src_modules
21901 do
21902         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21903 done
21904 if test "x$cf_with_tests" != "xno" ; then
21905         SRC_SUBDIRS="$SRC_SUBDIRS test"
21906 fi
21907 # always make this, to install the ncurses-config script
21908 SRC_SUBDIRS="$SRC_SUBDIRS misc"
21909 if test "$cf_with_cxx_binding" != no; then
21910         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
21911         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21912 fi
21913
21914 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21915 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21916
21917 ADA_SUBDIRS=
21918 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21919         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21920         ADA_SUBDIRS="gen src"
21921         if test "x$cf_with_tests" != "xno" ; then
21922                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21923         fi
21924 fi
21925
21926 SUB_MAKEFILES=
21927 for cf_dir in $SRC_SUBDIRS
21928 do
21929         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21930 done
21931
21932 if test -n "$ADA_SUBDIRS"; then
21933         for cf_dir in $ADA_SUBDIRS
21934         do
21935                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21936         done
21937
21938 fi
21939
21940 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21941    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21942    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
21943 fi
21944
21945 DIRS_TO_MAKE="lib"
21946 for cf_item in $cf_list_models
21947 do
21948
21949         case $cf_item in
21950         (libtool) cf_subdir='obj_lo'  ;;
21951         (normal)  cf_subdir='objects' ;;
21952         (debug)   cf_subdir='obj_g' ;;
21953         (profile) cf_subdir='obj_p' ;;
21954         (shared)
21955                 case $cf_cv_system_name in
21956                 (cygwin|msys)
21957                         cf_subdir='objects' ;;
21958                 (*)
21959                         cf_subdir='obj_s' ;;
21960                 esac
21961         esac
21962
21963         for cf_item2 in $DIRS_TO_MAKE
21964         do
21965                 test $cf_item2 = $cf_subdir && break
21966         done
21967         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21968 done
21969 for cf_dir in $DIRS_TO_MAKE
21970 do
21971         test ! -d $cf_dir && mkdir $cf_dir
21972 done
21973
21974 # symbols that differ when compiling Ada95 by itself.
21975 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21976
21977 # values to use as strings
21978
21979 cat >>confdefs.h <<EOF
21980 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21981 EOF
21982
21983 cat >>confdefs.h <<EOF
21984 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21985 EOF
21986
21987 ### Now that we're done running tests, add the compiler-warnings, if any
21988
21989 cf_fix_cppflags=no
21990 cf_new_cflags=
21991 cf_new_cppflags=
21992 cf_new_extra_cppflags=
21993
21994 for cf_add_cflags in $EXTRA_CFLAGS
21995 do
21996 case $cf_fix_cppflags in
21997 (no)
21998         case $cf_add_cflags in
21999         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22000                 case $cf_add_cflags in
22001                 (-D*)
22002                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22003
22004                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22005                                 && test -z "${cf_tst_cflags}" \
22006                                 && cf_fix_cppflags=yes
22007
22008                         if test $cf_fix_cppflags = yes ; then
22009                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22010                                 continue
22011                         elif test "${cf_tst_cflags}" = "\"'" ; then
22012                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22013                                 continue
22014                         fi
22015                         ;;
22016                 esac
22017                 case "$CPPFLAGS" in
22018                 (*$cf_add_cflags)
22019                         ;;
22020                 (*)
22021                         case $cf_add_cflags in
22022                         (-D*)
22023                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22024
22025 CPPFLAGS=`echo "$CPPFLAGS" | \
22026         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
22027                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
22028
22029                                 ;;
22030                         esac
22031                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
22032                         ;;
22033                 esac
22034                 ;;
22035         (*)
22036                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
22037                 ;;
22038         esac
22039         ;;
22040 (yes)
22041         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
22042
22043         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
22044
22045         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22046                 && test -z "${cf_tst_cflags}" \
22047                 && cf_fix_cppflags=no
22048         ;;
22049 esac
22050 done
22051
22052 if test -n "$cf_new_cflags" ; then
22053
22054         CFLAGS="$CFLAGS $cf_new_cflags"
22055 fi
22056
22057 if test -n "$cf_new_cppflags" ; then
22058
22059         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
22060 fi
22061
22062 if test -n "$cf_new_extra_cppflags" ; then
22063
22064         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
22065 fi
22066
22067 ### Define substitutions for header files to avoid name-pollution
22068
22069 if test "x$cf_cv_have_tcgetattr" = xyes ; then
22070         HAVE_TCGETATTR=1
22071 else
22072         HAVE_TCGETATTR=0
22073 fi
22074
22075 if test "x$ac_cv_header_stdint_h" = xyes ; then
22076         HAVE_STDINT_H=1
22077 else
22078         HAVE_STDINT_H=0
22079 fi
22080
22081 if test "x$ac_cv_header_termio_h" = xyes ; then
22082         HAVE_TERMIO_H=1
22083 else
22084         HAVE_TERMIO_H=0
22085 fi
22086
22087 if test "x$ac_cv_header_termios_h" = xyes ; then
22088         HAVE_TERMIOS_H=1
22089 else
22090         HAVE_TERMIOS_H=0
22091 fi
22092
22093 ################################################################################
22094 test "x$use_database" = xyes && \
22095 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
22096
22097 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
22098 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
22099
22100 if test "x$enable_pc_files" = xyes ; then \
22101 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
22102 MAKE_PC_FILES=
22103 else
22104 MAKE_PC_FILES="#"
22105 fi
22106
22107 # Extract the first word of "tic", so it can be a program name with args.
22108 set dummy tic; ac_word=$2
22109 echo "$as_me:22109: checking for $ac_word" >&5
22110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22111 if test "${ac_cv_path_TIC_PATH+set}" = set; then
22112   echo $ECHO_N "(cached) $ECHO_C" >&6
22113 else
22114   case $TIC_PATH in
22115   [\\/]* | ?:[\\/]*)
22116   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
22117   ;;
22118   *)
22119   ac_save_IFS=$IFS; IFS=$ac_path_separator
22120 ac_dummy="$PATH:/usr/local/ncurses/bin"
22121 for ac_dir in $ac_dummy; do
22122   IFS=$ac_save_IFS
22123   test -z "$ac_dir" && ac_dir=.
22124   if $as_executable_p "$ac_dir/$ac_word"; then
22125    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
22126    echo "$as_me:22126: found $ac_dir/$ac_word" >&5
22127    break
22128 fi
22129 done
22130
22131   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
22132   ;;
22133 esac
22134 fi
22135 TIC_PATH=$ac_cv_path_TIC_PATH
22136
22137 if test -n "$TIC_PATH"; then
22138   echo "$as_me:22138: result: $TIC_PATH" >&5
22139 echo "${ECHO_T}$TIC_PATH" >&6
22140 else
22141   echo "$as_me:22141: result: no" >&5
22142 echo "${ECHO_T}no" >&6
22143 fi
22144
22145 if test -n "$FALLBACK_LIST"
22146 then
22147         if test "$TIC_PATH" = unknown
22148         then
22149                 { echo "$as_me:22149: WARNING: no tic program found for fallbacks" >&5
22150 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
22151         fi
22152 fi
22153
22154 if test "x$cf_with_tests" != xno ; then
22155         MAKE_TESTS=
22156 else
22157         MAKE_TESTS="#"
22158 fi
22159
22160 ADAHTML_DIR=../../doc/html/ada
22161
22162 # these could be configurable, but are not currently
22163 PANEL_NAME=panel
22164 MENU_NAME=menu
22165 FORM_NAME=form
22166 CXX_NAME=ncurses++
22167
22168 # workaround for g++ versus Solaris (20131116)
22169 case $cf_cv_system_name in
22170 (solaris2*)
22171         case "x$CPPFLAGS" in
22172         (*-D_XOPEN_SOURCE_EXTENDED*)
22173                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
22174
22175 echo "${as_me:-configure}:22175: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
22176
22177                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
22178                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
22179                 ;;
22180         esac
22181         ;;
22182 esac
22183
22184 # Help to automatically enable the extended curses features when using either
22185 # the *-config or the ".pc" files by adding defines.
22186 echo "$as_me:22186: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
22187 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
22188 PKG_CFLAGS=
22189 for cf_loop1 in $CPPFLAGS_after_XOPEN
22190 do
22191         cf_found=no
22192         for cf_loop2 in $CPPFLAGS_before_XOPEN
22193         do
22194                 if test "x$cf_loop1" = "x$cf_loop2"
22195                 then
22196                         cf_found=yes
22197                         break
22198                 fi
22199         done
22200         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
22201 done
22202 echo "$as_me:22202: result: $PKG_CFLAGS" >&5
22203 echo "${ECHO_T}$PKG_CFLAGS" >&6
22204
22205 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
22206 case "x$NCURSES_OSPEED" in
22207 (*short*)
22208         cf_compatible=1
22209         ;;
22210 (*)
22211         cf_compatible=0
22212         ;;
22213 esac
22214
22215 cat >>confdefs.h <<EOF
22216 #define NCURSES_OSPEED_COMPAT $cf_compatible
22217 EOF
22218
22219 case "x$cf_cv_typeof_chtype" in
22220 (xshort|xint|xlong)
22221         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
22222         ;;
22223 esac
22224
22225 case "x$cf_cv_typeof_mmask_t" in
22226 (xshort|xint|xlong)
22227         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
22228         ;;
22229 esac
22230
22231 # substitute into misc/Makefile to suppress
22232 # (un)install.data from the
22233 # (un)install rules.
22234 if test "x$cf_with_db_install" = "xno"; then
22235         MISC_INSTALL_DATA=
22236         MISC_UNINSTALL_DATA=
22237 else
22238         MISC_INSTALL_DATA=install.data
22239         MISC_UNINSTALL_DATA=uninstall.data
22240 fi
22241
22242 SUB_SCRIPTS=
22243
22244 if test -n "$PACKAGE"
22245 then
22246         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
22247         export PACKAGE
22248         echo "package: $PACKAGE"
22249 fi
22250
22251 UNALTERED_SYMS=
22252 cf_filter_syms=no
22253
22254 if test -n "$RESULTING_SYMS"
22255 then
22256         case $cf_cv_abi_version in
22257         ([6789])
22258                 test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
22259
22260 echo "${as_me:-configure}:22260: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
22261
22262                 cf_filter_syms=yes
22263                 ;;
22264         (*)
22265                 test -n "$verbose" && echo "    will map symbols to default ABI" 1>&6
22266
22267 echo "${as_me:-configure}:22267: testing will map symbols to default ABI ..." 1>&5
22268
22269                 ;;
22270         esac
22271 fi
22272
22273 if test "x$WILDCARD_SYMS" = xno
22274 then
22275         cf_filter_syms=yes
22276 fi
22277
22278 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
22279 if test $cf_filter_syms = yes
22280 then
22281         RESULTING_SYMS=resulting.map
22282 fi
22283
22284 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"
22285 ac_config_commands="$ac_config_commands default"
22286 cat >confcache <<\_ACEOF
22287 # This file is a shell script that caches the results of configure
22288 # tests run on this system so they can be shared between configure
22289 # scripts and configure runs, see configure's option --config-cache.
22290 # It is not useful on other systems.  If it contains results you don't
22291 # want to keep, you may remove or edit it.
22292 #
22293 # config.status only pays attention to the cache file if you give it
22294 # the --recheck option to rerun configure.
22295 #
22296 # `ac_cv_env_foo' variables (set or unset) will be overriden when
22297 # loading this file, other *unset* `ac_cv_foo' will be assigned the
22298 # following values.
22299
22300 _ACEOF
22301
22302 # The following way of writing the cache mishandles newlines in values,
22303 # but we know of no workaround that is simple, portable, and efficient.
22304 # So, don't put newlines in cache variables' values.
22305 # Ultrix sh set writes to stderr and can't be redirected directly,
22306 # and sets the high bit in the cache file unless we assign to the vars.
22307 {
22308   (set) 2>&1 |
22309     case `(ac_space=' '; set | grep ac_space) 2>&1` in
22310     *ac_space=\ *)
22311       # `set' does not quote correctly, so add quotes (double-quote
22312       # substitution turns \\\\ into \\, and sed turns \\ into \).
22313       sed -n \
22314         "s/'/'\\\\''/g;
22315           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22316       ;;
22317     *)
22318       # `set' quotes correctly as required by POSIX, so do not add quotes.
22319       sed -n \
22320         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22321       ;;
22322     esac;
22323 } |
22324   sed '
22325      t clear
22326      : clear
22327      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22328      t end
22329      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22330      : end' >>confcache
22331 if cmp -s $cache_file confcache; then :; else
22332   if test -w $cache_file; then
22333     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22334     cat confcache >$cache_file
22335   else
22336     echo "not updating unwritable cache $cache_file"
22337   fi
22338 fi
22339 rm -f confcache
22340
22341 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22342 # Let make expand exec_prefix.
22343 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22344
22345 # VPATH may cause trouble with some makes, so we remove $(srcdir),
22346 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22347 # trailing colons and then remove the whole line if VPATH becomes empty
22348 # (actually we leave an empty line to preserve line numbers).
22349 if test "x$srcdir" = x.; then
22350   ac_vpsub='/^[         ]*VPATH[        ]*=/{
22351 s/:*\$(srcdir):*/:/;
22352 s/:*\${srcdir}:*/:/;
22353 s/:*@srcdir@:*/:/;
22354 s/^\([^=]*=[    ]*\):*/\1/;
22355 s/:*$//;
22356 s/^[^=]*=[      ]*$//;
22357 }'
22358 fi
22359
22360 DEFS=-DHAVE_CONFIG_H
22361
22362 : ${CONFIG_STATUS=./config.status}
22363 ac_clean_files_save=$ac_clean_files
22364 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22365 { echo "$as_me:22365: creating $CONFIG_STATUS" >&5
22366 echo "$as_me: creating $CONFIG_STATUS" >&6;}
22367 cat >$CONFIG_STATUS <<_ACEOF
22368 #! $SHELL
22369 # Generated automatically by configure.
22370 # Run this file to recreate the current configuration.
22371 # Compiler output produced by configure, useful for debugging
22372 # configure, is in config.log if it exists.
22373
22374 debug=false
22375 SHELL=\${CONFIG_SHELL-$SHELL}
22376 ac_cs_invocation="\$0 \$@"
22377
22378 _ACEOF
22379
22380 cat >>$CONFIG_STATUS <<\_ACEOF
22381 # Be Bourne compatible
22382 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22383   emulate sh
22384   NULLCMD=:
22385 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22386   set -o posix
22387 fi
22388
22389 # Name of the executable.
22390 as_me=`echo "$0" |sed 's,.*[\\/],,'`
22391
22392 if expr a : '\(a\)' >/dev/null 2>&1; then
22393   as_expr=expr
22394 else
22395   as_expr=false
22396 fi
22397
22398 rm -f conf$$ conf$$.exe conf$$.file
22399 echo >conf$$.file
22400 if ln -s conf$$.file conf$$ 2>/dev/null; then
22401   # We could just check for DJGPP; but this test a) works b) is more generic
22402   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22403   if test -f conf$$.exe; then
22404     # Don't use ln at all; we don't have any links
22405     as_ln_s='cp -p'
22406   else
22407     as_ln_s='ln -s'
22408   fi
22409 elif ln conf$$.file conf$$ 2>/dev/null; then
22410   as_ln_s=ln
22411 else
22412   as_ln_s='cp -p'
22413 fi
22414 rm -f conf$$ conf$$.exe conf$$.file
22415
22416 as_executable_p="test -f"
22417
22418 # Support unset when possible.
22419 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22420   as_unset=unset
22421 else
22422   as_unset=false
22423 fi
22424
22425 # NLS nuisances.
22426 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22427 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22428 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22429 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22430 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22431 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22432 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22433 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22434
22435 # IFS
22436 # We need space, tab and new line, in precisely that order.
22437 as_nl='
22438 '
22439 IFS="   $as_nl"
22440
22441 # CDPATH.
22442 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22443
22444 exec 6>&1
22445
22446 _ACEOF
22447
22448 # Files that config.status was made for.
22449 if test -n "$ac_config_files"; then
22450   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22451 fi
22452
22453 if test -n "$ac_config_headers"; then
22454   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22455 fi
22456
22457 if test -n "$ac_config_links"; then
22458   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22459 fi
22460
22461 if test -n "$ac_config_commands"; then
22462   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22463 fi
22464
22465 cat >>$CONFIG_STATUS <<\EOF
22466
22467 ac_cs_usage="\
22468 \`$as_me' instantiates files from templates according to the
22469 current configuration.
22470
22471 Usage: $0 [OPTIONS] [FILE]...
22472
22473   -h, --help       print this help, then exit
22474   -V, --version    print version number, then exit
22475   -d, --debug      don't remove temporary files
22476       --recheck    update $as_me by reconfiguring in the same conditions
22477   --file=FILE[:TEMPLATE]
22478                    instantiate the configuration file FILE
22479   --header=FILE[:TEMPLATE]
22480                    instantiate the configuration header FILE
22481
22482 Configuration files:
22483 $config_files
22484
22485 Configuration headers:
22486 $config_headers
22487
22488 Configuration commands:
22489 $config_commands
22490
22491 Report bugs to <dickey@invisible-island.net>."
22492 EOF
22493
22494 cat >>$CONFIG_STATUS <<EOF
22495 ac_cs_version="\\
22496 config.status
22497 configured by $0, generated by GNU Autoconf 2.52.20141204,
22498   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22499
22500 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22501 Free Software Foundation, Inc.
22502 This config.status script is free software; the Free Software Foundation
22503 gives unlimited permission to copy, distribute and modify it."
22504 srcdir=$srcdir
22505 INSTALL="$INSTALL"
22506 EOF
22507
22508 cat >>$CONFIG_STATUS <<\EOF
22509 # If no file are specified by the user, then we need to provide default
22510 # value.  By we need to know if files were specified by the user.
22511 ac_need_defaults=:
22512 while test $# != 0
22513 do
22514   case $1 in
22515   --*=*)
22516     ac_option=`expr "x$1" : 'x\([^=]*\)='`
22517     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22518     shift
22519     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22520     shift
22521     ;;
22522   -*);;
22523   *) # This is not an option, so the user has probably given explicit
22524      # arguments.
22525      ac_need_defaults=false;;
22526   esac
22527
22528   case $1 in
22529   # Handling of the options.
22530 EOF
22531 cat >>$CONFIG_STATUS <<EOF
22532   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22533     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22534     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22535 EOF
22536 cat >>$CONFIG_STATUS <<\EOF
22537   --version | --vers* | -V )
22538     echo "$ac_cs_version"; exit 0 ;;
22539   --he | --h)
22540     # Conflict between --help and --header
22541     { { echo "$as_me:22541: error: ambiguous option: $1
22542 Try \`$0 --help' for more information." >&5
22543 echo "$as_me: error: ambiguous option: $1
22544 Try \`$0 --help' for more information." >&2;}
22545    { (exit 1); exit 1; }; };;
22546   --help | --hel | -h )
22547     echo "$ac_cs_usage"; exit 0 ;;
22548   --debug | --d* | -d )
22549     debug=: ;;
22550   --file | --fil | --fi | --f )
22551     shift
22552     CONFIG_FILES="$CONFIG_FILES $1"
22553     ac_need_defaults=false;;
22554   --header | --heade | --head | --hea )
22555     shift
22556     CONFIG_HEADERS="$CONFIG_HEADERS $1"
22557     ac_need_defaults=false;;
22558
22559   # This is an error.
22560   -*) { { echo "$as_me:22560: error: unrecognized option: $1
22561 Try \`$0 --help' for more information." >&5
22562 echo "$as_me: error: unrecognized option: $1
22563 Try \`$0 --help' for more information." >&2;}
22564    { (exit 1); exit 1; }; } ;;
22565
22566   *) ac_config_targets="$ac_config_targets $1" ;;
22567
22568   esac
22569   shift
22570 done
22571
22572 exec 5>>config.log
22573 cat >&5 << _ACEOF
22574
22575 ## ----------------------- ##
22576 ## Running config.status.  ##
22577 ## ----------------------- ##
22578
22579 This file was extended by $as_me 2.52.20141204, executed with
22580   CONFIG_FILES    = $CONFIG_FILES
22581   CONFIG_HEADERS  = $CONFIG_HEADERS
22582   CONFIG_LINKS    = $CONFIG_LINKS
22583   CONFIG_COMMANDS = $CONFIG_COMMANDS
22584   > $ac_cs_invocation
22585 on `(hostname || uname -n) 2>/dev/null | sed 1q`
22586
22587 _ACEOF
22588 EOF
22589
22590 cat >>$CONFIG_STATUS <<EOF
22591 #
22592 # INIT-COMMANDS section.
22593 #
22594
22595 ### Special initialization commands, used to pass information from the
22596 ### configuration-run into config.status
22597
22598 AWK="$AWK"
22599 ALTERNATE_SYMS="$ALTERNATE_SYMS"
22600 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22601 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22602 ECHO_LD="$ECHO_LD"
22603 EXTRA_SUFFIX="$EXTRA_SUFFIX"
22604 LDCONFIG="$LDCONFIG"
22605 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22606 LIB_NAME="$LIB_NAME"
22607 LIB_PREFIX="$LIB_PREFIX"
22608 LIB_SUBSETS="$LIB_SUBSETS"
22609 LIB_SUFFIX="$LIB_SUFFIX"
22610 LIB_TRACING="$LIB_TRACING"
22611 LN_S="$LN_S"
22612 MAKE_TERMINFO="$MAKE_TERMINFO"
22613 NCURSES_MAJOR="$NCURSES_MAJOR"
22614 NCURSES_MINOR="$NCURSES_MINOR"
22615 NCURSES_OSPEED="$NCURSES_OSPEED"
22616 NCURSES_PATCH="$NCURSES_PATCH"
22617 SRC_SUBDIRS="$SRC_SUBDIRS"
22618 TERMINFO="$TERMINFO"
22619 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22620 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22621 TICS_NAME="$TICS_NAME"
22622 TIC_PATH="$TIC_PATH"
22623 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22624 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22625 TINFO_NAME="$TINFO_NAME"
22626 TINFO_SUFFIX="$TINFO_SUFFIX"
22627 UNALTERED_SYMS="$UNALTERED_SYMS"
22628 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
22629 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
22630 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
22631 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22632 WILDCARD_SYMS="$WILDCARD_SYMS"
22633 WITH_CURSES_H="$with_curses_h"
22634 WITH_ECHO="${enable_echo:=yes}"
22635 WITH_OVERWRITE="$with_overwrite"
22636 cf_LIST_MODELS="$cf_list_models"
22637 cf_cv_abi_version="$cf_cv_abi_version"
22638 cf_cv_do_relink="$cf_cv_do_relink"
22639 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22640 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22641 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22642 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22643 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22644 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22645 cf_cv_rel_version="$cf_cv_rel_version"
22646 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22647 cf_cv_shared_soname='$cf_cv_shared_soname'
22648 cf_cv_shlib_version="$cf_cv_shlib_version"
22649 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22650 cf_cv_system_name="$cf_cv_system_name"
22651 cf_cv_term_driver="$with_term_driver"
22652 cf_with_ada="$cf_with_ada"
22653 cf_with_cxx_binding="$cf_with_cxx_binding"
22654 cf_with_db_install="$cf_with_db_install"
22655 cf_with_manpages="$cf_with_manpages"
22656 cf_with_tests="$cf_with_tests"
22657 host="$host"
22658 target="$target"
22659 with_shared_cxx="$with_shared_cxx"
22660
22661 EOF
22662
22663 cat >>$CONFIG_STATUS <<\EOF
22664 for ac_config_target in $ac_config_targets
22665 do
22666   case "$ac_config_target" in
22667   # Handling of arguments.
22668   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22669   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22670   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22671   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22672   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22673   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22674   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22675   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22676   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22677   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22678   *) { { echo "$as_me:22678: error: invalid argument: $ac_config_target" >&5
22679 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22680    { (exit 1); exit 1; }; };;
22681   esac
22682 done
22683
22684 # If the user did not use the arguments to specify the items to instantiate,
22685 # then the envvar interface is used.  Set only those that are not.
22686 # We use the long form for the default assignment because of an extremely
22687 # bizarre bug on SunOS 4.1.3.
22688 if $ac_need_defaults; then
22689   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22690   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22691   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22692 fi
22693
22694 # Create a temporary directory, and hook for its removal unless debugging.
22695 $debug ||
22696 {
22697   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22698   trap '{ (exit 1); exit 1; }' 1 2 13 15
22699 }
22700
22701 # Create a (secure) tmp directory for tmp files.
22702 : ${TMPDIR=/tmp}
22703 {
22704   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22705   test -n "$tmp" && test -d "$tmp"
22706 }  ||
22707 {
22708   tmp=$TMPDIR/cs$$-$RANDOM
22709   (umask 077 && mkdir $tmp)
22710 } ||
22711 {
22712    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22713    { (exit 1); exit 1; }
22714 }
22715
22716 EOF
22717
22718 cat >>$CONFIG_STATUS <<EOF
22719
22720 #
22721 # CONFIG_FILES section.
22722 #
22723
22724 # No need to generate the scripts if there are no CONFIG_FILES.
22725 # This happens for instance when ./config.status config.h
22726 if test -n "\$CONFIG_FILES"; then
22727   # Protect against being on the right side of a sed subst in config.status.
22728   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22729    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22730 s,@SHELL@,$SHELL,;t t
22731 s,@exec_prefix@,$exec_prefix,;t t
22732 s,@prefix@,$prefix,;t t
22733 s,@program_transform_name@,$program_transform_name,;t t
22734 s,@bindir@,$bindir,;t t
22735 s,@sbindir@,$sbindir,;t t
22736 s,@libexecdir@,$libexecdir,;t t
22737 s,@datarootdir@,$datarootdir,;t t
22738 s,@datadir@,$datadir,;t t
22739 s,@sysconfdir@,$sysconfdir,;t t
22740 s,@sharedstatedir@,$sharedstatedir,;t t
22741 s,@localstatedir@,$localstatedir,;t t
22742 s,@libdir@,$libdir,;t t
22743 s,@includedir@,$includedir,;t t
22744 s,@oldincludedir@,$oldincludedir,;t t
22745 s,@infodir@,$infodir,;t t
22746 s,@mandir@,$mandir,;t t
22747 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22748 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22749 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22750 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22751 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22752 s,@build_alias@,$build_alias,;t t
22753 s,@host_alias@,$host_alias,;t t
22754 s,@target_alias@,$target_alias,;t t
22755 s,@ECHO_C@,$ECHO_C,;t t
22756 s,@ECHO_N@,$ECHO_N,;t t
22757 s,@ECHO_T@,$ECHO_T,;t t
22758 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22759 s,@DEFS@,$DEFS,;t t
22760 s,@LIBS@,$LIBS,;t t
22761 s,@top_builddir@,$top_builddir,;t t
22762 s,@EGREP@,$EGREP,;t t
22763 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22764 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22765 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22766 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22767 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22768 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22769 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22770 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22771 s,@VERSION@,$VERSION,;t t
22772 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
22773 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
22774 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
22775 s,@PACKAGE@,$PACKAGE,;t t
22776 s,@build@,$build,;t t
22777 s,@build_cpu@,$build_cpu,;t t
22778 s,@build_vendor@,$build_vendor,;t t
22779 s,@build_os@,$build_os,;t t
22780 s,@host@,$host,;t t
22781 s,@host_cpu@,$host_cpu,;t t
22782 s,@host_vendor@,$host_vendor,;t t
22783 s,@host_os@,$host_os,;t t
22784 s,@target@,$target,;t t
22785 s,@target_cpu@,$target_cpu,;t t
22786 s,@target_vendor@,$target_vendor,;t t
22787 s,@target_os@,$target_os,;t t
22788 s,@CC@,$CC,;t t
22789 s,@CFLAGS@,$CFLAGS,;t t
22790 s,@LDFLAGS@,$LDFLAGS,;t t
22791 s,@CPPFLAGS@,$CPPFLAGS,;t t
22792 s,@ac_ct_CC@,$ac_ct_CC,;t t
22793 s,@EXEEXT@,$EXEEXT,;t t
22794 s,@OBJEXT@,$OBJEXT,;t t
22795 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22796 s,@CPP@,$CPP,;t t
22797 s,@LDCONFIG@,$LDCONFIG,;t t
22798 s,@CXX@,$CXX,;t t
22799 s,@CXXFLAGS@,$CXXFLAGS,;t t
22800 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22801 s,@AWK@,$AWK,;t t
22802 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22803 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22804 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22805 s,@LINT@,$LINT,;t t
22806 s,@LINT_OPTS@,$LINT_OPTS,;t t
22807 s,@LN_S@,$LN_S,;t t
22808 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22809 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22810 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22811 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22812 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
22813 s,@SET_MAKE@,$SET_MAKE,;t t
22814 s,@CTAGS@,$CTAGS,;t t
22815 s,@ETAGS@,$ETAGS,;t t
22816 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22817 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22818 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22819 s,@RANLIB@,$RANLIB,;t t
22820 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22821 s,@LD@,$LD,;t t
22822 s,@ac_ct_LD@,$ac_ct_LD,;t t
22823 s,@AR@,$AR,;t t
22824 s,@ac_ct_AR@,$ac_ct_AR,;t t
22825 s,@NM@,$NM,;t t
22826 s,@ac_ct_NM@,$ac_ct_NM,;t t
22827 s,@ARFLAGS@,$ARFLAGS,;t t
22828 s,@DESTDIR@,$DESTDIR,;t t
22829 s,@BUILD_CC@,$BUILD_CC,;t t
22830 s,@BUILD_CPP@,$BUILD_CPP,;t t
22831 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22832 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22833 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22834 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22835 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22836 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22837 s,@cf_list_models@,$cf_list_models,;t t
22838 s,@ABI_VERSION@,$ABI_VERSION,;t t
22839 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22840 s,@LIBTOOL@,$LIBTOOL,;t t
22841 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22842 s,@LT_UNDEF@,$LT_UNDEF,;t t
22843 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22844 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22845 s,@LIB_CREATE@,$LIB_CREATE,;t t
22846 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22847 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22848 s,@LIB_PREP@,$LIB_PREP,;t t
22849 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22850 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22851 s,@LIB_LINK@,$LIB_LINK,;t t
22852 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22853 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22854 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22855 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22856 s,@TICS_NAME@,$TICS_NAME,;t t
22857 s,@TINFO_NAME@,$TINFO_NAME,;t t
22858 s,@LIB_NAME@,$LIB_NAME,;t t
22859 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22860 s,@CC_G_OPT@,$CC_G_OPT,;t t
22861 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22862 s,@LD_MODEL@,$LD_MODEL,;t t
22863 s,@shlibdir@,$shlibdir,;t t
22864 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22865 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22866 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22867 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22868 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22869 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22870 s,@LINK_PROGS@,$LINK_PROGS,;t t
22871 s,@LINK_TESTS@,$LINK_TESTS,;t t
22872 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22873 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22874 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22875 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22876 s,@RPATH_LIST@,$RPATH_LIST,;t t
22877 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
22878 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
22879 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
22880 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
22881 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22882 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
22883 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22884 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22885 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22886 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22887 s,@XTERM_KBS@,$XTERM_KBS,;t t
22888 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22889 s,@TERMINFO@,$TERMINFO,;t t
22890 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22891 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22892 s,@TERMPATH@,$TERMPATH,;t t
22893 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22894 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22895 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22896 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22897 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22898 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22899 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22900 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22901 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22902 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22903 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22904 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22905 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22906 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22907 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22908 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22909 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22910 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22911 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22912 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22913 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22914 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22915 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22916 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22917 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22918 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22919 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22920 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22921 s,@PTHREAD@,$PTHREAD,;t t
22922 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22923 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22924 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22925 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22926 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22927 s,@ECHO_LT@,$ECHO_LT,;t t
22928 s,@ECHO_LD@,$ECHO_LD,;t t
22929 s,@RULE_CC@,$RULE_CC,;t t
22930 s,@SHOW_CC@,$SHOW_CC,;t t
22931 s,@ECHO_CC@,$ECHO_CC,;t t
22932 s,@ECHO_LINK@,$ECHO_LINK,;t t
22933 s,@ADAFLAGS@,$ADAFLAGS,;t t
22934 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22935 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22936 s,@ADA_TRACE@,$ADA_TRACE,;t t
22937 s,@MATH_LIB@,$MATH_LIB,;t t
22938 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22939 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22940 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22941 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22942 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22943 s,@TEST_LIBS@,$TEST_LIBS,;t t
22944 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22945 s,@CXXCPP@,$CXXCPP,;t t
22946 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22947 s,@CXX_AR@,$CXX_AR,;t t
22948 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22949 s,@CXXLIBS@,$CXXLIBS,;t t
22950 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22951 s,@gnat_exists@,$gnat_exists,;t t
22952 s,@M4_exists@,$M4_exists,;t t
22953 s,@cf_ada_make@,$cf_ada_make,;t t
22954 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
22955 s,@cf_compile_generics@,$cf_compile_generics,;t t
22956 s,@cf_generic_objects@,$cf_generic_objects,;t t
22957 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22958 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22959 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22960 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22961 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22962 s,@cf_ada_package@,$cf_ada_package,;t t
22963 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22964 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22965 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22966 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22967 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22968 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22969 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22970 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22971 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22972 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
22973 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
22974 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
22975 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22976 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22977 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22978 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22979 s,@TICS_LIBS@,$TICS_LIBS,;t t
22980 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22981 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22982 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22983 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22984 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22985 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22986 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22987 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22988 s,@includesubdir@,$includesubdir,;t t
22989 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22990 s,@TICS_LIST@,$TICS_LIST,;t t
22991 s,@TINFO_LIST@,$TINFO_LIST,;t t
22992 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22993 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22994 s,@TEST_ARGS@,$TEST_ARGS,;t t
22995 s,@TEST_DEPS@,$TEST_DEPS,;t t
22996 s,@TEST_ARG2@,$TEST_ARG2,;t t
22997 s,@TEST_DEP2@,$TEST_DEP2,;t t
22998 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22999 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
23000 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
23001 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
23002 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
23003 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
23004 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
23005 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
23006 s,@cross_compiling@,$cross_compiling,;t t
23007 s,@TIC_PATH@,$TIC_PATH,;t t
23008 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
23009 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
23010 s,@PANEL_NAME@,$PANEL_NAME,;t t
23011 s,@MENU_NAME@,$MENU_NAME,;t t
23012 s,@FORM_NAME@,$FORM_NAME,;t t
23013 s,@CXX_NAME@,$CXX_NAME,;t t
23014 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
23015 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
23016 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
23017 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
23018 CEOF
23019
23020 EOF
23021
23022   cat >>$CONFIG_STATUS <<\EOF
23023   # Split the substitutions into bite-sized pieces for seds with
23024   # small command number limits, like on Digital OSF/1 and HP-UX.
23025   ac_max_sed_lines=48
23026   ac_sed_frag=1 # Number of current file.
23027   ac_beg=1 # First line for current file.
23028   ac_end=$ac_max_sed_lines # Line after last line for current file.
23029   ac_more_lines=:
23030   ac_sed_cmds=
23031   while $ac_more_lines; do
23032     if test $ac_beg -gt 1; then
23033       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23034     else
23035       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23036     fi
23037     if test ! -s $tmp/subs.frag; then
23038       ac_more_lines=false
23039     else
23040       # The purpose of the label and of the branching condition is to
23041       # speed up the sed processing (if there are no `@' at all, there
23042       # is no need to browse any of the substitutions).
23043       # These are the two extra sed commands mentioned above.
23044       (echo ':t
23045   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23046       if test -z "$ac_sed_cmds"; then
23047         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23048       else
23049         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23050       fi
23051       ac_sed_frag=`expr $ac_sed_frag + 1`
23052       ac_beg=$ac_end
23053       ac_end=`expr $ac_end + $ac_max_sed_lines`
23054     fi
23055   done
23056   if test -z "$ac_sed_cmds"; then
23057     ac_sed_cmds=cat
23058   fi
23059 fi # test -n "$CONFIG_FILES"
23060
23061 EOF
23062 cat >>$CONFIG_STATUS <<\EOF
23063 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23064   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23065   case $ac_file in
23066   - | *:- | *:-:* ) # input from stdin
23067         cat >$tmp/stdin
23068         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23069         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23070   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23071         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23072   * )   ac_file_in=$ac_file.in ;;
23073   esac
23074
23075   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23076   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23077          X"$ac_file" : 'X\(//\)[^/]' \| \
23078          X"$ac_file" : 'X\(//\)$' \| \
23079          X"$ac_file" : 'X\(/\)' \| \
23080          .     : '\(.\)' 2>/dev/null ||
23081 echo X"$ac_file" |
23082     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23083           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23084           /^X\(\/\/\)$/{ s//\1/; q; }
23085           /^X\(\/\).*/{ s//\1/; q; }
23086           s/.*/./; q'`
23087   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23088     { case "$ac_dir" in
23089   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23090   *)                      as_incr_dir=.;;
23091 esac
23092 as_dummy="$ac_dir"
23093 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23094   case $as_mkdir_dir in
23095     # Skip DOS drivespec
23096     ?:) as_incr_dir=$as_mkdir_dir ;;
23097     *)
23098       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23099       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23100     ;;
23101   esac
23102 done; }
23103
23104     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
23105     # A "../" for each directory in $ac_dir_suffix.
23106     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
23107   else
23108     ac_dir_suffix= ac_dots=
23109   fi
23110
23111   case $srcdir in
23112   .)  ac_srcdir=.
23113       if test -z "$ac_dots"; then
23114          ac_top_srcdir=.
23115       else
23116          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
23117       fi ;;
23118   [\\/]* | ?:[\\/]* )
23119       ac_srcdir=$srcdir$ac_dir_suffix;
23120       ac_top_srcdir=$srcdir ;;
23121   *) # Relative path.
23122     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
23123     ac_top_srcdir=$ac_dots$srcdir ;;
23124   esac
23125
23126   case $INSTALL in
23127   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
23128   *) ac_INSTALL=$ac_dots$INSTALL ;;
23129   esac
23130
23131   if test x"$ac_file" != x-; then
23132     { echo "$as_me:23132: creating $ac_file" >&5
23133 echo "$as_me: creating $ac_file" >&6;}
23134     rm -f "$ac_file"
23135   fi
23136   # Let's still pretend it is `configure' which instantiates (i.e., don't
23137   # use $as_me), people would be surprised to read:
23138   #    /* config.h.  Generated automatically by config.status.  */
23139   configure_input="Generated automatically from `echo $ac_file_in |
23140                                                  sed 's,.*/,,'` by configure."
23141
23142   # First look for the input files in the build tree, otherwise in the
23143   # src tree.
23144   ac_file_inputs=`IFS=:
23145     for f in $ac_file_in; do
23146       case $f in
23147       -) echo $tmp/stdin ;;
23148       [\\/$]*)
23149          # Absolute (can't be DOS-style, as IFS=:)
23150          test -f "$f" || { { echo "$as_me:23150: error: cannot find input file: $f" >&5
23151 echo "$as_me: error: cannot find input file: $f" >&2;}
23152    { (exit 1); exit 1; }; }
23153          echo $f;;
23154       *) # Relative
23155          if test -f "$f"; then
23156            # Build tree
23157            echo $f
23158          elif test -f "$srcdir/$f"; then
23159            # Source tree
23160            echo $srcdir/$f
23161          else
23162            # /dev/null tree
23163            { { echo "$as_me:23163: error: cannot find input file: $f" >&5
23164 echo "$as_me: error: cannot find input file: $f" >&2;}
23165    { (exit 1); exit 1; }; }
23166          fi;;
23167       esac
23168     done` || { (exit 1); exit 1; }
23169 EOF
23170 cat >>$CONFIG_STATUS <<\EOF
23171   ac_warn_datarootdir=no
23172   if test x"$ac_file" != x-; then
23173     for ac_item in $ac_file_inputs
23174     do
23175       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
23176       if test -n "$ac_seen"; then
23177         ac_used=`grep '@datarootdir@' $ac_item`
23178         if test -z "$ac_used"; then
23179           { echo "$as_me:23179: WARNING: datarootdir was used implicitly but not set:
23180 $ac_seen" >&5
23181 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
23182 $ac_seen" >&2;}
23183           ac_warn_datarootdir=yes
23184         fi
23185       fi
23186       ac_seen=`grep '${datarootdir}' $ac_item`
23187       if test -n "$ac_seen"; then
23188         { echo "$as_me:23188: WARNING: datarootdir was used explicitly but not set:
23189 $ac_seen" >&5
23190 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
23191 $ac_seen" >&2;}
23192         ac_warn_datarootdir=yes
23193       fi
23194     done
23195   fi
23196
23197 if test "x$ac_warn_datarootdir" = xyes; then
23198   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
23199 fi
23200
23201 EOF
23202 cat >>$CONFIG_STATUS <<EOF
23203   sed "$ac_vpsub
23204 $extrasub
23205 EOF
23206 cat >>$CONFIG_STATUS <<\EOF
23207 :t
23208 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23209 s,@configure_input@,$configure_input,;t t
23210 s,@srcdir@,$ac_srcdir,;t t
23211 s,@top_srcdir@,$ac_top_srcdir,;t t
23212 s,@INSTALL@,$ac_INSTALL,;t t
23213 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23214   rm -f $tmp/stdin
23215   if test x"$ac_file" != x-; then
23216     cp $tmp/out $ac_file
23217
23218     for ac_name in prefix exec_prefix datarootdir
23219     do
23220         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
23221         if test -n "$ac_seen"; then
23222             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
23223             if test -z "$ac_init"; then
23224               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
23225               { echo "$as_me:23225: WARNING: Variable $ac_name is used but was not set:
23226 $ac_seen" >&5
23227 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
23228 $ac_seen" >&2;}
23229             fi
23230         fi
23231     done
23232     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
23233     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
23234     if test -s $tmp/out; then
23235       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
23236       { echo "$as_me:23236: WARNING: Some variables may not be substituted:
23237 $ac_seen" >&5
23238 echo "$as_me: WARNING: Some variables may not be substituted:
23239 $ac_seen" >&2;}
23240     fi
23241   else
23242     cat $tmp/out
23243   fi
23244   rm -f $tmp/out
23245
23246 done
23247 EOF
23248 cat >>$CONFIG_STATUS <<\EOF
23249
23250 #
23251 # CONFIG_HEADER section.
23252 #
23253
23254 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23255 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23256 #
23257 # ac_d sets the value in "#define NAME VALUE" lines.
23258 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23259 ac_dB='[        ].*$,\1#\2'
23260 ac_dC=' '
23261 ac_dD=',;t'
23262 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23263 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23264 ac_iB='\([      ]\),\1#\2define\3'
23265 ac_iC=' '
23266 ac_iD='\4,;t'
23267 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23268 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23269 ac_uB='$,\1#\2define\3'
23270 ac_uC=' '
23271 ac_uD=',;t'
23272
23273 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23274   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23275   case $ac_file in
23276   - | *:- | *:-:* ) # input from stdin
23277         cat >$tmp/stdin
23278         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23279         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23280   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23281         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23282   * )   ac_file_in=$ac_file.in ;;
23283   esac
23284
23285   test x"$ac_file" != x- && { echo "$as_me:23285: creating $ac_file" >&5
23286 echo "$as_me: creating $ac_file" >&6;}
23287
23288   # First look for the input files in the build tree, otherwise in the
23289   # src tree.
23290   ac_file_inputs=`IFS=:
23291     for f in $ac_file_in; do
23292       case $f in
23293       -) echo $tmp/stdin ;;
23294       [\\/$]*)
23295          # Absolute (can't be DOS-style, as IFS=:)
23296          test -f "$f" || { { echo "$as_me:23296: error: cannot find input file: $f" >&5
23297 echo "$as_me: error: cannot find input file: $f" >&2;}
23298    { (exit 1); exit 1; }; }
23299          echo $f;;
23300       *) # Relative
23301          if test -f "$f"; then
23302            # Build tree
23303            echo $f
23304          elif test -f "$srcdir/$f"; then
23305            # Source tree
23306            echo $srcdir/$f
23307          else
23308            # /dev/null tree
23309            { { echo "$as_me:23309: error: cannot find input file: $f" >&5
23310 echo "$as_me: error: cannot find input file: $f" >&2;}
23311    { (exit 1); exit 1; }; }
23312          fi;;
23313       esac
23314     done` || { (exit 1); exit 1; }
23315   # Remove the trailing spaces.
23316   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
23317
23318 EOF
23319
23320 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
23321 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
23322 # be either 'cat' or 'sort'.
23323 cat confdefs.h | uniq >conftest.vals
23324
23325 # Break up conftest.vals because some shells have a limit on
23326 # the size of here documents, and old seds have small limits too.
23327
23328 rm -f conftest.tail
23329 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
23330 while grep . conftest.vals >/dev/null
23331 do
23332   # Write chunks of a limited-size here document to conftest.frag.
23333   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
23334   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
23335   echo 'CEOF' >> $CONFIG_STATUS
23336   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23337   rm -f conftest.vals
23338   mv conftest.tail conftest.vals
23339 done
23340 rm -f conftest.vals
23341
23342 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
23343 # marker @DEFS@.
23344 echo '  cat >> conftest.edit <<CEOF
23345 /@DEFS@/r conftest.frag
23346 /@DEFS@/d
23347 CEOF
23348 sed -f conftest.edit $tmp/in > $tmp/out
23349 rm -f $tmp/in
23350 mv $tmp/out $tmp/in
23351 rm -f conftest.edit conftest.frag
23352 ' >> $CONFIG_STATUS
23353
23354 cat >>$CONFIG_STATUS <<\EOF
23355   # Let's still pretend it is `configure' which instantiates (i.e., don't
23356   # use $as_me), people would be surprised to read:
23357   #    /* config.h.  Generated automatically by config.status.  */
23358   if test x"$ac_file" = x-; then
23359     echo "/* Generated automatically by configure.  */" >$tmp/config.h
23360   else
23361     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
23362   fi
23363   cat $tmp/in >>$tmp/config.h
23364   rm -f $tmp/in
23365   if test x"$ac_file" != x-; then
23366     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
23367       { echo "$as_me:23367: $ac_file is unchanged" >&5
23368 echo "$as_me: $ac_file is unchanged" >&6;}
23369     else
23370       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23371          X"$ac_file" : 'X\(//\)[^/]' \| \
23372          X"$ac_file" : 'X\(//\)$' \| \
23373          X"$ac_file" : 'X\(/\)' \| \
23374          .     : '\(.\)' 2>/dev/null ||
23375 echo X"$ac_file" |
23376     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23377           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23378           /^X\(\/\/\)$/{ s//\1/; q; }
23379           /^X\(\/\).*/{ s//\1/; q; }
23380           s/.*/./; q'`
23381       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23382         { case "$ac_dir" in
23383   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
23384   *)                      as_incr_dir=.;;
23385 esac
23386 as_dummy="$ac_dir"
23387 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
23388   case $as_mkdir_dir in
23389     # Skip DOS drivespec
23390     ?:) as_incr_dir=$as_mkdir_dir ;;
23391     *)
23392       as_incr_dir=$as_incr_dir/$as_mkdir_dir
23393       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
23394     ;;
23395   esac
23396 done; }
23397
23398       fi
23399       rm -f $ac_file
23400       mv $tmp/config.h $ac_file
23401     fi
23402   else
23403     cat $tmp/config.h
23404     rm -f $tmp/config.h
23405   fi
23406 done
23407 EOF
23408 cat >>$CONFIG_STATUS <<\EOF
23409 #
23410 # CONFIG_COMMANDS section.
23411 #
23412 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
23413   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
23414   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
23415
23416   case $ac_dest in
23417     default )
23418 if test "x$cf_with_tests" != xno ; then
23419
23420 for cf_dir in test
23421 do
23422         if test ! -d $srcdir/$cf_dir; then
23423                 continue
23424         elif test -f $srcdir/$cf_dir/programs; then
23425                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
23426         fi
23427 done
23428
23429 fi
23430
23431 cf_prefix=$LIB_PREFIX
23432
23433 case $cf_cv_shlib_version in
23434 (cygdll|msysdll|mingw)
23435         TINFO_NAME=$TINFO_ARG_SUFFIX
23436         TINFO_SUFFIX=.dll
23437         ;;
23438 esac
23439
23440 if test -n "$TINFO_SUFFIX" ; then
23441         case $TINFO_SUFFIX in
23442         (tw*)
23443                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
23444                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
23445                 ;;
23446         (t*)
23447                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
23448                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
23449                 ;;
23450         (w*)
23451                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
23452                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
23453                 ;;
23454         esac
23455 fi
23456
23457 for cf_dir in $SRC_SUBDIRS
23458 do
23459         if test ! -d $srcdir/$cf_dir ; then
23460                 continue
23461         elif test -f $srcdir/$cf_dir/modules; then
23462
23463                 SHARED_LIB=
23464                 Libs_To_Make=
23465
23466                 cf_sed_options=
23467                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
23468                 then
23469                         cf_sed_options="$cf_sed_options -e \"s/NCURSES\\([WT]\\+\\)\?_/NCURSES\\1${cf_cv_abi_version}_/g\""
23470                 fi
23471
23472                 if test "x$WILDCARD_SYMS" = xno
23473                 then
23474                         cf_sed_options="$cf_sed_options -e \"s/_\*;//g\""
23475                 fi
23476
23477                 if test "x$cf_sed_options" != "x"
23478                 then
23479                         cat >>$cf_dir/Makefile <<CF_EOF
23480
23481 # Generated by CF_LIB_RULES
23482 resulting.map: $UNALTERED_SYMS
23483         sed $cf_sed_options < $UNALTERED_SYMS >\$@
23484
23485 clean::
23486         rm -f resulting.map
23487 CF_EOF
23488                 fi
23489
23490                 for cf_item in $cf_LIST_MODELS
23491                 do
23492
23493         case X$cf_item in
23494         (Xlibtool)
23495                 cf_suffix='.la'
23496                 cf_depsuf=$cf_suffix
23497                 ;;
23498         (Xdebug)
23499                 cf_suffix='_g.a'
23500                 cf_depsuf=$cf_suffix
23501                 ;;
23502         (Xprofile)
23503                 cf_suffix='_p.a'
23504                 cf_depsuf=$cf_suffix
23505                 ;;
23506         (Xshared)
23507                 case $cf_cv_system_name in
23508                 (aix[5-7]*)
23509                         cf_suffix='.so'
23510                         cf_depsuf=$cf_suffix
23511                         ;;
23512                 (cygwin*|msys*|mingw*)
23513                         cf_suffix='.dll'
23514                         cf_depsuf='.dll.a'
23515                         ;;
23516                 (darwin*)
23517                         cf_suffix='.dylib'
23518                         cf_depsuf=$cf_suffix
23519                         ;;
23520                 (hpux*)
23521                         case $target in
23522                         (ia64*)
23523                                 cf_suffix='.so'
23524                                 cf_depsuf=$cf_suffix
23525                                 ;;
23526                         (*)
23527                                 cf_suffix='.sl'
23528                                 cf_depsuf=$cf_suffix
23529                                 ;;
23530                         esac
23531                         ;;
23532                 (*)
23533                         cf_suffix='.so'
23534                         cf_depsuf=$cf_suffix
23535                         ;;
23536                 esac
23537                 ;;
23538         (*)
23539                 cf_suffix='.a'
23540                 cf_depsuf=$cf_suffix
23541                 ;;
23542         esac
23543         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23544         then
23545                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23546                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23547         fi
23548
23549                         cf_libname=$cf_dir
23550                         test "$cf_dir" = c++ && cf_libname=ncurses++
23551                         if test $cf_item = shared ; then
23552                                 if test -n "${LIB_SUFFIX}"
23553                                 then
23554                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23555                                 else
23556                                         cf_shared_suffix="$cf_suffix"
23557                                 fi
23558                                 if test "$cf_cv_do_symlinks" = yes ; then
23559                                         cf_version_name=
23560
23561                                         case "$cf_cv_shlib_version" in
23562                                         (rel)
23563                                                 cf_version_name=REL_VERSION
23564                                                 ;;
23565                                         (abi)
23566                                                 cf_version_name=ABI_VERSION
23567                                                 ;;
23568                                         esac
23569
23570                                         if test -n "$cf_version_name"
23571                                         then
23572                                                 case "$cf_cv_system_name" in
23573                                                 (darwin*)
23574                                                         # "w", etc?
23575                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
23576                                                         ;;
23577                                                 (*)
23578                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
23579                                                         ;;
23580                                                 esac
23581                                         fi
23582                                         if test -n "${USE_LIB_SUFFIX}"
23583                                         then
23584                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
23585                                         else
23586                                                 cf_shared_suffix="$cf_suffix"
23587                                         fi
23588                                 fi
23589                                 # cygwin needs import library, and has unique naming convention
23590                                 # use autodetected ${cf_prefix} for import lib and static lib, but
23591                                 # use 'cyg' prefix for shared lib.
23592                                 case $cf_cv_shlib_version in
23593                                 (cygdll)
23594                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23595                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
23596                                         ;;
23597                                 (msysdll)
23598                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23599                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
23600                                         ;;
23601                                 (mingw)
23602                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
23603                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
23604                                         ;;
23605                                 (*)
23606                                         cf_add_lib=
23607                                         ;;
23608                                 esac
23609                                 if test -n "$cf_add_lib"
23610                                 then
23611                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23612                                         continue
23613                                 fi
23614                         fi
23615                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
23616                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
23617                 done
23618
23619                 if test $cf_dir = ncurses ; then
23620                         cf_subsets="$LIB_SUBSETS"
23621                         cf_r_parts="$cf_subsets"
23622                         cf_liblist="$Libs_To_Make"
23623
23624                         while test -n "$cf_r_parts"
23625                         do
23626                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
23627                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
23628                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
23629                                         cf_add_lib=
23630                                         case $cf_l_parts in
23631                                         (*termlib*)
23632                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
23633                                                 ;;
23634                                         (*ticlib*)
23635                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
23636                                                 ;;
23637                                         (*)
23638                                                 break
23639                                                 ;;
23640                                         esac
23641                                         if test -n "$cf_add_lib"; then
23642                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
23643                                         fi
23644                                 else
23645                                         break
23646                                 fi
23647                         done
23648                 else
23649                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
23650                 fi
23651
23652                 if test $cf_dir = c++; then
23653                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
23654                                 cf_list=
23655                                 for cf_item in $Libs_To_Make
23656                                 do
23657                                         case $cf_item in
23658                                         (*.a)
23659                                                 ;;
23660                                         (*)
23661                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23662                                                 ;;
23663                                         esac
23664                                         for cf_test in $cf_list
23665                                         do
23666                                                 if test "$cf_test" = "$cf_item"
23667                                                 then
23668                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23669                                                         cf_item=
23670                                                         break
23671                                                 fi
23672                                         done
23673                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23674                                 done
23675                                 Libs_To_Make="$cf_list"
23676                         fi
23677                 fi
23678
23679                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23680                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23681                         $cf_dir/Makefile >$cf_dir/Makefile.out
23682                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23683
23684                 $AWK -f $srcdir/mk-0th.awk \
23685                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23686                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23687
23688                 for cf_subset in $cf_subsets
23689                 do
23690                         cf_subdirs=
23691                         for cf_item in $cf_LIST_MODELS
23692                         do
23693
23694                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23695
23696 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23697
23698                         CXX_MODEL=$cf_ITEM
23699                         if test "$CXX_MODEL" = SHARED; then
23700                                 case $cf_cv_shlib_version in
23701                                 (cygdll|msysdll|mingw)
23702                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23703
23704 echo "${as_me:-configure}:23704: testing overriding CXX_MODEL to SHARED ..." 1>&5
23705
23706                                         with_shared_cxx=yes
23707                                         ;;
23708                                 (*)
23709                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23710                                         ;;
23711                                 esac
23712                         fi
23713
23714         case X$cf_item in
23715         (Xlibtool)
23716                 cf_suffix='.la'
23717                 cf_depsuf=$cf_suffix
23718                 ;;
23719         (Xdebug)
23720                 cf_suffix='_g.a'
23721                 cf_depsuf=$cf_suffix
23722                 ;;
23723         (Xprofile)
23724                 cf_suffix='_p.a'
23725                 cf_depsuf=$cf_suffix
23726                 ;;
23727         (Xshared)
23728                 case $cf_cv_system_name in
23729                 (aix[5-7]*)
23730                         cf_suffix='.so'
23731                         cf_depsuf=$cf_suffix
23732                         ;;
23733                 (cygwin*|msys*|mingw*)
23734                         cf_suffix='.dll'
23735                         cf_depsuf='.dll.a'
23736                         ;;
23737                 (darwin*)
23738                         cf_suffix='.dylib'
23739                         cf_depsuf=$cf_suffix
23740                         ;;
23741                 (hpux*)
23742                         case $target in
23743                         (ia64*)
23744                                 cf_suffix='.so'
23745                                 cf_depsuf=$cf_suffix
23746                                 ;;
23747                         (*)
23748                                 cf_suffix='.sl'
23749                                 cf_depsuf=$cf_suffix
23750                                 ;;
23751                         esac
23752                         ;;
23753                 (*)
23754                         cf_suffix='.so'
23755                         cf_depsuf=$cf_suffix
23756                         ;;
23757                 esac
23758                 ;;
23759         (*)
23760                 cf_suffix='.a'
23761                 cf_depsuf=$cf_suffix
23762                 ;;
23763         esac
23764         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
23765         then
23766                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
23767                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
23768         fi
23769
23770         case $cf_item in
23771         (libtool) cf_subdir='obj_lo'  ;;
23772         (normal)  cf_subdir='objects' ;;
23773         (debug)   cf_subdir='obj_g' ;;
23774         (profile) cf_subdir='obj_p' ;;
23775         (shared)
23776                 case $cf_cv_system_name in
23777                 (cygwin|msys)
23778                         cf_subdir='objects' ;;
23779                 (*)
23780                         cf_subdir='obj_s' ;;
23781                 esac
23782         esac
23783
23784                         # Test for case where we build libtinfo with a different name.
23785                         cf_libname=$cf_dir
23786                         if test $cf_dir = ncurses ; then
23787                                 case $cf_subset in
23788                                 (*base*)
23789                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
23790                                         ;;
23791                                 (*termlib*)
23792                                         cf_libname=$TINFO_LIB_SUFFIX
23793                                         ;;
23794                                 (ticlib*)
23795                                         cf_libname=$TICS_LIB_SUFFIX
23796                                         ;;
23797                                 esac
23798                         elif test $cf_dir = c++ ; then
23799                                 cf_libname=ncurses++$USE_LIB_SUFFIX
23800                         else
23801                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
23802                         fi
23803                         if test -n "${USE_ARG_SUFFIX}" ; then
23804                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
23805                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
23806                         fi
23807
23808                         # These dependencies really are for development, not
23809                         # builds, but they are useful in porting, too.
23810                         cf_depend="../include/ncurses_cfg.h"
23811                         if test "$srcdir" = "."; then
23812                                 cf_reldir="."
23813                         else
23814                                 cf_reldir="\${srcdir}"
23815                         fi
23816
23817                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23818                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23819                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23820                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23821                         fi
23822
23823                         cf_dir_suffix=
23824                         old_cf_suffix="$cf_suffix"
23825                         if test "$cf_cv_shlib_version_infix" = yes ; then
23826                         if test -n "$USE_LIB_SUFFIX" ; then
23827                                 case $USE_LIB_SUFFIX in
23828                                 (tw*)
23829                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
23830                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
23831                                         cf_dir_suffix=tw$EXTRA_SUFFIX
23832                                         ;;
23833                                 (t*)
23834                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
23835                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
23836                                         cf_dir_suffix=t$EXTRA_SUFFIX
23837                                         ;;
23838                                 (w*)
23839                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
23840                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
23841                                         cf_dir_suffix=w$EXTRA_SUFFIX
23842                                         ;;
23843                                 (*)
23844                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
23845                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
23846                                         cf_dir_suffix=$EXTRA_SUFFIX
23847                                         ;;
23848                                 esac
23849                         fi
23850                         fi
23851
23852                         $AWK -f $srcdir/mk-1st.awk \
23853                                 name=${cf_libname}${cf_dir_suffix} \
23854                                 traces=$LIB_TRACING \
23855                                 MODEL=$cf_ITEM \
23856                                 CXX_MODEL=$CXX_MODEL \
23857                                 model=$cf_subdir \
23858                                 prefix=$cf_prefix \
23859                                 suffix=$cf_suffix \
23860                                 subset=$cf_subset \
23861                                 driver=$cf_cv_term_driver \
23862                                 SymLink="$LN_S" \
23863                                 TermlibRoot=$TINFO_NAME \
23864                                 TermlibSuffix=$TINFO_SUFFIX \
23865                                 ShlibVer=$cf_cv_shlib_version \
23866                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23867                                 ReLink=${cf_cv_do_relink:-no} \
23868                                 DoLinks=$cf_cv_do_symlinks \
23869                                 rmSoLocs=$cf_cv_rm_so_locs \
23870                                 ldconfig="$LDCONFIG" \
23871                                 overwrite=$WITH_OVERWRITE \
23872                                 depend="$cf_depend" \
23873                                 host="$host" \
23874                                 libtool_version="$LIBTOOL_VERSION" \
23875                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23876
23877                         cf_suffix="$old_cf_suffix"
23878
23879                         for cf_subdir2 in $cf_subdirs lib
23880                         do
23881                                 test $cf_subdir = $cf_subdir2 && break
23882                         done
23883                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23884                         $AWK -f $srcdir/mk-2nd.awk \
23885                                 name=$cf_dir \
23886                                 traces=$LIB_TRACING \
23887                                 MODEL=$cf_ITEM \
23888                                 model=$cf_subdir \
23889                                 subset=$cf_subset \
23890                                 srcdir=$srcdir \
23891                                 echo=$WITH_ECHO \
23892                                 crenames=$cf_cv_prog_CC_c_o \
23893                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23894                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23895                         cf_subdirs="$cf_subdirs $cf_subdir"
23896                         done
23897                 done
23898         fi
23899
23900         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23901 done
23902
23903 for cf_dir in $SRC_SUBDIRS
23904 do
23905         if test ! -d $srcdir/$cf_dir ; then
23906                 continue
23907         fi
23908
23909         if test -f $cf_dir/Makefile ; then
23910                 case "$cf_dir" in
23911                 (Ada95)
23912                         echo 'libs \' >> Makefile
23913                         echo 'install.libs \' >> Makefile
23914                         echo 'uninstall.libs ::' >> Makefile
23915                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23916                         ;;
23917                 esac
23918         fi
23919
23920         if test -f $srcdir/$cf_dir/modules; then
23921                 echo >> Makefile
23922                 if test -f $srcdir/$cf_dir/headers; then
23923 cat >> Makefile <<CF_EOF
23924 install.includes \\
23925 uninstall.includes \\
23926 CF_EOF
23927                 fi
23928 if test "$cf_dir" != "c++" ; then
23929 echo 'lint \' >> Makefile
23930 fi
23931 cat >> Makefile <<CF_EOF
23932 libs \\
23933 lintlib \\
23934 install.libs \\
23935 uninstall.libs \\
23936 install.$cf_dir \\
23937 uninstall.$cf_dir ::
23938         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23939 CF_EOF
23940         elif test -f $srcdir/$cf_dir/headers; then
23941 cat >> Makefile <<CF_EOF
23942
23943 libs \\
23944 install.libs \\
23945 uninstall.libs \\
23946 install.includes \\
23947 uninstall.includes ::
23948         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23949 CF_EOF
23950 fi
23951 done
23952
23953 if test "x$cf_with_db_install" = xyes; then
23954 cat >> Makefile <<CF_EOF
23955
23956 install.libs uninstall.libs \\
23957 install.data uninstall.data ::
23958 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23959 CF_EOF
23960 else
23961 cat >> Makefile <<CF_EOF
23962
23963 install.libs uninstall.libs ::
23964         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23965 CF_EOF
23966 fi
23967
23968 if test "x$cf_with_manpages" = xyes; then
23969 cat >> Makefile <<CF_EOF
23970
23971 install.man \\
23972 uninstall.man ::
23973         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23974 CF_EOF
23975 fi
23976
23977 cat >> Makefile <<CF_EOF
23978
23979 distclean ::
23980         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23981         rm -f headers.sh headers.sed mk_shared_lib.sh
23982         rm -f edit_man.* man_alias.*
23983         rm -rf \${DIRS_TO_MAKE}
23984 CF_EOF
23985
23986 # Special case: tack's manpage lives in its own directory.
23987 if test "x$cf_with_manpages" = xyes; then
23988 if test -d tack ; then
23989 if test -f $srcdir/$tack.h; then
23990 cat >> Makefile <<CF_EOF
23991
23992 install.man \\
23993 uninstall.man ::
23994         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23995 CF_EOF
23996 fi
23997 fi
23998 fi
23999
24000 rm -f headers.sed headers.sh
24001
24002 echo creating headers.sh
24003 cat >headers.sh <<CF_EOF
24004 #! /bin/sh
24005 # This shell script is generated by the 'configure' script.  It is invoked in a
24006 # subdirectory of the build tree.  It generates a sed-script in the parent
24007 # directory that is used to adjust includes for header files that reside in a
24008 # subdirectory of /usr/include, etc.
24009 PRG=""
24010 while test \$# != 3
24011 do
24012 PRG="\$PRG \$1"; shift
24013 done
24014 DST=\$1
24015 REF=\$2
24016 SRC=\$3
24017 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
24018 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
24019 echo installing \$SRC in \$DST
24020 CF_EOF
24021
24022 if test $WITH_CURSES_H = yes; then
24023         cat >>headers.sh <<CF_EOF
24024 case \$DST in
24025 (/*/include/*)
24026         END=\`basename \$DST\`
24027         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24028         do
24029                 NAME=\`basename \$i\`
24030                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24031         done
24032         ;;
24033 (*)
24034         echo "" >> \$TMPSED
24035         ;;
24036 esac
24037 CF_EOF
24038
24039 else
24040         cat >>headers.sh <<CF_EOF
24041 case \$DST in
24042 (/*/include/*)
24043         END=\`basename \$DST\`
24044         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
24045         do
24046                 NAME=\`basename \$i\`
24047                 if test "\$NAME" = "curses.h"
24048                 then
24049                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24050                         NAME=ncurses.h
24051                 fi
24052                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
24053         done
24054         ;;
24055 (*)
24056         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
24057         ;;
24058 esac
24059 CF_EOF
24060 fi
24061 cat >>headers.sh <<CF_EOF
24062 rm -f \$TMPSRC
24063 sed -f \$TMPSED \$SRC > \$TMPSRC
24064 NAME=\`basename \$SRC\`
24065 CF_EOF
24066 if test $WITH_CURSES_H != yes; then
24067         cat >>headers.sh <<CF_EOF
24068 test "\$NAME" = "curses.h" && NAME=ncurses.h
24069 CF_EOF
24070 fi
24071 cat >>headers.sh <<CF_EOF
24072 # Just in case someone gzip'd manpages, remove the conflicting copy.
24073 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
24074
24075 eval \$PRG \$TMPSRC \$DST/\$NAME
24076 rm -f \$TMPSRC \$TMPSED
24077 CF_EOF
24078
24079 chmod 0755 headers.sh
24080
24081 for cf_dir in $SRC_SUBDIRS
24082 do
24083         if test ! -d $srcdir/$cf_dir ; then
24084                 continue
24085         fi
24086
24087         if test -f $srcdir/$cf_dir/headers; then
24088                 $AWK -f $srcdir/mk-hdr.awk \
24089                         subset="$LIB_SUBSETS" \
24090                         compat="$WITH_CURSES_H" \
24091                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
24092         fi
24093
24094         if test -f $srcdir/$cf_dir/modules; then
24095                 if test "$cf_dir" != "c++" ; then
24096                         cat >>$cf_dir/Makefile <<"CF_EOF"
24097 depend : ${AUTO_SRC}
24098         makedepend -- ${CPPFLAGS} -- ${C_SRC}
24099
24100 # DO NOT DELETE THIS LINE -- make depend depends on it.
24101 CF_EOF
24102                 fi
24103         fi
24104 done
24105
24106 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24107 if test -z "$USE_OLD_MAKERULES" ; then
24108         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
24109 fi
24110 fi
24111  ;;
24112   esac
24113 done
24114 EOF
24115
24116 cat >>$CONFIG_STATUS <<\EOF
24117
24118 { (exit 0); exit 0; }
24119 EOF
24120 chmod +x $CONFIG_STATUS
24121 ac_clean_files=$ac_clean_files_save
24122
24123 # configure is writing to config.log, and then calls config.status.
24124 # config.status does its own redirection, appending to config.log.
24125 # Unfortunately, on DOS this fails, as config.log is still kept open
24126 # by configure, so config.status won't be able to write to it; its
24127 # output is simply discarded.  So we exec the FD to /dev/null,
24128 # effectively closing config.log, so it can be properly (re)opened and
24129 # appended to by config.status.  When coming back to configure, we
24130 # need to make the FD available again.
24131 if test "$no_create" != yes; then
24132   ac_cs_success=:
24133   exec 5>/dev/null
24134   $SHELL $CONFIG_STATUS || ac_cs_success=false
24135   exec 5>>config.log
24136   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24137   # would make configure fail if this is the last instruction.
24138   $ac_cs_success || { (exit 1); exit 1; }
24139 fi
24140 ${MAKE:-make} preinstall